/* Neutral charcoal surfaces. Lime marks the primary action and selection. */
:root {
  color-scheme: dark;
  --paper: #171719;
  --paper-light: #252527;
  --panel: #252527;
  --raised: #303033;
  --ink: #f4f4f2;
  --muted: #b9b9c2;
  --line: #49494f;
  --border: #49494f;
  --accent: #c4ff00;
  --moss: #c4ff00;
  --moss-dark: #d6ff59;
  --ochre: #e1c885;
  --rust: #ffa793;
  background: var(--paper);
  color: var(--ink);
}
body { background: var(--paper); color: var(--ink); }
.site-header, .dialog-heading, .ending-facts, .ending-copy blockquote { border-color: var(--border); }
.brand>svg, .intro-copy h1 span, .tiny-leaf { color: var(--accent); }
.brand small, .eyebrow, .intro-description, .intro-description.small, .caption, .muted, .latin,
.identity-facts dt, .life-heading .eyebrow, .age-stamp span, .status-title>span,
.birth-details>span, .mobile-origin summary, .event-label, .scene-bottomline>span:last-child,
.relation-row strong, .relation-row span, .companion-card small, .focus-description,
.library-search, .species-metrics dt, .reproduction-facts dt, .evidence-scope,
.habitat-row small, .evidence-details p, .evidence-details li, .library-probability small,
.library-probability-note, .birth-category label, .library-filter-summary,
.library-empty, .habitat-probability small, .birth-probability, .birth-probability small,
.roulette-phase, .roulette-place, .roulette-note, .life-utility, .auto-label,
.life-card-content>p, .ending-share p, .source-item, .species-source-item,
.dialog-content p, .dialog-content details, .restart-dialog p { color: var(--muted); }
.identity-facts dd, .status-panel .stat-heading, .status-panel .stat-value,
.event-panel h2, .birth-certificate h2, .focus-section h2, .section-heading h2,
.companion-card strong, .memory-title, .memory-list .is-important p,
.ending-story, .ending-facts, .ending-facts strong, .ending-copy blockquote,
.roulette-screen h2, .status-title h2 { color: var(--ink); }
.event-panel p, .birth-certificate>p, .memory-list p { color: #d4d4da; }

.button.primary, .focus-pill[aria-pressed=true], .category-tab[aria-pressed=true],
.next-button.has-choice {
  background: var(--accent); border-color: var(--accent); color: #171719; box-shadow: none;
}
.button.primary:hover, .focus-pill[aria-pressed=true]:hover,
.category-tab[aria-pressed=true]:hover { background: #d6ff59; border-color: #d6ff59; }
.button.secondary, .focus-pill, .category-tab, .choice-button,
.birth-category select, .library-search input, .playbar select {
  background: var(--panel); border-color: var(--border); color: var(--ink);
}
.button.secondary:hover, .focus-pill:hover, .category-tab:hover,
.choice-button:hover, .choice-button:focus-visible, .library-card:hover {
  background: var(--raised); border-color: var(--accent); color: var(--ink);
}
.choice-button:active { background: #39393c; }
.button:disabled { background: #303033; border-color: var(--border); color: #a9a9b2; }
.text-button, .icon-button { color: var(--ink); text-decoration-color: #7c7c87; }
.text-button:hover { color: var(--accent); background: var(--raised); }
.library-detail a, .source-item a, .dialog-content a { color: #d3f787; }
.button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible,
summary:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #171719; }

.identity-card, .status-panel, .focus-section, .event-panel, .companions-section,
.relations-section, .memories-section, .birth-certificate, .library-card,
.species-metrics>div, .info-dialog, .restart-dialog, .life-card-dialog,
.life-card-actions, .ending-share, .scene-bottomline {
  background: var(--panel); border-color: var(--border); color: var(--ink); box-shadow: none;
}
.identity-card { border-top-color: var(--accent); }
.habitat-scene { background: var(--panel); border-color: var(--border); }
.scene-topline b { background: #171719d9; color: var(--ink); }
.companion-card { background: transparent; border-color: var(--border); }
.companion-card.ended { opacity: .8; }
.library-card small { color: var(--muted); }
.library-card { transition: border-color .15s, background .15s; }
.species-metrics>div, .evidence-details, .habitat-row, .library-probability,
.birth-details>span, .life-card-preview, .life-card-actions,
.life-card-dialog .dialog-heading { border-color: var(--border); }
.reference-fact, .model-notice, .lifespan-info, .birth-human {
  background: #303033; border-color: #878f6e; color: var(--ink);
}
.birth-human { color: #d4d4da!important; }
.lifespan-info small, .path-preview { color: #d4d4da; }
.relation-row { border-left-color: var(--border); }
.readiness-label { color: #ded1aa; border-color: #6f6651; }
.library-probability b, .habitat-probability b, .birth-probability strong { color: var(--accent); }
.overall-probability { color: var(--muted)!important; }
.habitat-probability { color: #e1c885; }

.stat-energy { --stat-color: #e6c66c; }
.stat-health { --stat-color: #b7dd77; }
.stat-skill { --stat-color: #8fc7f4; }
.stat-safety { --stat-color: #e49abf; }
.status-panel .stat-track, .time-track, .roulette-track { background: #414147; }
.status-panel .stat-fill { filter: none; }
.stat-change.positive { color: #c1ed93; }
.stat-change.negative, .stat-low .stat-value { color: #ffa793; }
.choice-number { background: #42443b; color: #e4f4c5; }
.memory-delta span { background: #39402f; color: #d2edac; }
.memory-delta .negative { background: #4a3436; color: #ffc1b3; }
.memory-list .memory-age { color: #c8c8ce; }
.memory-list li:before { background: #84848e; }
.memory-list li.is-important:before { background: var(--accent); }
.playbar { background: #1d1d20f7; border-color: var(--border); }
.auto-label input { accent-color: var(--accent); }
.time-track span, .roulette-track span { background: var(--accent); }
.toast, .skip-link { background: var(--raised); color: var(--ink); border-color: var(--border); }
dialog::backdrop { background: #09090bdd; }
.roulette-stage { background: radial-gradient(ellipse at center,#33343a 0,transparent 67%); }
.intro-art { background: transparent; }
.ending-art { background: var(--panel); }
.intro-screen { padding-bottom: 28px; }
.intro-copy .birth-category { margin-bottom: 16px; }
.ending-share h2 { margin: 0; }

/* Effects are part of each action, including on phones. No disclosure required. */
.focus-heading { min-height: 0; margin: 0 0 12px; }
.focus-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.focus-pill { padding: 10px; min-height: 66px; border-radius: 7px; text-align: left; }
.focus-pill strong { font-size: 12px; line-height: 1.4; }
.focus-pill small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 5px; }
.focus-pill[aria-pressed=true] small { color: #30391c; }
.focus-description { margin: 12px 0 0; font-size: 12px; line-height: 1.65; }
@media(max-width:759px) {
  .focus-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .focus-section { padding: 12px; }
  .focus-pill { min-height: 65px; padding: 9px; }
  .focus-pill strong { font-size: 12px; letter-spacing: 0; }
  .focus-pill small { display: block; font-size: 11px; }
  .status-panel .stat-change { background: var(--panel); }
}

/* OPS026: a newly offered manual choice is neutral until fresh direct input. */
#choiceDialog[data-choice-neutral="true"] .choice-button,
#choiceDialog[data-choice-neutral="true"] .choice-button:hover,
#choiceDialog[data-choice-neutral="true"] .choice-button:active,
#choiceDialog[data-choice-neutral="true"] .choice-button:focus-visible {
  background:var(--panel);border-color:var(--border);color:var(--ink);transform:none;box-shadow:none;
}
/* The global :focus-visible outline remains available to keyboard users. */

#introScreen #introArt{align-self:start}

:is(main,dialog) :is(h1,h2,h3)[tabindex="-1"]:focus{outline:none}
