/* ===========================================================================
   The arcade chrome: marquee, lobby, cabinet, and the theatre (boot, coin,
   attract, high scores, terminal).
   ======================================================================== */

/* ================================================================ marquee */
.marquee {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--marquee-h);
  padding: 0.5rem clamp(12px, 3vw, 24px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.26));
  border-bottom: 1px solid var(--mist);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.marquee__home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--mist);
  color: var(--ink-dim);
  font-family: var(--chrome-font);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .25s var(--ease-out);
}
.marquee__home:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }

.marquee__brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-right: auto;
  min-width: 0;
}
.marquee__title {
  font-family: var(--display);
  font-weight: var(--display-weight);
  text-transform: var(--display-transform);
  letter-spacing: var(--display-spacing);
  font-size: clamp(0.95rem, 2.6vw, 1.3rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.marquee__sub {
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
@media (max-width: 720px) { .marquee__sub { display: none; } }

.marquee__tools { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.marquee__tools .segmented button { padding: 0.3rem 0.52rem; font-size: 0.68rem; }

/* The world picker shows each world's palette as a split dot. */
.world-pick button { position: relative; padding-left: 1.55rem !important; }
.world-pick button::before {
  content: '';
  position: absolute;
  left: 0.5rem; top: 50%;
  width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sw-a) 0 50%, var(--sw-b) 50% 100%);
  box-shadow: 0 0 7px -1px var(--sw-a), inset 0 0 0 1px rgba(255, 255, 255, .3);
}
.world-pick button[data-world-id='arcade'] { --sw-a: #00f0ff; --sw-b: #ff2bd1; }
.world-pick button[data-world-id='neon']   { --sw-a: #ff2d95; --sw-b: #00e5ff; }
.world-pick button[data-world-id='cyber']  { --sw-a: #00f0ff; --sw-b: #1a2a6c; }
.world-pick button[data-world-id='galaxy'] { --sw-a: #ff00a0; --sw-b: #9d4edd; }
.world-pick button[data-world-id='reef']    { --sw-a: #ff9e7d; --sw-b: #7fe3ff; }
.world-pick button[data-world-id='lunar']   { --sw-a: #e8edf2; --sw-b: #ffb347; }
.world-pick button[data-world-id='balloon'] { --sw-a: #ff6b6b; --sw-b: #5ec8e5; }
@media (max-width: 560px) {
  .world-pick button { padding-left: 1.1rem !important; font-size: 0 !important; }
  .world-pick button::before { left: 0.3rem; }
}

/* ------------------------------------- the neon world's 8-bit display face */
/* Press Start 2P has a 1em advance per character where Orbitron averages
   about 0.62em, so every heading that switches to it needs roughly two thirds
   of its old size and none of its old tracking - the face is already spaced.
   These are corrections, not a second design: the layout is unchanged.
   Scoped to the world, so the other three are untouched. */
[data-world='neon'] .marquee__title { font-size: clamp(0.6rem, 1.7vw, 0.82rem); }
[data-world='neon'] .lobby__hero h1 { font-size: clamp(1.05rem, 4.6vw, 2.3rem); line-height: 1.25; }
[data-world='neon'] .lobby__tagline { font-size: 0.46rem; letter-spacing: 0.1em; line-height: 1.8; }
[data-world='neon'] .cabinet__status { font-size: clamp(0.5rem, 1.6vw, 0.6rem); letter-spacing: 0.04em; line-height: 1.7; }
[data-world='neon'] .coin__marquee { font-size: clamp(0.85rem, 3.4vw, 1.7rem); letter-spacing: 0.04em; }
[data-world='neon'] .hiscore__title { font-size: clamp(0.68rem, 2.6vw, 1.1rem); letter-spacing: 0.1em; }

/* ==================================================================== view */
#view {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - var(--marquee-h));
}

/* =================================================================== lobby */
.lobby {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.2rem, 4vh, 2.4rem) clamp(14px, 3vw, 26px) 3rem;
}

.lobby__hero { text-align: center; margin-bottom: clamp(1.2rem, 4vh, 2.2rem); }
.lobby__hero h1 {
  font-size: clamp(2.1rem, 8vw, 3.8rem);
  line-height: 1;
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    text-shadow:
      0 0 18px rgba(var(--accent-rgb), 0.5),
      0 0 62px rgba(var(--accent-rgb), 0.3),
      0 0 110px rgba(var(--accent-rgb), 0.18);
  }
}
.lobby__tagline {
  margin: 0.6rem 0 0;
  font-family: var(--display);
  color: var(--ink-dim);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.lobby__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: clamp(10px, 1.6vw, 16px);
}

/* ==================================================================== tile */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--mist);
  border-radius: var(--radius-sm);
  background: var(--panel-bg);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: tile-in .55s var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
  transition: transform .3s var(--ease-spring), border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
@keyframes tile-in { to { opacity: 1; transform: translateY(0); } }

.tile:hover, .tile:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), .5);
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .9), 0 0 26px -10px rgba(var(--accent-rgb), .5);
  outline: none;
}
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tile__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: block;
  background: #000;
  border-bottom: 1px solid var(--mist);
}
.tile__screen canvas { width: 100%; height: 100%; display: block; }

