/* ============================================================
   THE METRO — room ui
   ============================================================ */
:root {
  --ink: #e8e4da;
  --dim: #8a877e;
  --amber: #ffb347;
  --neon: #ff4d2e;
  --bg: #07090b;
  --panel: #101418;
  --line: #232a30;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); }
/* a 3D room is not a document: nothing should highlight on a stray swipe */
body {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
body {
  font-family: "Archivo", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* touch-action doesn't inherit, so every full-screen play surface must say it
   itself: no pinch- or double-tap-zoom anywhere in the world or the arcade.
   only a portrait/landscape flip is allowed to change the dimensions. */
#arcade, #dosbox, #dosbox .emulator-canvas, #dosbox .emulator-mouse-overlay { touch-action: none; }

/* ---------- overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  background: rgba(4, 6, 8, 0.78);
  backdrop-filter: blur(6px);
}
.overlay.show { display: flex; }

.intro-card {
  text-align: center; max-width: 560px; padding: 48px 32px;
}
.metro-title {
  font-family: "Six Caps", sans-serif;
  font-size: clamp(72px, 16vw, 160px);
  letter-spacing: 0.08em;
  line-height: 0.9;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(255, 77, 46, 0.55), 0 0 60px rgba(255, 77, 46, 0.25);
  animation: neon-breathe 4s ease-in-out infinite;
}
@keyframes neon-breathe {
  0%, 100% { text-shadow: 0 0 18px rgba(255,77,46,.55), 0 0 60px rgba(255,77,46,.25); }
  50%      { text-shadow: 0 0 26px rgba(255,77,46,.8),  0 0 90px rgba(255,77,46,.4); }
  92%      { text-shadow: 0 0 8px  rgba(255,77,46,.3); }
}
.metro-sub { font-family: "Six Caps", sans-serif; font-size: 56px; letter-spacing: .1em; }
.tagline { color: var(--amber); letter-spacing: 0.22em; text-transform: uppercase; font-size: 12px; margin: 10px 0 26px; }
.intro-body { color: var(--dim); line-height: 1.7; font-size: 15px; max-width: 420px; margin: 0 auto 30px; }

#enter-btn, #resume-btn, #post-btn {
  font-family: "Archivo", sans-serif; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px;
  background: var(--neon); color: #14060a; border: none;
  padding: 16px 42px; cursor: pointer; border-radius: 2px;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 0 24px rgba(255, 77, 46, 0.35);
}
#enter-btn:hover, #resume-btn:hover, #post-btn:hover {
  transform: translateY(-1px); box-shadow: 0 0 40px rgba(255, 77, 46, 0.55);
}
/* the door asks your name before it lets you in */
#visitor-name {
  display: block; margin: 0 auto 22px; width: min(300px, 82%);
  background: rgba(10, 14, 17, 0.62); border: 1px solid var(--line);
  border-radius: 2px; color: var(--ink); text-align: center;
  font-family: "Archivo", sans-serif; font-size: 15px; letter-spacing: 0.04em;
  padding: 13px 16px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#visitor-name::placeholder { color: var(--dim); letter-spacing: 0.02em; }
#visitor-name:focus { border-color: var(--neon); box-shadow: 0 0 16px rgba(255, 77, 46, 0.25); }
#visitor-name.nudge { border-color: var(--amber); animation: name-nudge 0.32s ease; }
@keyframes name-nudge {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  60% { transform: translateX(7px); }
}
.controls-hint { margin-top: 26px; font-size: 11px; color: var(--dim); letter-spacing: 0.06em; }
.mode-badge { margin-top: 14px; font-size: 11px; color: #5d8aa8; letter-spacing: 0.08em; min-height: 14px; }
.mode-badge.warn { color: var(--amber); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; display: none; }
#hud.show { display: block; }
#crosshair {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: rgba(232, 228, 218, 0.55); font-size: 18px; font-weight: 300;
}
#aim-tip {
  position: absolute; top: calc(50% + 22px); left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber); opacity: 0; transition: opacity .15s;
}
#aim-tip.show { opacity: 1; }
#online-pill {
  position: absolute; right: 16px; bottom: 16px;
  background: rgba(10, 14, 17, 0.7); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
#online-pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #54e08a;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- joystick (mobile) ---------- */
#joystick {
  position: fixed; left: 26px; bottom: 26px; z-index: 20;
  width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(232,228,218,0.5);
  background: rgba(10,14,17,0.5); display: none;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
}
#joystick.show { display: block; }
#joystick-nub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(232,228,218,0.7);
}
/* right look-stick — mirror of the move stick, gym only (cyan-tinted) */
#joystick-r {
  position: fixed; right: 26px; bottom: 26px; z-index: 20;
  width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(120,200,255,0.65);
  background: rgba(10,14,17,0.5); display: none;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
}
#joystick-r.show { display: block; }
#joystick-r-nub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(120,200,255,0.7);
}

