:root { --bg: #0b0c0e; --panel: #15171a; --line: #2a2d32; --text: #d8d8d4; --dim: #8a8d92; --accent: #e6b35a;
  --orbit: #6f93b8; }   /* orbit lines: a cool steel blue, apart from the amber labels and markers */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 13px/1.4 "DIN Condensed", "Futura", system-ui, sans-serif; letter-spacing: 0.02em; }
body { display: grid; grid-template-rows: auto 1fr auto; }
/* the app's controls and views aren't text to select: a drag or double-click on a view, bar or button
   painted their labels as a selection; the side panel's prose, cards' text and inputs stay selectable */
header, nav, button, select, label, .tab, .seg, .camerabar, .viewbar, .vb-pop, .pane, .tl, .vp { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable], .site-card, .live-card { -webkit-user-select: text; user-select: text; }
header { display: flex; align-items: center; gap: 24px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 18px; font-weight: normal; letter-spacing: 0.2em; text-transform: uppercase; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav button { background: none; color: var(--dim); border: 1px solid var(--line); padding: 4px 8px; cursor: pointer;
  font: inherit; text-transform: uppercase; letter-spacing: 0.08em; }
nav button.on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
nav button:hover { color: var(--text); }
main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; min-height: 0; }
.pane { position: relative; background: #000; border: 1px solid var(--line); min-height: 0; overflow: hidden; }
video, canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.label { position: absolute; top: 8px; left: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.15em;
  pointer-events: none; }
#hud { position: absolute; left: 10px; bottom: 8px; color: var(--text); pointer-events: none; white-space: pre;
  text-shadow: 0 0 4px #000; }
#loading { position: absolute; inset: 0; display: none; place-items: center; color: var(--dim);
  text-transform: uppercase; letter-spacing: 0.3em; background: rgba(0, 0, 0, 0.5); }
#set.free .label { color: var(--accent); }
footer { display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line); }
footer button { background: var(--panel); color: var(--text); border: 1px solid var(--line); padding: 5px 10px;
  cursor: pointer; font: inherit; text-transform: uppercase; letter-spacing: 0.08em; }
footer button.on { border-color: var(--accent); color: var(--accent); }
footer label { display: flex; align-items: center; gap: 8px; color: var(--dim); text-transform: uppercase; }
.keys { margin-left: auto; color: var(--dim); }

/* The technical subtitles: the video's text track keeps the timing (mode
   "hidden"), viewer.js draws the cue here in the app's own type. */
#subtitle { position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); width: max-content; max-width: 94%;
  display: none; padding: 8px 14px; background: rgba(21, 23, 26, 0.88); border-left: 2px solid var(--accent);
  color: var(--text); font-size: 14px; line-height: 1.3; letter-spacing: 0.02em; pointer-events: none; }
#subtitle .head { color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 2px; }

nav .tab { color: var(--dim); text-decoration: none; border: 1px solid var(--line); padding: 4px 10px;
  text-transform: uppercase; letter-spacing: 0.08em; }
nav .tab.on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
/* The product the page is in, opened into its pages (site.js NAV): its name, then its tabs, in one frame */
nav .tabgroup { display: inline-flex; align-items: stretch; gap: 0; border: 1px solid var(--line); }
nav .tabgroup .tg-name { display: flex; align-items: center; padding: 0 10px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; border-right: 1px solid var(--line); white-space: nowrap; }
nav .tabgroup .tab { border: none; }
nav .tabgroup .tab + .tab { border-left: 1px solid var(--line); }
header.lay-iconic > nav .tabgroup .tg-name { display: none; }

/* The set camera bar (top right of the set pane) and the help overlay, shared
   with the asset gallery's stage. */
