@font-face{font-family:'Source Serif 4';src:url('fonts/source-serif-4.woff2') format('woff2');font-weight:200 900;font-style:normal;font-display:swap}
@font-face{font-family:'Inter';src:url('fonts/inter.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
/* A quiet edge to the forest. The scene remains the primary surface. */
:root{--paper:#faf8f3;--ink:#2c2824;--muted:#6b645c;--line:#e8e2d8;--green:#637d56;--panel:#f6f3ee;--serif:'Source Serif 4',Georgia,serif;--sans:'Inter',Arial,sans-serif}
body{background:var(--paper)}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid #6d8058;outline-offset:4px}
.header{border:0;gap:26px}
.brand{font-weight:550}.brandmark{color:#879071}
.header-identity .page-title{display:none}.header-motto{display:none}
.header-journal{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:16px;background:none;border:0;border-left:1px solid #e8e2d8;border-radius:0;padding:2px 16px;text-align:left}
.header-journal:hover{background:#ebece1!important}
.journal-caption{color:#6b645c;margin:0;line-height:1.4}
.journal-caption .eyebrow{font-size:12px;letter-spacing:1px}
#latest-events{margin:0;gap:2px;align-content:center;font-size:14px;line-height:1.25}
.event-preview{font-size:14px;color:#6b645c;line-height:1.25}
.header-actions .quiet{color:#6b645c}.header-actions .version{color:#6b645c}
.game-shell{background:var(--panel);border-color:#e8e2d8;box-shadow:none;border-radius:13px}
.world-toolbar{background:#f6f3ee;border-bottom-color:#e8e2d8}
.time-info strong{font-size:13px;font-weight:500}.time-info small{font-size:11px;color:#6b645c}
.season-icon{color:#a19b68}.seasons span{color:#8a907c;border-bottom-color:#e1e2d3}.seasons span.active{color:#566749;border-color:#87976c}
.restart-button{border-color:transparent;color:#6b645c;font-size:11px}
.playback{gap:5px}.playback .pause{border:0;border-radius:50%;background:#5f7350;color:#faf9ef;width:36px;height:36px;margin-right:8px}
.playback .pause:hover{background:#4c6341}.playback .selected{background:#e3e6d6;color:#475e3d}
.scene-label{color:#667751;letter-spacing:1.4px}.scene-label>span:last-child{opacity:.7}
.world-tools button{border-color:#cfd6bc;background:#f7f6e9c9;border-radius:50%;width:32px;height:32px}
#canvas.can-pan{cursor:grab}
#canvas.is-panning{cursor:grabbing;user-select:none}
.soil-scale{background:#f6f3e2e6;color:#59624c}.soil-scale small{color:#71765f}
.seed-hint{background:#f7f4e6cc;border-radius:16px;padding:7px 15px;color:#596b48}
.status-panel{background:var(--panel);border-left:1px solid #e8e2d8;scrollbar-color:#c6cbb7 transparent;padding:25px 24px}
.tree-status{display:block}.tree-status .panel-heading{margin-bottom:15px}.eyebrow{color:#6b645c;letter-spacing:1.5px}
.status-panel h2{font:normal 31px/1.15 var(--serif);color:#2c2824;margin:0 0 7px;letter-spacing:-.5px}
.age{font-size:11px;color:#6b645c;margin:0 0 20px}
.health-row{font-size:13px;align-items:center;gap:10px;color:#53694c;line-height:1.5}
.health-row b{font-size:11px;color:#6b645c;white-space:nowrap}
.health-track{height:3px;background:#e3e5d6;margin:10px 0 24px;border-radius:4px;overflow:hidden}
.tree-status[data-mood=warning] .health-row{color:#8d7145}.tree-status[data-mood=danger] .health-row{color:#9b5b42}
.tree-status[data-mood=warning] .status-dot{background:#b69a62}.tree-status[data-mood=danger] .status-dot{background:#aa6b4e}
.tree-status .resources{display:block;margin:0}
.tree-status .resource{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:10px;align-items:center;margin:0 0 19px}
.resource-icon{width:20px;height:23px}.resource-icon svg,.allocation-icon svg{display:block;width:100%;height:100%}
.tree-status .resource-name{font-size:12px;display:flex;gap:8px;align-items:baseline;justify-content:space-between}
.resource-state{font-size:10px;color:#6b645c;text-align:right;font-weight:400}
.tree-status .resource-value{font-size:11px;color:#6b645c;white-space:nowrap}
.tree-status .resource-bar{height:4px;border-radius:9px;background:#e8e6d9;margin:7px 0 0;overflow:hidden}
.resource-bar i{border-radius:inherit;opacity:.85}
.tree-status .resource-sub{font-size:10px;color:#6b645c;line-height:1.5;margin-top:7px}
.tree-status .exact-metric{display:none}
.tree-status.show-metrics .exact-metric{display:block}
.show-metrics .resource-name{flex-wrap:wrap;gap:2px 6px}
.metrics-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;padding:8px 0 14px;font-size:11px;color:#6b645c;text-align:left}
.metrics-toggle:hover{background:none!important;color:#3e5940}.metrics-toggle span{font-size:16px}
.stress-box{border-top:1px solid #e8e2d8;padding-top:15px;font-size:11px;color:#6b645c;align-items:center}
.stress-reading{display:flex;align-items:center;gap:9px}.stress-box b{font-size:11px;font-weight:400}
.stress-meter{width:38px;height:4px;border-radius:4px;background:#e4dfcc;overflow:hidden}.stress-meter>i{display:block;height:100%;background:#b19b66;min-width:3px}
.diagnosis{font-size:12px;line-height:1.7;color:#6b645c;margin:12px 0 20px;min-height:0}
.tree-status>.development-btn,.tree-status>.seed-button{width:100%;border:1px solid #e8e2d8;border-radius:7px;padding:12px 13px;background:transparent;color:#526448;font-size:12px;min-height:42px;margin:0}
.tree-status>.development-btn:hover,.tree-status>.seed-button:hover{background:#e8ecdd}.tree-status>.seed-button{margin-top:9px;border-color:transparent}
.allocation{background:#f6f3ee;border-color:#e8e2d8;padding:19px 24px;gap:28px;align-items:stretch}
.allocation-title{flex:0 0 206px;min-width:0;padding:0 24px 0 0;border-right:1px solid #e8e2d8}
.allocation-title h3{font:normal 23px/1.2 var(--serif);margin:7px 0 10px;letter-spacing:-.3px}
.priority-caption{display:none}.allocation-title .eyebrow{font-size:8px}
.allocation-title select{font-size:12px;border:1px solid #e8e2d8;background:#faf8f3;color:#526448;padding:8px 9px;width:100%;margin:0;min-height:36px}
.strategy-note{font-size:10px;line-height:1.6;color:#6b645c;margin:9px 0 0}
.energy-controls{flex:1;min-width:0}.budget-heading{display:flex;justify-content:space-between;font-size:10px;color:#6b645c;margin-bottom:7px;gap:12px}
.energy-budget{height:6px;display:flex;overflow:hidden;border-radius:8px;background:#e0e4d3;margin-bottom:18px;gap:2px}
.energy-budget i{display:block;background:var(--energy-color);height:100%;transition:width .18s}
.sliders{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 28px;align-items:start}
.slider{display:block;min-width:0}.slider-label{font-size:11px;align-items:center;justify-content:flex-start;gap:7px;min-height:20px}
.allocation-icon{width:17px;height:19px;flex:none;color:var(--energy-color)}
.slider-label output{margin-left:auto;font:11px/1.4 var(--sans);color:#6b645c;opacity:0;font-variant-numeric:tabular-nums;transition:opacity .15s}
.slider:hover output,.slider:focus-within output{opacity:1}
.slider small{font-size:9px;color:#6b645c;line-height:1.4}
.slider input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:22px;margin:0 0 1px;background:transparent;accent-color:var(--energy-color);border-radius:8px}
.slider input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:8px;background:linear-gradient(to right,var(--energy-color) var(--fill),#dce1ce var(--fill))}
.slider input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:14px;height:14px;margin-top:-4px;background:#f7f5e9;border:2px solid var(--energy-color);border-radius:50%;box-shadow:0 1px 2px #43533320}
.slider input[type=range]::-moz-range-track{height:6px;border-radius:8px;background:linear-gradient(to right,var(--energy-color) var(--fill),#dce1ce var(--fill))}
.slider input[type=range]::-moz-range-thumb{width:10px;height:10px;background:#f7f5e9;border:2px solid var(--energy-color);border-radius:50%}
.slider:has(input:disabled){opacity:.48}.slider input:disabled{cursor:not-allowed}
.allocation-help{margin:10px 0 0;font-size:9px;color:#6b645c;line-height:1.5}
dialog{background:#f6f3ee;border-color:#e8e2d8;box-shadow:0 20px 90px #33412b26}dialog p{color:#6b645c}dialog::backdrop{background:#35433255;backdrop-filter:blur(4px)}
.events-popover{background:#f6f3ee}.primary{background:#5b704e}.primary:hover:not(:disabled){background:#4c6240}
@media(min-width:751px){
 .header{height:80px;min-height:80px;margin:0 28px}
 .header-journal{height:60px;align-self:center;margin:0;max-width:none}
 .header-identity .brand{font-size:18px}.header-identity .location{margin-left:47px;font-size:10px}
 main{padding:0 20px 14px;max-width:none}
 .world-toolbar{height:58px;min-height:58px;padding:7px 22px}
 .game-body,.game-body:has(.reproduction-panel:not([hidden])){grid-template-columns:minmax(0,1fr) 300px}
 .world{height:100%}.status-panel{padding:24px 22px}
 .allocation{padding:17px 22px;gap:24px}
 .events-popover{top:75px}
}
@media(min-width:751px) and (max-height:800px){
 .header{height:68px;min-height:68px}.status-panel{padding:18px 20px}
 .tree-status .panel-heading{margin-bottom:10px}.status-panel h2{font-size:27px}.age{margin-bottom:12px}
 .health-track{margin:8px 0 17px}.tree-status .resource{margin-bottom:14px}
 .diagnosis{font-size:11px;margin-bottom:13px}.stress-box{padding-top:11px}
 .allocation{padding:12px 20px}.energy-budget{margin-bottom:11px}.sliders{row-gap:7px}
}
@media(min-width:751px) and (max-width:1100px){
 .header{gap:15px;margin:0 20px}.header-identity .brand{font-size:16px}.header-journal{padding:2px 12px;gap:10px}
 .game-body,.game-body:has(.reproduction-panel:not([hidden])){grid-template-columns:minmax(0,1fr) 270px}
 .status-panel{padding-left:18px;padding-right:18px}.allocation-title{flex-basis:180px;padding-right:18px}.allocation-title h3{font-size:21px}
 .sliders{column-gap:18px}.allocation{gap:20px}.header-actions{flex-wrap:wrap;max-width:220px;gap:8px 12px}
 .slider-label{font-size:10px}.header-identity .location{margin-left:0;font-size:9px}
}
@media(max-width:750px){
 .header{gap:12px;margin:0 18px;padding:18px 0 10px}.header-identity .brand{font-size:17px}
 .header-journal{border-left:0;border-top:1px solid #e8e2d8;padding:12px 0 0;margin:0;gap:12px;min-height:68px}
 .header-actions .quiet{min-height:30px}.header-side{max-width:170px}
 main{padding:8px 12px 18px}.world-toolbar{padding:11px 14px;gap:12px}.time-info strong{font-size:12px}
 .world{height:420px}.status-panel{display:block;padding:24px;border-left:0;border-top:1px solid #e8e2d8}
 .tree-status{display:block}.tree-status .resources{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 24px}
 .tree-status .resource{margin:0}.tree-status .resource:last-child{grid-column:1/-1}
 .resource-name{flex-wrap:wrap;gap:1px 5px!important}.resource-state{text-align:left}
 .tree-status .resource-value{white-space:normal}.tree-status.show-metrics .resources{display:block}.show-metrics .resource{margin-bottom:16px}
 .metrics-toggle{padding-top:20px}.diagnosis{font-size:12px}.status-panel h2{font-size:30px}
 .allocation{display:block;padding:24px}.allocation-title{display:block;border:0;padding:0;margin-bottom:20px}
 .allocation-title h3{display:block;font-size:25px}.allocation-title .eyebrow{max-width:none;font-size:9px}
 .allocation-title select{width:100%;font-size:13px;min-height:42px}.strategy-note{font-size:11px}
 .sliders{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px}.slider-label{font-size:11px}
 .slider input[type=range]{height:32px;margin:0}.slider small{font-size:10px}.slider-label output{opacity:1}
 .allocation-help{font-size:10px;margin-top:18px}.budget-heading{font-size:10px}.energy-budget{height:7px;margin-bottom:20px}
 .soil-scale{font-size:9px}.scene-label{left:15px;letter-spacing:1px}
}
@media(max-width:380px){.status-panel,.allocation{padding:20px 16px}.sliders{column-gap:17px}.header{margin:0 14px}.header-side{max-width:155px}.header-identity .brand{font-size:15px}.header-identity .location{font-size:9px}.tree-status .resources{column-gap:16px}.resource-state{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
/* Keep the main decisions in view before opening the numerical readout. */
@media(min-width:751px){
 .status-panel{padding:18px 21px}
 .tree-status .panel-heading{margin-bottom:9px}
 .status-panel h2{font-size:29px;margin-bottom:5px}
 .age{margin-bottom:12px}
 .health-track{margin:8px 0 16px}
 .tree-status .resource{margin-bottom:12px}
 .tree-status .resource-name{font-size:11px}
 .metrics-toggle{padding:2px 0 10px;min-height:29px}
 .metrics-toggle span{font-size:13px}
 .stress-box{padding-top:11px}
 .diagnosis{font-size:11px;line-height:1.6;margin:10px 0 13px}
 .tree-status>.development-btn{padding:10px 12px;min-height:38px;font-size:11px}
 .allocation{padding-top:13px;padding-bottom:13px}
 .energy-budget{margin-bottom:12px}
 .sliders{row-gap:8px}
 .allocation-title h3{font-size:21px}
 .allocation-help{margin-top:7px}
}

.tree-traits{display:flex;align-items:center;gap:7px;color:#6b645c;font-size:11px;min-height:28px;padding:2px 0 2px 8px}.tree-traits:hover{background:none!important;color:#3e5940}.tree-status .panel-heading{gap:12px}
/* On a short laptop screen, one row of controls leaves more height to the forest. */
@media(min-width:1101px) and (max-height:800px){
 .allocation{padding:12px 20px;gap:22px}
 .allocation-title{flex-basis:205px;padding-right:18px}
 .allocation-title .eyebrow{display:none}
 .allocation-title h3{font-size:18px;line-height:1.2;margin:0 0 8px}
 .allocation-title select{font-size:11px;padding:5px 7px;min-height:30px}
 .strategy-note{font-size:9px;line-height:1.45;margin-top:6px}
 .sliders{grid-template-columns:repeat(6,minmax(0,1fr));column-gap:16px}
 .slider-label{font-size:10px;gap:4px}.allocation-icon{width:14px;height:17px}
 .slider small{font-size:8px}.slider-label output{font-size:10px}
 .budget-heading{font-size:9px;margin-bottom:5px}.energy-budget{margin-bottom:10px}
 .allocation-help{font-size:9px;margin-top:8px}
}

/* Field journal: one typographic hierarchy and one paper palette throughout. */
body{font-family:var(--sans);color:var(--ink);font-optical-sizing:auto}
button,select,input,textarea{font-family:var(--sans)}
h1,h2,h3,h4,.brand,.age{font-family:var(--serif);font-weight:600;color:var(--ink);font-optical-sizing:auto}
.header-identity .brand{font-family:var(--serif);font-weight:600;font-size:23px;letter-spacing:-.4px}
.status-panel h2{font-family:var(--serif);font-size:34px;font-weight:600;line-height:1.12;letter-spacing:-.65px;color:var(--ink);margin-bottom:8px}
.age{font-size:18px;line-height:1.35;font-weight:500;color:var(--muted);margin-bottom:19px}
.eyebrow,.header-actions .quiet,.location,.tree-traits,.metrics-toggle,.stress-box,.diagnosis,.strategy-note,.allocation-help,.budget-heading{color:var(--muted)}
.panel-heading .eyebrow{font-size:9px;letter-spacing:1.3px}
.tree-status .resource-name{font-size:12px;font-weight:600;color:var(--ink)}
.resource-state{font-family:var(--sans);font-size:11px;font-weight:400;color:var(--muted)}
.tree-status .resource{margin-bottom:16px;gap:10px}
.tree-status .resource-bar{height:7px;border-radius:4px;background:#ddd6ca;margin-top:8px}
.resource-bar i{opacity:1;border-radius:4px}
.tree-status .resource-value{font-weight:500;color:var(--ink)}
.tree-status .resource-sub{color:var(--muted);font-weight:400}
.health-track{height:6px;background:#e2ddd2;margin:10px 0 22px}
.health-row{font-size:13px;font-weight:500}
.metrics-toggle{border-top:1px solid var(--line);padding:11px 0 14px;margin-top:4px}
.stress-meter{height:6px;background:#e2d9ca}.stress-meter>i{background:#c4a574}
.stress-box{padding-top:13px;border-color:var(--line)}
.diagnosis{font-size:12px;line-height:1.7;margin:12px 0 0}
.allocation-title h3{font-family:var(--serif);font-size:27px;font-weight:600;line-height:1.15;color:var(--ink);letter-spacing:-.4px}
.allocation-title{flex-basis:228px}.allocation-title select{color:var(--ink);border-color:#d8cfc1;background:transparent;font-weight:500}
.strategy-note{font-size:11px}.budget-heading{font-size:11px}
.energy-budget{height:8px;background:#ddd6ca}.energy-budget i{opacity:1}
.slider-label{font-size:12px;font-weight:500;color:var(--ink)}
.slider-label output{font-family:var(--sans);font-weight:500;color:var(--muted)}
.slider small{font-size:10px;font-weight:400;color:var(--muted)}
.slider input[type=range]{height:28px}
.slider input[type=range]::-webkit-slider-runnable-track{height:8px;border-radius:5px;background:linear-gradient(to right,var(--energy-color) var(--fill),#d8d0c2 var(--fill))}
.slider input[type=range]::-webkit-slider-thumb{width:18px;height:18px;margin-top:-5px;background:#f6f3ee;border:2.5px solid var(--energy-color);box-shadow:0 1px 3px #2c282420}
.slider input[type=range]::-moz-range-track{height:8px;border-radius:5px;background:linear-gradient(to right,var(--energy-color) var(--fill),#d8d0c2 var(--fill))}
.slider input[type=range]::-moz-range-thumb{width:13px;height:13px;background:#f6f3ee;border:2.5px solid var(--energy-color)}
.allocation-help{font-size:10px}.tree-traits{font-size:11px}
.primary,.playback .pause{background:transparent;color:#526b45;border:1px solid #c9cfbd;font-weight:600}
.primary:hover:not(:disabled),.playback .pause:hover{background:#e9ecdf;color:#405936}
.playback .selected{background:transparent;color:#526b45;font-weight:650;box-shadow:inset 0 -2px #7a9a6d;border-radius:0}
.secondary{border-color:#d8cfc1;color:var(--muted)}
.seasons span.active{color:#526b45;font-weight:600;border-color:#7a9a6d}
.resource-icon{width:21px;height:23px}
.event-preview{color:var(--muted);font-size:12px}.event-preview.bad{color:#8c5e3d}.event-preview.good{color:#526b45}
.events-popover,.reproduction-panel,dialog{background:var(--panel);color:var(--ink)}
dialog h2,#development h2,.reproduction-panel h2,.events-popover h2{font-family:var(--serif);font-weight:600;color:var(--ink)}
dialog p,.seed-note,.reproduction-caption,.help-list,.seed-field,.offspring-card p{color:var(--muted)}
.trait-card strong,.reproduction-method strong,.achievement-card h4{font-family:var(--serif);font-weight:600;color:var(--ink)}
.batch-categories button[aria-pressed=true]{background:#e9ecdf;color:#405936;font-weight:600;border-color:#9aaa86}
@media(min-width:751px){
 .game-body,.game-body:has(.reproduction-panel:not([hidden])){grid-template-columns:minmax(0,1fr) 318px}
 .status-panel{padding:22px 24px}.allocation{padding:18px 24px;gap:27px}
}
@media(min-width:751px) and (max-width:1100px){
 .header-identity .brand{font-size:21px}
 .game-body,.game-body:has(.reproduction-panel:not([hidden])){grid-template-columns:minmax(0,1fr) 290px}
 .status-panel{padding:20px}.status-panel h2{font-size:31px}
 .allocation-title{flex-basis:200px}.allocation-title h3{font-size:25px}
}
@media(min-width:1101px) and (max-height:800px){
 .status-panel{padding:18px 23px}.status-panel h2{font-size:32px}.age{font-size:17px;margin-bottom:15px}
 .tree-status .resource{margin-bottom:14px}.health-track{margin-bottom:18px}
 .allocation{padding:14px 22px;gap:24px}.allocation-title{flex-basis:225px}
 .allocation-title h3{font-size:22px;line-height:1.15;margin:0 0 8px}
 .allocation-title select{font-size:11px}.strategy-note{font-size:10px}
 .slider-label{font-size:11px}.slider small{font-size:9px}.allocation-help,.budget-heading{font-size:10px}
 .sliders{column-gap:14px}.allocation-icon{width:15px;height:18px}
}
@media(max-width:750px){
 .header-identity .brand{font-size:21px;line-height:1.1}.header-side{max-width:155px}
 .status-panel h2{font-size:35px}.age{font-size:19px;margin-bottom:22px}
 .status-panel{padding:26px 24px}.tree-status .resource{margin:0}
 .tree-status .resources{gap:22px 20px}.tree-status.show-metrics .resource{margin-bottom:18px}
 .tree-status .resource-name{font-size:12px}.resource-state{font-size:11px}
 .allocation-title h3{font-size:29px}.allocation{padding:26px 24px}
 .strategy-note{font-size:11px}.slider-label{font-size:12px}.slider small{font-size:10px}
 .energy-budget{height:8px}.slider input[type=range]{height:34px}
 .metrics-toggle{margin-top:20px}.diagnosis{font-size:12px}
}
@media(max-width:380px){
 .header-identity .brand{font-size:19px}.header-side{max-width:145px}
 .status-panel,.allocation{padding:24px 18px}.status-panel h2{font-size:32px}
 .tree-status .resources{grid-template-columns:1fr;gap:18px}.resource-name{flex-wrap:nowrap}
 .slider-label{font-size:11px}.allocation-title h3{font-size:27px}
}

/* Compact growth controls: one control row and a thin shared budget. */
.slider input[type=range]::-webkit-slider-runnable-track{height:4px}
.slider input[type=range]::-webkit-slider-thumb{width:14px;height:14px;margin-top:-5px;border-width:2px}
.slider input[type=range]::-moz-range-track{height:4px}
.slider input[type=range]::-moz-range-thumb{width:10px;height:10px;border-width:2px}
@media(min-width:751px){
 .game-body{grid-template-columns:minmax(0,1fr) 286px}
 .game-body:has(.reproduction-panel:not([hidden])){grid-template-columns:minmax(0,1fr) 286px}
 .status-panel{padding:20px}
 .status-panel h2{font-size:30px;letter-spacing:-.6px}
 .allocation{padding:12px 20px;gap:20px;align-items:center}
 .allocation-title{position:relative;flex:0 0 194px;min-width:0;padding:0 18px 0 0;margin:0}
 .allocation-title .eyebrow{display:none}
 .allocation-title h3{font-size:21px;line-height:1.08;margin:0 0 8px;letter-spacing:-.3px}
 .allocation-title select{width:100%;font-size:11px;line-height:1.4;min-height:32px;margin:0;padding:6px 7px}
 .strategy-note{position:absolute;width:240px;bottom:calc(100% + 9px);left:0;margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:var(--panel);box-shadow:0 3px 14px #2c282414;color:var(--muted);font-size:11px;line-height:1.5;z-index:6;visibility:hidden;pointer-events:none}
 .allocation-title:hover .strategy-note,.allocation-title:focus-within .strategy-note{visibility:visible}
 .energy-controls{display:grid;grid-template-columns:1fr;grid-template-areas:'controls' 'budget' 'note';align-content:center;row-gap:0}
 .budget-heading{display:none}
 .sliders{grid-area:controls;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px;align-items:start}
 .slider-label{font-size:11px;line-height:1.4;min-height:18px;gap:5px;font-weight:500}
 .allocation-icon{width:15px;height:18px}
 .slider-label output{font-size:10px}
 .slider input[type=range]{height:24px;margin:2px 0 0}
 .slider small{font-size:11px;line-height:1.3;color:#756e64;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .energy-budget{grid-area:budget;height:4px;margin:9px 0 0;gap:2px}
 .allocation-help{grid-area:note;font-size:10px;line-height:1.3;margin:6px 0 0;color:#756e64}
}
@media(min-width:1200px){
 .sliders{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
}
@media(min-width:751px) and (max-width:1199px){
 .game-body,.game-body:has(.reproduction-panel:not([hidden])){grid-template-columns:minmax(0,1fr) 270px}
 .status-panel{padding:18px}.status-panel h2{font-size:29px}
 .allocation{gap:18px;padding:12px 18px}
 .allocation-title{flex-basis:190px;padding-right:16px}
 .slider small{font-size:11px}
}
@media(max-width:750px){
 .allocation{padding:16px 20px}
 .allocation-title{margin-bottom:14px}
 .allocation-title .eyebrow{display:none}
 .allocation-title h3{font-size:25px;margin:0 0 10px}
 .strategy-note{display:none}
 .allocation-title select{min-height:40px}
 .budget-heading{font-size:10px;margin-bottom:5px}
 .energy-budget{height:4px;margin-bottom:14px}
 .sliders{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px}
 .slider small{font-size:11px;line-height:1.4}
 .slider input[type=range]{height:34px;margin:0}
 .allocation-help{font-size:10px;line-height:1.45;margin-top:12px}
}

/* Numerical readout uses the same space: label + value, then status + bar. */
.show-metrics .resource-body,.show-metrics .resource-name{display:contents}
.tree-status.show-metrics .resource{display:grid;grid-template-columns:18px auto minmax(0,1fr) auto;grid-template-areas:'icon label label value' '. state bar bar' '. sub sub sub';gap:3px 8px;align-items:center;margin:0 0 10px}
.show-metrics .resource-icon{grid-area:icon;width:18px;height:20px;align-self:start}
.show-metrics .resource-label{grid-area:label;min-width:0;font-size:12px;line-height:1.4;font-weight:600;color:var(--ink)}
.show-metrics .resource-state{grid-area:state;font-size:11px;line-height:1.35;text-align:left;white-space:nowrap}
.tree-status.show-metrics .resource-value{grid-area:value;font-size:12px;line-height:1.4;font-weight:500;white-space:nowrap;text-align:right;align-self:start}
.tree-status.show-metrics .resource-bar{grid-area:bar;height:5px;margin:0;min-width:32px}
.tree-status.show-metrics .resource-sub{grid-area:sub;font-size:11px;line-height:1.35;margin:0;overflow-wrap:anywhere}
@media(min-width:751px){
 .status-panel{container-type:size;container-name:tree-panel}
 .status-panel:has(.show-metrics){padding:10px 18px}
 .show-metrics .panel-heading{margin-bottom:5px}
 .show-metrics .tree-traits{min-height:24px}
 .status-panel .show-metrics h2{font-size:27px;margin:0 0 4px;line-height:1.1}
 .show-metrics .age{font-size:16px;line-height:1.25;margin:0 0 11px}
 .show-metrics .health-row{font-size:12px;line-height:1.35}
 .show-metrics .health-track{height:5px;margin:7px 0 13px}
 .show-metrics .metrics-toggle{font-size:11px;min-height:28px;margin:0;padding:6px 0}
 .show-metrics .stress-box{font-size:11px;padding-top:9px}
 .show-metrics .diagnosis{font-size:11px;line-height:1.5;margin:8px 0 0}
}
/* The available panel height also accounts for hazard banners and short windows. */
@container tree-panel (max-height:650px){
 .show-metrics .panel-heading{margin-bottom:3px}
 .show-metrics .tree-traits{min-height:22px}
 .status-panel .show-metrics h2{font-size:25px;margin-bottom:3px}
 .show-metrics .age{font-size:15px;margin-bottom:8px}
 .show-metrics .health-track{margin:5px 0 10px}
 .tree-status.show-metrics .resource{gap:2px 7px;margin-bottom:8px}
 .show-metrics .resource-label,.tree-status.show-metrics .resource-value{font-size:11px;line-height:1.3}
 .show-metrics .resource-state,.tree-status.show-metrics .resource-sub{font-size:10px;line-height:1.3}
 .show-metrics .resource-icon{width:16px;height:17px}
 .show-metrics .metrics-toggle{min-height:26px;padding:5px 0}
 .show-metrics .stress-box{padding-top:7px}
 .show-metrics .diagnosis{font-size:11px;line-height:1.4;margin-top:7px}
}
@container tree-panel (max-height:440px){
 .show-metrics .panel-heading{margin-bottom:0}
 .status-panel .show-metrics h2{font-size:23px}
 .show-metrics .age{font-size:14px;margin-bottom:5px}
 .show-metrics .health-track{margin:4px 0 7px}
 .tree-status.show-metrics .resource{margin-bottom:5px;row-gap:1px}
 .show-metrics .metrics-toggle{min-height:24px;padding:4px 0}
 .show-metrics .stress-box{padding-top:5px}
 .show-metrics .diagnosis{font-size:10px;line-height:1.35;margin-top:5px}
}
@media(max-width:750px){
 .tree-status.show-metrics .resource{margin-bottom:16px}
}
@container tree-panel (max-height:650px){
 .show-metrics .resource-icon{width:14px;height:14px}
 .tree-status.show-metrics .resource{margin-bottom:7px}
}
@container tree-panel (max-height:440px){
 .tree-status.show-metrics .resource{margin-bottom:3px;row-gap:0}
 .show-metrics .metrics-toggle{line-height:1.3}
 .show-metrics .metrics-toggle span{line-height:1}
}
@container tree-panel (max-height:650px){
 .show-metrics .metrics-toggle{display:inline-flex;width:45%;vertical-align:top;min-height:29px;line-height:1.3;padding:6px 0;border-bottom:0}
 .show-metrics .stress-box{display:inline-flex;width:55%;vertical-align:top;min-height:29px;line-height:1.3;gap:5px;padding:6px 0 6px 10px}
 .show-metrics .stress-box,.show-metrics .stress-box b{font-size:10px}
 .show-metrics .stress-reading{gap:5px}.show-metrics .stress-meter{width:20px;height:5px}
 .show-metrics .diagnosis{clear:both}
}
@container tree-panel (max-height:440px){
 .tree-status.show-metrics .resource{margin-bottom:2px}
}

/* One typeface and text size for all choices, at every viewport width. */
#development{--choice-size:.875rem;font-family:var(--sans);font-size:var(--choice-size);line-height:1.5}
#development :is(h2,h3,h4,p,button,small,strong,b,span,label){font-family:var(--sans);font-optical-sizing:auto}
#development h2{font-size:1.5rem;line-height:1.3;letter-spacing:0}
#development :is(.trait-section,.reproduction-method-section) h3{font-size:1rem;line-height:1.5;font-weight:600;gap:12px;align-items:baseline}
#development :is(p,.trait-section h3 small,.reproduction-method-section h3 small,.decision-footer button,.batch-categories button){font-size:var(--choice-size);line-height:1.5}
#development .trait-options{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
#development .trait-options.habit,#development .trait-options.root-options{grid-template-columns:repeat(2,minmax(0,1fr))}
#development .trait-card{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:8px;padding:14px;min-width:0;font-size:var(--choice-size);line-height:1.5}
#development :is(.trait-card,.reproduction-method) :is(strong,span,small,b){font-size:var(--choice-size);line-height:1.5;font-style:normal;letter-spacing:0;margin:0}
#development :is(.trait-card,.reproduction-method) :is(strong,b){font-weight:600}
#development :is(.trait-card,.reproduction-method) :is(span,small){font-weight:400}
#development .trait-preview{height:100px;flex:none;margin:0 0 4px}
#development .trait-card:has(.trait-preview)>strong{min-height:3em}
#development .trait-card .check{font-size:var(--choice-size)}
#development .reproduction-method .method-symbol{font-size:1.375rem}
#development .architecture-description,#development .architecture-habitat{line-height:1.5}
@media(max-width:600px){
 #development .trait-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 #development .trait-options.habit,#development .trait-options.root-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 #development .trait-card{padding:12px;gap:8px}
 #development .trait-preview{height:80px}
}
@media(max-width:360px){#development .trait-options,#development .trait-options.habit,#development .trait-options.root-options{grid-template-columns:minmax(0,1fr)}}

/* Put age beside the stage when a laptop leaves little vertical room. */
@container tree-panel (max-height:440px){
 .tree-status.show-metrics{display:grid;grid-template-columns:repeat(20,minmax(0,1fr))}
 .tree-status.show-metrics>*{grid-column:1/-1;min-width:0}
 .tree-status.show-metrics>h2{grid-column:1/13;grid-row:2;margin:0;align-self:center;font-size:18px}
 .tree-status.show-metrics>.age{grid-column:13/-1;grid-row:2;margin:0;text-align:right;align-self:center;font-size:12px}
 .tree-status.show-metrics>.metrics-toggle{grid-column:1/10;width:100%;margin:0}
 .tree-status.show-metrics>.stress-box{grid-column:10/-1;width:100%;margin:0}
 .show-metrics .health-row{margin-top:4px}
 .tree-status.show-metrics .resource{margin-bottom:1px}
}
