/* ==========================================================================
   Theme layer — clean, premium look (white surfaces, system type, one accent).
   Loaded last; overrides styles.css, opening.css and rules.css without
   changing any markup or script behaviour.
   ========================================================================== */
:root {
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #e5e5ea;
  --line-strong: #d2d2d7;
  --paper: #ffffff;
  --white: #ffffff;
  --cream: #f5f5f7;
  --tint: #f5f5f7;
  --accent: #c8372a;
  --accent-hover: #ad2d21;
  --accent-soft: #fdf0ee;
  --gold: var(--accent);
  --gold-light: var(--accent);
  --red: var(--accent);
  --good: #1f7a4d;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .09);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif: var(--display);
  --page: 1240px;
  --gutter: 40px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: .01em; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: .005em; line-height: 1.25; }
h3 { font-weight: 650; }
::selection { background: var(--accent-soft); color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(200, 55, 42, .35); outline-offset: 3px; border-radius: 8px; }
.small { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
main, .site-footer { max-width: var(--page); padding-left: var(--gutter); padding-right: var(--gutter); }
main { padding-top: 8px; }
#workspace, .panel { scroll-margin-top: 140px; }

/* ---------- Header: translucent, sticky ---------- */
.site-header { position: sticky; top: 0; z-index: 60; max-width: none; padding: 12px max(var(--gutter), calc((100vw - var(--page)) / 2 + var(--gutter))); background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0, 0, 0, .06); }
.brand { gap: 10px; font-size: 17px; letter-spacing: .02em; font-weight: 650; }
.brand-seal { width: 32px; height: 32px; border: 0; outline: 0; border-radius: 9px; background: var(--accent); color: #fff; font-family: var(--display); font-size: 17px; font-weight: 700; }
.brand-sub { display: inline; margin-left: 8px; font-size: 13px; letter-spacing: .02em; font-weight: 500; color: var(--muted); }
.brand > span:last-child { white-space: nowrap; }
.edition { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); background: var(--tint); padding: 6px 12px; border-radius: 980px; }
.edition-extra { color: var(--muted); font-weight: 500; }
.status-dot { background: #30d158; box-shadow: 0 0 0 3px rgba(48, 209, 88, .18); }
.quiet-button { font-size: 13px; color: var(--muted); border-radius: 980px; padding: 8px 14px; }
.quiet-button:hover { background: var(--tint); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%); color: var(--ink); border-radius: 28px; margin: 20px 0 0; min-height: 0; grid-template-columns: 1.05fr 1fr; align-items: center; border: 1px solid rgba(0, 0, 0, .04); }
.hero-copy { padding: 64px 24px 56px 56px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent); margin-bottom: 14px; text-transform: uppercase; }
.eyebrow > span { display: none; }
.eyebrow.dark { color: var(--accent); }
h1, .hero h1 { font-family: var(--display); font-size: clamp(40px, 5vw, 64px); line-height: 1.12; font-weight: 750; letter-spacing: .01em; margin-bottom: 20px; color: var(--ink); }
h1 span { color: var(--accent); }
.hero-intro { max-width: 470px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.hero-actions { gap: 12px; margin-top: 30px; }
.hero-facts { gap: 0; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 20px; max-width: 470px; }
.hero-facts > div { flex: 1; }
.hero-facts > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.hero-facts span { color: var(--faint); font-size: 12px; margin-bottom: 4px; }
.hero-facts strong { font-size: 15px; font-weight: 650; letter-spacing: 0; }
.showcase-card { padding: 48px 48px 40px 8px; }
.showcase-card > .eyebrow { display: none; }
.showcase-portraits { gap: 14px; }
.showcase-portrait { border: 0; border-radius: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); transform: translateY(14px); }
.showcase-portrait:nth-child(2) { transform: translateY(-14px); }
.showcase-portrait:nth-child(3) { transform: translateY(14px); }
.showcase-caption { color: var(--faint); font-size: 12px; letter-spacing: .04em; margin-top: 34px; }
.map-card { background: var(--white); border: 0; border-radius: 20px; box-shadow: var(--shadow-md); transform: none; }

