/* Observation HUD: readable ink, quiet edge scrims, an open central scene. */
:root{--ink:#f3f2e9;--muted:#c2cbbd;--gold:#dec68f;--leaf:#b9c99e;--border:transparent;font-family:"Segoe UI","Microsoft YaHei",sans-serif}
body{height:100svh;overflow:hidden;background:#15191e;color:var(--ink)}
button{border-radius:3px;transition:background .12s,color .12s;min-height:36px;border-color:transparent}
button:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
button:hover{background:#ffffff13;border-color:transparent}
.masthead{position:fixed;inset:0 0 auto;height:82px;padding:16px 26px;border:0;z-index:10;pointer-events:none;background:linear-gradient(#111815da,#11181500)}
.masthead>*{pointer-events:auto}.brand{gap:12px}.brand svg{width:28px;height:36px}.brand svg path{stroke:#b9c6ac;stroke-width:1.3}.brand svg circle{fill:#d8bd83}.brand>span{font-size:22px;letter-spacing:2px}.brand small{font-family:inherit;font-size:11px;letter-spacing:2px;color:#c2cbbd;margin-top:4px}
.masthead>#about-button{position:fixed;right:158px;top:22px;width:36px;height:36px;font-size:16px;background:#121b17a8}
.house-meta{position:fixed;bottom:17px;left:26px;font-size:12px;gap:14px;flex-direction:row;align-items:center;white-space:nowrap}.house-meta .separator{display:none}.house-meta .connection{font-size:11px;color:#bdcbb2}
.home-layout{display:block;width:100%;height:100svh;min-height:0}.room-panel{position:absolute;inset:0;min-height:0;max-height:none;height:100%;background:#15191e;overflow:hidden}#home-canvas{width:100%;height:100%;inset:0}
.masthead,.scene-toolbar,.hud-status,.hud-brain,.behavior-dock,.transport,.orbit-hint,.drawer-trigger,.habitat-tools-toggle{text-shadow:0 1px 2px #0008}
.scene-toolbar{position:absolute;top:21px;left:50%;right:auto;transform:translateX(-50%);display:flex;gap:8px;z-index:9;width:max-content;max-width:calc(100% - 28px)}
.view-switch{display:flex;padding:3px;gap:2px;border:0;border-radius:3px;background:#121b17c9}.view-switch button{white-space:nowrap;flex-shrink:0;font-size:14px;padding:7px 17px;border:0;border-radius:2px;color:#d3dccd}.view-switch button.active{color:#f4e1b5;background:#d8c38b20;text-decoration:underline;text-underline-offset:7px}
.scene-toolbar>.icon-button{width:42px;height:42px;font-size:21px;background:#121b17c9;border:0}
.hud-status,.hud-brain{position:absolute;top:101px;z-index:5;width:250px;padding:16px 20px;border:0;border-radius:0;box-shadow:none}
.hud-status{left:16px;background:linear-gradient(90deg,#101b17ee 0%,#101b17d9 72%,#101b1700 100%);padding-right:30px}
.hud-brain{right:16px;width:280px;background:linear-gradient(270deg,#101b17ed 0%,#101b17ce 76%,#101b1700 100%);padding-left:30px}
.needs-section,.brain-section{padding:0;margin:0;border:0}.section-heading{margin:0 0 12px;align-items:center;gap:9px}.section-heading h3,.brain-heading h2{font-family:inherit;font-size:15px;font-weight:600;letter-spacing:.5px;margin:0;color:var(--ink)}
.needs-section .section-heading{flex-wrap:wrap}.needs-section .section-heading>span{font-size:11px;color:#c2cbbd;letter-spacing:0;order:3;width:100%;margin-top:-3px}
.needs{display:flex;flex-direction:column;gap:0}.need{position:relative;padding:6px 0 8px;border:0;outline-offset:3px}.need-header{display:flex;justify-content:space-between;align-items:baseline;margin:0 0 5px;gap:12px}.need-header label{font-size:14px;color:#e2e8dc;font-weight:400}.need-header output{font:600 15px ui-monospace,Consolas,monospace;color:#f2f1e5;font-variant-numeric:tabular-nums;min-width:3ch;text-align:right}
.need-track{height:4px;border-radius:1px;background:#dce5d126;overflow:hidden}.hud-status .need .need-fill{border-radius:1px;background:#b9c99e;transition:width .3s linear}.need-help{display:none}.need:focus-visible{outline:1px solid #dfce9c}.need[data-level="low"] .need-header output{color:#ffbc96}.hud-status .need[data-level="low"] .need-fill{background:#edac86}.need[data-level="unknown"] output{color:var(--muted)}
.brain-heading{display:flex;flex-wrap:wrap;gap:8px;margin:0}.brain-heading>span{font-size:12px;color:#bacba9;order:3;flex-basis:100%}.brain-viewport{height:176px;margin:6px -8px 12px;background:none}.brain-caption{bottom:0;font-size:11px;letter-spacing:.3px;color:#c2cbbd}.neural-metrics{display:grid;grid-template-columns:1fr 1fr;gap:18px}.neural-metrics>span{border:0;padding:0;text-align:left}.neural-metrics output{font:600 20px ui-monospace,Consolas,monospace;color:#f1eedc}.neural-metrics small{display:block;font-size:12px;color:#c2cbbd;margin-top:5px}
.hud-collapse{font-size:12px;border:0;padding:4px;min-height:28px;color:#d6dfcf;background:none;margin-left:auto}.hud-status.is-collapsed .needs,.hud-brain.is-collapsed .brain-viewport,.hud-brain.is-collapsed .neural-metrics{display:none}.hud-status.is-collapsed .section-heading{margin:0}.hud-status.is-collapsed .section-heading>span,.hud-brain.is-collapsed .brain-heading>span{display:none}
.behavior-dock{position:absolute;z-index:5;left:50%;bottom:65px;transform:translateX(-50%);width:min(650px,calc(100% - 580px));padding:20px 34px;margin:0;border:0;border-radius:0;background:linear-gradient(90deg,#101b1700,#101b17ed 7%,#101b17ed 93%,#101b1700);text-align:left}
.behavior-heading{display:flex;align-items:center;gap:11px}.behavior-heading h2{font-family:inherit;font-size:20px;line-height:1.4;font-weight:600;letter-spacing:0;margin:0;color:#fcf4de}.resident-name{font-size:13px;color:#cbd8c2;white-space:nowrap}.behavior-heading .presence-dot{margin-left:0;width:5px;height:5px;flex:none}.behavior-dock .activity-reason{display:none}
.sense-line{display:flex;gap:12px;align-items:baseline;font-size:14px;line-height:1.65;margin-top:7px}.dock-label{font-size:12px;color:#c8b88e;flex:none;letter-spacing:1px}.sense-line p{margin:0;color:#dce5d5;text-align:left}.behavior-dock #motion-explanation{background:none;border:0;padding:0;font-size:14px;line-height:1.65;margin:0;color:#dce5d5}
.orbit-hint{position:absolute;bottom:76px;right:28px;font-size:12px;color:#d0d7c9;background:#121b1799;padding:5px 8px}
.transport{position:fixed;bottom:0;left:0;right:0;z-index:8;height:48px;min-height:0;padding:7px 26px;border:0;background:linear-gradient(#10181500,#101815eb 45%);justify-content:flex-end;gap:20px;flex-wrap:nowrap}.transport>div:first-child{display:flex;gap:13px}.transport .eyebrow,.persistence-note{display:none}.version{border:0;padding:0;font-size:11px;color:#bac6b3}.time-controls{font-size:12px;gap:10px}.pause-button{font-size:12px;padding:5px 10px;min-height:32px;border:0;background:#121b1799}.transport #render-rate{font:11px ui-monospace,Consolas,monospace;color:#c2ccb8}.transport .time-controls>span{display:none}
.drawer-trigger{position:fixed;right:26px;top:22px;z-index:10;padding:8px 12px;background:#121b17c9;font-size:13px;min-height:36px;border:0;color:#ebefdf}.drawer-trigger span,.habitat-tools-toggle span{padding-left:12px;color:#b9c99e}
.detail-drawer{position:fixed;z-index:30;right:0;top:0;bottom:0;width:min(410px,100vw);padding:26px;background:#15211a;border:0;overflow-y:auto;scrollbar-width:thin;box-shadow:none;text-shadow:none}
.drawer-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px;border:0;padding:0 0 16px}.drawer-heading h2{font:400 22px Georgia,"SimSun",serif;letter-spacing:2px;margin:6px 0 0}.drawer-heading>button{width:40px;height:40px;font-size:24px;border:0}.drawer-heading .eyebrow{font-size:12px;color:#b8c6af}
.detail-drawer .circuit-section{border:0;padding:0;margin:0}.detail-drawer details{padding:15px 0;border-bottom:1px solid #cad3be20}.detail-drawer summary{font-size:15px;cursor:pointer;min-height:26px}.detail-drawer summary>span{font-size:12px;color:#b6c6ad}.detail-drawer .section-heading{align-items:start}.detail-drawer #circuit-status{font-size:12px;max-width:130px;color:#b6c6ad}.circuit-row{font-size:14px;line-height:1.6;padding:12px 0;gap:14px}.circuit-row small{font-size:12px;color:#b5c4ac;line-height:1.7}.circuit-row output{font-size:13px;color:#edf0df}.detail-drawer .circuit-note,.detail-drawer .neural-note{font-size:12px;line-height:1.8;color:#b5c4ac;text-align:left}.research-counter{display:flex;justify-content:space-between;font-size:13px;color:#bdcbb3;padding:12px 0}.research-counter output{font-family:ui-monospace,Consolas,monospace;color:#edf0df}
.habitat-tools-toggle{position:fixed;left:26px;bottom:71px;z-index:9;background:#121b17c9;border:0;padding:10px 13px;font-size:13px}
.habitat-tools{position:fixed;left:16px;bottom:120px;z-index:25;width:350px;max-height:calc(100svh - 146px);overflow:auto;padding:24px;background:#15211a;border:0;border-radius:0;scrollbar-width:thin;text-shadow:none}.habitat-tools section{margin:0 0 24px;padding:0 0 16px;border-bottom:1px solid #cad3be20}.habitat-tools .section-heading h3{font-size:15px}.habitat-tools .section-heading>span{font-size:12px;color:#bdcbb3}.habitat-tools button,.habitat-tools select{font-size:14px;min-height:40px}.habitat-tools p,.habitat-tools label,.journal li{font-size:13px;line-height:1.7}.habitat-tools select{background:#203025;color:#edf0df}.habitat-tools .zone-grid{grid-template-columns:1fr 1fr}.habitat-tools #sense-summary{display:none}.life-footer{font-size:12px}
body:has(.detail-drawer:not([hidden])) .hud-brain{visibility:hidden}body:has(.habitat-tools:not([hidden])) .hud-status{visibility:hidden}
#neuron-dialog,#about-dialog{border:0;border-radius:4px;background:#15211a;box-shadow:none;text-shadow:none;font-size:14px}dialog p{font-size:14px;line-height:1.9}dialog::backdrop{backdrop-filter:none;background:#0b110a85}.neuron-searchbar,.neuron-pagination{font-size:13px}.neuron-table-wrap table{font-size:13px}.neuron-table-wrap th{background:#203025}.toast{background:#e4dfc8;color:#1b281d;border-radius:3px;text-shadow:none;bottom:58px;font-size:14px}
@media(min-width:1800px){.hud-status{width:270px}.hud-brain{width:300px}.need{padding:8px 0 9px}.brain-viewport{height:200px}}
@media(max-width:1200px){.hud-status{width:222px;left:8px;padding-left:18px;padding-right:25px}.hud-brain{width:248px;right:8px;padding-right:18px;padding-left:25px}.brain-viewport{height:155px}.behavior-dock{width:min(620px,calc(100% - 44px));bottom:64px;padding:16px 28px}.orbit-hint{display:none}.house-meta .connection{display:none}.transport{gap:10px}.transport .version{display:none}}
@media(max-height:760px) and (min-width:701px){.hud-status,.hud-brain{top:85px}.need{padding:3px 0 5px}.need-header{margin-bottom:3px}.need-header label{font-size:13px}.brain-viewport{height:135px}.behavior-dock{padding-top:11px;padding-bottom:11px}.behavior-heading h2{font-size:18px}.sense-line{margin-top:3px}}
@media(max-width:700px){
 .masthead{height:65px;padding:12px 14px}.brand>span{font-size:19px}.brand small{font-size:10px;letter-spacing:1px}.brand svg{width:23px;height:31px}.masthead>#about-button{display:none}.drawer-trigger{right:14px;top:16px;font-size:12px;min-height:36px;padding:7px 10px}
 .scene-toolbar{top:72px}.view-switch button{font-size:14px;padding:8px 13px;min-height:40px}.scene-toolbar>.icon-button{height:46px}
 .hud-status,.hud-brain{top:135px;width:calc(50% - 19px);padding:10px 12px;background:#122019e6;max-height:calc(100svh - 370px);overflow:auto}.hud-status{left:14px}.hud-brain{right:14px}.hud-status:not(.is-collapsed),.hud-brain:not(.is-collapsed):not([hidden]){width:calc(100% - 28px);z-index:7;background:#15211a}.hud-status:not(.is-collapsed){left:14px}.hud-brain:not(.is-collapsed):not([hidden]){right:14px}
 .section-heading h3,.brain-heading h2{font-size:14px}.hud-collapse{font-size:12px;min-height:28px}.hud-status.is-collapsed,.hud-brain.is-collapsed{min-height:48px}.hud-status.is-collapsed .section-heading,.hud-brain.is-collapsed .section-heading{gap:4px;flex-wrap:nowrap}.needs-section .section-heading>span{font-size:12px;display:block}.hud-status.is-collapsed .section-heading>span{display:none}
 .needs{display:grid;grid-template-columns:1fr 1fr;gap:6px 20px}.need{padding:6px 0}.need-header label{font-size:14px}.need-header output{font-size:15px}.brain-viewport{height:175px;margin:7px 0}.neural-metrics{grid-template-columns:1fr 1fr;padding-bottom:8px}.brain-heading>span{font-size:12px}
 .behavior-dock{bottom:104px;width:calc(100% - 12px);padding:13px 20px}.behavior-heading{gap:8px}.behavior-heading h2{font-size:18px}.behavior-dock .resident-name{font-size:12px}.sense-line,.behavior-dock #motion-explanation{font-size:13px;line-height:1.6;margin-top:4px}.dock-label{font-size:12px}.sense-line p{overflow-wrap:anywhere}
 .habitat-tools-toggle{left:14px;bottom:55px;font-size:13px;padding:8px 12px;min-height:40px}.habitat-tools{left:14px;bottom:101px;width:calc(100% - 28px);max-height:calc(100svh - 145px);padding:20px}.detail-drawer{padding:22px}.transport{height:45px;padding:6px 14px;gap:8px}.transport>div:first-child{display:none}.transport .time-controls{gap:0}.pause-button{font-size:12px;min-height:34px}.house-meta{bottom:15px;left:14px;font-size:11px;max-width:calc(100% - 108px)}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

@media(max-width:700px) and (max-height:500px){
 .scene-toolbar{top:58px}.hud-status,.hud-brain{top:112px;max-height:max(160px,calc(100svh - 166px))}
 .behavior-dock{bottom:52px;padding:8px 20px}.sense-line{margin-top:2px}
 body:has(.hud-status:not(.is-collapsed),.hud-brain:not(.is-collapsed):not([hidden])) .behavior-dock,
 body:has(.hud-status:not(.is-collapsed),.hud-brain:not(.is-collapsed):not([hidden])) .habitat-tools-toggle{visibility:hidden}
}

.update-notice{position:absolute;top:78px;left:50%;transform:translateX(-50%);z-index:12;display:flex;align-items:center;gap:18px;padding:9px 15px;background:#203025;color:#f3ecd6;font-size:14px;white-space:nowrap}.update-notice button{color:#f0ce8c;text-decoration:underline;font-size:14px}
@media(max-width:700px){.update-notice{top:128px}body:has(.update-notice:not([hidden])) .hud-status,body:has(.update-notice:not([hidden])) .hud-brain{visibility:hidden}}

@media(max-width:700px){body:has(.hud-status:not(.is-collapsed)) .hud-brain{visibility:hidden}body:has(.hud-brain:not(.is-collapsed):not([hidden])) .hud-status{visibility:hidden}}
.detail-drawer .circuit-row{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;align-items:start}
.detail-drawer .circuit-row>span{min-width:0;overflow-wrap:anywhere}
.detail-drawer .circuit-row output{min-width:0;text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.8}
#region-life-values .circuit-row output{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12px;color:#c6d5c0}
#region-life-values .region-stat{white-space:nowrap}

/* Language is local to the viewer; it never changes the shared simulation. */
.language-switch{display:flex;align-items:center;gap:3px;margin-left:10px;pointer-events:auto;flex-shrink:0;color:#98a28b;font:11px system-ui;align-self:center}.language-switch button{min-width:28px;min-height:30px;padding:4px;border:0;background:transparent;color:inherit;border-radius:3px}.language-switch button[aria-pressed="true"]{color:#f3ecd6;background:#b3bd8720}.language-switch button:focus-visible{outline:2px solid #d1d5ad;outline-offset:2px}html[lang="en"] .brand>span{letter-spacing:0;font-size:18px}html[lang="en"] .brand small{letter-spacing:1px}html[lang="en"] .hud-status .section-heading{flex-wrap:wrap}html[lang="en"] .need-header label{font-size:11px}html[lang="en"] #sense-summary,html[lang="en"] #motion-explanation{overflow-wrap:anywhere}html[lang="en"] .section-heading h3{letter-spacing:0}@media(max-width:700px){.language-switch{margin-left:2px;gap:0}html[lang="en"] .brand>span{font-size:14px}html[lang="en"] .brand svg{width:24px}html[lang="en"] .hud-status{max-width:220px}}

.masthead .brand{flex-shrink:0}.masthead .language-switch{margin-right:auto}.masthead .house-meta{flex:initial}

@media(min-width:701px){html[lang="en"] .masthead>#about-button{right:190px}}

/* Care lives beside the corresponding body need; no second care dashboard. */
.hud-status{width:296px;padding-right:20px}.hud-status .need{display:grid;grid-template-columns:minmax(0,1fr) 90px;column-gap:12px;align-items:center;padding:6px 0 8px}.hud-status .need-header{grid-column:1;grid-row:1;margin-bottom:5px;gap:5px}.hud-status .need-track{grid-column:1;grid-row:2;height:10px;border-radius:3px}.hud-status .need .need-fill{border-radius:3px}.need-action{grid-column:2;grid-row:1/3;min-height:36px;font-size:12px;line-height:1.25;padding:7px 5px;border:1px solid #a4b29b36;border-radius:5px;background:#17241fe6;white-space:normal}.need-action:hover{background:#304338;border-color:#b9c99e80}.need-action:disabled{cursor:default;opacity:.45}.atmosphere-controls summary{cursor:pointer;margin-bottom:12px;min-height:30px}
@media(max-width:700px){.hud-status{width:calc(100% - 32px);max-width:360px!important}.hud-status{max-height:calc(100svh - 230px)}.hud-status .needs{display:flex;max-height:none;overflow:visible;padding-right:4px}.hud-status .need{flex-shrink:0;grid-template-columns:minmax(0,1fr) 100px;min-height:48px}.need-action{min-height:40px}.hud-status.is-collapsed{width:auto;min-width:138px}.hud-status .need-header label{font-size:13px}}

.need-action>span,.need-action>small{display:block}.need-action>small{margin-top:3px;color:#aebfa5;font-size:10px;font-variant-numeric:tabular-nums;line-height:1.2}
