:root {
  --canvas-opacity: 1;
  /* Design tokens ported from GoSPL.PC.DEPLOY (dark blurred pills), font
     ported from the marketing site's globals.css (--font-sans) so every
     piece of this project's own UI — pillbox nav, tooltips, and the intro
     splash — reads as one system. --ui-font is kept as the name every
     existing rule already references; --font-sans is the canonical token,
     matching the site's own variable name for anyone diffing the two. */
  --font-sans: 'Inter', sans-serif;
  --ui-font: var(--font-sans);
  --gutter: clamp(20px, 5vw, 64px);
  --pill-bg: rgba(8, 8, 8, 0.82);
  --pill-blur: blur(14px);
  --pill-border: 1px solid rgba(255, 255, 255, 0.08);
  --pill-radius: 16px;
  --pill-button-radius: 12px;
  --pill-text: rgba(255, 255, 255, 0.55);
  --pill-icon: rgba(255, 255, 255, 0.6);
  --pill-icon-hover-bg: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  touch-action: none;
}

@keyframes logo-pulse {
  0%, 100% { opacity: 0.65; transform: scale(1.0); }
  50%      { opacity: 1.0;  transform: scale(1.04); }
}

body {
  overflow: hidden;
  font-family: var(--ui-font);
  /* Re-assert both of these because the marketing site's stylesheet (linked
     before this file) sets a white page background and a near-black default
     text colour for its own light-themed pages. Inherited into the player that
     means a white flash behind the canvas whenever it is transparent — during
     load, on WebGL failure — and dark text on any element that doesn't set its
     own colour. Keep these two lines if that stylesheet stays linked. */
  background: transparent;
  color: #e0dcdd;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

canvas {
  opacity: var(--canvas-opacity);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  pointer-events: none;
}

button {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

.hidden {
  display: none !important;
}

/* chrome-hidden — hides the stock SuperSplat chrome (toolbar, buttons,
   settings/help panels, joystick, branding) by default, on every device.
   This project's own tour nav (#tourNav), annotation markers (#annotations),
   annotation nav (#annotationNav) and tooltip (#tooltip) are deliberately
   not in this list — they stay visible and functional. Debug mode
   (Ctrl+Shift+U / ?debug) removes this class as the one escape hatch.
   !important because #controlsWrap already toggles .hidden/.faded-in/
   .faded-out itself for the inactivity fade — this must win regardless of
   that state. */
body.chrome-hidden #controlsWrap,
body.chrome-hidden #settingsPanel,
body.chrome-hidden #infoPanel,
body.chrome-hidden #joystickBase,
body.chrome-hidden #viewerBranding {
  display: none !important;
}

.spacer {
  flex-grow: 1;
}

#ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#ui * {
  pointer-events: auto;
}


/* branding link for third-party embeds */
#viewerBranding {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease;
  color: #e0dcdd;
}
#viewerBranding:hover {
  color: #fff;
}
#viewerBranding > svg {
  height: 16px;
  width: auto;
  flex-shrink: 0;
  padding: 8px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.3);
}
#viewerBranding > span {
  font-size: 14px;
  font-weight: bold;
  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.4), 1px -1px 0 rgba(0, 0, 0, 0.4), -1px 1px 0 rgba(0, 0, 0, 0.4), 1px 1px 0 rgba(0, 0, 0, 0.4);
}

/* poster */
#poster {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--poster-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* loadingWrap — full-screen splash, styled after GoSPL.PC.DEPLOY's LoadScreen */
#loadingWrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  opacity: 1;
  transition: opacity 900ms ease-in-out;
}
#loadingWrap.leaving {
  opacity: 0;
  pointer-events: none;
}
#loadingWrap > #loadingLogo {
  max-width: 40vw;
  max-height: 40vh;
  object-fit: contain;
  user-select: none;
  animation: logo-pulse 3s ease-in-out infinite;
}
#loadingWrap > #loadingText {
  /* GoSPL's LoadScreen shows no numeric readout — kept in the DOM (updated in
     index.js) in case it's wanted back, just not displayed. */
  display: none;
}
#loadingWrap > #loadingBar {
  margin-top: 32px;
  width: 192px;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
#loadingWrap > #loadingBar > #loadingBarFill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 200ms ease-out;
}

