/* ================================================================
   Q WORLD — design system
   Ink & neon: a city of signs. One committed visual world (night city),
   so every colour is painted explicitly rather than inherited.
   ================================================================ */

:root {
  /* ground + neutrals, biased warm-red so nothing reads as default grey */
  --ink:        #101114;
  --ink-2:      #18191d;
  --ink-3:      #202126;
  --ink-4:      #292a30;
  --line:       #3d3d45;
  --line-soft:  #303138;
  --bone:       #f4efe5;
  --bone-dim:   #c8c0b5;
  --bone-faint: #a69e94;

  /* district accents */
  --red:    #f06a94;
  --gold:   #d8b77a;
  --violet: #b7a5ed;
  --pink:   #f06a94;
  --cyan:   #79c8c8;
  --bloodr: #be5364;

  --accent: var(--red);

  --f-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad: clamp(16px, 3vw, 34px);
  --r: 3px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --hud-fade: 240ms cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
::selection { background: var(--red); color: var(--bone); }
h1,h2,h3,h4 { margin: 0; font-family: var(--f-display); font-weight: 900; line-height: .92; text-wrap: balance; letter-spacing: .01em; }
p { margin: 0; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--bone-faint);
}
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- canvas ---------------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: var(--ink); touch-action: none; }

/* scanline/vignette skin over the whole world */
#grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(0,0,0,0) 42%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, rgba(0,0,0,0) 1px 3px);
  mix-blend-mode: normal;
}

/* ================================================================
   SCREENS
   ================================================================ */
.screen {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--ink);
  padding: 0;
}
.screen.fade-out { animation: fadeOut .7s forwards; }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

/* ---------- boot ---------- */
#boot { align-items: center; justify-content: center; text-align: center; padding: var(--pad); }
#boot .boot-inner { max-width: 640px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.presenter { font-family: var(--f-mono); font-size: 11px; letter-spacing: .3em; color: var(--bone-faint); }
.wordmark {
  font-family: var(--f-display); font-weight: 900;
  font-size: clamp(52px, 13.5vw, 158px); line-height: .8; letter-spacing: -.015em; white-space: nowrap;
  color: var(--bone); display: flex; flex-direction: column; align-items: center;
  text-shadow: 0 0 60px rgba(240,106,148,.35);
}
.wordmark em { font-style: normal; color: var(--red); }
.wordmark span, .wordmark em { display: block; }
.boot-line { color: var(--bone-dim); max-width: 44ch; font-size: 15px; }
.boot-rule { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.boot-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
.boot-badges span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .18em; color: var(--bone-faint); }
.boot-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--f-display); font-weight: 900; font-size: 21px; letter-spacing: .04em;
  padding: 13px 30px 11px; border: 1px solid var(--line);
  background: var(--ink-3); color: var(--bone); border-radius: var(--r);
  transition: background .16s, border-color .16s, color .16s, transform .1s;
  text-transform: uppercase; white-space: nowrap;
}
.btn:hover { border-color: var(--bone-faint); background: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: #ff4455; border-color: #ff4455; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #14100a; }
.btn.gold:hover { background: #ffc84e; border-color: #ffc84e; }
.btn.ghost { background: transparent; }
.btn.sm { font-size: 15px; padding: 8px 16px 6px; }
.btn[disabled] { opacity: .38; cursor: not-allowed; }
.chip {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 12px; border: 1px solid var(--line); background: var(--ink-2); color: var(--bone-dim);
  border-radius: 999px; transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--bone-faint); color: var(--bone); }
.chip.on { background: var(--bone); color: var(--ink); border-color: var(--bone); }

/* ================================================================
   AVATAR CREATOR
   ================================================================ */
#creator { flex-direction: row; background: transparent; }
#creator .stage-side { flex: 1 1 auto; position: relative; min-width: 0; }
#creator .stage-hint {
  position: absolute; left: 0; right: 0; bottom: 18px; text-align: center;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; color: var(--bone-faint); pointer-events: none;
  text-shadow: 0 0 12px #05050a, 0 0 26px #05050a;
}
.creator-panel {
  width: min(430px, 40vw); flex: 0 0 auto; border-left: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  display: flex; flex-direction: column; overflow: hidden;
}
.creator-head { padding: 22px var(--pad) 14px; border-bottom: 1px solid var(--line-soft); }
.creator-head h2 { font-size: 40px; }
.creator-head p { color: var(--bone-dim); font-size: 13px; margin-top: 6px; }
.creator-foot { padding: 14px var(--pad) calc(16px + var(--safe-b)); border-top: 1px solid var(--line-soft); display: flex; gap: 10px; align-items: center; }
.creator-foot .btn { flex: 1 1 auto; }

/* rail + pane: one category at a time */
.cr-main { flex: 1 1 auto; display: flex; min-height: 0; }
.cr-rail {
  flex: 0 0 84px; display: flex; flex-direction: column; overflow-y: auto;
  border-right: 1px solid var(--line-soft); background: rgba(0,0,0,.28); scrollbar-width: none;
}
.cr-rail::-webkit-scrollbar { display: none; }
.cr-tab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 4px; color: var(--bone-faint); border-bottom: 1px solid var(--line-soft);
  transition: color .16s, background .16s;
}
.cr-tab svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cr-tab span { font-family: var(--f-mono); font-size: 8px; letter-spacing: .13em; }
.cr-tab i { position: absolute; right: 7px; top: 9px; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.55); }
.cr-tab:hover { color: var(--bone); background: rgba(255,255,255,.035); }
.cr-tab.on { color: var(--ink); background: var(--bone); }
.cr-tab.on::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); }

.cr-pane { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 16px var(--pad) 14px; display: flex; flex-direction: column; gap: 18px; }
.cr-group { display: flex; flex-direction: column; gap: 9px; }
.cr-label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .2em; color: var(--bone-faint); }
.cr-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 7px; }
.cr-sw {
  aspect-ratio: 1; border-radius: var(--r); background: var(--c); position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.45); border: 2px solid transparent; transition: transform .14s, border-color .14s;
}
.cr-sw:hover { transform: translateY(-2px); }
.cr-sw.on { border-color: var(--bone); box-shadow: inset 0 0 0 1px rgba(0,0,0,.45), 0 0 0 1px var(--ink), 0 6px 16px rgba(0,0,0,.6); }
.cr-sw.on::after {
  content: ''; position: absolute; right: 3px; bottom: 3px; width: 9px; height: 5px;
  border-left: 2px solid var(--bone); border-bottom: 2px solid var(--bone); transform: rotate(-45deg);
  filter: drop-shadow(0 0 2px rgba(0,0,0,.9));
}
.cr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.cr-tile {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-3); overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .16s, transform .16s, background .16s;
}
.cr-tile:hover { border-color: var(--bone-faint); transform: translateY(-2px); }
.cr-tile.on { border-color: var(--bone); background: var(--ink-4); }
.cr-vis {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / .82;
  background: radial-gradient(circle at 50% 36%, rgba(255,255,255,.06), transparent 62%);
}
.cr-vis .garment-shape { width: 52%; height: 60%; }
.cr-tile em {
  font-style: normal; font-family: var(--f-mono); font-size: 8px; letter-spacing: .12em;
  color: var(--bone-faint); padding: 6px 4px 7px; text-align: center; border-top: 1px solid var(--line-soft);
}
.cr-tile.on em { color: var(--bone); }

/* hair thumbnails — a head and a shape on top of it */
.mini-head { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--sk); box-shadow: inset -3px -4px 8px rgba(0,0,0,.35); }
.mini-hair { position: absolute; inset: 0; }
.mini-hair::before, .mini-hair::after { content: ''; position: absolute; background: var(--hc); }
.mini-hair.none::before, .mini-hair.none::after { display: none; }
.mini-hair.buzz::before { left: 4%; right: 4%; top: -1%; height: 34%; border-radius: 50% 50% 0 0; opacity: .82; }
.mini-hair.buzz::after { display: none; }
.mini-hair.fade::before { left: 2%; right: 2%; top: -6%; height: 44%; border-radius: 50% 50% 0 0; }
.mini-hair.fade::after { display: none; }
.mini-hair.waves::before { left: 2%; right: 2%; top: -6%; height: 44%; border-radius: 50% 50% 0 0; }
.mini-hair.waves::after { left: 14%; right: 14%; top: 6%; height: 22%; background: none; border-top: 2px solid rgba(255,255,255,.22); border-radius: 50%; }
.mini-hair.afro::before { left: -12%; right: -12%; top: -22%; height: 66%; border-radius: 50%; }
.mini-hair.afro::after { display: none; }
.mini-hair.locs::before { left: 0; right: 0; top: -10%; height: 40%; border-radius: 50% 50% 0 0; }
.mini-hair.locs::after { left: -4%; right: -4%; top: 16%; height: 44%; background: repeating-linear-gradient(90deg, var(--hc) 0 3px, transparent 3px 7px); }
.mini-hair.braids::before { left: 1%; right: 1%; top: -8%; height: 40%; border-radius: 50% 50% 0 0; }
.mini-hair.braids::after { left: 6%; right: 6%; top: 4%; height: 30%; background: repeating-linear-gradient(74deg, rgba(255,255,255,.2) 0 1px, transparent 1px 5px); }
.mini-hair.twists::before { left: -2%; right: -2%; top: -14%; height: 50%; border-radius: 50% 50% 0 0; }
.mini-hair.twists::after { left: 8%; right: 8%; top: -2%; height: 30%; background-image: radial-gradient(rgba(0,0,0,.35) 1.4px, transparent 1.5px); background-size: 6px 6px; }

