.rmd-ras {
  box-sizing: border-box;
  color: #1a1a1a;
  font-family: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
  margin: 36px 0;
}

.rmd-ras *,
.rmd-ras *::before,
.rmd-ras *::after {
  box-sizing: border-box;
}

.rmd-ras__header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.rmd-ras__heading {
  color: #1a1a1a;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
}

.rmd-ras__controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.rmd-ras__control {
  align-items: center;
  appearance: none;
  background: #fff;
  border: 1px solid #d9d5c8;
  border-radius: 999px;
  color: #2b2b2b;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  height: 36px;
  justify-content: center;
  padding: 0;
  transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
  width: 36px;
}

.rmd-ras__control:hover:not(:disabled) {
  border-color: #8b7b3e;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .08);
}

.rmd-ras__control:focus-visible,
.rmd-ras__card:focus-visible {
  outline: 3px solid #2463a5;
  outline-offset: 3px;
}

.rmd-ras__control:disabled {
  cursor: default;
  opacity: .35;
}

.rmd-ras__viewport {
  position: relative;
}

.rmd-ras__viewport::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  content: "";
  inset: 0 0 12px auto;
  opacity: var(--rmd-ras-more, 1);
  pointer-events: none;
  position: absolute;
  transition: opacity .15s ease;
  width: 34px;
}

.rmd-ras__track {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 3px 3px 16px;
  scroll-padding-inline: 3px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.rmd-ras__item {
  display: flex;
  flex: 0 0 clamp(210px, 64vw, 260px);
  margin: 0;
  padding: 0;
  scroll-snap-align: start;
}

.rmd-ras__card {
  background: #fff;
  border: 1px solid #e2e0d9;
  border-radius: 12px;
  color: #333;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  width: 100%;
}

.rmd-ras__card:hover {
  border-color: #9b8b4b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .09);
  transform: translateY(-1px);
}

.rmd-ras__thumb {
  aspect-ratio: 16 / 9;
  background: #f3f2ee;
  display: block;
  overflow: hidden;
  width: 100%;
}

.rmd-ras__thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.rmd-ras__thumb--empty::before {
  color: #77736a;
  content: "関連記事";
  display: grid;
  font-size: 12px;
  height: 100%;
  letter-spacing: .08em;
  place-items: center;
}

.rmd-ras__card--no-thumbnail .rmd-ras__label {
  padding-top: 14px;
}

.rmd-ras__card--no-thumbnail .rmd-ras__title:first-child {
  padding-top: 15px;
}

.rmd-ras__label {
  color: #75672f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 10px 12px 0;
}

.rmd-ras__title {
  color: #1a1a1a;
  display: -webkit-box;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  overflow: hidden;
  padding: 5px 12px 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 767px) {
  .rmd-ras {
    margin: 30px 0;
  }

  .rmd-ras__controls {
    display: none;
  }

  .rmd-ras__heading {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rmd-ras__card,
  .rmd-ras__control,
  .rmd-ras__viewport::after {
    transition: none;
  }
}
