/* Layout: phone first, one column; on wide screens the inputs become a sticky ledger beside the reading column. */
:root {
  --bg: #eef2ef;
  --surface: #fafcfa;
  --surface-2: #e4ebe6;
  --ink: #14201b;
  --ink-2: #48564f;
  --ink-3: #6a7871;
  --line: #d3ddd7;
  --accent: #136f52;
  --accent-ink: #ffffff;
  --accent-soft: #d7ece2;
  --s1: #2a78d6;
  --s2: #eb6834;
  --good: #1d7a3a;
  --warn: #a86200;
  --bad: #c0352f;
  --f-display: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --f-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Noto Sans Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1311; --surface: #141c19; --surface-2: #1b2622; --ink: #e5ede9; --ink-2: #a9b8b0; --ink-3: #8a9992;
    --line: #283430; --accent: #3db487; --accent-ink: #06130d; --accent-soft: #17352a; --s1: #3987e5; --s2: #d95926;
    --good: #4cc070; --warn: #e3a23b; --bad: #ef6b63; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1311; --surface: #141c19; --surface-2: #1b2622; --ink: #e5ede9; --ink-2: #a9b8b0; --ink-3: #8a9992;
  --line: #283430; --accent: #3db487; --accent-ink: #06130d; --accent-soft: #17352a; --s1: #3987e5; --s2: #d95926;
  --good: #4cc070; --warn: #e3a23b; --bad: #ef6b63; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.6; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 20px 48px; }

header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
h1 { font-family: var(--f-display); font-weight: 900; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 .en { font-family: var(--f-body); font-size: .42em; font-weight: 500; color: var(--ink-2); letter-spacing: .04em; white-space: nowrap; }
.sub { color: var(--ink-2); margin: 4px 0 0; font-size: 13px; }
.switches { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); gap: 2px; }
.seg button { font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--ink-2); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 330px minmax(0, 1fr); grid-template-areas: "inputs headline" "inputs results"; align-items: start; gap: 20px 24px; }
  .inputs { grid-area: inputs; position: sticky; top: 72px; max-height: calc(100vh - 84px); overflow-y: auto; }
  #inputs-box > summary { display: none; }
  .headline { grid-area: headline; }
  .results { grid-area: results; }
}

.headline { background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; padding: 16px 18px; min-width: 0; }
.say { font-family: var(--f-display); font-weight: 900; font-size: clamp(21px, 4.6vw, 30px); line-height: 1.35; margin: 0; text-wrap: pretty; }
.say-note { color: var(--ink-2); margin: 6px 0 0; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 20px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tile { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile .k { font-size: 12px; color: var(--ink-2); }
.tile .v { font-family: var(--f-mono); font-size: 20px; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .n { font-size: 12px; color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 0 8px; border-radius: 999px; border: 1px solid currentColor; width: fit-content; }
.pill.good { color: var(--good); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--bad); }

.inputs { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; }
form { display: flex; flex-direction: column; gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; min-width: 0; }
fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 12px; }
legend { font-size: 12px; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; padding: 0; float: left; width: 100%; grid-column: 1 / -1; }
.f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
.f .lab { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 13px; color: var(--ink-2); min-height: 26px; }
.f .u { color: var(--ink-3); font-size: 11px; font-family: var(--f-mono); }
input[type=number], select { font: inherit; font-family: var(--f-mono); font-size: 16px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); min-width: 0; }
select { font-family: var(--f-body); }
input[type=number]:hover, select:hover { border-color: var(--ink-3); }
input:disabled { opacity: .65; }
.help { font: inherit; font-size: 12px; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--accent); cursor: pointer; line-height: 1; padding: 0; }
.help[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); grid-column: 1 / -1; }
.lcard { grid-column: 1 / -1; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--ink); }
.lcard p { margin: 0 0 6px; }
.lcard p:last-child { margin-bottom: 0; }
.lcard .imp { font-weight: 700; }
.lcard .ref { color: var(--ink-2); }
.estimate { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.estimate .fine { margin: 0; }
.notice { font-size: 13px; color: var(--warn); margin: 0; }
.derived { display: grid; gap: 2px; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); grid-column: 1 / -1; }
.derived div { display: flex; justify-content: space-between; gap: 8px; }
.derived b { font-family: var(--f-mono); color: var(--ink); font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; min-width: 0; }
h2 { font-family: var(--f-display); font-weight: 900; font-size: 19px; line-height: 1.3; margin: 0 0 2px; text-wrap: balance; }
.fine { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }

.lever-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lever { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; background: var(--bg); border-radius: 8px; }
.lever .lab { font-weight: 500; min-width: 0; }
.lever .gain { font-family: var(--f-mono); color: var(--accent); font-weight: 500; white-space: nowrap; }
.ghost { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.goal-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 8px; }

