/* ============================================================
   components.css — ぎゃるげらぼ UIコンポーネント
   アコーディオン / ポップアップ / スポイラーゾーン /
   スコア表示 / クロスレビュー / プレイ済みバー 等
   ============================================================ */

/* ===== ACCORDION ===== */
.accordion { border: 1px solid #ccd8f0; border-radius: 3px; margin-bottom: 8px; overflow: hidden; }
.accordion-toggle {
  width: 100%; text-align: left; background: #243a70; color: #d8e4f8;
  font-size: 13px; font-weight: 700; padding: 9px 12px; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Noto Sans JP', sans-serif;
}
.accordion-toggle:hover { background: #2e4880; }
.accordion.is-open .accordion-toggle { background: #1a2e5a; }
.acc-icon { transition: transform 300ms; display: inline-block; font-style: normal; }
.accordion.is-open .acc-icon { transform: rotate(180deg); }
.accordion-body { overflow: hidden; background: #fff; }
.accordion-body-inner { padding: 12px 14px; font-size: 13px; line-height: 1.85; color: #1a2030; }
.accordion-body-inner p + p { margin-top: 8px; }
.accordion-body-inner ul { padding-left: 1.5em; margin: 6px 0; }
.accordion-body-inner li { margin-bottom: 4px; }

/* ===== PLAYED FLAG BAR ===== */
.played-bar {
  background: #f4f7fd; border: 1px solid #ccd8f0; border-radius: 3px;
  padding: 10px 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.played-bar-label { font-size: 12px; color: #6878a8; }
#played-btn {
  background: #1a3878; color: #d8e8ff; border: none; border-radius: 4px;
  padding: 7px 16px; font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif; transition: background 150ms;
}
#played-btn:hover { background: #243a70; }
#played-btn.is-played { background: #2a5070; }
.played-badge { background: #1a3878; color: #d8e8ff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
#played-note { font-size: 11px; color: #6878a8; margin-left: auto; }

/* ===== SPOILER ZONE ===== */
.spoiler-strip { background: #b01010; border-bottom: 3px solid #7a0000; padding: 10px 0; }
.spoiler-strip-inner { max-width: 1080px; margin: 0 auto; padding: 0 12px; display: flex; align-items: center; justify-content: center; position: relative; }
.spoiler-strip .warn { color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.spoiler-strip .back { color: rgba(255,255,255,0.75); font-size: 11px; position: absolute; right: 12px; text-decoration: none; }
.spoiler-strip .back:hover { color: #fff; text-decoration: none; }

/* ===== TERM POPUP ===== */
.term { border-bottom: 1px dotted #4a70c0; cursor: help; }
.term-tooltip {
  position: absolute; z-index: 9000; background: #1a2e5a; color: #d8e4f8;
  border: 1px solid #4a70c0; border-radius: 4px; padding: 7px 11px;
  font-size: 11px; line-height: 1.6; max-width: 240px;
  pointer-events: none; opacity: 0; transition: opacity 150ms;
}
.term-tooltip.is-visible { opacity: 1; }
.term-tooltip strong { font-size: 12px; }
.tip-desc { color: #a8bce0; }

/* ===== SCORE DISPLAY ===== */
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.score-item { text-align: center; }
.score-label { font-size: 10px; color: #6878a8; margin-bottom: 4px; }
.score-num { font-size: 26px; font-weight: 700; font-family: ui-monospace, 'Cascadia Code', monospace; line-height: 1; }
.score-bar-wrap { height: 4px; background: #dce8f8; border-radius: 2px; margin-top: 5px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 2px; }
.score-s { color: #4cce7a; } .fill-s { background: #4cce7a; }
.score-a { color: #8bc34a; } .fill-a { background: #8bc34a; }
.score-b { color: #ffc107; } .fill-b { background: #ffc107; }
.score-c { color: #ff7043; } .fill-c { background: #ff7043; }
.score-d { color: #ef5350; } .fill-d { background: #ef5350; }

/* ===== CROSS-REVIEW TABLE ===== */
.cross-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cross-table th { background: #1a2e5a; color: #d8e4f8; padding: 7px 10px; font-weight: 700; text-align: center; white-space: nowrap; }
.cross-table th:first-child { text-align: left; }
.cross-table td { padding: 6px 10px; border-bottom: 1px solid #eef1f7; vertical-align: middle; }
.cross-table tr:last-child td { border-bottom: none; }
.cross-table tr:hover td { background: #f4f7fd; }
.cross-table .reviewer-name { font-weight: 700; white-space: nowrap; }
.cross-table .score-cell { text-align: center; font-family: ui-monospace, monospace; font-weight: 700; }

/* ===== GENRE CHIPS ===== */
.chip { display: inline-block; background: #eef1f7; border: 1px solid #ccd8f0; border-radius: 10px; padding: 2px 9px; font-size: 11px; color: #3a5080; margin: 2px; }

/* ===== UPDATE FILTER CHIPS ===== */
.update-filters { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #eef1f7; flex-wrap: wrap; }
.filter-chip { background: #eef1f7; border: 1px solid #ccd8f0; border-radius: 12px; padding: 4px 12px; font-size: 11px; color: #3a5080; cursor: pointer; font-family: 'Noto Sans JP', sans-serif; transition: background 150ms; }
.filter-chip:hover { background: #dce8f8; }
.filter-chip.active { background: #1a2e5a; color: #d8e4f8; border-color: #1a2e5a; }

/* ===== UPDATE MONTH HEADER ===== */
.update-month { background: #f4f7fd; color: #3a5080; font-size: 12px; font-weight: 700; padding: 5px 12px; border-bottom: 1px solid #dce8f8; }

/* ===== REVIEWER PROFILE ===== */
.reviewer-profile { display: flex; gap: 18px; padding: 14px; align-items: flex-start; flex-wrap: wrap; }
.reviewer-avatar { border-radius: 50% 50% 44% 44%; flex-shrink: 0; border: 2px solid #4a8fd4; }
.reviewer-info { flex: 1; min-width: 180px; }
.reviewer-name-large { font-family: 'Noto Serif JP', serif; font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.reviewer-tagline { font-style: italic; color: #6878a8; font-size: 12px; margin-bottom: 10px; }
.reviewer-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.reviewer-table td { padding: 4px 8px; border-bottom: 1px dotted #dce8f8; vertical-align: top; }
.reviewer-table td:first-child { color: #6878a8; white-space: nowrap; width: 8em; }

/* ===== BLOCKQUOTE ===== */
.quote-box { border-left: 3px solid #4a8fd4; padding: 10px 14px; background: #f4f7fd; margin: 0; }
.quote-box p { font-size: 13px; color: #2a3050; line-height: 1.9; }
.quote-sig { text-align: right; font-size: 11px; color: #6878a8; margin-top: 6px; }

/* ===== GLOSSARY ===== */
.glossary-entry { border-bottom: 1px dotted #ccd8f0; padding: 10px 0; }
.glossary-entry:last-child { border-bottom: none; }
.glossary-term { font-size: 14px; font-weight: 700; color: #1a2e5a; margin-bottom: 4px; font-family: 'Noto Serif JP', serif; }
.glossary-desc p { font-size: 13px; color: #2a3050; line-height: 1.85; margin: 0; }
.glossary-desc p + p { margin-top: 6px; }

/* ===== CONTENT BLOCK BODY ===== */
.content-block-body { padding: 12px 14px; font-size: 13px; line-height: 1.85; color: #1a2030; }
.content-block-body p { margin: 0; }
.content-block-body p + p { margin-top: 8px; }
.content-block-body ul { list-style: none; padding: 0; margin: 0; }
.content-block-body ul li { padding: 7px 4px; border-bottom: 1px dotted #dce8f8; font-size: 13px; }
.content-block-body ul li:last-child { border-bottom: none; }

/* ===== BLOCK HEADINGS (h1/h2 variants) ===== */
.block-head-h1 { font-family: 'Noto Serif JP', serif; font-size: 18px; font-weight: 700; color: #d8e4f8; background: #1a2e5a; padding: 10px 14px; border-bottom: 2px solid #4a70c0; margin: 0; }
.block-head-h2 { font-family: 'Noto Serif JP', serif; font-size: 14px; font-weight: 700; color: #d8e4f8; background: #243a70; padding: 7px 14px; border-bottom: 1px solid #ccd8f0; margin: 0; }
.block-head-h3 { font-family: 'Noto Serif JP', serif; font-size: 13px; font-weight: 700; color: #d8e4f8; background: #2e4880; padding: 6px 14px; border-bottom: 1px solid #ccd8f0; margin: 0; }

/* ===== GAME INFO PAGE ===== */
.game-info-flex { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.game-cover-placeholder { width: 140px; height: 100px; background: linear-gradient(135deg, #d8e4f8, #c0d0f0); border: 1px solid #ccd8f0; border-radius: 3px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #8898b8; text-align: center; }
.game-info-right { flex: 1; min-width: 180px; }
.game-info-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
.game-info-table th { color: #6878a8; text-align: left; width: 7em; padding: 4px 8px 4px 0; font-weight: 400; vertical-align: top; white-space: nowrap; }
.game-info-table td { color: #1a2030; padding: 4px 8px; border-bottom: 1px dotted #dce8f8; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.genre-chip { background: #f0f4fc; border: 1px solid #c0d0e8; border-radius: 10px; padding: 2px 10px; font-size: 11px; color: #3a5080; }
.spoiler-cta-row { margin-top: 12px; }
.spoiler-cta-link { display: inline-block; background: #c03030; color: #fff; padding: 7px 14px; border-radius: 3px; font-size: 12px; font-weight: 700; text-decoration: none; transition: background 150ms; }
.spoiler-cta-link:hover { background: #a02020; text-decoration: none; color: #fff; }

/* ===== SYNOPSIS ===== */
.synopsis-text { font-size: 13px; line-height: 1.9; color: #2a3050; }
.synopsis-text p + p { margin-top: 10px; }

/* ===== SPOILER WARNING BOX ===== */
.spoiler-warning-box { background: #fff3f0; border: 1px solid #f0c0b0; border-left: 4px solid #c03030; border-radius: 3px; padding: 10px 14px; font-size: 12px; color: #2a3050; margin-bottom: 12px; line-height: 1.8; }

/* ===== CHARACTER CARDS ===== */
.char-cards-row { display: flex; flex-wrap: wrap; gap: 12px; }
.char-card { flex: 1; min-width: 130px; max-width: 220px; background: #f4f7fd; border: 1px solid #ccd8f0; border-radius: 3px; padding: 10px; }
.char-chibi { width: 100%; height: 80px; border-radius: 50% 50% 44% 44%; margin-bottom: 8px; }
.char-name { font-size: 14px; font-weight: 700; color: #1a2e5a; font-family: 'Noto Serif JP', serif; }
.char-kana { font-size: 10px; color: #6878a8; margin-bottom: 6px; }
.char-desc { font-size: 11px; color: #2a3050; line-height: 1.7; margin: 0; }

/* ===== SCORE DETAIL NOTE ===== */
.score-detail-note { padding: 8px 14px; font-size: 12px; color: #6878a8; border-top: 1px solid #eef1f7; }
.score-detail-note a { color: #1a3878; }

/* ===== PLAY ORDER LIST ===== */
.play-order-list { list-style: none; counter-reset: route-order; padding: 4px 0; }
.play-order-list li { counter-increment: route-order; display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid #eef1f7; font-size: 13px; align-items: center; }
.play-order-list li:last-child { border-bottom: none; }
.play-order-list li::before { content: counter(route-order); background: #243a70; color: #d8e4f8; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.play-order-list li.is-true-end { background: #f8f4fc; }
.play-order-list li.is-true-end::before { background: #6030a0; }
.play-order-note { font-size: 12px; color: #6878a8; padding: 8px 14px; line-height: 1.8; border-top: 1px solid #eef1f7; }

/* ===== ROUTE META GRID ===== */
.route-meta-grid { display: grid; grid-template-columns: 7em 1fr; gap: 4px 10px; font-size: 12px; background: #f4f7fd; border: 1px solid #dce8f8; border-radius: 3px; padding: 8px 10px; margin-bottom: 12px; }
.route-meta-label { color: #6878a8; font-weight: 700; padding: 2px 0; }
.route-meta-value { color: #2a3050; padding: 2px 0; }
.route-body-text { font-size: 13px; line-height: 1.9; color: #1a2030; }
.route-body-text p + p { margin-top: 8px; }

/* ===== BRANCH CHART ===== */
.branch-chart { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 11px; line-height: 1.7; white-space: pre; background: #f4f7fd; border: 1px solid #dce8f8; border-radius: 3px; padding: 12px 14px; overflow-x: auto; color: #2a3050; }
.chart-note { font-size: 11px; color: #8898a8; padding: 6px 14px; }

/* ===== CONTENT MENU (spoiler zone index) ===== */
.content-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.content-menu-link { display: block; background: #f4f7fd; border: 1px solid #ccd8f0; border-radius: 3px; padding: 10px 12px; text-decoration: none; transition: background 150ms; }
.content-menu-link:hover { background: #e8eef8; text-decoration: none; border-color: #a8c0e0; }
.cmenu-title { display: block; font-size: 13px; font-weight: 700; color: #1a2e5a; margin-bottom: 3px; }
.cmenu-label { display: block; font-size: 11px; color: #6878a8; line-height: 1.5; }

/* ===== REVIEWER PROFILE PAGES ===== */
.profile-header { display: flex; gap: 18px; padding: 14px; align-items: flex-start; flex-wrap: wrap; }
.profile-chibi { border-radius: 50% 50% 44% 44%; flex-shrink: 0; }
.profile-info { flex: 1; min-width: 200px; }
.profile-name { font-family: 'Noto Serif JP', serif; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.profile-tagline { font-style: italic; color: #6878a8; font-size: 12px; margin-bottom: 10px; line-height: 1.7; }
.profile-desc { font-size: 13px; color: #2a3050; line-height: 1.85; margin-bottom: 12px; }
.profile-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.profile-table th { color: #6878a8; text-align: left; padding: 4px 8px 4px 0; font-weight: 400; width: 8em; vertical-align: top; white-space: nowrap; }
.profile-table td { color: #1a2030; padding: 4px 8px; border-bottom: 1px dotted #dce8f8; }
.profile-table tr:last-child td { border-bottom: none; }
.style-bars { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.style-bar-row { display: flex; align-items: center; gap: 10px; }
.style-bar-label { font-size: 11px; color: #6878a8; width: 13em; flex-shrink: 0; }
.style-bar-wrap { flex: 1; height: 8px; background: #dce8f8; border-radius: 4px; overflow: hidden; }
.style-bar-fill { height: 100%; border-radius: 4px; }
.style-bar-pct { font-size: 11px; color: #3a5080; font-weight: 700; width: 3em; text-align: right; }

/* ===== REVIEW HEADER (game review pages) ===== */
.review-header { display: flex; gap: 14px; align-items: center; padding: 12px 14px; flex-wrap: wrap; border-bottom: 1px solid #eef1f7; }
.review-chibi-placeholder { width: 64px; height: 84px; border-radius: 50% 50% 44% 44%; border: 2px solid #ccd8f0; flex-shrink: 0; }
.review-header-info { flex: 1; }
.review-header-name { font-family: 'Noto Serif JP', serif; font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.review-header-role { font-size: 11px; color: #6878a8; }
.review-header-total { font-size: 34px; font-weight: 700; font-family: ui-monospace, monospace; line-height: 1; text-align: right; flex-shrink: 0; }
.review-header-total span { font-size: 13px; color: #8898a8; font-weight: 400; vertical-align: bottom; margin-left: 2px; }
.review-body { padding: 14px; font-size: 13px; line-height: 1.95; color: #1a2030; }
.review-body p { margin: 0; }
.review-body p + p { margin-top: 10px; }

/* ===== REVIEW PAGE SUMMARY (冒頭スコア・一言・総評ブロック) ===== */
.review-summary-block {
  background: #f4f7fd; border-left: 4px solid #4a8fd4; padding: 14px 18px;
  display: grid; grid-template-columns: 68px 1fr; grid-template-rows: auto auto; gap: 0 16px;
}
.review-summary-score {
  grid-column: 1; grid-row: 1 / span 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-right: 1px solid rgba(0,0,0,0.08); padding-right: 14px;
}
.review-summary-score-num { font-size: 2.2em; font-weight: 900; font-family: ui-monospace, 'Cascadia Code', monospace; line-height: 1; letter-spacing: -0.02em; }
.review-summary-score-denom { font-size: 0.75em; color: #8898b8; font-weight: 600; margin-top: 3px; }
.review-summary-oneliner { grid-column: 2; grid-row: 1; font-size: 13px; font-weight: 700; color: #1a2e5a; margin: 0 0 8px; line-height: 1.5; }
.review-summary-body { grid-column: 2; grid-row: 2; font-size: 12px; color: #4a5878; line-height: 1.75; }
.review-summary-body p { margin: 0; }

/* ===== NON-SPOILER NUDGE BANNER (spoilerページ上部・未プレイ向け導線) ===== */
.nonspoiler-link-banner { background: #f0f7f0; border: 1px solid #90c890; border-left: 3px solid #2a7830; padding: 9px 14px; font-size: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.nonspoiler-link-banner-text { color: #1a4020; flex: 1; line-height: 1.5; }
.nonspoiler-link-banner-link { display: inline-block; background: #2a7030; color: #fff; padding: 5px 14px; border-radius: 3px; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background 150ms; }
.nonspoiler-link-banner-link:hover { background: #1a5020; color: #fff; text-decoration: none; }

/* ===== SPOILER VERSION LINK BANNER (non-spoilerページ上部) ===== */
.spoiler-link-banner { background: #f0f4fc; border: 1px solid #ccd8f0; border-left: 3px solid #4a70c0; padding: 9px 14px; font-size: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spoiler-link-banner-text { color: #4a5878; flex: 1; line-height: 1.5; }
.spoiler-link-banner-link { display: inline-block; background: #c03030; color: #fff; padding: 5px 14px; border-radius: 3px; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background 150ms; }
.spoiler-link-banner-link:hover { background: #a02020; color: #fff; text-decoration: none; }

/* ===== REVIEW BODY TYPOGRAPHY ===== */
.review-lead { font-size: 15px; font-weight: 700; color: #1a2030; line-height: 1.65; margin-top: 0 !important; }
.review-body .review-sub { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8898b8; margin: 1.8em 0 0.5em; border-top: 1px solid #e0e6f4; padding-top: 0.8em; }
.review-body strong { color: #1a2030; font-weight: 700; }

/* ===== SCENE SUBHEAD (レビュー内シーン・セクション小見出し) ===== */
.scene-head { display: block; font-weight: 700; color: #3a5090; margin-top: 1.8em; margin-bottom: 0.25em; font-size: 13px; letter-spacing: 0.02em; }
.scene-head:first-child { margin-top: 0; }

/* ===== REVIEWER CARD GRID (cross-review top nav) ===== */
.reviewer-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.reviewer-card { display: flex; flex-direction: column; background: #f4f7fd; border: 1px solid #ccd8f0; padding: 12px; text-decoration: none; color: inherit; transition: background 0.15s, box-shadow 0.15s; }
.reviewer-card:hover { background: #eef1fa; box-shadow: 0 2px 8px rgba(0,0,60,0.07); }
.reviewer-card-chibi { width: 48px; height: 60px; border-radius: 50% 50% 44% 44%; margin-bottom: 8px; flex-shrink: 0; }
.reviewer-card-name { font-family: 'Noto Serif JP', serif; font-size: 15px; font-weight: 700; margin-bottom: 1px; }
.reviewer-card-role { font-size: 10px; color: #6878a8; margin-bottom: 6px; }
.reviewer-card-score { font-size: 18px; font-weight: 700; font-family: ui-monospace, monospace; margin-bottom: 6px; }
.reviewer-card-hook { font-size: 11px; color: #2a3050; line-height: 1.7; font-style: italic; }

/* ===== HEROINE COMPARISON TABLE ===== */
.heroine-comparison-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.heroine-comparison-table th { background: #1a2e5a; color: #d8e4f8; padding: 7px 10px; font-weight: 700; text-align: left; }
.heroine-comparison-table td { padding: 7px 10px; border-bottom: 1px solid #eef1f7; vertical-align: top; line-height: 1.7; }
.heroine-comparison-table tr:last-child td { border-bottom: none; }
.heroine-comparison-table tr:hover td { background: #f4f7fd; }
.htable-reviewer { font-weight: 700; white-space: nowrap; }
.htable-pick { white-space: nowrap; color: #1a3878; font-weight: 700; }

/* ===== PROGRESS BAR (reviewer tendency) ===== */
.tendency-list { list-style: none; padding: 12px 14px; }
.tendency-item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.tendency-item:last-child { margin-bottom: 0; }
.tendency-label { width: 9em; color: #6878a8; flex-shrink: 0; }
.tendency-bar-wrap { flex: 1; height: 8px; background: #dce8f8; border-radius: 4px; overflow: hidden; }
.tendency-bar { height: 100%; border-radius: 4px; background: #4a8fd4; transition: width 600ms ease; }
.tendency-val { width: 3em; text-align: right; font-weight: 700; color: #1a2e5a; }
