/* Tokens match the main site (index.html) */
:root {
  --gold: #D4A820;
  --gold-bright: #FFD055;
  --silver: #C0C0C0;
  --silver-bright: #E8E8E8;
  --dark: #080808;
  --grey: #777;
  --grey-light: #AAAAAA;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --display: 'Bebas Neue', Impact, sans-serif;
  /* The site's gold glitter stripe, reused as a material */
  --stripe: url("images/hero-bg.jpg");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--dark); color: var(--silver-bright); }
body { font-family: var(--mono); font-weight: 400; -webkit-font-smoothing: antialiased; }
/* This page is an instrument, not a document: dragging round the solar system must never highlight the headline,
   track titles or status labels on the way past, so interface text isn't selectable */
.site-header, .track-menu, .stage, .player, .worlds { -webkit-user-select: none; user-select: none; }
#scene { -webkit-touch-callout: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--gold-bright); outline-offset: 3px; }
svg { display: block; }

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.5rem 3.2rem;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 1.4rem; text-decoration: none; color: var(--silver-bright); }
.brand-logo { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(192,192,192,0.4)) drop-shadow(0 0 4px rgba(212,168,32,0.35)); }
.brand-divider { width: 1px; height: 38px; background: linear-gradient(180deg, transparent, rgba(232,232,232,0.5), transparent); }
.brand-word { font-family: var(--display); font-size: 2.3rem; letter-spacing: 0.2em; line-height: 1; padding-top: 0.15em;
  background: linear-gradient(130deg,#D0D0D0 0%,#FFF 35%,#E8E8E8 60%,#C8C8C8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.headline-probe { position: absolute; visibility: hidden; pointer-events: none; white-space: nowrap;
  font-family: var(--display); font-size: 1.2rem; letter-spacing: 0.24em; }
.site-nav { margin-left: auto; display: flex; gap: 3.4rem; }
.nav-link { position: relative; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--silver-bright); text-decoration: none; padding: 0.4rem 0; transition: color 0.3s; }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--stripe) center/cover, var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.35s; }
.nav-link:hover { color: var(--gold-bright); }
.nav-link.active::after, .nav-link[aria-expanded="true"]::after { transform: scaleX(1); }
.menu-btn { display: none; }

/* Tracks dropdown */
.track-menu {
  position: fixed; z-index: 29; top: 5.4rem; right: 3.2rem; min-width: 300px;
  background: rgba(10,10,10,0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212,168,32,0.25); padding: 0.6rem;
}
.track-menu ol { list-style: none; }
.track-menu button { width: 100%; display: flex; align-items: center; gap: 0.9rem; padding: 0.55rem 0.6rem; text-align: left; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; transition: background 0.2s, color 0.2s; }
.track-menu button:hover { background: rgba(212,168,32,0.1); color: var(--gold-bright); }
.track-menu button.current { color: var(--gold-bright); }
.track-menu img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(212,168,32,0.35); }
.track-menu .dur { margin-left: auto; color: var(--grey-light); letter-spacing: 0.08em; }

/* Shortcuts (desktop): a compact key list in the same dark, gold-edged dropdown as Tracks */
.shortcuts-panel {
  position: fixed; z-index: 29; top: 5.4rem; right: 3.2rem; padding: 0.9rem 1.2rem 1rem;
  background: rgba(10,10,10,0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212,168,32,0.25);
}
.shortcuts-panel dl { display: grid; grid-template-columns: auto auto; column-gap: 1.2rem; row-gap: 0.55rem; align-items: center; }
.shortcuts-panel dt { justify-self: end; }
.shortcuts-panel dd { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver-bright); }
.shortcuts-panel kbd {
  display: inline-block; min-width: 1.9rem; padding: 0.28rem 0.45rem; text-align: center;
  font-family: var(--mono); font-size: 0.7rem; line-height: 1; letter-spacing: 0.06em; color: var(--gold-bright);
  border: 1px solid rgba(212,168,32,0.4); border-radius: 4px; background: rgba(212,168,32,0.06);
}

