/* ero-jav — missav準拠ダークUI */
:root {
  --bg: #101216;
  --bg2: #171a20;
  --bg3: #1f242e;
  --bg4: #272d39;
  --text: #e8ecf1;
  --text-dim: #9aa5b3;
  --accent: #2dd4bf;
  --accent2: #0d9488;
  --border: #262d38;
  --radius: 10px;
  --radius-lg: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Malgun Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--text); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
main { max-width: 1320px; margin: 0 auto; padding: 0 12px 48px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header — ロゴ+検索+言語を1行、モバイルは2行折返し */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,18,22,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px 4px; max-width: 1320px; margin: 0 auto;
}
.site-logo { font-weight: 800; font-size: 22px; letter-spacing: .5px; color: var(--text); flex: 0 0 auto; }
.site-logo em { font-style: normal; color: var(--accent); }
.site-search {
  display: flex; gap: 8px; position: relative;
  flex: 1 1 320px; max-width: 620px; margin-left: auto;
}
.site-search input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg3); color: var(--text);
  font-size: 14px;
}
.site-search input:focus { outline: none; border-color: var(--accent); }
.site-search button {
  padding: 10px 18px; border: 0; border-radius: 999px;
  background: var(--accent); color: #05201c; font-weight: 700; font-size: 13px; cursor: pointer;
}
@media (max-width: 639px) {
  .site-search { flex: 1 0 100%; order: 3; margin-left: 0; }
  .header-top { gap: 10px; }
}
.lang-switch {
  padding: 6px 14px; border: 1px solid var(--accent); border-radius: 999px;
  font-size: 12px; color: var(--accent); white-space: nowrap; flex: 0 0 auto;
}
.lang-switch:hover { background: var(--accent); color: #05201c; }

/* 検索サジェスト */
.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 70px; z-index: 60;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); overflow: hidden;
  max-height: 340px; overflow-y: auto;
}
.search-suggest a {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 14px; font-size: 13px; color: var(--text);
}
.search-suggest a:hover, .search-suggest a.active { background: var(--bg3); }
.search-suggest .sg-kind {
  flex: 0 0 auto; font-size: 10px; color: var(--accent);
  border: 1px solid rgba(45,212,191,.5); border-radius: 999px; padding: 1px 7px;
}
.search-suggest .sg-sub { color: var(--text-dim); font-size: 11px; }

/* header nav — カテゴリ横並び */
.header-nav {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 0 14px 8px; max-width: 1320px; margin: 0 auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; color: var(--text-dim);
}
.header-nav a:hover { background: var(--bg3); color: var(--text); }

/* ad zones — 中央寄せ・はみ出し防止（insはads.jsが注入） */
.ad-zone {
  display: flex; justify-content: center; align-items: flex-start;
  gap: 20px; flex-wrap: wrap; margin: 18px auto;
  max-width: 100%; overflow: hidden; min-height: 0;
}
.ad-zone ins { display: block; }
.ad-zone ins, .ad-zone iframe, .ad-zone img, .ad-zone a { max-width: 100% !important; }
.ad-bottom { margin: 26px auto 10px; max-width: 780px; }
.ad-side { display: none; }
@media (min-width: 900px) {
  .ad-side { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 0; }
}
.ad-midsq { display: none; }
@media (max-width: 899px) { .ad-midsq { display: flex; } }

/* card grid — 最大4列・最小2列 */
.grid, .rail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 560px) { .grid, .rail { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid, .rail { grid-template-columns: repeat(4, 1fr); gap: 14px; } }

.card { display: block; }
.card-thumb {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--bg3); aspect-ratio: 16/9;
  transition: transform .18s, box-shadow .18s;
}
.card:hover .card-thumb { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-duration {
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(0,0,0,.78); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px;
  letter-spacing: .3px;
}
.card-body { padding: 7px 2px 0; }
.card-title {
  font-size: 12.5px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  font-size: 11px; color: var(--text-dim); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-reason {
  position: absolute; left: 6px; bottom: 6px;
  background: rgba(45,212,191,.85); color: #05201c;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
}

/* home sections */
.home-sec-title {
  font-size: 16px; font-weight: 700; margin: 26px 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.home-sec-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--accent);
}
.home-section:first-of-type .home-sec-title { margin-top: 16px; }
.more-link { margin: 20px 0 10px; text-align: center; }
.more-link a {
  display: inline-block; padding: 12px 32px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-dim); font-weight: 600; font-size: 14px;
}
.more-link a:hover { border-color: var(--accent); color: var(--accent); }

