@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600&family=Noto+Sans+SC:wght@400;600&family=Noto+Sans+JP:wght@400;600&family=Noto+Sans+KR:wght@400;600&display=swap');
:lang(th){font-family:Prompt,'Noto Sans Thai',sans-serif;line-height:1.7}:lang(zh-CN){font-family:'Noto Sans SC','PingFang SC',sans-serif;line-height:1.6}:lang(ja){font-family:'Noto Sans JP','Hiragino Kaku Gothic ProN',sans-serif;line-height:1.6}:lang(ko){font-family:'Noto Sans KR','Apple SD Gothic Neo',sans-serif;line-height:1.6;word-break:keep-all}html[data-text-size=large]{--reading-scale:1.2}html[data-text-size=extra]{--reading-scale:1.4}html{--reading-scale:1}body{font-size:calc(16px * var(--reading-scale))}button,select,input{font:inherit}#narrative,.allocation-row>span,.primary,.profile-field select,.manual p{font-size:calc(16px * var(--reading-scale))}.hint,.fine,.allocation-help,.allocation-heading,.tabs button,.section-line,.world-bottom p,.world-bottom button,.speeds button,header button,#shape-comparison summary,.profile-field>label,.graphs figcaption,.method p{font-size:calc(12px * var(--reading-scale))}.allocation-row{grid-template-columns:minmax(8ch,10ch) 32px 2ch 32px}.allocation-heading{max-width:100%;flex-wrap:wrap;gap:4px 12px}#settings-dialog{color:var(--ink);background:var(--paper);border:2px solid var(--ink);padding:20px;max-width:min(90vw,380px);max-height:90dvh;overflow:auto;width:auto;margin:auto}#settings-dialog::backdrop{background:rgb(25 46 44 / .45)}#settings-dialog form{display:grid;gap:8px}#settings-dialog .settings-head{display:flex;align-items:baseline;gap:32px;justify-content:space-between;margin-bottom:12px}#settings-dialog h2{font-size:24px;margin:0}#settings-dialog label{font-size:inherit}#settings-dialog select{width:max-content;max-width:100%;font-size:inherit;border:0;border-bottom:1px solid var(--muted);background:transparent;padding:6px 20px 6px 0;margin-bottom:12px}#settings-dialog .motion-setting{display:flex;gap:8px;align-items:center}#settings-dialog input{accent-color:#a35d00;width:18px;height:18px}#settings-dialog button{font-size:inherit;border:0;border-bottom:1px solid var(--ink);background:none;padding:4px 0;cursor:pointer}#settings-dialog :focus-visible{outline:3px solid #a35d00;outline-offset:3px}svg text{font-family:inherit}.shape-key [hidden]{display:none}.event-list{display:flex;gap:6px 18px;flex-wrap:wrap;margin:8px 0;padding:0;list-style:none}.event-list button{display:flex;gap:6px;align-items:center;font-size:calc(12px * var(--reading-scale));padding:4px 0;text-decoration:underline;text-underline-offset:3px}.event-list svg{width:16px;height:16px;flex:none}#event-detail{font-size:calc(12px * var(--reading-scale));max-width:65ch;margin:8px 0}#mood-note{font-size:calc(12px * var(--reading-scale));margin:0 0 8px}#mood-note span{font-weight:600}.event-guide{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:12px}.event-guide span{display:flex;gap:6px;align-items:center}.event-guide svg{width:18px;height:18px}@media(max-width:720px){html[data-text-size=extra] .world-head{flex-wrap:wrap}html[data-text-size=extra] .world-head>div:first-child{flex-wrap:wrap}html[data-text-size=extra] .graphs figure{grid-template-columns:1fr}html[data-text-size=extra] .allocation-row{grid-template-columns:minmax(6ch,9ch) 32px 2ch 32px}.shape-key{min-width:0}.method summary{line-height:1.6}header>div{flex-wrap:wrap}}

