/* ================================================================
   Q WORLD — design system
   V2 — a living album. Ink, limestone, copper and blue belong to the
   same printed world. Authentic product and character images keep their color.
   ================================================================ */

:root {
  --ink:        #111925;
  --ink-2:      #182638;
  --ink-3:      #223349;
  --ink-4:      #304257;
  --line:       #647078;
  --line-soft:  #354557;
  --bone:       #f5eddc;
  --bone-dim:   #d9cdb5;
  --bone-faint: #afbaaf;

  /* district accents */
  --red:    #c77950;
  --gold:   #d9b67b;
  --violet: #b5a5c9;
  --pink:   #d08c84;
  --cyan:   #9ec8d7;
  --bloodr: #e4a194;
  --paper:  #f5eddc;
  --paper-ink: #182638;
  --paper-muted: #53616b;
  --brass: #d9b67b;
  --surface: var(--ink-2);
  --muted: var(--bone-faint);
  --brand-q: var(--gold);
  --brand-brass: var(--gold);
  --brand-teal: var(--cyan);
  --panel-wash: linear-gradient(145deg,var(--ink-2),var(--ink));
  --panel-shadow: 0 18px 64px color-mix(in srgb,var(--ink) 46%,transparent);
  --panel-edge: inset 0 1px color-mix(in srgb,var(--bone) 9%,transparent);

  --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: 8px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --hud-fade: 240ms cubic-bezier(.2,.7,.3,1);
}

/* Reference-led interiors: real scene above the playable catalog. */
.room-view { height: min(62vh, 570px); min-height: 330px; position: relative; overflow: hidden; margin: 0 0 26px; border: 1px solid var(--line); background: var(--ink); box-shadow: var(--panel-shadow); border-radius:var(--r); }
.room-view canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.room-view canvas:active { cursor: grabbing; }
.room-caption { position: absolute; z-index: 1; inset: auto 0 0; padding: 34px 20px 15px; background: linear-gradient(transparent,color-mix(in srgb,var(--ink) 90%,transparent)); display: flex; justify-content: space-between; align-items: center; gap: 16px; pointer-events: none; font: 10px var(--f-mono); letter-spacing: .13em; }
.room-caption button { pointer-events: auto; color: var(--cyan); font: inherit; padding: 10px; border: 1px solid var(--line); background:var(--ink-2); border-radius:var(--r); min-height:44px; }
.room-fallback { min-height: 100px; height: 100px; }
.cabinet-picker.hall { min-height: 0; padding: 18px 12px 28px; background:var(--ink-2); perspective:none; }
.cabinet-picker .hall-floor, .cabinet-picker .hall-sign, .cabinet-picker .cab-spill { display:none; }
.cabinet-picker .cabs { padding-top:0; align-items:stretch; }
.cabinet-picker .cab { transform:none !important; width:auto; flex:1; min-width:0; }
.cabinet-picker .cab-body { transform:none; }
.cabinet-picker .cab-screen { height:100px; }
.cabinet-picker .cab-front { min-height:130px; }
.cabinet-picker .hall-note { position:static; margin-top:20px; text-align:center; }
#character-status { position:absolute; left:24px; bottom:78px; max-width:80%; padding:10px 14px; color:var(--cyan); background:var(--ink-2); font:11px var(--f-mono); z-index:4; }
#character-status:empty { display:none; }
#character-status button { border:1px solid var(--cyan); padding:8px 14px; margin-left:10px; }
@media(max-width:760px) {
  .room-view { height:48vh; min-height:300px; margin-bottom:18px; }
  .room-caption { padding:25px 12px 10px; font-size:9px; letter-spacing:.04em; }
  .cabinet-picker .cabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; overflow:visible; }
  .cabinet-picker .cab { min-width:0; width:100%; }
  .cabinet-picker .cab-screen { height:90px; }
}

* { 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; }

/* A quiet edge vignette keeps face and merchandise detail unobscured. */
#grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(120% 90% at 50% 45%, transparent 58%, color-mix(in srgb,var(--ink) 32%,transparent) 100%);
  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 2px 0 var(--ink),0 -1px 0 var(--line);
}
.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: 700; font-size: 20px; letter-spacing: .045em;
  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(--gold); border-color: var(--gold); color: var(--ink); box-shadow:var(--panel-edge); }