/* ── STAGE ──────────────────────────────────────────────── */
.stage { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #1a0f05 0%, #080808 60%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.headline {
  position: absolute; z-index: 5; left: 3.4rem; top: 19vh;
  /* Sized so the longer two-line wording fills the same box as the old "EXPLORE / THE SOUND.", which the camera's
     shot composition keeps clear (scene.js _scoreShot) */
  font-family: var(--display); font-weight: 400; font-size: clamp(2.8rem, 4.9vw, 5.6rem); line-height: 0.92; letter-spacing: 0.01em;
  color: #F2EEE6; text-shadow: 0 4px 30px rgba(0,0,0,0.8); pointer-events: none;
}
.headline .dot { color: var(--gold-bright); text-shadow: 0 0 2px rgba(0,0,0,0.9), 0 3px 14px rgba(0,0,0,0.9); }
.hl-line { display: block; width: max-content; transform-origin: 0 0; white-space: nowrap; }
/* The darkening behind the header, drawn beneath the headline so it can rest there as the subtitle undimmed
   (on desktop; the phone header has its own background) */
.stage::before { content: ''; position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 6.4rem; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,8,8,0.75), rgba(8,8,8,0)); }
.hint {
  position: absolute; z-index: 5; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--grey-light);
  padding: 0.6rem 1.2rem; border: 1px solid rgba(212,168,32,0.2); background: rgba(8,8,8,0.5); backdrop-filter: blur(6px);
  transition: opacity 0.6s; pointer-events: none; white-space: nowrap;
}
.hint.hidden { opacity: 0; }
.planet-label {
  position: absolute; z-index: 6; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity 0.2s;
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--silver-bright); text-align: center;
  white-space: nowrap; text-shadow: 0 0 6px rgba(0,0,0,0.95), 0 2px 12px rgba(0,0,0,0.9);
}
.planet-label.show { opacity: 1; }
/* Hover preview: just the cover in a circle, with the title beneath */
.planet-label img { display: block; width: 84px; height: 84px; margin: 0 auto 0.55rem; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(212,168,32,0.5), 0 4px 18px rgba(0,0,0,0.7); }

/* Progress arc around the playing planet. Only the transparent hit stroke takes the pointer, so drags
   anywhere else still orbit the camera. */
.arc { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0.5s; }
.arc.show { opacity: 1; visibility: visible; }
.arc g { outline: none; }
.arc-track { fill: none; stroke: rgba(255,255,255,0); stroke-width: 1.2; transition: stroke 0.3s; }
.arc-hit { fill: none; stroke: transparent; stroke-width: 24; pointer-events: stroke; cursor: pointer; touch-action: none; }
.arc:hover .arc-track, .arc.dragging .arc-track { stroke: rgba(255,255,255,0.22); }
.arc g:focus-visible .arc-track { stroke: var(--gold-bright); stroke-opacity: 0.6; }

