/* vuer — styled to match the keyhole design system (Raleway, neutral dark,
   subtle white borders, layered shadows, soft reveal animations). Raleway is
   self-hosted (fonts/raleway-latin.woff2) so the strict CSP and offline/LAN
   use both keep working — no Google Fonts round-trip, no external origin.
   Layout is responsive: the toolbar wraps, panels track its height, and the
   stats panel becomes a bottom sheet on phones. */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 200 700;               /* variable font: one file covers the range */
  font-display: swap;
  src: url("fonts/raleway-latin.woff2") format("woff2");
}

:root {
  /* Render native controls (the OS-drawn <select> popup + its highlighted row,
     range inputs, scrollbars) in the dark UA theme. Without this the browser
     paints the open option list with the SYSTEM theme and ignores our option
     CSS — on a light-mode OS that's white-on-white and unreadable. */
  color-scheme: dark;
  /* keyhole palette */
  --bg: #181818;                      /* stage backdrop (keyhole card tone) */
  --panel: rgba(24, 24, 24, 0.82);    /* glass panels floating over the 3D scene */
  --panel-solid: #181818;
  --panel-border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --muted: rgba(255, 255, 255, 0.5);
  --faint: rgba(255, 255, 255, 0.3);
  --btn: rgba(255, 255, 255, 0.06);
  --btn-hover: rgba(255, 255, 255, 0.1);
  --emphasis: rgba(255, 255, 255, 0.14);
  --emphasis-border: rgba(255, 255, 255, 0.22);
  --radius: 16px;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03),
            0 4px 24px rgba(0, 0, 0, 0.4),
            0 16px 56px rgba(0, 0, 0, 0.3);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body {
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* Compare (split view) — OFF unless body has .compare (set only when the user
   toggles it). Both canvases share the camera; B sits on top, clipped to the
   right of the wipe (--split). B ignores pointer events so camera drags fall
   through to A; only the divider handle is grabbable. The slider is pure CSS
   (clip-path + left), so dragging never triggers a WebGL re-render. */
:root { --split: 50%; }
#stageB, #compareDivider { display: none; }   /* opt-in: shown only when B has data */
/* The split appears only once compare is on AND a B model is loaded (.has-b).
   Compare-on with no comparable file stays single-view + shows a status. */
body.compare.has-b #stageB {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block;
  pointer-events: none; z-index: 1;
  clip-path: inset(0 0 0 var(--split));
}
body.compare.has-b #compareDivider,
body.compare.b-loading #compareDivider {   /* also while B's first file loads */
  display: block;
  position: fixed; top: 0; bottom: 0; left: var(--split);
  width: 18px; transform: translateX(-50%);
  z-index: 5; cursor: ew-resize; touch-action: none;
}
#compareDivider::before {                 /* the wipe line */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: rgba(255,255,255,0.85); box-shadow: 0 0 6px rgba(0,0,0,0.6);
}
#compareHandle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(24,24,24,0.92); border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 3 12 9 18'/%3E%3Cpolyline points='15 6 21 12 15 18'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
/* Bigger touch targets for the wipe on touch devices. */
@media (pointer: coarse) {
  body.compare.has-b #compareDivider { width: 34px; }
  #compareHandle { width: 44px; height: 44px; }
}