/* ---------- panels ---------- */
.panel {
  width: min(92vw, 440px); background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 20px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; }
.tab {
  background: none; border: 1px solid var(--line); color: var(--dim);
  font-family: "Archivo"; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 16px; cursor: pointer; border-radius: 3px;
}
.tab.active { color: var(--ink); border-color: var(--amber); background: rgba(255,179,71,0.08); }
.x {
  background: none; border: none; color: var(--dim); font-size: 26px;
  cursor: pointer; line-height: 1; padding: 2px 8px;
}
.x:hover { color: var(--ink); }

.kind-pane { display: flex; flex-direction: column; gap: 10px; }
.kind-pane.hidden { display: none; }

textarea, input[type="text"], input[type="url"] {
  width: 100%; background: #0a0e11; border: 1px solid var(--line);
  color: var(--ink); border-radius: 4px; padding: 12px 14px;
  font-family: "Archivo"; font-size: 14px; resize: none; outline: none;
}
#note-text { font-family: "Caveat", cursive; font-size: 22px; line-height: 1.4; }
textarea:focus, input:focus { border-color: var(--amber); }
.char-count { text-align: right; font-size: 11px; color: var(--dim); margin-top: -4px; }

.swatches { display: flex; gap: 8px; }
.swatch {
  width: 26px; height: 26px; border-radius: 4px; cursor: pointer;
  border: 2px solid transparent; transform: rotate(-2deg);
}
.swatch.active { border-color: var(--ink); }

.file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 120px; border: 1px dashed var(--line); border-radius: 4px;
  color: var(--dim); font-size: 13px; cursor: pointer; overflow: hidden;
}
.file-drop input { display: none; }
#photo-preview { max-width: 100%; max-height: 220px; }
#photo-preview.hidden, .hidden { display: none; }

#author-name { margin-top: 12px; }
#post-btn { width: 100%; margin-top: 12px; }
#post-btn:disabled { opacity: 0.5; cursor: wait; transform: none; }
.fine-print { text-align: center; font-size: 10px; color: var(--dim); margin-top: 10px; letter-spacing: 0.06em; }

/* ---------- reader ---------- */
.reader-panel { padding: 28px 24px 22px; }
#reader-content { margin-bottom: 14px; }
#reader-content .note-body {
  font-family: "Caveat", cursive; font-size: 28px; line-height: 1.35;
  word-wrap: break-word; white-space: pre-wrap;
}
#reader-content img { max-width: 100%; border-radius: 3px; border: 6px solid #f4f0e6; }
#reader-content .link-title { font-size: 18px; font-weight: 600; word-break: break-all; }
.reader-meta { font-size: 12px; color: var(--dim); letter-spacing: 0.04em; }
#reader-visit {
  display: inline-block; margin-top: 14px; color: var(--amber);
  font-size: 13px; letter-spacing: 0.08em; text-decoration: none;
  border-bottom: 1px solid rgba(255,179,71,0.4); padding-bottom: 2px;
}
#reader-visit.hidden { display: none; }
.danger {
  display: block; margin-top: 16px; background: none; border: 1px solid #7e2b2b;
  color: #e07054; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 3px; cursor: pointer; width: 100%;
}
.danger:hover { background: rgba(126,43,43,0.18); }
.danger.hidden { display: none; }
#reader-move {
  display: block; margin-top: 16px; background: none; border: 1px solid rgba(255,179,71,0.5);
  color: var(--amber); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 3px; cursor: pointer; width: 100%;
}
#reader-move:hover { background: rgba(255,179,71,0.12); }
#reader-move.hidden { display: none; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 80px);
  z-index: 90; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); padding: 12px 22px; border-radius: 4px; font-size: 13px;
  transition: transform 0.25s ease; pointer-events: none; max-width: 90vw;
}
#toast.show { transform: translate(-50%, 0); }