/* bottoms + the two accessories the shop CSS does not already draw */
.garment-shape.jeans { height: 72%; clip-path: polygon(2% 0, 98% 0, 94% 100%, 58% 100%, 50% 38%, 42% 100%, 6% 100%); }
.garment-shape.joggers { height: 72%; border-radius: 6px 6px 14px 14px; clip-path: polygon(6% 0, 94% 0, 88% 100%, 58% 100%, 50% 40%, 42% 100%, 12% 100%); }
.garment-shape.joggers::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 0; height: 9%; background: rgba(255,255,255,.25); }
.garment-shape.headphones { width: 62%; height: 46%; background: none; border: 6px solid var(--gc); border-radius: 50% 50% 0 0; border-bottom: none; }
.garment-shape.headphones::before, .garment-shape.headphones::after { content: ''; position: absolute; bottom: -14px; width: 13px; height: 20px; border-radius: 4px; background: var(--gc); }
.garment-shape.headphones::before { left: -10px; } .garment-shape.headphones::after { right: -10px; }
.garment-shape.durag { height: 40%; border-radius: 50% 50% 30% 30%; }
.garment-shape.durag::after { content: ''; position: absolute; right: -26%; top: 46%; width: 34%; height: 22%; background: var(--gc); clip-path: polygon(0 0, 100% 34%, 100% 66%, 0 100%); }
.garment-shape.none { width: 34%; height: 34%; background: none; border: 1px dashed var(--line); border-radius: 50%; }

.group { display: flex; flex-direction: column; gap: 9px; }
.group > label, .group-title { font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; color: var(--bone-faint); text-transform: uppercase; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.sw {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); transition: transform .12s, border-color .12s;
}
.sw:hover { transform: scale(1.12); }
.sw.on { border-color: var(--bone); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.name-input {
  width: 100%; background: var(--ink-3); border: 1px solid var(--line); color: var(--bone);
  padding: 11px 13px; border-radius: var(--r); font-family: var(--f-display); font-weight: 700;
  font-size: 24px; letter-spacing: .04em; text-transform: uppercase;
}
.name-input::placeholder { color: var(--bone-faint); font-weight: 400; }

/* ================================================================
   TRAIN
   ================================================================ */
#train { background: transparent; pointer-events: none; z-index: 30; }
.train-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad); }
.train-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.train-dest { font-family: var(--f-mono); font-size: 11px; letter-spacing: .26em; color: var(--gold); }
.train-skip { pointer-events: auto; }
.train-bottom { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.train-title { font-family: var(--f-display); font-weight: 900; font-size: clamp(40px, 9vw, 104px); line-height: .85; color: var(--bone); opacity: 0; transform: translateY(14px); }
.train-title.in { animation: trainIn .55s forwards; }
@keyframes trainIn { to { opacity: 1; transform: none; } }
.train-sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: .24em; color: var(--red); opacity: 0; }
.train-sub.in { animation: trainIn .55s .1s forwards; }
.train-bar { width: 100%; height: 2px; background: var(--line-soft); }
.train-bar i { display: block; height: 100%; background: var(--red); width: 0; }

/* ================================================================
   HUD
   ================================================================ */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud.dim > *:not(.hud-prompt) { opacity: .25; transition: opacity var(--hud-fade); }

.hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px clamp(12px, 2.4vw, 26px);
  background: linear-gradient(180deg, rgba(16,17,20,.8), transparent);
}
.hud-id { display: flex; align-items: center; gap: 11px; }
.hud-avi {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); flex: 0 0 auto;
}
.hud-id-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hud-name { font-family: var(--f-display); font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; }
.hud-meta { display: flex; align-items: center; gap: 8px; }
.hud-lvl { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--gold); }
.xp-bar { width: 74px; height: 3px; background: var(--line); }
.xp-bar i { display: block; height: 100%; background: var(--gold); width: 0%; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.hud-credits { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--bone-dim); }

.hud-district {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); text-align: center;
  pointer-events: none; min-width: 200px;
}
.hud-district b { display: block; font-family: var(--f-display); font-weight: 900; font-size: 19px; letter-spacing: .12em; color: var(--bone); }
.hud-district span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .24em; color: var(--bone-faint); }
.hud-district.flash b { animation: dflash .6s; }
@keyframes dflash { 0% { opacity: 0; transform: translateY(-6px); letter-spacing: .3em; } 100% { opacity: 1; } }

.hud-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(14,14,19,.7); border-radius: var(--r);
  color: var(--bone-dim); transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--bone); border-color: var(--bone-faint); background: var(--ink-3); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.on { color: var(--gold); border-color: var(--gold); }

/* interaction prompt */
.hud-prompt {
  position: absolute; left: 50%; bottom: clamp(96px, 16vh, 150px); transform: translateX(-50%) translateY(10px);
  opacity: 0; transition: opacity .2s, transform .2s; text-align: center; pointer-events: none;
  min-width: 260px;
}
.hud-prompt.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.prompt-card {
  background: rgba(16,17,20,.86); border: 1px solid var(--line); border-top: 2px solid var(--accent);
  padding: 13px 22px 12px; border-radius: var(--r); backdrop-filter: blur(6px);
}
.prompt-card .p-sub { font-family: var(--f-mono); font-size: 9px; letter-spacing: .22em; color: var(--accent); }
.prompt-card .p-name { font-family: var(--f-display); font-weight: 900; font-size: 30px; line-height: 1; margin: 3px 0 7px; }
.prompt-key {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--bone-dim);
}
.prompt-key kbd {
  font-family: var(--f-mono); font-size: 10px; background: var(--ink-4); border: 1px solid var(--line);
  padding: 3px 7px; border-radius: 2px; color: var(--bone);
}
.prompt-card.locked { border-top-color: var(--bloodr); }
.prompt-card.locked .p-sub { color: var(--bloodr); }

/* compass / waypoint */
.hud-compass {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
  display: none; align-items: center; gap: 9px;
  background: rgba(16,17,20,.7); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px;
}
.hud-compass.show { display: flex; }
.hud-compass .arrow { width: 13px; height: 13px; color: var(--gold); }
.hud-compass span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--bone); }
.hud-compass b { font-family: var(--f-mono); font-size: 10px; color: var(--gold); }

/* bottom-left hint + controls */
.hud-hint {
  position: absolute; left: clamp(12px, 2.4vw, 26px); bottom: calc(18px + var(--safe-b));
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--bone-faint); max-width: 42vw;
}
.hud-hint b { color: var(--bone-dim); font-weight: 500; }

/* phone button */
.phone-btn {
  position: absolute; right: clamp(12px, 2.4vw, 26px); bottom: calc(18px + var(--safe-b));
  display: flex; align-items: center; gap: 9px; padding: 10px 16px 9px;
  border: 1px solid var(--line); background: rgba(14,14,19,.8); border-radius: var(--r);
}
.phone-btn:hover { border-color: var(--gold); }
.phone-btn svg { width: 15px; height: 15px; stroke: var(--gold); fill: none; stroke-width: 1.6; }
.phone-btn span { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .08em; }
.phone-btn kbd { font-family: var(--f-mono); font-size: 9px; color: var(--bone-faint); border: 1px solid var(--line); padding: 2px 5px; border-radius: 2px; }

/* joystick (touch) */
.joy { position: absolute; left: 0; bottom: 0; width: 45vw; height: 42vh; display: none; touch-action: none; }
.joy.on { display: block; }
.joy-base {
  position: absolute; width: 112px; height: 112px; border-radius: 50%;
  border: 1px solid rgba(243,239,230,.2); background: rgba(16,17,20,.3); opacity: 0; transition: opacity .15s;
}
.joy-nub {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(243,239,230,.5); border: 1px solid rgba(243,239,230,.6); opacity: 0; transition: opacity .15s;
}
.joy.active .joy-base, .joy.active .joy-nub { opacity: 1; }
.touch-act {
  position: absolute; right: clamp(12px, 2.4vw, 26px); bottom: calc(86px + var(--safe-b));
  width: 74px; height: 74px; border-radius: 50%; display: none; place-items: center;
  border: 2px solid var(--red); background: rgba(240,106,148,.16);
  font-family: var(--f-display); font-weight: 900; font-size: 15px; letter-spacing: .06em; color: var(--bone);
}
.touch-act.on { display: grid; }

/* ================================================================
   PHONE
   ================================================================ */
#phone {
  position: fixed; z-index: 25; right: clamp(12px, 2.4vw, 26px); bottom: calc(74px + var(--safe-b));
  width: min(340px, calc(100vw - 24px)); height: min(620px, calc(100vh - 130px));
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px;
  display: none; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 6px rgba(16,17,20,.6);
}
#phone.open { display: flex; animation: phoneIn .28s cubic-bezier(.2,.9,.3,1); }
@keyframes phoneIn { from { opacity: 0; transform: translateY(22px) scale(.97); } }
.phone-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 15px 9px; border-bottom: 1px solid var(--line-soft);
}
.phone-time { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--bone-dim); }
.phone-brand { font-family: var(--f-display); font-weight: 900; font-size: 15px; letter-spacing: .18em; color: var(--bone); }
.phone-close { color: var(--bone-faint); font-size: 18px; line-height: 1; padding: 2px 6px; }
.phone-close:hover { color: var(--bone); }
.phone-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.phone-nav {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft);
  border-top: 1px solid var(--line-soft);
}
.phone-nav button {
  background: var(--ink-2); padding: 9px 2px calc(9px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--f-mono); font-size: 8px; letter-spacing: .1em; color: var(--bone-faint);
}
.phone-nav button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.phone-nav button.on { color: var(--gold); background: var(--ink-3); }

.pa { padding: 15px; display: flex; flex-direction: column; gap: 13px; }
.pa h3 { font-size: 27px; }
.pa-sub { font-family: var(--f-mono); font-size: 9px; letter-spacing: .2em; color: var(--bone-faint); }

#map-canvas { width: 100%; aspect-ratio: 1 / 1; max-width: 100%; display: block; background: var(--ink); border: 1px solid var(--line-soft); border-radius: var(--r); }
.map-list { display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.map-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--ink-2); width: 100%; text-align: left;
}
.map-row:hover { background: var(--ink-3); }
.map-row .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.map-row .mr-name { flex: 1 1 auto; font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .04em; }
.map-row .mr-d { font-family: var(--f-mono); font-size: 9px; color: var(--bone-faint); }
.map-row .mr-lock { font-family: var(--f-mono); font-size: 9px; color: var(--bloodr); letter-spacing: .1em; }
.map-row.here .mr-name { color: var(--gold); }