/* ---------- Buttons ---------- */
.button { gap: 10px; min-height: 46px; padding: 12px 22px; border-radius: 980px; font-size: 15px; font-weight: 600; letter-spacing: .01em; transition: background-color .2s, box-shadow .2s, transform .2s, color .2s; }
.button:hover { filter: none; }
.button:active { transform: scale(.98); }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }
.light { background: var(--tint); border: 0; color: var(--ink); }
.light:hover { background: #e8e8ed; }
.hero .light { background: var(--white); color: var(--ink); border: 1px solid var(--line-strong); }
.hero .light:hover { background: #fafafa; }
.text-button { color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; padding: 10px 0; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Notice + nav ---------- */
.snapshot-note { margin: 18px 0 8px; padding: 12px 16px; background: var(--tint); border-radius: var(--radius-sm); font-size: 13px; color: var(--muted); align-items: center; }
.snapshot-note button { color: var(--accent); font-weight: 600; font-size: 13px; }
.note-mark { border: 0; background: var(--line-strong); color: var(--white); font-weight: 700; margin-top: 0; min-width: 18px; height: 18px; font-size: 11px; }
.workspace-nav { position: sticky; top: 57px; z-index: 50; margin: 24px 0 0; padding: 8px; gap: 4px; border: 1px solid rgba(0, 0, 0, .06); border-radius: 980px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-sm); scrollbar-width: none; justify-content: flex-start; }
.workspace-nav::-webkit-scrollbar { display: none; }
.workspace-nav button { font-size: 0; padding: 10px 18px; margin: 0; border: 0; border-radius: 980px; color: var(--muted); transition: background-color .2s, color .2s; }
.workspace-nav button span { font-size: 14.5px; margin: 0; color: inherit; font-weight: 550; }
.workspace-nav button:hover { background: var(--tint); color: var(--ink); }
.workspace-nav button[aria-current=page] { background: var(--ink); color: #fff; }
.workspace-nav button[aria-current=page] span { color: #fff; font-weight: 650; }

/* ---------- Panels ---------- */
.panel { padding: 56px 0 72px; }
.section-heading { margin-bottom: 32px; align-items: flex-end; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading > p { font-size: 14px; color: var(--muted); line-height: 1.7; }
.paper { background: var(--white); border: 1px solid #ececf0; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.paper > h3 { font-family: var(--display); font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.paper > .section-summary { color: var(--muted); font-size: 15px; border-bottom-color: var(--line); }
.guide-block h4 { font-size: 16px; }
.guide-block p, .guide-block li { font-size: 15px; }
.callout { border-left: 0; background: var(--tint); border-radius: var(--radius-sm); padding: 18px 20px; font-size: 14px; }
.callout.warning { background: var(--accent-soft); }
.callout h4 { margin-top: 0; }

/* ---------- Chips ---------- */
.section-chips { gap: 8px; margin-bottom: 20px; }
.section-chips button { font-size: 14px; font-weight: 550; background: var(--tint); color: var(--ink-soft); padding: 9px 16px; border-radius: 980px; transition: background-color .2s, color .2s; }
.section-chips button:hover { background: #e8e8ed; color: var(--ink); }
.section-chips button[aria-current=true] { background: var(--ink); color: #fff; }

/* ---------- Tables ---------- */
.table-scroll { border: 1px solid #ececf0; border-radius: 16px; background: var(--white); }
.guide-table { font-size: 14px; line-height: 1.6; }
.guide-table th { background: #fafafc; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.guide-table th, .guide-table td { padding: 14px 18px; border-bottom: 1px solid #f0f0f3; }
.guide-table tbody tr { transition: background-color .15s; }
.guide-table tbody tr:hover { background: #fafafc; }
.guide-table td:first-child { font-weight: 600; }

/* ---------- Forms ---------- */
.filters { gap: 14px; }
.filters label > span, .countdown-card label, .cost-limit-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.filters input[type=search], .filters select, .filters input[type=number], .filters input[type=datetime-local], .countdown-card select, .cost-limit-label input, .op-time-filters input[type=datetime-local] { height: 46px; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--ink); font-size: 14.5px; transition: border-color .2s, box-shadow .2s; }
.filters input:focus, .filters select:focus, .countdown-card select:focus, .cost-limit-label input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(200, 55, 42, .14); }
.check-filter, .owned-check { font-size: 13.5px; color: var(--ink-soft); }
.check-filter input, .owned-check input, .todo-item input, .stats-table input { accent-color: var(--accent); }
.results-heading { color: var(--muted); font-size: 13px; }
.catalog-options { margin: 14px 0; }

/* ---------- Cards (shared) ---------- */
.hero-card, .skill-card, .term-card, .review-card, .mechanic-card, .official-card, .roadmap-card, .review-branch, .op-card, .op-day, .rules-card, .gacha-quick-card, .op-lineup, .op-stat, .op-goal, .balanced-list > div, .todo-card, .countdown-card, .team-board, .rules-restraint {
  background: var(--white); border: 1px solid #ececf0; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.hero-card, .skill-card, .term-card, .review-card, .mechanic-card, .official-card { padding: 22px; transition: box-shadow .25s, transform .25s; }
.hero-card:hover, .skill-card:hover, .term-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hero-card.selected { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-sm); }
.hero-name, .skill-card h3, .term-card h3, .plan-unit h4, .review-card h3, .official-card h3, .gacha-highlight h3 { font-family: var(--display); font-weight: 700; }
.hero-subtitle, .hero-cost, .skill-card .skill-meta, .hero-stats dt { font-size: 12px; color: var(--muted); }
.hero-cost strong { font-family: var(--display); font-weight: 700; }
.hero-stats { border-top-color: var(--line); }
.hero-stats dd { font-size: 14px; font-weight: 600; }
.hero-skill { font-size: 13px; }
.rarity-row { color: #b07a1a; font-size: 13px; }
.hero-glyph { background: var(--tint); color: var(--ink-soft); font-family: var(--display); border-radius: 10px; }
.add-hero { background: var(--tint); color: var(--ink); border-radius: 980px; font-size: 13px; font-weight: 600; padding: 8px 14px; }
.add-hero:hover { background: #e8e8ed; }
.skill-link { color: var(--accent); border-bottom: 1px solid rgba(200, 55, 42, .3); font-weight: 550; }
.skill-link:hover { color: var(--accent-hover); border-color: var(--accent-hover); }
.skill-description { font-size: 14px; color: var(--ink-soft); }
.skill-facts { color: var(--muted); font-size: 12.5px; }
.warning-badge { background: var(--accent-soft); color: var(--accent); border-radius: 980px; font-size: 11.5px; padding: 3px 10px; font-weight: 600; }
.effect-scope { background: var(--tint); border-radius: 10px; font-size: 12px; padding: 10px 12px; }
.portrait { background: linear-gradient(135deg, #ececf0, #f5f5f7); }
.portrait.missing { background: linear-gradient(135deg, #f0f0f3, #f7f7f9); color: var(--faint); }
.catalog-portrait { border-radius: 14px; }
.slot-portrait, .plan-portrait, .rank-portrait, .mechanic-portrait { border-radius: 12px; }
.empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); font-size: 14px; background: #fcfcfd; }
.load-more-wrap .button { min-width: 180px; }

/* ---------- Guide sidebar ---------- */
.guide-layout { gap: 32px; grid-template-columns: minmax(0, 1fr) 300px; }
.field-sidebar { position: sticky; top: 136px; gap: 16px; }
.countdown-card { padding: 24px; }
.countdown-card .eyebrow { color: var(--accent); }
.countdown-value { font-family: var(--display); font-size: 26px; font-weight: 700; }
.todo-card { padding: 24px; }
.progress-track { height: 6px; background: var(--tint); border-radius: 980px; overflow: hidden; }
.progress-track > span { background: var(--accent); border-radius: 980px; }
.todo-item { font-size: 13.5px; border-bottom-color: #f0f0f3; padding: 11px 0; }
.todo-item input { width: 18px; height: 18px; }
.guide-links .button { min-height: 40px; padding: 9px 18px; font-size: 14px; }

/* ---------- Plans ---------- */
.strategy-intro { gap: 14px; }
.route-card, .intel-entry-grid button, .gacha-highlight, .plan-choice, .pool-choice, .review-goal { background: var(--white); color: var(--ink); border: 1px solid #ececf0; border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s, border-color .2s; }
.route-card:hover, .intel-entry-grid button:hover, .gacha-highlight:hover, .review-goal:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); background: var(--white); border-color: #ececf0; }
.route-card { padding: 22px; }
.route-card strong { font-size: 18px; font-weight: 700; }
.route-card span { font-size: 13.5px; color: var(--muted); }
.intel-entry-grid { gap: 14px; }
.intel-entry-grid button { padding: 22px; }
.intel-entry-grid span, .intel-entry-grid small { opacity: 1; color: var(--muted); font-size: 13px; }
.intel-entry-grid span { color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.intel-entry-grid strong { font-size: 18px; font-weight: 700; }
.term-shortcuts { font-size: 13px; }
.term-shortcuts button { border: 0; background: var(--tint); border-radius: 980px; padding: 7px 14px; font-weight: 550; }
.term-shortcuts button:hover { background: #e8e8ed; }
.budget-policy { background: var(--tint); border-left: 0; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-soft); padding: 14px 18px; }
.plan-layout { gap: 28px; grid-template-columns: 260px minmax(0, 1fr); }
.plan-list { gap: 10px; position: sticky; top: 136px; max-height: calc(100vh - 150px); overflow-y: auto; padding: 2px 4px 8px 2px; }
.plan-choice { padding: 16px 16px 16px 46px; }
.plan-choice:hover { box-shadow: var(--shadow-md); }
.plan-choice-index { color: var(--faint); font-weight: 600; font-size: 12px; top: 18px; left: 16px; }
.plan-choice strong { font-size: 14.5px; }
.plan-choice small { font-size: 12px; color: var(--muted); opacity: 1; }
.plan-choice[aria-current=true], .pool-choice[aria-current=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan-choice[aria-current=true] small, .plan-choice[aria-current=true] .plan-choice-index { color: rgba(255, 255, 255, .7); }
.plan-detail .plan-title { font-family: var(--display); font-weight: 750; font-size: 30px; }
.plan-tags span { background: var(--tint); border-radius: 980px; font-size: 12px; padding: 5px 11px; font-weight: 550; color: var(--ink-soft); }
.plan-lineup { gap: 18px; }
.plan-unit > .position { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .08em; }
.plan-unit .unit-role { font-size: 14px; }
.plan-skill-line { border-top-color: var(--line); font-size: 14px; }
.points-note { background: var(--tint); border-radius: 10px; padding: 9px 12px; font-size: 13px !important; color: var(--ink) !important; font-weight: 600; }
.readiness { background: var(--tint); border: 0; border-radius: var(--radius); padding: 20px 22px; }
.plan-notes h4 { font-size: 15px; font-weight: 700; }
.plan-notes ul { font-size: 14px; color: var(--ink-soft); line-height: 1.85; }
.plan-evidence a, .source-item a, .intel-notes > a, .official-card a, .review-official a, .highlight-action, #term-sources a, .pool-evidence a { color: var(--accent); }
.combat-grid { gap: 14px; }
.combat-card { background: var(--white); border: 1px solid #ececf0; border-left: 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 22px; }
.combat-card h4 { font-size: 16px; }
.combat-card p { font-size: 14px; }
.strategy-roadmap > h3, .strategy-roadmap .combat-heading { font-family: var(--display); font-weight: 700; font-size: 26px; }

/* ---------- Heroes / team board ---------- */
.team-board { padding: 26px; }
.team-slot { border: 1.5px dashed var(--line-strong); border-radius: 14px; background: #fcfcfd; }
.team-slot.filled { border-style: solid; border-color: #ececf0; background: var(--white); }
.team-slot .position { color: var(--accent); font-weight: 700; }
.cost-total strong { font-family: var(--display); font-weight: 750; }
.remove-hero { background: rgba(255, 255, 255, .9); color: var(--muted); box-shadow: var(--shadow-sm); }
.panel-shortcuts .button { min-height: 40px; padding: 9px 18px; font-size: 14px; }

/* ---------- Terms ---------- */
.term-primer h3, .rules-glossary-title { font-family: var(--display); font-weight: 700; }
.term-category { color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.term-meaning { font-size: 15px; }
.term-card dl { font-size: 13.5px; }
.cost-example > span { background: var(--tint); border-radius: 12px; }
.cost-example strong { font-family: var(--display); font-weight: 700; }
.cost-example > span.sum { background: var(--ink); color: #fff; }
.term-example { border-left-color: var(--accent); }
.formation-side b { background: #eef6f1; border-radius: 8px; }
.formation-side.enemy b { background: var(--accent-soft); }
.formation-divider, .range-examples strong { color: var(--accent); }
.term-references, .intel-notes { background: var(--tint); border-radius: var(--radius); }

/* ---------- Intel / gacha / stats ---------- */
.intel-scope { background: var(--tint); border-left: 0; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--ink-soft); padding: 16px 20px; }
.intel-summary strong, .calc-results strong, .stat-leader strong, .review-metrics span, .op-stat strong, .gacha-quick-card strong, .cost-total strong, .catalog-stats strong { font-family: var(--display); font-weight: 750; letter-spacing: 0; }
.gacha-highlight { border-top: 1px solid #ececf0; padding: 24px; }
.pool-choice { padding: 14px 16px; box-shadow: none; }
.pool-choice:hover { border-color: var(--line-strong); }
.prob-track { background: var(--tint); }
.prob-track > span { background: var(--accent); }
.calc-results > div, .pool-status > div, .review-metrics > div, .comparison-card { background: var(--tint); border-radius: 14px; }
.stat-leader { background: var(--white); color: var(--ink); border: 1px solid #ececf0; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-leader > small { color: var(--muted); }
.comparison-bar { background: #e8e8ed; }
.comparison-bar span { background: var(--accent); }
.pool-members span, .review-tags span { background: var(--tint); border: 0; border-radius: 980px; padding: 5px 11px; }
.pool-evidence code { background: var(--tint); border-radius: 10px; }
.intel-unknown { background: var(--accent-soft); border-radius: var(--radius-sm); }
.gacha-advanced, .gacha-supplement { border-radius: var(--radius); }
.review-goal[aria-current=true] { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.source-meta > span { background: var(--tint); border-radius: 980px; }
.probability-lab > h3, .compare-panel > h3, .mechanics-section > h3, .review-verdict > h3, #pool-detail > h3 { font-family: var(--display); font-weight: 700; }

/* ---------- Opening / rules panels ---------- */
.op-section > h3, .rules-section > h3, .gacha-quick-head h3 { font-family: var(--display); font-weight: 700; font-size: 24px; }
.op-card-tag, .op-goal-index, .op-day header span, .rules-tri-text .note, .op-tri-text .op-tri-note { color: var(--accent); fill: var(--accent); }
.op-card h4, .op-day header strong, .rules-card h4 { font-family: var(--display); font-weight: 700; }
.op-card p:last-child, .rules-card ul, .op-day li { font-size: 14px; }
.op-bar-track { background: var(--tint); }
.op-bar-fill { background: #c7c7cc; }
.op-bar-fill.is-key { background: var(--accent); }
.op-level { border: 1px solid var(--line-strong); border-radius: 980px; padding: 4px 12px; }
.op-level[aria-current=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.op-match { background: var(--tint); border-radius: 980px; padding: 3px 9px; }
.op-match.is-picked { background: var(--white); outline: 1.5px solid var(--ink); }
.op-match .good { color: var(--good); }
.op-match .bad { color: var(--accent); }
.op-troop { border-radius: 6px; }
.op-troop.t1 { background: #2f7d5b; }
.op-troop.t2 { background: #9a6b2f; }
.op-troop.t3 { background: var(--accent); }
.op-goal { box-shadow: none; }
.op-goal summary small { color: var(--muted); }
.rules-restraint { padding: 28px 32px; }
.rules-tri-nodes circle, .op-tri-nodes circle { fill: var(--white); stroke: var(--ink); }
.rules-tri-text text, .op-tri-text text { font-family: var(--display); font-weight: 700; }
.rules-big { font-family: var(--display); font-weight: 750; }
.rules-restraint-text .rules-big { font-size: clamp(26px, 3vw, 34px); letter-spacing: .04em; margin-bottom: 14px; }
.rules-restraint-text p { font-size: 15px; }
.gacha-advanced { background: var(--white); border-color: #ececf0; box-shadow: var(--shadow-sm); }
#gacha-summary { display: none; }
.gacha-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gacha-quick-card { padding: 20px 22px; }
.gacha-quick-card strong { font-size: 21px; line-height: 1.35; }
.gacha-source-line { font-size: 12.5px; color: var(--faint); margin-top: 18px; }

/* ---------- Footer, toast, dialog ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 32px; padding-bottom: 48px; font-size: 12.5px; }
.site-footer strong { font-family: var(--display); font-size: 15px; }
.site-footer > span { letter-spacing: .08em; color: var(--faint); font-size: 11px; }
.toast { background: rgba(29, 29, 31, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 980px; padding: 12px 22px; font-size: 14px; box-shadow: var(--shadow-md); }
dialog { border: 0; border-radius: 24px; padding: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.skip-link { background: var(--ink); border-radius: 0 0 12px 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  :root { --gutter: 28px; }
  .hero-copy { padding: 48px 16px 44px 40px; }
  .showcase-card { padding: 36px 32px 32px 0; }
  .guide-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .plan-layout { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .hero { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }
  .plan-list { max-height: none; overflow: visible; padding: 0; }
  .strategy-intro, .intel-entry-grid, .gacha-highlights, .gacha-quick-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px; scrollbar-width: none; }
  .strategy-intro::-webkit-scrollbar, .intel-entry-grid::-webkit-scrollbar, .gacha-highlights::-webkit-scrollbar, .gacha-quick-grid::-webkit-scrollbar { display: none; }
  .strategy-intro > *, .intel-entry-grid > *, .gacha-highlights > *, .gacha-quick-grid > * { flex: 0 0 78%; scroll-snap-align: start; }
  .route-card, .intel-entry-grid button { padding: 18px; }
  .strategy-intro { margin-bottom: 4px; }
  .route-card strong, .intel-entry-grid strong { font-size: 16px; }
  .site-header { padding: 10px var(--gutter); }
  .edition { padding: 5px 10px; font-size: 11px; }
  .quiet-button { font-size: 12px; padding: 6px 8px; max-width: none; }
  .hero { margin: 12px 0 0; border-radius: 22px; }
  .hero-copy { padding: 36px 24px 12px; }
  .hero h1, h1 { font-size: 40px; }
  .hero-intro { font-size: 16px; }
  .hero-facts { margin-top: 28px; }
  .hero-facts > div + div { padding-left: 14px; }
  .showcase-card { padding: 16px 24px 30px; }
  .workspace-nav { top: 53px; margin-top: 18px; border-radius: 16px; padding: 4px; }
  .workspace-nav button { padding: 8px 13px; }
  #workspace, .panel { scroll-margin-top: 112px; }
  .workspace-nav button span { font-size: 14px; }
  .panel { padding: 36px 0 52px; }
  .paper { padding: 22px; border-radius: 16px; }
  .field-sidebar, .plan-list { position: static; }
  .plan-list { gap: 8px; }
  .plan-choice { padding: 13px 12px 13px 36px; }
  .plan-choice-index { left: 12px; top: 15px; }
  .table-scroll { border-radius: 14px; }
  .guide-table th, .guide-table td { padding: 12px 14px; }
}
@media (max-width: 450px) {
  .brand-sub { display: none; }
  .hero h1, h1 { font-size: 34px; }
  .hero-copy { padding: 30px 20px 8px; }
  .hero-facts { flex-wrap: wrap; row-gap: 12px; }
  .button { font-size: 14px; padding: 11px 18px; }
  .paper { padding: 18px; }
  .table-scroll { margin: 0; }
  .guide-table th, .guide-table td { padding: 11px 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-card:hover, .skill-card:hover, .term-card:hover, .route-card:hover, .intel-entry-grid button:hover, .gacha-highlight:hover, .review-goal:hover { transform: none; }
}
