/* Match the working normal-flow browser frame. The scene participates in
   document sizing; floating menus never participate in scene sizing. */
html{height:auto;min-width:0;margin:0;overflow:visible}
body{position:static;inset:auto;width:auto;height:auto;min-width:0;margin:0;overflow:visible;overscroll-behavior:auto}
/* Native CSS is the fallback during pinch zoom or without VisualViewport. */
#cosmos{display:block;position:relative;inset:auto;width:var(--browser-width,100%);height:var(--browser-height,100vh);height:var(--browser-height,100dvh);overflow:hidden}
[hidden]{display:none!important}
.scene-panel{pointer-events:auto!important;max-width:calc(var(--scene-width,100vw) - 24px);max-height:calc(var(--scene-height,100dvh) - 24px)}
.scene-panel-bar{display:flex;align-items:center;gap:8px;min-height:44px;padding:3px 7px 3px 12px;color:#b8d2cc;background:#122737f5;border:1px solid #809f9e55;border-radius:12px 12px 0 0;touch-action:none;user-select:none;cursor:grab}
.scene-panel-bar>span:not(.panel-move-grip){flex:1;font-size:13px;letter-spacing:.04em;white-space:nowrap}
.scene-panel-bar button{flex:none;min-width:38px;min-height:38px;padding:3px 7px!important;font-size:21px;border:0;background:none;color:#b9d6d0;border-radius:7px;touch-action:manipulation}
.scene-panel-bar button:hover{background:#91b7b42a}.scene-panel-bar .panel-position-reset{font-size:18px}
.scene-panel-content{min-height:0;min-width:0}.scene-panel-content:empty{display:none}
#controls-dock.scene-panel-controls{--panel-cap:min(740px,calc(var(--scene-height,100dvh) - var(--nav-height,64px) - 36px));display:flex;flex-direction:column;position:fixed;top:12px;right:12px;bottom:auto;left:auto;width:min(390px,calc(var(--scene-width,100vw) - 24px));height:auto;max-height:var(--panel-cap);z-index:8;pointer-events:auto}
#controls-dock>.scene-panel-content{display:flex;flex-direction:column;overflow:hidden;max-height:calc(var(--panel-cap) - 44px)}
#controls-dock .science,#controls-dock #scene-settings{position:relative;inset:auto;flex:1 1 auto;margin:0;width:100%;min-height:0;max-height:calc(var(--panel-cap) - 44px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;border-radius:0 0 14px 14px;border-top:0;padding:18px}
#controls-dock .science-head{display:none}
.scene-panel-navigation{display:flex;flex-direction:column;gap:0!important;position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 12px);transform:translateX(-50%);width:min(780px,calc(var(--scene-width,100vw) - 24px));max-width:calc(var(--scene-width,100vw) - 24px);padding:0!important;overflow:visible;z-index:9}
.scene-panel-navigation .scene-panel-bar{width:100%;border:0;background:none}
.scene-panel-navigation>.scene-panel-content{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;padding:0 7px 7px;overflow:visible}
.scene-panel-navigation button,.scene-panel-navigation summary,.scene-panel-navigation .nav-destination{min-height:44px;touch-action:manipulation}
.nav-category.opens-down>.nav-menu-list{top:calc(100% + 12px);bottom:auto}
.intro.scene-intro.scene-panel-identity{top:12px;left:12px;right:auto;width:min(290px,calc(var(--scene-width,100vw) - 24px));z-index:7;pointer-events:auto}
.scene-panel-identity>.scene-panel-content{padding:14px 13px 12px;overflow:auto;max-height:calc(var(--scene-height,100dvh) - 110px);background:#101c2c69;border:1px solid #809f9e33;border-top:0;border-radius:0 0 12px 12px}
.scene-panel-identity .view-help{max-width:100%;width:100%;background:#101c2cd9}.scene-panel-identity .view-help:not([open]){width:max-content}
.scene-panel-identity .view-help-content{max-height:min(320px,45dvh)}
.scene-panel-tab{position:fixed;z-index:16;display:flex;flex-direction:column;align-items:center;min-height:74px;width:42px;max-width:42px;border:1px solid #8fb1a866;background:#112737f5;color:#d9d9bb;box-shadow:0 7px 25px #0004;pointer-events:auto;touch-action:none}
.scene-panel-tab[data-edge="left"]{left:0;border-left:0;border-radius:0 11px 11px 0}.scene-panel-tab[data-edge="right"]{right:0;border-right:0;border-radius:11px 0 0 11px}
/* Keep the dock a single touch row; device safe-area padding must not inflate it. */
.scene-panel-tab[data-edge="bottom"]{flex-direction:row;width:max-content;max-width:calc(var(--scene-width,100vw) - 24px);min-width:118px;min-height:44px;padding-bottom:0;border-bottom:0;border-radius:11px 11px 0 0}
.scene-panel-tab[data-edge="bottom"] .panel-move-grip{width:32px;min-height:44px;align-self:stretch}
.scene-panel-tab[data-edge="bottom"]>button{writing-mode:horizontal-tb;min-height:44px;padding:9px 14px 9px 2px}
.scene-panel-tab .panel-move-grip{display:flex;align-items:center;min-height:25px;justify-content:center;width:100%;font-size:19px;line-height:1;cursor:grab;color:#92b6b0}
.scene-panel-tab>button{min-width:40px;min-height:46px;padding:4px 9px 12px;font-size:15px;letter-spacing:.12em;color:#e5d5a7;white-space:nowrap;writing-mode:vertical-rl;touch-action:manipulation}
.scene-tab-identity{top:12%}.scene-tab-controls{top:26%}.scene-tab-navigation{top:78%}
.scene-panel .floating-panel-handle{touch-action:none}
#feed-tab,#rescue-tab{z-index:18}
/* All overlay dimensions follow the visible browser box. Older device-width
   rules in the original stylesheets cannot move these panels off that box. */
.scene-panel-identity h1{font-size:clamp(30px,calc(var(--scene-width,100vw)*.032),40px)!important}
.scene-panel-identity h1 br{display:initial}.scene-panel-identity h1 span{display:block}
.tabs button{min-height:44px}.scene-panel-content select{min-height:44px;font-size:16px}.scene-panel-content input[type=range]{min-height:34px}
.nav-menu-list{overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:calc(var(--scene-width,100vw) - 24px)}
#f8-monitor.floating-panel{position:fixed;left:12px;top:auto;right:auto;bottom:12px;width:min(310px,calc(var(--scene-width,100vw) - 24px));max-height:calc(var(--scene-height,100dvh) - 24px);z-index:6;overflow:auto}
.mission.floating-panel{width:min(550px,calc(var(--scene-width,100vw) - 24px));max-height:calc(var(--scene-height,100dvh) - 24px)}
/* Portrait is a layout choice, independent of the device model or resolution. */
body[data-scene-layout="portrait"] #controls-dock.scene-panel-controls{--panel-cap:min(620px,calc(var(--scene-height,100dvh)*.56),calc(var(--scene-height,100dvh) - var(--nav-height,64px) - 36px));width:min(360px,calc(var(--scene-width,100vw) - 24px))}
body[data-scene-layout="portrait"] .scene-panel-navigation{width:calc(var(--scene-width,100vw) - 24px)}

/* Reserve one telemetry row without shrinking its text. */
#f8-monitor .monitor-foot{display:block;padding:9px 12px;font-size:16px;line-height:24px}
#f8-monitor #feed-position{display:block;min-width:0;white-space:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;font:inherit;font-variant-numeric:tabular-nums;touch-action:pan-x}
#feed-position::-webkit-scrollbar{display:none}