.call-log { display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; max-width: 92%; }
.bubble.suli { background: var(--ink-4); border: 1px solid var(--line); border-bottom-left-radius: 3px; align-self: flex-start; }
.bubble.me { background: var(--red); color: #fff; border-bottom-right-radius: 3px; align-self: flex-end; }
.bubble.thinking { color: var(--bone-faint); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; }
.ask-row { display: flex; gap: 7px; }
.ask-row input {
  flex: 1 1 auto; min-width: 0; background: var(--ink-3); border: 1px solid var(--line); color: var(--bone);
  padding: 10px 12px; border-radius: var(--r); font-size: 14px;
}
.ask-row input::placeholder { color: var(--bone-faint); }
.ask-row button { flex: 0 0 auto; }
.ai-note { font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; color: var(--bone-faint); }

.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inv-item {
  border: 1px solid var(--line); background: var(--ink-3); padding: 9px; border-radius: var(--r);
  display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.inv-item.on { border-color: var(--gold); }
.inv-swatch { height: 40px; border-radius: 2px; }
.inv-item b { font-family: var(--f-display); font-weight: 700; font-size: 13px; line-height: 1.05; letter-spacing: .03em; }
.inv-item span { font-family: var(--f-mono); font-size: 8px; color: var(--bone-faint); letter-spacing: .1em; }

.ev { border-left: 2px solid var(--red); padding: 2px 0 2px 12px; display: flex; flex-direction: column; gap: 3px; }
.ev b { font-family: var(--f-display); font-weight: 900; font-size: 21px; line-height: 1; }
.ev .ev-meta { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; color: var(--gold); }
.ev p { font-size: 13px; color: var(--bone-dim); }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.setting span { font-size: 13px; color: var(--bone-dim); }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { padding: 5px 9px; font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; color: var(--bone-faint); background: var(--ink-2); }
.seg button.on { background: var(--bone); color: var(--ink); }

/* ================================================================
   INTERIOR PANEL
   ================================================================ */
#panel {
  position: fixed; inset: 0; z-index: 20; display: none;
  background: rgba(16,17,20,.93); backdrop-filter: blur(10px);
}
#panel.open { display: flex; flex-direction: column; animation: panelIn .3s cubic-bezier(.2,.9,.3,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(22px); } }
.panel-head {
  flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: clamp(16px, 3vw, 30px) var(--pad) 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20,20,27,.9), transparent);
}
.panel-head .ph-left { min-width: 0; }
.panel-head .ph-district { font-family: var(--f-mono); font-size: 10px; letter-spacing: .24em; color: var(--accent); }
.panel-head h2 { font-size: clamp(38px, 7vw, 78px); margin-top: 4px; }
.panel-head .ph-sub { font-family: var(--f-mono); font-size: 10px; letter-spacing: .18em; color: var(--bone-faint); margin-top: 7px; }
.panel-close { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; }
.panel-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: var(--pad) var(--pad) calc(48px + var(--safe-b)); }
.panel-body > .wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(20px, 3vw, 36px); min-width: 0; }
/* flex and grid items default to min-width:auto, so one wide child stretches the whole
   track past the viewport. Let every panel column shrink instead. */
.panel-body > .wrap > *, .split > * { min-width: 0; }
.lede { font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--bone-dim); max-width: 62ch; }
.lede strong { color: var(--bone); font-weight: 600; }

.split { display: grid; grid-template-columns: 1.35fr .85fr; gap: clamp(18px, 3vw, 34px); align-items: start; }
.section-title { font-family: var(--f-mono); font-size: 10px; letter-spacing: .24em; color: var(--bone-faint); padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }

/* ---------- R3AL RECORDS ---------- */
/* the crate divider rail */
.genre-rail { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.genre {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--ink-2); color: var(--bone-faint);
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .15em; transition: color .18s, background .18s, border-color .18s;
}
.genre:hover { color: var(--bone); border-color: var(--bone-faint); }
.genre.on { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.genre i { font-style: normal; font-size: 8px; opacity: .55; }

/* the wall the records are filed in */
.archive {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(28px, 3.4vw, 40px) clamp(13px, 2.2vw, 20px) clamp(15px, 2.2vw, 22px);
  background:
    radial-gradient(120% 58% at 50% -8%, rgba(240,106,148,.15), transparent 62%),
    radial-gradient(90% 50% at 100% 108%, rgba(121,200,200,.08), transparent 60%),
    linear-gradient(#0d0d13, #08080c);
}
.arch-wall {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 10px),
    linear-gradient(rgba(0,0,0,.45), transparent 30%);
}
.arch-sign {
  position: absolute; top: 9px; left: 0; right: 0; text-align: center; pointer-events: none;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(13px, 1.8vw, 18px);
  letter-spacing: .48em; text-indent: .48em; color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 14px var(--red), 0 0 34px rgba(240,106,148,.7);
}
.shelf { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: clamp(11px, 1.6vw, 17px); }
.sleeve {
  perspective: 1100px; background: none; position: relative;
  transition: transform .26s cubic-bezier(.2,.9,.3,1), opacity .26s, filter .26s;
}
.sleeve::before {   /* the record's own light spilling onto the wall */
  content: ''; position: absolute; left: 7%; right: 7%; top: 14%; bottom: 22%; z-index: -1;
  background: var(--rc, var(--red)); filter: blur(17px); opacity: .2; border-radius: 8px; transition: opacity .26s;
}
.sleeve:hover { transform: translateY(-9px); z-index: 2; }
.sleeve:hover::before { opacity: .5; }
.sleeve.off { opacity: .16; filter: grayscale(1); pointer-events: none; transform: none; }
.sleeve.off::before { opacity: 0; }
.sleeve-spine {
  display: block; text-align: left; margin-bottom: 6px;
  font-family: var(--f-mono); font-size: 8px; letter-spacing: .18em; color: var(--rc, var(--bone-faint)); opacity: .9;
}
.sleeve-lip {
  height: 5px; border-radius: 0 0 2px 2px; background: linear-gradient(#20202a, #0a0a10);
  box-shadow: 0 3px 7px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
}
.sleeve-inner {
  position: relative; width: 100%; aspect-ratio: 1; transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.3,.8,.3,1); border: 1px solid var(--line);
  box-shadow: 0 13px 24px rgba(0,0,0,.7), 0 0 22px -9px var(--rc, transparent);
}
.sleeve.flipped .sleeve-inner { transform: rotateY(180deg); }
.sleeve:hover .sleeve-inner { border-color: var(--bone-faint); }
.sleeve-face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; }
.sleeve-back {
  transform: rotateY(180deg); background: var(--ink-3); padding: 11px;
  display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.sleeve-back .sb-t { font-family: var(--f-display); font-weight: 900; font-size: 17px; line-height: .95; }
.sleeve-back ol { margin: 0; padding-left: 14px; font-family: var(--f-mono); font-size: 8.5px; color: var(--bone-dim); line-height: 1.55; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.sleeve-back .sb-c { font-family: var(--f-mono); font-size: 8px; color: var(--bone-faint); letter-spacing: .1em; margin-top: auto; }
.sleeve-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 8px; }
.sleeve-cap b { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .04em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sleeve-cap span { font-family: var(--f-mono); font-size: 8px; color: var(--bone-faint); letter-spacing: .12em; }
.sleeve.played .sleeve-cap b { color: var(--gold); }

/* sleeve artwork */
.art { position: absolute; inset: 0; }
.art-split { background: linear-gradient(115deg, var(--a) 0 50%, var(--b) 50% 100%); }
.art-split::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(0,0,0,.55) 0 24%, transparent 24%); }
.art-slash { background: var(--a); }
.art-slash::before { content: ''; position: absolute; inset: -20%; background: repeating-linear-gradient(58deg, var(--b) 0 9px, transparent 9px 26px); }
.art-crown { background: radial-gradient(circle at 50% 120%, var(--b), var(--a) 65%); }
.art-crown::after { content: ''; position: absolute; left: 26%; right: 26%; top: 34%; height: 26%; background: var(--b); clip-path: polygon(0 100%, 12% 0, 30% 55%, 50% 0, 70% 55%, 88% 0, 100% 100%); }
.art-line { background: var(--a); }
.art-line::after { content: ''; position: absolute; inset: 12%; border: 1px solid var(--b); border-radius: 50%; box-shadow: 0 0 34px var(--b) inset; }
.art-dots { background: var(--a); }
.art-dots::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--b) 1.6px, transparent 1.7px); background-size: 13px 13px; opacity: .85; }
.art-rain { background: linear-gradient(180deg, var(--a), #000); }
.art-rain::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(78deg, var(--b) 0 1px, transparent 1px 12px); opacity: .5; }
.art-zip { background: var(--a); display: grid; place-items: center; }
.art-zip::after { content: '64128'; font-family: var(--f-display); font-weight: 900; font-size: 44px; color: var(--b); letter-spacing: -.02em; }
.art-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 9px;
  background: linear-gradient(0deg, rgba(0,0,0,.85), transparent);
  font-family: var(--f-display); font-weight: 900; font-size: 19px; line-height: .9; color: #fff;
  text-align: left; letter-spacing: .01em;
}