[tabindex]:focus-visible{outline:3px solid #a35d00;outline-offset:3px}:lang(th) .allocation-row,:lang(zh-CN) .allocation-row,:lang(ja) .allocation-row,:lang(ko) .allocation-row{grid-template-columns:minmax(8ch,12ch) 32px 2ch 32px}:lang(th) .allocation-row>span,:lang(zh-CN) .allocation-row>span,:lang(ja) .allocation-row>span,:lang(ko) .allocation-row>span{line-height:1.6;overflow-wrap:anywhere}@media(max-width:720px){:lang(ja) .world-head span,:lang(zh-CN) .world-head span,:lang(ko) .world-head span{max-width:18ch}.world-head>div:first-child{min-width:0}}
h1{font-size:calc(32px * var(--reading-scale))}h2,.world-head strong{font-size:calc(24px * var(--reading-scale))}.graphs figcaption strong{font-size:calc(24px * var(--reading-scale))}.allocation-row output{font-size:calc(16px * var(--reading-scale))}#radar text,#shape-comparison #radar text{font-size:calc(18px * var(--reading-scale))}.graphs svg text{font-size:calc(12px * var(--reading-scale))}@media(max-width:720px){h1{font-size:calc(24px * var(--reading-scale))}.graphs svg text{font-size:calc(20px * var(--reading-scale))}}.manual .instruction h2,.manual .manual-controls h2{font-size:calc(24px * var(--reading-scale))}.manual .instruction p,.manual .manual-controls p{font-size:calc(16px * var(--reading-scale))}
.reference{display:block;color:var(--muted);font-size:calc(12px * var(--reading-scale));grid-column:1/-1}.graphs figcaption{display:grid;grid-template-columns:1fr auto;gap:2px 8px}.graphs figcaption .reference{text-align:right}#self-record{margin-top:16px;max-width:880px}#self-record summary{font-size:calc(16px * var(--reading-scale));cursor:pointer;padding:6px 0;text-decoration:underline;text-underline-offset:4px}#self-record h3{font-size:16px;margin:16px 0 4px}.capacity-row{display:grid;grid-template-columns:minmax(16ch,1fr) 7ch minmax(100px,160px);align-items:center;gap:12px;margin:4px 0}.capacity-row>span,.capacity-row strong,.trait-row{font-size:calc(12px * var(--reading-scale))}.capacity-row svg{width:100%;height:44px}.capacity-row strong{font-variant-numeric:tabular-nums}.trait-row{display:grid;grid-template-columns:minmax(16ch,1fr) minmax(90px,160px) 3ch;gap:12px;align-items:center;margin:10px 0}.trait-track{height:8px;background:#d8d7c9;position:relative}.trait-track>span{display:block;height:8px;background:#52635b}.trait-track>i{position:absolute;top:-4px;bottom:-4px;width:2px;background:#a35d00}.trait-row output{text-align:right}@media(max-width:720px){.graphs figcaption{display:block}.graphs figcaption .reference{text-align:left}.capacity-row{grid-template-columns:minmax(0,1fr) 7ch minmax(66px,90px);gap:8px}.trait-row{grid-template-columns:minmax(0,1fr) minmax(70px,100px) 3ch;gap:8px}}
/* Values and their histories form one reading unit, not distant columns. */
.resources>.section-line{justify-content:flex-start;gap:16px;flex-wrap:wrap}.resources>.section-line>span{font-size:12px}.resources #mood-note{margin:4px 0 8px;font-size:14px}.comparison-note{font-size:12px;margin:0 0 12px}.comparison-note summary{cursor:pointer;width:max-content;text-decoration:underline;text-underline-offset:3px}.comparison-note p{max-width:65ch}.graphs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:8px}.graphs figure{display:grid;grid-template-columns:minmax(110px,140px) minmax(0,220px);gap:12px;align-items:center}.graphs figcaption{display:block;font-size:calc(16px * var(--reading-scale))}.graphs figcaption strong{display:block;font-size:calc(24px * var(--reading-scale));line-height:1.3;margin:4px 0}.graphs figcaption .reference{text-align:left;font-size:calc(12px * var(--reading-scale));line-height:1.4}.graphs svg{width:100%;max-height:100px}.graphs svg text{font-size:calc(20px * var(--reading-scale))}.event-list{margin-top:12px}#event-detail{margin-bottom:12px}@media(max-width:1100px){.graphs{grid-template-columns:1fr;gap:14px;max-width:650px}.graphs figure{grid-template-columns:minmax(120px,180px) minmax(0,360px);gap:16px}.graphs svg{max-height:114px}.resources .section-line>span{max-width:none;text-align:left}}@media(max-width:720px){.graphs{gap:16px}.graphs figure{grid-template-columns:minmax(112px,.85fr) minmax(0,1.15fr);gap:12px}.resources .section-line h2{font-size:24px}.resources>.section-line>span{font-size:12px}.graphs figcaption{font-size:16px}.graphs figcaption strong{font-size:24px}.graphs svg{max-height:100px}html[data-text-size=extra] .graphs figure{grid-template-columns:1fr}.graphs .reference{max-width:22ch}}

/* Geometry identifies the editor; the value remains unboxed. */
.allocation-row button[data-point$=":-1"]{border:1px solid #b4b9a9;border-radius:50%}.allocation-row button[data-point$=":1"]{border:1px solid #b4b9a9;border-radius:0}.allocation-row button:not(:disabled):hover{border-color:#a35d00;background:#e3ddcc}

/* The decision takes a readable measure; the inhabited world earns the rest. */
@media(min-width:1101px){main{grid-template-columns:minmax(0,1fr) 340px}.decision{padding:20px}.stage canvas{max-height:540px;object-fit:cover}.birth-stage .stage canvas{max-height:none}.graphs{grid-template-columns:repeat(3,max-content);justify-content:start;gap:clamp(24px,4vw,60px)}.graphs figure{grid-template-columns:140px 220px}.graphs.sparse figure{grid-template-columns:140px 150px}}
@media(min-width:721px) and (max-width:1100px){main{grid-template-columns:minmax(0,1fr) 310px}}
@media(min-width:1101px) and (max-width:1279px){.graphs:not(.sparse){grid-template-columns:1fr;gap:16px}.graphs:not(.sparse) figure{grid-template-columns:140px minmax(0,360px)}}

.loading main{display:none}#load-state{margin:24px;max-width:40ch;font-size:20px}#load-state button{margin-top:12px;text-decoration:underline}

/* Birth is the focal event, not an empty dashboard. */
.arriving{background:#080808}.arriving>header,.arriving>main{display:none}#arrival:not([hidden]){min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#eadbc9;background:#080808}#womb{width:min(48vw,320px)}#womb svg{width:100%;display:block}#arrival-count{font-size:64px;font-weight:400;line-height:1;margin:0}#arrival-caption{font-size:16px;margin:0}#childhood-memory{padding:8px 12px 12px;max-width:65ch}#childhood-memory strong{font-size:20px;font-weight:500}#childhood-memory p{font-size:16px;margin:6px 0}#childhood-memory #family-income{font-size:12px;color:#d8d7c9}.childhood-navigation{display:flex;align-items:center;gap:12px;font-size:12px;margin-bottom:6px}.childhood-navigation button{color:inherit;min-height:32px}.childhood-navigation #childhood-now{text-decoration:underline}.birth-stage .stage canvas{height:calc(100svh - 340px);min-height:240px}.birth-stage .world-bottom{display:none}@media(max-width:720px){#womb{width:65vw}.birth-stage .stage canvas{height:calc(100svh - 330px);min-height:220px}}

.birth-stage .stage{height:calc(100svh - 48px);display:flex;flex-direction:column}.birth-stage .stage canvas{height:0;min-height:0;max-height:none;flex:1;object-fit:cover}.birth-stage .world-head,.birth-stage #childhood-memory{flex:none}.birth-stage #age-track{display:none}

.profile-habits{margin:12px 0}.profile-habits>summary{cursor:pointer;font-size:16px;text-decoration:underline;text-underline-offset:4px;padding:6px 0}

/* One contextual choice takes the decision panel; it does not add a dashboard. */
#encounter{display:flex;flex-direction:column;align-items:flex-start;gap:16px;margin:20px 0}.encounter-choice{display:block;text-align:left;padding:6px 0;max-width:30ch;border-bottom:1px solid var(--line);line-height:1.4}.encounter-choice>span{display:block;font-size:calc(18px * var(--reading-scale));font-weight:500}.encounter-choice small{display:block;color:var(--muted);font-size:calc(12px * var(--reading-scale));margin-top:4px}.encounter-choice:hover{border-color:#a35d00}.encounter-choice:focus-visible{outline:3px solid #a35d00;outline-offset:4px}

.encounter-choice small span+span::before{content:' · '}

/* Early histories are three compact comparisons, not three tall empty tracks. */
.graphs svg text{font-size:calc(24px * var(--reading-scale))}.graphs.sparse svg text{font-size:calc(32px * var(--reading-scale))}
@media(min-width:721px) and (max-width:1100px){.graphs.sparse{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;max-width:none}.graphs.sparse figure{display:block}.graphs.sparse svg{max-height:80px;margin-top:8px}.graphs.sparse figcaption .reference{max-width:19ch}}

@media(min-width:721px) and (max-width:1100px){.has-encounter .decision{grid-row:1}.has-encounter .resources{grid-column:1/-1;grid-row:2}.graphs.sparse svg{max-width:220px}}

/* At the ending, memories lead and the complete record stays available. */
#recap h2{font-size:calc(20px * var(--reading-scale));margin:20px 0 12px}
#recap ol{max-height:none;overflow:visible;font-size:calc(16px * var(--reading-scale))}
#recap .remembered-moments{list-style:none;padding:0;margin:0}
#recap .remembered-moments li{display:grid;grid-template-columns:5.5ch minmax(0,1fr);gap:12px;margin:0 0 16px}
.remembered-moments strong{font-size:calc(12px * var(--reading-scale));line-height:1.8;color:var(--muted)}
.remembered-moments p{margin:0;max-width:52ch}
.full-life-record{margin:20px 0 12px}.full-life-record summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px;font-size:calc(14px * var(--reading-scale))}
.full-life-record ol{padding-left:20px}.full-life-record li{max-width:65ch}
@media(min-width:721px){.recap-stage main{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start}.recap-stage .stage{grid-column:1;grid-row:1}.recap-stage .decision{grid-column:2;grid-row:1/span 2;padding:20px 24px}.recap-stage .resources{grid-column:1;grid-row:2}.recap-stage .method{grid-row:3}.recap-stage .stage canvas{max-height:360px}.recap-stage .graphs{grid-template-columns:1fr;gap:18px;max-width:none}.recap-stage .graphs figure{display:grid;grid-template-columns:minmax(110px,140px) minmax(0,1fr)}.recap-stage .graphs svg{max-width:300px;max-height:100px}.recap-stage .event-list{gap:4px 16px}}
@media(max-width:720px){#recap .remembered-moments li{grid-template-columns:5ch minmax(0,1fr);gap:8px}.recap-stage .decision{padding:16px}}

.recap-stage .stage canvas{height:auto;max-height:none;aspect-ratio:1120/680;object-fit:contain}

.world-bottom p{white-space:pre-line}

/* Owner correction: the ending explains divergent outcomes, not a decorative map. */
.recap-stage main{display:block}.recap-stage .stage,.recap-stage .resources{display:none}.recap-stage.show-ending-world .stage,.recap-stage.show-ending-details .resources{display:block}
.recap-stage .decision{padding:24px;max-width:1200px;margin:0 auto}.recap-stage #narrative{margin-bottom:20px}.ending-visual{display:grid;grid-template-columns:minmax(0,2fr) minmax(250px,1fr);gap:32px;align-items:start;margin:12px 0 20px}.ending-chart{width:100%;height:auto;display:block;overflow:visible}.ending-chart text{font-family:inherit;font-size:14px}.ending-chart .ending-metric{font-size:16px;font-weight:600}.ending-chart g{cursor:pointer}.ending-reading label{display:inline-block;font-size:14px;margin-right:12px}.ending-reading select{width:auto;min-width:5ch}.ending-reading dl{display:grid;grid-template-columns:1fr auto;gap:6px 16px;margin:16px 0}.ending-reading dt{font-size:14px}.ending-reading dd{font-weight:600;margin:0}.ending-event{font-size:16px;padding-top:12px;border-top:1px solid var(--line)}.ending-analysis{border-left:3px solid #a32750;padding-left:12px;margin:20px 0 8px}.ending-analysis p{font-size:14px;margin:0 0 8px}.ending-tools{display:flex;gap:24px;flex-wrap:wrap;margin:12px 0}.ending-tools button{padding:4px 0;border:0;border-bottom:1px solid var(--muted);font-size:14px}.recap-stage .full-life-record{margin:16px 0}.recap-stage .method{margin-top:20px}.recap-stage .ending-reading .fine{font-size:12px}
@media(max-width:720px){.recap-stage .decision{padding:16px}.ending-visual{grid-template-columns:1fr;gap:20px}.ending-reading dl{margin:12px 0}.ending-reading{max-width:65ch}.ending-analysis{margin-top:16px}}

.ending-chart text{font-size:calc(14px * var(--reading-scale))}.ending-chart .ending-metric{font-size:calc(16px * var(--reading-scale))}.ending-reading label,.ending-reading dt,.ending-analysis p,.ending-tools button{font-size:calc(14px * var(--reading-scale))}.ending-event{font-size:calc(16px * var(--reading-scale))}.recap-stage .ending-reading .fine{font-size:calc(12px * var(--reading-scale))}

.ending-plot figcaption{display:block;font-size:calc(12px * var(--reading-scale));margin-top:8px;color:var(--muted)}

.recap-stage #soundless{display:none}.recap-stage.show-ending-world #soundless{display:block}
