.living-shell{grid-template-columns:minmax(0,1fr) 310px}
.living-shell .map-frame{display:flex;flex-direction:column;background:#071d1b}
.living-shell .map-frame:after{display:none}
.living-shell .map-hud{flex-shrink:0;padding:12px 16px}
.living-shell .world-night{display:flex;font-size:.75rem;border:0;background:none;padding:0}
.world-resources dt{font-size:.75rem}
.scene-stage{position:relative;min-width:0;width:100%;height:690px;overflow:hidden;isolation:isolate;outline-offset:-3px;background:#081e1c;touch-action:none}
.scene-stage canvas{display:block;width:100%;height:100%;outline:none;touch-action:none}
.world-labels{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden}
.scene-label{position:absolute;left:0;top:0;pointer-events:auto;display:flex;flex-direction:column;gap:3px;align-items:flex-start;min-height:40px;padding:8px 12px;border:1px solid #b5a16e99;border-radius:5px;background:#10261ef2;color:#efddb6;box-shadow:0 5px 12px #00120c66;max-width:240px;text-align:left;white-space:nowrap;cursor:pointer;transition:background .18s,border-color .18s}
.scene-label__name{font-size:.8125rem;font-weight:600;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.scene-label__state{font-size:.75rem;line-height:1.4;color:#c6d3b7}
.scene-label--agent{min-height:38px;padding:5px 9px;border-color:#a5ba8a99;background:#122a21e8;max-width:160px}
.scene-label--agent .scene-label__name{font-size:.75rem}
.scene-label--agent[data-mode=working],.scene-label--agent[data-mode=testing]{border-color:#f0d08e}
.scene-label--agent[data-mode=offline],.scene-label--agent[data-mode=locked],.scene-label--agent[data-mode=unknown]{border-color:#8a8e7a;color:#c5c6b8}
.scene-label:hover,.scene-label.is-selected{background:#344a30f5;border-color:#ffe2a2}
.scene-label:focus-visible{outline:2px solid #ffe5ad;outline-offset:4px}
.scene-loading,.scene-fallback{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;padding:30px;z-index:4;color:#d8d2ad;background:#0b201b;text-align:center}
.scene-loading{font-size:.875rem}
.scene-fallback h2{font:500 1.8rem/1.2 var(--display);color:#efddb6}
.scene-fallback p{font-size:.875rem;line-height:1.7;max-width:40ch}
.scene-unavailable canvas,.scene-unavailable .world-labels{visibility:hidden}
.scene-tools{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 16px;background:#11271e;border-top:1px solid #84915f44}
.scene-tools>span{font-size:.75rem;color:#c1cfb3;line-height:1.6;max-width:260px}
.scene-camera-controls{display:flex;gap:6px;flex-shrink:0}
.scene-camera-controls .button{padding:9px;min-width:40px;min-height:44px;background:#1a3024;border-color:#70825c99;color:#e7d7ad;font-size:.75rem}
.scene-camera-controls .button:hover{background:#314b32;border-color:#ccb77b}
.scene-camera-controls .button:last-child{padding:9px 12px}
.scene-camera-controls svg{width:17px;height:17px}
.world-stale{padding:12px 16px;background:#433623;color:#f5dab0;border-bottom:1px solid #8e754a;font-size:.8125rem}
.living-deck{padding:22px;gap:24px;display:flex;flex-direction:column}
.living-deck:before{display:none}
.living-deck h2{font:500 1.375rem/1.2 var(--display);color:#eddeb4;margin:0 0 13px}
.world-entity-list{display:flex;flex-direction:column;gap:7px;max-height:230px;overflow:auto;padding:3px;margin:-3px}
.world-entity{width:100%;display:flex;align-items:center;gap:11px;min-height:60px;border:1px solid #61774e66;border-radius:6px;background:#0c2019aa;padding:11px 12px;text-align:left;color:#e8dfbf;cursor:pointer}
.world-entity:hover,.world-entity[aria-pressed=true]{background:#3e533044;border-color:#c4af77}
.world-entity>span:last-child{min-width:0}
.world-entity strong{display:block;font-weight:500;font-size:.875rem;line-height:1.4;overflow-wrap:anywhere}
.world-entity small{display:block;font-size:.75rem;color:#bfcfb1;line-height:1.5;margin-top:3px}
.entity-marker{flex-shrink:0;display:grid;place-items:center;width:32px;height:34px;border:1px solid #a69c6566;border-radius:5px;background:#5b674033;color:#efd093;font-size:.75rem;font-weight:600}
.world-entity[data-agent-id=codex] .entity-marker{background:#244d4933;color:#b5dcd1;border-color:#85b7a966}
.world-entity[data-agent-id=claude] .entity-marker{background:#70482d44;color:#efd1a3;border-color:#c7a16d66}
.world-entity[data-mode=offline] .entity-marker,.world-entity[data-mode=locked] .entity-marker{opacity:.6}
.world-team{padding-top:20px;border-top:1px solid #80926444}
.world-idle-note{font-size:.75rem;color:#adbea4;line-height:1.6;margin-top:12px}
.world-inspector{padding-top:20px;border-top:1px solid #80926444}
.living-deck .world-inspector h2{font-size:1.25rem;margin-bottom:10px}
#inspector-state{font-size:.8125rem;color:#dfca91;line-height:1.6}
#inspector-detail{font-size:.8125rem;line-height:1.7;color:#c0cbb3;margin-top:8px;overflow-wrap:anywhere}
#inspector-event{margin-top:12px;line-height:1.6;font-size:.75rem}
.inspector-counts{display:grid;grid-template-columns:1fr 1fr;gap:14px 15px;margin-top:18px}
.inspector-counts:empty{display:none}
.inspector-counts strong{display:block;font-weight:500;font-size:1.25rem;color:#ead9a5;font-variant-numeric:tabular-nums}
.inspector-counts span{display:block;font-size:.75rem;color:#bdcbae;margin-top:4px}
.world-inspector .button{width:100%;margin-top:14px;font-size:.75rem;justify-content:center;white-space:normal}
.living-deck .deck-note{margin-top:auto;padding-top:18px;border-top:1px solid #80926444}
.living-deck .deck-note>div{display:block}
.living-deck .deck-note p{margin-top:7px}
.factory-filter-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;background:#263d28;margin-top:14px;border:1px solid #778a5455;border-radius:5px;font-size:.8125rem}
.factory-filter-bar p{margin:0}.factory-filter-bar .button{padding:5px 9px;font-size:.75rem;min-height:36px}
@media(min-width:1700px){.scene-stage{height:780px}}
@media(max-width:1190px){.living-shell{grid-template-columns:minmax(0,1fr) 270px}.living-deck{display:flex;padding:19px;gap:20px}.living-deck .deck-note{grid-row:auto;grid-column:auto;align-items:start}.scene-stage{height:650px}.scene-tools{flex-wrap:wrap;gap:8px}.scene-tools>span{max-width:none}.scene-camera-controls{width:100%;justify-content:flex-end}.world-night{font-size:.75rem!important}.living-shell .map-hud{flex-wrap:wrap;gap:10px}}
@media(max-width:900px){.living-shell{grid-template-columns:1fr}.scene-stage{height:620px}.living-deck{display:grid;grid-template-columns:1fr 1fr;gap:22px;padding:23px}.world-team{padding-top:0;border-top:0}.world-inspector{grid-column:1/-1}.inspector-counts{grid-template-columns:repeat(4,1fr)}.living-deck .deck-note{grid-column:1/-1;margin-top:0}.world-inspector .button{width:auto;display:inline-flex;margin-right:8px}.scene-tools{flex-wrap:nowrap}.scene-camera-controls{width:auto}.scene-tools>span{max-width:245px}.living-shell .world-night{display:flex}.scene-label{max-width:210px}}
@media(max-width:580px){.living-shell{border-radius:8px}.scene-stage{height:520px}.living-shell .map-hud{padding:11px 10px;gap:8px}.living-shell .world-night{display:flex;width:100%;justify-content:flex-end;font-size:.75rem!important}.world-resources dt{font-size:.75rem}.scene-tools{padding:11px 10px;display:block}.scene-tools>span{display:block;max-width:none;font-size:.75rem;margin-bottom:9px}.scene-camera-controls{justify-content:flex-end;gap:6px}.scene-camera-controls .button{min-width:38px;padding:8px;min-height:44px}.scene-label{max-width:180px;padding:7px 9px}.scene-label__name{font-size:.75rem}.scene-label--agent{max-width:135px;padding:5px 7px}.scene-label__state{font-size:.75rem}.living-deck{grid-template-columns:1fr;padding:20px;gap:20px}.world-team{padding-top:20px;border-top:1px solid #80926444}.world-entity-list{max-height:200px}.world-entity strong{font-size:.875rem}.world-inspector .button{width:100%;margin-right:0}.living-deck .deck-note{margin-top:0}.world-caption>span{max-width:225px;font-size:.75rem}.factory-filter-bar{align-items:flex-start;flex-direction:column;gap:6px}.inspector-counts{gap:12px}.scene-fallback{padding:25px}}
@media(prefers-reduced-motion:reduce){.scene-label{transition:none}}