/* Comet: a tapering tail of played time, a glowing head that flickers and glints, and sparks shed behind it */
.arc-tail { filter: drop-shadow(0 0 3px rgba(255,208,85,0.65)); }
.arc-tail path { fill: none; stroke: var(--gold-bright); stroke-linecap: butt; }
/* --head sizes the comet's head: a touch larger on desktop, where the planets sit further from the viewer */
.arc-head { --head: 1; transform: scale(var(--head)); transition: transform 0.2s; }
@media (min-width: 820px) { .arc-head { --head: 1.25; } }
.arc.dragging .arc-head, .arc:hover .arc-head { transform: scale(calc(var(--head) * 1.3)); }
.arc-glow, .arc-glint { transform-box: fill-box; transform-origin: center; }
.arc-glow { animation: comet-flicker 1.7s ease-in-out infinite; }
.arc-glint { fill: #FFF6D6; animation: comet-glint 2.6s linear infinite; }
/* A finer diagonal glint, out of step with the main one, so the head never sparkles the same way twice */
.arc-glint-x { opacity: 0.6; animation: comet-glint-x 3.7s linear infinite; }
.arc-core { fill: #FFFDF5; filter: drop-shadow(0 0 2.5px rgba(255,226,140,1)) drop-shadow(0 0 6px rgba(255,200,80,0.7)); }
.arc.paused .arc-glow, .arc.paused .arc-glint { animation-play-state: paused; }
@keyframes comet-flicker {
  0%, 100% { opacity: 0.72; transform: scale(0.9); }
  18% { opacity: 1; transform: scale(1.14); }
  37% { opacity: 0.8; transform: scale(0.97); }
  61% { opacity: 1; transform: scale(1.08); }
  80% { opacity: 0.86; transform: scale(1); }
}
@keyframes comet-glint {
  0% { opacity: 0.35; transform: rotate(0deg) scale(0.55); }
  25% { opacity: 1; transform: rotate(22deg) scale(1.15); }
  50% { opacity: 0.45; transform: rotate(45deg) scale(0.7); }
  70% { opacity: 0.9; transform: rotate(63deg) scale(1); }
  100% { opacity: 0.35; transform: rotate(90deg) scale(0.55); }
}
@keyframes comet-glint-x {
  0% { opacity: 0.15; transform: rotate(45deg) scale(0.6); }
  14% { opacity: 0.95; transform: rotate(52deg) scale(1.2); }
  33% { opacity: 0.2; transform: rotate(64deg) scale(0.65); }
  58% { opacity: 0.1; transform: rotate(80deg) scale(0.5); }
  76% { opacity: 0.7; transform: rotate(92deg) scale(1); }
  100% { opacity: 0.15; transform: rotate(135deg) scale(0.6); }
}
.orbit-tag { display: none; }
.loader { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; pointer-events: none; transition: opacity 0.8s; }
.loader span { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(212,168,32,0.2); border-top-color: var(--gold-bright); animation: spin 1s linear infinite; }
.loader.done { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.fallback { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: 30ch; text-align: center; color: var(--grey-light); font-size: 0.8rem; line-height: 1.6; }

/* ── PLAYER (desktop: beneath the playing planet; docked in the corner in the overview) ── */
/* Compact controls floating over the scene, with no panel behind them: white primary controls, muted-gold secondary
   ones. A soft dark shadow round the text and icons keeps them legible in front of the sun. */
.player {
  --muted-gold: #C9A23A;
  position: fixed; z-index: 10; left: 0; top: 0; width: 356px; text-align: center;
  padding: 0.85rem 1.1rem 0.6rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 14px rgba(0,0,0,0.85);
  opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0.5s;
  will-change: transform;
}
.player .ctrl svg, .player .icon-btn svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.9)) drop-shadow(0 0 8px rgba(0,0,0,0.6)); }
.player .vol-pop svg { filter: none; }
.player.show { opacity: 1; visibility: visible; }
.np-label { font-size: 0.66rem; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted-gold); padding-left: 0.34em; }
.np-title { margin-top: 0.3rem; font-family: var(--display); font-weight: 400; font-size: 2.05rem; line-height: 1; letter-spacing: 0.26em; padding-left: 0.26em; text-transform: uppercase; color: #F4F1EA; overflow-wrap: anywhere; }
.np-title.long { font-size: 1.5rem; letter-spacing: 0.2em; padding-left: 0.2em; }   /* long titles, so they take two lines at most */
.controls { display: flex; align-items: center; justify-content: center; gap: 1.05rem; margin: 0.65rem 0 0.35rem; }
.ctrl { position: relative; width: 40px; height: 44px; display: grid; place-items: center; color: #fff; transition: color 0.2s, transform 0.2s; }
.ctrl svg { width: 17px; height: 17px; }
.ctrl:hover { color: var(--gold-bright); }
.ctrl:active { transform: scale(0.92); }
/* Ten-second jumps: gold, quieter than the main controls, with the "10s" beneath */
.ctrl-jump { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted-gold); }
.ctrl-jump svg { width: 21px; height: 21px; }
.ctrl-jump span { font-size: 0.56rem; letter-spacing: 0.04em; line-height: 1; }
.ctrl-play { width: 56px; height: 56px; margin: 0 0.25rem; border-radius: 50%; border: 1px solid rgba(201,162,58,0.8); background: transparent; box-shadow: 0 0 10px rgba(0,0,0,0.45), inset 0 0 10px rgba(0,0,0,0.3); transition: color 0.2s, transform 0.2s, border-color 0.2s, background 0.2s; }
.ctrl-play svg { width: 19px; height: 19px; }
.ctrl-play:hover { background: rgba(212,168,32,0.12); border-color: var(--gold-bright); color: #fff; }

/* Speaker · time · camera view, one quiet row */
.np-meta { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 2.9rem; }
.np-meta .vol { justify-self: start; position: relative; }
.np-meta #btnView { justify-self: end; }
.icon-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted-gold); transition: color 0.2s, transform 0.3s; }
.icon-btn svg { width: 20px; height: 20px; }
/* The speaker fills less of its drawing than the orbital camera icon does, so it is drawn larger to look the same size
   (the mute button, which takes its place when the volume opens, matches it) */
