/* SOUND — ISHLVLSTUDIOS
   White room (home palette) + Digital Experience structure:
   top bar with 3D/2D switch, a narrow text column beside a full-bleed
   stage on desktop, stage over a sheet on phones. */
:root {
  color-scheme: light;
  --white: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #4b4b4b;
  --ink-3: #6b6b6b;
  --ink-4: #b3b3b3;
  --line: rgba(10, 10, 10, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --tint: #b34a36;

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --step--1: 0.6875rem;
  --step-0: 0.9375rem;
  --step-2: 1.6rem;
  --step-hero: clamp(2.2rem, 3.6vw, 3.6rem);
  --track: 0.22em;
  --edge: clamp(16px, 2.4vw, 36px);
  --panel-w: min(22rem, 26vw);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-soft: cubic-bezier(.16, .84, .44, 1);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-ui); font-size: var(--step-0); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.mode-3d, body.mode-2d { overflow: hidden; overscroll-behavior: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: var(--white); padding: 8px 12px; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
.label { font-size: var(--step--1); font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-3); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: 12px;
  padding-left: max(var(--edge), env(safe-area-inset-left, 0px)); padding-right: max(var(--edge), env(safe-area-inset-right, 0px));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: block; line-height: 0; }
.brand img { height: 44px; width: auto; }
.crumb { padding-left: 16px; border-left: 1px solid var(--line); color: var(--ink-2); text-decoration: none; transition: color .3s; }
.crumb:hover { color: var(--ink); }
.dim-switch {
  margin-left: auto; display: flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dim-switch button, .stage-bar button {
  border: 0; background: none; cursor: pointer; border-radius: 999px; padding: 7px 13px; color: var(--ink-2);
  font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.dim-switch button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.dim-switch button:disabled { cursor: default; opacity: .45; }

/* ---------- stage ---------- */
#scene {
  position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: block; z-index: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 48px); mask-image: linear-gradient(to right, transparent 0, #000 48px);
  touch-action: none; outline: none; -webkit-user-select: none; user-select: none;
  opacity: 0; transition: opacity 1.4s var(--ease-soft);
}
body.is-ready #scene { opacity: 1; }
#scene.is-grab { cursor: grab; }
#scene.is-grabbing { cursor: grabbing; }

/* ---------- text column (desktop) / sheet (phone) ---------- */
#panel {
  position: fixed; z-index: 12;
  left: max(var(--edge), env(safe-area-inset-left, 0px)); width: var(--panel-w);
  top: calc(96px + env(safe-area-inset-top, 0px)); bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; justify-content: safe center;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  pointer-events: none;
  opacity: 0; transform: translateY(10px);
  transition: opacity 1.1s var(--ease) .5s, transform 1.1s var(--ease) .5s;
}
#panel > * { pointer-events: auto; }
body.is-ready #panel { opacity: 1; transform: none; }
.eyebrow { margin: 0 0 14px; }
#panel h1 {
  margin: 0; font-weight: 600; font-size: var(--step-hero); line-height: .92; letter-spacing: -.025em; text-transform: uppercase;
}
.lede {
  margin: 18px 0 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(1.1rem, 1.3vw, 1.35rem);
  line-height: 1.28; max-width: 30ch; text-wrap: balance;
}
.lede span { display: block; color: var(--ink-3); }