/* Per-side file labels (name · size), bottom corners, only in split view. */
#cmpLabelA, #cmpLabelB {
  display: none; position: fixed; bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 6; pointer-events: none; max-width: 44vw;
  padding: 4px 10px; border-radius: 8px; font-size: 12px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); background: rgba(20,20,20,0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
body.compare.has-b #cmpLabelA { display: block; left: calc(14px + env(safe-area-inset-left)); }
body.compare.has-b #cmpLabelB {
  display: block; right: calc(14px + env(safe-area-inset-right)); text-align: right;
}
/* Compare selector lives in the B label (bottom-right), not the toolbar. */
.cmp-select {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 12px;
  color: var(--text); background: transparent; border: none; margin: 0;
  padding: 0 15px 0 0; cursor: pointer; max-width: 40vw; pointer-events: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center;
}
.cmp-select option { background: #1c1c1c; color: var(--text); }
#compareStatus {
  display: none; position: fixed; bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%); z-index: 6; pointer-events: none;
  padding: 4px 12px; border-radius: 8px; font-size: 12px; color: var(--muted);
  background: rgba(20,20,20,0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
body.compare:not(.has-b) #compareStatus { display: block; }

/* Projection-center crosshair markers (positioned in px by JS). */
.center-marker {
  display: none; position: fixed; z-index: 7; pointer-events: none;
  width: 22px; height: 22px; transform: translate(-50%, -50%);
  background-repeat: no-repeat; background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2354ff9f' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Cline x1='12' y1='1' x2='12' y2='5'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='1' y1='12' x2='5' y2='12'/%3E%3Cline x1='19' y1='12' x2='23' y2='12'/%3E%3C/svg%3E");
}
.center-marker.b {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e5ff' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Cline x1='12' y1='1' x2='12' y2='5'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='1' y1='12' x2='5' y2='12'/%3E%3Cline x1='19' y1='12' x2='23' y2='12'/%3E%3C/svg%3E");
}

/* vu3 projection-sphere inset (bottom-left) + click-to-pop-out map modal. */
#sphereInset {
  position: fixed; z-index: 8; cursor: pointer;
  left: calc(14px + env(safe-area-inset-left));
  bottom: calc(48px + env(safe-area-inset-bottom));
  width: 88px; height: 88px;
  border-radius: 999px; background: rgba(20,20,20,0.35);
  box-shadow: 0 3px 16px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.18);
}
#sphereInset:hover { border-color: rgba(255,255,255,0.5); }
#sphereInset.grid { border-radius: 12px; }   /* multi-center: a grid panel, not a circle */
#sphereModal:not([hidden]) {
  position: fixed; inset: 0; z-index: 30; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
#sphereModalInner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#sphereMapCanvas {
  max-width: 84vw; max-height: 78vh; image-rendering: pixelated;
  border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  background: #000;
}
#sphereMapCaption { color: var(--muted); font-size: 13px; }
#sphereModalClose {
  position: absolute; top: 16px; right: 20px; z-index: 31;
  width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
  background: rgba(30,30,30,0.9); color: var(--text); border: 1px solid rgba(255,255,255,0.2);
  font-size: 22px; line-height: 1;
}

/* Toolbar — wraps to extra rows on narrow screens instead of overflowing.
   js/main.js keeps --toolbar-h in sync with the (possibly wrapped) height. */
#toolbar {
  position: fixed; top: 0; left: 0; right: 0; min-height: 56px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
           10px max(14px, env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(15,15,15,0.92) 65%, rgba(15,15,15,0));
  z-index: 10; pointer-events: none;
  animation: contentFadeIn 0.9s var(--ease) 0.1s both;
}
#toolbar > * { pointer-events: auto; }
.brand { display: flex; align-items: baseline; margin-right: 6px; filter: drop-shadow(0 0 20px rgba(255,255,255,0.06)); color: inherit; text-decoration: none; border-radius: 8px; padding: 2px 4px; }
a.brand:hover { background: var(--btn); }
.logo {
  font-weight: 600; font-size: 20px; letter-spacing: -0.02em; color: var(--text);
}
.logo-er { font-weight: 300; font-size: 20px; letter-spacing: -0.02em; color: var(--muted); }
.spacer { flex: 1; }