#btnVol svg, #btnMute svg { width: 27px; height: 27px; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--gold-bright); }
.icon-btn.muted { color: var(--grey); }

/* Volume: the speaker opens out sideways into a small floating card along its own row (over the time for a moment, but
   clear of the main controls): a mute toggle sitting just where the speaker was, and a short slider */
.vol-pop {
  position: absolute; z-index: 2; left: calc(-0.3rem - 1px); top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  background: rgba(10,10,10,0.95); border: 1px solid rgba(201,162,58,0.4); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.vol-pop .icon-btn { color: var(--silver-bright); }
.vol-pop .icon-btn.muted { color: var(--grey); }
.vol-range { -webkit-appearance: none; appearance: none; width: 104px; height: 28px; background: none; cursor: pointer; touch-action: none; --p: 1; }
.vol-range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--gold-bright) calc(var(--p) * 100%), rgba(255,255,255,0.22) 0); }
.vol-range::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--gold-bright) calc(var(--p) * 100%), rgba(255,255,255,0.22) 0); }
.vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4.5px; border-radius: 50%; border: 0; background: var(--gold-bright); box-shadow: 0 0 6px rgba(255,208,85,0.8); }
.vol-range::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; border: 0; background: var(--gold-bright); box-shadow: 0 0 6px rgba(255,208,85,0.8); }
.vol-pop.muted .vol-range { --p: 0; opacity: 0.45; }

/* A brief note over a control (the camera view just chosen, the volume set by a key): fades in, then away */
.np-flash {
  position: absolute; z-index: 3; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none;
  padding: 0.38rem 0.6rem; font-size: 0.66rem; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-bright);
  background: rgba(8,8,8,0.92); border: 1px solid rgba(201,162,58,0.4); border-radius: 6px; text-shadow: none;
  opacity: 0; transition: opacity 0.25s;
}
.np-flash.show { opacity: 1; }
/* The camera button brightens while its icon spins into the next view (the spin itself: main.js spinViewIcon) */
#btnView.turned { color: var(--gold-bright); }

/* Straight seek bar — the gold fill is drawn from --p (0..1) */
.seek { display: none; -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0.2rem 0 0.3rem; background: none; cursor: pointer; touch-action: none; --p: 0; }
.seek::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--gold-bright) calc(var(--p) * 100%), rgba(255,255,255,0.2) 0); }
.seek::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--gold-bright) calc(var(--p) * 100%), rgba(255,255,255,0.2) 0); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4.5px; border-radius: 50%; border: 0; background: var(--gold-bright); box-shadow: 0 0 6px rgba(255,208,85,0.9); }
.seek::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; border: 0; background: var(--gold-bright); box-shadow: 0 0 6px rgba(255,208,85,0.9); }
.seek:focus-visible { outline-offset: 2px; }
.player.docked .seek { display: block; }
.time { text-align: center; font-size: 0.78rem; letter-spacing: 0.08em; color: var(--grey-light); font-variant-numeric: tabular-nums; white-space: nowrap; }


