
:root{
  --bg:#0a0a0c;--panel:#131318;--panel2:#1a1a20;--text:#f4f1e8;
  --muted:#aaa6a0;--gold:#c9a45c;--gold2:#e3c985;--line:#2b2927;
  --danger:#b64c55;--max:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;background:var(--bg);color:var(--text);line-height:1.8}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
.container{width:min(calc(100% - 32px),var(--max));margin:auto}
.site-header{position:sticky;top:0;z-index:30;background:rgba(10,10,12,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.header-inner{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{font-family:Georgia,serif;font-size:1.35rem;letter-spacing:.14em;font-weight:700}
.brand span{color:var(--gold)}
.nav{display:flex;gap:22px;align-items:center;font-size:.9rem}
.nav a{color:var(--muted)}
.nav a:hover{color:var(--gold2)}
.menu-button{display:none;background:none;border:1px solid var(--line);color:var(--text);padding:8px 12px;border-radius:6px}
.hero{min-height:520px;display:grid;place-items:center;text-align:center;background:
radial-gradient(circle at 50% 30%,rgba(201,164,92,.16),transparent 38%),
linear-gradient(135deg,#08080a,#141218 55%,#09090b)}
.hero h1{font-family:Georgia,serif;font-size:clamp(2.4rem,6vw,5rem);line-height:1.1;margin:.2em 0;letter-spacing:.04em}
.hero .eyebrow,.eyebrow{color:var(--gold2);letter-spacing:.2em;text-transform:uppercase;font-size:.78rem}
.hero p{color:var(--muted);max-width:720px;margin:20px auto 28px}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 24px;border-radius:6px;border:1px solid var(--gold);background:var(--gold);color:#111;font-weight:700}
.btn.secondary{background:transparent;color:var(--gold2)}
.btns{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.section{padding:76px 0}
.section.alt{background:#0f0f13}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:28px}
.section h2,.page-title{font-family:Georgia,serif;font-size:clamp(1.8rem,4vw,3rem);line-height:1.25;margin:0}
.section-head p{max-width:620px;color:var(--muted);margin:0}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.card{background:linear-gradient(145deg,var(--panel),#101014);border:1px solid var(--line);border-radius:10px;overflow:hidden;transition:.2s}
.card:hover{transform:translateY(-3px);border-color:#5a4a2d}
.card-visual{aspect-ratio:16/9;background:
linear-gradient(135deg,rgba(201,164,92,.12),rgba(255,255,255,.02)),
repeating-linear-gradient(45deg,#16161b,#16161b 10px,#121217 10px,#121217 20px);
display:grid;place-items:center;color:var(--gold2);font-family:Georgia,serif;font-size:1.2rem;letter-spacing:.08em;text-align:center;padding:20px}
.card-body{padding:22px}
.card h3{margin:0 0 10px;font-size:1.1rem;line-height:1.5}
.card p{color:var(--muted);font-size:.92rem;margin:0 0 14px}
.meta{font-size:.78rem;color:var(--gold2);letter-spacing:.08em}
.features{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.feature{padding:26px;border-left:2px solid var(--gold);background:var(--panel)}
.feature h3{margin-top:0}
.feature p{color:var(--muted);margin-bottom:0}
.page-hero{padding:90px 0 56px;background:linear-gradient(180deg,#111016,#0a0a0c)}
.page-hero p{color:var(--muted);max-width:760px}
.content-wrap{display:grid;grid-template-columns:minmax(0,760px) 280px;gap:42px;padding:58px 0 90px}
.prose{font-size:1rem}
.prose h2{font-family:Georgia,serif;margin-top:2.2em;border-bottom:1px solid var(--line);padding-bottom:.35em}
.prose h3{margin-top:1.8em}
.prose p,.prose li{color:#d5d1ca}
.prose ul{padding-left:1.3em}
.note{border:1px solid #5d4b2d;background:rgba(201,164,92,.08);padding:18px 20px;border-radius:8px}
.sidebar{align-self:start;position:sticky;top:100px}
.side-box{background:var(--panel);border:1px solid var(--line);padding:22px;border-radius:8px;margin-bottom:18px}
.side-box h3{margin-top:0;font-size:1rem}
.side-box a{display:block;color:var(--muted);padding:7px 0;border-bottom:1px solid var(--line)}
.site-footer{border-top:1px solid var(--line);padding:46px 0 24px;background:#070709}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px}
.footer-grid p,.footer-grid a{color:var(--muted);font-size:.9rem}
.footer-grid a{display:block;margin:8px 0}
.copyright{margin-top:30px;padding-top:20px;border-top:1px solid var(--line);color:#777;font-size:.8rem}
.age-gate{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.96);display:none;place-items:center;padding:20px}
.age-gate.active{display:grid}
.age-panel{width:min(560px,100%);background:#111116;border:1px solid #5d4b2d;border-radius:12px;padding:38px;text-align:center;box-shadow:0 20px 80px rgba(0,0,0,.6)}
.age-panel h2{font-family:Georgia,serif;font-size:2rem;margin:.3em 0}
.age-panel p{color:var(--muted)}
.age-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:25px}
.age-actions button{min-height:50px;border-radius:6px;font-weight:700;cursor:pointer}
.age-yes{background:var(--gold);border:1px solid var(--gold)}
.age-no{background:transparent;color:var(--text);border:1px solid #555}
.form-row{margin-bottom:18px}
label{display:block;margin-bottom:6px;font-weight:600}
input,textarea{width:100%;background:#101014;border:1px solid #3a3836;border-radius:6px;color:var(--text);padding:13px}
textarea{min-height:180px;resize:vertical}
.status{padding:12px;margin:16px 0;border-radius:6px}
.status.ok{background:#15351f}
.status.ng{background:#481d22}
@media(max-width:850px){
 .nav{display:none;position:absolute;top:72px;left:0;right:0;background:#0b0b0e;padding:18px 24px;flex-direction:column;align-items:flex-start;border-bottom:1px solid var(--line)}
 .nav.open{display:flex}.menu-button{display:block}
 .grid,.features{grid-template-columns:1fr 1fr}
 .content-wrap{grid-template-columns:1fr}.sidebar{position:static}
 .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
 .hero{min-height:460px}.grid,.features{grid-template-columns:1fr}
 .footer-grid{grid-template-columns:1fr}.age-actions{grid-template-columns:1fr}
 .section{padding:54px 0}.header-inner{min-height:64px}
}


/* Phase 1: API連携本番トップ */
.alert{padding:14px 16px;border-radius:8px;margin:16px 0;border:1px solid var(--line)}
.alert.ok{background:rgba(74,165,100,.12);border-color:#3d7e51}
.alert.ng{background:rgba(182,76,85,.12);border-color:#74353b}
.work-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.work-card .card-body{min-height:150px}
.work-thumb{aspect-ratio:3/4;background:#1b1b22;display:grid;place-items:center;color:var(--muted);overflow:hidden}
.work-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.center-more{text-align:center;margin-top:28px}
.search-form{display:flex;gap:10px;margin-bottom:22px}
.search-form input{min-height:48px}
.pager{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:28px}
.detail{display:grid;grid-template-columns:360px 1fr;gap:32px}
.detail-img{background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.detail-img img{width:100%;display:block}
.kv{display:grid;grid-template-columns:140px 1fr;border-top:1px solid var(--line);margin-top:18px}
.kv div{padding:10px;border-bottom:1px solid var(--line)}
.kv div:nth-child(odd){color:var(--muted)}
.cta-row{margin-top:24px}
.ranking-list{display:grid;gap:14px}
.ranking-item{display:grid;grid-template-columns:54px 92px 1fr;gap:16px;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:14px}
.ranking-list.compact{max-width:920px;margin:auto}
.rank-no{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--gold);border-radius:50%;color:var(--gold);font-family:Georgia,serif;font-weight:700}
.rank-thumb{aspect-ratio:3/4;background:#1b1b22;border-radius:8px;overflow:hidden;display:grid;place-items:center;color:var(--muted)}
.rank-thumb img{width:100%;height:100%;object-fit:cover}
.rank-body h2,.rank-body h3{font-size:1.05rem;margin:0 0 8px}
.dmm-credit{margin-top:24px;padding:16px 0;border-top:1px solid rgba(201,164,92,.35);color:var(--muted);font-size:.85rem;text-align:center}
code{background:#19191f;padding:.15em .35em;border-radius:4px}
@media(max-width:950px){.work-grid{grid-template-columns:repeat(3,1fr)}.detail{grid-template-columns:1fr}}
@media(max-width:680px){.work-grid{grid-template-columns:repeat(2,1fr)}.search-form{flex-direction:column}.ranking-item{grid-template-columns:44px 78px 1fr;gap:10px;padding:10px}.rank-body h2,.rank-body h3{font-size:.95rem}}
@media(max-width:420px){.work-grid{grid-template-columns:1fr}}


/* Phase 2: 女優ページ */
.actress-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.actress-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 16px;
  text-align: center;
  transition: .2s;
}
.actress-card:hover {
  transform: translateY(-3px);
  border-color: #5a4a2d;
}
.actress-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 1px solid var(--gold);
  color: var(--gold2);
  background: radial-gradient(circle at 50% 30%, rgba(201,164,92,.18), rgba(255,255,255,.02));
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
}
.actress-avatar.large {
  width: 112px;
  height: 112px;
  margin: 0;
  font-size: 2.4rem;
}
.actress-avatar.small-link {
  width: 64px;
  height: 64px;
  margin: 0;
  text-decoration: none;
}
.actress-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.actress-detail-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 42px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.section-head.sub {
  margin-top: 24px;
}
.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.tag-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(201,164,92,.5);
  color: var(--gold2);
  border-radius: 999px;
  font-size: .86rem;
}
.actress-rank-item {
  grid-template-columns: 54px 72px 1fr;
}
@media(max-width:900px) {
  .actress-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media(max-width:620px) {
  .actress-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .actress-detail-head {
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
  }
  .actress-avatar.large {
    width: 84px;
    height: 84px;
    font-size: 1.8rem;
  }
  .actress-rank-item {
    grid-template-columns: 44px 60px 1fr;
  }
}
@media(max-width:420px) {
  .actress-grid {
    grid-template-columns: 1fr;
  }
}


/* Phase 3: 回遊・SEO */
.breadcrumbs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:var(--muted);font-size:.85rem;margin-bottom:22px}.breadcrumbs a{color:var(--gold2)}.breadcrumbs span{color:var(--muted)}
.tag-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.tag-card{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px;min-height:78px;background:var(--panel);border:1px solid var(--line);border-radius:10px;transition:.2s}.tag-card:hover{transform:translateY(-2px);border-color:#5a4a2d}.tag-card span{color:var(--muted);font-size:.86rem}.info-links{margin-top:18px;margin-bottom:8px}.related-section{margin-top:22px}
@media(max-width:900px){.tag-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:620px){.tag-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:420px){.tag-grid{grid-template-columns:1fr}}


/* Phase 4: cron・ランキング前日比・おすすめ管理 */
.rank-delta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  margin-left: 8px;
  font-size: .76rem;
  font-weight: 700;
  border: 1px solid var(--line);
}
.rank-delta.up {
  color: #91e6aa;
  border-color: rgba(145,230,170,.45);
  background: rgba(74,165,100,.15);
}
.rank-delta.down {
  color: #f2a0a8;
  border-color: rgba(242,160,168,.45);
  background: rgba(182,76,85,.15);
}
.rank-delta.new {
  color: var(--gold2);
  border-color: rgba(201,164,92,.6);
  background: rgba(201,164,92,.16);
}
.rank-delta.stay {
  color: var(--muted);
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 38px;
}
.admin-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}
.admin-box select,
.admin-box input,
.admin-box textarea {
  margin-bottom: 14px;
}
.table form {
  margin: 0;
}
@media(max-width:760px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}


/* Pre Phase 5 fixes: 作品カードリンク・女優画像・詳細テーブル */
.work-card-main {
  display: block;
}
.card-links {
  padding: 0 18px 18px;
}
.link-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 10px;
}
.link-row > span {
  color: var(--muted);
  font-size: .78rem;
  padding-top: 4px;
}
.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  margin: 0 6px 6px 0;
  border: 1px solid rgba(201,164,92,.52);
  border-radius: 999px;
  color: var(--gold2);
  font-size: .82rem;
  line-height: 1.2;
  background: rgba(201,164,92,.08);
}
.pill-link:hover {
  border-color: var(--gold2);
  background: rgba(201,164,92,.16);
}
.actress-avatar.has-image {
  overflow: hidden;
}
.actress-avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.detail-table th,
.detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  vertical-align: top;
}
.detail-table tr:last-child th,
.detail-table tr:last-child td {
  border-bottom: none;
}
.detail-table th {
  width: 130px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  background: rgba(255,255,255,.02);
}
@media(max-width:620px) {
  .detail-table th,
  .detail-table td {
    display: block;
    width: 100%;
  }
  .detail-table th {
    padding-bottom: 4px;
  }
  .detail-table td {
    padding-top: 4px;
  }
  .link-row {
    grid-template-columns: 1fr;
  }
}
/* V2 Hotfix: ラベルかぶり修正・画像幅拡大・1作品1行カード */
.work-grid,
.work-list {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 20px;
}

.work-row-card {
  display: grid !important;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  padding: 16px;
}

.work-row-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  aspect-ratio: 4 / 3;
  background: #111117;
  border-radius: 10px;
  overflow: hidden;
  color: var(--muted);
}

.work-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.work-row-content {
  min-width: 0;
  padding: 2px 4px;
}

.work-title-link {
  display: block;
  text-decoration: none;
}

.work-title-link h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  line-height: 1.45;
}

.card-links {
  padding: 12px 0 0;
}

.link-row {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 8px;
  align-items: start;
  margin-top: 14px;
}

.link-label,
.link-row > span {
  display: block;
  width: 92px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 38px;
  white-space: nowrap;
  text-align: left;
  padding: 0;
}

.pill-list,
.link-row > div,
.tag-links,
.detail-table td {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 11px;
  align-items: center;
  min-width: 0;
}

.pill-link,
.tag-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 38px;
  padding: 0 18px;
  border: 2px solid #ff2f6d;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #ff2f6d;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(255, 47, 109, .08);
  transition:
    background-color .18s ease,
    color .18s ease,
    border-color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

.pill-link:hover,
.pill-link:focus-visible,
.tag-links a:hover,
.tag-links a:focus-visible {
  background: #ff2f6d;
  color: #fff;
  border-color: #ff2f6d;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(255, 47, 109, .28);
}

.pill-link:active,
.tag-links a:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(255, 47, 109, .20);
}

.genre-pill,
.actress-pill,
.maker-pill {
  border-color: #ff2f6d;
  color: #ff2f6d;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.detail-table th,
.detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  vertical-align: top;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
  border-bottom: none;
}

.detail-table th {
  width: 130px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  background: rgba(255,255,255,.02);
}

@media(max-width: 900px) {
  .work-row-card {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 18px;
  }

  .work-row-thumb {
    min-height: 190px;
  }
}

@media(max-width: 680px) {
  .work-row-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .work-row-thumb {
    max-width: 420px;
    width: 100%;
    min-height: 190px;
    margin: 0 auto;
  }

  .link-row {
    grid-template-columns: 1fr !important;
    gap: 6px;
  }

  .link-label,
  .link-row > span {
    width: auto;
    line-height: 1.4;
  }

  .pill-link,
  .tag-links a {
    min-width: calc(50% - 8px);
    min-height: 36px;
    padding: 0 12px;
    font-size: .82rem;
  }
}

@media(max-width: 420px) {
  .pill-link,
  .tag-links a {
    min-width: 100%;
  }

  .detail-table th,
  .detail-table td {
    display: block;
    width: 100%;
  }

  .detail-table th {
    padding-bottom: 4px;
  }

  .detail-table td {
    padding-top: 4px;
  }
}

/* Hotfix: サンプル動画 */
.sample-section {
  margin: 18px 0 22px;
}

.sample-section h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.sample-movie {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.sample-movie video,
.sample-movie iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

/* Hotfix: サンプル動画の再生不可時フォールバック */
.sample-movie-fallback {
  width: 100%;
  max-width: 720px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.sample-movie video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

/* Hotfix: サンプル動画の再生可否分岐 + PR表示 */
.sample-box {
  width: 100%;
  max-width: 760px;
  margin: 18px 0 24px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,47,109,.10), rgba(201,164,92,.06));
  border: 1px solid rgba(255,47,109,.35);
  border-radius: 14px;
}

.sample-box-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.sample-box-head h2 {
  margin: 4px 0 0;
  font-size: 1.12rem;
}

.sample-label {
  color: var(--gold2);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ff2f6d;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}

.sample-movie {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.sample-movie video,
.sample-movie iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.sample-official-btn {
  border-radius: 999px;
}

.affiliate-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.7;
}

.affiliate-note span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 20px;
  margin-right: 8px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(255,47,109,.16);
  color: #ff2f6d;
  font-weight: 700;
}

.sample-box-fallback .sample-actions .btn {
  background: #ff2f6d;
  border-color: #ff2f6d;
  color: #fff;
}

@media(max-width: 620px) {
  .sample-box {
    padding: 14px;
  }

  .sample-box-head {
    align-items: center;
  }

  .sample-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Hotfix: 注目女優ランキング画像 + 控えめPR表示 */
.image-rank-item,
.actress-rank-item.image-rank-item {
  grid-template-columns: 54px 118px minmax(0, 1fr);
}

.actress-rank-photo {
  display: grid;
  place-items: center;
  width: 118px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #1b1b22;
  border: 1px solid var(--line);
  color: var(--gold2);
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  text-decoration: none;
}

.actress-rank-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.affiliate-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.7;
}

.affiliate-note span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 18px;
  margin-right: 7px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(255,47,109,.14);
  color: #ff2f6d;
  font-weight: 700;
  font-size: .76rem;
}

@media(max-width: 620px) {
  .image-rank-item,
  .actress-rank-item.image-rank-item {
    grid-template-columns: 44px 86px minmax(0, 1fr);
  }

  .actress-rank-photo {
    width: 86px;
  }
}

/* Hotfix: サンプル動画フォールバック文言削除後の表示調整 */
.sample-box-fallback .sample-actions {
  margin-top: 0;
}

.sample-box-fallback {
  text-align: left;
}

.sample-box-fallback .sample-official-btn {
  min-width: 260px;
  justify-content: center;
}

/* Hotfix: 関連作品分割・ランキング大型表示 */
.related-section .work-list,
.ranking-work-list,
.actress-large-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.ranked-card {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.ranked-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}

.large-rank-no {
  width: 46px;
  height: 46px;
  font-size: 1.05rem;
}

.actress-large-card {
  display: grid;
  grid-template-columns: 54px minmax(300px, 380px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.actress-large-photo {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #111117;
  color: var(--gold2);
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 2rem;
  text-decoration: none;
  border: 1px solid var(--line);
}

.actress-large-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actress-large-body h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.actress-large-body .sample-actions {
  margin-top: 16px;
}

@media(max-width: 900px) {
  .actress-large-card {
    grid-template-columns: 46px minmax(220px, 300px) minmax(0, 1fr);
    gap: 16px;
  }

  .actress-large-photo {
    min-height: 190px;
  }
}

@media(max-width: 680px) {
  .actress-large-card {
    grid-template-columns: 44px 1fr;
  }

  .actress-large-photo {
    grid-column: 1 / -1;
    max-width: 420px;
    margin: 0 auto;
    min-height: 190px;
  }

  .actress-large-body {
    grid-column: 1 / -1;
  }
}

/* Admin Analytics */
.analytics-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.analytics-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255,255,255,.03);
}

.analytics-tabs a.active,
.analytics-tabs a:hover {
  border-color: var(--gold2);
  color: var(--gold2);
  background: rgba(201,164,92,.12);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin: 18px 0 32px;
}

.analytics-grid.small {
  grid-template-columns: repeat(3, 1fr);
}

.analytics-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.analytics-label {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 8px;
}

.analytics-value {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 700;
}

.analytics-note {
  color: var(--muted);
  font-size: .76rem;
  margin-top: 5px;
}

.analytics-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 28px 0;
}

.analytics-table {
  font-size: .88rem;
}

.analytics-table th,
.analytics-table td {
  vertical-align: top;
}

.analytics-table code {
  white-space: normal;
  word-break: break-all;
}

.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.analytics-login {
  max-width: 560px;
}

@media(max-width: 1100px) {
  .analytics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(max-width: 760px) {
  .analytics-grid,
  .analytics-grid.small,
  .analytics-two-col {
    grid-template-columns: 1fr;
  }

  .analytics-value {
    font-size: 1.25rem;
  }
}

/* CTR Auto Recommend */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: end;
}

.admin-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .86rem;
}

.admin-form-grid input[type="number"],
.analytics-login input[type="password"] {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.admin-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

@media(max-width: 760px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Actress image import V2 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge.ok {
  background: rgba(74, 222, 128, .16);
  color: #4ade80;
}
.badge.ng {
  background: rgba(248, 113, 113, .16);
  color: #f87171;
}
.table code {
  word-break: break-all;
}

/* Actress image API spec import */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge.ok {
  background: rgba(74, 222, 128, .16);
  color: #4ade80;
}
.badge.ng {
  background: rgba(248, 113, 113, .16);
  color: #f87171;
}
.table code {
  word-break: break-all;
}
/* Actress image UI adjustment */
.actress-card {
  padding-top: 16px;
  padding-bottom: 16px;
}

.actress-card .actress-avatar {
  width: 112px;
  height: 112px;
  margin-bottom: 12px;
  font-size: 2.2rem;
}

.actress-card .actress-avatar.has-image img,
.actress-detail-head .actress-avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actress-large-card {
  grid-template-columns: 54px 260px minmax(0, 1fr);
}

.actress-large-photo {
  width: 260px;
  max-width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

.actress-large-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111117;
}

.actress-ranking-actions,
.actress-detail-actions {
  align-items: center;
}

.actress-official-btn,
.sample-actions .actress-official-btn {
  background: #ff2f6d;
  border-color: #ff2f6d;
  color: #fff;
  border-radius: 999px;
}

.actress-official-btn:hover,
.sample-actions .actress-official-btn:hover {
  filter: brightness(1.06);
  color: #fff;
}

@media(max-width: 900px) {
  .actress-large-card {
    grid-template-columns: 46px 220px minmax(0, 1fr);
  }

  .actress-large-photo {
    width: 220px;
  }
}

@media(max-width: 680px) {
  .actress-card .actress-avatar {
    width: 104px;
    height: 104px;
  }

  .actress-large-card {
    grid-template-columns: 44px 1fr;
  }

  .actress-large-photo {
    grid-column: 1 / -1;
    width: min(100%, 360px);
    max-width: 360px;
    margin: 0 auto;
  }

  .actress-ranking-actions .btn,
  .actress-detail-actions .btn {
    width: 100%;
  }
}
/* Work detail LP layout */
.work-detail-top {
  padding-top: 48px;
}

.work-hero-detail {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 10%, rgba(201,164,92,.12), transparent 34%),
    linear-gradient(145deg, var(--panel), #101014);
}

.work-hero-cover {
  position: sticky;
  top: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f0f13;
  border: 1px solid rgba(201,164,92,.25);
}

.work-hero-cover img {
  width: 100%;
  display: block;
}

.work-hero-info h1 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.32;
  margin: .2em 0 .35em;
}

.work-hero-meta {
  color: var(--gold2);
  margin: 0 0 18px;
  font-size: .95rem;
}

.work-hero-pills {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.pill-group > span {
  display: block;
  color: var(--muted);
  font-size: .84rem;
  margin-bottom: 6px;
}

.pill-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-hero-table {
  margin-top: 20px;
}

.work-detail-cta {
  margin-top: 22px;
}

.work-detail-official-btn {
  min-width: min(100%, 300px);
  border-radius: 999px;
  background: #ff2f6d;
  border-color: #ff2f6d;
  color: #fff;
}

.work-detail-official-btn:hover {
  filter: brightness(1.06);
  color: #fff;
}

.section-head.compact {
  margin-bottom: 22px;
}

.sample-section-wrap .sample-box,
.work-mid-cta-section .work-detail-cta,
.work-bottom-cta-section .work-detail-cta {
  margin-top: 0;
}

.sample-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sample-image-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111117;
  aspect-ratio: 16 / 10;
}

.sample-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.sample-image-card:hover img {
  transform: scale(1.035);
}

.work-actress-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.work-actress-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--panel), #101014);
}

.work-actress-photo {
  width: 130px;
  height: 130px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #111117;
  border: 1px solid rgba(201,164,92,.35);
  color: var(--gold2);
  font-size: 2rem;
  font-weight: 700;
}

.work-actress-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-actress-body h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.work-actress-actions {
  justify-content: flex-start;
  margin-top: 12px;
}

.work-actress-actions .btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: .88rem;
}

.work-image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.work-image-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--panel), #101014);
  transition: transform .2s ease, border-color .2s ease;
}

.work-image-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,164,92,.65);
}

.work-image-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  background: #111117;
}

.work-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-image-body {
  padding: 12px;
}

.work-image-body h3 {
  margin: 0;
  font-size: .95rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-image-body p {
  margin: 6px 0 0;
  font-size: .78rem;
}

.bottom-cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(201,164,92,.35);
  border-radius: 16px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,47,109,.16), transparent 34%),
    linear-gradient(145deg, var(--panel), #101014);
}

.bottom-cta-box h2 {
  margin: .1em 0 .25em;
}

.bottom-cta-box p {
  color: var(--muted);
  margin: 0;
}

@media(max-width: 980px) {
  .work-hero-detail {
    grid-template-columns: 1fr;
  }

  .work-hero-cover {
    position: static;
    max-width: 520px;
    margin: 0 auto;
  }

  .sample-image-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-image-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .work-actress-grid {
    grid-template-columns: 1fr;
  }

  .bottom-cta-box {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 640px) {
  .work-hero-detail {
    padding: 16px;
  }

  .sample-image-grid,
  .work-image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .work-actress-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .work-actress-photo {
    margin: 0 auto;
  }

  .work-actress-actions {
    justify-content: center;
  }

  .work-actress-actions .btn,
  .work-detail-official-btn {
    width: 100%;
  }
}
/* Sample image thumbnail strip and lightbox */
.sample-thumb-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 14px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.sample-thumb-button {
  flex: 0 0 auto;
  width: 128px;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: #111117;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sample-thumb-button:hover {
  transform: translateY(-2px);
  border-color: rgba(201,164,92,.8);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

.sample-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 以前のグリッド表示を上書き */
.sample-image-grid {
  display: none;
}

.sample-inline-preview {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f0f13;
  padding: 14px;
  text-align: center;
}

.sample-inline-preview img {
  max-width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 10px;
  cursor: zoom-in;
  background: #111117;
}

.sample-inline-preview p {
  margin: 10px 0 0;
  font-size: .82rem;
}

.sample-lightbox[hidden] {
  display: none;
}

.sample-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 24px;
  background: rgba(0,0,0,.86);
  backdrop-filter: blur(6px);
}

.sample-lightbox-open {
  overflow: hidden;
}

.sample-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10001;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.sample-lightbox-nav {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  justify-self: center;
}

.sample-lightbox-nav:hover,
.sample-lightbox-close:hover {
  background: rgba(255,255,255,.34);
}

.sample-lightbox-figure {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  min-width: 0;
  text-align: center;
}

.sample-lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: 8px;
  background: #111117;
}

.sample-lightbox-figure figcaption {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #fff;
  margin-top: 10px;
  font-size: .9rem;
}

.sample-lightbox-count {
  color: var(--gold2);
}

.sample-lightbox-thumbs {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 8px 4px 0;
  justify-content: center;
}

.sample-lightbox-thumb {
  flex: 0 0 auto;
  width: 74px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #111117;
  cursor: pointer;
}

.sample-lightbox-thumb.is-active {
  border-color: #0d6efd;
}

.sample-lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media(max-width: 720px) {
  .sample-thumb-button {
    width: 104px;
    height: 70px;
  }

  .sample-inline-preview {
    padding: 10px;
  }

  .sample-lightbox {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    padding: 14px;
  }

  .sample-lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 2.2rem;
  }

  .sample-lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 1.7rem;
  }

  .sample-lightbox-figure img {
    max-height: calc(100vh - 150px);
  }

  .sample-lightbox-thumb {
    width: 60px;
    height: 44px;
  }
}
/* Sample gallery fix in original detail layout */
.detail .sample-gallery-block {
  margin: 20px 0 24px;
}

.detail .sample-gallery-block h2 {
  margin-bottom: 8px;
}

.detail .sample-thumb-button.is-active {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13,110,253,.18);
}

.detail .sample-inline-preview {
  margin-top: 14px;
}

.detail .sample-inline-preview img {
  max-height: 520px;
}

.detail .sample-section {
  margin-top: 24px;
}

/* 以前のLP上部用スタイルは残っていてもwork.php側で使わない */
.work-mid-cta-section {
  display: none;
}
/* Detail sample layout match */
.detail-main .sample-gallery-block {
  margin: 22px 0 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-main .sample-gallery-block h2 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.detail-main .sample-gallery-block > p.muted {
  font-size: .74rem;
  margin: 0 0 8px;
}

.detail-main .sample-thumb-strip {
  gap: 6px;
  padding: 4px 0 10px;
  border-bottom: 0;
}

.detail-main .sample-thumb-button {
  width: 52px;
  height: 38px;
  border-radius: 4px;
}

.detail-main .sample-thumb-button.is-active {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13,110,253,.2);
}

.detail-main .sample-inline-preview {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #09090d;
}

.detail-main .sample-inline-preview img {
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.detail-main .sample-inline-preview p {
  font-size: .72rem;
  margin-top: 8px;
}

.detail-main .sample-section {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-main .sample-section h2 {
  font-size: 1rem;
  margin: 0 0 10px;
}

@media(max-width: 640px) {
  .detail-main .sample-thumb-button {
    width: 46px;
    height: 34px;
  }

  .detail-main .sample-inline-preview {
    padding: 10px;
  }
}
/* Detail cover stack fix */
.detail.detail-stacked {
  display: block;
}

.detail.detail-stacked .detail-img {
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 0 24px 0;
}

.detail.detail-stacked .detail-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.detail.detail-stacked .detail-main {
  width: 100%;
}

@media(max-width: 700px) {
  .detail.detail-stacked .detail-img {
    width: 100%;
    max-width: 100%;
  }
}

/* Phase2-1: top page sections and sort navigation */
.phase21-section-head{align-items:center}
.phase21-section-actions{display:flex;align-items:center;justify-content:flex-end;gap:18px;max-width:720px}
.phase21-section-actions p{margin:0;text-align:right}
.phase21-more{white-space:nowrap;padding:.72rem 1rem}
.phase21-section-bottom{display:flex;justify-content:center;margin-top:24px}
.phase21-section-bottom .phase21-more{min-width:180px;text-align:center}
.phase21-work-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.phase21-search-form select{min-width:150px;border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:var(--surface);color:var(--text)}
.phase21-sort-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.phase21-sort-tabs a{display:inline-flex;padding:8px 13px;border:1px solid var(--line);border-radius:999px;text-decoration:none;color:var(--text);background:var(--surface)}
.phase21-sort-tabs a.active{font-weight:700;border-color:currentColor}
@media(max-width:760px){
  .phase21-section-head{align-items:flex-start}
  .phase21-section-actions{width:100%;justify-content:space-between;align-items:center}
  .phase21-section-actions p{text-align:left}
  .phase21-search-form select{width:100%}
}
@media(max-width:520px){
  .phase21-section-actions{align-items:flex-start;flex-direction:column;gap:10px}
  .phase21-more{width:100%;text-align:center}
  .phase21-work-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phase2-1 v2: sort controls */
.phase21-inline-sort{display:flex;align-items:center;gap:8px;margin:4px 0 8px}
.phase21-inline-sort label{display:flex;align-items:center;gap:8px;font-size:.92rem;color:var(--muted,#aaa)}
.phase21-inline-sort select{min-width:190px;padding:9px 34px 9px 11px;border:1px solid rgba(255,255,255,.18);border-radius:8px;background:#151515;color:#fff}
@media (max-width:700px){.phase21-inline-sort,.phase21-inline-sort label{width:100%}.phase21-inline-sort select{flex:1;min-width:0}.phase21-section-actions{align-items:stretch}}


/* Phase2-2: work detail recommendation engine */
.recommend-engine-section {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}
.recommend-engine-card .recommend-reason {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}
.recommend-engine-card .recommend-reason::before {
    content: "★";
    font-size: 11px;
}

/* Phase2-2 hotfix: recommendation cards 2-column wide image layout */
.recommend-engine-section .recommend-engine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.recommend-engine-section .recommend-engine-card .work-image-thumb {
    aspect-ratio: 16 / 9;
    background: #08080b;
}
.recommend-engine-section .recommend-engine-card .work-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.recommend-engine-section .recommend-engine-card .work-image-body {
    min-height: 132px;
}
@media (max-width: 760px) {
    .recommend-engine-section .recommend-engine-grid {
        grid-template-columns: 1fr;
    }
}

/* Phase2-2 hotfix: related work sections 2-column wide image layout
   対象: この女優の関連作品 / 同じジャンルの関連作品 / 同じメーカーの作品 */
.related-image-section .work-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.related-image-section .work-image-card .work-image-thumb {
    aspect-ratio: 16 / 9;
    background: #08080b;
}
.related-image-section .work-image-card .work-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-image-section .work-image-card .work-image-body {
    min-height: 112px;
}
@media (max-width: 760px) {
    .related-image-section .work-image-grid {
        grid-template-columns: 1fr;
    }
}

/* Phase2-5: view history */
.view-history-section[hidden] {
    display: none !important;
}
.view-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.view-history-card {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
}
.view-history-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #08080b;
    color: var(--muted, #aaa);
    text-decoration: none;
}
.view-history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .18s ease;
}
.view-history-card:hover .view-history-thumb img {
    transform: scale(1.025);
}
.view-history-noimage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: .9rem;
}
.view-history-body {
    padding: 12px 14px 14px;
}
.view-history-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text, #fff);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.5;
}
.view-history-title:hover {
    text-decoration: underline;
}
.view-history-meta {
    margin-top: 8px;
    font-size: .82rem;
}
.view-history-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
@media (max-width: 760px) {
    .view-history-grid {
        grid-template-columns: 1fr;
    }
    .view-history-actions {
        justify-content: stretch;
    }
    .view-history-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Phase2-5 follow-up: separate works view target and sort controls */
.phase21-filter-label {
    margin: 14px 0 8px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}
.phase21-view-tabs {
    margin-bottom: 14px;
}
.phase21-fixed-sort {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    white-space: nowrap;
}
@media (max-width: 680px) {
    .phase21-fixed-sort {
        width: 100%;
        justify-content: center;
    }
}

/* Phase2-6 Step3: monetization badges and detail purchase info */
.monetize-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.monetize-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  white-space: nowrap;
}
.monetize-badge-reserve {
  border-color: rgba(86, 165, 255, .45);
  background: rgba(86, 165, 255, .14);
}
.monetize-badge-sale,
.monetize-badge-campaign {
  border-color: rgba(255, 94, 94, .5);
  background: rgba(255, 94, 94, .16);
}
.monetize-badge-stream,
.monetize-badge-download {
  border-color: rgba(201, 164, 92, .55);
  background: rgba(201, 164, 92, .16);
}
.monetize-badge-review {
  border-color: rgba(255, 211, 94, .55);
  background: rgba(255, 211, 94, .12);
}
.work-image-body .monetize-badges {
  margin: 0 0 8px;
}
.work-image-body .monetize-badge {
  font-size: .72rem;
  padding: 3px 7px;
}
.monetize-detail-panel {
  margin: 18px 0 18px;
  padding: 16px;
  border: 1px solid rgba(201,164,92,.28);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(201,164,92,.08), rgba(255,255,255,.035));
}
.monetize-detail-head {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 8px;
}
.monetize-detail-badge-row .monetize-badges {
  margin-top: 0;
}
.monetize-detail-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}
.monetize-detail-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.monetize-detail-list dt {
  color: var(--muted);
  font-weight: 700;
}
.monetize-detail-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 640px) {
  .monetize-detail-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Phase2-6 Step4: 配信形式と価格表示の整理 */
.monetize-detail-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted, #9ca3af);
}

/* Phase2-6 follow-up: SALE top section, compact hero, sticky home TOC */
.hero {
  min-height: 285px;
  padding: 36px 0 24px;
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
}
.hero p {
  max-width: none;
  margin: 12px auto 0;
  line-height: 1.7;
  white-space: nowrap;
}
.home-section-toc {
  position: sticky;
  top: 72px;
  z-index: 25;
  background:
    linear-gradient(90deg, rgba(22,10,10,.98), rgba(18,16,22,.98) 52%, rgba(32,24,10,.98));
  border-top: 1px solid rgba(255,112,95,.22);
  border-bottom: 1px solid rgba(201,164,92,.34);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
}
.home-section-toc-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  padding-top: 10px;
  padding-bottom: 10px;
}
.home-section-toc span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #191005;
  background: linear-gradient(135deg, #ffbd5e, var(--gold));
  font-size: .94rem;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 8px 18px rgba(201,164,92,.18);
}
.home-section-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(201,164,92,.48);
  border-radius: 999px;
  color: #f2dfb6;
  font-size: .94rem;
  font-weight: 800;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}
.home-section-toc a[href="#sale"] {
  color: #fff4e0;
  border-color: rgba(255,112,95,.58);
  background: rgba(255,94,94,.13);
}
.home-section-toc a:hover,
.home-section-toc a:focus-visible {
  color: #15110a;
  border-color: var(--gold);
  background: linear-gradient(135deg, #ffbd5e, var(--gold));
  transform: translateY(-1px);
}
#sale,
#rank-up-works,
#recommended-works,
#recommended-actresses,
#new-works,
#weekly-works,
#popular-actresses,
#works-list {
  scroll-margin-top: 154px;
}
.phase26-sale-section {
  position: relative;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,94,94,.22), transparent 34%),
    linear-gradient(135deg, rgba(68,18,18,.62), #111116 58%, rgba(201,164,92,.09));
  border-top: 1px solid rgba(255,94,94,.24);
  border-bottom: 1px solid rgba(201,164,92,.24);
}
.phase26-sale-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
}
.phase26-sale-head h2 {
  color: #fff2df;
  text-shadow: 0 0 22px rgba(255,94,94,.22);
}
.phase26-sale-head .eyebrow {
  color: #ffb4a8;
}
.phase26-sale-more {
  background: linear-gradient(135deg, #ff705f, var(--gold));
  border-color: rgba(255,255,255,.18);
  color: #111;
  box-shadow: 0 10px 28px rgba(255,94,94,.18);
}
.phase26-sale-grid {
  gap: 18px;
}
.phase26-sale-card {
  position: relative;
  border-color: rgba(255,112,95,.36);
  background: linear-gradient(145deg, rgba(55,18,18,.95), rgba(19,19,24,.96));
  box-shadow: 0 16px 42px rgba(0,0,0,.22);
}
.phase26-sale-card:hover {
  border-color: rgba(255,112,95,.72);
}
.phase26-sale-ribbon {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5e5e, #ffbd5e);
  color: #160707;
  font-weight: 900;
  font-size: .76rem;
  letter-spacing: .12em;
}
.phase26-sale-price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,94,94,.13);
  border: 1px solid rgba(255,112,95,.34);
}
.phase26-sale-price span {
  color: #ffb4a8;
  font-size: .78rem;
  font-weight: 800;
}
.phase26-sale-price strong {
  color: #fff4cf;
  font-size: 1.16rem;
  line-height: 1.1;
}
.phase26-sale-list-price,
.phase26-sale-note {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
  margin-top: 4px;
}
.phase26-sale-note {
  margin-bottom: 0;
}
@media (max-width: 950px) {
  .hero { min-height: 265px; padding: 32px 0 22px; }
  .home-section-toc { top: 64px; }
  .hero p { white-space: normal; max-width: 760px; }
  #sale,
  #recommended-works,
  #rank-up-works,
  #recommended-actresses,
  #new-works,
  #weekly-works,
  #popular-actresses,
  #works-list { scroll-margin-top: 144px; }
}
@media (max-width: 680px) {
  .hero { min-height: 245px; padding: 28px 0 20px; }
  .home-section-toc { top: 60px; }
  .home-section-toc-inner { min-height: 58px; gap: 9px; padding-top: 8px; padding-bottom: 8px; }
  .home-section-toc span { min-height: 34px; padding: 0 12px; font-size: .84rem; }
  .home-section-toc a { font-size: .84rem; min-height: 36px; padding: 0 12px; }
}