.btn.primary:hover { background: var(--bone); border-color: var(--bone); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: var(--bone); border-color: var(--bone); }
.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(44px, 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: 44px; height: 44px; 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,color-mix(in srgb,var(--ink) 74%,transparent),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: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); background: color-mix(in srgb,var(--ink) 92%,transparent); 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: var(--panel-wash); border: 1px solid var(--line); border-top: 2px solid var(--gold); box-shadow:var(--panel-edge),var(--panel-shadow);
  padding: 11px 20px 10px; border-radius: 16px 16px 4px 4px; 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: 25px; 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: var(--ink-2); border-radius:12px; box-shadow:var(--panel-edge),0 4px 12px color-mix(in srgb,var(--ink) 24%,transparent);
}
.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; }
/* A nearby door is an action; the phone remains an independent tool. */
.touch-act {
  position:absolute; left:50%; bottom:calc(84px + var(--safe-b)); transform:translateX(-50%);
  min-width:88px; max-width:calc(100% - 144px); min-height:44px; border-radius:8px; display:none; place-items:center;
  padding:10px 18px; border:1px solid var(--line); background:var(--ink-2);
  font:700 18px var(--f-display); color:var(--bone);
}
.touch-act.on:not([hidden]) { display:grid; }
.touch-act[hidden] { display:none; }

/* ================================================================
   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: var(--panel-shadow),0 0 0 4px color-mix(in srgb,var(--ink) 60%,transparent),var(--panel-edge);
}
#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: 6px 12px; min-height:56px; border-bottom: 1px solid var(--line-soft); background:var(--ink);
}
.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: 22px; line-height: 1; padding: 2px 6px; width:44px; height:44px; flex:none; border-radius:var(--r); }
.phone-close:hover { color: var(--bone); }
.phone-body { min-height:0; min-width:0; 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: 7px 9px; min-height:44px; min-width:44px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .04em; 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: color-mix(in srgb,var(--ink) 97%,transparent); 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: var(--panel-wash);
}
.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(32px, 4.5vw, 58px); margin-top: 4px; letter-spacing:.035em; }
.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 { min-height:0; min-width:0; 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: 10px; letter-spacing: .08em; min-height:44px; 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%, color-mix(in srgb,var(--red) 15%,transparent), transparent 62%),
    radial-gradient(90% 50% at 100% 108%, color-mix(in srgb,var(--cyan) 8%,transparent), transparent 60%),
    linear-gradient(var(--ink-2), var(--ink));
}
.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 2px 0 var(--ink);
}
.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%, color-mix(in srgb,var(--red) 24%,transparent), transparent 58%),
    radial-gradient(88% 70% at 6% 38%, color-mix(in srgb,var(--cyan) 17%,transparent), transparent 58%),
    radial-gradient(88% 70% at 94% 38%, color-mix(in srgb,var(--violet) 16%,transparent), transparent 58%),
    radial-gradient(150% 46% at 50% 104%, color-mix(in srgb,var(--cyan) 14%,transparent), transparent 62%),
    linear-gradient(var(--ink-2),var(--ink));
}
/* 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, color-mix(in srgb,var(--gold) 62%,transparent) 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, color-mix(in srgb,var(--cyan) 42%,transparent) 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, color-mix(in srgb,var(--cyan) 22%,transparent) 0 1.5px, transparent 1.5px 54px),
    repeating-linear-gradient(0deg, color-mix(in srgb,var(--gold) 22%,transparent) 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 2px 0 var(--ink),0 -1px 0 color-mix(in srgb,var(--bone) 35%,transparent);
}
@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: var(--red); } .cab-deck i:nth-child(3) { background: var(--cyan); } .cab-deck i:nth-child(4) { background: var(--gold); }
.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(min(270px,100%), 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: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); background: var(--ink-3); border-radius: 4px;
  transition: background .1s, border-color .1s;
}
.seq-cell.bar { border-color: var(--line); }
.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: var(--ink-2); border: 1px solid var(--line); border-left: 2px solid var(--gold); box-shadow:var(--panel-shadow);
  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(--panel-wash); overflow-y: auto; overflow-x:hidden; 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: 12px var(--pad); background: var(--paper); color:var(--paper-ink); border-bottom: 1px solid var(--line);
}
.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: radial-gradient(ellipse at 50% 80%,var(--ink-3),var(--ink) 75%); display: none; place-items: center; }
#loading.on { display: grid; }
.load-in { max-width:min(380px,calc(100vw - 40px)); text-align:center; display:flex; flex-direction:column; gap:14px; align-items:center; }
.load-in::before { content:''; width:80px; height:80px; border-radius:50%; border:1px solid var(--line); background:radial-gradient(circle, var(--ink) 0 3px, var(--gold) 4px 12px, transparent 13px),repeating-radial-gradient(circle,transparent 0 3px,var(--line-soft) 4px 5px); box-shadow:5px 7px 0 color-mix(in srgb,var(--ink) 50%,transparent); }
.load-in b { font:700 23px var(--f-display); letter-spacing:.04em; line-height:1.1; }
.load-bar { width: min(180px, 54vw); 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:11px/1.6 var(--f-mono); letter-spacing:.08em; color:var(--bone-dim); }
.load-in span .btn { margin:12px 4px 0; }
#loading.load-error .load-bar { display:none; }
@media(prefers-reduced-motion:reduce){.load-bar i{animation:none;transform:none;width:100%;}}

/* ================================================================
   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: 44px; flex-basis: 44px; height: 44px; }
  .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: var(--ink); 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[hidden] { display:none!important; }
#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. */
/* The edition uses the shared tokens above; source art never receives a global filter. */
[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; flex-wrap:nowrap; }.stage-controls .chip { min-width:0; flex:1; min-height:44px; font-size:8px; letter-spacing:.7px; padding:6px 4px; }
  #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; } }