.btn {
  appearance: none; border: 1px solid var(--panel-border); background: var(--btn);
  color: var(--text); font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
  padding: 7px 13px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  backdrop-filter: blur(8px);
}
.btn:hover { background: var(--btn-hover); border-color: var(--border-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:disabled:hover { background: var(--btn); border-color: var(--panel-border); }
.btn.icon { width: 38px; padding: 6px 0; display: inline-flex; align-items: center; justify-content: center; }
.btn.icon[hidden] { display: none; } /* the attribute must win over inline-flex (#btnSaveView) */
.btn.icon svg { display: block; width: 18px; height: 18px; }
/* Active toggle state (e.g. Up: Y-up) — mirrors keyhole's highlighted control. */
.btn.icon.active { background: var(--emphasis); border-color: var(--emphasis-border); color: #fff; }
.btn.icon.active:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.3); }
.btn.primary {
  background: var(--emphasis); border-color: var(--emphasis-border); color: var(--text); font-weight: 600;
}
.btn.primary:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.btn.select {
  -webkit-appearance: none; appearance: none;
  padding: 6px 28px 6px 10px; max-width: 200px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aeb0b6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px;
}
/* Solid menu so the open list is readable — native option lists ignore the
   translucent button background and would render white-on-white. Mirrors
   keyhole's select option styling. */
.btn.select option, .btn.select optgroup { background: #1c1c1c; color: var(--text); }

/* FoV slider (toolbar): compact range input + degree readout. */
.btn.fov { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: default; }
.btn.fov input[type="range"] { width: 74px; accent-color: #8ab4ff; cursor: pointer; }
#fovLabel { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 26px; text-align: right; }
.btn.select option:disabled { color: var(--muted); }
/* Solid (not translucent) highlight: a see-through white over the OS list
   composites toward white-on-white. Browsers that honor option:checked get a
   readable dark row; the rest fall back to the dark-scheme system highlight. */
.btn.select option:checked { background: #2f2f33; color: #fff; }
.badge {
  font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
  background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--panel-border);
}

/* Stats panel — positioned below the toolbar's live height (wraps on mobile). */
.panel {
  position: fixed; top: calc(var(--toolbar-h, 56px) + 8px); right: 14px; width: 268px;
  max-height: calc(100vh - var(--toolbar-h, 56px) - 24px);
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  backdrop-filter: blur(14px); z-index: 9; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  animation: cardReveal 0.8s var(--ease) both;
}
.panel[hidden] { display: none; } /* the attribute must win over display:flex */
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; font-weight: 500; font-size: 13px; letter-spacing: -0.01em;
  border-bottom: 1px solid var(--panel-border);
}
.panel-body { overflow-y: auto; padding: 4px 0; }
.x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 4px 8px; transition: color 0.2s var(--ease); }
.x:hover { color: var(--text); }

section[data-sec] { border-bottom: 1px solid rgba(255,255,255,0.04); }
.sec-title {
  margin: 0; padding: 10px 14px; font-size: 11.5px; font-weight: 500; color: var(--muted);
  cursor: pointer; display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: 0.08em;
}
.chev { transition: transform 0.2s var(--ease); }
section.collapsed .rows { display: none; }
section.collapsed .chev { transform: rotate(-90deg); }
.rows { padding: 0 14px 10px; }
.rows > div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 12px; }
.rows span { color: var(--muted); font-weight: 300; }
.rows b {
  font-weight: 500; font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 11.5px;
  text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px;
}
/* Click a truncated value to expand it (wraps to multiple lines); click again to
   collapse. `.has-more` marks values with hidden content (truncated or summarized). */
.rows b.has-more { cursor: pointer; text-decoration: underline dotted rgba(255,255,255,0.35); text-underline-offset: 2px; }
.rows b.expand {
  white-space: normal; word-break: break-word; text-overflow: clip; max-width: 70%;
}

/* Empty state */
.empty { position: fixed; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none; }
.empty.hidden { display: none; }
.empty-card {
  text-align: center; padding: 36px 44px; border-radius: 24px; pointer-events: auto;
  border: 1px solid var(--panel-border); background: rgba(24,24,24,0.55); backdrop-filter: blur(8px);
  box-shadow: var(--shadow); max-width: calc(100vw - 32px);
  animation: cardReveal 1.2s var(--ease) both;
}
.empty-logo {
  font-size: 46px; font-weight: 300; letter-spacing: -0.02em; color: var(--text);
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.06)); margin-bottom: 10px;
}
.empty-logo span { color: var(--muted); }   /* "er" in the muted tone, like the toolbar brand */
.empty p { margin: 6px 0; font-size: 14px; font-weight: 300; }
.empty .muted { color: var(--muted); font-size: 12.5px; }
.empty code { background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 6px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty .primary { margin-top: 18px; }
.dragging .empty-card { border-color: var(--border-hover); background: rgba(255,255,255,0.05); }

/* Loading */
.loading { position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; background: rgba(15,15,15,0.6); backdrop-filter: blur(4px); }
.loading[hidden] { display: none; }
/* In split view each side's loading overlay is confined to its pane, so the
   loading screen appears in the split that's actually loading (A = left of the
   wipe, B = right). Single view keeps the full-screen overlay. */
body.compare.has-b #loading,
body.compare.b-loading #loading { right: auto; width: var(--split); }
#loadingB { left: var(--split); right: 0; width: auto; }
.loading-card { text-align: center; animation: contentFadeIn 0.5s var(--ease) both; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--text); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.bar { width: 220px; max-width: 70vw; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin: 12px auto 0; overflow: hidden; }
#loadBar, #loadBarB { height: 100%; width: 0%; background: var(--text); transition: width 0.1s; }
#loadText, #loadTextB { font-size: 13px; font-weight: 300; color: var(--muted); max-width: 80vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toasts — transient pills, keyhole's seek-flash aesthetic (rounded, blurred,
   fade in/out). Stacked below the toolbar's live height. */