.camerabar { position: absolute; top: 6px; right: 8px; display: flex; gap: 8px; align-items: center; }
.seg { display: flex; gap: 0; }
.seg button { background: rgba(21, 23, 26, 0.85); color: var(--dim); border: 1px solid var(--line); margin-left: -1px;
  padding: 3px 9px; cursor: pointer; font: inherit; text-transform: uppercase; letter-spacing: 0.08em; min-width: 26px; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.on { color: var(--bg); background: var(--accent); border-color: var(--accent); position: relative; }
.seg button:disabled { opacity: 0.35; cursor: default; }
.help { position: absolute; top: 38px; right: 8px; width: 290px; max-height: calc(100% - 80px); overflow-y: auto;
  padding: 10px 12px; background: rgba(21, 23, 26, 0.94); border: 1px solid var(--line); border-left: 2px solid var(--accent);
  font-size: 13px; letter-spacing: 0.02em; z-index: 2; }
.help[hidden] { display: none; }
.help .head { color: var(--accent); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 4px;
  display: flex; justify-content: space-between; }
.help .head span { color: var(--dim); letter-spacing: 0.05em; }
.help .sub { color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; margin: 8px 0 2px; }
.help .row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 1px 0; }
.help kbd { font: inherit; color: var(--text); white-space: nowrap; }
.help .row span { color: var(--dim); }
#set .label, #hud { text-shadow: 0 0 4px #000, 0 0 2px #000; }

/* Sliders: slim, amber on a dark line (the View panels' exposure and stars) */
input[type=range] { -webkit-appearance: none; appearance: none; width: 120px; height: 16px; background: none;
  margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 14px; margin-top: -6px;
  background: var(--accent); border: none; border-radius: 0; }
input[type=range]::-moz-range-thumb { width: 8px; height: 14px; background: var(--accent); border: none; border-radius: 0; }
input[type=range]:focus { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }

/* Scroll bars: thin, a dark track and a line-coloured thumb that turns amber in use */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid var(--panel); }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--accent); }
::-webkit-scrollbar-corner { background: transparent; }

/* Icons (viewer/icons.js, viewer/icons.svg): thin lines in the text's colour (amber when on), 16 px with
   a 1.5 px stroke, before the label. Where room is short the label hides and the icon stands alone,
   named by its tooltip (viewer/tooltip.js) and, for screen readers, by the hidden label still in the DOM:
   - .ic-only: always (zoom, help, the "⋯" button);
   - a narrow pane (under 760 px, toolbar.js NARROW): the view's bar, except controls marked data-label (their text carries
     meaning an icon can't); the "⋯" menu keeps the labels, it has the room;
   - the header on tablets and phones, and when its tabs would otherwise fold (header.lay-iconic). */
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square;
  stroke-linejoin: miter; vertical-align: -3px; margin-right: 6px; overflow: visible; pointer-events: none; }
.ic-only { font-size: 0 !important; letter-spacing: 0 !important; line-height: 0 !important; }
.ic-only > .ic { margin-right: 0; vertical-align: middle; }
.seg button.ic-only, .lay-bar button.ic-only { padding-left: 6px; padding-right: 6px; }
main .pane { container: pane / inline-size; }
@container pane (max-width: 760px) {
  .camerabar [data-icon]:not([data-label]) { font-size: 0; letter-spacing: 0; line-height: 0; padding-left: 6px; padding-right: 6px; }
  .camerabar [data-icon]:not([data-label]) > .ic { margin-right: 0; vertical-align: middle; }
}
header.lay-iconic > nav .tab[data-icon], header.lay-iconic .lay-bar [data-icon],
[data-lay=tab] .lay-bar [data-icon], [data-lay=phone] .lay-bar [data-icon] { font-size: 0; letter-spacing: 0; line-height: 0; padding-left: 8px; padding-right: 8px; }
header.lay-iconic > nav .tab[data-icon] > .ic, header.lay-iconic .lay-bar [data-icon] > .ic,
[data-lay=tab] .lay-bar [data-icon] > .ic, [data-lay=phone] .lay-bar [data-icon] > .ic { margin-right: 0; vertical-align: middle; }
header.lay-iconic > nav { flex-wrap: nowrap; }
nav .tab .ic { margin-right: 5px; }
html:not([data-site]) nav [data-app], html:not([data-site]) nav [data-local] { visibility: hidden; }   /* until site.js knows the apps */
nav .tab.on .ic { stroke: var(--bg); }