/* ---------- venue: stream-trouble nudge (centred, always in front) ---------- */
#venue-help {
  position: fixed; inset: 0; z-index: 95; display: none;
  align-items: center; justify-content: center; pointer-events: none;
}
#venue-help.show { display: flex; }
#venue-help .vh-card {
  pointer-events: auto; max-width: min(420px, 86vw);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px 24px; text-align: center; color: var(--ink);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}
#venue-help .vh-title { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
#venue-help .vh-msg { font-size: 13px; line-height: 1.5; color: #9b9890; margin-bottom: 18px; }
#venue-help .vh-actions { display: flex; gap: 12px; justify-content: center; align-items: center; }
#venue-help .vh-btn {
  border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700;
  padding: 11px 26px; color: #1a1206; background: var(--amber);
}
#venue-help .vh-x {
  background: none; border: 0; color: #8a877f; cursor: pointer;
  font: inherit; font-size: 12px; text-decoration: underline;
}

/* ---------- cat status ---------- */
#cat-pill {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(10, 14, 17, 0.7); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; color: var(--ink);
}
#cat-pill .low { color: var(--amber); }
#cat-pill .crit { color: #e07054; }

/* ---------- light dimmer ---------- */
.dim-panel { width: min(92vw, 360px); }
.dim-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.dim-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); width: 46px; }
#dim-level, #dim-hue {
  flex: 1; height: 14px; border-radius: 7px; appearance: none; -webkit-appearance: none;
  outline: none; cursor: pointer;
}
#dim-hue {
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
#dim-level { background: linear-gradient(90deg, #15181d, #f5f0e0); }
#dim-level::-webkit-slider-thumb, #dim-hue::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 3px solid #0a0e11; cursor: pointer;
}
.dim-preview {
  height: 18px; border-radius: 4px; margin-top: 4px;
  border: 1px solid var(--line); background: #222;
}

/* ---------- channel mixer ---------- */
.mix-fader {
  flex: 1; height: 14px; border-radius: 7px; appearance: none; -webkit-appearance: none;
  outline: none; cursor: pointer;
  background: linear-gradient(90deg, #15181d, #5a6470 67%, #f5f0e0);   /* 100% sits at the bright knee */
}
.mix-fader::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 3px solid #0a0e11; cursor: pointer;
}
.mix-fader::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 3px solid #0a0e11; cursor: pointer;
}
.mix-val {
  width: 40px; text-align: right; font-size: 11px; letter-spacing: 0.06em;
  color: var(--dim); font-variant-numeric: tabular-nums;
}

