/* DEC478: the ORB shell on the RAiN Field interface. One full-bleed globe, a 44 px translucent header, floating glass
 * map controls, bottom slide-up panels with a 20 px top radius and heavy backdrop blur, and a 200 px overflow menu under
 * the header's right edge. The palette, blur, radii and motion are the reference's. Loaded after canvas-workspace.css;
 * it restyles existing elements by id and styles the new shell elements (.orb-hud-top, .orb-panel, #orbPill, .orb-help).
 * The layout is deliberately identical at 390 and 1280 — the phone block below carries tap sizes, not a second layout. */
:root{
 --orb-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue","Segoe UI",Inter,Roboto,sans-serif;
 --orb-mono:"SF Mono",ui-monospace,Menlo,Consolas,monospace;
 --orb-accent:#4CA6EA;--orb-accent-ink:#ffffff;--orb-teal:#48c8b2;--orb-teal-soft:rgba(72,200,178,.15);--orb-select:#eab308;--orb-ok:#48bb78;--orb-warn:#eab308;--orb-danger:#e37263;
 --orb-glass:rgba(30,41,59,.82);--orb-glass-strong:rgba(51,65,85,.95);--orb-glass-line:rgba(148,163,184,.25);--orb-glass-ink:#f1f5f9;--orb-glass-ink-2:#94a3b8;
 --orb-sheet:rgba(71,85,105,.92);--orb-sheet-2:#334155;--orb-sheet-3:#475569;--orb-ink:#f1f5f9;--orb-ink-2:#94a3b8;--orb-ink-3:#64748b;--orb-hair:rgba(148,163,184,.25);--orb-chip:#334155;--orb-field:#1e293b;
 --orb-header:44px;--orb-safe-top:env(safe-area-inset-top,0px);
 --orb-r-s:10px;--orb-r-m:14px;--orb-r-l:20px;--orb-tap:44px;--orb-shadow:0 12px 40px rgba(0,0,0,.45);--orb-blur:blur(20px) saturate(1.8);--orb-blur-heavy:blur(30px) saturate(1.8);
 --orb-ease:cubic-bezier(.4,0,.2,1);--orb-t:.3s;
}
/* System-light stays opt-in (data-theme="light") until the legacy panels and dialogs are themed. */
@media(prefers-color-scheme:light){:root[data-theme="light"] body.orb-shell{
 --orb-sheet:rgba(248,250,252,.96);--orb-sheet-2:#e2e8f0;--orb-sheet-3:#cbd5e1;--orb-ink:#0f172a;--orb-ink-2:#475569;--orb-ink-3:#64748b;--orb-hair:rgba(100,116,139,.3);--orb-chip:#e2e8f0;--orb-field:#f1f5f9;--orb-accent:#2b7fc0;--orb-shadow:0 12px 40px rgba(15,23,42,.18);}}
:root[data-theme="light"] body.orb-shell{
 --orb-sheet:rgba(248,250,252,.96);--orb-sheet-2:#e2e8f0;--orb-sheet-3:#cbd5e1;--orb-ink:#0f172a;--orb-ink-2:#475569;--orb-ink-3:#64748b;--orb-hair:rgba(100,116,139,.3);--orb-chip:#e2e8f0;--orb-field:#f1f5f9;--orb-accent:#2b7fc0;--orb-shadow:0 12px 40px rgba(15,23,42,.18);}
body.orb-shell{font-family:var(--orb-font);-webkit-font-smoothing:antialiased}
body.orb-shell button,body.orb-shell input,body.orb-shell select,body.orb-shell textarea,body.orb-shell summary{font-family:var(--orb-font)}
@media(prefers-reduced-motion:reduce){body.orb-shell *{transition:none!important;animation:none!important}}

/* ── The globe is the app, at every width ────────────────────────────────────────────────────── */
body.orb-shell #canvasTop{display:none!important}
body.orb-shell #owApp{display:block!important;position:fixed;inset:0;top:0!important;bottom:0!important}
body.orb-shell .world-head,body.orb-shell footer.world-context,body.orb-shell #worldAdvanced{display:none!important}
body.orb-shell #worldPane{position:absolute!important;inset:0!important;height:auto!important}
body.orb-shell #worldViewport{height:100%}
body.orb-shell .studio-divider{display:none!important}
/* Old toolbar: its buttons live on through the header (Layers/Measure) and the ⋯ menu (Reset view); the bar itself hides. */
body.orb-shell .world-toolbar{display:none!important}
body.orb-shell .world-toolbar #worldTerrain{display:none}
body.orb-shell #canvasBottom{display:none!important}
/* iOS hardening, as the reference does it. */
body.orb-shell #worldViewport,body.orb-shell .cesium-widget,body.orb-shell .cesium-widget canvas{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
body.orb-shell button,body.orb-shell summary,body.orb-shell [role=button],body.orb-shell label{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
body.orb-shell :is(input,textarea,[contenteditable]){-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}

/* ── Header ──────────────────────────────────────────────────────────────────────────────────── */
body.orb-shell .orb-hud{position:absolute;inset:0;pointer-events:none;z-index:30;transition:opacity var(--orb-t) ease}
body.orb-shell .orb-hud>*{pointer-events:auto}
body.orb-shell #worldViewport.orb-dragging .orb-hud-stack{opacity:.35}
body.orb-shell .orb-hud-top{position:absolute;top:0;left:0;right:0;height:calc(var(--orb-header) + var(--orb-safe-top));padding-top:var(--orb-safe-top);display:flex;align-items:center;gap:8px;background:var(--orb-glass);backdrop-filter:var(--orb-blur);-webkit-backdrop-filter:var(--orb-blur);border-bottom:1px solid var(--orb-hair);z-index:40}
body.orb-shell .orb-brand{display:flex;align-items:center;gap:8px;min-width:0;flex:1;font-size:15px;font-weight:500;color:var(--orb-glass-ink);letter-spacing:.02em}
body.orb-shell .orb-brand img{width:22px;height:22px;object-fit:contain;flex:none}
body.orb-shell .orb-brand strong{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body.orb-shell .orb-hud-actions{display:flex;align-items:center;gap:2px;flex:none}
body.orb-shell .orb-hbtn{width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--orb-glass-ink-2);font-size:16px;display:grid;place-items:center;cursor:pointer;position:relative;transition:all .2s ease}
body.orb-shell .orb-hbtn img{width:20px;height:20px;opacity:.8;transition:opacity .2s ease;display:block}
/* The ruler glyph is a legacy asset: a white mark on an opaque dark tile. Screen-blending drops the tile into the
   header instead of showing a dark box beside the reference's own transparent glyphs. */
body.orb-shell .orb-hbtn img[data-orb-glyph=measure]{mix-blend-mode:screen}
body.orb-shell .orb-hbtn:hover{background:rgba(100,116,139,.3)}
body.orb-shell .orb-hbtn:hover img{opacity:1}
body.orb-shell .orb-hbtn:active{background:rgba(100,116,139,.5);transform:scale(.96)}
body.orb-shell .orb-hbtn.orb-active,body.orb-shell .orb-hbtn[aria-pressed="true"]{background:var(--orb-teal-soft);color:var(--orb-teal)}
body.orb-shell .orb-hbtn.orb-active img,body.orb-shell .orb-hbtn[aria-pressed="true"] img{opacity:1}
body.orb-shell .orb-hbtn-text{font-size:18px;line-height:1;letter-spacing:.06em}
body.orb-shell .orb-hbtn.orb-has-badge::after{content:'';position:absolute;right:5px;top:5px;width:7px;height:7px;border-radius:50%;background:var(--orb-teal)}
body.orb-shell .orb-brand .orb-chip{flex:none;font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:rgba(148,163,184,.2);color:var(--orb-glass-ink-2);white-space:nowrap}
body.orb-shell .orb-brand .orb-chip.orb-live{color:var(--orb-ok)}
body.orb-shell .orb-brand .orb-chip[hidden]{display:none}
/* The status strip directly under the header. */
body.orb-shell #worldTerrainStatus{position:absolute!important;left:0;right:0;top:calc(var(--orb-header) + var(--orb-safe-top))!important;bottom:auto!important;transform:none!important;width:auto!important;max-width:none!important;margin:0!important;border:0!important;border-bottom:1px solid var(--orb-hair)!important;border-radius:0!important;padding:8px 16px!important;background:var(--orb-glass-strong)!important;color:var(--orb-glass-ink)!important;font-size:13px;z-index:39;backdrop-filter:var(--orb-blur);-webkit-backdrop-filter:var(--orb-blur)}
body.orb-shell #worldTerrainStatus[hidden]{display:none}

/* ── Floating map controls (My location) ─────────────────────────────────────────────────────── */
body.orb-shell .orb-hud-stack{position:absolute;right:16px;top:calc(var(--orb-header) + var(--orb-safe-top) + 16px);display:flex;flex-direction:column;gap:8px;transition:top var(--orb-t) ease}
body.orb-shell .orb-glass{background:var(--orb-glass);color:var(--orb-glass-ink);border:1px solid var(--orb-glass-line);backdrop-filter:var(--orb-blur);-webkit-backdrop-filter:var(--orb-blur);box-shadow:0 4px 12px rgba(0,0,0,.25)}
body.orb-shell .orb-round{width:var(--orb-tap);height:var(--orb-tap);min-height:var(--orb-tap);border-radius:8px;display:grid;place-items:center;padding:0!important;font-size:18px;line-height:1;cursor:pointer;color:var(--orb-glass-ink);position:relative;transition:all .2s ease}
body.orb-shell .orb-round:hover{background:var(--orb-glass-strong)}
body.orb-shell .orb-round:active{transform:scale(.96)}
body.orb-shell .orb-round[aria-pressed="true"]{background:var(--orb-teal-soft);border-color:var(--orb-teal);color:var(--orb-teal)}
body.orb-shell .orb-round:disabled{opacity:.45;cursor:default}
body.orb-shell .orb-round svg,body.orb-shell #orbComposerPlus svg,body.orb-shell #orbSheetTitle button svg,body.orb-shell #orbResearchNav svg,body.orb-shell #orbPill svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
body.orb-shell #orbSheetTitle button svg{width:16px;height:16px}
body.orb-shell #orbSheetTitle .orb-help{display:inline-grid;place-items:center}
body.orb-shell .orb-round .orb-badge{position:absolute;right:-3px;top:-3px;width:10px;height:10px;border-radius:50%;background:var(--orb-ok);border:2px solid #1e293b}
body.orb-shell .orb-round.orb-busy svg{animation:orb-pulse 1s ease-in-out infinite}
@keyframes orb-pulse{50%{opacity:.35}}

/* ── Floating globe cards (photo capture, feature cards) ─────────────────────────────────────── */
body.orb-shell .world-popover{position:absolute;z-index:35;top:calc(var(--orb-header) + var(--orb-safe-top) + 16px);left:12px;right:auto;width:min(340px,calc(100% - 24px));padding:12px 14px;border-radius:var(--orb-r-l);background:var(--orb-glass-strong);color:var(--orb-glass-ink);border:1px solid var(--orb-glass-line);backdrop-filter:var(--orb-blur-heavy);-webkit-backdrop-filter:var(--orb-blur-heavy);box-shadow:var(--orb-shadow);font-size:14px;line-height:1.45;display:flex;flex-direction:column;gap:8px}
body.orb-shell .world-popover[hidden]{display:none}
body.orb-shell .world-popover .world-popover-title{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--orb-glass-ink-2);margin:4px 0 0}
body.orb-shell .world-popover label{display:flex;justify-content:flex-start;align-items:center;gap:10px;min-height:36px;margin:0;padding:0 2px;color:var(--orb-glass-ink);font-size:14px;cursor:pointer;border-radius:var(--orb-r-s)}
body.orb-shell .world-popover label:hover{background:rgba(255,255,255,.06)}
body.orb-shell .world-popover label input{flex:none;margin:0;width:18px;height:18px;accent-color:var(--orb-accent)}
body.orb-shell .world-popover button{min-height:38px;padding:6px 12px;border-radius:var(--orb-r-s);border:1px solid var(--orb-glass-line);background:rgba(255,255,255,.08);color:var(--orb-glass-ink);font:inherit;font-size:14px;text-align:left;cursor:pointer}
body.orb-shell .world-popover button:hover{background:rgba(255,255,255,.14)}
body.orb-shell .world-popover button:disabled{opacity:.45;cursor:default}
body.orb-shell .world-popover .world-popover-actions{display:flex;flex-wrap:wrap;gap:6px}
body.orb-shell .world-popover .world-popover-actions button{flex:1 1 auto;text-align:center}
/* Inside a slide-up panel the same markup is a plain block, not a floating card. */
body.orb-shell .orb-panel .world-popover{position:static;width:auto;max-width:none;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;color:var(--orb-ink)}
body.orb-shell .orb-panel .world-popover label{color:var(--orb-ink)}
body.orb-shell .orb-panel .world-popover label:hover{background:var(--orb-sheet-2)}
body.orb-shell .orb-panel .world-popover .world-popover-title{color:var(--orb-ink-3)}
body.orb-shell .orb-panel button[hidden]{display:none!important}

/* ── The ⋯ overflow menu: an anchored card plus a scrim ──────────────────────────────────────── */
body.orb-shell #orbMenuScrim{position:fixed;inset:0;z-index:3100;background:rgba(15,23,42,.6);opacity:0;pointer-events:none;transition:opacity .2s ease}
body.orb-shell #orbMenuScrim.orb-scrim-on{opacity:1;pointer-events:auto}
body.orb-shell #orbBrandMenu{position:fixed;z-index:3150;top:calc(var(--orb-header) + var(--orb-safe-top) + 4px);right:8px;left:auto;width:200px;padding:6px;border-radius:var(--orb-r-m);background:var(--orb-glass-strong);backdrop-filter:var(--orb-blur-heavy);-webkit-backdrop-filter:var(--orb-blur-heavy);display:flex;flex-direction:column;gap:0}
body.orb-shell #orbBrandMenu[hidden]{display:none}
body.orb-shell #orbBrandMenu button{display:flex;align-items:center;gap:12px;width:100%;min-height:40px;padding:12px 16px;border:0;border-radius:var(--orb-r-s);background:transparent;color:var(--orb-glass-ink);font:inherit;font-size:13px;text-align:left;cursor:pointer}
body.orb-shell #orbBrandMenu button:hover{background:rgba(255,255,255,.1)}
body.orb-shell #orbBrandMenu button small{margin-left:auto;color:var(--orb-glass-ink-2);font-size:11px;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.orb-shell #orbBrandMenu .orb-menu-icon{flex:none;width:20px;text-align:center;opacity:.8;font-size:14px}
body.orb-shell #orbBrandMenu button>span:not(.orb-menu-icon){flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.orb-shell #orbBrandMenu hr{border:0;border-top:1px solid var(--orb-glass-line);margin:4px 0;width:100%}
body.orb-shell #orbBrandMenu .orb-menu-title{padding:8px 12px 4px;font-size:12px;color:var(--orb-glass-ink-2)}
/* Toast */
body.orb-shell #orbToast{position:fixed;left:50%;bottom:calc(var(--orb-sheet-height,56px) + 12px);transform:translateX(-50%) translateY(0);z-index:3200;max-width:min(460px,calc(100vw - 32px));padding:10px 16px;border-radius:999px;font-size:14px;display:flex;gap:12px;align-items:center;transition:opacity var(--orb-t) var(--orb-ease),transform var(--orb-t) var(--orb-ease)}
body.orb-shell #orbToast[hidden]{display:none}
body.orb-shell #orbToast button{border:0;background:transparent;color:var(--orb-accent);font:inherit;font-weight:600;cursor:pointer;padding:0}

/* ── Slide-up panels ─────────────────────────────────────────────────────────────────────────── */
body.orb-shell .orb-panel{position:fixed;left:0;right:0;bottom:var(--orb-composer-h,0px);z-index:60;height:var(--orb-panel-height,35vh);max-height:80vh;min-height:60px;display:flex;flex-direction:column;background:var(--orb-sheet);color:var(--orb-ink);backdrop-filter:var(--orb-blur-heavy);-webkit-backdrop-filter:var(--orb-blur-heavy);border:1px solid var(--orb-hair);border-bottom:0;border-radius:var(--orb-r-l) var(--orb-r-l) 0 0;box-shadow:0 -12px 40px rgba(0,0,0,.35);transform:translateY(100%);visibility:hidden;transition:transform var(--orb-t) var(--orb-ease),visibility var(--orb-t)}
body.orb-shell .orb-panel.orb-panel-open{transform:translateY(0);visibility:visible}
body.orb-shell .orb-panel.orb-panel-drag{transition:none}
body.orb-shell .orb-panel-head{flex:none;display:flex;align-items:center;gap:8px;padding:0 16px 12px;border-bottom:1px solid var(--orb-hair);cursor:ns-resize;touch-action:none;-webkit-user-select:none;user-select:none;position:relative}
body.orb-shell .orb-panel-grab{position:absolute;left:0;right:0;top:0;height:20px;cursor:ns-resize}
body.orb-shell .orb-panel-grab::before{content:"";position:absolute;left:50%;top:8px;width:36px;height:5px;margin-left:-18px;border-radius:3px;background:var(--orb-ink-2);opacity:.5;transition:all .2s ease}
body.orb-shell .orb-panel-head:active .orb-panel-grab::before,body.orb-shell .orb-panel.orb-panel-drag .orb-panel-grab::before{opacity:1;background:var(--orb-teal)}
body.orb-shell .orb-panel-title{flex:1;min-width:0;margin-top:20px;font-size:15px;font-weight:600;color:var(--orb-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.orb-shell .orb-panel-close{flex:none;margin-top:20px;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:50%;background:var(--orb-chip);color:var(--orb-ink-2);display:grid;place-items:center;cursor:pointer}
body.orb-shell .orb-panel-close:hover{color:var(--orb-ink)}
body.orb-shell .orb-panel-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;display:block}
body.orb-shell .orb-panel-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom))}
body.orb-shell .orb-panel #worldSearch{display:flex;align-items:center;gap:8px;width:100%}
body.orb-shell .orb-panel #worldSearch input{flex:1;min-width:0;width:auto!important;box-sizing:border-box;min-height:40px;padding:8px 12px!important;border:1px solid var(--orb-hair)!important;border-radius:var(--orb-r-s)!important;background:var(--orb-field)!important;color:var(--orb-ink)!important;font-size:15px}
body.orb-shell .orb-panel #worldSearch input::placeholder{color:var(--orb-ink-3)}
body.orb-shell .orb-panel #worldSearch button{flex:none;min-height:40px;border-radius:var(--orb-r-s);padding:0 14px!important;background:var(--orb-accent)!important;border:0!important;color:var(--orb-accent-ink)!important;font-weight:600;font-size:14px}
body.orb-shell .orb-panel #worldSearchResults{margin-top:10px}

/* ── The dialogue: a panel that rests as a composer bar ──────────────────────────────────────── */
body.orb-shell #canvasConversation{position:fixed!important;left:0;right:0;bottom:0;top:auto!important;z-index:60;height:var(--orb-sheet-height,25%);max-height:none;background:var(--orb-sheet)!important;color:var(--orb-ink);border:1px solid var(--orb-hair);border-bottom:0;border-left:1px solid var(--orb-hair);border-radius:var(--orb-r-l) var(--orb-r-l) 0 0;box-shadow:0 -12px 40px rgba(0,0,0,.35);display:flex;flex-direction:column;min-height:0;overflow:hidden;transform:none;visibility:visible;transition:height var(--orb-t) var(--orb-ease);touch-action:none}
body.orb-shell #canvasConversation.orb-sheet-anim{transition:height var(--orb-t) var(--orb-ease)}
body.orb-shell #canvasConversation.orb-sheet-drag{transition:none}
body.orb-shell .canvas-conversation-head{display:none!important}
body.orb-shell #orbSheetHead{flex:none;display:flex;flex-direction:column;gap:0;background:transparent;border-bottom:1px solid var(--orb-hair);-webkit-user-select:none;user-select:none;touch-action:none;cursor:ns-resize}
body.orb-shell #orbSheetGrab{display:block;width:96px;height:20px;margin:0 auto;position:relative;cursor:grab}
body.orb-shell #orbSheetGrab::before{content:"";position:absolute;left:50%;top:8px;width:36px;height:5px;margin-left:-18px;border-radius:3px;background:var(--orb-ink-2);opacity:.5;transition:all .2s ease}
body.orb-shell #canvasConversation.orb-sheet-drag #orbSheetGrab{cursor:grabbing}
body.orb-shell #canvasConversation.orb-sheet-drag #orbSheetGrab::before{opacity:1;background:var(--orb-teal)}
body.orb-shell #orbSheetTitle{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 12px 10px 16px;font-size:15px}
body.orb-shell #orbSheetTitle strong{font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}
body.orb-shell #orbSheetTitle .orb-chip{flex:none;font-size:11px;font-weight:600;padding:3px 9px;border-radius:999px;background:var(--orb-chip);color:var(--orb-ink-2);white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis}
body.orb-shell #orbSheetTitle .orb-chip.orb-live{color:var(--orb-ok)}
body.orb-shell #orbSheetTitle button{flex:none}
/* Resting state: only the composer shows, so the dialogue is always one tap from a question. */
body.orb-shell #canvasConversation.orb-sheet-peek #orbSheetHead{display:none}
body.orb-shell #canvasConversation.orb-sheet-peek #ow-atlas>*:not(#owAtlasForm){display:none!important}
body.orb-shell #canvasConversation.orb-sheet-peek #conversationFeed,body.orb-shell #canvasConversation.orb-sheet-peek #canvasWelcome{display:none!important}
body.orb-shell #canvasConversation.orb-sheet-peek #owAtlasForm{border-top:0}
body.orb-shell #canvasConversation.orb-sheet-peek :is(#composerAttachments,.chat-tools,#canvasSelection,#owAtlasStatus){display:none!important}
body.orb-shell .orb-help{flex:none;width:28px;height:28px;min-height:28px;padding:0;border-radius:50%;border:0;background:var(--orb-chip);color:var(--orb-ink-2);font:inherit;font-size:13px;font-weight:700;line-height:1;cursor:pointer;display:inline-grid;place-items:center}
body.orb-shell .orb-help:hover{color:var(--orb-ink)}
body.orb-shell .orb-help[aria-expanded="true"]{background:var(--orb-accent);color:var(--orb-accent-ink)}
body.orb-shell .orb-help-pop{position:fixed;z-index:3300;max-width:min(320px,calc(100vw - 24px));padding:12px 14px;border-radius:var(--orb-r-m);background:var(--orb-sheet-2);color:var(--orb-ink);border:1px solid var(--orb-hair);box-shadow:var(--orb-shadow);font-size:14px;line-height:1.45}
body.orb-shell .orb-help-pop[hidden]{display:none}
body.orb-shell .orb-help-pop a{color:var(--orb-accent)}
body.orb-shell .orb-help-pop p{margin:0}
/* Pages */
body.orb-shell #orbSheetBody{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
body.orb-shell #orbSheetBody>.orb-page{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body.orb-shell .orb-page[hidden]{display:none}
body.orb-shell .orb-panel .orb-page{display:flex;flex-direction:column;min-height:0}
body.orb-shell .orb-page-scroll{overflow-y:auto;overscroll-behavior:contain;gap:8px}
body.orb-shell .orb-page-scroll>section,body.orb-shell .orb-page-scroll>details{background:transparent}
/* Chat page: the existing #ow-atlas section */
body.orb-shell #ow-atlas{flex:1;min-height:0;display:flex;flex-direction:column;color:var(--orb-ink)}
body.orb-shell #ow-atlas :is(h1,h2,h3,p,li,small,span,summary,label):not(.orb-chip){color:inherit}
body.orb-shell #canvasWelcome{padding:8px 4px 4px}
body.orb-shell #canvasWelcome h1,body.orb-shell #canvasWelcome p{color:var(--orb-ink)}
body.orb-shell #composerAttachments>button{display:none}
body.orb-shell #composerAttachments{padding-bottom:0!important;margin:0!important}
body.orb-shell #composerAttachments>details:not([open]) summary{font-size:12px;color:var(--orb-ink-3)}
body.orb-shell #ow-atlas>.ow-title-row{display:none!important}
body.orb-shell #investigationWorkflow{display:none!important}
body.orb-shell #conversationFeed{flex:1 1 0;min-height:0;padding:12px 14px}
body.orb-shell #conversationFeed #owTranscript article[data-role=user]{background:var(--orb-accent)!important;color:var(--orb-accent-ink)!important;border-radius:18px 18px 4px 18px}
body.orb-shell #conversationFeed #owTranscript article[data-role=user] small{color:rgba(255,255,255,.85)}
body.orb-shell #conversationFeed #owTranscript article[data-role=assistant]{background:var(--orb-sheet-2);border-radius:18px 18px 18px 4px;padding:12px 16px}
body.orb-shell #canvasWelcome h1{font-size:24px;letter-spacing:-.02em;font-weight:700;line-height:1.15}
body.orb-shell #canvasWelcome p,body.orb-shell #canvasWelcome .ow-eyebrow{color:var(--orb-ink-2)}
/* Composer: one plus, one field, one send */
body.orb-shell #owAtlasForm{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"plus field send" "status status status" "extras extras extras";align-items:end;gap:8px;padding:8px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--orb-hair);background:transparent}
body.orb-shell #owAtlasForm .chat-tools,body.orb-shell #owAtlasForm details.chat-tools{grid-area:extras}
body.orb-shell #owAtlasForm .chat-tools>summary{display:none}
body.orb-shell #owAtlasForm .chat-tools:not([open])>*:not(summary){display:none}
body.orb-shell #owAtlasForm .chat-tools[open]{background:var(--orb-sheet-2);border-radius:var(--orb-r-m);padding:10px 12px;font-size:13px}
body.orb-shell #owAtlasForm>label.ow-field,body.orb-shell #owAtlasForm>label:has(#owAtlasQuestion){grid-area:field;margin:0;min-width:0}
body.orb-shell #owAtlasForm>label.canvas-interactive-option{display:none!important}
body.orb-shell #canvasSelection{grid-area:extras;justify-self:start;border-radius:999px;border:1px solid var(--orb-hair);background:var(--orb-chip);color:var(--orb-ink);font:inherit;font-size:12px;padding:4px 10px}
body.orb-shell #orbCancelRequest{min-height:40px;border-radius:999px;border:1px solid var(--orb-hair);background:var(--orb-chip);color:var(--orb-ink);font:inherit;font-size:13px;padding:0 12px}
body.orb-shell #owAtlasQuestion{width:100%;box-sizing:border-box;border-radius:20px;border:1px solid var(--orb-hair)!important;background:var(--orb-field)!important;color:var(--orb-ink)!important;padding:10px 14px!important;font-size:15px;line-height:1.35;min-height:40px;max-height:150px;resize:none;box-shadow:none!important}
body.orb-shell #owAtlasQuestion:focus{outline:none;border-color:var(--orb-accent)!important;box-shadow:0 0 0 3px rgba(76,166,234,.25)!important}
body.orb-shell #owAtlasForm .ow-actions{grid-area:send;display:flex;gap:6px;align-items:center;margin:0}
body.orb-shell #owAtlasSend{width:40px;height:40px;min-height:40px;border-radius:50%;padding:0!important;background:var(--orb-accent)!important;color:var(--orb-accent-ink)!important;border:0!important;font-size:18px;font-weight:700}
body.orb-shell #owAtlasSend:disabled{opacity:.45}
body.orb-shell #chatClearDraft{display:none!important}
body.orb-shell #orbComposerPlus{grid-area:plus;display:grid;place-items:center;width:40px;height:40px;min-height:40px;border-radius:50%;padding:0;border:0;background:var(--orb-chip);color:var(--orb-ink);font-size:22px;line-height:1;cursor:pointer}
body.orb-shell #orbComposerPlus[aria-expanded="true"]{background:var(--orb-accent);color:var(--orb-accent-ink)}
body.orb-shell #owAtlasStatus{grid-area:status;margin:0;font-size:12px;color:var(--orb-ink-3);min-height:0}
body.orb-shell #owAtlasStatus:empty{display:none}
body.orb-shell #composerAttachments{grid-area:extras;margin:0}
body.orb-shell #composerAttachments summary{color:var(--orb-ink-2)}
body.orb-shell #chatLatest{position:absolute;right:16px;bottom:96px;z-index:5;border-radius:999px;padding:6px 12px;background:var(--orb-chip);color:var(--orb-ink);border:1px solid var(--orb-hair);font-size:12px}
/* Plus menu */
body.orb-shell #orbPlusMenu{position:fixed;z-index:3250;left:12px;bottom:var(--orb-plus-bottom,80px);width:min(320px,calc(100vw - 24px));max-height:calc(100vh - 120px);overflow-y:auto;padding:6px;border-radius:var(--orb-r-l);background:var(--orb-sheet-2);border:1px solid var(--orb-hair);box-shadow:var(--orb-shadow);display:flex;flex-direction:column;gap:2px}
body.orb-shell #orbPlusMenu[hidden]{display:none}
body.orb-shell #orbPlusMenu button{display:flex;align-items:center;gap:12px;width:100%;min-height:var(--orb-tap);padding:8px 12px;border:0;border-radius:var(--orb-r-m);background:transparent;color:var(--orb-ink);font:inherit;font-size:15px;text-align:left;cursor:pointer}
body.orb-shell #orbPlusMenu button:hover{background:var(--orb-chip)}
body.orb-shell #orbPlusMenu button small{margin-left:auto;color:var(--orb-ink-3);font-size:12px}
body.orb-shell #orbPlusMenu .orb-menu-icon{display:none}
body.orb-shell #orbPlusMenu .orb-menu-title{padding:8px 12px 2px;font-size:12px;color:var(--orb-ink-3)}
/* Lists */
body.orb-shell .orb-list{display:flex;flex-direction:column;background:var(--orb-sheet-2);border-radius:var(--orb-r-m);overflow:hidden}
body.orb-shell .orb-list>*{display:flex;align-items:center;gap:12px;min-height:var(--orb-tap);padding:8px 14px;border:0;border-bottom:1px solid var(--orb-hair);background:transparent;color:var(--orb-ink);font:inherit;font-size:15px;text-align:left;width:100%;box-sizing:border-box;cursor:pointer}
body.orb-shell .orb-list>*:last-child{border-bottom:0}
body.orb-shell .orb-list>button:hover{background:var(--orb-sheet-3)}
body.orb-shell .orb-list .orb-chevron{margin-left:auto;color:var(--orb-ink-3)}
body.orb-shell .orb-list small{margin-left:auto;color:var(--orb-ink-3);font-size:12px;text-align:right}
body.orb-shell .orb-section-title{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--orb-ink-3);margin:12px 4px 6px}
/* Panels re-parented into the slide-up panels */
body.orb-shell #assemblyPanel,body.orb-shell #engineeringPanel{position:static!important;inset:auto!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;color:var(--orb-ink);transform:none!important;overflow:visible!important;display:block}
body.orb-shell #assemblyPanel[hidden],body.orb-shell #engineeringPanel[hidden]{display:none}
body.orb-shell #assemblyPanel>header,body.orb-shell #engineeringPanel>header{display:none!important}
body.orb-shell #assemblyPanel details,body.orb-shell #engineeringPanel details{background:var(--orb-sheet-2);border:0;border-radius:var(--orb-r-m);margin:0 0 8px;padding:0 12px}
body.orb-shell #assemblyPanel details>summary,body.orb-shell #engineeringPanel details>summary{min-height:var(--orb-tap);display:flex;align-items:center;font-size:15px;font-weight:600;color:var(--orb-ink);cursor:pointer;list-style:none}
body.orb-shell #assemblyPanel details>summary::-webkit-details-marker,body.orb-shell #engineeringPanel details>summary::-webkit-details-marker{display:none}
body.orb-shell #assemblyPanel details>summary::after,body.orb-shell #engineeringPanel details>summary::after{content:"›";margin-left:auto;color:var(--orb-ink-3);font-size:18px;transition:transform .2s ease}
body.orb-shell #assemblyPanel details[open]>summary::after,body.orb-shell #engineeringPanel details[open]>summary::after{transform:rotate(90deg)}
body.orb-shell #assemblyPanel details>*:not(summary),body.orb-shell #engineeringPanel details>*:not(summary){padding-bottom:4px}
body.orb-shell #assemblyPanel label,body.orb-shell #engineeringPanel label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--orb-ink-2);margin:6px 0}
body.orb-shell #assemblyPanel label:has(>input[type=checkbox]),body.orb-shell #engineeringPanel label:has(>input[type=checkbox]){flex-direction:row;align-items:center;gap:10px;color:var(--orb-ink);min-height:36px}
body.orb-shell #assemblyPanel input:not([type=checkbox]):not([type=range]):not([type=file]),body.orb-shell #assemblyPanel select,body.orb-shell #assemblyPanel textarea,body.orb-shell #engineeringPanel input:not([type=checkbox]):not([type=range]):not([type=file]),body.orb-shell #engineeringPanel select,body.orb-shell #engineeringPanel textarea{background:var(--orb-field);color:var(--orb-ink);border:1px solid var(--orb-hair);border-radius:var(--orb-r-s);padding:8px 10px;font:inherit;font-size:14px;min-height:36px}
body.orb-shell #assemblyPanel button,body.orb-shell #engineeringPanel button{min-height:36px;padding:6px 12px;border-radius:var(--orb-r-s);border:1px solid var(--orb-hair);background:var(--orb-sheet-3);color:var(--orb-ink);font:inherit;font-size:14px;cursor:pointer}
body.orb-shell #assemblyPanel button:hover,body.orb-shell #engineeringPanel button:hover{filter:brightness(1.1)}
body.orb-shell #assemblyPanel button:disabled,body.orb-shell #engineeringPanel button:disabled{opacity:.45;cursor:default}
body.orb-shell #assemblyPanel p,body.orb-shell #engineeringPanel p{font-size:13px;color:var(--orb-ink-2);line-height:1.45}
body.orb-shell #engineeringPanel article{background:var(--orb-sheet-2);border-radius:var(--orb-r-m);padding:8px 12px;margin:0 0 8px}
body.orb-shell #engineeringLayers h3,body.orb-shell #assemblyPanel h3{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--orb-ink-3);font-weight:600;margin:12px 4px 6px}
body.orb-shell .orb-page-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
body.orb-shell .orb-page-toolbar button{min-height:36px;padding:6px 14px;border-radius:999px;border:0;background:var(--orb-accent);color:var(--orb-accent-ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer}
body.orb-shell .orb-page-toolbar button.orb-secondary{background:var(--orb-chip);color:var(--orb-ink)}
/* Drawer (research lab) and saved work */
body.orb-shell #owScroll.canvas-drawer-open{background:var(--orb-sheet)!important;color:var(--orb-ink);position:fixed!important;inset:0!important;z-index:80}
body.orb-shell .canvas-drawer-head{background:transparent!important;border-bottom:1px solid var(--orb-hair)!important}

/* ── Object pill (filled by orb-object-pill.js) ─────────────────────────────────────────────── */
body.orb-shell #orbHandleControl{display:none!important}
body.orb-shell #orbHandleFloat{display:none!important}
body.orb-shell #orbPill{position:absolute;z-index:33;left:50%;transition:bottom var(--orb-t) var(--orb-ease);transform:translateX(-50%);display:flex;gap:2px;align-items:center;padding:4px;border-radius:999px;max-width:calc(100% - 24px);overflow-x:auto;scrollbar-width:none;font-size:13px}
body.orb-shell #orbPill{bottom:calc(var(--orb-sheet-height,56px) + 12px)}
body.orb-shell #orbPill::-webkit-scrollbar{display:none}
body.orb-shell #orbPill[hidden]{display:none}
body.orb-shell #orbPill button{flex:none;min-height:36px;padding:6px 12px;border-radius:999px;border:0;background:transparent;color:var(--orb-glass-ink);font:inherit;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;gap:6px;align-items:center;white-space:nowrap}
body.orb-shell #orbPill button:hover{background:rgba(255,255,255,.1)}
body.orb-shell #orbPill button[aria-pressed="true"]{background:var(--orb-accent);color:var(--orb-accent-ink)}
body.orb-shell #orbPill button:disabled{opacity:.45;cursor:default}
body.orb-shell #orbPill .orb-pill-name{flex:none;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 8px 0 12px;color:var(--orb-glass-ink-2);font-size:12px}
body.orb-shell .orb-pill-pop{position:absolute;z-index:34;left:50%;bottom:calc(var(--orb-sheet-height,56px) + var(--orb-pill-height,60px) + 20px);transform:translateX(-50%);width:min(300px,calc(100% - 24px));padding:12px 14px;border-radius:var(--orb-r-l);font-size:14px;display:flex;flex-direction:column;gap:8px}
body.orb-shell .orb-pill-pop[hidden]{display:none}
body.orb-shell .orb-pill-pop label{display:flex;align-items:center;gap:10px;min-height:36px;color:var(--orb-glass-ink)}
body.orb-shell .orb-pill-pop input[type=range]{flex:1;accent-color:var(--orb-accent)}
body.orb-shell .orb-pill-pop button{min-height:40px;padding:6px 12px;border-radius:var(--orb-r-s);border:1px solid var(--orb-glass-line);background:rgba(255,255,255,.08);color:var(--orb-glass-ink);font:inherit;font-size:14px;text-align:left;cursor:pointer;display:flex;align-items:center;gap:10px}
body.orb-shell .orb-pill-pop button:hover{background:rgba(255,255,255,.14)}
body.orb-shell .orb-pill-pop button.orb-danger{color:var(--orb-danger)}

/* ── Research mode ──────────────────────────────────────────────────────────────────────────── */
body.orb-shell.orb-research #owApp{grid-template-columns:1fr!important}
body.orb-shell.orb-research #worldPane,body.orb-shell.orb-research #canvasConversation,body.orb-shell.orb-research .studio-divider,body.orb-shell.orb-research .orb-panel{display:none!important}
body.orb-shell.orb-research #owScroll{display:block!important;position:fixed!important;inset:0!important;width:auto!important;max-width:none!important;height:auto!important;z-index:80;overflow-y:auto;background:var(--orb-sheet)!important;color:var(--orb-ink)}
body.orb-shell.orb-research #owScroll .canvas-drawer-head{position:sticky;top:0;z-index:2;background:var(--orb-sheet)!important}
body.orb-shell #orbResearchNav{display:none;gap:4px;flex-wrap:wrap;padding:8px 12px;border-bottom:1px solid var(--orb-hair)}
body.orb-shell.orb-research #orbResearchNav{display:flex}
body.orb-shell #orbResearchNav button{min-height:36px;padding:6px 14px;border-radius:999px;border:0;background:transparent;color:var(--orb-ink-2);font:inherit;font-size:14px;font-weight:600;cursor:pointer}
body.orb-shell #orbResearchNav button[aria-current="true"]{background:var(--orb-chip);color:var(--orb-ink)}
body.orb-shell #orbResearchNav .orb-back{margin-right:auto;background:var(--orb-accent);color:var(--orb-accent-ink)}

/* ── Globe cards and legends clear the docked surface ───────────────────────────────────────── */
body.orb-shell #worldViewport :is(#orbFeatureCard,#engineeringFeatureCard){bottom:calc(var(--orb-sheet-height,56px) + 12px)!important;max-height:calc(100% - var(--orb-sheet-height,56px) - 96px)!important;z-index:36}
body.orb-shell #worldViewport #orbSceneLegend{top:calc(var(--orb-header) + var(--orb-safe-top) + 16px)!important;right:calc(16px + var(--orb-tap) + 8px)!important;max-width:calc(100% - 32px - var(--orb-tap))!important;z-index:36}
body.orb-shell .orb-page-scroll>*{flex:none}
body.orb-shell.orb-hud-open #orbPill,body.orb-shell.orb-hud-open .orb-pill-pop{display:none!important}
body.orb-shell{--orb-safe-bottom:env(safe-area-inset-bottom,0px)}
body.orb-shell .orb-hud,body.orb-shell #orbSheetHead,body.orb-shell .orb-panel-head,body.orb-shell #orbPill,body.orb-shell #orbBrandMenu,body.orb-shell #orbPlusMenu{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body.orb-shell #canvasWelcome .review-starters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;max-width:100%;box-sizing:border-box}
body.orb-shell #canvasWelcome .review-starters>button{min-width:0!important;width:auto!important;max-width:none!important;box-sizing:border-box;white-space:normal;text-align:left}
@media(max-width:1100px){body.orb-shell #canvasWelcome .review-starters{grid-template-columns:minmax(0,1fr)}}

/* ── Phones: tap sizes and 16 px fields. Not a second layout — the shell is identical at every width. ── */
@media(max-width:800px),(max-height:500px) and (max-width:1000px){
 body.orb-shell #owApp{height:var(--orb-vvh,100%)!important;bottom:auto!important}
 body.orb-shell input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),body.orb-shell select,body.orb-shell textarea{font-size:16px!important}
 body.orb-shell .world-popover{max-height:calc(var(--orb-vvh,100vh) - var(--orb-sheet-height,56px) - 84px);overflow-y:auto;overscroll-behavior:contain}
 body.orb-shell #orbBrandMenu button,body.orb-shell #orbPlusMenu button,body.orb-shell .world-popover button,body.orb-shell .world-popover label,body.orb-shell .orb-pill-pop button,body.orb-shell .orb-list>*{min-height:44px!important;box-sizing:border-box}
 body.orb-shell #orbPlusMenu{left:12px!important;right:12px;width:auto;max-height:calc(var(--orb-vvh,100vh) - 140px)}
 body.orb-shell dialog button,body.orb-shell #ov button,body.orb-shell #ov label,body.orb-shell .ow-sidebar button{min-height:44px}
 body.orb-shell #orbConfigClose{min-width:44px;min-height:44px}
 body.orb-shell dialog{max-width:calc(100vw - 24px);box-sizing:border-box}
 body.orb-shell #orbSheetGrab{height:var(--orb-tap);min-height:var(--orb-tap);margin:0 auto -29px;position:relative;z-index:2;touch-action:none}
 body.orb-shell .orb-panel-grab{height:var(--orb-tap)}
 body.orb-shell .orb-panel-title,body.orb-shell .orb-panel-close{margin-top:28px}
 body.orb-shell dialog button{min-height:44px!important;padding:10px 14px!important;font-size:15px!important}
 body.orb-shell #owApp .ow-sidebar button,body.orb-shell #owApp .ow-sidebar summary{min-height:44px!important}
 body.orb-shell #ow-atlas #owAtlasForm #orbCancelRequest{min-height:44px!important}
 body.orb-shell #owScroll.canvas-drawer-open{width:auto!important;max-width:none!important;border:0!important;border-radius:0!important}
 body.orb-shell #tourCard{overflow:auto!important;max-height:calc(var(--orb-vvh,100vh) - 24px)!important}
 body.orb-shell .tour-slide{padding:28px 18px 20px!important}
 body.orb-shell #tourCard button{min-height:44px}
}
/* DEC474: microphone in the composer; it swaps with the send arrow and pulses while listening. */
body.orb-shell #orbMic{width:40px;height:40px;min-height:40px;border-radius:50%;padding:0!important;border:0!important;background:var(--orb-chip)!important;color:var(--orb-ink)!important;display:grid;place-items:center;cursor:pointer}
body.orb-shell #orbMic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
body.orb-shell #orbMic[hidden]{display:none}
body.orb-shell #orbMic.orb-listening{background:var(--orb-danger)!important;color:#fff!important;animation:orb-listen 1.2s ease-in-out infinite}
@keyframes orb-listen{0%,100%{box-shadow:0 0 0 0 rgba(227,114,99,.45)}50%{box-shadow:0 0 0 10px rgba(227,114,99,0)}}
@media(max-width:800px),(max-height:500px) and (max-width:1000px){body.orb-shell #orbMic{width:var(--orb-tap);height:var(--orb-tap);min-height:var(--orb-tap)}}
/* DEC480: the on-screen keyboard covers a fixed composer on iOS; --orb-kb is the covered height. */
body.orb-shell.orb-keyboard #canvasConversation{bottom:var(--orb-kb,0px)!important;transition:bottom .18s ease}
body.orb-shell.orb-keyboard #orbPill,body.orb-shell.orb-keyboard .orb-pill-pop{display:none!important}