/* every tile is a little CRT */
.tile__screen::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
  opacity: .5;
}

.tile__body { padding: 0.55rem 0.65rem 0.7rem; }
.tile__title {
  font-family: var(--chrome-font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.tile__blurb {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--ink-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 0.45rem;
}
.tile__tag {
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--mist);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* a badge in the screen corner: stats, or high score */
.tile__badge {
  position: absolute;
  left: 5px; bottom: 5px;
  padding: 0.1rem 0.32rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, .66);
  border: 1px solid rgba(var(--accent-rgb), .3);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* locked cabinets */
.tile--locked { cursor: help; }
.tile--locked .tile__screen canvas { filter: grayscale(.72) brightness(.62); }
.tile--locked .tile__title { color: var(--ink-dim); }
.tile--locked .tile__screen::before {
  content: attr(data-lock);
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.22rem 0;
  text-align: center;
  background: rgba(0, 0, 0, .74);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  z-index: 2;
}
.tile--locked:hover .tile__screen canvas { filter: grayscale(.4) brightness(.8); }
.tile.is-denied { animation: shake .4s var(--ease-out); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.tile--unlocked { animation: tile-in .55s var(--ease-out) forwards, unlock-flash 1.1s var(--ease-out); }
@keyframes unlock-flash {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .9); }
  100% { box-shadow: 0 0 0 26px rgba(var(--accent-rgb), 0); }
}

/* ================================================================= cabinet */
.cabinet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.7rem, 2vh, 1.2rem);
  padding: clamp(0.8rem, 2.5vh, 1.6rem) clamp(12px, 3vw, 22px) 2.4rem;
  min-height: calc(100vh - var(--marquee-h));
}
.cabinet__stage {
  position: relative;
  width: 100%;
  /* Board games want a readable column; a real-time playfield wants the room.
     980px would bind before the stage's own height budget does. */
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.6rem, 2vh, 1rem);
}
.cabinet__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.3rem;
}
.cabinet__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; }

/* ------------------------------------------------- the real-time cabinet */
/* A board game is a document: it scrolls, and a readable column beats a wide
   one. An action game is a SCREEN, and every pixel the chrome does not need
   belongs to it. So the real-time cabinet is a fixed-height column and the
   play area is the one part that grows: #cab-play then reports the height the
   chrome actually left, and stage.js prefers a measured host height over its
   own viewport budget. Nothing here can feed back, because #cab-play takes its
   height from this flex column rather than from the canvas inside it. */
.cabinet--realtime {
  height: calc(100dvh - var(--marquee-h));
  min-height: 0;
  padding-bottom: clamp(0.5rem, 1.5vh, 1rem);
  gap: clamp(0.4rem, 1.2vh, 0.8rem);
}
.cabinet--realtime .cabinet__stage {
  flex: 1 1 auto;
  min-height: 0;
  /* Wider than the board games' 1120px column, or the cap would bind before
     the playfield had used the height available to it. */
  max-width: min(96vw, 1440px);
}
.cabinet--realtime #cab-play {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cabinet--realtime .cabinet__status { min-height: 1.3em; }
/* Compact the chrome, because every row under the stage is a row off the
   screen. Both stay present and operable - the pad is the touch control and
   the locked skin chips are the whole incentive to keep playing. */
