/* =========================================================
   出演者逆引きDB 共通デザイン（Astro の固定ページと PHP のページで共有）
   ========================================================= */
:root {
  --bg: #f5f3f4;
  --surface: #ffffff;
  --surface-2: #faf8f9;
  --text: #1c1a1d;
  --muted: #6f6871;
  --line: #e6e0e3;
  --accent: #5b3fd1;
  --accent-strong: #4128a8;
  --accent-soft: #eeeafd;
  --sale: #d8352a;
  --gold: #c08a1e;
  --silver: #8c949c;
  --bronze: #a8693a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(30, 12, 20, 0.05), 0 6px 18px rgba(30, 12, 20, 0.06);
  --shadow-hover: 0 2px 4px rgba(30, 12, 20, 0.08), 0 12px 28px rgba(30, 12, 20, 0.12);
  --header-h: 60px;
  color-scheme: light;
}
/* 黒地（A/B テスト中。html の data-theme="dark" で切り替える。割り当ては site.js とページ先頭の小さなスクリプト） */
html[data-theme="dark"] {
  --bg: #0e0c0f;
  --surface: #19161a;
  --surface-2: #211d22;
  --text: #f1ecef;
  --muted: #a39aa1;
  --line: #2e282f;
  --accent: #a99bff;
  --accent-strong: #c6bdff;
  --accent-soft: #241f3a;
  --sale: #ff5a4e;
  --gold: #e3aa36;
  --silver: #a9b1b9;
  --bronze: #c98450;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.6), 0 14px 32px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
html[data-theme="dark"] .site-header { background: rgba(14, 12, 15, 0.86); }
html[data-theme="dark"] .wc-img, html[data-theme="dark"] .tg-img { background: #221d22; }
html[data-theme="dark"] .btn-buy { background: linear-gradient(180deg, #ff5148, #d8322a); box-shadow: 0 4px 16px rgba(255, 70, 60, 0.35); }
html[data-theme="dark"] .hero { background: radial-gradient(120% 140% at 0% 0%, #4d34b8 0%, #24175e 55%, #0c0918 100%); border: 1px solid #3a2230; }
html[data-theme="dark"] .item-card img { background: #fff; }
html[data-theme="dark"] .tag-new { background: #23966d; }

/* 色の切り替えボタン */
.theme-toggle { grid-area: theme; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
  font-feature-settings: 'palt' 1;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 800px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: 'logo search nav theme';
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}
.logo { grid-area: logo; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #7b5cf0, #4128a8); color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 2px 6px rgba(140, 28, 61, 0.35);
}
.logo-text { display: flex; flex-direction: column; font-weight: 800; line-height: 1.25; font-size: 16px; letter-spacing: 0.02em; }
.logo-text small { font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: 0; }
.global-nav { grid-area: nav; display: flex; gap: 2px; }
.global-nav a {
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.global-nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.global-nav a[aria-current='page'] { color: var(--accent); background: var(--accent-soft); }
.header-search { grid-area: search; position: relative; display: flex; max-width: 520px; width: 100%; justify-self: center; }
.header-search input {
  flex: 1; min-width: 0; height: 40px; padding: 0 44px 0 14px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text); font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.header-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.header-search button {
  position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.header-search button svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  :root { --header-h: 104px; }
  .header-row { grid-template-columns: auto 1fr auto; grid-template-areas: 'logo nav theme' 'search search search'; gap: 6px 10px; padding-bottom: 10px; padding-top: 8px; }
  .global-nav { justify-content: flex-end; }
  .global-nav a { padding: 5px 7px; font-size: 13px; }
  .logo-text small { display: none; }
  .header-search { max-width: none; }
}

/* 検索候補 */
.suggest {
  position: absolute; top: 46px; left: 0; right: 0; z-index: 60; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-hover);
  max-height: 60vh; overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 14px; line-height: 1.4; }
.suggest a:hover, .suggest a.on { background: var(--accent-soft); }
.suggest .sg-kind { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 0 6px; }
.suggest .sg-sub { color: var(--muted); font-size: 12px; margin-left: auto; flex-shrink: 0; }

/* ---------- 本文の共通部品 ---------- */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.pr-notice { font-size: 11px; color: var(--muted); margin: 6px 0 0; }
main { padding-top: 4px; padding-bottom: 56px; }
h1 { font-size: 26px; line-height: 1.4; margin: 18px 0 10px; letter-spacing: 0.01em; }
h2 { font-size: 20px; line-height: 1.4; margin: 40px 0 12px; display: flex; align-items: center; gap: 10px; }
h2::before { content: ''; width: 4px; height: 1.1em; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent-strong)); flex-shrink: 0; }
h3 { font-size: 17px; margin: 28px 0 8px; }
.lead { color: var(--muted); margin-top: 0; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; box-shadow: var(--shadow); }
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table-scroll { overflow-x: auto; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--surface-2); white-space: nowrap; font-weight: 700; color: var(--muted); font-size: 14px; }
thead th { color: var(--text); }
tr:last-child th, tr:last-child td { border-bottom: 0; }
code { background: var(--accent-soft); color: var(--accent-strong); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
.note { font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; margin: 12px 0; }
.more { margin: 8px 0 0; font-size: 14px; }

/* 見出し＋「もっと見る」 */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 12px; }
.sec-head h2 { margin: 0; }
.sec-more { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.sec-more::after { content: ' →'; }

/* タグ・バッジ */
.tag { display: inline-block; font-size: 11px; line-height: 1.7; padding: 0 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; vertical-align: middle; white-space: nowrap; }
.tag-sale { background: var(--sale); color: #fff; }
.tag-new { background: #1f7a5a; color: #fff; }
.tag-soon { background: #2f5fb3; color: #fff; }

/* チップ（女優・シリーズなどのリンク） */
.chips { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); text-decoration: none; color: var(--text); font-size: 14px; transition: border-color 0.15s, background 0.15s;
}
.chips a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.chips a span { color: var(--muted); font-size: 12px; }

/* タブ・並べ替え */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tabs a {
  padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600;
}
.tabs a:hover { border-color: var(--accent); }
.tabs a[aria-current='page'] { background: var(--accent); color: #fff; border-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 12px 0; }
.toolbar .count { color: var(--muted); font-size: 14px; }
.sorts { display: flex; flex-wrap: wrap; gap: 2px; font-size: 13px; }
.sorts a { padding: 4px 10px; border-radius: 6px; text-decoration: none; color: var(--muted); }
.sorts a:hover { color: var(--text); background: var(--surface); }
.sorts a[aria-current='page'] { color: var(--accent-strong); background: var(--accent-soft); font-weight: 700; }

/* ---------- 作品カード ---------- */
.work-grid { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 18px 14px; }
.work-card a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); height: 100%; }
.wc-img {
  position: relative; display: block; aspect-ratio: 147 / 200; background: var(--accent-soft); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.18s, box-shadow 0.18s;
}
.work-card a:hover .wc-img { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.work-card a:hover .wc-title { color: var(--accent-strong); }
.wc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-badges { position: absolute; left: 6px; top: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.wc-rank {
  position: absolute; left: 0; top: 0; min-width: 30px; height: 30px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 10px 0 10px 0; background: rgba(28, 26, 29, 0.85); color: #fff; font-weight: 800; font-size: 14px;
}
.wc-rank.r1 { background: var(--gold); }
.wc-rank.r2 { background: var(--silver); }
.wc-rank.r3 { background: var(--bronze); }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent-strong); font-size: 13px; font-weight: 700; opacity: 0.7; letter-spacing: 0.04em; }
.noimg.big { aspect-ratio: 400 / 269; background: var(--accent-soft); border-radius: var(--radius); font-size: 22px; }
.noimg.face { width: 100%; aspect-ratio: 1; background: var(--accent-soft); border-radius: 50%; }
.wc-meta { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.wc-code { font-weight: 800; font-size: 13px; color: var(--accent); letter-spacing: 0.02em; }
.wc-title { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-cast { font-size: 12px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-foot { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--muted); margin-top: auto; padding-top: 2px; }
.wc-price { font-weight: 700; color: var(--text); }
.wc-price.sale { color: var(--sale); }

/* 横スクロールの列（トップページなど） */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: thin; }
.rail > li { scroll-snap-align: start; }

/* ---------- 作品ページ ---------- */
.work-head { margin-top: 18px; }
.work-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: 0.02em; }
.work-title { font-size: 19px; margin: 4px 0 10px; font-weight: 700; }
.cast-line { margin: 0 0 16px; font-size: 15px; line-height: 1.8; }
.cast-line b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.work-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 24px; align-items: start; }
.work-pkg img { width: 100%; height: auto; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }
.buy-box { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.price { font-size: 24px; font-weight: 800; margin: 0; line-height: 1.3; }
.price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.price-sale { color: var(--sale); }
.sale-note { margin: 0; font-size: 13px; color: var(--sale); font-weight: 700; }
.btn-buy, .btn-sub { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 14px; border-radius: 10px; font-weight: 800; text-decoration: none; font-size: 15px; }
.btn-buy { background: linear-gradient(180deg, #e2453a, #c32d24); color: #fff; box-shadow: 0 3px 10px rgba(200, 45, 36, 0.3); }
.btn-buy:hover { color: #fff; filter: brightness(1.06); }
.btn-sub { border: 1px solid var(--line); color: var(--text); background: var(--surface-2); }
.btn-sub:hover { border-color: var(--accent); color: var(--accent-strong); }
.buy-facts { margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.buy-facts li { display: flex; justify-content: space-between; border-top: 1px dashed var(--line); padding: 6px 0; }
.buy-facts b { color: var(--text); font-weight: 600; }
.cast { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cast a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--text); transition: border-color 0.15s, box-shadow 0.15s; }
.cast a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.cast img, .cast .noimg.face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cast-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.cast-name { font-weight: 700; color: var(--accent-strong); }
.cast-ruby, .cast-n { font-size: 12px; color: var(--muted); }
.spec th { width: 7.5em; }
.genres a { display: inline-block; margin: 0 4px 4px 0; padding: 1px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; font-size: 13px; color: var(--text); }
.genres a:hover { border-color: var(--accent); color: var(--accent-strong); }
.samples { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.samples img { width: 100%; height: auto; display: block; border-radius: 8px; }
.samples a { display: block; border-radius: 8px; overflow: hidden; transition: opacity 0.15s; }
.samples a:hover { opacity: 0.85; }
.h-sub { font-size: 17px; }
.sticky-buy { display: none; }
@media (max-width: 760px) {
  .work-top { grid-template-columns: 1fr; gap: 14px; }
  .sticky-buy {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 10px; align-items: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform 0.2s;
  }
  .sticky-buy.show { transform: none; }
  .sticky-buy .sb-info { flex: 1; min-width: 0; line-height: 1.3; }
  .sticky-buy .sb-code { font-weight: 800; color: var(--accent); font-size: 13px; }
  .sticky-buy .sb-price { font-weight: 800; font-size: 15px; }
  .sticky-buy .btn-buy { padding: 11px 16px; font-size: 14px; flex-shrink: 0; }
  body.has-sticky main { padding-bottom: 90px; }
}

/* ---------- 女優ページ ---------- */
.person { display: flex; gap: 18px; align-items: center; margin-top: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.person h1 { margin: 0 0 2px; }
.person-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.person .noimg.face { width: 96px; flex-shrink: 0; font-size: 32px; }
.ruby { font-size: 14px; color: var(--muted); font-weight: 400; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.stats b { color: var(--text); font-size: 18px; margin-right: 2px; font-variant-numeric: tabular-nums; }
.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 14px 0; }
.hl { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.hl:hover { border-color: var(--accent); }
.hl img, .hl .noimg { width: 56px; height: 76px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--accent-soft); }
.hl-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; font-size: 13px; }
.hl-label { font-size: 11px; font-weight: 700; color: var(--accent); }
.hl-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.people { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 12px; }
.people a { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--text); }
.people img, .people .noimg.face { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; transition: transform 0.18s, box-shadow 0.18s; box-shadow: var(--shadow); }
.people a:hover img, .people a:hover .noimg { transform: scale(1.04); box-shadow: var(--shadow-hover); }
.p-name { font-weight: 700; font-size: 14px; margin-top: 6px; line-height: 1.35; }
.p-n { font-size: 12px; color: var(--muted); }
.p-rank { font-size: 11px; font-weight: 800; color: var(--accent); }
@media (max-width: 640px) {
  .person { padding: 14px; gap: 14px; }
  .person-img, .person .noimg.face { width: 72px; height: 72px; }
}

/* ---------- トップページ ---------- */
.hero { margin: 18px 0 8px; padding: 32px 28px; border-radius: 18px; background: radial-gradient(120% 140% at 0% 0%, #6f52e6 0%, #3a2499 55%, #1b1150 100%); color: #fff; position: relative; overflow: hidden; }
.hero h1 { margin: 0 0 6px; font-size: 28px; color: #fff; }
.hero p { margin: 0 0 18px; opacity: 0.9; }
.hero-search { display: flex; gap: 8px; max-width: 620px; }
.hero-search input { flex: 1; min-width: 0; height: 50px; padding: 0 18px; font-size: 16px; border: 0; border-radius: 999px; font-family: inherit; background: #fff; color: #1c1a1d; }
.hero-search button { height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: #1c1a1d; color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; font-family: inherit; }
.hero-hints { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13px; opacity: 0.9; }
.hero-hints a { color: #fff; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 18px; font-size: 13px; opacity: 0.85; }
.hero-stats b { font-size: 18px; margin-right: 2px; font-variant-numeric: tabular-nums; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; margin: 18px 0; }
.quick a { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s; }
.quick a:hover { border-color: var(--accent); transform: translateY(-2px); }
.quick b { font-size: 15px; }
.quick span { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .hero { padding: 22px 18px; border-radius: 14px; }
  .hero h1 { font-size: 22px; }
  .hero-search input, .hero-search button { height: 46px; }
  .hero-search button { padding: 0 16px; }
}

/* ---------- ページ送り ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.pager a:hover { border-color: var(--accent); }
.pager .on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.pager .gap { border: 0; background: none; min-width: 16px; padding: 0; }

/* ---------- 最近見た作品 ---------- */
.recent-viewed[hidden] { display: none; }

/* ---------- フッター ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 36px 0 24px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 6px; }
.footer-grid nav a { color: var(--text); text-decoration: none; }
.footer-grid nav a:hover { color: var(--accent); }
.footer-head { font-weight: 800; margin: 0 0 8px; }
.footer-text { color: var(--muted); margin: 0; font-size: 13px; }
.footer-note { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-note p { margin: 0; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  .work-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 14px 10px; }
  .rail { grid-auto-columns: 128px; }
}

/* ---------- 年齢確認 ---------- */
.age-gate { display: none; }
html.age-check { overflow: hidden; }
html.age-check .age-gate {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; padding: 16px;
  background: rgba(19, 12, 16, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.age-gate-panel { width: 100%; max-width: 420px; background: var(--surface); color: var(--text); border-radius: 18px; padding: 30px 24px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.age-gate-badge { display: inline-block; margin: 0; padding: 2px 14px; border-radius: 999px; background: linear-gradient(135deg, #7b5cf0, #4128a8); color: #fff; font-weight: 800; }
.age-gate-panel h2 { margin: 12px 0 8px; font-size: 22px; justify-content: center; }
.age-gate-panel h2::before { display: none; }
.age-gate-q { font-weight: 700; }
.age-gate-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.age-yes, .age-no { display: block; padding: 13px; border-radius: 12px; font-size: 16px; font-weight: 800; text-decoration: none; cursor: pointer; }
.age-yes { border: 0; background: linear-gradient(180deg, #6f52e6, #4128a8); color: #fff; font-family: inherit; }
.age-no { border: 1px solid var(--line); color: var(--muted); }

/* ---------- 品番チェッカー（固定ページ） ---------- */
.checker-label { display: block; font-weight: 700; margin-bottom: 6px; }
.hero-search { position: relative; }
.hero-search .suggest { top: 56px; color: var(--text); }

/* ---------- スマホの細かい調整 ---------- */
@media (max-width: 760px) {
  .logo-text { white-space: nowrap; font-size: 15px; }
  .logo-mark { width: 32px; height: 32px; font-size: 16px; }
  .global-nav { gap: 0; }
  .global-nav a { padding: 4px 6px; font-size: 13px; }
  body.home .site-header .header-search { display: none; }
  body.home { --header-h: 56px; }
  body.home .header-row { grid-template-areas: 'logo nav theme'; padding-bottom: 8px; }
  .hero p { font-size: 14px; margin-bottom: 14px; }
  .hero-hints { font-size: 12px; }
  .quick { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick a { padding: 10px 8px; text-align: center; }
  .quick b { font-size: 13px; }
  .quick span { display: none; }
}
@media (max-width: 380px) {
  .logo-text { font-size: 14px; }
  .global-nav a { padding: 4px 4px; font-size: 12px; }
}
@media (max-width: 760px) {
  .cast { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cast a { padding: 8px; gap: 8px; }
  .cast img, .cast .noimg.face { width: 34px; height: 34px; }
  .cast-name { font-size: 14px; }
  .cast-n { font-size: 11px; }
  .highlights { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .highlights { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .highlights .hl { scroll-snap-align: start; }
}

/* 女優の横スクロール列・絞り込み */
.people.rail { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 112px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; scrollbar-width: thin; }
.people.rail > li { scroll-snap-align: start; }
.filters { margin: 6px 0 4px; }
.filters p { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.filters a { padding: 1px 8px; border-radius: 6px; text-decoration: none; }
.filters a:hover { background: var(--accent-soft); }
@media (max-width: 760px) {
  .people.rail { grid-auto-columns: 92px; }
  .people.rail img, .people.rail .noimg.face { width: 80px; height: 80px; }
}

/* ---------- 作品ページ：まとめ文・サンプル動画・前後の品番 ---------- */
.facts { margin-top: 28px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts h2 { margin: 0 0 6px; font-size: 16px; }
.facts p { margin: 0; font-size: 15px; line-height: 1.85; }
.buy-note { margin: 0; font-size: 12px; color: var(--muted); }
.btn-wide { margin: 14px auto 0; max-width: 520px; }
.movie { position: relative; aspect-ratio: 3 / 2; max-width: 720px; border-radius: var(--radius); overflow: hidden; background: #000; }
.movie img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; display: block; }
.movie iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.movie-play { position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 28px; border: 0; border-radius: 16px; background: rgba(0, 0, 0, 0.55); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.movie-play span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sale); font-size: 26px; padding-left: 4px; }
.movie-play:hover span { filter: brightness(1.1); }
.seq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 0; }
.seq a { display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); line-height: 1.45; }
.seq a:hover { border-color: var(--accent); }
.seq-next { text-align: right; }
.seq small { color: var(--muted); font-size: 12px; }
.seq b { color: var(--accent); }
.seq span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 女優ページ：プロフィール文・よくある質問・年別 ---------- */
.about-person { margin-top: 16px; font-size: 15px; line-height: 1.85; }
.faq { margin: 12px 0; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; }
.years { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0; }
.years li { font-size: 13px; padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.years b { font-variant-numeric: tabular-nums; }
.pr { display: inline-block; font-size: 10px; font-weight: 800; line-height: 1.5; padding: 0 5px; margin-right: 5px; border: 1px solid var(--muted); border-radius: 3px; color: var(--muted); vertical-align: 1px; }

/* FANZA 公式バナー（見放題ch など） */
.fz-ad { margin: 28px auto; text-align: center; }
.fz-ad .pr-cap { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.fz-banner { display: flex; justify-content: center; max-width: 100%; overflow: hidden; }

/* シリーズ・レーベルなどの一覧カード */
.term-grid { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.term-grid a { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--text); }
.tg-img { position: relative; display: block; aspect-ratio: 147 / 200; border-radius: 10px; overflow: hidden; background: var(--accent-soft); box-shadow: var(--shadow); transition: transform 0.18s, box-shadow 0.18s; }
.term-grid a:hover .tg-img { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg-name { font-weight: 700; font-size: 14px; line-height: 1.45; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.term-grid a:hover .tg-name { color: var(--accent-strong); }
.tg-meta { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .term-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 14px 10px; } }
.term-grid.rail { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 150px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; }
.vr-help p { margin: 0; }
@media (max-width: 760px) {
  .global-nav { overflow-x: auto; scrollbar-width: none; max-width: 62vw; }
  .global-nav::-webkit-scrollbar { display: none; }
  .quick { grid-template-columns: repeat(4, 1fr); }
}
/* 商品カード（DMM通販の機器など） */
.item-card { margin: 18px 0; }
.item-card .pr-cap { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.item-card a { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); box-shadow: var(--shadow); max-width: 560px; }
.item-card a:hover { border-color: var(--accent); }
.item-card img { width: 96px; height: 96px; object-fit: contain; flex-shrink: 0; border-radius: 8px; background: #fff; }
.ic-txt { display: flex; flex-direction: column; line-height: 1.5; font-size: 14px; }
.ic-txt b { color: var(--accent-strong); font-size: 15px; }
.ic-note { font-size: 12px; color: var(--muted); }
/* 作品ページ上部のサンプル動画（パッケージ画像を表紙にして、押すと再生） */
.work-pkg .movie { max-width: none; box-shadow: var(--shadow); }
.work-pkg .movie img { opacity: 0.8; }
.movie-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.cast-line.muted { color: var(--muted); font-size: 14px; }
/* 素人の売り場の画像は横長 → 切らずに収める */
.wc-img.wide img { object-fit: contain; background: var(--surface-2); }
/* お気に入り・RSS */
.fav-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0 2px; font-size: 13px; }
.fav-btn { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent-strong); font: inherit; font-weight: 700; cursor: pointer; }
.fav-btn.on { background: var(--accent); color: #fff; }
.fav-link { color: var(--muted); }
.rss-link { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 4px; background: #e8792b; color: #fff; text-decoration: none; }
.rss-link:hover { color: #fff; filter: brightness(1.1); }
/* ---------- にじDB ---------- */
/* 同人の表紙は横長（560×389）→ 枠も横長にして、切らずに収める */
.wc-img.wide, .tg-img.wide { aspect-ratio: 560 / 389; }
.wc-img.wide img, .tg-img.wide img { object-fit: contain; }
.work-pkg.wide img { width: 100%; height: auto; }
/* サンプル画像：同人・漫画のページは縦長なので大きめに並べる */
.samples.tall { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.samples.tall img { aspect-ratio: auto; height: auto; object-fit: contain; }
.same-box { margin: 10px 0 4px; }
.same-box p { margin: 0 0 6px; }
.same-table td { vertical-align: top; }
