:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --text: #22262e;
  --muted: #6b7280;
  --line: #e3e6eb;
  --accent: #d6336c;
  --accent-dark: #b02a5b;
  --link: #1f5fbf;
  --header: #1d2230;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1 { font-size: 1.35rem; line-height: 1.45; margin: 0 0 .8rem; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- ヘッダー ---------- */
.site-header { background: var(--header); color: #fff; }
.header-inner { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { color: #fff; font-weight: 700; font-size: 1.15rem; }
.logo:hover { text-decoration: none; opacity: .85; }
.search { display: flex; flex: 1; max-width: 420px; min-width: 220px; }
.search input { flex: 1; min-width: 0; padding: 8px 10px; border: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: 14px; }
.search button { padding: 0 14px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.global-nav { background: #2a3143; }
.global-nav ul { display: flex; gap: 4px; list-style: none; margin: 0 auto; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.global-nav a { display: block; padding: 10px 12px; color: #dfe3ec; font-size: 14px; }
.global-nav a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.08); }

.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 2カラム ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding-top: 16px; padding-bottom: 40px; }
.main { min-width: 0; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.intro, .day-block, .work, .prose, .profile, .side-box { background: var(--surface); border-radius: var(--radius); }
.intro { padding: 16px 18px; margin-bottom: 20px; }
.intro p { margin: 0; color: var(--muted); }
.day-block { padding: 14px; margin-bottom: 20px; }
.day-title { font-size: 1.05rem; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.day-title small { color: var(--muted); font-weight: 400; }

/* ---------- 作品カード ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 480px) { .grid, .grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-thumb { display: block; background: #e9ecf0; }
.card-thumb img { width: 100%; object-fit: cover; }
.card-wide .card-thumb img { aspect-ratio: 400 / 269; }
.card-square .card-thumb img { aspect-ratio: 1; }
.card-body { padding: 8px 10px 10px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 13px; line-height: 1.45; margin: 0 0 6px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--text); }
.meta { list-style: none; margin: 0 0 8px; padding: 0; font-size: 12px; color: var(--muted); }
.meta li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-actress::before { content: "♀ "; color: var(--accent); }
.meta-profile::before { content: "名義 "; }
.meta-label::before { content: "▣ "; }
.meta-code::before { content: "# "; }
.card-actions { display: flex; gap: 6px; margin-top: auto; }
.card-actions a { flex: 1; text-align: center; font-size: 12px; padding: 5px 4px; border-radius: 6px; }
.btn-outline { border: 1px solid var(--line); color: var(--text); }
.btn-buy { background: var(--accent); color: #fff; font-weight: 600; }
.btn-buy:hover, .btn-outline:hover { text-decoration: none; filter: brightness(.95); }

/* ---------- 作品詳細 ---------- */
.work, .prose { padding: 18px; }
.work-header h1 { margin-bottom: 4px; }
.work-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.work-image { display: block; margin: 0 auto 14px; }
.work-image-square { max-width: 360px; }
.cta { text-align: center; margin: 0 0 20px; }
.btn-large { display: inline-block; padding: 12px 28px; border-radius: 999px; font-size: 16px; }
.qa { border: 2px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 22px; }
.qa-q { margin: 0 0 6px; font-weight: 700; }
.qa-q::before { content: "Q. "; color: var(--accent); }
.qa-a { margin: 0; }
.qa-a::before { content: "A. "; color: var(--accent); font-weight: 700; }
.h2 { font-size: 1.1rem; margin: 26px 0 12px; padding: 8px 12px; background: #f0f2f6; border-left: 4px solid var(--accent); border-radius: 4px; }
.spec { display: grid; grid-template-columns: 130px 1fr; margin: 0; border-top: 1px solid var(--line); }
.spec dt, .spec dd { margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.spec dt { background: #f7f8fa; font-weight: 600; font-size: 14px; }
@media (max-width: 480px) { .spec { grid-template-columns: 100px 1fr; } }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: #fafbfc; }

/* ---------- 女優・一覧 ---------- */
.profile { display: flex; gap: 16px; padding: 14px; margin-bottom: 18px; align-items: flex-start; }
.profile img { border-radius: 50%; flex-shrink: 0; }
.profile dl { display: grid; grid-template-columns: 80px 1fr; margin: 0; font-size: 14px; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; }
.count { color: var(--muted); }
.term-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.term-list li { background: var(--surface); padding: 8px 12px; border-radius: 6px; display: flex; justify-content: space-between; gap: 8px; }
.term-list small { color: var(--muted); }
.article-list { list-style: none; padding: 0; }
.article-list li { background: var(--surface); padding: 12px 14px; border-radius: 6px; margin-bottom: 8px; }
.article-list p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px 0 0; }
.pagination a, .pagination span { min-width: 38px; padding: 7px 10px; text-align: center; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .dots { border: 0; background: none; }

/* ---------- サイドバー ---------- */
.side-box { padding: 14px; margin-bottom: 16px; font-size: 14px; }
.side-title { font-size: 1rem; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.side-list small { display: block; color: var(--muted); }

/* ---------- フッター ---------- */
.site-footer { background: var(--header); color: #b8bfcc; font-size: 13px; padding: 24px 0; }
.footer-nav { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: #dfe3ec; }
.copyright, .note { margin: 4px 0; }

/* ---------- 年齢確認 ---------- */
html.age-locked, html.age-locked body { overflow: hidden; }
.age-gate { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 18, 26, .96); display: flex; align-items: center; justify-content: center; padding: 16px; }
.age-gate-box { background: var(--surface); border-radius: 12px; padding: 28px 22px; max-width: 420px; width: 100%; text-align: center; }
.age-gate-title { font-size: 1.3rem; font-weight: 700; margin-top: 0; }
.age-gate-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.btn-primary, .btn-secondary { display: block; padding: 12px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; border: 0; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: #eef0f3; color: var(--text); }

/* ---------- 女優検索（トップ） ---------- */
.hero { background: linear-gradient(135deg, #2a3143, #3b2a43); color: #fff; border-radius: var(--radius); padding: 22px 18px; margin-bottom: 20px; }
.hero h1 { font-size: 1.6rem; margin-bottom: 4px; }
.hero p { margin: 0 0 14px; color: #d7dbe5; font-size: 14px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.panel-title { font-size: 1.05rem; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.notice { border-left: 4px solid #e0a100; }
.notice p { margin: 0; }
.more { text-align: right; margin: 12px 0 0; font-size: 14px; }
.source-note { font-size: 12px; color: var(--muted); margin: -8px 0 16px; }

.actress-search { color: var(--text); }
.search-main { display: flex; }
.search-main input { flex: 1; min-width: 0; padding: 12px 14px; border: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: 16px; }
.search-main button { padding: 0 22px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.main > .actress-search { margin-bottom: 16px; }
.main > .actress-search .search-main input { border: 1px solid var(--line); border-right: 0; }
.search-filters { margin-top: 10px; background: rgba(255,255,255,.96); border-radius: var(--radius); padding: 8px 12px; }
.search-filters summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; padding: 10px 0 4px; }
.filter-grid label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 3px; }
.filter-grid select { padding: 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: #fff; }
.range { display: flex; align-items: center; gap: 4px; }
.range select { flex: 1; min-width: 0; }

/* 50音インデックス */
.kana-index { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.kana-index a { display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; color: var(--text); }
.kana-index a:hover, .kana-index a.active { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
.kana-index .kana { font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.kana-index small { font-size: 11px; opacity: .7; }
@media (max-width: 560px) { .kana-index { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* 女優カード */
.actress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .actress-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.actress-card { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 6px; color: var(--text); }
.actress-card:hover { text-decoration: none; border-color: var(--accent); }
.actress-card img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: #e9ecf0; margin-bottom: 6px; }
.actress-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.actress-ruby { font-size: 11px; color: var(--muted); }
.actress-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.chips a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 記事本文 */
.prose h2 { font-size: 1.15rem; margin: 28px 0 12px; padding: 8px 12px; background: #f0f2f6; border-left: 4px solid var(--accent); border-radius: 4px; }
.prose h3 { font-size: 1.02rem; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: #f7f8fa; }
.prose .point { background: #fff7e6; border: 1px solid #f2d59b; border-radius: var(--radius); padding: 10px 14px; }
.prose .toc { background: #f7f8fa; border-radius: var(--radius); padding: 10px 14px 10px 30px; }
@media (max-width: 480px) { .prose table { font-size: 13px; } .hero h1 { font-size: 1.35rem; } }
.todo { color: #c0392b; font-weight: 700; }

.lead { color: var(--muted); font-size: 14px; margin: -4px 0 12px; }
.about-site p { font-size: 14px; }
.faq-title { font-size: 1rem; margin: 18px 0 8px; }
.faq { margin: 0; }
.faq dt { font-weight: 700; font-size: 14px; margin-top: 10px; }
.faq dt::before { content: "Q. "; color: var(--accent); }
.faq dd { margin: 4px 0 0; font-size: 14px; color: #3a404c; }

.byline { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin: -4px 0 16px; }
.author-box { margin-top: 32px; padding: 14px 16px; background: #f7f8fa; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.author-box p { margin: 0 0 6px; }
.author-name { font-weight: 700; }

.person-card { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; background: #fafbfc; }
.person-card p { margin: 0 0 8px; }
.person-role { font-weight: 700; }
.person-note { font-size: 13px; color: var(--muted); }
.supervisor-note { margin-top: 10px !important; padding-top: 10px; border-top: 1px dashed var(--line); }

/* 女優画像：パッケージ表紙を縦長で表示（顔が上寄りのため上側を優先） */
.actress-card img { max-width: 130px; aspect-ratio: 3 / 4; border-radius: 10px; object-fit: cover; object-position: center top; }
.profile img { width: 150px; height: 200px; border-radius: 10px; object-fit: cover; object-position: center top; background: #e9ecf0; }
@media (max-width: 480px) { .profile { flex-direction: column; align-items: center; } }

.sub-title { font-size: 14px; margin: 12px 0 6px; color: var(--muted); }
.style-links { margin-bottom: 14px; }
.chips small { color: var(--muted); }

.genre-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.genre-tags a { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fdecf2; color: var(--accent-dark); font-size: 13px; }
.spec .code { font-size: 1.05rem; letter-spacing: .02em; }
.sub-code { color: var(--muted); font-size: 12px; margin-left: 4px; }

.work-summary { margin-top: 28px; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius); background: #fafbfc; text-align: center; }
.work-summary-title { font-weight: 700; font-size: 14px; margin: 0 0 8px; text-align: left; }
.work-summary dl { display: grid; grid-template-columns: 90px 1fr; gap: 2px 8px; margin: 0 0 12px; font-size: 13px; text-align: left; }
.work-summary dt { color: var(--muted); }
.work-summary dd { margin: 0; }
.h1-sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* ---------- ロゴ入りヘッダー（ロゴの黒文字が読めるよう白地） ---------- */
.site-header { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); }
.header-inner { padding-top: 10px; padding-bottom: 10px; }
.logo { display: block; line-height: 0; }
.logo img { height: 52px; width: auto; }
.logo:hover { opacity: .9; }
.search input { border: 1px solid #cfd4dc; border-right: 0; background: #fff; }
.global-nav { background: var(--header); }
@media (max-width: 560px) {
  .header-inner { justify-content: center; }
  .logo img { height: 44px; }
  .search { max-width: none; }
}

/* ---------- 女優ページの集計 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.stat-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat-label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
.stat-work { display: flex; flex-direction: column; gap: 2px; color: var(--text); font-size: 13px; }
.stat-work strong { color: var(--accent-dark); }
.stat-work span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stat-work small { color: var(--muted); }
.year-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.year-bars li { display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.year-bars .bar { height: 10px; background: #f0f2f6; border-radius: 999px; overflow: hidden; }
.year-bars .bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.year-bars .num { text-align: right; color: var(--muted); }

.age-gate[hidden] { display: none; }
.credit { margin: 8px 0 0; font-size: 12px; }
.credit a { color: #dfe3ec; }

.offers { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn-mgs { background: #2b6cb0; }

/* 横長のパッケージ画像は右半分（表紙）を表示 */
.actress-card img.cover-right, .profile img.cover-right { object-position: right center; }

/* 当サイト調べ（非公式）の出演者 */
.unofficial { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 4px; background: #fff3cd; color: #8a6100; font-size: 10px; line-height: 1.5; vertical-align: 1px; }
.unofficial-label { color: #8a6100; margin-left: 2px; }
.qa-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* 最新作・デビュー作の画像 */
.stat-thumb { width: 100%; aspect-ratio: 400 / 269; object-fit: cover; border-radius: 6px; margin-bottom: 6px; background: #e9ecf0; }
/* 出演者情報の投稿フォーム */
.submit-box form { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.submit-box label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.submit-box input, .submit-box textarea, .admin-login input { padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 6px; font: inherit; font-weight: 400; }
.submit-box .btn-primary { justify-self: start; padding: 10px 22px; }
.submit-note { font-size: 12px; color: var(--muted); margin: 0; }
.submit-done { background: #e8f6ec; border: 1px solid #b7e1c3; color: #1e6b35; padding: 10px 12px; border-radius: 6px; }
.submit-error { color: #b42318; font-size: 13px; }
/* 管理画面 */
.admin-login { display: grid; gap: 12px; max-width: 360px; background: var(--surface); padding: 18px; border-radius: var(--radius); }
.admin-login label { display: grid; gap: 4px; }
.review-item { display: grid; grid-template-columns: 180px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.review-item img { width: 100%; border-radius: 6px; }
.review-item p { margin: 2px 0; font-size: 14px; }
.review-title { color: var(--muted); font-size: 13px !important; }
.review-note { background: #f7f8fa; padding: 6px 8px; border-radius: 4px; }
.review-date { color: var(--muted); font-size: 12px !important; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.review-actions .cand { width: 100%; font-size: 13px; }
.review-actions button { padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.votes { margin-left: 6px; background: #fff3cd; color: #8a6100; font-size: 12px; padding: 1px 6px; border-radius: 4px; }
.live-list { list-style: none; padding: 0; }
.live-list li { display: flex; gap: 8px; align-items: center; background: var(--surface); padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; font-size: 14px; }
.live-list form.inline { margin-left: auto; }
@media (max-width: 560px) { .review-item { grid-template-columns: 1fr; } }