.cabinet--realtime .worm-pad { grid-template-columns: repeat(3, 2.25rem); gap: .25rem; }
.cabinet--realtime .worm-pad__btn { width: 2.25rem; height: 1.9rem; font-size: .7rem; }
/* The pad is the TOUCH control. On a machine with a fine pointer it is a row
   of chrome that costs the playfield ~80px of height - one whole snap step -
   for a control the keyboard and gamepad already cover. It stays in the DOM
   and on every coarse-pointer device, where it is the only way to steer.
   (neonworm.css already dims it to .55 here; this finishes the thought.) */
@media (hover: hover) and (pointer: fine) {
  .cabinet--realtime .cabinet__controls { display: none; }
}
.cabinet--realtime .worm-skins {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: min(96vw, 1440px);
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.cabinet__status {
  margin: 0;
  min-height: 1.6em;
  font-family: var(--display);
  font-size: clamp(0.72rem, 2.5vw, 0.9rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  transition: color .4s var(--ease-out);
}
.cabinet__status.is-win  { color: var(--accent); text-shadow: 0 0 24px rgba(var(--accent-rgb), .45); }
.cabinet__status.is-lose { color: var(--x); }
.cabinet__status.is-draw { color: var(--ink-dim); }
.cabinet__status.is-thinking { color: var(--ink-dim); animation: pulse-dim 1.5s ease-in-out infinite; }
@keyframes pulse-dim { 50% { opacity: .45; } }

/* ============================================================== CRT bezel */
/* Only applied when the cabinet asks for it - it costs board readability. */
.bezel {
  position: relative;
  padding: clamp(10px, 2.2vw, 22px);
  border-radius: clamp(14px, 3vw, 28px);
  background: linear-gradient(160deg, #23262b, #0d0f11 60%, #16181b);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .09),
    inset 0 -3px 10px rgba(0, 0, 0, .8),
    0 24px 60px -24px rgba(0, 0, 0, .95);
}
.bezel__screen {
  position: relative;
  border-radius: clamp(8px, 2vw, 16px);
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 60px -10px rgba(0, 0, 0, .95);
}
.bezel__screen::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 5;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .3) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
/* a soft phosphor bloom over the whole screen */
.bezel__screen::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(var(--accent-rgb), .06), transparent 70%);
}
.bezel.is-curved .bezel__screen > * { transform: perspective(900px) rotateX(.35deg) scale(1.004); }