/* introWrap — welcome splash shown once per session, after loadingWrap's fade.
   Styled after the GoSPL marketing site's own tour-detail splash
   (.detail-splash / .detail-splash-inner / .detail-tour-btn in that site's
   globals.css, at /SITE/app/globals.css on the server) — same dark gradient
   scrim and Inter type, but all content horizontally centered rather than
   that site's bottom-left layout. Gradient is centered to match (a
   left-fading scrim under centered copy would look like a leftover).

   Centred on both axes, not bottom-anchored: #tourNav sits at
   `bottom: max(16px, safe-area) + 50px` and runs ~100px tall, which the old
   `align-items: flex-end` + 100-150px bottom padding put the Enter button
   straight through. Centring also matches the radial gradient's own focus.
   `margin: auto` on the inner rather than `justify-content: center` alone, so
   copy taller than the viewport scrolls instead of being clipped at both ends.
   --font-sans/--gutter are the :root tokens (see top of file). */
#introWrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 51;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(24px, 6vh, 64px) var(--gutter);
  box-sizing: border-box;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.2) 100%);
  color: #fff;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  cursor: pointer;
}
#introWrap.visible {
  opacity: 1;
}
#introWrap.leaving {
  opacity: 0;
  pointer-events: none;
}
#introInner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 620px;
  margin: auto;
}
#introInner > #introLogo {
  max-width: 160px;
  max-height: 15vh;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  margin-bottom: 20px;
}
#introInner > #introTitle {
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 50px;
  line-height: 1.1;
  letter-spacing: -1px;
}
@media (min-width: 641px) {
  #introInner > #introTitle {
    font-size: clamp(60px, 6vw, 90px);
    letter-spacing: 1px;
  }
}
#introInner > #introText {
  margin: 0 0 16px;
  max-width: 46ch;
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}
#introInner > #introEnter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 32px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
#introInner > #introEnter:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

/* controlsWrap */
#controlsWrap {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
#controlsWrap.faded-in {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}
#controlsWrap.faded-out {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.5s, opacity 0.5s ease-out;
}
#controlsWrap > #timelineContainer {
  height: 30px;
  cursor: pointer;
}
#controlsWrap > #timelineContainer > #line {
  width: 100%;
  height: 50%;
  border-bottom: 4px solid #d9d9d9;
}
#controlsWrap > #timelineContainer > #handle {
  position: absolute;
  top: 16.5px;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  background-color: #ffaf50;
}
#controlsWrap > #timelineContainer > #time {
  position: absolute;
  top: 0;
  padding: 2px 4px;
  transform: translate(-50%, -100%);
  font-size: 12px;
  border-radius: 4px;
  color: #fff;
  background-color: rgba(40, 40, 40, 0.5);
}
#controlsWrap > #buttonsContainer {
  display: flex;
  gap: 8px;
}
#controlsWrap > #buttonsContainer .buttonGroup {
  display: flex;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}
#controlsWrap > #buttonsContainer .buttonGroup:not(:has(> :not(.hidden))) {
  display: none;
}
#controlsWrap > #buttonsContainer {
  /* controlButton */
}
#controlsWrap > #buttonsContainer .controlButton {
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 0;
  cursor: pointer;
  color: #e0dcdd;
  background-color: transparent;
}
#controlsWrap > #buttonsContainer .controlButton:hover {
  color: #fff;
}
#controlsWrap > #buttonsContainer .controlButton {
  /* icon styling */
}
#controlsWrap > #buttonsContainer .controlButton > svg {
  display: block;
  margin: auto;
}
#controlsWrap > #buttonsContainer .controlButton > svg > g.stroke {
  fill: none;
  stroke: black;
  stroke-width: 2;
  stroke-linejoin: round;
  opacity: 0.4;
}
#controlsWrap > #buttonsContainer .controlButton > svg > g.fill {
  fill: currentColor;
  stroke: none;
}
#controlsWrap > #buttonsContainer .controlButton {
  /* active highlight for simple toggle buttons (e.g. voxel overlay) */
}
#controlsWrap > #buttonsContainer .controlButton.active:not(.toggle) {
  color: #f60;
}
#controlsWrap > #buttonsContainer .controlButton {
  /* camera toggle styling */
}
#controlsWrap > #buttonsContainer .controlButton.toggle {
  background: linear-gradient(90deg, transparent 0%, transparent 50%, #f60 50%, #f60 100%);
  background-size: 200% 100%;
  background-position: 100% 0%;
  background-repeat: no-repeat;
  transition: background-position 0.1s ease-in-out;
}
#controlsWrap > #buttonsContainer .controlButton.toggle.left {
  border-radius: 4px 0px 0px 4px;
}
#controlsWrap > #buttonsContainer .controlButton.toggle.left:not(.active) {
  background-position: 0% 0%;
}
#controlsWrap > #buttonsContainer .controlButton.toggle.middle {
  border-radius: 0;
}
#controlsWrap > #buttonsContainer .controlButton.toggle.middle:not(.active) {
  background-position: 0% 0%;
}
#controlsWrap > #buttonsContainer .controlButton.toggle.right {
  border-radius: 0px 4px 4px 0px;
}
#controlsWrap > #buttonsContainer .controlButton.toggle.right:not(.active) {
  background-position: 200% 0%;
}