/* listening station — NOW PLAYING */
.station {
  border: 1px solid var(--line); background: var(--ink-2); padding: 18px; border-radius: var(--r);
  display: flex; flex-direction: column; gap: 13px; position: relative; overflow: hidden;
  transition: border-color .5s, box-shadow .5s;
}
.station::before { content: ''; position: absolute; inset: 0; background: var(--tint, transparent); opacity: .1; transition: background .6s; pointer-events: none; }
.station.live { border-color: var(--tint, var(--line)); box-shadow: 0 0 46px -16px var(--tint, transparent); }
.np-head {
  display: flex; align-items: center; gap: 8px; position: relative;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .28em; color: var(--bone-faint);
}
.np-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bone-faint); flex: 0 0 auto; }
.station.live .np-head { color: var(--tint, var(--bone)); }
.station.live .np-dot { background: var(--tint, var(--red)); box-shadow: 0 0 9px var(--tint, var(--red)); animation: npPulse 1.1s ease-in-out infinite; }
@keyframes npPulse { 50% { opacity: .28; } }
.station-now { display: flex; align-items: center; gap: 15px; position: relative; }
.deck-wrap { position: relative; width: 96px; height: 96px; flex: 0 0 auto; }
.deck {
  width: 96px; height: 96px; border-radius: 50%; position: relative; display: grid; place-items: center;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.045) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 38% 30%, #22222c, #08080c 72%);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 24px rgba(0,0,0,.9), 0 0 26px -10px var(--tint, transparent);
}
.deck::after {
  content: ''; width: 32px; height: 32px; border-radius: 50%; background: var(--tint, var(--red));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), 0 0 16px -4px var(--tint, var(--red));
}
.deck::before { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #05050a; z-index: 2; }
.deck.spin { animation: spin 2.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tonearm {
  position: absolute; right: -3px; top: 7px; width: 3px; height: 58px; border-radius: 2px;
  background: linear-gradient(#4a4a57, #2a2a34); transform-origin: 50% 6px; transform: rotate(26deg);
  transition: transform .55s cubic-bezier(.3,.9,.3,1); pointer-events: none;
}
.tonearm::before { content: ''; position: absolute; left: -3px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: #55555f; }
.tonearm::after { content: ''; position: absolute; left: -2px; bottom: -3px; width: 7px; height: 8px; border-radius: 1px; background: #6b6b77; }
.tonearm.on { transform: rotate(-8deg); }

.wave { width: 100%; height: 56px; display: block; position: relative; }
.np-read { display: flex; gap: 20px; position: relative; }
.np-read span { display: flex; flex-direction: column; gap: 2px; font-family: var(--f-mono); font-size: 8px; letter-spacing: .16em; color: var(--bone-faint); }
.np-read b { font-family: var(--f-display); font-weight: 900; font-size: 19px; line-height: 1; letter-spacing: .02em; color: var(--bone); }
.station-meta { min-width: 0; flex: 1 1 auto; }
.station-meta .sm-t { font-family: var(--f-display); font-weight: 900; font-size: clamp(26px, 4vw, 42px); line-height: .9; }
.station-meta .sm-m { font-family: var(--f-mono); font-size: 9px; letter-spacing: .18em; color: var(--bone-faint); margin-top: 6px; }
.station-meta .sm-mood { font-size: 14px; color: var(--bone-dim); margin-top: 8px; }
.station-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.vu { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.vu i { width: 3px; background: var(--tint, var(--red)); height: 3px; transition: height .09s linear; }

/* clerk */
.clerk { border: 1px solid var(--line); background: var(--ink-2); padding: 16px; border-radius: var(--r); display: flex; flex-direction: column; gap: 12px; }
.clerk-head { display: flex; align-items: center; gap: 11px; }
.clerk-ava { width: 42px; height: 42px; border-radius: 50%; background: conic-gradient(from 200deg, #3a2416 0 40%, #8d5a3b 40% 72%, #141010 72% 100%); border: 1px solid var(--line); }
.clerk-head b { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: .04em; display: block; }
.clerk-head span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .16em; color: var(--bone-faint); }

/* ---------- BLVD816 ---------- */
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.garment {
  border: 1px solid var(--line); background: var(--ink-2); overflow: hidden; border-radius: var(--r);
  display: flex; flex-direction: column;
}
.garment.owned { border-color: var(--gold); }
.garment-vis { aspect-ratio: 4 / 3; position: relative; display: grid; place-items: center; background: var(--ink-3); }
.garment-shape { width: 58%; height: 62%; background: var(--gc); position: relative; }
.garment-shape.hoodie { border-radius: 14px 14px 4px 4px; }
.garment-shape.hoodie::before { content: ''; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); width: 48%; height: 20px; border-radius: 50% 50% 0 0; background: var(--gc); }
.garment-shape.tee { clip-path: polygon(18% 12%, 34% 0, 66% 0, 82% 12%, 100% 26%, 88% 40%, 82% 34%, 82% 100%, 18% 100%, 18% 34%, 12% 40%, 0 26%); }
.garment-shape.jacket::before { content: ''; position: absolute; left: 50%; top: 58%; width: 3px; height: 42%; background: var(--ga); transform: translateX(-50%); }
.garment-shape.jacket ~ .garment-mark { top: 34%; }
.garment-shape.jersey { clip-path: polygon(16% 10%, 36% 0, 64% 0, 84% 10%, 84% 100%, 16% 100%); }
.garment-shape.cap { height: 34%; border-radius: 50% 50% 6px 6px; }
.garment-shape.cap::after { content: ''; position: absolute; bottom: -8px; left: 30%; width: 76%; height: 9px; border-radius: 0 0 8px 8px; background: var(--gc); }
.garment-shape.shorts { height: 42%; clip-path: polygon(0 0, 100% 0, 100% 100%, 56% 100%, 50% 44%, 44% 100%, 0 100%); }
.garment-shape.chain { width: 40%; height: 40%; border-radius: 50%; background: none; border: 7px solid var(--gc); }
.garment-shape.glasses { height: 16%; background: none; }
.garment-shape.glasses::before, .garment-shape.glasses::after { content: ''; position: absolute; top: 0; width: 42%; height: 100%; background: var(--gc); border-radius: 4px; }
.garment-shape.glasses::before { left: 0; } .garment-shape.glasses::after { right: 0; }
.garment-shape.visor { height: 14%; background: var(--gc); box-shadow: 0 0 26px var(--gc); }
.garment-mark { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); font-family: var(--f-display); font-weight: 900; font-size: 20px; color: var(--ga); letter-spacing: .04em; }
.garment-info { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; }
.garment-info b { font-family: var(--f-display); font-weight: 900; font-size: 21px; line-height: 1; }
.garment-info p { font-size: 12.5px; color: var(--bone-dim); line-height: 1.45; }
.garment-row { display: flex; align-items: center; gap: 7px; margin-top: auto; flex-wrap: wrap; }
.price { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--gold); }
.owned-tag { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; color: var(--gold); border: 1px solid var(--gold); padding: 3px 7px; border-radius: 999px; }

.code-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.code-box input {
  background: var(--ink-3); border: 1px solid var(--line); color: var(--bone); padding: 10px 13px;
  border-radius: var(--r); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; min-width: 0; flex: 1 1 190px;
}

/* ---------- ARCADE — the hall ---------- */
.hall {
  position: relative; isolation: isolate; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(48px, 8vw, 70px) 0 clamp(52px, 7vw, 84px);
  background:
    radial-gradient(120% 74% at 50% 4%, rgba(255,62,165,.24), transparent 58%),
    radial-gradient(88% 70% at 6% 38%, rgba(121,200,200,.17), transparent 58%),
    radial-gradient(88% 70% at 94% 38%, rgba(143,91,255,.16), transparent 58%),
    radial-gradient(150% 46% at 50% 104%, rgba(121,200,200,.14), transparent 62%),
    linear-gradient(#0b0b12, #050509);
}
/* ceiling light bars */
.hall::before {
  content: ''; position: absolute; left: -10%; right: -10%; top: 0; height: 40px; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,62,165,.62) 34px 92px, transparent 92px 126px);
  filter: blur(7px); opacity: .55;
}
/* the far wall: a second row of cabinets, out of focus */
.hall::after {
  content: ''; position: absolute; left: -6%; right: -6%; top: 42px; height: 168px; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(121,200,200,.42) 12px 60px, transparent 60px 72px) 0 0 / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(17,17,26,.97) 12px 60px, transparent 60px 72px);
  -webkit-mask-image: linear-gradient(#000 30%, rgba(0,0,0,0));
  mask-image: linear-gradient(#000 30%, rgba(0,0,0,0));
  filter: blur(2.6px);
}
/* perspective floor grid */
.hall-floor {
  position: absolute; left: -34%; right: -34%; bottom: -2px; height: 56%; pointer-events: none; opacity: .8; z-index: 0;
  background:
    repeating-linear-gradient(90deg, rgba(121,200,200,.55) 0 1.5px, transparent 1.5px 54px),
    repeating-linear-gradient(0deg, rgba(255,62,165,.5) 0 1.5px, transparent 1.5px 32px);
  transform: perspective(300px) rotateX(74deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(rgba(0,0,0,0), #000 40%, #000);
  mask-image: linear-gradient(rgba(0,0,0,0), #000 40%, #000);
}
.hall-sign {
  position: absolute; top: clamp(12px, 2.4vw, 20px); left: 0; right: 0; z-index: 2; text-align: center; pointer-events: none;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(20px, 3.6vw, 38px);
  letter-spacing: .3em; text-indent: .3em; color: #fff;
  text-shadow: 0 0 5px #fff, 0 0 16px var(--pink), 0 0 40px var(--pink), 0 0 78px rgba(255,62,165,.55);
  animation: neonFlick 7s infinite;
}
@keyframes neonFlick { 0%,95%,100% { opacity: 1 } 96% { opacity: .42 } 97% { opacity: 1 } 98.5% { opacity: .6 } }

.cabs {
  position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(3px, .8vw, 11px); padding: 0 clamp(10px, 3vw, 30px) 4px;
  perspective: 1300px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.cabs::-webkit-scrollbar { display: none; }
.cab {
  flex: 0 0 clamp(146px, 20vw, 208px); position: relative; padding: 0; background: none; text-align: left;
  transition: transform .3s cubic-bezier(.2,.9,.3,1), filter .3s;
}
.cab:nth-child(1) { transform: rotateY(12deg) translateZ(-26px); }
.cab:nth-child(4) { transform: rotateY(-12deg) translateZ(-26px); }
.cab:hover:not([disabled]) { transform: translateY(-9px) rotateY(0deg) translateZ(0); z-index: 3; }
.cab[disabled] { cursor: default; }
.cab[disabled] .cab-body { box-shadow: 0 22px 46px rgba(0,0,0,.8); }
.cab[disabled] .cab-body::before, .cab[disabled] .cab-body::after { opacity: .35; box-shadow: none; }
.cab[disabled] .cab-marquee b { color: var(--bone-faint); text-shadow: none; animation: deadFlick 3.6s infinite; }
.cab[disabled] .cab-spill { opacity: .12; }
@keyframes deadFlick { 0%,86%,100% { opacity: .75 } 88% { opacity: .2 } 91% { opacity: .62 } 94% { opacity: .26 } }

.cab-spill {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  width: 136%; height: 46px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--cc), transparent 68%);
  filter: blur(13px); opacity: .42;
}
.cab:hover:not([disabled]) .cab-spill { opacity: .7; }
.cab-body {
  position: relative; border-radius: 9px 9px 3px 3px; overflow: hidden;
  background: linear-gradient(#1b1b24, #0e0e14 52%, #101017);
  border: 1px solid #30303c;
  box-shadow: 0 22px 46px rgba(0,0,0,.72), 0 0 30px -8px var(--cc);
}
.cab-body::before, .cab-body::after {
  content: ''; position: absolute; top: 7px; bottom: 7px; width: 2px; background: var(--cc);
  box-shadow: 0 0 7px var(--cc), 0 0 17px var(--cc); opacity: .85;
}
.cab-body::before { left: 3px; } .cab-body::after { right: 3px; }

.cab-marquee {
  padding: 8px 14px 7px; text-align: center; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(0,0,0,.45));
  border-bottom: 1px solid rgba(0,0,0,.75);
}
.cab-marquee::before {
  content: ''; position: absolute; inset: 0; background: var(--cc); opacity: .3; mix-blend-mode: screen;
}
.cab-marquee b {
  position: relative; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(14px, 1.9vw, 21px); letter-spacing: .07em;
  color: #fff; text-shadow: 0 0 9px var(--cc), 0 0 22px var(--cc);
}
.cab-screen {
  position: relative; margin: 9px 9px 0; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 7px / 12px; background: #05050a;
  box-shadow: inset 0 0 0 2px #000, inset 0 0 22px rgba(0,0,0,.9);
}
.cab-screen canvas { width: 100%; height: 100%; display: block; }
.cab-glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.32) 0 1px, transparent 1px 3px),
    linear-gradient(128deg, rgba(255,255,255,.11) 0 18%, transparent 40%),
    radial-gradient(102% 100% at 50% 50%, transparent 50%, rgba(0,0,0,.76));
}
.cab-deck {
  position: relative; height: 24px; margin: 8px 7px 0; padding: 0 11px; border-radius: 3px;
  background: linear-gradient(#242430, #13131a);
  border-top: 1px solid #3a3a46; box-shadow: inset 0 6px 11px rgba(0,0,0,.55);
  display: flex; align-items: center; gap: 6px;
}
.cab-deck i { width: 7px; height: 7px; border-radius: 50%; background: #3d3d49; box-shadow: inset 0 -2px 3px rgba(0,0,0,.6); }
.cab-deck i:first-child { width: 11px; height: 11px; margin-right: 5px; background: var(--cc); box-shadow: 0 0 9px var(--cc); }
.cab-deck i:nth-child(2) { background: #f06a94; } .cab-deck i:nth-child(3) { background: #79c8c8; } .cab-deck i:nth-child(4) { background: #d8b77a; }
.cab-front {
  margin-top: 8px; padding: 8px 11px 11px; position: relative;
  border-top: 1px solid rgba(0,0,0,.65); background: linear-gradient(#0c0c12, #07070b);
  display: flex; flex-direction: column; gap: 3px;
}
.cab-front::after {
  content: ''; position: absolute; right: 11px; top: 10px; width: 15px; height: 3px; border-radius: 2px;
  background: #05050a; box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(255,255,255,.07);
}
.cab-tag { font-family: var(--f-mono); font-size: 8px; letter-spacing: .18em; color: var(--cc); }
.cab-best { font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; color: var(--bone-faint); }
.cab-cap { font-size: 11px; line-height: 1.4; color: var(--bone-dim); min-height: 3.1em; padding-right: 18px; }
.hall-note {
  position: absolute; left: 0; right: 0; bottom: clamp(14px, 2.4vw, 24px); z-index: 2; text-align: center; pointer-events: none;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .18em; color: rgba(243,239,230,.5);
  text-shadow: 0 0 14px #05050a, 0 0 30px #05050a;
}

.game-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #05050a; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.game-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.game-over {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(16,17,20,.9); text-align: center; padding: 20px;
}
.game-over.show { display: flex; }
.game-over h3 { font-size: clamp(32px, 6vw, 60px); }
.game-over .go-stats { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.go-stat b { display: block; font-family: var(--f-display); font-weight: 900; font-size: 32px; color: var(--gold); line-height: 1; }
.go-stat span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .16em; color: var(--bone-faint); }

/* ---------- LAB ---------- */
.exhibits { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.exhibit {
  border: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  padding: 18px; border-radius: var(--r); display: flex; flex-direction: column; gap: 11px;
  position: relative; overflow: hidden;
}
.exhibit::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--violet); }
.exhibit .ex-tag { font-family: var(--f-mono); font-size: 9px; letter-spacing: .2em; color: var(--violet); }
.exhibit h3 { font-size: 30px; }
.exhibit .ex-line { font-size: 15px; color: var(--bone); font-style: italic; }
.exhibit p { font-size: 13.5px; color: var(--bone-dim); line-height: 1.55; }
.exhibit .ex-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

.demo-ob { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0; }
.ob-btn {
  width: 128px; height: 128px; border-radius: 50%; border: 1px solid var(--line);
  background: radial-gradient(circle at 38% 32%, #2a2a36, #0b0b0e 72%);
  font-family: var(--f-display); font-weight: 900; font-size: 19px; letter-spacing: .1em; color: var(--bone);
  display: grid; place-items: center; position: relative; transition: transform .16s;
}
.ob-btn:hover { transform: scale(1.04); }
.ob-btn.busy { animation: obspin 1.1s linear infinite; }
@keyframes obspin { to { transform: rotate(360deg); } }
.ob-ring { position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--violet); opacity: .4; }
.ob-status { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .18em; color: var(--bone-faint); min-height: 14px; }
.plat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 7px; }
.plat { border: 1px solid var(--line); padding: 9px 7px; text-align: center; border-radius: var(--r); background: var(--ink); }
.plat b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.plat span { font-family: var(--f-mono); font-size: 8px; color: var(--bone-faint); letter-spacing: .1em; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; }
.stat { border-left: 2px solid var(--violet); padding-left: 10px; }
.stat b { display: block; font-family: var(--f-display); font-weight: 900; font-size: 30px; line-height: 1; }
.stat span { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .14em; color: var(--bone-faint); }

/* ---------- STUDIO ---------- */
.studio { display: flex; flex-direction: column; gap: 16px; }
.studio-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.field { display: flex; align-items: center; gap: 8px; }
.field > span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .16em; color: var(--bone-faint); }
.field > b { font-family: var(--f-mono); font-size: 10px; color: var(--gold); min-width: 34px; }
.field input[type=range] { width: 100px; accent-color: var(--red); }
.field select { background: var(--ink-3); border: 1px solid var(--line); padding: 6px 9px; border-radius: var(--r); font-family: var(--f-mono); font-size: 11px; }
.studio-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.seq { display: flex; flex-direction: column; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.seq-row { display: flex; gap: 4px; align-items: center; min-width: max-content; }
.seq-name { width: 74px; flex: 0 0 74px; font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; color: var(--bone-faint); }
.seq-cell {
  width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--line); background: var(--ink-3); border-radius: 2px;
  transition: background .1s, border-color .1s;
}
.seq-cell.bar { border-color: #35354a; }
.seq-cell.on { background: var(--red); border-color: var(--red); }
.seq-cell.now { box-shadow: inset 0 0 0 2px var(--gold); }
.seq-cell.on.now { background: var(--gold); border-color: var(--gold); }
.keys-wrap { display: flex; flex-direction: column; gap: 8px; }
.keys-label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .16em; color: var(--bone-faint); }
.keys-label span { color: #4f4b45; margin-left: 8px; }
.keys { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.key {
  height: 74px; background: linear-gradient(180deg, #f4efe5, #cdc8bd); border-radius: 0 0 3px 3px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font-family: var(--f-mono); font-size: 10px; color: #4a463f; transition: background .1s, transform .05s;
}
.key:hover { background: linear-gradient(180deg, #fff, #ded9ce); }
.key.hit { background: var(--gold); transform: translateY(2px); }
.studio-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-made { font-family: var(--f-mono); font-size: 9px; letter-spacing: .18em; color: var(--bone-faint); }

/* ---------- THEATER / VAULT / ARENA ---------- */
.bill { display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.bill-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--ink-2); width: 100%; text-align: left;
}
.bill-row:hover { background: var(--ink-3); }
.bill-art { width: 54px; height: 54px; flex: 0 0 auto; position: relative; overflow: hidden; border: 1px solid var(--line); }
.bill-txt { flex: 1 1 auto; min-width: 0; }
.bill-txt b { display: block; font-family: var(--f-display); font-weight: 900; font-size: 24px; line-height: 1; }
.bill-txt span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .16em; color: var(--bone-faint); }
.bill-when { font-family: var(--f-mono); font-size: 10px; color: var(--gold); letter-spacing: .1em; flex: 0 0 auto; }
.screen-box {
  aspect-ratio: 16/9; border: 1px solid var(--line); background: #05050a; position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.screen-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; background: linear-gradient(0deg, rgba(0,0,0,.9), transparent); text-align: left; }
.screen-cap b { font-family: var(--f-display); font-weight: 900; font-size: clamp(24px, 4vw, 40px); display: block; line-height: 1; }
.screen-cap span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .18em; color: var(--gold); }

.locked-note {
  border: 1px solid var(--bloodr); background: rgba(179,0,27,.08); padding: 18px; border-radius: var(--r);
  display: flex; flex-direction: column; gap: 8px;
}
.locked-note b { font-family: var(--f-display); font-weight: 900; font-size: 26px; color: var(--bloodr); }
.locked-note p { font-size: 13.5px; color: var(--bone-dim); }

/* ---------- HISTORY ---------- */
.timeline { display: flex; flex-direction: column; }
.tl {
  display: grid; grid-template-columns: 148px 1fr; gap: 22px; padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}
.tl:first-child { border-top: none; }
.tl-era { font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; color: var(--gold); padding-top: 7px; }
.tl-body h3 { font-size: clamp(26px, 3.4vw, 40px); }
.tl-body p { color: var(--bone-dim); margin-top: 7px; font-size: 14.5px; max-width: 58ch; }

/* ---------- SULI ID ---------- */
.idcard {
  border: 1px solid var(--line); background: linear-gradient(145deg, var(--ink-3), var(--ink));
  border-radius: var(--r); padding: 20px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.idcard::after { content: 'Q'; position: absolute; right: -14px; bottom: -44px; font-family: var(--f-display); font-weight: 900; font-size: 168px; color: rgba(243,239,230,.035); line-height: 1; }
.id-ava { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--gold); flex: 0 0 auto; }
.id-main { flex: 1 1 210px; min-width: 0; }
.id-main .id-n { font-family: var(--f-display); font-weight: 900; font-size: clamp(30px, 4.6vw, 46px); line-height: 1; }
.id-main .id-l { font-family: var(--f-mono); font-size: 10px; letter-spacing: .18em; color: var(--gold); margin-top: 6px; }
.id-xp { margin-top: 11px; }
.id-xp .bar { height: 4px; background: var(--line); }
.id-xp .bar i { display: block; height: 100%; background: var(--gold); }
.id-xp .lbl { font-family: var(--f-mono); font-size: 9px; color: var(--bone-faint); margin-top: 5px; letter-spacing: .1em; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
.badge {
  border: 1px solid var(--line); padding: 11px; border-radius: var(--r); background: var(--ink-2);
  display: flex; flex-direction: column; gap: 4px; opacity: .4;
}
.badge.got { opacity: 1; border-color: var(--gold); }
.badge b { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.badge span { font-family: var(--f-mono); font-size: 8.5px; color: var(--bone-faint); line-height: 1.45; }

.ledger { display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.ledger-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; background: var(--ink-2); }
.ledger-row span { font-size: 13px; color: var(--bone-dim); }
.ledger-row b { font-family: var(--f-mono); font-size: 11px; color: var(--gold); flex: 0 0 auto; }

/* ---------- GARAGE ---------- */
.cars { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 13px; }
.car-card { border: 1px solid var(--line); background: var(--ink-2); border-radius: var(--r); overflow: hidden; }
.car-vis { aspect-ratio: 16/9; position: relative; background: linear-gradient(180deg, #16161e, #0a0a0e); display: grid; place-items: center; }
.car-body { width: 74%; height: 30%; background: var(--cc); border-radius: 14px 20px 6px 6px; position: relative; }
.car-body::before { content: ''; position: absolute; left: 22%; top: -46%; width: 46%; height: 52%; background: #0d0d14; border-radius: 10px 14px 0 0; }
.car-body::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: -13%; height: 26%; background: none; border-bottom: 9px solid #111; border-radius: 0 0 8px 8px; }
.car-info { padding: 11px 13px 13px; }
.car-info b { font-family: var(--f-display); font-weight: 900; font-size: 19px; }
.car-info span { display: block; font-family: var(--f-mono); font-size: 9px; color: var(--bone-faint); letter-spacing: .12em; margin-top: 3px; }

/* ---------- SHARED SMALL BITS ---------- */
.note { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--bone-faint); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); background: var(--ink-2); padding: 13px; border-radius: var(--r); }
.tile b { font-family: var(--f-display); font-weight: 900; font-size: 19px; display: block; }
.tile p { font-size: 12.5px; color: var(--bone-dim); margin-top: 5px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* ================================================================
   TOASTS / LEVEL UP / PHOTO
   ================================================================ */
#toasts {
  position: fixed; top: 76px; right: clamp(12px, 2.4vw, 26px); z-index: 30;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none;
}
.toast {
  background: rgba(16,17,20,.92); border: 1px solid var(--line); border-left: 2px solid var(--gold);
  padding: 9px 14px; border-radius: var(--r); animation: toastIn .3s cubic-bezier(.2,.9,.3,1);
  display: flex; align-items: baseline; gap: 9px; max-width: 76vw;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(22px); } }
.toast.out { animation: toastOut .4s forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(22px); } }
.toast b { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .04em; white-space: nowrap; }
.toast span { font-family: var(--f-mono); font-size: 10px; color: var(--gold); letter-spacing: .1em; white-space: nowrap; }
.toast.secret { border-left-color: var(--red); }
.toast.secret span { color: var(--red); }

#levelup {
  position: fixed; inset: 0; z-index: 32; display: none; place-items: center; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(216,183,122,.14), transparent 62%);
}
#levelup.show { display: grid; animation: luFade 2.6s forwards; }
@keyframes luFade { 0% { opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
#levelup .lu {
  text-align: center;
}
#levelup .lu span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .4em; color: var(--gold); }
#levelup .lu b { display: block; font-family: var(--f-display); font-weight: 900; font-size: clamp(70px, 16vw, 190px); line-height: .85; color: var(--bone); text-shadow: 0 0 60px rgba(216,183,122,.5); }
#levelup .lu em { font-style: normal; font-family: var(--f-mono); font-size: 11px; letter-spacing: .24em; color: var(--bone-dim); }

#photo { position: fixed; inset: 0; z-index: 26; display: none; pointer-events: none; }
#photo.on { display: block; }
#photo .ph-frame { position: absolute; inset: clamp(16px, 5vh, 64px) clamp(16px, 6vw, 90px); border: 1px solid rgba(243,239,230,.35); }
#photo .ph-frame::before, #photo .ph-frame::after { content: ''; position: absolute; background: var(--red); }
#photo .ph-frame::before { left: -1px; top: -1px; width: 26px; height: 2px; box-shadow: 0 0 0 0 var(--red); }
#photo .ph-frame::after { left: -1px; top: -1px; width: 2px; height: 26px; }
#photo .ph-bar {
  position: absolute; left: 0; right: 0; bottom: calc(24px + var(--safe-b)); display: flex; justify-content: center; gap: 12px; pointer-events: auto;
}
#photo .ph-hint { position: absolute; left: 0; right: 0; top: clamp(16px, 5vh, 64px); text-align: center; font-family: var(--f-mono); font-size: 10px; letter-spacing: .22em; color: var(--bone-dim); transform: translateY(-24px); }
.shutter-flash { position: fixed; inset: 0; background: #fff; z-index: 33; pointer-events: none; animation: flash .4s forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }

/* ================================================================
   QUICK MODE (the fast 2D site)
   ================================================================ */
#quick { position: fixed; inset: 0; z-index: 35; background: var(--ink); overflow-y: auto; display: none; }
#quick.open { display: block; }
.q-wrap { max-width: 1060px; margin: 0 auto; padding: 0 var(--pad) calc(70px + var(--safe-b)); }
.q-top {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px var(--pad); background: rgba(16,17,20,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
.q-top b { font-family: var(--f-display); font-weight: 900; font-size: 22px; letter-spacing: .14em; }
.q-hero { padding: clamp(34px, 7vw, 76px) 0 clamp(24px, 4vw, 44px); }
.q-hero h1 { font-size: clamp(56px, 14vw, 150px); line-height: .82; }
.q-hero h1 em { font-style: normal; color: var(--red); }
.q-hero p { color: var(--bone-dim); max-width: 56ch; margin-top: 16px; font-size: clamp(15px, 2vw, 18px); }
.q-sec { padding: clamp(24px, 4vw, 44px) 0; border-top: 1px solid var(--line-soft); }
.q-sec > h2 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 6px; }
.q-sec > .q-lede { color: var(--bone-dim); max-width: 60ch; margin-bottom: 20px; }
.q-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.q-item { border: 1px solid var(--line); background: var(--ink-2); padding: 15px; border-radius: var(--r); }
.q-item b { font-family: var(--f-display); font-weight: 900; font-size: 22px; display: block; }
.q-item .q-d { font-family: var(--f-mono); font-size: 9px; letter-spacing: .16em; margin-top: 3px; }
.q-item p { font-size: 13px; color: var(--bone-dim); margin-top: 7px; }
.q-foot { padding: 34px 0 0; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; }
.q-foot a { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; }

/* ================================================================
   LOADING
   ================================================================ */
#loading { position: fixed; inset: 0; z-index: 45; background: var(--ink); display: none; place-items: center; }
#loading.on { display: grid; }
.load-in { text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.load-in b { font-family: var(--f-display); font-weight: 900; font-size: clamp(40px, 9vw, 80px); line-height: .9; }
.load-bar { width: min(280px, 64vw); height: 2px; background: var(--line); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 40%; background: var(--red); animation: slide 1.1s infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.load-in span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .22em; color: var(--bone-faint); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 1fr; gap: 6px; }
  .tl-era { padding-top: 0; }
}
@media (max-width: 760px) {
  #creator { flex-direction: column; }
  #creator .stage-side { flex: 1 1 38vh; min-height: 30vh; }
  .creator-panel { width: 100%; border-left: none; border-top: 1px solid var(--line); max-height: 62vh; }
  .creator-head { padding-top: 14px; }
  .creator-head h2 { font-size: 30px; }
  /* on a phone the rail runs across the top instead of down the side */
  .cr-main { flex-direction: column; }
  .cr-rail {
    flex: 0 0 auto; flex-direction: row; overflow-x: auto; overflow-y: hidden;
    border-right: none; border-bottom: 1px solid var(--line-soft);
  }
  .cr-tab { flex: 0 0 auto; min-width: 70px; border-bottom: none; border-right: 1px solid var(--line-soft); padding: 10px 10px; }
  .cr-tab i { right: 6px; top: 6px; width: 6px; height: 6px; }
  .cr-tab.on::after { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 3px; }
  .cr-pane { padding-top: 14px; }
  .hud-district { display: none; }
  .hud-name { max-width: 38vw; }
  .hud-hint { display: none; }
  .phone-btn kbd { display: none; }
  #phone { right: 8px; left: 8px; width: auto; bottom: calc(70px + var(--safe-b)); height: min(560px, calc(100vh - 120px)); }
  .keys { grid-template-columns: repeat(4, 1fr); }
  .key { height: 56px; }
  .seq-name { width: 56px; flex-basis: 56px; }
  .seq-cell { width: 28px; flex-basis: 28px; height: 28px; }
  .game-stage { aspect-ratio: 4 / 3; }
  #toasts { top: auto; bottom: calc(78px + var(--safe-b)); left: 12px; right: 12px; align-items: stretch; }
  .toast { animation: none; max-width: none; }
  .panel-head { padding-bottom: 11px; }
}
@media (max-width: 760px) {
  /* the hall becomes a row you swipe through, cabinets square-on */
  .cabs { justify-content: flex-start; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .cab { flex-basis: 168px; scroll-snap-align: center; }
  .cab:nth-child(1), .cab:nth-child(4) { transform: none; }
  .cab:hover:not([disabled]) { transform: none; }
  .hall { padding-top: 44px; }
}
@media (max-width: 420px) {
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rack { grid-template-columns: 1fr; }
  .inv-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .deck.spin { animation: none; }
}


/* ================================================================
   THE Q LINE — departures, scopes, passport stamps
   ================================================================ */
.scope { display: flex; gap: 6px; }
.scope .chip { flex: 1 1 auto; text-align: center; }
.map-row .mr-code { font-family: var(--f-mono); font-size: 10px; color: var(--gold); letter-spacing: .1em; flex: 0 0 30px; }
.map-row[data-soon] { opacity: .5; }

.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 7px; }
.stamps.big { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.stamp {
  border: 1px dashed var(--line); border-radius: var(--r); padding: 9px 8px; text-align: center;
  display: flex; flex-direction: column; gap: 2px; opacity: .45;
}
.stamp.got { opacity: 1; border-style: solid; border-color: var(--sc); transform: rotate(-1.2deg); }
.stamp.got b { color: var(--sc); }
.stamp b { font-family: var(--f-display); font-weight: 900; font-size: 22px; line-height: 1; }
.stamp span { font-family: var(--f-mono); font-size: 8px; letter-spacing: .12em; color: var(--bone-dim); }
.stamp em { font-style: normal; font-family: var(--f-mono); font-size: 8px; letter-spacing: .1em; color: var(--bone-faint); margin-top: 3px; }
.stamp.got em { color: var(--sc); }
.stamp.soon { border-style: dotted; }

.depboard { border: 1px solid var(--line); background: #06070a; border-radius: var(--r); overflow: hidden; }
.dep-head, .dep-row {
  display: grid; grid-template-columns: 68px minmax(120px, 1.1fr) minmax(0, 2fr) 132px;
  gap: 14px; align-items: center; padding: 13px 16px;
}
.dep-head {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .2em; color: var(--bone-faint);
  border-bottom: 1px solid var(--line); background: var(--ink-2);
}
.dep-head span:last-child { text-align: right; }
.dep-row { border-bottom: 1px solid var(--line-soft); position: relative; }
.dep-row:last-child { border-bottom: none; }
.dep-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--dc); opacity: 0; }
.dep-row.open::before { opacity: 1; }
.dep-row.soon { opacity: .55; }
.dep-row.here { background: rgba(216,183,122,.06); }
.dep-row.here::before { opacity: 1; background: var(--gold); }
.dep-code { font-family: var(--f-mono); font-size: 15px; color: var(--dc); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.dep-name b { display: block; font-family: var(--f-display); font-weight: 900; font-size: 26px; line-height: 1; }
.dep-name em { font-style: normal; font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .14em; color: var(--bone-faint); }
.dep-note { font-size: 13px; color: var(--bone-dim); line-height: 1.45; }
.dep-act { text-align: right; }
.dep-here { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--gold); }
.dep-soon { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--bone-faint); }
.dep-locked { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--bloodr); }

@media (max-width: 760px) {
  .dep-head { display: none; }
  .dep-row { grid-template-columns: 54px 1fr auto; grid-template-areas: 'code name act' 'code note note'; row-gap: 5px; }
  .dep-code { grid-area: code; align-self: start; padding-top: 4px; }
  .dep-name { grid-area: name; }
  .dep-note { grid-area: note; font-size: 12px; }
  .dep-act { grid-area: act; }
}

/* ================================================================
   FRONT PAGE — header, hero over the globe, scrolling sections
   ================================================================ */
#front {
  position: fixed; inset: 0; z-index: 40;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scroll-behavior: smooth; background: transparent;
}
#front.fade-out { animation: fadeOut .7s forwards; }

#front-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 40px);
  padding: 14px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s, backdrop-filter .25s;
}
#front-header.stuck {
  background: rgba(16,17,20,.88); border-bottom-color: var(--line); backdrop-filter: blur(10px);
}
.fh-mark {
  display: flex; align-items: baseline; gap: 7px; text-decoration: none; flex: 0 0 auto;
  font-family: var(--f-display); font-weight: 900; font-size: 22px; letter-spacing: .1em; color: var(--bone);
}
.fh-mark:hover { text-decoration: none; }
.fh-mark em { font-style: normal; color: var(--red); }
.fh-nav { display: flex; gap: clamp(12px, 1.8vw, 26px); margin-left: auto; }
.fh-nav a {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .18em; color: var(--bone-dim);
  text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap;
}
.fh-nav a:hover, .fh-nav a.on { color: var(--bone); border-bottom-color: var(--red); text-decoration: none; }
.fh-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: clamp(10px, 2vw, 26px); }
.fh-burger {
  display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--r);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: rgba(14,14,19,.6);
}
.fh-burger i { display: block; width: 16px; height: 1.5px; background: var(--bone); transition: transform .2s, opacity .2s; }
.fh-burger.on i:first-child { transform: translateY(3.2px) rotate(45deg); }
.fh-burger.on i:last-child { transform: translateY(-3.2px) rotate(-45deg); }