/* ---------- radio tuner ---------- */
.radio-panel { width: min(92vw, 360px); }
.radio-readout {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 18px;
  padding: 12px 14px; border-radius: 8px;
  background: linear-gradient(160deg, #1a1407, #0b0905);
  border: 1px solid #6b5a32;
  box-shadow: inset 0 0 22px rgba(255,170,60,0.10);
}
.radio-hz {
  font-family: monospace; font-size: 26px; font-weight: bold; color: #ffb347;
  text-shadow: 0 0 10px rgba(255,150,40,0.5); font-variant-numeric: tabular-nums;
}
.radio-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.radio-name { font-size: 14px; color: #f3e4c2; letter-spacing: 0.04em; }
.radio-tag { font-size: 10px; color: #9c8550; letter-spacing: 0.08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-state {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #6b5a32; white-space: nowrap;
}
.radio-state.live { color: #57e389; text-shadow: 0 0 8px rgba(87,227,137,0.5); }
.radio-state.tuning { color: #ffce54; }
.radio-state.error { color: #e8705a; }
/* the dial: low → high across the band */
.radio-dial {
  width: 100%; height: 16px; border-radius: 8px; appearance: none; -webkit-appearance: none;
  outline: none; cursor: pointer; margin: 4px 0 16px;
  background: repeating-linear-gradient(90deg, #2a2010, #2a2010 2px, #1a1407 2px, #1a1407 9px);
  border: 1px solid #4a3d20;
}
.radio-dial::-webkit-slider-thumb {
  -webkit-appearance: none; width: 8px; height: 26px; border-radius: 3px;
  background: #ff4030; border: 1px solid #2a0a06; cursor: pointer;
  box-shadow: 0 0 8px rgba(255,64,48,0.7);
}
.radio-dial::-moz-range-thumb {
  width: 8px; height: 26px; border-radius: 3px;
  background: #ff4030; border: 1px solid #2a0a06; cursor: pointer;
}
.radio-btns { display: flex; gap: 10px; margin-bottom: 8px; }
.radio-btn {
  flex: 1; padding: 11px 0; border-radius: 8px; cursor: pointer;
  background: #15181d; color: var(--ink); border: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
}
.radio-btn:hover { background: #1d2128; }
.radio-power.on { background: #1f3a26; color: #57e389; border-color: #2f6b3f; }
#radio-vol {
  flex: 1; height: 14px; border-radius: 7px; appearance: none; -webkit-appearance: none;
  outline: none; cursor: pointer;
  background: linear-gradient(90deg, #15181d, #ffb347);
}
#radio-vol::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 3px solid #0a0e11; cursor: pointer;
}
#radio-vol::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 3px solid #0a0e11; cursor: pointer;
}

/* ---------- guitar filter treadle (drag up/down) ---------- */
.filter-panel { width: min(80vw, 180px); }
.filter-body { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 12px 0; }
.filter-mark { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
/* a tall vertical slider — open (max) at the top, 100 Hz (min) at the bottom */
#filter-slider {
  writing-mode: vertical-lr; direction: rtl;            /* min bottom, max top */
  width: 14px; height: 190px; border-radius: 7px;
  appearance: none; -webkit-appearance: none; outline: none; cursor: pointer;
  background: linear-gradient(0deg, #15181d, #5a6470 55%, #f5f0e0);
}
#filter-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 22px; border-radius: 5px;
  background: var(--ink); border: 3px solid #0a0e11; cursor: pointer;
}
#filter-slider::-moz-range-thumb {
  width: 26px; height: 22px; border-radius: 5px;
  background: var(--ink); border: 3px solid #0a0e11; cursor: pointer;
}

/* ---------- room chat ---------- */
#chat-log {
  /* fixed + above the overlays (z 50): messages stay readable while
     you're deep in a DOOM run or floating in the arena */
  position: fixed; left: 16px; bottom: 66px; z-index: 70;
  display: flex; flex-direction: column; gap: 4px;
  max-width: min(64vw, 540px); pointer-events: none;
  font-size: 15px; line-height: 1.5;
}
.chat-msg {
  background: rgba(8, 10, 13, 0.72); border-radius: 6px;
  padding: 6px 12px; width: fit-content; max-width: 100%;
  word-wrap: break-word; text-shadow: 0 1px 2px #000;
  animation: chat-in 0.18s ease-out;
  transition: opacity 1.2s ease;
}
.chat-msg .chat-name { font-weight: 700; margin-right: 6px; }
.chat-msg.old { opacity: 0.25; }
@keyframes chat-in {
  from { transform: translateX(-8px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
#chat-bar {
  position: fixed; left: 16px; bottom: 14px; z-index: 75;
  width: min(86vw, 560px); display: none;
}
#chat-bar.show { display: block; }
#chat-input {
  width: 100%; background: rgba(10, 14, 17, 0.95);
  border: 1px solid var(--amber); border-radius: 4px;
  color: var(--ink); padding: 13px 16px; font-size: 16px; outline: none;
}
#chat-btn {
  position: fixed; right: 16px; bottom: 56px; z-index: 30;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(10, 14, 17, 0.7); border: 1px solid var(--line);
  font-size: 18px; display: none; cursor: pointer;
}
@media (pointer: coarse) { #chat-btn { display: block; } }

/* room-change fade */
#fade {
  position: fixed; inset: 0; z-index: 95; background: #000;
  opacity: 0; pointer-events: none; transition: opacity 0.45s ease;
}
#fade.dark { opacity: 1; pointer-events: all; }

/* ---------- flight strip: real jet on the LAX approach ---------- */
#flight-strip {
  position: absolute; top: 18px; left: 50%;
  transform: translate(-50%, -60px);
  background: #0c0e08; border: 1px solid #3a3a20;
  border-radius: 4px; padding: 9px 18px;
  font-family: "SF Mono", Menlo, monospace; font-size: 13px;
  letter-spacing: 0.08em; color: #ffb000;
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.5);
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  pointer-events: none;
}
#flight-strip.show { transform: translate(-50%, 0); }
#flight-strip .fs-plane { color: #e8e4da; }
#flight-strip .fs-flight { font-weight: 700; }
#flight-strip .fs-type { color: #8a877e; }
#flight-strip .fs-label { color: #54e08a; }
#flight-strip .fs-alt { color: #8a877e; }

/* ---------- message in a bottle ---------- */
.bottle-msg {
  font-family: "Caveat", cursive; font-size: 24px; line-height: 1.4;
  background: #efe7d2; color: #3a3120; border-radius: 3px;
  padding: 16px 18px; margin-bottom: 14px; transform: rotate(-0.6deg);
  white-space: pre-wrap; word-wrap: break-word;
}
#bottle-send {
  font-family: "Archivo"; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 12px; background: #4a7a5a;
  color: #0a140e; border: none; padding: 13px 28px; cursor: pointer;
  border-radius: 2px; width: 100%; margin-top: 10px;
}

/* ---------- private inbox ---------- */
#dm-send {
  font-family: "Archivo", sans-serif; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px;
  background: var(--amber); color: #14110a; border: none;
  padding: 14px 30px; cursor: pointer; border-radius: 2px; width: 100%;
}
#dm-send:disabled { opacity: 0.5; }
#dm-inbox { max-height: 60vh; overflow-y: auto; }
.dm-item {
  border-bottom: 1px solid var(--line); padding: 12px 4px;
  font-size: 14px; line-height: 1.5;
}
.dm-item .dm-meta { font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.dm-item a { color: var(--amber); word-break: break-all; }

/* ---------- the cabinet in the closet ---------- */
.arcade-shell {
  position: relative; background: #0a0a10;
  border: 10px solid #1c1224; border-radius: 10px;
  padding: 18px 18px 10px; box-shadow: 0 0 60px rgba(120, 60, 255, 0.25);
}
.arcade-shell .x { position: absolute; top: 2px; right: 8px; z-index: 2; }
/* the game fits the screen in BOTH orientations: width capped by the
   viewport's width and (×1.6) its height, so a short landscape phone
   never crops the top. 720px keeps it crisp on desktop. */
#arcade-canvas {
  display: block; margin: 0 auto;
  width: min(94vw, 134vh, 720px); height: auto;
  image-rendering: pixelated; background: #000;
  border: 2px solid #2a2a3a;
  touch-action: none;                 /* canvas owns drag/swipe — no page scroll or pinch-zoom */
}
.arcade-shell::after {
  /* scanlines */
  content: ""; position: absolute; inset: 18px; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
}
#dosbox {
  width: min(94vw, 134vh, 720px);
  height: calc(min(94vw, 134vh, 720px) / 1.6);
  background: #000; border: 2px solid #2a2a3a;
}
#dosbox .background-image { left: 0 !important; }   /* no dark strip where the kiosk'd sidebar was */
#dosbox.hidden, #arcade-canvas.hidden { display: none; }
.dos-loading {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: #9ff; font-family: monospace; font-size: 13px; letter-spacing: 0.15em;
}
.arcade-help {
  text-align: center; font-size: 10px; color: var(--dim);
  letter-spacing: 0.1em; margin-top: 8px; text-transform: uppercase;
}
/* two thumb zones, built per-game by arcade.js — left steers, right shoots.
   floated over the game's bottom corners so they survive landscape, where
   stacking them below the canvas would push them off a short screen. */