/* the record list */
.crate-label { margin: 28px 0 10px; }
.crate { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.crate-item {
  width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px;
  padding: 6px 10px 6px 6px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left;
  transition: background .4s var(--ease);
}
.crate-item:hover { background: rgba(10,10,10,.04); }
.crate-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.5); }
.crate-text { display: grid; gap: 2px; min-width: 0; }
.crate-no { font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.crate-title { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crate-state { font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.crate-item[aria-pressed="true"] { background: rgba(10,10,10,.05); }
.crate-item.is-playing .crate-state { background: var(--ink); color: var(--white); border-color: var(--ink); }

.np { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.np-title { margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: var(--step-2); line-height: 1.1; }
.np-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.vol { display: flex; align-items: center; gap: 10px; }
.vol .range { width: 96px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: none; margin: 0; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 1px; background: var(--line); }
.range::-moz-range-track { height: 1px; background: var(--line); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); margin-top: -5px; }
.range::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--ink); }
.range:disabled { cursor: default; opacity: .4; }
.np-meta { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cta {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--white); border-radius: 999px; padding: 11px 18px; cursor: pointer;
  font-size: var(--step--1); font-weight: 600; letter-spacing: var(--track); text-transform: uppercase;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.cta:disabled { background: transparent; color: var(--ink-4); border-color: var(--line); cursor: default; }
.cta[aria-pressed="true"] { background: transparent; color: var(--ink); }

/* ---------- hint + bar over the stage ---------- */
.stage-hint {
  position: fixed; z-index: 10; left: var(--sx-mid, 50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); margin: 0; color: var(--ink-4); white-space: nowrap;
  opacity: 0; transition: opacity .8s var(--ease-soft); pointer-events: none;
}
.stage-hint.is-on { opacity: 1; }
.stage-bar {
  position: fixed; z-index: 10; left: var(--sx-mid, 50%); bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 4px; max-width: calc(100% - 20px);
  border: 1px solid var(--line); border-radius: 999px; background: var(--glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity 1s var(--ease) .8s;
}
body.is-ready .stage-bar { opacity: 1; }
.bar-records { display: flex; gap: 2px; }
.stage-bar button { padding: 8px 13px; font-variant-numeric: tabular-nums; }
.stage-bar .arrow { color: var(--ink); letter-spacing: 0; font-size: 15px; padding: 7px 12px; }
.stage-bar button:hover { color: var(--ink); }
.stage-bar button[aria-current="true"] { background: var(--ink); color: var(--white); }
.stage-bar button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.bar-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

/* ---------- loading veil ---------- */
.veil {
  position: fixed; inset: 0; z-index: 50; background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .9s var(--ease), visibility 0s .9s;
}
.veil.gone { opacity: 0; visibility: hidden; }
.veil-bar { width: 140px; height: 1px; background: var(--line); }
.veil-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .4s var(--ease); }

/* ---------- phones & narrow: stage on top, sheet below ---------- */
@media (max-width: 899px) {
  :root { --panel-w: auto; }
  #scene { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); }
  .brand img { height: 36px; }
  #panel {
    left: 0; right: 0; width: auto; top: auto; bottom: 0; justify-content: flex-start; max-height: 47vh; overflow-y: auto; overscroll-behavior: contain;
    padding: 18px max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0, var(--white) 22px);
  }
  .eyebrow, .lede span, .crate-label { display: none; }
  .crate { margin-top: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .crate-item { grid-template-columns: 1fr; gap: 6px; padding: 6px; }
  .crate-item img { width: 100%; height: auto; aspect-ratio: 1; }
  .crate-title { font-size: .95rem; }
  .crate-state { justify-self: start; padding: 3px 8px; }
  #panel h1 { font-size: clamp(1.5rem, 7vw, 2.3rem); }
  .lede { font-size: 1rem; margin-top: 8px; }
  .np { margin-top: 12px; padding-top: 12px; gap: 6px; }
  .np-title { font-size: 1.3rem; }
  .stage-hint { bottom: auto; top: var(--hint-y, 60%); letter-spacing: .12em; text-align: center; white-space: normal; width: calc(100% - 32px); line-height: 1.6; }
  .stage-bar { bottom: auto; top: var(--bar-y, 58%); }
}
@media (max-width: 520px) {
  .crumb { display: none; }
  .stage-bar button { padding: 8px 9px; letter-spacing: .1em; }
  .stage-bar .idx-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001s !important; transition-delay: 0s !important; animation-duration: .001s !important; }
}
@media (max-width: 1280px) and (min-width: 900px) { .stage-bar .idx-label { display: none; } }
@media (min-width: 900px) and (max-height: 780px) {
  #panel { top: calc(84px + env(safe-area-inset-top, 0px)); }
  .eyebrow, .lede span { display: none; }
  .crate-label { margin-top: 18px; }
  .np { margin-top: 18px; padding-top: 14px; }
}

/* ============================================================
   2D VIEW — the same player from above, in HTML/CSS
   ============================================================ */
