/* New workspace (owner beta). Active only under html.nw (set by wheel-workspace.js when the flag is on).
 * The header and the ONE time row are WorkspaceShell's (workspace-shell.js/.css). Legacy controls the shell and the
 * wheel cards replace are taken out of the beta here ONLY where existing code still reads the node; nodes nothing
 * reads are removed from the DOM by wheel-workspace.js (retireLegacy). Every node hidden here is listed in
 * docs/plans/workspace-reset-plan.md (Phase 1, "to delete when the beta becomes default") with its reason. */

/* ── Grid: header · time row · Direction Lab drop-down · panels/canvas (no display bar, no dynamic bar) ── */
html.nw #app,
html.nw #app.nav-enabled {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  grid-template-areas: "hd hd hd" "tr tr tr" "nv nv nv" "sb cv rp";
}
html.nw #ws-timerow { grid-area: tr; position: relative; z-index: 1110; min-width: 0; background: var(--pn); border-bottom: 1px solid var(--bd); }

/* ── Header: only the shell's bar (legacy inputs/buttons stay in the DOM where code reads them) ── */
html.nw #header > :not(.ws-header) { display: none !important; }
html.nw #header { padding: 4px 10px; min-height: 44px; }

/* ── Row the shell replaces: display bar (contents re-homed in Systems / View) ── */
html.nw #display-bar { display: none !important; }

/* ── #sphere-transport keeps only the Direction Lab drop-down (opened from the shell's Direction Lab pill) ── */
html.nw #sphere-transport { padding: 0; border-bottom: 0; }
html.nw #sphere-transport .sph-nav-transport-row,
html.nw #sph-nav-time-status,
html.nw #sph-nav-dates,
html.nw #sph-nav-scale-pill,
html.nw #sph-nav-scale-menu,
html.nw #sphere-transport .sph-nav-view-toggle,
html.nw #sphere-transport .dlab-presets > :is(.dlab-enable, .dlab-fold, .dlab-time-scales),
/* one Labels control: View ▸ Labels (the Lab's own density segment is its twin) -- but never the
   Lab's "Labels ▾" drop-down menu: hiding that left the pill opening an empty menu (owner 2026-10-07). */
html.nw #sphere-transport .dlab-segmented:not(.dlab-dropdown-menu):has(> [data-label-density]) { display: none !important; }
html.nw #sphere-direction-lab-v2 { box-sizing: border-box; }
html.nw #sphere-direction-lab-v2:has(.dlab-enable[aria-pressed=true]) { padding: 6px 8px; border-bottom: 1px solid var(--bd); }
html.nw #sphere-direction-lab-v2:not(:has(.dlab-enable[aria-pressed=true])) { display: none; }

/* Wheel cards are the left panel's main content: give them room (was capped at 38vh). */
html.nw #ident-card { max-height: 64vh; }

html.nw #data-menu { z-index: 10001; }

/* ── Rail = chart modes only (owner). The rail's tools are reachable from Tools ▾ / ⚙ / the left panel / Systems ▸ ── */
html.nw #icon-sidebar .rail-tool { display: none !important; }

/* ── Direction Lab drop-down: ONE place per concept ──
 *   · the Lab's own Systems strip is Systems ▸ Directions (its side pill — labels on/off, reading — moved there);
 *   · the action row wraps instead of clipping ("Save as my preset…" at 1100 px). */
html.nw #sphere-transport .dlab-preset-strip { display: none !important; }
html.nw #sphere-transport .dlab-presets:not(:has(.dlab-status:not(:empty))) { display: none !important; }
html.nw #sphere-transport .dlab-actions { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }
html.nw #sphere-transport .dlab-actions .dlab-recipes { flex-wrap: wrap; }

/* ── Right panel readouts (owner, round 3): a small angles strip of the SELECTED card + the floating Speculum ──
 * The strip is one compact wrapping row (ASC MC RAMC DSC IC); the age counters and the panel-collapse button stay in
 * the classic layout. The in-panel Speculum is replaced by View ▸ Speculum (a floating window, #nw-speculum). */
html.nw #right-panel #angles-bar { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 2px 12px !important;
  padding: 5px 10px !important; font-size: var(--fs-caption); }
html.nw #right-panel #angles-bar .ab-line { display: contents !important; }
html.nw #right-panel #angles-bar :is(.ab-ages, #btn-collapse-all) { display: none !important; }
html.nw #right-panel #angles-bar > .ab-card { flex: none; padding: 1px 7px; border: 1px solid var(--bd); border-radius: 999px;
  color: var(--td-ui, var(--td)); font: 600 var(--fs-caption)/1.3 var(--o-font, system-ui, sans-serif); }
html.nw #right-panel > #speculum-panel,
html.nw #right-panel > #speculum-panel + hr { display: none !important; }
html.nw #nw-speculum { flex-direction: column; }
html.nw #nw-speculum > #speculum-body { flex: 1 1 auto; min-height: 0; max-height: none !important; overflow: auto; margin: 0 !important; padding: 0 8px 8px; }

/* Astro-Cartography (a rail chart mode): on phones the rail is the bottom bar — the globe sits above it. */
@media (max-width: 900px) {
  html.nw #globe-overlay, html.nw body.rail-labeled #globe-overlay { left: 0; bottom: var(--nwp-bottom, 52px); }
}
