/* 作品一覧V2専用: 既存work-grid等への影響を防ぐためrstv2接頭辞に統一 */
.rstv2-works {
  width: 100%;
  margin: 1.5rem 0 2rem;
  color: #282828;
}

.rstv2-works *,
.rstv2-works *::before,
.rstv2-works *::after {
  box-sizing: border-box;
}

.rstv2-section {
  margin: 0 0 2.2rem;
}

/* セクション見出し：ダーク背景対応 */
.rstv2-works .rstv2-heading {
    margin: 0 0 1rem;
    font-size: 1.3rem;
    line-height: 1.5;
    color: #f5f5f5 !important;
}

/* 過去作品の件数 */
.rstv2-works .rstv2-count {
    color: #cccccc;
}

.rstv2-count {
  font-size: .75em;
  font-weight: 400;
  color: #777;
}

.rstv2-feature {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
}

.rstv2-feature-thumb {
  flex: 0 0 42%;
  min-width: 0;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
  background: #eee;
}

.rstv2-feature-thumb img,
.rstv2-card-thumb img,
.rstv2-past-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rstv2-feature-body {
  flex: 1;
  min-width: 0;
}

.rstv2-kicker {
  margin: 0 0 .35rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #9b5a20;
}

.rstv2-feature-title {
  margin: 0 0 .5rem;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #222;
}

.rstv2-feature-excerpt {
  margin: 0 0 .8rem;
  font-size: .9rem;
  line-height: 1.6;
  color: #555;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.rstv2-links {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.rstv2-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 80px;
  padding: .6em .7em;
  min-height: 36px;
  border-radius: 5px;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: .8rem;
  line-height: 1.3;
  transition: opacity .15s ease;
}

.rstv2-link:hover {
  opacity: .83;
}

.rstv2-link:focus-visible,
.rstv2-more-summary:focus-visible {
  outline: 3px solid #222;
  outline-offset: 3px;
}

.rstv2-link--fanza_url {
  background: #ec8200;
}

.rstv2-link--dlsite_url {
  background: #0074d9;
}

.rstv2-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.rstv2-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
  transition: transform .2s ease, box-shadow .2s ease;
}

.rstv2-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .10);
}

.rstv2-card-thumb {
  aspect-ratio: 4/3;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.rstv2-card-title {
  margin: 8px 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #222;
  line-height: 1.45;
}

.rstv2-card-excerpt {
  margin: 0 0 16px;
  color: #666;
  line-height: 1.6;
  font-size: .9rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  flex-grow: 1;
}

.rstv2-card .rstv2-links {
  margin-top: auto;
}

.rstv2-past-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #e2e2e2;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}

.rstv2-past-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: .8rem 1rem;
  margin: 0;
}

.rstv2-past-item+.rstv2-past-item {
  border-top: 1px solid #ebebeb;
}

.rstv2-past-thumb {
  flex: 0 0 108px;
  aspect-ratio: 4/3;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.rstv2-past-body {
  min-width: 0;
  flex: 1;
}

.rstv2-past-title {
  margin: 0 0 .2rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: #222;
}

.rstv2-past-excerpt {
  margin: 0 0 .3rem;
  font-size: .82rem;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.rstv2-past-item .rstv2-links {
  justify-content: flex-start;
}

.rstv2-past-item .rstv2-link {
  flex: 0 1 auto;
  min-height: 30px;
  padding: .4em .8em;
  font-size: .75rem;
}

.rstv2-more {
  margin-top: .65rem;
}

.rstv2-more-summary {
  display: block;
  list-style: none;
  padding: .7rem 1rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 7px;
  background: #f8f8f8;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}

.rstv2-more-summary::-webkit-details-marker {
  display: none;
}

.rstv2-more-summary:hover {
  background: #eee;
}

.rstv2-more-opened,
.rstv2-more[open] .rstv2-more-closed {
  display: none;
}

.rstv2-more[open] .rstv2-more-opened {
  display: inline;
}

.rstv2-past-list--additional {
  margin-top: .65rem;
}

.rstv2-empty {
  margin: 1rem 0;
}

@media (min-width:600px) {
  .rstv2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width:900px) {
  .rstv2-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width:599px) {
  .rstv2-feature {
    gap: .8rem;
    padding: .75rem;
    align-items: flex-start;
  }

  .rstv2-feature-thumb {
    flex-basis: 39%;
  }

  .rstv2-feature-title {
    font-size: 1rem;
  }

  .rstv2-feature-excerpt {
    font-size: .8rem;
    -webkit-line-clamp: 2;
  }

  .rstv2-feature .rstv2-links {
    gap: .3rem;
  }

  .rstv2-feature .rstv2-link {
    flex-basis: 100%;
    min-height: 32px;
  }

  .rstv2-past-item {
    padding: .7rem;
    gap: .65rem;
  }

  .rstv2-past-thumb {
    flex-basis: 80px;
  }

  .rstv2-past-title {
    font-size: .91rem;
  }

  .rstv2-past-excerpt {
    display: none;
  }
}

@media (prefers-reduced-motion:reduce) {

  .rstv2-card,
  .rstv2-link {
    transition: none;
  }

  .rstv2-card:hover {
    transform: none;
  }
}

/* ==========================================
   スマホ：最新作の画像を大きく表示
   ========================================== */
@media screen and (max-width: 599px) {

  /* 最新作を縦並びに変更 */
  .rstv2-feature {
    flex-direction: column;
    align-items: stretch;
  }

  /* 画像をカード幅いっぱいに表示 */
  .rstv2-feature-thumb {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  /* 作品情報を画像の下へ配置 */
  .rstv2-feature-body {
    width: 100%;
  }

  /* タイトルを少し大きく */
  .rstv2-feature-title {
    font-size: 1.15rem;
  }

  /* 販売ボタンを横並びに戻す */
  .rstv2-feature .rstv2-link {
    flex: 1 1 0;
    min-width: 0;
  }
}