.solves { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 10px; margin-top: 10px; }
.solve { border-radius: 8px; padding: 10px 12px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.solve .q { font-size: 13px; color: var(--ink-2); }
.solve .v { font-family: var(--f-mono); font-size: 19px; font-weight: 500; overflow-wrap: anywhere; }
.solve .n { font-size: 12px; color: var(--ink-3); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin: 10px 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.band-wide { background: color-mix(in oklab, var(--s1) 18%, transparent); }
.band-mid { background: color-mix(in oklab, var(--s1) 36%, transparent); }
.line-mid { background: var(--s1); height: 3px; }
.line-target { height: 0; border-top: 2px dashed var(--s2); border-radius: 0; }
.chart-box { position: relative; width: 100%; }
#chart { width: 100%; height: 300px; display: block; touch-action: pan-y; }
#chart text { fill: var(--ink-2); font-family: var(--f-mono); font-size: 11px; }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 12px; box-shadow: 0 4px 16px rgb(0 0 0 / .12); min-width: 160px; font-variant-numeric: tabular-nums; }
.tip .r { display: flex; justify-content: space-between; gap: 14px; }
.tip .r b { font-family: var(--f-mono); font-weight: 500; }
.tip .h { font-weight: 700; margin-bottom: 2px; }

.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
td.num, th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.heat td { text-align: center; }
.heat td.base { outline: 2px solid var(--ink); outline-offset: -2px; }
details summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-top: 8px; }
#cards details { border-bottom: 1px solid var(--line); padding: 2px 0 8px; }
#cards details:last-child { border-bottom: 0; }
#cards h4 { font-size: 12px; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin: 14px 0 2px; }
#cards details.played > summary::after { content: " ✓ 已点亮"; font-size: 12px; color: var(--good); }
.lab-progress { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }
#cards .lcard { margin-top: 6px; }
a { color: var(--accent); }
footer { margin-top: 24px; font-size: 12px; color: var(--ink-3); }
footer p { margin: 0 0 4px; }

.share-row { margin-top: 12px; }
.primary { font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.share { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.share img { width: 100%; max-width: 360px; border-radius: 8px; border: 1px solid var(--line); -webkit-touch-callout: default; }
.share .fine { margin: 0; }
#share-hint.emph { color: var(--accent); font-weight: 700; font-size: 15px; }
body.intro .headline, body.intro .results, body.intro #sticky-bar { display: none; }
body.intro #inputs-box > summary { display: none; }
.start-intro h2 { margin: 0 0 4px; }
.start-row:has(#start-calc[hidden]) { display: none; }

.doc main { max-width: 760px; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.doc h2 { margin-top: 14px; }
.doc p, .doc li { margin: 0 0 6px; }
.doc .tbl { margin-bottom: 4px; }
.formula { font-family: var(--f-mono); font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow-x: auto; }
.notes { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13px; }

textarea { font-family: var(--f-mono); font-size: 13px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); margin-top: 8px; }
.deck-row { display: flex; gap: 10px; overflow-x: auto; margin-top: 8px; }
.deck-row img { width: 180px; flex: none; border-radius: 6px; border: 1px solid var(--line); display: block; }
.bundle { font-family: var(--f-mono); font-size: 12px; background: var(--bg); padding: 10px; border-radius: 6px; overflow: auto; max-height: 320px; margin: 8px 0 0; }
.doc-wide .results { margin-top: 16px; }

.type-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.type-emoji { font-size: 40px; line-height: 1; flex: none; }
.type-title { min-width: 0; }
.type-code { font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.type-name { font-family: var(--f-display); font-weight: 900; font-size: 28px; line-height: 1.2; }
.type-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.type-tags .pill { color: var(--accent); }
.type-en { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.type-blurb, .why, .next { margin: 6px 0 0; }
.why { font-size: 13px; color: var(--ink-2); }
.next { font-size: 13px; font-weight: 700; }
.axes { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.axis { display: grid; grid-template-columns: 48px auto minmax(0, 1fr); align-items: center; gap: 8px; font-size: 13px; }
.axis-name { color: var(--ink-2); }
.poles { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.pole { padding: 1px 8px; border-radius: 999px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.pole.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.axis-value { font-size: 12px; color: var(--ink-2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
h3 { font-family: var(--f-display); font-weight: 900; font-size: 16px; margin: 16px 0 4px; }
.type-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.type-list li { margin-bottom: 4px; }
.type-list b { color: var(--ink); }
.type-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 700px) { .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type-cell { display: flex; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.type-cell .type-emoji { font-size: 24px; }
.type-cell p { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.type-cell.mine { border: 2px solid var(--accent); padding: 7px 9px; }
.share-slot:empty { display: none; }

.quiz-count { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); font-family: var(--f-mono); }
.quiz-q { margin: 2px 0 8px; font-weight: 700; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.quiz-option { font: inherit; padding: 14px 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--bg); color: var(--ink); cursor: pointer; font-weight: 500; text-align: center; }
.quiz-reveal { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.quiz-reveal .primary { align-self: flex-start; margin-top: 4px; }
.quiz-verdict { margin: 0; font-weight: 700; color: var(--accent); }
.quiz-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 8px 12px; background: var(--bg); border-radius: 8px; }
.quiz-row b { font-family: var(--f-mono); font-weight: 500; white-space: nowrap; }
.quiz-mine { margin-left: 6px; font-size: 12px; color: var(--accent); }
.quiz-insight { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.quiz-done { margin-top: 10px; }
.quiz-done p { margin: 2px 0 0; }
.quiz-score { font-family: var(--f-display); font-weight: 900; font-size: 44px; line-height: 1.1; color: var(--accent); }
.try { margin: 6px 0 8px; display: flex; flex-direction: column; gap: 4px; }
.try-lab { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.try input[type=range] { width: 100%; accent-color: var(--accent); margin: 4px 0; height: 28px; }
.try output { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lever .gain { white-space: normal; }

#places { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.place-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.place-name { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.place .pill { color: var(--accent); }
.place-age { font-family: var(--f-mono); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.place-bar { height: 6px; margin-top: 3px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.place-bar i { display: block; height: 100%; background: color-mix(in oklab, var(--s1) 55%, var(--surface)); border-radius: 4px; }
.place.current .place-bar i { background: var(--s1); }
.place-note { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.life-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin: 10px 0 2px; }
.life-legend span { display: inline-flex; align-items: center; gap: 6px; }
.life-legend .sw { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.sw.r-work { background: color-mix(in oklab, var(--ink-3) 45%, var(--surface)); }
.sw.r-holiday { background: var(--good); }
.sw.r-broke { background: var(--bad); }
.sw.r-bad { background: var(--ink); height: 3px; }
.lives { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.life { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); cursor: pointer; }
.life[aria-pressed="true"] { border: 2px solid var(--s1); padding: 7px 9px; }
.life.fifth { background: color-mix(in oklab, var(--s2) 8%, var(--bg)); }
.life.fifth[aria-pressed="true"] { border-color: var(--s2); }
.life-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
.life-name { font-family: var(--f-display); font-weight: 900; font-size: 17px; }
.life-end { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.life-sub { font-size: 12px; color: var(--ink-3); }
.life-tag { margin-left: 6px; font-size: 11px; vertical-align: 2px; }
.life-sub b { font-family: var(--f-mono); font-weight: 700; color: var(--ink-2); }
.life-sub b.good { color: var(--good); } .life-sub b.bad { color: var(--bad); }
.life-empty { padding: 10px 12px; border: 1px dashed var(--s2); border-radius: 8px; font-size: 13px; color: var(--ink-2); }
.life-empty b { font-family: var(--f-display); font-size: 17px; color: var(--ink); margin-right: 8px; }
.ribbon { width: 100%; height: 22px; display: block; }
.ribbon .r-work { fill: color-mix(in oklab, var(--ink-3) 45%, var(--surface)); }
.line-fifth { background: var(--s2); height: 3px; }
.line-other { background: var(--ink-3); opacity: .5; height: 2px; }
.dot-retire { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); }
.ribbon .r-holiday { fill: var(--good); }
.ribbon .r-broke { fill: var(--bad); }
.ribbon .r-bad { fill: var(--ink); }
.life-changes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
#lives-chart { width: 100%; height: 240px; display: block; touch-action: pan-y; margin-top: 8px; }
#lives-chart text { fill: var(--ink-2); font-family: var(--f-mono); font-size: 11px; }
.fifth-compare { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: color-mix(in oklab, var(--s2) 10%, var(--bg)); font-size: 14px; font-weight: 700; }
.quiz-written { margin: 0; font-size: 12px; color: var(--ink-3); }

.hero { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.hero-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-family: var(--f-display); font-weight: 900; font-size: clamp(20px, 5vw, 26px); }
.hero-big b { font-size: 1.6em; }
.hero-work b { color: var(--ink-2); }
.hero-rest b { color: var(--good); }
.hero-arrow { color: var(--ink-3); }
.lifebar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; gap: 2px; margin-top: 4px; background: var(--surface-2); }
.lifebar i { display: block; height: 100%; }
.lifebar .work { background: var(--ink-3); }
.lifebar .rest { background: var(--good); }
.lifebar-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); gap: 8px; }
.hero-mondays { margin: 6px 0 0; font-size: 14px; }
.hero-mondays b { font-family: var(--f-mono); font-weight: 700; font-size: 20px; }
.people { margin-top: 8px; }
.people p { margin: 2px 0 0; font-size: 14px; }
.people-row { display: flex; gap: 3px; max-width: 320px; }
.person { flex: 1 1 0; min-width: 0; height: 34px; fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1; }
.person.on { fill: var(--accent); stroke: var(--accent); }
.fund { margin-top: 8px; }
.fund p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.fund p b { color: var(--ink); }
.fund-bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.fund-bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.story-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.story-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.story-list b { font-family: var(--f-mono); font-weight: 500; color: var(--accent); white-space: nowrap; }

.sticky { position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: 6px 16px; background: var(--bg); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; }
.sticky-result { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.sticky-age { font-family: var(--f-display); font-weight: 900; font-size: 19px; color: var(--accent); white-space: nowrap; }
.sticky-bar-mini { display: inline-block; width: 72px; height: 8px; border-radius: 4px; background: var(--good); overflow: hidden; flex: none; }
.sticky-bar-mini i { display: block; height: 100%; background: var(--ink-3); }
.sticky-more { display: none; }
@media (min-width: 700px) { .sticky-more { display: inline; } }
.zone-nav { display: flex; gap: 2px 12px; font-size: 13px; overflow-x: auto; white-space: nowrap; max-width: 100%; }
.zone-nav a { text-decoration: none; padding: 2px 0; }

.results { gap: 28px; }
.zone { display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-margin-top: 84px; }
#share-section { scroll-margin-top: 84px; }
.zone-title { font-size: 24px; margin: 0; }
.zone-lead { margin: -6px 0 2px; font-size: 15px; font-weight: 700; color: var(--accent); }
.zone-lead:empty { display: none; }
.zone-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.zone-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 16px; align-items: start; }
@media (min-width: 1100px) { .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.headline { padding: 18px 20px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 28px; margin-top: 12px; }
.hero-grid .hero { margin-top: 0; }
@media (min-width: 1100px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } .type-block { border-left: 1px solid var(--line); padding-left: 24px; } }
.type-block h2 { font-size: 13px; font-family: var(--f-body); font-weight: 500; color: var(--ink-2); margin: 0; }
.type-block .type-head { margin-top: 4px; }
.lab-title { margin-top: 10px; }
.places-more { margin-top: 2px; }
.places-more > .place { margin-top: 10px; }
.pro-lock-note { margin: 8px 0 0; font-weight: 700; color: var(--accent); }
#inputs-box > summary { font-weight: 700; color: var(--accent); margin: 0 0 8px; }
#share-img { margin-top: 4px; }
.sens-note { display: block; font-size: 12px; color: var(--ink-3); }

#lives-chart { height: 300px; }
#lives-chart .zone-label { fill: var(--ink-2); font-family: var(--f-body); font-size: 12px; }
#lives-chart .zone-label.on { fill: var(--good); font-weight: 700; }
.sw.line-compare { height: 0; border-top: 2px dashed var(--ink-2); border-radius: 0; background: none; }
.legend .sw.r-work { background: var(--ink-3); }
.legend .sw.r-holiday { background: var(--good); }
.legend .sw.r-broke { background: var(--bad); }
.legend .sw.r-bad { background: var(--ink); height: 3px; }
.ribbon .r-work { fill: var(--ink-3); }
.lives { margin-top: 12px; }

.scn-options { display: flex; flex-direction: column; gap: 6px; }
.scn-option { font: inherit; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); cursor: pointer; }
.scn-option[aria-pressed="true"] { border: 2px solid var(--s2); padding: 9px 11px; font-weight: 700; }
.scn-reveal { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; align-items: flex-start; }
.scn-reveal p { margin: 0; }
.scn-effect { font-weight: 700; color: var(--ink); padding: 8px 12px; border-radius: 8px; background: color-mix(in oklab, var(--s2) 10%, var(--bg)); align-self: stretch; }
.scn-insight { font-size: 14px; }
.scn-what { font-size: 13px; color: var(--ink-2); }
.scn-ref { font-size: 12px; color: var(--ink-3); }
.scn-done { margin: 10px 0 6px; font-weight: 700; }
.scn-summary { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.scn-summary li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 10px; background: var(--bg); border-radius: 6px; }
.scn-summary li:has(.scn-goto) { padding: 0; }
.scn-goto { all: unset; box-sizing: border-box; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; width: 100%; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.scn-goto:hover b, .scn-goto:focus-visible b { text-decoration: underline; }
.scn-goto:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.crowd-share { flex-basis: 100%; text-align: right; font-size: 12px; color: var(--accent); }
.crowd { margin-top: 10px; }
.scn-summary b { font-weight: 500; }
.views-banner { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.views-banner:empty { display: none; }