.stage2d { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; display: none; overflow: hidden;
  touch-action: pan-y; -webkit-user-select: none; user-select: none; }
body.mode-2d .stage2d { display: block; }
body.mode-2d #scene { display: none; }
.flow2d { position: absolute; left: 0; right: 0; z-index: 2; perspective: 1000px; perspective-origin: 50% 40%; transition: opacity .6s var(--ease); }
.flow2d.is-hidden { opacity: 0; pointer-events: none; }
.zoom2d { position: absolute; inset: 0; z-index: 3; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.zoom2d > * { pointer-events: auto; }
.fx2d { position: absolute; left: 0; top: 0; pointer-events: none !important; }

/* sleeves */
.c2 { position: absolute; left: 50%; top: 52%; transform-style: preserve-3d; cursor: grab; will-change: transform; }
.c2-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: none; }
.c2-front, .c2-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 2px; }
.c2-front { background-size: cover; background-position: center; box-shadow: 0 26px 40px -22px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.12); }
.c2-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.18), rgba(255,255,255,0) 38%); pointer-events: none; }
.c2-back { transform: rotateY(180deg); background: #f4f4f2; color: var(--ink); padding: 9%; display: flex; flex-direction: column; gap: 4%;
  box-shadow: 0 26px 40px -22px rgba(0,0,0,.45), inset 0 0 0 1px var(--line); font-size: clamp(7px, 1.4vw, 11px); }
