:root{font-family:Inter,"Noto Sans SC","Microsoft YaHei",system-ui,sans-serif;color:#203449;background:#e9edf0;font-synthesis:none;--ink:#142e44;--muted:#71808d;--line:#e3e8ec;--blue:#235c85}*{box-sizing:border-box}body{margin:0}button,input,summary{font:inherit}button{cursor:pointer}button:focus-visible,summary:focus-visible,input:focus-visible,#viewport:focus-visible{outline:3px solid #44a6e9;outline-offset:3px}button{border:1px solid var(--line);border-radius:7px;background:white;color:var(--ink);padding:8px 10px;transition:background .15s}button:hover{background:#eaf2f7}button:disabled{cursor:wait;opacity:.6}.topbar{height:90px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:#fbfcfd;border-bottom:1px solid #dfe5ea;gap:20px}.identity{display:flex;align-items:center;gap:13px}.brand-mark{font-size:18px;font-weight:700;letter-spacing:-1px;color:white;background:#183b55;border-radius:9px;width:42px;height:42px;display:grid;place-items:center}.eyebrow{font-size:9px;letter-spacing:2px;font-weight:700;color:#79909f;margin-bottom:5px}h1{font-size:21px;letter-spacing:1px;line-height:1.1;margin:0;font-weight:650}.private-pill{font-size:10px;color:#6e808d;border:1px solid #dbe2e7;border-radius:20px;padding:5px 8px;margin-left:10px}.publish-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px 15px;font-size:12px}.publish-meta strong{font-size:12px}.publish-meta span{color:var(--muted)}.text-button{font-size:12px;background:none}.layout{display:grid;grid-template-columns:252px minmax(300px,1fr) 254px;height:calc(100dvh - 122px);min-height:620px;max-height:1200px}.panel{padding:24px 18px;background:#fcfdfe;overflow:auto;scrollbar-width:thin}.layers-panel{border-right:1px solid #dce4e9}.gallery-panel{border-left:1px solid #dce4e9}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}h2{font-size:14px;letter-spacing:.5px;margin:0}.small-tag{font-size:10px;line-height:1.6;background:#eef3f6;border-radius:4px;color:#627987;padding:2px 6px;white-space:nowrap}.panel-intro{color:var(--muted);font-size:11px;line-height:1.7;margin:9px 0 20px}.quick-actions{display:flex;gap:8px;margin-bottom:17px}.quick-actions button{flex:1;font-size:11px;padding:9px 4px}.group-list{display:grid;gap:3px}.group-label{display:flex;align-items:center;gap:10px;padding:10px 7px;border-radius:6px;font-size:12px;cursor:pointer}.group-label:hover{background:#f0f4f7}.group-label .dot{height:7px;width:7px;border-radius:50%;background:#8fa3b0;margin-left:auto}input{accent-color:#236187;height:15px;width:15px;margin:0;cursor:pointer}.group-label:has(input:not(:checked)){color:#94a0aa}.group-label:has(input:not(:checked)) .dot{background:#d9e0e5}.group-label:first-child{background:#eaf0f4;font-weight:650;margin-bottom:4px}.divider{height:1px;background:var(--line);margin:18px 0}.roof-control{display:flex;gap:10px;align-items:center;font-size:12px;cursor:pointer}.small-note{font-size:10px;color:#88939e;line-height:1.7;margin:9px 0 22px}.version-notes{font-size:11px;border-top:1px solid var(--line);padding-top:15px}.version-notes summary{cursor:pointer;font-size:12px;color:#415c6f}.version-notes ul{padding-left:16px;line-height:1.75;color:#7d8791}.version-notes li{margin:7px 0}.source-note{font-size:10px;line-height:1.8;color:#91a0aa;margin-top:22px}.stage{position:relative;min-width:0;background:linear-gradient(#eaf0f3,#d8e1e6);overflow:hidden;isolation:isolate}.stage:fullscreen{width:100vw;height:100vh}#viewport{position:absolute;inset:0;touch-action:none;outline:none}#viewport canvas{display:block;width:100%;height:100%}.stage-caption{position:absolute;top:24px;left:25px;font-size:12px;font-weight:550;display:flex;align-items:center;gap:8px;pointer-events:none}.live-dot{width:6px;height:6px;border-radius:50%;background:#437e92;box-shadow:0 0 0 4px #437e9215}.quality-label{font-size:9px;color:#85949e;border-left:1px solid #b7c6d0;padding-left:9px;margin-left:3px}.stage-tools{position:absolute;right:18px;top:20px;display:flex;flex-direction:column;gap:5px}.stage-tools button{width:35px;height:35px;font-size:18px;padding:0;background:#ffffffc9;backdrop-filter:blur(10px);border:1px solid #cad6df80;box-shadow:0 3px 15px #203a4f08}.bottom-bar{position:absolute;bottom:17px;left:20px;right:20px;pointer-events:none}.camera-tabs{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;pointer-events:auto}.camera-tabs button{font-size:11px;padding:10px 11px;background:#ffffffd9;backdrop-filter:blur(10px);border-color:#d5dfe7;white-space:nowrap;box-shadow:0 4px 16px #183b550a}.camera-tabs button.active{background:#173d58;color:white;border-color:#173d58}.gesture-help{font-size:10px;color:#667e8e;text-align:center;margin:12px 0 0;text-shadow:0 1px 2px white}.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;background:#eaf0f3e8;z-index:5;font-size:12px}.loading[hidden]{display:none}.loading span{font-size:11px;color:#7d909e}.loader-ring{height:32px;width:32px;border:2px solid #c4d5df;border-top-color:#376b8b;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-card{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:white;border:1px solid #d5dfe7;border-radius:12px;padding:24px;width:min(340px,85%);font-size:13px;z-index:6}.error-card p{color:#7d8995;line-height:1.6;font-size:12px}.update-toast{position:absolute;top:70px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:14px;padding:10px 12px 10px 18px;background:white;border-radius:9px;box-shadow:0 4px 24px #173d581f;font-size:12px;z-index:4}.update-toast[hidden]{display:none}.update-toast button{background:#1e5276;color:white}.gallery{display:grid;gap:19px}.gallery-card{display:block;width:100%;padding:0;border:0;border-radius:0;background:none;text-align:left}.gallery-card:hover{background:none}.gallery-card img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;background:#e6edf1;border-radius:7px;border:1px solid #e5ebef;transition:filter .15s}.gallery-card:hover img{filter:brightness(1.04)}.gallery-card .caption{display:block;margin-top:9px;font-size:11px;line-height:1.55}.gallery-card .tag{display:inline-block;font-size:9px;color:#6e8695;background:#edf3f6;padding:2px 5px;border-radius:3px;margin-top:5px}.gallery-card .tag.ai{background:#f2eef7;color:#8a76a4}.gallery-card .tag.pending{background:#faf2e5;color:#a38756}footer{height:32px;padding:0 23px;display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#8a9aa7;background:#f9fbfc;border-top:1px solid #dfe5ea}dialog{padding:0;border:0;border-radius:12px;background:#f8fafc;max-width:1100px;width:92vw;max-height:94dvh;box-shadow:0 15px 80px #0b223b40}dialog::backdrop{background:#0b213be0;backdrop-filter:blur(8px)}.close-dialog{position:absolute;top:12px;right:12px;border:0;border-radius:50%;height:35px;width:35px;padding:0;font-size:25px;color:#234055;background:#ffffffd9;z-index:2}.dialog-image-wrap{background:#e5ebef;display:flex;justify-content:center;align-items:center;min-height:160px}.dialog-image-wrap img{display:block;width:100%;height:auto;max-height:73dvh;object-fit:contain}.dialog-caption{padding:18px 24px 23px}.dialog-caption h2{margin-top:8px;font-size:15px}.dialog-caption p{font-size:12px;color:#788b98;margin-bottom:0;line-height:1.6}@media(min-width:1650px){.layout{grid-template-columns:282px minmax(500px,1fr) 295px}.panel{padding:25px 23px}}@media(max-width:1150px){.layout{grid-template-columns:225px minmax(300px,1fr)}.gallery-panel{grid-column:1/-1;border:0;border-top:1px solid var(--line);overflow:visible}.layout{height:auto;min-height:0}.layers-panel,.stage{height:calc(100dvh - 120px);min-height:590px}.gallery{grid-template-columns:repeat(4,1fr)}.gallery-panel .panel-intro{margin-bottom:15px}footer{height:auto;min-height:32px}.publish-meta span{display:none}}@media(max-width:680px){.topbar{height:100px;padding:15px 16px 12px;display:block}.identity{gap:10px}.brand-mark{width:35px;height:35px;font-size:15px}h1{font-size:18px}.eyebrow{font-size:8px;letter-spacing:1.5px;margin-bottom:4px}.private-pill{margin-left:auto;font-size:9px}.publish-meta{justify-content:flex-start;margin:9px 0 0;gap:9px;font-size:10px}.publish-meta strong{font-size:10px}.publish-meta .text-button{font-size:10px;margin-left:auto;border:0;padding:3px 2px}.layout{display:flex;flex-direction:column}.stage{order:0;height:61dvh;min-height:390px;max-height:650px}.layers-panel{order:1;height:auto;min-height:0;border:0;padding:20px 17px}.gallery-panel{order:2;padding:20px 17px}.stage-caption{left:18px;top:18px;font-size:11px}.stage-tools{right:13px;top:15px}.stage-tools button{height:31px;width:31px;font-size:17px}.bottom-bar{bottom:12px;left:10px;right:10px}.camera-tabs{gap:4px}.camera-tabs button{font-size:10px;padding:8px 7px}.gesture-help{font-size:8px;margin-top:9px}.group-list{grid-template-columns:1fr 1fr;gap:3px 8px}.group-label{padding:9px 7px;font-size:12px}.group-label:first-child{grid-column:1/-1}.quick-actions{margin-bottom:12px}.panel-intro{margin:7px 0 13px}.divider{margin:13px 0}.small-note{margin-bottom:14px}.source-note{margin:15px 0 0}.gallery{grid-template-columns:1fr 1fr;gap:18px 12px}.gallery-card .caption{font-size:11px}.gallery-card img{aspect-ratio:16/10}footer{padding:12px 17px;gap:8px;align-items:flex-start;flex-direction:column;font-size:9px}.dialog-caption{padding:14px 16px 19px}.quality-label{display:none}.version-notes{margin-top:13px}}
/* Long mobile pages must grow naturally; do not compress layer controls into a scroll sliver. */
@media(max-width:1150px){.layout{max-height:none}}
@media(max-width:680px){.stage,.panel{flex-shrink:0}.layers-panel,.gallery-panel{overflow:visible}}

/* Minimal two-draft comparison, independent of the publication version. */
.compare-control{position:absolute;top:52px;left:24px;right:66px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;z-index:3;pointer-events:none}.compare-control>span:first-child{background:#ffffffc9;border-radius:5px;padding:5px 7px;color:#456174}.compare-control button{pointer-events:auto;font-size:10px;padding:5px 8px;background:#f8fbfddd;border-color:#bbcbd6}.compare-control button[aria-pressed="true"]{background:#173d58;color:white}.compare-control [hidden]{display:none}#compareStatus{flex-basis:100%;background:#fff6e8;color:#936820;padding:7px 9px;border-radius:5px;line-height:1.5}.update-toast{top:106px}@media(max-width:680px){.compare-control{left:17px;top:44px;right:55px;gap:5px;font-size:10px}.compare-control button{font-size:10px}}
/* Touch walkthrough keeps the existing orbit viewer and comparison controls. */
.navigation-mode{position:absolute;left:24px;top:94px;z-index:3}.navigation-mode button{min-height:38px;font-size:11px;background:#ffffffdd;border-color:#b8ccd9}.navigation-mode button[aria-pressed=true]{background:#173d58;color:white}.walk-controls{position:absolute;left:22px;bottom:104px;z-index:3;text-align:center;user-select:none}.walk-controls[hidden],.look-hint[hidden]{display:none}#joystick{width:108px;height:108px;border:1px solid #7694aacc;border-radius:50%;background:#163e5870;display:flex;align-items:center;justify-content:center;touch-action:none;user-select:none;-webkit-user-select:none}#joystick span{position:absolute;pointer-events:none;color:#fff;font-size:17px}.joy-up{top:3px}.joy-down{bottom:23px}.joy-left{left:7px}.joy-right{right:7px}#stick{width:41px;height:41px;border-radius:50%;background:#f3f8ffcf;border:1px solid #fff;box-shadow:0 2px 10px #14344c38;pointer-events:none}.walk-label{display:block;font-size:10px;color:#3c5e75;margin-top:5px}.look-hint{position:absolute;right:22px;bottom:147px;font-size:11px;line-height:1.7;color:#355c77;pointer-events:none;background:#ffffffbb;padding:8px 11px;border-radius:7px}.is-walking .gesture-help{line-height:1.6}.navigation-mode button:disabled{cursor:default;opacity:.65}.stage button{touch-action:manipulation}@media(max-width:680px){.navigation-mode{left:17px;top:89px}.navigation-mode button{min-height:40px;font-size:11px}.walk-controls{left:17px;bottom:108px}#joystick{width:96px;height:96px}#stick{width:36px;height:36px}.look-hint{right:17px;bottom:145px;font-size:10px}.is-walking .gesture-help{max-width:350px;margin-left:auto;margin-right:auto}}@media(max-height:500px) and (orientation:landscape){.stage:fullscreen .walk-controls{bottom:73px}.stage:fullscreen .look-hint{bottom:108px}.stage:fullscreen #joystick{width:90px;height:90px}.stage:fullscreen .navigation-mode{top:94px}}
/* Both native fullscreen and the fallback clear the normal page's height limits. */
.stage:fullscreen,.stage.is-expanded{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;min-height:0;max-height:none;z-index:1000}.stage.is-expanded{width:var(--expanded-width,100vw);height:var(--expanded-height,100dvh)}.stage:fullscreen .stage-tools,.stage.is-expanded .stage-tools{right:max(13px,env(safe-area-inset-right));top:max(15px,env(safe-area-inset-top))}.stage:fullscreen .bottom-bar,.stage.is-expanded .bottom-bar{bottom:max(12px,env(safe-area-inset-bottom));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right))}.stage:fullscreen .walk-controls,.stage.is-expanded .walk-controls{left:max(17px,env(safe-area-inset-left))}.fullscreen-status{position:absolute;bottom:82px;left:50%;transform:translateX(-50%);z-index:4;width:max-content;max-width:80%;padding:9px 12px;border-radius:7px;background:#173d58ed;color:white;font-size:11px;line-height:1.6;pointer-events:none}.fullscreen-status[hidden]{display:none}@media(max-height:500px) and (orientation:landscape){.stage:fullscreen .walk-controls,.stage.is-expanded .walk-controls{bottom:76px} .stage:fullscreen .look-hint,.stage.is-expanded .look-hint{bottom:107px}.stage:fullscreen #joystick,.stage.is-expanded #joystick{width:86px;height:86px}.stage:fullscreen .stage-caption,.stage.is-expanded .stage-caption{top:max(12px,env(safe-area-inset-top));left:max(17px,env(safe-area-inset-left))}.stage:fullscreen .compare-control,.stage.is-expanded .compare-control{top:36px;left:max(17px,env(safe-area-inset-left))}.stage:fullscreen .navigation-mode,.stage.is-expanded .navigation-mode{top:72px;left:max(17px,env(safe-area-inset-left))}.stage:fullscreen .bottom-bar,.stage.is-expanded .bottom-bar{bottom:max(6px,env(safe-area-inset-bottom))}.stage:fullscreen .gesture-help,.stage.is-expanded .gesture-help{margin-top:5px;font-size:9px}.stage:fullscreen .camera-tabs button,.stage.is-expanded .camera-tabs button{padding:7px 9px}}
.stage-tools .wireframe-button{font-size:10px;font-weight:650}.stage-tools .wireframe-button[aria-pressed=true]{background:#173d58;color:white;border-color:#173d58}
.gallery-type,.gallery-time{display:block;font-size:9px;line-height:1.65;color:#7b8c99;margin-top:4px}.gallery-time{font-variant-numeric:tabular-nums;color:#697e8e}.gallery-card .tag{white-space:normal;line-height:1.6}.publish-meta #timestamp{display:inline;font-variant-numeric:tabular-nums;font-size:10px}@media(max-width:680px){.topbar{height:auto;min-height:100px;padding-bottom:13px}.publish-meta{gap:5px 9px}.publish-meta #timestamp{order:3;flex-basis:100%;font-size:9px;line-height:1.6}}
.stage-surface{position:absolute;left:0;top:0;width:var(--surface-width,100%);height:var(--surface-height,100%);transform-origin:0 0;overflow:hidden}.stage-surface.is-rotated{transform:translateX(var(--rotate-offset)) rotate(90deg)}.stage-tools .direction-button{font-size:10px;font-weight:650}.stage-tools .direction-button[aria-pressed=true]{background:#e0edf5;border-color:#6085a0}.stage.manual-landscape .walk-controls{bottom:76px}.stage.manual-landscape .look-hint{bottom:107px}.stage.manual-landscape #joystick{width:86px;height:86px}.stage.manual-landscape .stage-caption{top:12px;left:17px}.stage.manual-landscape .compare-control{top:36px;left:17px}.stage.manual-landscape .navigation-mode{top:72px;left:17px}.stage.manual-landscape .bottom-bar{bottom:8px;left:12px;right:12px}.stage.manual-landscape .gesture-help{margin-top:5px;font-size:9px;max-width:none}.stage.manual-landscape .camera-tabs button{padding:7px 9px}.stage.manual-landscape .stage-tools{top:12px;right:14px;gap:4px}.stage.manual-landscape .stage-tools button{height:30px;width:32px}.stage.manual-landscape .quality-label{display:none}
/* Safe areas are expressed in the surface's logical coordinate system. */
.stage-surface{--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}.stage-surface.is-rotated{--safe-left:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-left,0px)}.stage.manual-landscape .stage-surface .stage-tools,.stage .stage-surface.is-rotated .stage-tools{top:calc(12px + var(--safe-top));right:max(14px,var(--safe-right))}.stage.manual-landscape .stage-surface .stage-caption{top:calc(12px + var(--safe-top));left:max(17px,var(--safe-left))}.stage.manual-landscape .stage-surface .compare-control{top:calc(36px + var(--safe-top));left:max(17px,var(--safe-left))}.stage.manual-landscape .stage-surface .navigation-mode{top:calc(72px + var(--safe-top));left:max(17px,var(--safe-left))}.stage.manual-landscape .stage-surface .bottom-bar,.stage .stage-surface.is-rotated .bottom-bar{bottom:max(8px,var(--safe-bottom));left:max(12px,var(--safe-left));right:max(12px,var(--safe-right))}.stage.manual-landscape .stage-surface .walk-controls{left:max(17px,var(--safe-left));bottom:calc(76px + var(--safe-bottom))}.stage.manual-landscape .stage-surface .look-hint{right:max(17px,var(--safe-right));bottom:calc(107px + var(--safe-bottom))}

button:disabled,input:disabled{cursor:not-allowed;opacity:.42}.empty-symbol{font-size:56px;color:#4e8790;line-height:1}.empty-gallery{border:1px dashed #cbd8df;border-radius:12px;padding:24px 14px;text-align:center;color:#657887;font-size:14px;line-height:1.8}.empty-gallery small{font-size:12px}.loading{background:radial-gradient(ellipse at center,#f4f7f9,#e9eff3)}.loading strong{font-size:20px}.live-dot{background:#9ba9b4!important;box-shadow:none!important}

#updateStatus{max-width:380px;font-size:11px;color:#526977;line-height:1.5}.publish-meta{flex-wrap:wrap}#views{flex-wrap:wrap}@media(max-width:700px){#updateStatus{max-width:100%}.camera-tabs{gap:4px}.camera-tabs button{font-size:11px;padding:7px}}

.navigation-mode{display:flex;gap:0;border:1px solid #b8ccd9;border-radius:10px;overflow:hidden;background:#fff}.navigation-mode button{border:0;border-radius:0;padding:9px 13px;min-width:76px}.navigation-mode button+button{border-left:1px solid #c9d8e2}.navigation-mode button[aria-pressed=true]{background:#173d58;color:white}@media(max-width:480px){.navigation-mode button{padding:8px 11px;min-width:72px;font-size:12px}}

.stage-tools .wireframe-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:10px;line-height:1.08;font-weight:600;padding:0}.stage-tools .wireframe-button span{display:block;white-space:nowrap;line-height:1.08}

/* One compact bottom help line; joystick stays in the lower-left safe area. */
#lookHint{display:none!important;pointer-events:none}
#walkControls{left:max(10px,var(--safe-left,env(safe-area-inset-left)));bottom:calc(24px + var(--safe-bottom,env(safe-area-inset-bottom)));margin:0}
#walkControls #joystick{width:96px;height:96px}
#walkControls .walk-label{display:none}
#stageSurface .bottom-bar{bottom:calc(6px + var(--safe-bottom,env(safe-area-inset-bottom)));left:max(10px,var(--safe-left,env(safe-area-inset-left)));right:max(10px,var(--safe-right,env(safe-area-inset-right)))}
#stageSurface .camera-tabs{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;scrollbar-width:none;max-width:100%;pointer-events:auto}
#stageSurface .camera-tabs::-webkit-scrollbar{display:none}
#stageSurface .camera-tabs button{flex:0 0 auto;white-space:nowrap}
.stage.is-walking #stageSurface .camera-tabs{margin-left:110px;margin-right:42px}
#stageSurface .gesture-help{font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:7px auto 0;max-width:100%;text-align:center;pointer-events:none}
@media(max-width:480px){#stageSurface .gesture-help{font-size:9px}.stage.is-walking #stageSurface .camera-tabs{margin-left:106px;margin-right:34px}}
/* One compact, centered overlay. Version and current-view details stay tucked away. */
.stage .stage-surface .viewer-toolbar{position:absolute;z-index:4;top:calc(10px + var(--safe-top));left:max(10px,var(--safe-left));right:max(54px,calc(44px + var(--safe-right)));display:flex;justify-content:center;align-items:center;gap:4px;pointer-events:none}
.stage .stage-surface .viewer-toolbar .navigation-mode{position:static;inset:auto;display:flex;flex:0 1 auto;overflow:hidden;border:1px solid #b8ccd9;border-radius:9px;background:#fffffff0;pointer-events:auto;box-shadow:0 2px 12px #183b550c}
.stage .stage-surface .viewer-toolbar .navigation-mode button{min-width:0;min-height:40px;height:40px;padding:0 13px;font-size:12px;white-space:nowrap}
/* Two explicit compact groups; no hidden version menu. */
.stage .stage-surface .viewer-toolbar{flex-wrap:wrap;gap:5px}
.version-switch{display:flex;flex:0 0 auto;pointer-events:auto;border:1px solid #b8ccd9;border-radius:9px;overflow:hidden;background:#fffffff0}
.version-switch button{border:0;border-radius:0;height:40px;min-width:0;padding:0 12px;font-size:12px;white-space:nowrap;background:transparent}
.version-switch button+button{border-left:1px solid #c9d8e2}.version-switch button[aria-pressed=true]{background:#173d58;color:white}
.loaded-details{display:flex;flex-direction:column;gap:6px;font-size:11px;line-height:1.5;color:#627987;margin-top:16px}
.stage .update-toast{top:calc(100px + var(--safe-top))}
@media(max-width:480px){.stage .stage-surface .viewer-toolbar{gap:4px}.stage .stage-surface .viewer-toolbar .navigation-mode button{padding:0 11px;font-size:11px}.version-switch button{padding:0 13px;height:36px;font-size:11px}}
/* Direction markers use the joystick's own center, with equal opposite offsets. */
#joystick{position:relative}
#joystick .joy-up,#joystick .joy-down,#joystick .joy-left,#joystick .joy-right{position:absolute;width:18px;height:18px;display:grid;place-items:center;font-size:16px;line-height:18px;pointer-events:none;margin:0}
#joystick .joy-up{top:4px;bottom:auto;left:50%;right:auto;transform:translateX(-50%)}
#joystick .joy-down{bottom:4px;top:auto;left:50%;right:auto;transform:translateX(-50%)}
#joystick .joy-left{left:4px;right:auto;top:50%;bottom:auto;transform:translateY(-50%)}
#joystick .joy-right{right:4px;left:auto;top:50%;bottom:auto;transform:translateY(-50%)}
/* Independent side panels reallocate grid space; edge controls stay outside the model. */
@media(min-width:901px){.layout{--left-panel:clamp(200px,18vw,270px);--right-panel:clamp(210px,19vw,280px);display:grid;grid-template-columns:28px var(--left-panel) minmax(0,1fr) var(--right-panel) 28px;height:calc(100dvh - 122px);min-height:540px;max-height:1200px}.layout.left-collapsed{--left-panel:0px}.layout.right-collapsed{--right-panel:0px}.layout .layers-panel{grid-column:2;grid-row:1;min-width:0;height:auto;min-height:0}.layout .stage{grid-column:3;grid-row:1;height:auto;min-height:0}.layout .gallery-panel{grid-column:4;grid-row:1;min-width:0;height:auto;min-height:0;overflow:auto;border-left:1px solid var(--line)}.layout .gallery{grid-template-columns:1fr}.toggle-layers{grid-column:1;grid-row:1}.toggle-gallery{grid-column:5;grid-row:1}.panel-toggle{width:28px;min-width:0;height:100%;padding:0 5px;writing-mode:vertical-rl;border-radius:0;border-color:#d8e2e9;background:#f3f7fa;font-size:11px;letter-spacing:2px}.layout.left-collapsed .layers-panel,.layout.right-collapsed .gallery-panel{padding:0;border:0;overflow:hidden;visibility:hidden}}
@media(max-width:900px){.layout{display:flex;flex-direction:column;height:auto;min-height:0}.layout .stage{order:0;width:100%;height:61dvh;min-height:390px;max-height:650px}.panel-toggle{width:100%;height:40px;flex:none;border-radius:0;background:#f3f7fa;font-size:12px}.toggle-layers{order:1}.layout .layers-panel{order:2;width:100%;height:auto;min-height:0}.toggle-gallery{order:3}.layout .gallery-panel{order:4;width:100%;height:auto;min-height:0}.layout.left-collapsed .layers-panel,.layout.right-collapsed .gallery-panel{display:none}.layout .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
.layout .stage:fullscreen,.layout .stage.is-expanded{position:fixed;inset:0;width:var(--expanded-width,100vw);height:var(--expanded-height,100dvh);min-height:0;max-height:none}

/* All frequent actions share the top center; wrapping follows actual stage width. */
.stage .stage-surface .viewer-toolbar{left:max(10px,var(--safe-left));right:max(10px,var(--safe-right));gap:5px;align-items:center;flex-direction:row;flex-wrap:wrap}
.stage .stage-surface .viewer-toolbar .stage-tools{position:static;inset:auto;display:flex;flex:0 0 auto;flex-direction:row;gap:4px;pointer-events:auto}
.stage .stage-surface .viewer-toolbar .stage-tools button{width:40px;height:40px;min-width:40px;margin:0;flex:none}
.stage .stage-surface .viewer-toolbar .navigation-mode button,.stage .stage-surface .viewer-toolbar .version-switch button{height:40px;min-height:40px}
/* Mirrored bottom control areas, with a stable single-tap cross on the right. */
#walkControls{width:120px;height:120px;display:grid;place-items:center;bottom:calc(20px + var(--safe-bottom));left:max(10px,var(--safe-left))}#walkControls[hidden]{display:none}
.position-pad{position:absolute;right:max(10px,var(--safe-right));bottom:calc(20px + var(--safe-bottom));width:120px;height:120px;display:grid;grid-template-columns:repeat(3,40px);grid-template-rows:repeat(3,40px);z-index:3;pointer-events:none}
.position-pad button{width:40px;height:40px;padding:0;display:grid;place-items:center;font-size:21px;line-height:1;pointer-events:auto;background:#ffffffe0;touch-action:manipulation}
.position-pad #zoomIn{grid-column:2;grid-row:1}.position-pad #zoomOut{grid-column:2;grid-row:3}.position-pad #panLeft{grid-column:1;grid-row:2}.position-pad #panRight{grid-column:3;grid-row:2}
.stage .stage-surface .bottom-bar{left:142px;right:142px;bottom:max(8px,var(--safe-bottom))}.stage .stage-surface .bottom-bar .gesture-help{white-space:normal;line-height:1.35}
.stage .stage-surface #walkControls{bottom:calc(20px + var(--safe-bottom));left:max(10px,var(--safe-left))}
#stageSurface .bottom-bar{left:142px;right:142px;bottom:max(8px,var(--safe-bottom))}
.stage.is-walking #stageSurface .camera-tabs{margin-left:0;margin-right:0}
#stageSurface .gesture-help{white-space:normal;line-height:1.35}
/* One bottom-center launcher; the full view list appears above the pads on demand. */
#stageSurface{container-type:size}
#stageSurface .bottom-bar{z-index:4}
.view-picker{position:static;display:flex;justify-content:center;pointer-events:auto}
.view-picker>summary{box-sizing:border-box;list-style:none;width:min(112px,100%);height:42px;display:grid;place-items:center;padding:0 6px;margin:0 auto;border:1px solid #b9cbd8;border-radius:8px;background:#fffffff0;font-size:12px;color:#173d58;cursor:pointer;white-space:nowrap;touch-action:manipulation}
.view-picker>summary::-webkit-details-marker{display:none}.view-picker[open]>summary{background:#173d58;color:white}
.view-picker-panel{position:absolute;bottom:146px;left:50%;transform:translateX(-50%);width:min(460px,calc(100cqw - 24px));max-height:max(80px,calc(100cqh - 260px));overflow:auto;overscroll-behavior:contain;border:1px solid #b9cbd8;border-radius:10px;background:#fffffff5;backdrop-filter:blur(12px);padding:8px;box-shadow:0 8px 30px #173d5830;pointer-events:auto}
.view-picker:not([open]) .view-picker-panel{display:none}
#stageSurface .view-picker .camera-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;overflow:visible;margin:0;max-width:100%}
#stageSurface .view-picker .camera-tabs button{min-width:0;min-height:40px;padding:9px 8px;font-size:11px;line-height:1.35;white-space:normal;text-align:left}
#stageSurface .view-picker .camera-tabs button[aria-pressed=true]{background:#173d58;color:white;border-color:#173d58}
#stageSurface .gesture-help{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:6px;line-height:12px;font-size:9px}
@container(max-width:480px){#stageSurface .view-picker .camera-tabs{grid-template-columns:minmax(0,1fr)}}

/* Thin single-line page header; publication details live in the existing sidebar. */
.topbar{height:52px;min-height:52px;padding:0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));display:flex;flex-wrap:nowrap;gap:10px}
.topbar .identity{min-width:0;gap:8px;flex:1}.topbar .identity>div{min-width:0}.topbar .brand-mark{width:28px;height:28px;flex:0 0 28px;font-size:13px;border-radius:6px}.topbar .eyebrow{display:none}.topbar h1{font-size:16px;line-height:1.2;letter-spacing:.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar .private-pill{margin-left:4px;padding:3px 6px;white-space:nowrap;font-size:9px}.topbar .publish-meta{display:flex;flex:0 0 auto;margin:0;gap:0;flex-wrap:nowrap}.topbar #refresh{height:40px;min-height:40px;padding:0 10px;font-size:12px;white-space:nowrap;border:1px solid var(--line);margin:0}.loaded-details #version{font-size:11px;line-height:1.5}.loaded-details #timestamp,.loaded-details #updateStatus{font-size:10px;line-height:1.5;color:var(--muted)}
@media(min-width:901px){.layout{height:calc(100dvh - 84px);min-height:320px}}
@media(max-width:900px){.topbar{height:48px;min-height:48px}.layout .stage{height:calc(100dvh - 48px);min-height:260px;max-height:none}.topbar h1{font-size:15px}}
@media(max-width:390px){.topbar{padding-left:8px;padding-right:8px;gap:6px}.topbar .private-pill{display:none}.topbar #refresh{padding:0 8px}}
.layout .stage:fullscreen,.layout .stage.is-expanded{height:var(--expanded-height,100dvh);min-height:0;max-height:none}

/* Compact, non-blocking model-loading card: controls stay usable on phones. */
#loading{inset:auto;top:50%;left:50%;transform:translate(-50%,-50%);width:min(300px,calc(100% - 32px));gap:10px;padding:20px 18px;border:1px solid #ccdae4;border-radius:14px;background:#f8fbf9f5;box-shadow:0 10px 34px #173d5814;pointer-events:none;text-align:center;z-index:3}
#loading strong{font-size:16px}#loading #loadPercent{font-size:28px;font-variant-numeric:tabular-nums;font-weight:650;color:#235c85;line-height:1}#loadPercent:empty{display:none}#loadProgress{display:block;width:100%;height:8px;border:0;border-radius:8px;overflow:hidden;accent-color:#235c85}#loadProgress::-webkit-progress-bar{background:#dce7ed;border-radius:8px}#loadProgress::-webkit-progress-value{background:#235c85;border-radius:8px}#loadProgress::-moz-progress-bar{background:#235c85;border-radius:8px}#loading #loadDetail{font-size:11px;line-height:1.5;color:#617887}
@container(max-height:350px){#loading{padding:10px 14px;gap:5px;max-width:260px}#loading strong{font-size:13px}#loading #loadPercent{font-size:20px}}
