/* Keep the entire cutaway visible: descriptions never cover the plant room. */
.stage-shell{height:auto;min-height:0;overflow:hidden;background:#edf0e9}
.stage-toolbar,.flow-controls,.camera-views,.legend{flex-shrink:0}
.stage-toolbar{height:38px}
.flow-controls{padding:7px 12px;background:#f6f8f2}
.camera-views{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:7px 28px;background:#edf0e9;border-bottom:1px solid #dae0d6;font-size:10px}
.camera-presets{display:flex;gap:3px}
.camera-views button{border:0;background:transparent;padding:7px 11px;border-radius:5px;cursor:pointer;font-size:10px;color:#657064}
.camera-views button[aria-pressed=true]{background:#fff;color:#183c29;box-shadow:0 1px 4px #17352115;font-weight:800}
.camera-views #cleanView{border:1px solid #cbd5c7;color:#294f36}
.viewport{flex:none;height:clamp(570px,76vh,960px);min-height:0}
.flow-guide{position:relative;left:auto;bottom:auto;width:auto;max-width:none;min-height:78px;margin:0;border:0;border-top:1px solid #d7dfd1;border-radius:0;box-shadow:none;backdrop-filter:none;padding:12px 28px;display:grid;grid-template-columns:190px 1fr 1.05fr;align-items:center;gap:16px;background:#f7f9f4}
.flow-guide[hidden]{display:none}
.flow-guide-title{flex-wrap:wrap;font-size:12px;gap:7px}
.flow-guide-title small{flex-basis:100%;margin-left:15px;font-size:9px}
.flow-guide ol{margin:0;gap:5px}
.flow-guide li{font-size:10px;padding:9px}
.flow-guide p{font-size:10px;margin:0;max-width:600px}
.flow-guide>strong{font-size:12px}
.flow-guide>strong+p{grid-column:2/4}
.air-switch{grid-column:2/4;margin-top:-8px}
.clean-view .three-hotspots,.clean-view .route-label{visibility:hidden}
.clean-view .webgl-badge{display:none}
.clean-view .legend{display:none}
.webgl-badge{opacity:.8}
.view-hint{font-size:7px;bottom:9px;right:20px;background:#edf0e9c4;padding:4px 7px;border-radius:3px}
.detail-panel.open{top:147px}
.tour-subtitle{top:142px}
.stage-shell:fullscreen{overflow:auto}
.stage-shell:fullscreen .viewport{height:calc(100vh - 235px);min-height:430px}
.topbar{height:62px}
.intro-panel{padding:16px 3vw 18px;grid-template-columns:1fr 320px}
.intro-panel h1{font-size:clamp(24px,2.35vw,37px)}
.intro-copy{font-size:10px}
.performance-controls{display:flex;align-items:center;gap:7px;margin-left:auto;color:#677163;font-size:10px}
.performance-controls select{border:1px solid #cbd5c7;border-radius:5px;background:#f9fcf6;font-size:10px;color:#284633;padding:6px 8px;max-width:172px}
.performance-controls output{min-width:51px;font:600 9px monospace;color:#487445;cursor:help;white-space:nowrap}
.camera-views{flex-wrap:wrap;gap:5px 12px}
.tour-camera-status{position:absolute;z-index:22;top:155px;left:18px;color:#f2f8ef;background:#183923e8;border-radius:6px;padding:8px 11px;font-size:10px;line-height:1.4;pointer-events:none;max-width:280px;border-left:3px solid #9ad35a}
.tour-camera-status[hidden]{display:none}
.voice-status strong:after{content:none}
html[data-tour-camera-stage="detail"] .webgl-badge,
html[data-tour-camera-stage="overview"] .webgl-badge,
html[data-tour-camera-stage="manual"] .webgl-badge{display:none}
@media(max-width:850px){
  .intro-panel{grid-template-columns:1fr}.intro-panel h1{font-size:27px}
  .camera-views{padding:7px 10px;gap:6px}.camera-views button{font-size:9px;padding:7px 8px}
  .viewport{height:580px;min-height:0}.flow-guide{display:flex;flex-direction:column;align-items:stretch;padding:12px 16px;gap:9px}
  .flow-guide-title small{flex-basis:auto;margin-left:auto}.flow-guide ol{margin:0}
  .air-switch{margin:0}.flow-guide p{font-size:10px}.detail-panel.open{top:166px}
  .tour-subtitle{top:163px}.view-hint{font-size:6px;right:8px}
  .performance-controls{flex-basis:100%;justify-content:flex-end}.performance-controls label{display:none}
  .tour-camera-status{top:190px;left:10px;font-size:9px}.tour-subtitle{top:224px}
}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px;min-width:0}
.asset-info{position:relative;color:#566251;font:10px/1.6 Manrope,system-ui,sans-serif}
.asset-info summary{cursor:pointer;white-space:nowrap;padding:6px 0}
.asset-info summary:focus-visible{outline:2px solid #328c43;outline-offset:3px}
.asset-info-panel{position:absolute;z-index:100;right:0;top:calc(100% + 9px);width:320px;max-width:calc(100vw - 28px);padding:15px 18px;background:#fff;border:1px solid #d5dfd0;border-radius:9px;box-shadow:0 12px 40px #163b2529}
.asset-info-panel p{margin:9px 0 0}.asset-info-panel a{color:inherit;text-underline-offset:3px}
.scene-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;background:#f9faf6;border-top:1px solid #dbe3d6}
.scene-actions .legend{flex:1 1 auto;justify-content:flex-start;flex-wrap:wrap;min-width:0;height:auto;border:0;background:transparent}
.scene-actions .tour-button{flex:none;width:auto;margin:0;white-space:nowrap;justify-content:flex-end}
@media(max-width:480px){.camera-presets{gap:0}.camera-views button{padding:7px 5px;font-size:8px}.viewport{height:500px}.intro-panel h1 em{white-space:normal}.flow-controls button{padding:6px 8px}}

/* App-like desktop layout. The dock has its own reserved space, not an overlay
   on the WebGL viewport; camera fitting therefore sees the real available area. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.system-list{min-width:0;scrollbar-color:#9cad92 #edf2e9;scroll-padding-inline:10px;overscroll-behavior-x:contain}
.system-list:focus-visible{outline:2px solid #328c43;outline-offset:-3px}
.system-item:focus-visible,.tour-button:focus-visible,.narration-controls :focus-visible{outline:2px solid #328c43;outline-offset:-3px}
.system-item{flex-shrink:0}
.system-list::-webkit-scrollbar{height:7px}
.system-list::-webkit-scrollbar-thumb{background:#9cad92;border-radius:8px}
.system-list::-webkit-scrollbar-track{background:#edf2e9}

@media(min-width:851px){
  :root{--app-header-height:52px;--app-dock-height:78px}
  html,body{height:100%;overflow:hidden}
  body{height:100vh;height:100dvh;display:flex;flex-direction:column}
  .topbar{height:var(--app-header-height);flex:none;grid-template-columns:170px minmax(0,1fr) 260px;padding:0 22px}
  .brand-main{font-size:26px}.brand small{font-size:6px}
  .topbar nav{gap:20px}.nav-link{font-size:10px}.contact-link{font-size:9px;padding:10px 12px}
  main{flex:1;min-height:0;padding-bottom:var(--app-dock-height)}
  .experience{height:100%;min-height:0}
  .stage-shell{height:100%;min-height:0;flex:none;display:grid;grid-template-columns:minmax(0,1fr) 180px;grid-template-rows:36px 36px minmax(0,1fr) 40px auto}
  .stage-toolbar{grid-column:2;grid-row:1;height:36px;min-width:0;padding:0 10px;background:#f6f8f2;backdrop-filter:none;justify-content:flex-end}
  .stage-toolbar .status{display:none}
  .stage-toolbar .controls{gap:5px}.stage-toolbar .controls button{height:28px;min-width:30px}
  .flow-controls{grid-column:1;grid-row:1;min-width:0;flex-wrap:nowrap;justify-content:flex-start;gap:5px;padding:3px 14px;overflow-x:auto;scrollbar-width:thin}
  .flow-controls button{flex:none;font-size:9px;padding:5px 9px;white-space:nowrap}
  .camera-views{grid-column:1/-1;grid-row:2;flex-wrap:nowrap;min-width:0;padding:3px 14px;gap:6px}
  .camera-views button{padding:5px 9px;white-space:nowrap}
  .camera-presets{flex:none}.performance-controls{min-width:0;gap:6px}.performance-controls select{padding:4px 7px}
  .viewport{grid-column:1/-1;grid-row:3;height:auto;min-height:0;min-width:0;flex:1}
  .scene-actions{grid-column:1/-1;grid-row:4;padding:0 14px;min-width:0;gap:16px}
  .legend{padding:0;gap:14px;font-size:8px}
  .legend button{padding:4px 8px}
  .flow-guide{grid-column:1/-1;grid-row:5;min-height:0;padding:7px 16px;gap:5px 14px;grid-template-columns:170px minmax(0,1fr) minmax(0,1.2fr)}
  .flow-guide-title{grid-column:1;grid-row:1;font-size:10px;gap:4px}
  .flow-guide-title small{font-size:8px;margin-left:12px}
  .flow-guide ol{grid-column:2;grid-row:1/3;gap:5px;align-self:center;min-width:0}
  .flow-guide li{font-size:9px;line-height:1.35;padding:5px 7px}
  .flow-guide p{grid-column:3;grid-row:1/3;font-size:9px;line-height:1.45;max-width:none}
  .flow-guide>strong{font-size:10px;line-height:1.35}.flow-guide>strong+p{grid-column:2/4;grid-row:1}
  .air-switch{grid-column:1;grid-row:2;margin:0;gap:4px;flex-wrap:wrap;font-size:8px}
  .air-switch span{flex-basis:100%;font-size:8px}.air-switch button{font-size:9px;padding:3px 7px}
  .clean-view .scene-actions{justify-content:flex-end}
  .system-rail{position:fixed;z-index:45;inset:auto 0 0;height:var(--app-dock-height);display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:38px 40px;border-top:1px solid #cfdac8;box-shadow:0 -3px 14px #2339210a}
  .system-list{grid-column:1;grid-row:1/-1;min-height:0;max-height:none;gap:7px;padding:6px 12px 7px;overflow-x:auto;overflow-y:hidden;align-items:center}
  .system-item{flex:0 0 144px;width:144px;min-width:144px;min-height:58px;padding:8px 10px;gap:8px;grid-template-columns:24px minmax(0,1fr);grid-template-rows:1fr}
  .system-glyph{grid-row:1;width:24px;height:28px;font-size:16px}.system-name{font-size:10px;line-height:1.35}
  .scene-actions .tour-button{min-height:34px;padding:5px 0 5px 14px;font-size:9px;letter-spacing:.02em;border-left:1px solid #dbe4d4;background:transparent}
  .play-icon{width:24px;height:24px}
  .voice-status{grid-column:2;grid-row:1;display:grid;grid-template-columns:24px minmax(0,1fr) 28px;gap:7px;min-height:0;padding:4px 11px}
  .voice-status strong{font-size:8px}.voice-status small{font-size:9px}.voice-status button{width:28px;height:28px}
  .narration-controls{grid-column:2;grid-row:2;justify-content:space-between;gap:5px;padding:3px 11px;border-left:1px solid #dbe4d4}
  .narration-controls button,.narration-controls select{height:28px;min-width:28px;padding:3px 6px;font-size:11px}
  .narration-controls label{font-size:9px}.narration-controls input{width:74px}
  .detail-panel.open{top:83px;max-height:calc(100% - 104px)}
  .tour-camera-status{top:82px;left:14px;font-size:9px;padding:6px 9px;max-width:240px}
  .tour-subtitle{top:82px;max-height:80px;width:min(56%,760px);padding:8px 12px;font-size:10px;line-height:1.5}
  .toast{bottom:calc(var(--app-dock-height) + 12px)}
  .stage-shell:fullscreen{height:100vh;height:100dvh;overflow:hidden}
  .stage-shell:fullscreen .viewport{height:auto;min-height:0}
}

/* Touch layouts stay in document flow: no dock, footer or minimum-height scene
   can cover the basement, the selected explanation or narration controls. */
@media(max-width:850px){
  html,body{height:auto;overflow:visible}
  body{display:block;min-height:100vh}
  .topbar{height:auto;min-height:84px;padding:0 16px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:50px 34px}
  .brand{grid-column:1;grid-row:1}.header-actions{grid-column:2;grid-row:1;gap:12px}
  .asset-info-panel{position:fixed;right:14px;top:52px}
  .topbar nav{display:flex;grid-column:1/-1;grid-row:2;justify-content:flex-start;gap:23px}
  .nav-link{font-size:9px;letter-spacing:.02em}
  main{padding:0}.experience{height:auto;min-height:0}
  .stage-shell{height:auto;min-height:0;display:flex}
  .stage-toolbar{height:36px;padding:0 12px}
  .flow-controls{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:thin;padding:6px 8px}
  .flow-controls button{flex:none;white-space:nowrap;min-height:30px}
  .camera-views{padding:6px 8px;gap:5px}.camera-views button{min-height:30px}
  .performance-controls{gap:6px}.performance-controls select{min-height:30px}
  .viewport{flex:none;height:clamp(360px,62svh,650px);min-height:0}
  .scene-actions{flex-direction:column;align-items:stretch;padding:8px 10px;gap:6px}
  .legend{min-height:34px;height:auto;flex-wrap:wrap;gap:7px 13px;padding:0;overflow:visible}
  .scene-actions .tour-button{align-self:flex-end;max-width:100%;min-height:38px;padding:6px 0 6px 10px;font-size:9px;text-align:right}
  .flow-guide{flex:none;min-height:0;padding:10px 12px;gap:8px}
  .flow-guide li{font-size:10px;padding:7px}.air-switch button{min-height:32px}
  .system-rail{position:relative;inset:auto;height:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;border-top:1px solid #d1dcc9}
  .system-list{grid-column:1;grid-row:1;height:94px;min-height:0;max-height:none;overflow-x:auto;overflow-y:hidden;padding:9px 10px;gap:6px}
  .system-item{flex:0 0 143px;width:143px;min-width:143px;min-height:66px;grid-template-columns:25px minmax(0,1fr);grid-template-rows:1fr;padding:9px;gap:8px}
  .system-glyph{grid-row:1;width:25px}.system-name{font-size:10px;line-height:1.35}
  .voice-status{grid-column:1;grid-row:2;display:grid;grid-template-columns:28px minmax(0,1fr) 32px;min-height:46px;padding:6px 12px}
  .voice-status strong{font-size:8px}.voice-status small{font-size:10px}.voice-status button{width:32px;height:32px}
  .narration-controls{grid-column:1;grid-row:3;min-height:44px;justify-content:center;gap:12px;padding:6px 12px}
  .narration-controls button,.narration-controls select{min-width:32px;min-height:32px;font-size:12px}
  .narration-controls label{font-size:10px}.narration-controls input{width:88px}
  .detail-panel.open{position:relative;inset:auto;order:2;width:auto;max-height:none;margin:0;border-radius:0;padding:18px;transform:none}
  .tour-camera-status{top:186px;left:10px;max-width:210px}.tour-subtitle{top:221px;max-height:88px;padding:8px 12px}
  .view-hint{white-space:normal;max-width:85%;text-align:right}
  .stage-shell:fullscreen{height:100vh;height:100dvh;overflow:auto}
  .stage-shell:fullscreen .viewport{height:calc(100dvh - 230px);min-height:220px}
}
