/* The scene is the main surface; opaque text surfaces keep it readable in any light. */
body[data-view="3d"]{background:#102b36;color:#edf3f4}
body[data-view="3d"] #viewport{top:var(--header-height);bottom:0;background:#b3c7cd}
body[data-view="3d"] .caption{top:calc(var(--header-height) + 20px);left:28px;max-width:410px;padding:20px 24px;background:#102b36f5;border-left:3px solid #d5ae67;border-radius:3px;box-shadow:0 12px 35px #071a2320}
body[data-view="3d"] .caption h1{color:#fff;font-size:clamp(28px,3vw,40px);line-height:1.05;margin:6px 0 10px}
body[data-view="3d"] .caption .eyebrow{color:#e8c88d;font:500 12px/1.4 var(--body);letter-spacing:.04em;text-transform:none}
body[data-view="3d"] #scene-caption #commodity-summary{color:#d5e3e9;font-size:13px;line-height:1.5}
body[data-view="3d"] #controls{max-width:560px;top:calc(var(--header-height) + 20px)}
body[data-view="3d"] #commodity-chips,body[data-view="3d"] #mode-switch{background:#f7faf9f5;border-color:#c9d4d7}
#terminal-tour{position:fixed;z-index:3;right:28px;bottom:52px;width:360px;padding:18px 20px;background:#102b36f5;color:#fff;border:1px solid #6e8995;border-radius:4px;box-shadow:0 10px 35px #071a2330}
#terminal-tour[hidden]{display:none}
#tour-label{display:block;color:#e8c88d;font-size:12px;line-height:1.4;margin-bottom:6px}
#tour-chapter{display:block;font:400 25px/1.15 var(--display);color:#fff;min-height:30px}
.tour-buttons{display:flex;gap:8px;margin-top:16px}
#terminal-tour button{min-height:44px;color:#102b36;background:#f5f7f4;border:1px solid #c9d4d7;border-radius:4px;font-size:14px;font-weight:500}
#terminal-tour #tour-start{flex:1;background:#e8c88d;border-color:#e8c88d}
#terminal-tour #tour-start[aria-pressed="true"]{background:#fff}
#terminal-tour #tour-prev,#terminal-tour #tour-next{width:44px;padding:0;font-size:26px}
#terminal-tour button:disabled{opacity:.45;cursor:default}
#terminal-tour button:focus-visible{outline:3px solid #fff;outline-offset:3px}
#tour-help{margin:10px 0 0;color:#d5e3e9;font-size:12px;line-height:1.5}
body[data-equipment-modal="open"] #terminal-tour{display:none}
body[data-view="3d"] .view-tools{top:auto;bottom:54px}
body[data-view="3d"] .explore-hint{background:#102b36;color:#edf3f4;border-color:#6e8995;font-size:12px}
@media(max-width:1000px){
 body[data-view="3d"] .caption{max-width:330px;padding:14px 18px}
 body[data-view="3d"] #controls{max-width:50vw;right:16px}
 #commodity-chips button{min-width:54px;padding:8px}
}
@media(max-width:700px){
 body[data-view="3d"] .caption{left:12px;right:12px;top:calc(var(--header-height) + 10px);max-width:none;padding:10px 14px}
 body[data-view="3d"] .caption h1{font-size:27px;margin:2px 0 5px}
 body[data-view="3d"] .caption .eyebrow{display:none}
 body[data-view="3d"] #scene-caption #commodity-summary{font-size:12px;max-width:none}
 body[data-view="3d"] #controls{top:calc(var(--header-height) + 90px);bottom:auto;left:12px;right:12px;max-width:none;display:grid;grid-template-columns:minmax(0,1fr) 58px 76px;align-content:start;justify-content:center;gap:5px;padding:0}
 body[data-view="3d"] #commodity-chips{width:100%;justify-content:space-between;gap:0;padding:3px}
 body[data-view="3d"] #commodity-chips button{min-width:0;flex:1;padding:7px 5px;font-size:12px;min-height:40px}
 body[data-view="3d"] #mode-switch button{min-width:56px;padding:6px 8px}
 body[data-view="3d"] #unloader-control{max-width:155px;font-size:0}
 body[data-view="3d"] #unloader-setup{max-width:155px;min-height:40px;font-size:12px;padding:6px}
 body[data-view="3d"] #terminal-options>summary{font-size:12px;padding:10px}
 body[data-view="3d"] #controls .control-actions button{font-size:12px;min-height:40px;padding:7px 10px}
 #terminal-tour{left:12px;right:12px;bottom:92px;width:auto;padding:12px 14px}
 #tour-chapter{font-size:21px;min-height:24px}
 #tour-label{font-size:12px;margin-bottom:3px}
 .tour-buttons{margin-top:10px}
 #tour-help{display:none}
 body[data-view="3d"] .view-tools,body.embedded[data-view="3d"] .view-tools{top:auto;bottom:38px;left:12px;right:auto}
 body[data-view="3d"] .explore-hint{display:none}
}
@media(prefers-reduced-motion:reduce){#terminal-tour *{transition:none;animation:none}}

/* Keep the full scene behind the compact controls, including unloader layouts. */
body[data-view="3d"][data-unloader="true"] #viewport{top:var(--header-height);bottom:0}
@media(max-width:400px){header.bar{gap:8px;padding-left:12px;padding-right:12px}header.bar .mark .sub{display:none}header.bar .track{gap:12px}}

body[data-view="static"] #scene-caption{background:#102b36f5;border-left:3px solid #d5ae67;padding:10px 14px;border-radius:3px}
body[data-view="static"] #scene-caption h1{color:#fff}
body[data-view="static"] #scene-caption #commodity-summary{color:#d5e3e9}
body[data-view="static"] #scene-caption .eyebrow{color:#e8c88d}

@media(max-width:700px){body[data-view="3d"]:has(.terminal-credit):not(.embedded) #controls{bottom:auto}body[data-view="3d"][data-unloader]:has(.terminal-credit):not(.embedded) #viewport{top:var(--header-height);bottom:0}}