.panel-body { overflow-anchor: none; }
body:has(#creator:not(.hidden)) #grain { opacity:.25; }

/* Touch feedback appears only while a thumb moves, leaving the scene unobstructed. */
.native-stick{position:absolute;width:104px;height:104px;margin:-52px 0 0 -52px;border:1px solid var(--bone-dim);border-radius:50%;background:var(--ink);opacity:.6;pointer-events:none;z-index:2}
.native-stick[hidden]{display:none}
.native-stick span{position:absolute;width:36px;height:36px;left:33px;top:33px;border-radius:50%;background:var(--bone);will-change:transform}
.native-help-touch{display:none}
@media(any-pointer:coarse){.native-help-keyboard{display:none}.native-help-touch{display:inline}}

img.art.official-cover{display:block;width:100%;height:100%;object-fit:contain;background:var(--ink)}

/* Bound every shell menu to the usable viewport, including Safari's browser bars. */
#panel,#quick { height:var(--app-height,100dvh); bottom:auto; }
#phone { max-height:calc(var(--app-height,100dvh) - 98px - var(--safe-b)); }
.phone-head,.phone-nav { flex:none; }
.phone-close { min-width:44px; min-height:44px; }
.phone-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
.phone-nav button { min-width:0; min-height:44px; overflow-wrap:anywhere; }
@media(max-width:600px) {
  #phone { bottom:calc(72px + var(--safe-b)); height:calc(var(--app-height,100dvh) - 88px - var(--safe-b)); max-height:calc(var(--app-height,100dvh) - 88px - var(--safe-b)); }
  .phone-btn { bottom:calc(84px + var(--safe-b)); width:44px; height:44px; padding:0; justify-content:center; }
  .phone-btn svg { width:19px; height:23px; }
  .phone-btn span,.phone-btn kbd { display:none; }
  #world-tools { bottom:calc(12px + var(--safe-b)); flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; max-width:calc(100% - 24px); overscroll-behavior-x:contain; }
  #world-tools button { flex:none; min-width:44px; padding:7px 9px; }
  .panel-body input,.panel-body select,#phone input,#phone select { font-size:16px; }
  body:has(#music-player:not([hidden])) .phone-btn,body:has(#music-player:not([hidden])) .touch-act { bottom:calc(214px + var(--safe-b)); }
}

@media(any-pointer:coarse) {
  .hud-prompt { display:none; }
  .phone-nav button { font-size:10px; letter-spacing:0; }
}

/* V2's printed interface: bounded shelves and subtle inlays, never a filter on source art. */
.panel-body :is(.tile,.exhibit,.idcard,.station,.clerk-box,.car-card,.garment,.q-item) { box-shadow:var(--panel-edge); }
.panel-body :is(.tile,.exhibit) { border-top-color:var(--gold); }
.archive { border-top:3px double var(--gold); border-radius:12px; }
.arch-sign { letter-spacing:.18em; text-indent:.18em; text-shadow:none; }
.sleeve::before { display:none; }
.sleeve-inner { box-shadow:3px 5px 0 var(--ink),0 8px 18px color-mix(in srgb,var(--ink) 50%,transparent); }
.sleeve:hover { transform:translateY(-4px); }
.station { background:var(--panel-wash); border-top:3px double var(--gold); }
.station.live { box-shadow:var(--panel-edge); }
.cab-body { border-color:var(--line); box-shadow:3px 6px 0 var(--ink); }
.cab-body::before,.cab-body::after { box-shadow:none; opacity:.65; }
.cab-marquee b { text-shadow:0 1px 0 var(--ink); }
.cab[disabled] .cab-marquee b { animation:none; }
#world-tools { border-color:var(--line); border-top-color:var(--gold); background:color-mix(in srgb,var(--ink) 94%,transparent); box-shadow:var(--panel-shadow),var(--panel-edge); border-radius:12px; }
#world-tools button { border-radius:7px; }
#world-tools button:hover,#world-tools button[aria-pressed=true] { color:var(--ink); background:var(--paper); }
.phone-nav button { position:relative; }
.phone-nav button.on { color:var(--bone); background:var(--ink-3); box-shadow:inset 0 2px var(--gold); }
.phone-nav button svg { width:18px; height:18px; }
.phone-head .phone-brand { letter-spacing:.1em; }
.setting { min-width:0; flex-wrap:wrap; row-gap:8px; }
.setting>.seg { flex:none; max-width:100%; }
.q-top .btn.ghost { color:var(--paper-ink); border-color:var(--paper-muted); }
.q-top .btn.ghost:hover { background:var(--bone-dim); }
:where(.panel-body,.phone-body,.creator-panel,.as-panel) :is(button,input,select,textarea) { max-width:100%; }
:where(.panel-body,.phone-body) :is(h2,h3,h4,p) { overflow-wrap:anywhere; }
:where(.panel-body,.phone-body,.cr-pane) { scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
@media(max-width:400px) {
  .hud-top { gap:8px; padding:10px 10px 16px; }
  .hud-id { gap:7px; min-width:0; }
  .hud-avi { width:30px; height:30px; }
  .hud-name { max-width:calc(100vw - 224px); font-size:16px; }
  .hud-top:has(.movement-pace) .hud-meta { gap:4px; }
  .hud-top:has(.movement-pace) .hud-meta .xp-bar { display:none; }
  .hud-meta { font-size:9px; }
  .hud-right { gap:5px; }
  .icon-btn { width:44px; height:44px; }
  .hud-top .movement-pace select { width:80px; max-width:80px; }
  .toast { flex-wrap:wrap; }
  .toast b,.toast span { white-space:normal; overflow-wrap:anywhere; }
  .panel-head { align-items:center; gap:10px; }
  .panel-head h2 { font-size:32px; }
  .panel-close .btn { padding:9px; font-size:14px; }
  .station-now { gap:12px; }
  .deck-wrap,.deck { width:78px; height:78px; }
  .q-top { gap:8px; }
  .q-top b { font-size:18px; letter-spacing:.04em; }
}
@media(max-height:460px) and (orientation:landscape) {
  .hud-top { padding-top:8px; }
  .hud-district { display:none; }
  .hud-prompt { bottom:76px; }
  .prompt-card { padding:8px 14px; }
  .prompt-card .p-name { font-size:20px; }
  .prompt-card .p-sub { display:none; }
  #world-tools { bottom:calc(8px + var(--safe-b)); }
  .phone-btn { bottom:calc(8px + var(--safe-b)); }
  .hud-hint { display:none; }
  #phone { top:8px; bottom:8px; height:calc(var(--app-height,100dvh) - 16px); max-height:calc(var(--app-height,100dvh) - 16px); }
  .phone-head { min-height:48px; padding:2px 10px; }
  .panel-head { padding:10px 16px; }
  .panel-head h2 { font-size:28px; }
}