.worlds { display: none; }

/* ── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 819px) {
  .site-header { position: sticky; padding: 0.9rem 1.2rem; gap: 1rem; background: rgba(8,8,8,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(212,168,32,0.35), var(--gold-bright) 50%, rgba(212,168,32,0.35)); }
  .brand { gap: 1rem; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-divider { height: 30px; }
  .brand-word { font-size: 1.75rem; }
  .headline-probe { display: none; }   /* phones fade the headline rather than moving it here */
  .menu-btn { display: flex; flex-direction: column; justify-content: center; gap: 7px; width: 44px; height: 44px; margin-left: auto; flex-shrink: 0; }
  .menu-btn span { display: block; height: 2px; background: var(--silver-bright); transition: transform 0.3s, opacity 0.3s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(8,8,8,0.97); border-bottom: 1px solid rgba(212,168,32,0.3); }
  .site-nav.open { display: flex; }
  .nav-link { padding: 1rem 1.4rem; text-align: left; }
  .nav-link::after { left: 1.4rem; right: auto; width: 2.5rem; bottom: 0.7rem; }
  .track-menu { top: 4.6rem; left: 1rem; right: 1rem; min-width: 0; }
  .nav-shortcuts, .shortcuts-panel { display: none !important; }   /* keyboard shortcuts are a desktop matter */

  /* The narrowest phones (320px): a slightly smaller wordmark, so the menu button keeps its full 44px target */
  @media (max-width: 359px) {
    .brand { gap: 0.7rem; }
    .brand-word { font-size: 1.45rem; }
  }
  .stage { position: relative; inset: auto; height: clamp(380px, 64svh, 620px); background: transparent; }
  /* Short phones (visible height under ~667px, e.g. iPhone SE in Safari): shorten the stage just enough that
     the play controls are on screen without scrolling. Taller phones are unchanged. */
  @supports (height: 1svh) {
    .stage { height: clamp(300px, min(64svh, 100svh - 240px), 620px); }
  }
  .stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(180deg, transparent, var(--dark)); pointer-events: none; z-index: 2; }
  /* The site's gold glitter stripe, glowing faintly beneath the collection */
  .worlds { background: linear-gradient(180deg, var(--dark) 0%, rgba(8,8,8,0.82) 45%, rgba(8,8,8,0.9) 100%), var(--stripe) 70% 60%/220% auto no-repeat; }
  /* one-finger drag orbits the camera; the page scrolls from the player and gallery below */
  #scene { touch-action: none; }
  .headline { left: 1.4rem; top: 1.6rem; font-size: clamp(2.6rem, 13vw, 4.6rem); }
  .stage::before { display: none; }
  .hint { display: none; }
  .orbit-tag {
    display: flex; align-items: center; gap: 0.5rem; position: absolute; z-index: 6; left: 0; top: 0;
    font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-bright); pointer-events: none;
    opacity: 0; transition: opacity 0.4s; text-shadow: 0 0 8px rgba(0,0,0,0.9);
  }
  .orbit-tag::before { content: ''; width: 26px; height: 1px; background: var(--gold); box-shadow: 0 0 4px var(--gold-bright); }
  .orbit-tag.show { opacity: 1; }

  /* The same controls, in the page beneath the scene: just previous, play/pause and next, at finger size */
  .player {
    position: relative; width: auto; opacity: 1; visibility: visible; transform: none !important;
    margin: 0 auto 1.4rem; width: min(100% - 2rem, 460px);   /* compact on portrait tablets too */
    padding: 0.75rem clamp(0.4rem, 3vw, 1.2rem) 0.3rem; display: flex; flex-direction: column;
  }
  .np-label { font-size: 0.72rem; }
  .np-title { font-size: clamp(1.9rem, 8.5vw, 2.6rem); letter-spacing: 0.2em; padding-left: 0.2em; }
  .np-title.long { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  /* Five controls across even the narrowest phone: every target at least 44px, the gaps giving way first */
  .controls { width: 100%; max-width: 340px; margin: 0.6rem auto 0.3rem; gap: 0; justify-content: space-between; }
  .ctrl { width: 44px; height: 52px; }
  .ctrl svg { width: 22px; height: 22px; }
  .ctrl-jump svg { width: 24px; height: 24px; }
  .ctrl-jump span { font-size: 0.6rem; }
  .ctrl-play { width: 64px; height: 64px; margin: 0; }
  .ctrl-play svg { width: 24px; height: 24px; }
  .seek { display: block; margin: 0; height: 28px; }
  .arc-hit { stroke-width: 36; }
  .np-meta { padding: 0 0.4rem; }
  .icon-btn { width: 44px; height: 40px; }
  .icon-btn svg { width: 22px; height: 22px; }
  #btnVol svg, #btnMute svg { width: 30px; height: 30px; }
  .time { font-size: 0.84rem; }
  .vol-range { width: min(162px, 46vw); height: 36px; }

  .worlds { display: block; padding: 0.6rem 0 2.4rem; text-align: center; }
  .worlds h3 { font-family: var(--mono); font-weight: 400; font-size: 0.86rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 1rem; }
  .worlds-track {
    display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.6rem 1.4rem 0.4rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .worlds-track::-webkit-scrollbar { display: none; }
  .world { flex: 0 0 auto; width: 31%; min-width: 108px; max-width: 150px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
  .world img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(212,168,32,0.4), 0 0 22px rgba(212,168,32,0.25), inset 0 0 20px rgba(0,0,0,0.6); transition: transform 0.25s, box-shadow 0.25s; }
  .world:active img { transform: scale(0.95); }
  .world span { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; line-height: 1.4; }
  .swipe-hint { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 1rem; font-size: 0.76rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--grey-light); }
  .swipe-hint button { width: 44px; height: 44px; display: grid; place-items: center; }
  .swipe-hint svg { width: 18px; height: 18px; }
}

