/* Neutral reading surfaces; faction hues remain on flags, headers and actions.
   These tokens deliberately take precedence over faction paper tints. */
:root {
  --paper: #e9edf5 !important;
  --light: #f8faf8 !important;
  --ink: #2f333b !important;
  --muted: #62666e !important;
  --line: #c3c7cf !important;
  --surface: #f8faf8;
  --surface-raised: #ffffff;
  --surface-inset: #e5e9f1;
}
:root[data-faction="free"] { --faction-banner: #3b3f47 !important; }
body {
  --ink: #2f333b;
  --muted: #62666e;
  color: var(--ink);
  background-color: #1e222a !important;
  background-image: radial-gradient(ellipse at 12% 0, #4e525a66, transparent 55%),
    linear-gradient(140deg, #2f333b, #181c24 72%) !important;
}
.site-wrap {
  background: linear-gradient(110deg, #e5e9f1, #eef2fa 52%, #e6eaf2);
  border-inline-color: #676b73;
  box-shadow: 0 0 70px #0e121a80;
}
.header { background: linear-gradient(115deg, #252931, var(--faction-banner, #3b3f47) 65%, #22262e); }
.header .brand strong { color: #f0f4fc; }
.header .brand small, .header .help-btn, .header .nav-btn { color: #dadee6; }
.hero h1 { color: #f3f7ff !important; }
.hero-copy > p, .hero .hero-quote { color: #e7ebf3 !important; }

/* Large cards and reading areas have a restrained, cool ivory finish. */
.birth-panel, .home-scenes, .path-card, .archive-card, .hall-card,
.hall-intro, .honor-summary, .ending, .conquest-sidebar {
  background: linear-gradient(135deg, #ffffff, #edf1f9);
  border-color: #aeb2ba;
  box-shadow: 0 5px 18px #2a2e360d, inset 0 1px 0 #fff;
}
.hall-card.podium { background: linear-gradient(135deg, #fff, #edf1f9); }
.home-scene-card, .birth-customization,
.annual-action-slot, .personal-choice-group, .life-progress-card,
.story-choice-group, .personal-story-promise, .story-actual-rewards,
.world-strip > div { background: var(--surface); border-color: var(--line); }
.setup-randomize, .historical-context, .talent-badge, .income-panel,
.campaign-requirements, .campaign-readiness, .conquest-pressure,
.allegiance-reputation, .career-management, .personal-story-panel,
.personal-story-result, .life-result, .mastery-entry, .hall-readonly,
.choice-experience, .annual-actions {
  background: var(--surface-inset); border-color: #b3b7bf; color: var(--ink);
}
.result-box { background: linear-gradient(135deg, #fff, #eaeef6) !important; }
.character-panel { background: linear-gradient(145deg, #fbfdfb, #e6eaf2); }
.portrait-setup, .portrait-option, .art-gallery figure,
.routine-choice-detail, .experience-mastery, .policy-rules,
.campaign-route-explanation, .unification-summary, .growth-outcome,
.world-result-entry, .world-detail .world-effect, .world-metrics > div,
.biography-judgment, .birth-family, .birth-table thead {
  background: var(--surface-inset); border-color: var(--line);
}
.secondary, .experience-grid article, .policy-panel, .policy-option,
.campaign-method, .unification-panel, .trait-card, .birth-innate {
  background: linear-gradient(135deg, #fcfdfb, #eaeef6);
  border-color: #afb3bb;
}
.ability-radar { background: radial-gradient(ellipse at 50% 40%, #f7fbf6, #dbe6dc); border-color: #a6b8a9; }
.stat-track { background: #ccd9cf; }
.choice-category-tabs { background: #e6eaf2 !important; }
.annual-actions { background: linear-gradient(125deg, #e1e5ed, #f0f4fc) !important; }
.story-choice-group .story-choice-memory,
.personal-story-records .story-choice-memory,
.personal-story-result .story-choice-memory { background: #e4e8f0; color: #4f535b; }
.choice-jump-nav { background: #e8ecf4; border-color: #a9adb5; box-shadow: 0 4px 14px #2c303818; }
.choice-jump-nav .choice-jump-button { background: var(--surface); color: var(--ink); border-color: #a7abb3; }
.choice-jump-count { background: #e2e6ee; color: #4e525a; }
.choice-category-tabs [role="tab"][aria-selected="true"] { background: var(--faction-banner, #3b3f47); color: #f2f6fe; }
.choices .choice[data-choice], .choices .routine-choice-card {
  background: var(--surface-raised); border-color: #a5a9b1;
  border-bottom-color: #7f838b; box-shadow: 0 2px 5px #2c303810;
}
.routine-choice-card > .choice { background: transparent; }
.choices .choice[data-choice]:disabled, .choice:disabled, .choice.disabled,
.routine-choice-card:has(> .choice:disabled), .policy-option > button:disabled {
  background: #e0e4ec; color: #5e626a; border-color: #b0b4bc;
}
.choices .choice[data-choice]:disabled .choice-num,
.choices .choice[data-choice]:disabled .choice-arrow { background: #d7dbe3; color: #5e626a; border-color: #b1b5bd; }
.action-slot-badge { background: #e6eaf2 !important; color: #4d5159 !important; border-color: #b1b5bd !important; }
.annual-action-slot.is-used { background: #e1e5ed; border-color: #93979f; }
.honor-badge { background: #f1f5fd; }
.footer { border-top-color: #aeb2ba; color: #5f636b; }
dialog { background: var(--surface); color: var(--ink); }
input, select, textarea { accent-color: #50545c; }
::selection { background: #c6cad2; color: #23272f; }
@media (max-width: 760px) {
  .site-wrap { background: linear-gradient(110deg, #e8ecf4, #eef2fa); }
}
/* Availability has its own palette; risk and faction color remain separate cues. */
:root {--choice-ready-bg:#eff3fb;--choice-ready-border:#6a6e76;--choice-ready-ink:#3e424a;--choice-locked-bg:#e5e7e6;--choice-locked-border:#999da5;--choice-locked-ink:#51555d;--choice-ready-chip:#dfe3eb;--choice-locked-chip:#d5d9e1;}
.choices .routine-choice-card:has(>.choice:not(:disabled)),.choices .choice[data-choice]:not(:disabled){background:var(--choice-ready-bg);border-color:var(--choice-ready-border);}
.choices .routine-choice-card:has(>.choice:not(:disabled)){border-left:4px solid var(--choice-ready-border);}
.choices .routine-choice-card:has(>.choice:disabled),.choices .choice[data-choice]:disabled{background:var(--choice-locked-bg);border-color:var(--choice-locked-border);box-shadow:none;opacity:1;}
.choices .routine-choice-card:has(>.choice:disabled){border-left:4px dashed var(--choice-locked-border);}
.choices .choice[data-choice]:disabled :is(.choice-title,.choice-description,.choice-requirement){color:var(--choice-locked-ink)!important;}
.choice-state-label{display:inline-flex;align-items:center;gap:4px;margin:4px 7px 4px 0;padding:2px 7px;border:1px solid var(--choice-ready-border);border-radius:4px;background:var(--choice-ready-chip);color:var(--choice-ready-ink);font:700 11px/1.5 var(--sans);vertical-align:middle;white-space:nowrap;}
.choice-state-label.is-locked{background:var(--choice-locked-chip);border-color:var(--choice-locked-border);color:var(--choice-locked-ink);}