.arcade-pads {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: none; justify-content: space-between; align-items: flex-end;
  padding: 0 18px 16px; gap: 16px; pointer-events: none;
  user-select: none; -webkit-user-select: none;
}
.arcade-pads.hidden { display: none; }      /* pong/tron (finger-only) + DOOM (its own touch UI) */
.pad-zone { pointer-events: auto; display: flex; align-items: flex-end; gap: 10px; }
#pad-right { flex-direction: column-reverse; }   /* FIRE under BOMB — stacks narrow */
.pad {
  min-width: 58px; height: 58px; border-radius: 12px;
  background: #1c1f26; border: 1px solid #34384a; color: var(--ink);
  font-size: 20px; font-family: "Archivo";
  display: flex; align-items: center; justify-content: center;
  touch-action: none; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.pad:active { background: #3a64ff; border-color: #6f90ff; color: #fff; }
.pad-wide { min-width: 88px; font-size: 14px; letter-spacing: 0.08em; }
.pad-fire { background: #311722; border-color: #7a2a3a; }
.pad-fire:active { background: #e8345f; border-color: #ff7a9c; }
/* + shaped d-pad — arrows placed by grid-area regardless of DOM order */
.dpad { display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(3, 54px); gap: 5px; }
.dpad .pad { min-width: 0; width: 54px; height: 54px; }
.dpad .d-up { grid-area: 1 / 2; }
.dpad .d-left { grid-area: 2 / 1; }
.dpad .d-right { grid-area: 2 / 3; }
.dpad .d-down { grid-area: 3 / 2; }
/* tall paddle controls (pong) */
.vpad { display: flex; flex-direction: column; gap: 12px; }
.vpad .pad { width: 74px; height: 74px; font-size: 24px; }
/* floating thumbstick (defender) — springs up under the thumb, pointer-through */
.stickbase {
  position: absolute; z-index: 3; width: 92px; height: 92px; border-radius: 50%;
  background: rgba(40, 46, 64, 0.32); border: 2px solid rgba(120, 140, 200, 0.45);
  pointer-events: none;
}
.stickknob {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px;
  margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(120, 150, 255, 0.6); border: 1px solid rgba(190, 205, 255, 0.85);
}
@media (pointer: coarse) {
  .arcade-pads { display: flex; }
  .arcade-pads.hidden { display: none; }
  .arcade-help { display: none; }
}

/* ---------- the cat fights back ---------- */
#scratch {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0;
  background:
    linear-gradient(105deg, transparent 46%, rgba(200,30,30,0.55) 47%, transparent 49%),
    linear-gradient(105deg, transparent 51%, rgba(200,30,30,0.45) 52%, transparent 54%),
    linear-gradient(105deg, transparent 56%, rgba(200,30,30,0.5) 57%, transparent 59%);
}
#scratch.flash { animation: scratch-flash 0.7s ease-out; }

/* ---------- ten soft seconds (the smoking corner) ----------
   blur and brighten only the edges of vision; the middle stays
   clear, so the world goes pleasantly fuzzy without going blind */
#high {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  backdrop-filter: blur(7px) brightness(1.18) saturate(1.45);
  -webkit-backdrop-filter: blur(7px) brightness(1.18) saturate(1.45);
  mask-image: radial-gradient(ellipse at center, transparent 26%, rgba(0,0,0,0.55) 58%, #000 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 26%, rgba(0,0,0,0.55) 58%, #000 80%);
  opacity: 0; transition: opacity 2.4s ease;
}
#high.on { opacity: 1; }
@keyframes scratch-flash {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}
#scene.shake { animation: cat-shake 0.4s linear; }
@keyframes cat-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-7px, 4px); }
  40% { transform: translate(6px, -5px); }
  60% { transform: translate(-5px, -3px); }
  80% { transform: translate(4px, 5px); }
}