.toasts {
  position: fixed; top: calc(var(--toolbar-h, 56px) + 10px); left: 50%; transform: translateX(-50%);
  z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; max-width: calc(100vw - 24px);
}
.toast {
  padding: 9px 16px; border-radius: 999px;
  background: rgba(24, 24, 24, 0.82); border: 1px solid var(--panel-border);
  color: var(--text); font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
  backdrop-filter: blur(10px); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-6px); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  max-width: 100%; text-align: center; overflow-wrap: anywhere;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255, 138, 138, 0.4); color: #ffb3b3; }

/* Version + copyright, bottom-right (keyhole's #appFooter). */
#appFooter {
  position: fixed; bottom: 6px; right: 10px; z-index: 7;
  font-size: 10.5px; font-weight: 400; letter-spacing: 0.02em; color: rgba(170, 170, 170, 0.6);
  text-align: right; pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
#appFooter:empty { display: none; }

/* Keyhole reveal animations */
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Respect reduced-motion preferences (keyhole's animations are decorative). */
@media (prefers-reduced-motion: reduce) {
  #toolbar, .panel, .empty-card, .loading-card { animation: none; }
}

/* Comfortable touch targets on touch devices */
@media (pointer: coarse) {
  .btn { min-height: 40px; padding: 9px 12px; }
  .btn.icon { width: 40px; min-height: 40px; font-size: 18px; }
  .x { font-size: 22px; padding: 6px 10px; }
  .sec-title { padding: 12px; }
}

/* Narrow screens: fewer toolbar items, bottom-sheet stats */
@media (max-width: 640px) {
  #backendBadge { display: none; }      /* still shown in the stats panel */
  .btn.select { max-width: 130px; }

  /* Stats becomes a bottom sheet — never fights the toolbar for space */
  .panel {
    top: auto; right: 0; left: 0; bottom: 0; width: 100%;
    max-height: 55vh; border-radius: var(--radius) var(--radius) 0 0;
    border-left: none; border-right: none; border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 360px) {
  .empty-card { padding: 20px 16px; }
  .empty-logo { font-size: 34px; }
  .btn { font-size: 12px; padding: 8px 9px; }
  .btn.select { max-width: 104px; }
}

/* .vu4 timeline — bottom centre, clear of the sphere inset (left) and the
   version footer / split labels (right and below). */
#timeline {
  /* Centred with left/right + auto margins, NOT translateX(-50%): the reveal
     animation's final transform would override a transform-based centring. */
  position: fixed; z-index: 8; left: 0; right: 0; margin: 0 auto;
  bottom: calc(44px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  width: min(640px, calc(100vw - 260px)); min-width: 300px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--panel-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  animation: cardReveal 0.6s var(--ease) both;
}
#timeline[hidden] { display: none; }
#timeline .btn.icon { width: 32px; min-height: 32px; padding: 4px 0; flex: none; }
#timeline .btn.icon svg { width: 16px; height: 16px; }
/* Play/pause glyph follows the button state (no inline styles: strict CSP). */
#tlPlay.active #tlIconPlay, #tlPlay:not(.active) #tlIconPause { display: none; }
#tlSlider { flex: 1; min-width: 80px; accent-color: #8ab4ff; cursor: pointer; }
#tlLabel {
  font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
#tlFps { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  #timeline { width: calc(100vw - 28px); min-width: 0; bottom: calc(56px + env(safe-area-inset-bottom)); }
  #tlFps { display: none; }
}
@media (prefers-reduced-motion: reduce) { #timeline { animation: none; } }

/* 3D / 4D model-list switch, left of the model picker. */
.btn.select.kind { max-width: 64px; padding-right: 22px; font-weight: 500; }