/* Fly (camtools.js flyMode): the badge while flying, the touch pad, the look settings in the help */
.fly-badge { position: absolute; top: calc(var(--bar, 38px) + 8px); left: 50%; transform: translateX(-50%); z-index: 6;
  box-sizing: border-box; width: max-content; max-width: calc(100% - 20px); pointer-events: auto;
  padding: 8px 10px; background: rgba(21, 23, 26, .96); border: 1px solid var(--accent); color: var(--dim);
  font-size: 12px; letter-spacing: .04em; }
.fly-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.fly-badge b { color: var(--accent); font-weight: normal; letter-spacing: .12em; text-transform: uppercase; }
.fly-speed { font-variant-numeric: tabular-nums; }
.fly-exit { margin-left: auto; padding: 4px 8px; color: var(--text); background: transparent; border: 1px solid var(--line); font: inherit; cursor: pointer; }
.fly-exit:hover, .fly-exit:focus-visible { border-color: var(--accent); color: var(--accent); }
.fly-instructions { margin-top: 6px; line-height: 1.6; }
@media (pointer: coarse), (max-width: 640px) { .fly-exit { min-height: 40px; } }
.fly-badge[hidden], .fly-pad[hidden] { display: none; }
.pane.flying canvas { cursor: crosshair; }
.fly-pad { position: absolute; left: 12px; bottom: 56px; z-index: 3; display: grid; grid-template-columns: repeat(3, 46px);
  gap: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.fly-pad button { height: 46px; background: rgba(21, 23, 26, 0.8); color: var(--text); border: 1px solid var(--line);
  font: 18px/1 sans-serif; touch-action: none; }
.fly-pad button:active { background: var(--accent); color: var(--bg); }
.help .fly-set { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--dim); padding: 4px 0 2px; }
.help .fly-set label { display: inline-flex; gap: 6px; align-items: center; }
.help .fly-set input[type=range] { width: 90px; }

/* the title, a link home (site.js) */
header a.home-link { color: inherit; text-decoration: none; }
header a.home-link:hover h1 { color: var(--accent); }

/* The version and What's new (viewer/whatsnew.js): the version beside the title, a dot while a release is unseen;
   the panel, its releases newest first, each item's kind and its Show me; the feedback mail at its foot */
header .wn-ver { flex: none; margin-left: -14px; padding: 2px 7px; background: none; border: 1px solid var(--line); color: var(--dim);
  font: inherit; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; position: relative; white-space: nowrap; }
header .wn-ver:hover, header .wn-ver:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
header .wn-ver.new::after { content: ''; position: absolute; top: -3px; right: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
[data-lay=phone] header .wn-ver { display: none; }
.wn-back { position: fixed; inset: 0; z-index: 1002; background: rgba(0, 0, 0, 0.45); }
.wn { position: fixed; z-index: 1003; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px));
  max-height: min(78vh, 760px); display: flex; flex-direction: column; background: rgba(21, 23, 26, 0.98); border: 1px solid var(--line);
  border-top: 2px solid var(--accent); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