@media (max-width: 700px) {
  #hint-desktop { display: none; }
  .intro-card { padding: 32px 18px; }
}
@media (min-width: 701px) {
  #hint-mobile { display: none; }
}

/* ====== the computer screen menu ====== */
.pc-sec {
  margin: 14px 0 6px; font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--dim);
  display: flex; justify-content: space-between; align-items: baseline;
}
.pc-item {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left; padding: 11px 10px; margin: 3px 0;
  background: rgba(255,255,255,0.025); border: 1px solid var(--line);
  border-radius: 5px; color: var(--ink); font: inherit; font-size: 14px;
  cursor: pointer;
}
.pc-item:hover { border-color: var(--amber); background: rgba(255,179,71,0.07); }
.pc-item.hidden { display: none; }
.pc-item.playing { border-color: var(--amber); background: rgba(255,179,71,0.10); }
.pc-hint { font-size: 11px; color: var(--dim); letter-spacing: 0.4px; text-transform: none; }
.pc-item.playing .pc-hint { color: var(--amber); }

/* ====== the mic: hold to talk, tap to leave it open ====== */
#mic-btn {
  position: fixed; right: 16px; bottom: 110px; z-index: 30;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(10, 14, 17, 0.7); border: 1px solid var(--line);
  font-size: 18px; display: none; cursor: pointer;
  -webkit-user-select: none; user-select: none; touch-action: none;
}
@media (pointer: coarse) { #mic-btn { display: block; } }
#mic-btn.ptt { border-color: var(--amber); background: rgba(255,179,71,0.25); }
#mic-btn.live {
  border-color: #ff5050; background: rgba(255,60,60,0.3);
  animation: mic-pulse 1.6s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,80,80,0.5); }
  50% { box-shadow: 0 0 0 9px rgba(255,80,80,0); }
}