/* work page — PC2カラム（動画左 / 広告+関連右300px） */
.breadcrumb { font-size: 12px; color: var(--text-dim); margin: 16px 0 8px; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.work h1 { font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 12px; }
.work-main { display: block; }
@media (min-width: 900px) {
  .work-main {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px; align-items: start;
  }
}
.work-side { min-width: 0; }
@media (max-width: 899px) { .work-side { display: none; } }
.side-rel-title {
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  margin: 18px 0 8px; letter-spacing: .3px;
}
.side-related .card { display: flex; gap: 8px; margin-bottom: 10px; }
.side-related .card-thumb { flex: 0 0 120px; aspect-ratio: 16/9; }
.side-related .card-body { flex: 1; min-width: 0; padding: 0; }
.side-related .card-title { font-size: 11.5px; -webkit-line-clamp: 2; }
.side-related .card-meta { font-size: 10px; }

.player-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: #000; aspect-ratio: 16/9;
}
.player-wrap .fluid_video_wrapper { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-wrap video { width: 100%; height: 100%; }

/* 動画上オーバーレイ広告（再生中に表示・300x250スクエアを自動縮小） */
.pv-overlay {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 6px; z-index: 20;
  max-width: 96%;
}
.pv-overlay[hidden] { display: none !important; }
.pv-adbox {
  overflow: visible; border-radius: 10px;
  background: rgba(0,0,0,.5); padding: 4px;
  display: flex; justify-content: center;
}
.pv-adbox ins, .pv-adbox iframe, .pv-adbox img { max-width: 100% !important; }
.pv-close {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.7); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.pv-pause-ad {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; background: rgba(0,0,0,.55);
  overflow: hidden;
}
.pv-pause-ad ins, .pv-pause-ad iframe, .pv-pause-ad img { max-width: 100% !important; }

/* CTA */
.cta { margin: 16px 0; }
.cta-button {
  display: block; text-align: center;
  background: linear-gradient(135deg, var(--accent), #34d399);
  color: #05201c;
  font-weight: 800; font-size: 16px; letter-spacing: .4px;
  padding: 16px; border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(45,212,191,.22);
  transition: transform .15s, box-shadow .15s;
}
.cta-button:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,212,191,.32); }
.cta-sub { display: none; }

/* cast row — 出演者ピルをプレイヤー直下に */
.cast-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 12px 0 4px;
}
.cast-label { font-size: 12px; color: var(--text-dim); margin-right: 2px; }

/* chips — ピル型 */
.chip {
  display: inline-block; font-size: 12px; padding: 5px 13px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); line-height: 1.4;
}
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-actress {
  background: rgba(45,212,191,.1); border-color: rgba(45,212,191,.4);
  color: var(--accent); font-weight: 600;
}
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }

/* info table — dl式（全値リンク可）。≥700pxで2列 */
.info { margin: 16px 0; font-size: 13px; border-top: 1px solid var(--border); }
.info-row {
  display: flex; padding: 9px 4px; border-bottom: 1px solid var(--border);
}
.info-row dt {
  flex: 0 0 96px; color: var(--text-dim); font-size: 12px; padding-top: 1px;
}
.info-row dd { flex: 1; min-width: 0; }
.info-row a { color: var(--accent); margin-right: 8px; }
.info-row a:hover { text-decoration: underline; }
@media (min-width: 700px) {
  .info { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
}

/* 説明文 — 見出しなし・2行クランプ＋展開ボタン */
.intro { margin: 14px 0 4px; }
.intro-text {
  color: var(--text); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.intro.open .intro-text { -webkit-line-clamp: unset; display: block; }
.intro-more {
  margin-top: 6px; padding: 0; border: 0; background: none;
  color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer;
}
.intro-more:hover { text-decoration: underline; }

.related h2 {
  font-size: 15px; font-weight: 700; margin: 24px 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.related h2::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--accent);
}

/* pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 26px 0; flex-wrap: wrap; }
.pagination a, .pagination .current {
  padding: 8px 12px; border-radius: 8px; background: var(--bg3);
  border: 1px solid var(--border); font-size: 13px; min-width: 38px; text-align: center;
}
.pagination a:hover { border-color: var(--accent); }
.pagination .current { background: var(--accent); color: #05201c; font-weight: 700; border-color: var(--accent); }

/* term list */
.term-list { columns: 2; margin-top: 14px; font-size: 13px; }
@media (min-width: 768px) { .term-list { columns: 4; } }
@media (min-width: 1200px) { .term-list { columns: 5; } }
.term-list li { list-style: none; padding: 4px 0; color: var(--text-dim); break-inside: avoid; }
.term-list a { color: var(--text); }
.term-list a:hover { color: var(--accent); }

/* search page — 作品結果はカードグリッド、女優/用語はチップ列 */
.named-results { display: flex; flex-wrap: wrap; gap: 8px; }
.named-results .search-result { padding: 0; border: 0; }
.named-results .search-result a {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 14px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 999px; font-size: 13px;
}
.named-results .search-result a:hover { border-color: var(--accent); color: var(--accent); }
.search-result { padding: 10px 0; border-bottom: 1px solid var(--border); }
.search-result .code { color: var(--accent); font-weight: 700; }
.search-result .hit-count { color: var(--text-dim); font-size: 12px; }
.search-result .hit-kind {
  font-size: 11px; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 1px 8px; margin-left: 4px;
}
.search-hint, .search-none { color: var(--text-dim); font-size: 13px; padding: 8px 0; }
.sec-label { font-size: 14px; color: var(--accent); margin: 20px 0 8px; font-weight: 700; }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 22px 14px 60px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-dim); font-size: 13px; }
.site-footer a:hover { color: var(--accent); }
.adult-notice { margin-top: 12px; font-size: 11px; color: var(--text-dim); }
.static-body { font-size: 14px; margin-top: 10px; }

h1 { font-size: 18px; margin: 18px 0 6px; }

/* Fluid Player上書き（角丸・ダーク調和） */
.fluid_video_wrapper { border-radius: var(--radius-lg); overflow: hidden; }
.fluid_video_wrapper video { object-fit: contain; }