.wn-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; }
.wn-head h2 { margin: 0; font-weight: normal; font-size: 16px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.wn-close { background: none; border: 1px solid var(--line); color: var(--dim); font: inherit; font-size: 11px; padding: 3px 8px; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.08em; }
.wn-close:hover { color: var(--text); }
.wn-list { overflow-y: auto; padding: 0 16px 8px; }
.wn-rel { padding: 10px 0; border-top: 1px solid var(--line); }
.wn-rel.next { opacity: 0.85; }
.wn-rh { display: flex; align-items: baseline; gap: 10px; }
.wn-rh b { font-weight: normal; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.wn-rh span { color: var(--dim); font-size: 11px; }
.wn-rel.next .wn-rh span { color: var(--accent); }
.wn-title { margin: 3px 0 6px; color: var(--text); font-size: 14px; }
.wn-rel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.wn-rel li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: baseline; line-height: 1.35; }
.wn-kind { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; border: 1px solid var(--line); padding: 1px 0; color: var(--dim); }
.wn-kind.new { color: var(--accent); border-color: rgba(230, 179, 90, 0.5); }
.wn-kind.better { color: #9cc4ff; border-color: rgba(156, 196, 255, 0.4); }
.wn-text { color: var(--text); }
.wn-go { color: var(--accent); font-size: 11px; white-space: nowrap; text-decoration: none; border-bottom: 1px solid rgba(230, 179, 90, 0.4); }
.wn-go:hover { border-bottom-color: var(--accent); }
.wn-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 12px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 12px; }
.wn-feedback { color: var(--bg); background: var(--accent); padding: 5px 10px; text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }

/* the 3D view not drawing on a device, said (planets.js gpuNotice; core/gl.js edgeNote) */
.gpu-note { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, 92vw); z-index: 50;
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: rgba(40, 18, 14, 0.95);
  border: 1px solid #a8503c; color: #f2e6df; font-size: 13px; line-height: 1.4; }
.gpu-note p { margin: 0; flex: 1; word-break: break-word; }
.gpu-note button { background: none; border: 1px solid #a8503c; color: inherit; cursor: pointer; padding: 2px 8px; font: inherit; }
/* Edge on Android's note (core/gl.js): a suggestion, not an error */
.gpu-note.edge-note { background: rgba(21, 23, 26, 0.96); border-color: var(--accent, #e6b35a); color: var(--text, #d8d8d4); }
.gpu-note.edge-note button { border-color: var(--accent, #e6b35a); }
/* Movable live overlays: headers stay reachable while long contents scroll. */
.floating-panel { overflow: auto; overscroll-behavior: contain; }
.floating-panel > * { flex-shrink: 0; }
.floating-panel .floating-grip { cursor: grab; touch-action: none; user-select: none; position: sticky; top: 0; z-index: 1; background: var(--panel); }
.floating-panel .floating-grip:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.floating-panel.floating-active, .floating-panel.floating-dragging { z-index: 12; }
.floating-panel.floating-dragging .floating-grip { cursor: grabbing; }
.floating-dragging iframe { pointer-events: none; }
[data-lay=phone] .floating-panel .floating-grip { min-height: 36px; align-items: center; }
[data-lay=phone] .live-pip .lp-b { width: 36px; height: 36px; }

/* Feedback is a native modal: keyboard focus stays inside, even over Explorer. */
.feedback-dialog { width: min(540px, calc(100vw - 32px)); max-height: 85vh; padding: 0; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-top: 2px solid var(--accent); }
.feedback-dialog::backdrop { background: #000b; }
.feedback-form { padding: 0 16px 16px; font-size: 14px; }
.feedback-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.feedback-form label { display: block; margin: 12px 0; }
.feedback-form input:not([type=checkbox]):not([hidden]), .feedback-form textarea, .feedback-form select { display: block; width: 100%; box-sizing: border-box; margin-top: 5px; padding: 8px; background-color: var(--panel, #17191c); color: var(--text); border: 1px solid var(--line); font: inherit; }
.feedback-form textarea { resize: vertical; }
.feedback-form p { line-height: 1.5; color: var(--dim); }
.feedback-form .feedback-context { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
.feedback-form .feedback-status { color: var(--accent); min-height: 1.5em; }
.feedback-form :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.feedback-form button:disabled { opacity: .65; }

/* Shared LIVE identity: the clock button and navigation badge. */
.live-tag, .camerabar .live-btn.on { color: var(--bg); background: #d0463b; border-color: #d0463b; letter-spacing: .12em; }
.live-tag { display:inline-block; padding:2px 5px; margin-left:8px; font-size:11px; line-height:1.2; vertical-align:middle; text-transform:uppercase; }

/* Homepage arrivals use the tour's amber ring without dimming or blocking controls. */
.home-arrival-ring { position:fixed;z-index:9001;pointer-events:none;outline:2px solid var(--accent);outline-offset:3px;box-shadow:0 0 0 9px rgba(230,179,90,.18),0 0 24px 6px rgba(230,179,90,.3); }

/* Non-modal startup guidance; no focus stealing or app state changes. */
.startup-notice { position: fixed; z-index: 1200; bottom: 16px; right: 16px; width: 420px;
  max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 16px; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-top: 2px solid var(--accent); box-shadow: 0 8px 24px #0008; font: inherit; }
.startup-notice strong { color: var(--accent); font-size: 18px; }
.startup-notice p { margin: 8px 0; font-size: 15px; line-height: 1.4; }
.startup-notice button { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--accent);
  padding: 8px 16px; min-height: 44px; cursor: pointer; }
.startup-notice button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