/* settingsPanel */
#settingsPanel {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 14px;
  color: #e0dcdd;
  background-color: rgba(51, 51, 51, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#settingsPanel > .settingsRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}
#settingsPanel > .settingsRow > button {
  flex-grow: 1;
  height: 34px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: #aaa;
  background-color: rgba(255, 255, 255, 0.04);
  transition: background-color 250ms ease, color 250ms ease;
}
#settingsPanel > .settingsRow > button:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}
#settingsPanel > .settingsRow > div {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  cursor: pointer;
  color: #aaa;
}
#settingsPanel > .settingsRow > div.toggleSwitch {
  padding: 0 4px;
}
#settingsPanel > .settingsRow > div.toggleSwitch .toggleTrack {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.15);
  position: relative;
  transition: background-color 200ms ease;
}
#settingsPanel > .settingsRow > div.toggleSwitch .toggleTrack .toggleThumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #777;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 200ms ease, background-color 200ms ease;
}
#settingsPanel > .settingsRow > div.toggleSwitch.active .toggleTrack {
  background-color: rgba(255, 102, 0, 0.35);
}
#settingsPanel > .settingsRow > div.toggleSwitch.active .toggleTrack .toggleThumb {
  transform: translateX(16px);
  background-color: #f60;
}
#settingsPanel > .settingsRow > div:hover {
  color: #e0dcdd;
}
#settingsPanel > .divider {
  width: 100%;
  height: 1px;
  margin: 8px 0;
  background-color: rgba(255, 255, 255, 0.08);
}

/* infoPanel */
#infoPanel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}
#infoPanel > #infoPanelContent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: min(80vh, 640px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e0dcdd;
  background-color: rgba(51, 51, 51, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#infoPanel > #infoPanelContent > #viewerTitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  flex-shrink: 0;
  background-color: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  white-space: nowrap;
  color: #e0dcdd;
}
#infoPanel > #infoPanelContent > #viewerTitle > svg {
  height: 20px;
  width: auto;
  flex-shrink: 0;
}
#infoPanel > #infoPanelContent > #viewerTitle > svg > g.stroke {
  fill: black;
  stroke: black;
  stroke-width: 2;
  stroke-linejoin: round;
  opacity: 0.4;
}
#infoPanel > #infoPanelContent > #viewerTitle > svg > g.fill {
  fill: #f60;
  stroke: none;
}
#infoPanel > #infoPanelContent > #viewerTitle > .title-name {
  font-size: 14px;
  font-weight: bold;
}
#infoPanel > #infoPanelContent > #viewerTitle > .title-version {
  font-size: 12px;
  font-weight: normal;
  color: #aaa;
  margin-left: -2px;
}
#infoPanel > #infoPanelContent > #viewerTitle[href] {
  cursor: pointer;
  transition: color 150ms ease;
}
#infoPanel > #infoPanelContent > #viewerTitle[href]:hover {
  color: #fff;
}
#infoPanel > #infoPanelContent > #infoPanels {
  padding: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#infoPanel > #infoPanelContent > #infoPanels::-webkit-scrollbar {
  width: 6px;
}
#infoPanel > #infoPanelContent > #infoPanels::-webkit-scrollbar-track {
  background: transparent;
}
#infoPanel > #infoPanelContent > #infoPanels::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
#infoPanel > #infoPanelContent > #infoPanels h1 {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 0 8px 0;
  color: #f60;
}
#infoPanel > #infoPanelContent > #infoPanels .control-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 5px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  font-size: 13px;
}
#infoPanel > #infoPanelContent > #infoPanels .control-item > .control-action {
  text-align: left;
}
#infoPanel > #infoPanelContent > #infoPanels .control-item > .control-key {
  text-align: right;
  color: #aaa;
  font-size: 12px;
}
#infoPanel > #infoPanelContent > #infoPanels .control-item:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}
#infoPanel > #infoPanelContent > #infoPanels .control-spacer {
  margin: 14px 0;
}
#infoPanel > #infoPanelContent > #tabs {
  display: flex;
  gap: 24px;
  padding: 8px 16px;
  justify-content: center;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