/* overlay menu */
#front-menu {
  position: fixed; inset: 0; z-index: 44; background: rgba(16,17,20,.97);
  display: none; align-items: center; justify-content: center; padding: var(--pad);
}
#front-menu .fh-mark { font-size: 18px; }
#front-menu.open { display: flex; animation: panelIn .25s cubic-bezier(.2,.9,.3,1); }
.fm-inner { width: min(560px, 100%); display: flex; flex-direction: column; gap: 22px; }
.fm-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 4px; }
.fm-nav { display: flex; flex-direction: column; }
.fm-nav a {
  font-family: var(--f-display); font-weight: 900; font-size: clamp(34px, 9vw, 58px); line-height: 1.06;
  color: var(--bone); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.fm-nav a:hover { color: var(--red); text-decoration: none; }
.fm-foot { display: flex; flex-wrap: wrap; gap: 10px; }

/* hero */
.front-hero {
  position: relative; min-height: min(82vh, 720px);
  display: flex; align-items: center;
  padding: clamp(28px, 6vh, 72px) clamp(16px, 3vw, 40px) clamp(56px, 8vh, 96px);
  margin-top: -66px; padding-top: calc(66px + clamp(28px, 6vh, 72px));
  touch-action: pan-y;
}
.fh-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, var(--ink) 4%, rgba(16,17,20,.93) 34%, rgba(16,17,20,.42) 60%, rgba(16,17,20,0) 84%);
}
.hero-inner { position: relative; max-width: 640px; display: flex; flex-direction: column; gap: 20px; }
.hero-title {
  font-family: var(--f-display); font-weight: 900; line-height: .85; letter-spacing: -.01em;
  font-size: clamp(42px, 7.2vw, 92px);
}
.hero-title span { display: block; color: var(--bone); }
.hero-title em { display: block; font-style: normal; color: var(--red); }
.hero-sub { color: var(--bone-dim); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.6; max-width: 48ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-cta .btn { text-decoration: none; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; padding-top: 6px; }
.hero-meta span { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .18em; color: var(--bone-faint); }
.hero-meta b { font-family: var(--f-display); font-weight: 900; font-size: 19px; color: var(--gold); letter-spacing: 0; margin-right: 6px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none;
}
.scroll-cue span { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .3em; color: var(--bone-faint); }
.scroll-cue i { width: 1px; height: 26px; background: linear-gradient(var(--bone-faint), transparent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: .3; transform: scaleY(.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* sections */
.front-body { position: relative; background: var(--ink); border-top: 1px solid var(--line-soft); }
.fs { padding: clamp(40px, 7vw, 84px) clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line-soft); scroll-margin-top: 70px; }
.fs > .fs-in { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(18px, 3vw, 30px); }
.fs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.fs-head .fs-h { max-width: 62ch; }
.fs-head h2 { font-size: clamp(34px, 5.6vw, 68px); margin-top: 8px; }
.fs-head p { color: var(--bone-dim); margin-top: 12px; font-size: clamp(14px, 1.6vw, 17px); line-height: 1.6; max-width: 56ch; }
.fs-head .fs-act { flex: 0 0 auto; }
.fs-alt { background: linear-gradient(180deg, var(--ink-2), var(--ink)); }

.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fcard {
  border: 1px solid var(--line); background: var(--ink-2); border-radius: var(--r);
  padding: 16px; display: flex; flex-direction: column; gap: 8px; text-align: left; position: relative; overflow: hidden;
}
.fcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--fc, var(--red)); }
.fcard b { font-family: var(--f-display); font-weight: 900; font-size: 24px; line-height: 1; }
.fcard .fc-tag { font-family: var(--f-mono); font-size: 9px; letter-spacing: .18em; color: var(--fc, var(--red)); }
.fcard p { font-size: 13px; color: var(--bone-dim); line-height: 1.5; }
button.fcard { cursor: pointer; transition: border-color .15s, transform .1s; }
button.fcard:hover { border-color: var(--fc, var(--red)); }
button.fcard:active { transform: translateY(1px); }

.mini-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.mini-sleeve { position: relative; aspect-ratio: 1; border: 1px solid var(--line); overflow: hidden; }
.mini-cap { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .04em; margin-top: 6px; display: block; }

.front-foot {
  padding: clamp(30px, 5vw, 56px) clamp(16px, 3vw, 40px) calc(40px + var(--safe-b));
  display: flex; flex-direction: column; gap: 20px;
}
.ff-in { max-width: 1180px; margin: 0 auto; width: 100%; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.ff-mark { font-family: var(--f-display); font-weight: 900; font-size: clamp(40px, 8vw, 84px); line-height: .85; }
.ff-mark em { font-style: normal; color: var(--red); }
.ff-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.ff-links a, .ff-links span, .ff-links button { font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; color: var(--bone-dim); text-decoration: none; }
.ff-links a:hover { color: var(--gold); }
.ff-legal { max-width: 1180px; margin: 0 auto; width: 100%; font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em; color: #4f4b45; }

@media (max-width: 900px) {
  .fh-nav { display: none; }
  .fh-burger { display: flex; }
  .fh-scrim { background: linear-gradient(180deg, rgba(16,17,20,.72) 0%, rgba(16,17,20,.5) 32%, rgba(16,17,20,.9) 72%, var(--ink) 100%); }
  .front-hero { min-height: min(88vh, 700px); align-items: flex-end; }
  .hero-inner { max-width: none; }
}
@media (max-width: 520px) {
  .fh-mark { font-size: 17px; }
  .hero-meta { gap: 8px 16px; }
}

/* Global identity: quiet surfaces, warm spaces, one signature Q. */
:root { --brand-q: #f06a94; --brand-brass: #d8b77a; --brand-teal: #79c8c8; --r: 6px; }
[hidden] { display: none !important; }
.btn { min-height: 44px; }
.btn.primary, .btn.primary:hover { background: var(--brand-q); border-color: var(--brand-q); color: var(--ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { color: var(--bone); }
.chip { min-height: 44px; }
.eyebrow, .presenter { color: var(--bone-dim); }
#grain { opacity: .35; }
.fh-mark em, .ff-mark em { color: var(--brand-q); }
.fh-scrim { background: linear-gradient(90deg,var(--ink) 0%,rgba(16,17,20,.88) 32%,rgba(16,17,20,.18) 75%),linear-gradient(0deg,var(--ink),transparent 40%); }
.front-hero { min-height: max(780px,95svh); padding-bottom: 235px; }
.hero-inner { max-width: 780px; gap: 24px; }
.hero-title { font-size: clamp(58px,7.6vw,116px); line-height: .91; letter-spacing: -.025em; text-transform: uppercase; }
.hero-title em { color: var(--bone); }
.hero-sub { max-width: 40ch; }
.hero-cta .btn { font-size: 18px; padding: 14px 22px; }
.hero-doors { position: absolute; left: clamp(16px,3vw,40px); right: clamp(16px,3vw,40px); bottom: 62px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.core-card { min-width: 0; display: flex; flex-direction: column; text-align: left; position: relative; padding: 23px 26px; background: var(--ink-2); border-top: 2px solid var(--core); transition: background .2s; }
.core-card:hover { background: var(--ink-4); }
.core-card span { font: 10px var(--f-mono); letter-spacing: .12em; color: var(--core); }
.core-card b { font: 900 clamp(24px,2.5vw,35px)/1.1 var(--f-display); margin: 14px 0 7px; text-transform: uppercase; }
.core-card small { font-size: 12px; color: var(--bone-dim); }
.core-card i { position: absolute; top: 20px; right: 18px; font-style: normal; color: var(--core); }
#start-here { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 22px; background: rgba(16,17,20,.76); backdrop-filter: blur(12px); overflow: auto; }
.start-inner { width: min(960px,100%); background: var(--ink-2); border: 1px solid var(--line); padding: clamp(22px,4vw,44px); }
.start-inner h2 { font-size: clamp(36px,5vw,64px); margin: 13px 0; }
.start-inner > p { color: var(--bone-dim); }
.start-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 25px 0; }
.start-cards .core-card { padding: 18px 14px; }
.start-cards .core-card b { font-size: 28px; }
.arrival-note { margin: 20px 0; border-left: 2px solid var(--brand-brass); padding: 0 0 0 16px; }
.arrival-note b { font: 11px var(--f-mono); color: var(--brand-brass); }
.arrival-note p { font-size: 13px; color: var(--bone-dim); margin: 7px 0; }
.arrival-note small { color: var(--bone-faint); }
#world-tools { position: fixed; z-index: 20; bottom: calc(24px + var(--safe-b)); left: 50%; transform: translateX(-50%); display: flex; max-width: 95%; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px; box-shadow: 0 12px 50px rgba(0,0,0,.3); }
#world-tools button { min-height: 44px; padding: 7px 16px; font: 10px var(--f-mono); white-space: nowrap; }
#world-tools button:hover, #world-tools button[aria-pressed=true] { color: var(--brand-q); background: var(--ink-3); }
#music-player { position: fixed; left: 18px; right: 18px; bottom: 18px; z-index: 85; display: flex; align-items: center; gap: 18px; padding: 12px 18px; border: 1px solid var(--brand-brass); background: var(--ink-2); border-radius: 8px; box-shadow: 0 14px 60px rgba(0,0,0,.5); }
.player-copy { flex: 1; min-width: 0; }
.player-copy b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.player-copy span { display: block; font: 9px var(--f-mono); color: var(--brand-brass); margin-bottom: 4px; }
#music-player audio { width: 280px; height: 40px; max-width: 100%; }
#player-release { font: 10px var(--f-mono); }
#player-stop { width: 44px; height: 44px; }
body:has(#music-player:not([hidden])) #world-tools { bottom: 108px; }
body:has(#music-player:not([hidden])) .panel-body { padding-bottom: 120px; }
body:has(#music-player:not([hidden])) #phone { bottom: 108px; }
.track-list { position: relative; max-height: 285px; overflow: auto; margin: 12px -4px; }
.track-row { display: flex; gap: 12px; width: 100%; align-items: center; text-align: left; padding: 10px 8px; border-top: 1px solid var(--line-soft); min-height: 44px; }
.track-row span, .track-row small { color: var(--bone-faint); font: 10px var(--f-mono); }
.track-row b { flex: 1; font-size: 12px; font-weight: 500; }
.track-row i { font-size: 10px; font-style: normal; color: var(--brand-brass); }
.track-row:hover, .track-row.on { background: var(--ink-4); color: var(--brand-brass); }
.release-link { position: relative; display: block; padding: 12px 0; font: 10px var(--f-mono); color: var(--brand-brass); }
.station .vu, .np-read { display: none; }
.archive { background: linear-gradient(145deg,var(--ink-2),var(--ink)); }
.arch-sign { color: var(--brand-brass); text-shadow: 0 0 25px rgba(216,183,122,.24); }
.physical-products { display: grid; grid-template-columns: 1.3fr repeat(3,minmax(0,1fr)); gap: 16px; margin: 12px 0 32px; }
.physical-products h3 { font-size: 37px; margin: 9px 0; }
.physical-products p { color: var(--bone-dim); font-size: 12px; max-width: 35ch; }
.physical-product { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 22px; border: 1px solid var(--line); background: var(--ink-2); color: var(--bone); }
.physical-product:hover { border-color: var(--brand-brass); text-decoration: none; }
.physical-product span, .physical-product small { font: 10px var(--f-mono); color: var(--brand-brass); }
.physical-product b { font: 900 27px/1.1 var(--f-display); }
.quick-core { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.q-item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.q-item a { font: 11px var(--f-mono); }
.phone-core { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.phone-core .core-card { padding: 12px; }
.phone-core .core-card b { font-size: 21px; }
.phone-core .core-card small, .phone-core .core-card i { display: none; }
.mr-name small { display: block; font: 8px var(--f-mono); color: var(--bone-faint); margin-top: 3px; }
.stage-controls { position: absolute; bottom: 44px; left: 16px; right: 16px; display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; pointer-events: auto; }
.stage-controls .chip { background: var(--ink-2); font-size: 10px; }
#creator .stage-side { pointer-events: none; }
.creator-foot { flex-wrap: wrap; }
.creator-foot .btn { padding: 10px 12px; font-size: 17px; flex: 1; }
.mix-demo { padding: 20px; background: var(--ink-3); }
.mix-demo > p { margin-bottom: 18px; }
.mix-bars { display: flex; gap: 7px; align-items: end; height: 60px; margin-top: 12px; }
.mix-bars i { display:block; background: var(--brand-teal); width: 28px; height: 10px; }
.mixing .mix-bars i { animation: demoLevels .6s ease-in-out infinite alternate; }
.mixing .mix-bars i:nth-child(2) { animation-delay: -.2s; }.mixing .mix-bars i:nth-child(3) { animation-delay: -.4s; }
@keyframes demoLevels { to { height: 56px; } }
@media (max-width: 900px) {
  .front-hero { min-height: 950px; padding-bottom: 340px; }
  .hero-title { font-size: clamp(56px,10vw,90px); }
  .hero-doors { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .start-cards, .quick-core { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .physical-products { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #world-tools button { padding: 6px 10px; }
}
@media (max-width: 600px) {
  .front-hero { min-height: 890px; padding-top: 130px; padding-bottom: 326px; align-items: flex-start; }
  .hero-title { font-size: clamp(52px,13.5vw,76px); }
  .hero-inner { gap: 20px; }.hero-sub { font-size: 14px; }.hero-cta { gap: 8px; }
  .hero-cta .btn { padding: 11px 14px; font-size: 17px; }
  .hero-doors { bottom: 60px; }.core-card { padding: 18px; }.core-card b { font-size: 27px; }
  #start-here { padding: 12px; place-items: start center; }.start-inner { padding: 20px; margin: auto; }.start-inner h2 { font-size: 38px; }
  .start-cards { margin: 18px 0; }.start-cards .core-card small { font-size: 11px; }
  #world-tools { bottom: 12px; max-width: calc(100% - 18px); width: max-content; flex-wrap: wrap; justify-content: center; }
  #world-tools button { font-size: 9px; padding: 7px 10px; }
  #music-player { display: grid; grid-template-columns: 1fr 44px; gap: 4px 12px; left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; }
  #music-player audio { width: 100%; grid-column: 1 / -1; grid-row: 2; }
  #player-stop { grid-column: 2; grid-row: 1; }#player-release { grid-column: 1/-1; padding: 8px 0 2px; }
  body:has(#music-player:not([hidden])) #world-tools { bottom: 153px; }
  body:has(#music-player:not([hidden])) #phone { bottom: 158px; max-height: calc(100svh - 175px); }
  body:has(#music-player:not([hidden])) .panel-body { padding-bottom: 170px; }
  .physical-products { grid-template-columns: 1fr; }.physical-product { padding: 18px; }
  .stage-controls { bottom: 8px; left: 4px; right: 4px; }.stage-controls .chip { min-height: 36px; font-size: 9px; padding: 6px 9px; }
  #creator .stage-hint { top: 14px; bottom: auto; }
  .creator-head { padding: 15px 18px 10px; }.creator-head h2 { font-size: 31px; }.creator-head p { font-size: 12px; }
  .creator-foot { padding: 9px 12px; gap: 5px; }.creator-foot .btn { font-size: 14px; padding: 8px; }
  .hud-hint { bottom: 74px; }.phone-btn { bottom: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body:has(#music-player:not([hidden])) #creator { bottom: 95px; }
@media (max-width:600px) { body:has(#music-player:not([hidden])) #creator { bottom: 155px; } }