/* ==================================================================== boot */
.boot, .coin, .attract, .hiscore, .terminal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: #000;
  font-family: var(--mono);
}
.boot { padding: clamp(14px, 4vw, 42px); color: #cfcfcf; overflow: hidden; }
.boot pre {
  margin: 0;
  font-size: clamp(0.62rem, 1.7vw, 0.84rem);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.boot__skip {
  position: absolute;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: #4a4a4a;
  text-transform: uppercase;
  animation: pulse-dim 2s ease-in-out infinite;
}
/* the crack intro: amber on black, with a sine scroller */
.boot--intro { color: #33ff66; justify-content: center; align-items: center; gap: 1.2rem; }
.boot__logo {
  font-size: clamp(0.4rem, 1.35vw, 0.78rem);
  line-height: 1.05;
  color: #33ff66;
  text-shadow: 0 0 10px rgba(51, 255, 102, .6), 0 0 30px rgba(51, 255, 102, .25);
  white-space: pre;
}
.boot__scroller {
  position: relative;
  width: 100%;
  height: 2.6em;
  overflow: hidden;
  font-size: clamp(0.72rem, 2.1vw, 1rem);
  letter-spacing: 0.08em;
}
.boot__scroller span {
  position: absolute;
  white-space: pre;
  will-change: transform;
  color: #ffd24a;
  text-shadow: 0 0 12px rgba(255, 210, 74, .5);
}
.boot__bars {
  display: flex; gap: 3px; align-items: flex-end; height: 34px;
}
.boot__bars i {
  display: block; width: 5px; background: linear-gradient(0deg, #33ff66, #c9ffd6);
  box-shadow: 0 0 8px rgba(51, 255, 102, .6);
}

/* ============================================================ insert coin */
.coin { align-items: center; justify-content: center; gap: 1.4rem; background: radial-gradient(circle at 50% 45%, #0b0b12, #000 70%); }
.coin__marquee {
  font-family: var(--display);
  font-weight: var(--display-weight);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(1.4rem, 6vw, 3rem);
  color: var(--accent-soft);
  text-shadow: 0 0 20px rgba(var(--accent-rgb), .6), 0 0 70px rgba(var(--accent-rgb), .3);
  animation: marquee-flicker 1.2s steps(2) 1;
}
@keyframes marquee-flicker {
  0%, 24%, 48% { opacity: .15; }
  12%, 36%, 100% { opacity: 1; }
}
.coin__prompt {
  font-size: clamp(0.8rem, 3vw, 1.1rem);
  letter-spacing: 0.3em;
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.coin__hint { font-size: 0.64rem; letter-spacing: 0.18em; color: #555; text-transform: uppercase; }

/* =============================================================== immerse */
/* The full-screen scene. Above the boot and attract screens' level so nothing
   in the arcade can end up on top of it; the terminal (95) still can. */
.immerse-launch { white-space: nowrap; display: inline-flex; gap: 0.4rem; align-items: center; }
/* On a phone the marquee has room for the mark but not the words. */
@media (max-width: 560px) {
  .immerse-launch { padding-inline: 0.6rem; }
  .immerse-launch__label { display: none; }
}
.immerse {
  position: fixed; inset: 0; z-index: 92;
  background: #000;
  overflow: hidden;
}
.immerse.is-idle { cursor: none; }
.immerse__canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.immerse__caption {
  position: absolute; left: 0; right: 0; bottom: clamp(18px, 6vh, 56px);
  padding: 0 1.2rem;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .9);
  transition: opacity 1.6s ease;
}
.immerse__title {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: var(--display-weight);
  text-transform: var(--display-transform);
  letter-spacing: 0.14em;
  font-size: clamp(1rem, 3.4vw, 1.9rem);
  color: var(--accent-soft);
}
[data-world='neon'] .immerse__title { font-size: clamp(0.7rem, 2.2vw, 1.15rem); }
.immerse__hint {
  margin: 0 auto; max-width: 46rem;
  font-size: clamp(0.78rem, 1.5vw, 0.95rem);
  line-height: 1.6;
  color: #fff;
}
.immerse.is-settled .immerse__caption { opacity: 0; }
.immerse__leave {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0, 0, 0, .45);
  transition: opacity .6s ease;
}
.immerse.is-idle .immerse__leave:not(:focus-visible) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .immerse__caption, .immerse__leave { transition: none; }
}

/* ================================================================ attract */
.attract { align-items: center; justify-content: center; gap: 1rem; background: rgba(0, 0, 0, .9); }
.attract__label {
  position: absolute; top: 8%; left: 0; right: 0;
  text-align: center;
  font-size: 0.7rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-faint);
}
.attract__demo { width: min(90vw, 460px); }
.attract__press {
  position: absolute; bottom: 12%; left: 0; right: 0;
  text-align: center;
  font-size: clamp(0.8rem, 3vw, 1.1rem);
  letter-spacing: 0.3em;
  color: var(--accent);
  animation: blink 1.1s steps(2) infinite;
}

/* ============================================================= high score */
.hiscore { align-items: center; justify-content: center; gap: 1.6rem; background: radial-gradient(circle at 50% 40%, #0a0a14, #000 70%); }
.hiscore__title {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: clamp(1.1rem, 4.4vw, 1.9rem);
  color: var(--accent);
  text-shadow: 0 0 22px rgba(var(--accent-rgb), .5);
}
.hiscore__value { font-size: 0.92rem; letter-spacing: 0.16em; color: var(--ink); }
.hiscore__initials { display: flex; gap: clamp(10px, 3vw, 22px); }
.hiscore__slot {
  width: clamp(44px, 12vw, 70px);
  padding: 0.3rem 0;
  text-align: center;
  font-size: clamp(1.8rem, 8vw, 3.2rem);
  font-weight: 700;
  color: var(--ink-dim);
  border-bottom: 3px solid var(--mist-strong);
  transition: color .2s, border-color .2s, transform .2s var(--ease-spring);
}
.hiscore__slot.is-active {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  text-shadow: 0 0 20px rgba(var(--accent-rgb), .6);
}
.hiscore__help { font-size: 0.64rem; letter-spacing: 0.18em; color: var(--ink-faint); text-transform: uppercase; text-align: center; line-height: 1.8; }

.hiscore__table { width: min(92vw, 420px); font-size: 0.8rem; }
.hiscore__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; color: var(--ink-dim); }
.hiscore__row.is-new { color: var(--accent); font-weight: 700; }
.hiscore__row span:first-child { color: var(--ink-faint); width: 2.2em; }

/* =============================================================== terminal */
.terminal {
  background: rgba(0, 6, 2, .96);
  color: #33ff66;
  padding: clamp(10px, 2.4vw, 22px);
  z-index: 95;
  text-shadow: 0 0 6px rgba(51, 255, 102, .45);
}
.terminal::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .34) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 85% 75% at 50% 50%, transparent 40%, rgba(0, 0, 0, .75) 100%);
}
.terminal__out {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  font-size: clamp(0.66rem, 1.8vw, 0.84rem);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
}
.terminal__line { display: flex; align-items: baseline; gap: 0.5rem; }
.terminal__prompt { color: #9effb0; flex: none; }
.terminal__input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: inherit;
  font: inherit;
  text-shadow: inherit;
  caret-color: #33ff66;
  min-width: 0;
}
.terminal__dim { color: #1f8f45; }
.terminal__warn { color: #ffd24a; }
.terminal__err { color: #ff6b5e; }
.terminal__hit { color: #ffffff; background: rgba(51, 255, 102, .18); }

/* ================================================================== toast */
.toasts {
  position: fixed;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .86);
  border: 1px solid rgba(var(--accent-rgb), .35);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent-soft);
  animation: toast-in .3s var(--ease-out), toast-out .4s var(--ease-out) 2.8s forwards;
  max-width: min(86vw, 460px);
  text-align: center;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }

/* ================================================================= footer */
.shell-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1rem 2rem;
  font-size: 0.68rem;
  color: var(--ink-faint);
  line-height: 1.7;
}
.shell-footer code { font-family: var(--mono); color: var(--ink-dim); }

/* ------------------------------------------------------- online room panel */
/* Shared by every cabinet that plays online (js/shell/roompanel.js). */
.roompanel {
  width: min(92vw, 380px);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}
.roompanel.is-busy { opacity: 0.7; }
.roompanel__field { display: flex; flex-direction: column; align-items: center; }
.roompanel__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; }
.roompanel__or {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.roompanel__input {
  width: 11rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--mist-strong);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-family: var(--chrome-font);
  font-size: 0.85rem;
  text-align: center;
  letter-spacing: 0.06em;
}
.roompanel__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.roompanel__input::placeholder { color: var(--ink-faint); }
.roompanel__input--code { width: 6.5rem; text-transform: uppercase; letter-spacing: 0.3em; }
.roompanel__input--link { width: 15rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0; }
.roompanel__error { min-height: 1em; margin: 0; font-size: 0.75rem; color: var(--o); }
.roompanel__head { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.roompanel__code {
  font-family: var(--pixel);
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  color: var(--accent-soft);
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.55);
}
.roompanel__signal { font-size: 0.68rem; color: var(--ink-faint); }
.roompanel__signal.is-live { color: var(--ink-dim); }
.roompanel__signal.is-retrying { color: var(--o); }
.roompanel__players {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.roompanel__player {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  color: var(--ink);
  text-align: left;
}
.roompanel__player.is-empty { color: var(--ink-faint); }
.roompanel__player em { color: var(--ink-faint); font-style: normal; }
.roompanel__side { font-family: var(--chrome-font); font-size: 0.7rem; color: var(--accent); }
.roompanel__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink-faint); }
.roompanel__player.is-online .roompanel__dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
}
.roompanel__invite { display: flex; flex-direction: column; align-items: center; }