#infoPanel > #infoPanelContent > #tabs > .tab {
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  color: #aaa;
  transition: color 150ms ease, border-color 150ms ease;
}
#infoPanel > #infoPanelContent > #tabs > .tab:hover {
  color: #fff;
}
#infoPanel > #infoPanelContent > #tabs > .tab.active {
  color: #fff;
  border-bottom-color: #f60;
}

#joystickBase {
  position: absolute;
  width: 56px;
  height: 100px;
  transform: translate(-50%, -50%);
  border-radius: 28px;
  touch-action: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2666666667) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.2666666667) 100%);
  background-color: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease;
}
#joystickBase > #joystick {
  position: absolute;
  left: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  touch-action: none;
  background-color: rgba(255, 255, 255, 0.5333333333);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: left 0.1s ease;
}
#joystickBase.mode-2d {
  width: 100px;
  height: 100px;
  border-radius: 50px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.2666666667) 100%);
  background-color: rgba(0, 0, 0, 0.2);
}
#joystickBase.mode-2d > #joystick {
  left: 30px;
}

/* xr WebGL-required modal */
#xrModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#xrModal > #xrModalContent {
  width: min(360px, 100vw - 32px);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e0dcdd;
  background-color: rgba(51, 51, 51, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#xrModal > #xrModalContent > h2 {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 12px;
}
#xrModal > #xrModalContent > p {
  font-size: 13px;
  line-height: 1.4;
  color: #e0dcdd;
  margin-bottom: 16px;
}
#xrModal > #xrModalContent > #xrModalButtons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
#xrModal > #xrModalContent > #xrModalButtons > button {
  height: 34px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: #aaa;
  background-color: rgba(255, 255, 255, 0.04);
  transition: background-color 250ms ease, color 250ms ease;
}
#xrModal > #xrModalContent > #xrModalButtons > button:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}
#xrModal > #xrModalContent > #xrModalButtons > button#xrModalOk {
  color: #fff;
  background-color: rgba(255, 102, 0, 0.7);
  border-color: rgba(255, 102, 0, 0.8);
}
#xrModal > #xrModalContent > #xrModalButtons > button#xrModalOk:hover {
  background-color: #f60;
}

#tooltip {
  display: none;
  position: absolute;
  border-radius: 4px;
  padding: 4px 4px;
  font-size: 12px;
  color: #e0dcdd;
  background-color: #282828;
}

#annotations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

#annotations * {
  pointer-events: auto;
}

/* annotationNav */
#annotationNav {
  pointer-events: none;
}
#annotationNav.faded-in {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}
#annotationNav.faded-out {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.5s, opacity 0.5s ease-out;
}
#annotationNav > button {
  pointer-events: auto;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0dcdd;
  background-color: rgba(0, 0, 0, 0.3);
}
#annotationNav > button:hover {
  color: #fff;
  background-color: rgba(0, 0, 0, 0.5);
}
#annotationNav > button > svg {
  display: block;
}
#annotationNav > button > svg > g.stroke {
  fill: none;
  stroke: black;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.4;
}
#annotationNav > button > svg > g.fill {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#annotationNav.desktop {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: var(--pill-radius);
  background: var(--pill-bg);
  -webkit-backdrop-filter: var(--pill-blur);
          backdrop-filter: var(--pill-blur);
  border: var(--pill-border);
}
#annotationNav.desktop > button {
  width: 36px;
  height: 36px;
  border-radius: var(--pill-button-radius);
  color: var(--pill-icon);
  background-color: transparent;
  transition: background-color 150ms ease, color 150ms ease;
}
#annotationNav.desktop > button:hover {
  color: #fff;
  background-color: var(--pill-icon-hover-bg);
}
#annotationNav.desktop > #annotationInfo {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 8px;
  white-space: nowrap;
  width: 240px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}