.c2-back span { letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.c2-back .c2-studio { color: var(--ink); }
.c2-back em { margin-top: auto; font-family: var(--font-serif); font-size: 2.2em; line-height: 1.05; color: var(--ink); }
.c2-back .c2-foot { margin-top: auto; padding-top: 6%; border-top: 1px solid var(--line); }
.c2-vinyl { position: absolute; left: 50%; top: 50%; border-radius: 50%; transition: opacity .3s; }

/* records */
.v2 { position: absolute; left: 0; top: 0; border-radius: 50%; display: none; cursor: grab; will-change: transform;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); transition: box-shadow .4s var(--ease); }
.v2.is-lifted { box-shadow: 0 34px 48px -18px rgba(0,0,0,.55); }
.v2-grooves { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, transparent 0 34%, rgba(255,255,255,.05) 34.5% 35%, transparent 35.5% 95.5%, rgba(255,255,255,.12) 96% 97%, transparent 97.5%),
    repeating-radial-gradient(circle, #0c0c0c 0 1px, #161616 1px 2px), #0d0d0d; }
.v2-label { position: absolute; left: 50%; top: 50%; width: 35.2%; height: 35.2%; margin: -17.6% 0 0 -17.6%; border-radius: 50%;
  background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.v2-label::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8%; height: 8%; margin: -4% 0 0 -4%; border-radius: 50%; background: #000; }
.v2-sheen { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 20deg, rgba(255,255,255,0) 0deg, rgba(255,255,255,.13) 30deg, rgba(255,255,255,0) 70deg, rgba(255,255,255,0) 200deg, rgba(255,255,255,.1) 230deg, rgba(255,255,255,0) 265deg);
  -webkit-mask: radial-gradient(circle, transparent 0 18%, #000 18.5%); mask: radial-gradient(circle, transparent 0 18%, #000 18.5%); }

/* the deck, from above */
.deck2d { position: absolute; --light: #c9ccd1; --start: #c9ccd1; }
.deck2d > * { position: absolute; }
.d2-body {
  background:
    radial-gradient(120% 80% at 30% 10%, rgba(255,255,255,.95), rgba(255,255,255,0) 55%),
    linear-gradient(165deg, #fbfaf8 0%, #d9d7d2 34%, #f4f3f0 52%, #bdbbb6 78%, #e9e7e3 100%);
  box-shadow: 0 0 0 calc(var(--k) * .02) var(--light), 0 0 0 calc(var(--k) * .05) #e7e5e1, 0 calc(var(--k) * .5) calc(var(--k) * .8) calc(var(--k) * -.3) rgba(0,0,0,.4),
    inset 0 calc(var(--k) * .04) 0 rgba(255,255,255,.9), inset 0 calc(var(--k) * -.06) calc(var(--k) * .08) rgba(0,0,0,.18); }
.d2-well { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2a2a2c 0, #08080a 45%, #040405 100%);
  box-shadow: 0 0 0 calc(var(--k) * .025) #f2f2f2, 0 0 0 calc(var(--k) * .035) #9c9c9c, inset 0 calc(var(--k) * .05) calc(var(--k) * .12) rgba(0,0,0,.8); }
.d2-lev { border-radius: 50%; box-shadow: 0 0 0 calc(var(--k) * .03) var(--light), 0 0 calc(var(--k) * .25) var(--light); opacity: .9; }
.d2-platter { border-radius: 50%; background: conic-gradient(from 0deg, #f7f7f7, #bdbdbd, #fafafa, #a9a9a9, #f2f2f2, #c6c6c6, #f7f7f7);
  box-shadow: 0 calc(var(--k) * .12) calc(var(--k) * .25) rgba(0,0,0,.45); }
.d2-strobe { position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(#151515 0 .9deg, transparent .9deg 2deg);
  -webkit-mask: radial-gradient(circle, transparent 0 96%, #000 96.5% 99%, transparent 99.5%); mask: radial-gradient(circle, transparent 0 96%, #000 96.5% 99%, transparent 99.5%); }
.d2-mat { position: absolute; inset: 4.9%; border-radius: 50%; background: radial-gradient(circle, #141414, #0b0b0b 70%); }
.d2-snap { border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(10,10,10,.7); opacity: 0; pointer-events: none; }
.d2-spindle { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #9a9a9a); box-shadow: 0 1px 3px rgba(0,0,0,.5); z-index: 1; pointer-events: none; }
.d2-btn { border: 0; padding: 0; border-radius: 50%; cursor: pointer; font: inherit;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfcfcf 55%, #a7a7a7);
  box-shadow: 0 calc(var(--k) * .04) calc(var(--k) * .08) rgba(0,0,0,.35), inset 0 -1px 2px rgba(0,0,0,.2); transition: transform .12s var(--ease); }
.d2-btn:active { transform: scale(.94); }
.d2-start { box-shadow: 0 0 0 calc(var(--k) * .04) #eee, 0 0 0 calc(var(--k) * .06) var(--start), 0 calc(var(--k) * .04) calc(var(--k) * .1) rgba(0,0,0,.35); }
.d2-start i { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; margin: -11% 0 0 -11%; border-radius: 50%; background: #111; }
.d2-speed i { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; margin: -11% 0 0 -11%; border-radius: 50%; background: var(--led, #c9ccd1); }
.d2-speed span { position: absolute; left: 115%; top: 50%; transform: translateY(-50%); font-size: max(8px, calc(var(--k) * .14)); letter-spacing: .1em; color: var(--ink-3); }
.d2-dial { border-radius: 50%; cursor: grab;
  background: repeating-conic-gradient(#d9d9d9 0 4deg, #b9b9b9 4deg 8deg); box-shadow: 0 calc(var(--k) * .05) calc(var(--k) * .1) rgba(0,0,0,.35), inset 0 0 0 calc(var(--k) * .04) #f2f2f2; }
.d2-dial i { position: absolute; left: 50%; top: 8%; width: 9%; height: 30%; margin-left: -4.5%; border-radius: 2px; background: var(--light); }
.d2-armbase { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #bcbcbc 60%, #8f8f8f);
  box-shadow: 0 0 0 calc(var(--k) * .03) var(--light), 0 calc(var(--k) * .06) calc(var(--k) * .12) rgba(0,0,0,.35); }
.d2-rest { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #a8a8a8); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.d2-arm { width: 0; height: 0; z-index: 4; cursor: grab; --lift: 1;
  filter: drop-shadow(0 calc(var(--k) * (.05 + .14 * var(--lift))) calc(var(--k) * (.04 + .08 * var(--lift))) rgba(0,0,0,.45)); }
.d2-arm::before { content: ""; position: absolute; left: calc(var(--k) * -.45); top: calc(var(--k) * -.8); width: calc(var(--k) * .9); height: calc(var(--arm) + var(--k) * 1.1); }
.d2-arm > * { position: absolute; }
.d2-tube { left: calc(var(--k) * -.03); top: calc(var(--k) * -.62); width: calc(var(--k) * .06); height: calc(var(--arm) + var(--k) * .4);
  border-radius: 99px; background: linear-gradient(90deg, #9d9d9d, #ffffff 45%, #b8b8b8); }
.d2-cw { left: calc(var(--k) * -.17); top: calc(var(--k) * -.78); width: calc(var(--k) * .34); height: calc(var(--k) * .42); border-radius: 40%;
  background: radial-gradient(circle at 35% 30%, #fff, #b5b5b5 60%, #8a8a8a); }
.d2-head { left: calc(var(--k) * -.1); top: calc(var(--arm) - var(--k) * .32); width: calc(var(--k) * .2); height: calc(var(--k) * .44); border-radius: 3px;
  background: linear-gradient(90deg, #a5a5a5, #fdfdfd 45%, #b5b5b5); }
.d2-head i { position: absolute; left: 20%; right: 20%; top: 46%; height: 34%; background: #111; border-radius: 2px; box-shadow: 0 1px 0 var(--light); }
.stage2d.is-grabbing, .stage2d.is-grabbing * { cursor: grabbing !important; }

/* ---------- phones: a fixed-height stage, then the page scrolls ---------- */
@media (max-width: 899px) {
  html, body { height: auto; }
  body.mode-3d, body.mode-2d { overflow-x: hidden; overflow-y: auto; }
  .topbar { position: absolute; }
  #scene, .stage2d { position: absolute; }
  .stage-hint, .stage-bar { position: absolute; }
  #panel {
    position: relative; left: auto; right: auto; top: auto; bottom: auto; max-height: none; overflow: visible;
    margin-top: calc(var(--stage-h, 60vh) + 52px); pointer-events: auto; background: var(--white);
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 900px) { #panel { pointer-events: auto; } }
.stage2d [data-kind], .stage2d .c2, .stage2d .v2 { touch-action: none; }
.d2-guide { border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.85); opacity: 0; pointer-events: none; z-index: 3; }
.zoom2d .d2-guide { position: absolute; }
/* licensing line + AI disclosure, under now playing */
.fine { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.fine .label { margin: 0; }
.fine-note { margin: 0; font-size: .78rem; line-height: 1.55; color: var(--ink-3); max-width: 40ch; }
@media (max-width: 899px) { .fine-note { max-width: none; } }
@media (min-width: 900px) and (max-height: 960px) {
  .crate-label { margin-top: 20px; }
  .np { margin-top: 20px; padding-top: 16px; }
  .fine { margin-top: 16px; padding-top: 12px; }
}
/* four records: keep everything on one laptop screen, one line per label on phones */
@media (min-width: 900px) and (max-height: 960px) {
  .crate-item { padding-top: 3px; padding-bottom: 3px; grid-template-columns: 38px 1fr auto; }
  .crate-item img { width: 38px; height: 38px; }
  .crate-label { margin-bottom: 6px; }
}
@media (max-width: 899px) {
  .crate-no { font-size: .58rem; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .crate-title { font-size: .88rem; }
}
@media (max-width: 520px) { .stage-bar button { padding: 8px 7px; } }
@media (max-width: 380px) { .stage-bar button { padding: 8px 5px; } .stage-bar .arrow { padding: 7px 7px; } .bar-sep { margin: 0 2px; } }

/* ---------- desktop: the text column scrolls with the page (no inner scroll box) ----------
   An inner scroller is unreliable in Safari and inside viewers that size the frame to the page,
   where its bottom can end up off-screen with nothing to scroll. The page itself always scrolls. */
@media (min-width: 900px) {
  html, body { height: auto; }
  body.mode-3d, body.mode-2d { overflow-x: hidden; overflow-y: auto; }
  #panel {
    position: absolute; bottom: auto; overflow: visible; pointer-events: auto;
    min-height: calc(100vh - 96px - 26px - env(safe-area-inset-top, 0px));
    justify-content: center;
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }
}
/* when the text column has scrolled, the top bar gets a white backing so text passes behind the logo cleanly */
.topbar { transition: background-color .3s var(--ease); }
body.is-scrolled .topbar { background: linear-gradient(to bottom, var(--white) 72%, rgba(255,255,255,0)); }