/* Phase2-7: FANZA rank delta */
.fanza-rank-delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  width: fit-content;
  max-width: 100%;
}
.fanza-rank-delta .rank-current,
.fanza-rank-delta .rank-previous {
  min-width: 1.9em;
  text-align: center;
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1;
}
.fanza-rank-delta .rank-current { color: #ffd36b; }
.fanza-rank-delta .rank-previous { color: rgba(255,255,255,.72); }
.fanza-rank-delta .rank-arrow {
  color: rgba(255,255,255,.55);
  font-weight: 800;
  line-height: 1;
}
.fanza-rank-delta .rank-change {
  font-weight: 900;
  font-size: .78rem;
  line-height: 1;
  white-space: nowrap;
}
.fanza-rank-delta .rank-change.up { color: #ff5b67; }
.fanza-rank-delta .rank-change.down { color: #5c7cff; }
.fanza-rank-delta .rank-change.new { color: #54d17a; }
.fanza-rank-delta .rank-change.stay { color: var(--muted); }
@media (max-width: 680px) {
  .fanza-rank-delta { gap: 5px; padding: 5px 7px; }
  .fanza-rank-delta .rank-current,
  .fanza-rank-delta .rank-previous { font-size: .96rem; min-width: 1.65em; }
  .fanza-rank-delta .rank-change { font-size: .72rem; }
}

/* Phase2-8: FANZA click CTA improvement */
.work-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 18px;
}
.work-card-actions .btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: .92rem;
  line-height: 1.2;
  text-decoration: none;
}
.work-card-detail-btn {
  background: transparent !important;
  color: var(--gold2) !important;
  border-color: rgba(212,165,86,.55) !important;
}
.work-card-fanza-btn,
.work-detail-official-btn {
  background: linear-gradient(135deg, #f4c96a, #d49b36) !important;
  border-color: #f4c96a !important;
  color: #14100a !important;
  box-shadow: 0 8px 22px rgba(212,165,86,.22);
}
.work-card-fanza-btn:hover,
.work-detail-official-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  color: #14100a !important;
}
.work-detail-cta {
  margin-top: 18px;
}
.work-detail-cta-top {
  margin: 14px 0 20px;
}
.work-detail-cta-top .work-detail-official-btn,
.work-detail-cta-price .work-detail-official-btn,
.work-detail-cta-sample .work-detail-official-btn,
.work-detail-cta-bottom .work-detail-official-btn {
  min-width: min(100%, 360px);
  min-height: 54px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 800;
}
.work-detail-cta-price {
  margin: 18px 0 8px;
}
.work-detail-cta-sample {
  margin: 18px 0 6px;
  text-align: center;
}
.work-bottom-cta-section {
  padding-top: 8px;
  padding-bottom: 18px;
}
.work-detail-cta-bottom {
  text-align: center;
  padding: 20px;
  border: 1px solid rgba(212,165,86,.28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(212,165,86,.10), rgba(255,255,255,.02));
}
.view-history-card-actions {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .work-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .work-card-actions .btn,
  .work-detail-official-btn {
    width: 100%;
  }
}


/* Header PR notice / footer adult notice */
.site-header-info {
  border-bottom: 1px solid rgba(212,165,86,.18);
  background: rgba(10,10,13,.92);
}
.site-header-info .container {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
}
.site-header-info p {
  margin: 0;
  color: #f2eadc;
  font-size: .88rem;
  line-height: 1.45;
}
.site-header-info p + p {
  color: #d4a556;
  font-weight: 700;
}
.adult-footer-notice {
  margin-top: 8px;
  color: #ffdf91;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
}
.work-image-card .work-card-actions,
.phase26-sale-card .work-card-actions {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .site-header-info .container {
    align-items: flex-start;
    text-align: left;
  }
  .site-header-info p {
    width: 100%;
    font-size: .82rem;
  }
}

/* PR notice placement adjustment */
.hero p {
  line-height: 1.85;
}
.hero .hero-pr-notice {
  display: block;
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.65;
}
.page-pr-notice {
  margin-top: 14px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
}

/* Mobile responsive polish: toc, ranking, cards, admin analytics */
@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: min(calc(100% - 20px), var(--max));
  }

  .site-header {
    z-index: 60;
  }

  .header-inner {
    min-height: 60px;
    gap: 12px;
  }

  .brand {
    font-size: 1.05rem;
    letter-spacing: .06em;
    line-height: 1.25;
  }

  .menu-button {
    min-height: 40px;
    padding: 8px 10px;
  }

  .nav {
    top: 60px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .hero {
    min-height: auto;
    padding: 28px 0 18px;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 12vw, 3rem);
    line-height: 1.12;
    margin: .12em 0 .2em;
    letter-spacing: .02em;
  }

  .hero .eyebrow,
  .eyebrow {
    font-size: .68rem;
    letter-spacing: .16em;
  }

  .hero p {
    max-width: 100%;
    margin: 12px auto 0;
    line-height: 1.7;
    white-space: normal;
    font-size: .9rem;
  }

  .hero .hero-pr-notice {
    margin-top: 8px;
    font-size: .82rem;
    line-height: 1.7;
  }

  .home-section-toc {
    top: 60px;
    overflow: hidden;
  }

  .home-section-toc-inner {
    width: 100%;
    min-height: 50px;
    gap: 8px;
    overflow-x: auto;
    padding-top: 7px;
    padding-bottom: 7px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .home-section-toc-inner::-webkit-scrollbar {
    display: none;
  }

  .home-section-toc span,
  .home-section-toc a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 13px;
    font-size: .83rem;
    scroll-snap-align: start;
  }

  .home-section-toc span {
    font-size: .82rem;
  }

  #sale,
  #rank-up-works,
  #recommended-works,
  #recommended-actresses,
  #new-works,
  #weekly-works,
  #popular-actresses,
  #works-list {
    scroll-margin-top: 120px;
  }

  .section {
    padding: 44px 0;
  }

  .section-head,
  .phase21-section-head,
  .phase26-sale-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .section-head p,
  .phase21-section-actions p {
    max-width: 100%;
    font-size: .88rem;
    line-height: 1.75;
  }

  .phase21-section-actions {
    display: grid;
    gap: 10px;
    justify-items: stretch;
  }

  .phase21-section-actions .btn,
  .phase21-more,
  .phase26-sale-more {
    width: 100%;
  }

  .work-grid,
  .phase21-work-grid,
  .phase26-sale-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .work-card,
  .ranked-card,
  .work-image-card,
  .phase26-sale-card {
    border-radius: 12px;
  }

  .work-card .card-body {
    min-height: 0;
    padding: 14px;
  }

  .work-thumb,
  .work-image-thumb {
    aspect-ratio: 16 / 10;
  }

  .work-row-card,
  .home-sale-card,
  .phase26-sale-card {
    grid-template-columns: 1fr !important;
    gap: 12px;
    padding: 14px;
  }

  .work-row-thumb {
    width: 100%;
    max-width: 520px;
    min-height: 0;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
  }

  .work-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .work-title-link h3,
  .work-card h3,
  .work-image-body h3 {
    font-size: .98rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .meta,
  .phase26-sale-list-price,
  .phase26-sale-note {
    font-size: .74rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  .phase26-sale-price {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 8px 10px;
  }

  .phase26-sale-price strong {
    font-size: 1.05rem;
  }

  .work-card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
    margin-top: 12px;
  }

  .work-card-actions .btn,
  .work-detail-official-btn {
    width: 100%;
    min-height: 42px;
    font-size: .9rem;
  }

  .fanza-rank-delta {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 4px 6px;
    justify-content: flex-start;
    padding: 6px 7px;
    border-radius: 9px;
  }

  .fanza-rank-delta .rank-current,
  .fanza-rank-delta .rank-previous {
    min-width: auto;
    font-size: .92rem;
  }

  .fanza-rank-delta .rank-change {
    white-space: normal;
    font-size: .72rem;
    line-height: 1.25;
  }

  .ranking-item {
    grid-template-columns: 40px 70px minmax(0, 1fr) !important;
    gap: 8px;
    padding: 10px;
  }

  .rank-no {
    width: 36px;
    height: 36px;
    font-size: .85rem;
  }

  .rank-thumb {
    width: 70px;
    min-width: 70px;
  }

  .rank-body {
    min-width: 0;
  }

  .rank-body h2,
  .rank-body h3 {
    font-size: .88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .detail,
  .work-hero-detail {
    grid-template-columns: 1fr !important;
  }

  .work-hero-detail {
    padding: 14px;
    border-radius: 12px;
  }

  .work-hero-cover {
    position: static !important;
    max-width: 100%;
  }

  .work-hero-info h1 {
    font-size: 1.45rem;
    line-height: 1.38;
  }

  .work-hero-meta,
  .work-hero-table,
  .pill-group {
    font-size: .88rem;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .kv div:nth-child(odd) {
    padding-bottom: 2px;
  }

  .sample-image-grid,
  .work-image-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .work-image-thumb {
    aspect-ratio: 16 / 9;
  }

  .actress-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .actress-card {
    padding: 16px 12px;
  }

  .analytics-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .analytics-tabs a {
    flex: 0 0 auto;
  }

  .analytics-grid,
  .analytics-grid.small,
  .analytics-two-col,
  .admin-grid,
  .admin-form-grid {
    grid-template-columns: 1fr !important;
  }

  .analytics-card {
    padding: 14px;
  }

  .analytics-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .analytics-table th,
  .analytics-table td {
    padding: 9px 10px;
    font-size: .8rem;
  }
}

@media (max-width: 420px) {
  .brand {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero h1 {
    font-size: clamp(2rem, 13vw, 2.75rem);
  }

  .home-section-toc span,
  .home-section-toc a {
    font-size: .8rem;
    padding: 0 11px;
  }

  .ranking-item {
    grid-template-columns: 38px 62px minmax(0, 1fr) !important;
  }

  .rank-thumb {
    width: 62px;
    min-width: 62px;
  }

  .actress-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .ranking-item {
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }

  .rank-thumb {
    display: none;
  }
}


/* Move section more buttons below cards */
.phase21-section-bottom {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.phase21-section-bottom .phase21-more {
  min-width: 180px;
  text-align: center;
}
@media (max-width: 640px) {
  .phase21-section-bottom {
    margin-top: 16px;
  }
  .phase21-section-bottom .phase21-more,
  .phase21-section-bottom .phase26-sale-more {
    width: 100%;
  }
}

/* Mobile hero compact + sticky TOC refinement */
@media (max-width: 760px) {
  .hero {
    min-height: auto !important;
    padding: 16px 0 8px !important;
    place-items: center;
  }

  .hero .container {
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero .eyebrow {
    display: none;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 7.8vw, 2.05rem) !important;
    line-height: 1.08 !important;
    margin: 0 0 6px !important;
    letter-spacing: .015em;
  }

  .hero p {
    max-width: 94vw !important;
    margin: 6px auto 0 !important;
    font-size: .80rem !important;
    line-height: 1.48 !important;
    white-space: normal !important;
  }

  .hero .hero-pr-notice {
    margin-top: 5px !important;
    font-size: .74rem !important;
    line-height: 1.45 !important;
  }

  .home-section-toc {
    position: -webkit-sticky;
    position: sticky;
    top: 60px !important;
    z-index: 58;
    overflow: visible !important;
  }

  .home-section-toc-inner {
    min-height: 44px !important;
    gap: 7px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  .home-section-toc span,
  .home-section-toc a {
    min-height: 31px !important;
    padding: 0 10px !important;
    font-size: .78rem !important;
    line-height: 1;
  }

  #sale,
  #rank-up-works,
  #recommended-works,
  #recommended-actresses,
  #new-works,
  #weekly-works,
  #popular-actresses,
  #works-list {
    scroll-margin-top: 108px !important;
  }
}

@media (max-width: 420px) {
  .hero {
    padding: 13px 0 7px !important;
  }

  .hero h1 {
    font-size: clamp(1.32rem, 7.4vw, 1.8rem) !important;
    line-height: 1.08 !important;
    margin-bottom: 5px !important;
  }

  .hero p {
    font-size: .76rem !important;
    line-height: 1.45 !important;
  }

  .hero .hero-pr-notice {
    font-size: .70rem !important;
  }

  .home-section-toc {
    top: 58px !important;
  }

  .home-section-toc-inner {
    min-height: 42px !important;
  }

  .home-section-toc span,
  .home-section-toc a {
    min-height: 30px !important;
    padding: 0 9px !important;
    font-size: .75rem !important;
  }
}