/* Landscape phones wide enough for the desktop layout: a compact header and headline, so the brand, headline
   and player don't crowd each other in a viewport only ~400px tall */
@media (min-width: 820px) and (max-height: 520px) {
  .site-header { padding: 0.7rem 2rem; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-divider { height: 28px; }
  .brand-word { font-size: 1.7rem; }
  .headline { left: 2.2rem; top: 4.6rem; font-size: clamp(1.9rem, 8.75vh, 2.8rem); }
  .track-menu { top: 3.9rem; right: 2rem; max-height: calc(100vh - 4.6rem); overflow-y: auto; }
  .hint { bottom: 1rem; }
  /* A shorter player, so it fits beneath the planet in a window this low */
  .player { width: 312px; padding: 0.35rem 0.8rem 0.15rem; }
  .np-label { font-size: 0.6rem; }
  .np-title { margin-top: 0.15rem; font-size: 1.45rem; }
  .np-title.long { font-size: 1.15rem; }
  .controls { gap: 0.8rem; margin: 0.3rem 0 0.05rem; }
  .ctrl { width: 44px; height: 44px; }   /* still finger-sized: windows this low are mostly phones held sideways */
  .ctrl-play { width: 46px; height: 46px; }
  .icon-btn { height: 30px; }
  .nav-link { padding: 0.85rem 0; }            /* touch-sized targets, with the underline kept close to the text */
  .nav-link::after { bottom: 0.6rem; }
}

[hidden] { display: none !important; }

/* No WebGL: keep a usable player on screen */
@media (min-width: 820px) {
  .no3d .player { opacity: 1; visibility: visible; left: 50%; top: auto; bottom: 3rem; transform: translateX(-50%) !important; }
  .no3d .hint { display: none; }
  .no3d .seek { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .arc-glow, .arc-glint { animation: none !important; }
  .arc-glint-x { transform: rotate(45deg); opacity: 0.45; }
  /* Run each animation once, almost instantly: a 0.01s duration on an infinite animation would strobe */
  * { transition-duration: 0.01s !important; animation-duration: 0.01s !important; animation-iteration-count: 1 !important; }
  .loader span { animation: none !important; }
}