/* the bottom-right comms cluster reads as one unit: matched circles, a soft
   blur behind the glass, a gentle lift on hover/press */
#chat-btn, #mic-btn {
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
#chat-btn:hover, #mic-btn:hover { border-color: var(--amber); transform: translateY(-2px); }
#chat-btn:active, #mic-btn:active { transform: translateY(0) scale(0.94); }

/* ---------- the venue is sealed: chat only, no cat HUD, no LAX ---------- */
/* the dj FX panel — hidden by default, revealed for the host/booth in the venue */
#fx-panel {
  position: absolute; left: 16px; bottom: 16px; display: none;
  background: rgba(10, 8, 18, 0.72); border: 1px solid rgba(255, 90, 200, 0.35);
  border-radius: 12px; padding: 9px 13px; font-size: 12px; color: var(--ink);
  box-shadow: 0 0 18px rgba(255, 70, 190, 0.18); backdrop-filter: blur(6px);
  letter-spacing: 0.3px; line-height: 1.55;
}
#fx-panel.show { display: block; }
#fx-panel .fx-title { font-size: 10px; letter-spacing: 3px; color: #ff7ad9; margin-bottom: 4px; opacity: 0.85; }
#fx-panel .fx-row { white-space: nowrap; }
#fx-panel .fx-key {
  display: inline-block; min-width: 16px; text-align: center; margin-right: 7px;
  padding: 1px 5px; border-radius: 5px; font-weight: 700; color: #0a0610;
  background: #ff7ad9; box-shadow: 0 0 8px rgba(255, 122, 217, 0.6);
}
body.in-club #cat-pill { display: none; }
body.in-club #mic-btn { display: none; }     /* beats the coarse-pointer rule (id + class + element) */
body.in-club #flight-strip { display: none; }

/* ====== echo arena team chooser ====== */
.team-row { display: flex; gap: 12px; margin: 10px 0 14px; }
.team-btn {
  flex: 1; padding: 26px 0; font: 900 22px/1 Archivo, sans-serif;
  letter-spacing: 3px; border-radius: 6px; cursor: pointer; color: #fff;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}
.team-btn.team-o { color: #ff9a50; }
.team-btn.team-o:hover { border-color: #ff7320; background: rgba(255,115,32,0.16); }
.team-btn.team-b { color: #6ac4ff; }
.team-btn.team-b:hover { border-color: #22a4ff; background: rgba(34,164,255,0.16); }