#annotationNav.desktop > #annotationInfo > #annotationNavTitle {
  font-family: var(--ui-font);
  font-size: 11px;
  color: var(--pill-text);
  overflow: hidden;
  text-overflow: ellipsis;
}
#annotationNav.touch {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#annotationNav.touch > #annotationInfo {
  display: none;
}
#annotationNav.touch > button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 80px;
  background-color: rgba(0, 0, 0, 0.3);
}
#annotationNav.touch > button:active {
  background-color: rgba(0, 0, 0, 0.4);
}
#annotationNav.touch > #annotationPrev {
  left: max(0px, env(safe-area-inset-left));
  border-radius: 0 6px 6px 0;
}
#annotationNav.touch > #annotationNext {
  right: max(0px, env(safe-area-inset-right));
  border-radius: 6px 0 0 6px;
}
/* tourNav — bottom-centre control row, matching the marketing site's tour
   overlay. The capsules themselves are the site's own .detail-prevnext /
   .detail-tour-btn / .detail-splash-hint classes (see the gospl-ui.css link in
   index.html); everything below is only what those classes cannot express for
   this context. Deliberately NOT using the --pill-* tokens: those still belong
   to #annotationNav and #tooltip, which keep the older dark-pill look. */
#tourNav {
  pointer-events: none;
  position: absolute;
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 50px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
#tourNavRow {
  display: flex;
  align-items: center;
  gap: 14px;
}
#tourNavRow > button {
  pointer-events: auto;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  margin: 0;
  cursor: pointer;
  font-family: var(--ui-font);
  justify-content: center;
}
/* The site ships a later `.detail-tour-btn { display: none }` override — its own
   tour button is hidden on the marketing page. Re-assert the display it declares
   earlier, or the centre control silently vanishes. Also drop the site's
   margin-top, which positions it under a heading it doesn't have here. */
#tourNav #tourPlay.detail-tour-btn {
  display: inline-flex;
  margin-top: 0;
  /* .detail-tour-btn is a bare outline on the site — it sits on a dark hero
     image there, so it needs no fill of its own. Over a live splat scene it has
     nothing behind it and the label becomes unreadable, so give it the same
     fill and blur .detail-prevnext carries. The border stays the site's
     brighter #ffffff80 (vs the arrows' #fff6) — that difference is deliberate,
     marking this as the primary control. */
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
/* The reference rings the centre pill's icon; .detail-tour-btn .arrow is a bare
   18px glyph, so make it a circle in its own right. */
#tourNavRow > #tourPlay > #tourPlayIcon {
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  overflow: visible;
}
#tourNavRow > #tourPlay > #tourNavTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
/* .detail-prevnext is a text+icon pill on the site (padding: 9px 16px); here the
   arrows stand alone, so square the padding into a circle. */
#tourNavRow > .detail-prevnext {
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
}
#tourNavRow > .detail-prevnext > .arrow {
  width: 16px;
  height: 16px;
}
/* The site's .prev flips its arrow with scaleX(-1); ours is already a left
   chevron by geometry, so cancel that and keep both arrows pointing outward. */
#tourNavRow > .detail-prevnext.prev > .arrow {
  transform: scaleX(-1);
}
/* .detail-splash-hint is uppercase+tracked on the site's splash; the tour bar
   reads it as sentence case, per the reference. */
#tourNav > #tourNavHint {
  pointer-events: auto;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 4px 8px;
  cursor: pointer;
  font-family: var(--ui-font);
  text-transform: none;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 150ms ease;
}
#tourNav > #tourNavHint:hover {
  color: #fff;
}
#tourNav > #tourNavHint > svg {
  width: 16px;
  height: 16px;
  display: block;
  flex: none;
}

/* Control-help card — one image per camera mode, mouse and touch variants,
   opened from the hint line. Images are pre-rendered PNGs under /icons. */
#controlsCard {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
#controlsCard > img {
  max-width: min(420px, 100%);
  max-height: 100%;
  object-fit: contain;
  display: block;
}

