:root {
  --bg: #0b0d17;
  --bg-2: #131726;
  --bg-3: #1c2138;
  --fg: #f4f6fb;
  --fg-dim: #a3a8bb;
  --fg-faint: #5b6080;
  --accent: #6b8afd;
  --accent-soft: rgba(107, 138, 253, 0.18);
  --c0: #ef4444;
  --c1: #3b82f6;
  --c2: #eab308;
  --c3: #22c55e;
  --good: #22c55e;
  --bad: #ef4444;
  --soon: #d4a857;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Space Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view {
  width: 100%;
  height: 100%;
  padding: 4vh 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fade-in 200ms ease-out;
}
.view[hidden] { display: none !important; }
[hidden] { display: none !important; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.btn {
  font: inherit;
  font-weight: 600;
  font-size: 1.6vw;
  border-radius: 12px;
  border: none;
  padding: 1.2em 2.4em;
  cursor: pointer;
  transition: transform 100ms, background-color 100ms;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover:not(:disabled) { background: #809cff; }
.btn-primary:disabled { background: #2c3247; color: #6a708a; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }


/* --- LAUNCHER (lobby view) --- */

/* Override the centered .view default so the launcher can fill edge-to-edge */
.view-lobby {
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 700px at 16% -6%, rgba(107, 138, 253, 0.16), transparent 60%),
    radial-gradient(900px 600px at 92% 30%, rgba(239, 68, 68, 0.09), transparent 70%),
    radial-gradient(800px 500px at 50% 110%, rgba(34, 197, 94, 0.06), transparent 60%),
    var(--bg);
}
.view-lobby::-webkit-scrollbar { width: 10px; }
.view-lobby::-webkit-scrollbar-track { background: transparent; }
.view-lobby::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 5px; }
.view-lobby::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

@keyframes launcher-reveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--fg);
  padding: 8px 4px;
}
.brand-mark {
  width: clamp(34px, 2.2vw, 42px);
  height: clamp(34px, 2.2vw, 42px);
  flex-shrink: 0;
  filter: drop-shadow(0 6px 18px rgba(107, 138, 253, 0.35));
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.05vw, 19px);
  letter-spacing: -0.005em;
  color: var(--fg-dim);
  line-height: 1;
}
.brand-name em {
  font-style: normal;
  color: var(--fg);
  font-weight: 700;
}

.connect-url {
  font-size: clamp(10px, 0.7vw, 12px);
  color: var(--fg-faint);
  max-width: 18vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* === Lobby sub-state container === */
.lobby-state { width: 100%; min-height: 100%; display: flex; flex-direction: column; }

/* === CONNECT (pre-join) screen === */
.lobby-connect {
  padding: clamp(22px, 2.2vw, 40px) clamp(28px, 3.6vw, 64px) clamp(36px, 3.8vw, 64px);
  gap: clamp(20px, 2.2vw, 36px);
  animation: launcher-reveal 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.connect-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.connect-split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: clamp(28px, 3vw, 56px);
  align-items: stretch;
  min-height: 0;
}

/* --- Visual stage (left) --- */
.connect-stage {
  position: relative;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 35%, rgba(107, 138, 253, 0.15), transparent 60%),
    linear-gradient(160deg, #1a2046 0%, #0c0f24 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: clamp(28px, 3vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 2vw, 36px);
  overflow: hidden;
  isolation: isolate;
}
.connect-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 500px at 100% 0%, rgba(239, 68, 68, 0.06), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(34, 197, 94, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.stage-art {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: clamp(440px, 38vw, 700px);
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45));
  animation: stage-breathe 8s ease-in-out infinite;
}
@keyframes stage-breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.stage-wires path {
  stroke-dasharray: 3 9;
  animation: stage-wire 1.8s linear infinite;
}
@keyframes stage-wire {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -24; }
}

.stage-caption {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.55vw, 26px);
  letter-spacing: -0.01em;
  color: var(--fg);
  text-align: center;
}
.stage-caption span {
  display: inline-block;
  margin: 0 6px;
  color: var(--accent);
  font-weight: 500;
}

/* --- Connect panel (right) --- */
.connect-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 1.4vw, 22px);
  padding: clamp(28px, 2.8vw, 48px) clamp(24px, 2.2vw, 40px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.connect-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 1.85vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
  text-align: center;
  margin: 0;
  max-width: 22ch;
}

.connect-instruction {
  font-size: clamp(13px, 0.95vw, 16px);
  color: var(--fg-dim);
  text-align: center;
  margin: 0;
  max-width: 32ch;
  line-height: 1.55;
}

.big-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 1.2vw, 22px) clamp(28px, 2.4vw, 44px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(107, 138, 253, 0.32);
  border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(107, 138, 253, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin: clamp(4px, 0.4vw, 8px) 0;
}
.big-code-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(40px, 3.4vw, 64px);
  letter-spacing: 0.16em;
  color: var(--fg);
  line-height: 1;
  font-feature-settings: "tnum";
  background: linear-gradient(180deg, #ffffff 30%, var(--accent) 110%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.connect-or {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 70%;
  font-size: clamp(11px, 0.78vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--fg-faint);
  margin: clamp(2px, 0.3vw, 6px) 0;
}
.connect-or::before,
.connect-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.big-qr {
  width: clamp(180px, 16vw, 260px);
  height: clamp(180px, 16vw, 260px);
  background: #fff;
  border-radius: 18px;
  padding: clamp(12px, 1vw, 18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.big-qr img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}
.big-qr img:not([src]), .big-qr img[src=""] { visibility: hidden; }

.connect-panel .connect-url {
  color: var(--fg-faint);
  font-size: clamp(11px, 0.78vw, 13px);
  text-align: center;
  margin: clamp(2px, 0.3vw, 6px) 0 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Narrow viewport — stack the split === */
@media (max-width: 980px) {
  .connect-split { grid-template-columns: 1fr; }
  .connect-stage { min-height: 320px; }
}

/* --- ERROR --- */
.view-error { justify-content: center; gap: 2vh; }
.view-error h2 { font-size: 3vw; }
.view-error p { font-size: 1.4vw; color: var(--fg-dim); }

/* === Fullscreen pill (top-right of every screen view) ================== */
.fs-btn {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 99999;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(11, 13, 23, 0.55);
  color: #f5f5fa;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, opacity 120ms ease;
  opacity: 0.78;
}
.fs-btn:hover { background: rgba(11, 13, 23, 0.78); opacity: 1; }
.fs-btn:active { transform: scale(0.92); }
.fs-btn svg { width: 20px; height: 20px; display: block; }
.fs-btn .fs-icon-exit { display: none; }
:root.in-fullscreen .fs-btn .fs-icon-enter { display: none; }
:root.in-fullscreen .fs-btn .fs-icon-exit  { display: block; }


/* === Connect view v2 — split-pane "phones + screen = console" =========
   Left pane: flat brand-blue ground with empty placeholders where the
   screen-demo and controller-demo will eventually mount. Right pane:
   dark panel with the connect heading and a code pill. No QR. Our own
   type/color choices throughout — no traced art. */

.lobby-connect:has(.connect-split-v2) {
  padding: 0;
  max-width: none;
  display: block;
  background: transparent;
}
/* Hide the top brand chrome on this view so the split goes edge-to-edge */
.lobby-connect:has(.connect-split-v2) > .connect-bar { display: none; }

.connect-split-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  gap: 0;
}

/* --- LEFT pane --- */
.connect-ground {
  --ground-blue: #2563d9;
  background: var(--ground-blue);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(20px, 3vh, 44px);
  padding: clamp(28px, 4vh, 60px);
  align-items: center;
  justify-items: center;
}
.ground-slot {
  background: #000;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}
.ground-slot-screen {
  width: 100%;
  max-width: clamp(440px, 56vw, 920px);
  line-height: 0;
}
.ground-video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
  border-radius: 0;
}
.ground-caption {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.4vw, 22px);
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

/* --- RIGHT pane --- */
.connect-panel-v2 {
  background: #1c1f26;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 1.4vh, 18px);
  padding: clamp(20px, 3.5vh, 44px) clamp(24px, 3vw, 56px);
  text-align: center;
  min-width: 0;
}
.connect-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.4vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  max-width: 28ch;
}
.connect-instruction {
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
.connect-qr {
  width: clamp(260px, 32vw, 520px);
  aspect-ratio: 1 / 1;
  margin-top: clamp(8px, 1.2vh, 18px);
  padding: clamp(10px, 1.2vw, 18px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.connect-qr-img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.connect-code-mini {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(15px, 1.3vw, 20px);
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.78);
  margin-top: clamp(4px, 0.6vh, 10px);
}

@media (max-width: 820px) {
  .connect-split-v2 {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
  }
  .connect-ground { padding: 24px; }
  .ground-slot-screen { max-width: 92vw; }
}

/* ====================================================================== *
 *  CONSOLE HOME (launcher v2) — PS5-style game selection screen.
 *
 *  Anatomy (back to front):
 *    .ps-bg      full-bleed animated key art of the focused game,
 *                two stacked .ps-bg-layer elements crossfade on focus change
 *    .ps-shade   left + bottom darkening for text legibility
 *    .ps-dust    ambient floating particles
 *    .ps-top     tabs (Games / Media) + status icons, avatars, clock
 *    .ps-rail    single horizontal tile rail; focused tile scales up and
 *                wears a breathing white ring
 *    .ps-hero    focused game's title, chip, pitch and Play affordance
 *    .ps-bottom  connected players (left) + join QR pod (right)
 *
 *  Everything is driven by screen.js (buildRail / applySelection /
 *  setBackdrop). Accent color rides on --ps-accent set on #psHome.
 * ====================================================================== */

.lobby-launcher { height: 100%; }

.ps-home {
  --ps-accent: #6b8afd;
  --ps-tile: clamp(120px, 15vh, 200px);
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #07080f;
  font-family: var(--font-body);
  isolation: isolate;
}

/* --- Background key art + shade -------------------------------------- */
.ps-bg { position: absolute; inset: 0; z-index: 0; }
.ps-bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 760ms ease;
  will-change: opacity;
}
.ps-bg-layer.is-on { opacity: 1; }

.ps-kv { position: absolute; inset: 0; overflow: hidden; }
.ps-kv > * { pointer-events: none; }
/* Background video for the focused game — fills + clips, sits over the code art */
.ps-kv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 6; }

.ps-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 5, 11, 0.82) 0%, rgba(4, 5, 11, 0.42) 36%, rgba(4, 5, 11, 0.05) 64%, rgba(4, 5, 11, 0.18) 100%),
    linear-gradient(180deg, rgba(4, 5, 11, 0.66) 0%, rgba(4, 5, 11, 0.12) 18%, transparent 48%, rgba(4, 5, 11, 0.78) 100%);
}

/* --- Ambient dust ------------------------------------------------------ */
.ps-dust { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ps-dust span {
  position: absolute;
  top: 104%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  opacity: 0;
  animation: ps-dust-rise var(--dur, 26s) linear var(--delay, 0s) infinite;
  transform: scale(var(--s, 1));
  filter: blur(0.4px);
}
@keyframes ps-dust-rise {
  0%   { transform: translate3d(0, 0, 0) scale(var(--s, 1)); opacity: 0; }
  8%   { opacity: var(--o, 0.22); }
  88%  { opacity: var(--o, 0.22); }
  100% { transform: translate3d(var(--dx, 2vw), -112vh, 0) scale(var(--s, 1)); opacity: 0; }
}

/* --- Top bar ------------------------------------------------------------ */
.ps-top {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 3vh, 34px) clamp(32px, 3.4vw, 64px) 0;
}
.ps-tabs { display: flex; align-items: center; gap: clamp(18px, 1.8vw, 34px); }
.ps-tab {
  font-size: clamp(15px, 1.25vw, 22px);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.46);
  position: relative;
  padding: 6px 2px;
}
.ps-tab.is-active { color: #fff; }
.ps-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.65);
}
.ps-tab.is-off { cursor: default; }

.ps-status { display: flex; align-items: center; gap: clamp(14px, 1.3vw, 24px); }
.ps-ico {
  width: clamp(18px, 1.4vw, 24px);
  height: clamp(18px, 1.4vw, 24px);
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
}
.ps-ico svg { width: 100%; height: 100%; }
.ps-avatars { display: flex; align-items: center; }
.ps-avatar {
  width: clamp(28px, 2.2vw, 38px);
  height: clamp(28px, 2.2vw, 38px);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(12px, 0.95vw, 16px);
  color: #fff;
  background: var(--av-c, #6b8afd);
  border: 2px solid rgba(8, 9, 16, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  margin-left: -8px;
}
.ps-avatar:first-child { margin-left: 0; }
.ps-avatar.is-extra { background: rgba(255, 255, 255, 0.16); font-size: 0.78em; }
.ps-clock {
  font-size: clamp(14px, 1.15vw, 20px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  font-feature-settings: "tnum";
  min-width: 5.5ch;
  text-align: right;
}

/* --- Tile rail ----------------------------------------------------------- */
.ps-rail-zone {
  position: relative;
  z-index: 6;
  margin-top: clamp(16px, 3vh, 36px);
}
.ps-rail {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 18px);
  /* generous padding keeps the focused tile's ring/glow unclipped in the
     scrollport; negative margin cancels it in layout */
  padding: clamp(24px, 3vh, 40px) clamp(32px, 3.4vw, 64px);
  margin: calc(-1 * clamp(24px, 3vh, 40px)) 0;
  height: calc(var(--ps-tile) * 1.5 + clamp(48px, 6vh, 80px));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.ps-rail::-webkit-scrollbar { display: none; }

.ps-tile {
  position: relative;
  flex: 0 0 var(--ps-tile);
  width: var(--ps-tile);
  height: var(--ps-tile);
  border-radius: clamp(10px, 1.2vh, 16px);
  overflow: hidden;
  background: #11131f;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    margin 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 240ms ease,
    filter 240ms ease;
  opacity: 0.86;
}
/* Separator before the coming-soon cluster — like the library tail */
.ps-tile.is-sep { margin-left: clamp(18px, 2vw, 36px); }

/* Focused tile: scaled up, wearing the signature breathing white ring.
   The ring is box-shadow layers (dark gap + white ring + halo) so it
   follows the tile's rounded corners and survives the scale transition. */
.ps-tile.is-focus {
  transform: scale(1.32);
  margin-left: calc(var(--ps-tile) * 0.18);
  margin-right: calc(var(--ps-tile) * 0.18);
  opacity: 1;
  z-index: 3;
  animation: ps-ring-breathe 2.1s ease-in-out infinite;
}
.ps-tile.is-sep.is-focus { margin-left: calc(clamp(18px, 2vw, 36px) + var(--ps-tile) * 0.18); }
@keyframes ps-ring-breathe {
  0%, 100% {
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.65),
      0 0 0 2px rgba(7, 8, 15, 0.9),
      0 0 0 5px #fff,
      0 0 24px 7px rgba(255, 255, 255, 0.32);
  }
  50% {
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.65),
      0 0 0 2px rgba(7, 8, 15, 0.9),
      0 0 0 5px rgba(255, 255, 255, 0.82),
      0 0 38px 11px rgba(255, 255, 255, 0.48);
  }
}

/* Coming-soon tiles: dimmed art + lock badge */
.ps-tile.is-soon { opacity: 0.6; filter: saturate(0.35); }
.ps-tile.is-soon.is-focus { opacity: 0.92; filter: saturate(0.55); }
.ps-tile-lock {
  position: absolute;
  right: 7%; bottom: 7%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 26%;
  background: rgba(8, 9, 16, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.ps-tile-lock svg { width: 58%; height: 58%; color: rgba(255, 255, 255, 0.85); }

/* Edge-of-rail nudge on the focused tile (keeps the breathing ring alive) */
.ps-tile.is-focus.ps-nudge-left   { animation: ps-ring-breathe 2.1s ease-in-out infinite, ps-nudge-l 220ms ease-out; }
.ps-tile.is-focus.ps-nudge-right  { animation: ps-ring-breathe 2.1s ease-in-out infinite, ps-nudge-r 220ms ease-out; }
.ps-tile.is-focus.ps-nudge-up,
.ps-tile.is-focus.ps-nudge-down   { animation: ps-ring-breathe 2.1s ease-in-out infinite, ps-nudge-y 220ms ease-out; }
@keyframes ps-nudge-l { 50% { transform: scale(1.32) translateX(-7px); } }
@keyframes ps-nudge-r { 50% { transform: scale(1.32) translateX(7px); } }
@keyframes ps-nudge-y { 50% { transform: scale(1.26); } }

/* --- Tile mini key art -------------------------------------------------- */
.ps-tile-art { position: absolute; inset: 0; overflow: hidden; }
/* Image cover sits over the code art; clipped to the tile, fills it. */
.ps-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; display: block; }

/* Coming-soon — striped slate with a big monogram */
.pa-soon {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 18px),
    linear-gradient(160deg, hsl(var(--kv-h, 220) 16% 17%) 0%, hsl(var(--kv-h, 220) 22% 8%) 100%);
}
.pa-soon b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--ps-tile) * 0.5);
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.22);
}

/* --- Hero ----------------------------------------------------------------- */
.ps-hero {
  position: relative;
  z-index: 6;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 clamp(32px, 3.4vw, 64px);
  min-height: 0;
}
.ps-hero-inner {
  max-width: min(52vw, 880px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 20px);
  transition: opacity 200ms ease, transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ps-hero-inner.is-swap { opacity: 0; transform: translateY(10px); }

.ps-kicker { display: flex; align-items: center; gap: 14px; }
.ps-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: clamp(10px, 0.82vw, 13px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: color-mix(in srgb, var(--ps-accent) 36%, rgba(10, 12, 20, 0.5));
  border: 1px solid color-mix(in srgb, var(--ps-accent) 65%, transparent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.ps-kicker-meta {
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.ps-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 8.8vh, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
}
.ps-pitch {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(14px, 1.7vh, 19px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ps-cta-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.6vw, 28px);
  margin-top: clamp(4px, 1vh, 12px);
}
.ps-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: clamp(11px, 1.7vh, 17px) clamp(26px, 2.6vw, 44px);
  border-radius: 999px;
  background: #fff;
  color: #0c0d14;
  font-weight: 800;
  font-size: clamp(15px, 1.9vh, 21px);
  letter-spacing: 0.01em;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(255, 255, 255, 0.35);
  animation: ps-play-pulse 2.6s ease-in-out infinite;
}
@keyframes ps-play-pulse {
  0%, 100% { box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(255, 255, 255, 0.30); }
  50%      { box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 0 7px rgba(255, 255, 255, 0); }
}
.ps-play-glyph { width: 1.05em; height: 1.05em; display: inline-flex; }
.ps-play-glyph svg { width: 100%; height: 100%; }
.ps-play.is-locked {
  background: rgba(14, 16, 26, 0.62);
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  animation: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ps-hint {
  margin: 0;
  font-size: clamp(12px, 1.5vh, 16px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.66);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.ps-hint.is-flash { animation: ps-hint-flash 900ms ease; }
@keyframes ps-hint-flash { 0%, 100% { color: rgba(255, 255, 255, 0.66); } 30% { color: #fca5a5; } }

/* --- Bottom bar ----------------------------------------------------------- */
.ps-bottom {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(32px, 3.4vw, 64px) clamp(18px, 3vh, 34px);
}
.ps-players { display: flex; flex-wrap: wrap; gap: 10px; max-width: 56vw; }
.ps-player {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 8px;
  border-radius: 999px;
  background: rgba(10, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: ps-player-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
@keyframes ps-player-in { from { opacity: 0; transform: translateY(8px); } }
.ps-player-dot {
  width: clamp(22px, 1.8vw, 30px);
  height: clamp(22px, 1.8vw, 30px);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 800;
  color: #fff;
  background: var(--av-c, #6b8afd);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.ps-player-name {
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.ps-player-host {
  font-size: clamp(9px, 0.68vw, 11px);
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0c0d14;
}

.ps-join {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 10px;
  border-radius: 16px;
  background: rgba(10, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.ps-join-qr {
  width: clamp(160px, 23.75vh, 230px);
  height: clamp(160px, 23.75vh, 230px);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  flex-shrink: 0;
}
.ps-join-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.ps-join-qr img:not([src]), .ps-join-qr img[src=""] { visibility: hidden; }
.ps-join-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-join-label {
  font-size: clamp(9px, 0.7vw, 11px);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.ps-join-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(22px, 3.4vh, 34px);
  letter-spacing: 0.14em;
  line-height: 1.05;
  color: #fff;
}
.ps-join-url {
  font-size: clamp(10px, 0.72vw, 12px);
  color: rgba(255, 255, 255, 0.5);
  max-width: 24ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ====================================================================== *
 *  KEY ART SCENES — one full-bleed animated scene per game, all code.
 * ====================================================================== */

/* ---- Coming soon: slate stripes, lock, outlined wordmark ---------------- */
.kv-soon {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 30px),
    radial-gradient(1000px 700px at 70% 30%, hsl(var(--kv-h, 220) 30% 24% / 0.55) 0%, transparent 60%),
    linear-gradient(160deg, hsl(var(--kv-h, 220) 18% 15%) 0%, hsl(var(--kv-h, 220) 24% 6%) 100%);
}
.kv-soon .kv-soon-word {
  position: absolute;
  right: 4%;
  bottom: 10%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17vh;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.09);
}
.kv-soon .kv-lock {
  position: absolute;
  right: 18%;
  top: 26%;
  width: 9vh;
  height: 7.4vh;
  border-radius: 1.6vh;
  background: rgba(255, 255, 255, 0.14);
  animation: kv-float 8s ease-in-out infinite;
}
.kv-soon .kv-lock::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -4.6vh;
  width: 5vh;
  height: 5.4vh;
  transform: translateX(-50%);
  border: 1.3vh solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
  border-radius: 3vh 3vh 0 0;
}
.kv-soon .kv-lock::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 38%;
  width: 1.6vh;
  height: 2.6vh;
  transform: translateX(-50%);
  border-radius: 0.8vh;
  background: rgba(8, 9, 16, 0.6);
}
.kv-soon .kv-soon-chip {
  position: absolute;
  right: 14%;
  top: 58%;
  padding: 1vh 2.2vh;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.7vh;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* Live game with no bespoke key art → a clean branded backdrop (the game's
   accent), so it never reads as "in development". (No color-mix: keep it
   compatible — a missing accent just falls back to the default blue.) */
.kv-generic {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 30px),
    linear-gradient(160deg, #11151f 0%, #070a12 100%);
}
.kv-generic .kv-generic-glow {
  position: absolute;
  right: 15%;
  top: 26%;
  width: 44vh;
  height: 44vh;
  border-radius: 50%;
  background: radial-gradient(circle, var(--kv-accent, #6ea8ff) 0%, transparent 66%);
  opacity: 0.42;
  filter: blur(10px);
  animation: kv-float 9s ease-in-out infinite;
}
.kv-generic .kv-generic-word {
  position: absolute;
  right: 4%;
  bottom: 9%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17vh;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.16);
}
.kv-generic .kv-generic-tag {
  position: absolute;
  left: 6%;
  top: 14%;
  padding: 1vh 2.4vh;
  border-radius: 999px;
  border: 1px solid var(--kv-accent, #6ea8ff);
  font-size: 1.7vh;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kv-accent, #6ea8ff);
  background: rgba(8, 10, 16, 0.4);
}

/* --- Narrow / odd aspect fallbacks --------------------------------------- */
@media (max-aspect-ratio: 4/3) {
  .ps-hero-inner { max-width: 80vw; }
  .ps-players { max-width: 44vw; }
}

/* ====================================================================== *
 *  LANDING — CONSOLE PRODUCT PAGE
 *
 *  PS5/Xbox-grade presentation: cinematic dark base, one restrained
 *  accent, massive display type, generous vertical rhythm, scroll
 *  reveals. The hero "product shot" is a CSS miniature of the actual
 *  console home (rail + ring + hero) on a TV, with a phone controller
 *  in front — the landing shows the real product, not an illustration.
 *
 *  Namespace: .cl-   Built by static markup + small JS init in screen.js
 *  (games row + mini rail reuse the launcher's TILE_ART builders).
 * ====================================================================== */

.view-landing {
  --cl-accent: #2f7cf6;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  background: #07080d;
  color: #f4f6fb;
  scroll-behavior: smooth;
  font-family: var(--font-body);
}
.view-landing::-webkit-scrollbar { width: 10px; }
.view-landing::-webkit-scrollbar-track { background: transparent; }
.view-landing::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.07); border-radius: 5px; }

/* Scroll reveal */
.cl-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cl-reveal.is-in { opacity: 1; transform: none; }

/* --- CTAs ---------------------------------------------------------------- */
.cl-cta {
  font: inherit;
  font-weight: 700;
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: 0.01em;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 120ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.cl-cta:active { transform: scale(0.97); }
.cl-cta-primary {
  background: #fff;
  color: #0a0b10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.cl-cta-primary:hover { background: #e9edf6; box-shadow: 0 10px 34px rgba(47, 124, 246, 0.25); }
.cl-cta-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.cl-cta-ghost:hover { border-color: rgba(255, 255, 255, 0.6); }
.cl-cta-lg { padding: 16px 44px; font-size: clamp(15px, 1.2vw, 19px); }

/* --- Nav ------------------------------------------------------------------ */
.cl-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 clamp(20px, 5vw, 80px);
  background: rgba(7, 8, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cl-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #f4f6fb;
}
.cl-brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.cl-brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.66);
}
.cl-brand-name em { font-style: normal; font-weight: 700; color: #fff; }
.cl-links { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 44px); }
.cl-links a {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  transition: color 140ms ease;
}
.cl-links a:hover { color: #fff; }
.cl-cta-nav { padding: 10px 22px; background: #fff; color: #0a0b10; }
.cl-cta-nav:hover { background: #e9edf6; }

/* --- Hero ------------------------------------------------------------------ */
.cl-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(72px, 12vh, 130px) clamp(20px, 6vw, 90px) 0;
  isolation: isolate;
}
.cl-hero::before {
  content: '';
  position: absolute;
  inset: -72px 0 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 50% 0%, rgba(47, 124, 246, 0.16), transparent 65%),
    radial-gradient(1200px 700px at 50% 110%, rgba(47, 124, 246, 0.08), transparent 60%);
  pointer-events: none;
}
.cl-eyebrow {
  margin: 0 0 22px;
  font-size: clamp(11px, 0.85vw, 13px);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}
.cl-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 6.6vw, 94px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 16ch;
}
.cl-sub {
  margin: 26px 0 0;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
  max-width: 58ch;
}
.cl-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Hero product shot: the console home on a TV + phone ------------------ */
.cl-stage {
  position: relative;
  margin: clamp(64px, 9vh, 110px) auto 0;
  width: min(900px, 82vw);
  isolation: isolate;
}
.cl-stage-glow {
  position: absolute;
  left: 50%;
  bottom: -14%;
  width: 86%;
  height: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(47, 124, 246, 0.30), transparent 65%);
  filter: blur(54px);
  z-index: -1;
  pointer-events: none;
}
.cl-tv {
  border-radius: 18px;
  background: #0b0c13;
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: clamp(7px, 0.9vw, 12px);
  box-shadow: 0 50px 120px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.cl-tv-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  /* a deep-indigo key-art palette, condensed */
  background:
    radial-gradient(70% 80% at 74% 26%, rgba(91, 70, 192, 0.55) 0%, transparent 60%),
    linear-gradient(135deg, #251d56 0%, #131032 55%, #0a0820 100%);
}
.cl-tv-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 5, 11, 0.7) 0%, rgba(4, 5, 11, 0.25) 40%, transparent 65%),
    linear-gradient(180deg, rgba(4, 5, 11, 0.45) 0%, transparent 26%, transparent 60%, rgba(4, 5, 11, 0.7) 100%);
  pointer-events: none;
}
.cl-tv-foot {
  width: 26%;
  height: clamp(5px, 0.7vw, 9px);
  margin: clamp(8px, 1vw, 14px) auto 0;
  border-radius: 999px;
  background: #0b0c13;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Miniature console home inside the TV */
.cl-mini {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 4.5% 5.5%;
  text-align: left;
}
.cl-mini-top { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 22px); }
.cl-mini-tab {
  font-weight: 700;
  font-size: clamp(9px, 1.1vw, 14px);
  color: #fff;
}
.cl-mini-tab.is-dim { color: rgba(255, 255, 255, 0.42); }
.cl-mini-clock {
  margin-left: auto;
  font-weight: 600;
  font-size: clamp(8px, 1vw, 13px);
  color: rgba(255, 255, 255, 0.85);
}
.cl-mini-rail {
  --ps-tile: clamp(30px, 4.4vw, 58px);
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.7vw, 9px);
  margin-top: 5%;
  padding: 8px 2px;
}
.cl-mini-tile {
  position: relative;
  flex: 0 0 var(--ps-tile);
  width: var(--ps-tile);
  height: var(--ps-tile);
  border-radius: clamp(5px, 0.7vw, 9px);
  overflow: hidden;
  opacity: 0.85;
}
.cl-mini-tile.is-focus {
  transform: scale(1.26);
  margin: 0 calc(var(--ps-tile) * 0.14);
  opacity: 1;
  box-shadow:
    0 0 0 1.5px rgba(7, 8, 15, 0.9),
    0 0 0 3.5px #fff,
    0 0 14px 3px rgba(255, 255, 255, 0.35);
}
.cl-mini-hero {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(4px, 0.8vw, 11px);
  padding-bottom: 1%;
}
.cl-mini-chip {
  font-size: clamp(6px, 0.78vw, 10px);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.4em 1.1em;
  border-radius: 999px;
  background: rgba(47, 124, 246, 0.32);
  border: 1px solid rgba(110, 160, 250, 0.55);
}
.cl-mini-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 3vw, 42px);
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
}
.cl-mini-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.3em;
  padding: 0.45em 1.5em;
  border-radius: 999px;
  background: #fff;
  color: #0c0d14;
  font-weight: 800;
  font-size: clamp(8px, 1.05vw, 14px);
}

/* Phone controller leaning in front of the TV */
.cl-phone {
  position: absolute;
  right: -2%;
  bottom: -9%;
  width: clamp(96px, 12vw, 158px);
  aspect-ratio: 9 / 18.6;
  border-radius: clamp(14px, 1.8vw, 24px);
  background: #0b0c13;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 36px 80px -10px rgba(0, 0, 0, 0.8);
  transform: rotate(7deg);
  padding: 6%;
  z-index: 3;
}
.cl-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: clamp(8px, 1vw, 14px);
  background: linear-gradient(180deg, #11131f 0%, #0a0b13 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14% 10%;
  gap: 12%;
}
.cl-phone-pill {
  width: 56%;
  height: 5%;
  border-radius: 999px;
  background: rgba(47, 124, 246, 0.45);
}
.cl-dpad {
  position: relative;
  width: 64%;
  aspect-ratio: 1;
  margin-top: 8%;
}
.cl-dpad i {
  position: absolute;
  width: 30%;
  height: 30%;
  border-radius: 18%;
  background: #1d2030;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cl-dpad i:nth-child(1) { left: 35%; top: 0; }
.cl-dpad i:nth-child(2) { left: 35%; bottom: 0; }
.cl-dpad i:nth-child(3) { left: 0; top: 35%; }
.cl-dpad i:nth-child(4) { right: 0; top: 35%; }
.cl-dpad b {
  position: absolute;
  left: 36%;
  top: 36%;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: #262a3d;
}
.cl-phone-start {
  margin-top: auto;
  padding: 0.55em 2em;
  border-radius: 999px;
  background: #fff;
  color: #0c0d14;
  font-weight: 800;
  font-size: clamp(7px, 0.8vw, 11px);
  letter-spacing: 0.14em;
}

/* --- Sections (shared rhythm) ---------------------------------------------- */
.cl-section {
  padding: clamp(88px, 13vh, 150px) clamp(20px, 6vw, 90px);
}
.cl-sec-head { text-align: center; margin-bottom: clamp(40px, 6vh, 72px); }
.cl-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: #fff;
}
.cl-sec-sub {
  margin: 14px 0 0;
  font-size: clamp(14px, 1.15vw, 18px);
  color: rgba(255, 255, 255, 0.6);
}

/* --- Feature pillars --------------------------------------------------------- */
.cl-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}
.cl-feature { text-align: center; }
.cl-feature:nth-child(2) { transition-delay: 90ms; }
.cl-feature:nth-child(3) { transition-delay: 180ms; }
.cl-feature-icon {
  width: clamp(30px, 2.6vw, 40px);
  height: clamp(30px, 2.6vw, 40px);
  margin: 0 auto 20px;
  color: var(--cl-accent);
  display: flex;
}
.cl-feature-icon svg { width: 100%; height: 100%; }
.cl-feature h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(19px, 1.7vw, 26px);
  letter-spacing: -0.01em;
  color: #fff;
}
.cl-feature p {
  margin: 0 auto;
  font-size: clamp(13.5px, 1.05vw, 16px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  max-width: 34ch;
}

/* --- Games showcase ----------------------------------------------------------- */
.cl-section-games {
  background: #0a0c13;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cl-games-row {
  display: flex;
  gap: clamp(14px, 1.6vw, 24px);
  overflow-x: auto;
  padding: 8px 4px 18px;
  max-width: 1280px;
  margin: 0 auto;
  scrollbar-width: none;
}
.cl-games-row::-webkit-scrollbar { display: none; }
.cl-game {
  flex: 0 0 clamp(140px, 14.5vw, 200px);
  display: flex;
  flex-direction: column;
}
.cl-game-art {
  --ps-tile: clamp(140px, 14.5vw, 200px);
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease;
}
.cl-game:hover .cl-game-art {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.6);
}
.cl-game.is-soon .cl-game-art { filter: saturate(0.4); opacity: 0.8; }
.cl-game-name {
  margin-top: 14px;
  font-weight: 700;
  font-size: clamp(14px, 1.1vw, 17px);
  color: #fff;
}
.cl-game-tag {
  margin-top: 3px;
  font-size: clamp(11.5px, 0.85vw, 13px);
  color: rgba(255, 255, 255, 0.52);
}

/* --- How it works --------------------------------------------------------------- */
.cl-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}
.cl-step { text-align: center; }
.cl-step:nth-child(2) { transition-delay: 90ms; }
.cl-step:nth-child(3) { transition-delay: 180ms; }
.cl-step-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 5vw, 76px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.22);
  margin-bottom: 18px;
}
.cl-step h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 1.6vw, 24px);
  color: #fff;
}
.cl-step p {
  margin: 0 auto;
  font-size: clamp(13.5px, 1.05vw, 16px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  max-width: 32ch;
}

/* --- Spec strip ------------------------------------------------------------------- */
.cl-spec {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: clamp(44px, 6vh, 64px) clamp(20px, 6vw, 90px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}
.cl-spec-item { text-align: center; }
.cl-spec-item b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 58px);
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}
.cl-spec-item span {
  display: block;
  margin-top: 10px;
  font-size: clamp(10px, 0.8vw, 12.5px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
}

/* --- Closer ----------------------------------------------------------------------- */
.cl-closer {
  position: relative;
  padding: clamp(110px, 17vh, 190px) clamp(20px, 6vw, 90px);
  text-align: center;
  isolation: isolate;
}
.cl-closer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(700px 380px at 50% 60%, rgba(47, 124, 246, 0.14), transparent 65%);
  pointer-events: none;
}
.cl-closer .cl-cta { margin-top: 36px; }

/* --- Footer ----------------------------------------------------------------------- */
.cl-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px clamp(20px, 6vw, 90px) 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.42);
}
.cl-foot-r { display: flex; gap: 26px; }

/* --- Narrow collapse ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .cl-links { display: none; }
  .cl-feature-grid, .cl-steps { grid-template-columns: 1fr; gap: 44px; }
  .cl-spec { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .cl-phone { display: none; }
  .cl-h1 { max-width: 12ch; }
}

/* ====================================================================== *
 *  IN-DEVELOPMENT GAMES — tile art + key art scenes.
 *  Real repos in the pipeline (kart, olympics, color cards, duel
 *  shooter). Shown locked on the rail, but with proper visuals instead
 *  of the generic coming-soon slate.
 * ====================================================================== */

/* --- Car Football: tile -------------------------------------------------- */
.pa-carfb {
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(52, 211, 153, 0.22), transparent 55%),
    linear-gradient(180deg, #0d4a2c 0%, #062a18 100%);
}
.pa-carfb .fb-circle {
  position: absolute;
  left: 50%; top: 50%;
  width: 48%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
}
.pa-carfb .fb-line {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.24);
}
.pa-carfb .fb-ball {
  position: absolute;
  left: 50%; top: 50%;
  width: 24%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #ffd27a 45%, #ff8a3d 100%);
  box-shadow: 0 0 14px rgba(255, 170, 80, 0.75);
}
.pa-carfb .fb-car {
  position: absolute;
  width: 24%; height: 13%;
  border-radius: 26%;
}
.pa-carfb .fb-car-l { left: 9%;  bottom: 16%; background: #3b82f6; transform: rotate(16deg);  box-shadow: 0 0 10px rgba(59, 130, 246, 0.7); }
.pa-carfb .fb-car-r { right: 9%; top: 14%;    background: #f97316; transform: rotate(16deg);  box-shadow: 0 0 10px rgba(249, 115, 22, 0.7); }

/* --- Car Football: key art ------------------------------------------------ */
.kv-carfb {
  background:
    radial-gradient(900px 520px at 72% 16%, rgba(110, 231, 183, 0.16), transparent 60%),
    linear-gradient(180deg, #052315 0%, #0d4a2c 55%, #04200f 100%);
}
.kv-carfb .cf-beam {
  position: absolute;
  top: -12%;
  width: 15vw; height: 72vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 75%);
  transform: skewX(-13deg);
  filter: blur(8px);
}
.kv-carfb .cf-b1 { right: 12%; }
.kv-carfb .cf-b2 { right: 38%; transform: skewX(11deg); }
.kv-carfb .cf-circle {
  position: absolute;
  left: 64%; top: 58%;
  width: 36vh; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0.6vh solid rgba(255, 255, 255, 0.20);
  border-radius: 50%;
}
.kv-carfb .cf-mid {
  position: absolute;
  left: 64%; top: 0; bottom: 0;
  width: 0.6vh;
  background: rgba(255, 255, 255, 0.13);
}
.kv-carfb .cf-ball {
  position: absolute;
  left: 60%; top: 38%;
  width: 14vh; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #ffd27a 45%, #ff8a3d 100%);
  box-shadow: 0 0 56px rgba(255, 170, 80, 0.6);
  animation: cf-ball-bounce 2.6s ease-in-out infinite;
}
@keyframes cf-ball-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7vh); }
}
.kv-carfb .cf-shadow {
  position: absolute;
  left: 60.5%; top: 56%;
  width: 13vh; height: 2.6vh;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(6px);
  animation: cf-shadow-pulse 2.6s ease-in-out infinite;
}
@keyframes cf-shadow-pulse { 50% { transform: scale(0.68); opacity: 0.55; } }
.kv-carfb .cf-car {
  position: absolute;
  width: 13vh; height: 5.4vh;
  border-radius: 1.7vh;
  animation: kv-float 5s ease-in-out var(--d, 0s) infinite;
}
.kv-carfb .cf-car::before {
  content: '';
  position: absolute;
  left: 28%; top: -36%;
  width: 44%; height: 58%;
  border-radius: 1vh 1.7vh 0.4vh 0.4vh;
  background: rgba(10, 16, 26, 0.85);
}
.kv-carfb .cf-car::after {
  content: '';
  position: absolute;
  top: 26%; right: 100%;
  width: 18vh; height: 46%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--tr));
  filter: blur(2px);
}
.kv-carfb .cf-car-blue   { left: 38%; bottom: 14%; background: linear-gradient(180deg, #60a5fa, #1d4ed8); --tr: rgba(96, 165, 250, 0.7); transform: rotate(-4deg); }
.kv-carfb .cf-car-orange { right: 5%; bottom: 30%; background: linear-gradient(180deg, #fb923c, #c2410c); --tr: rgba(251, 146, 60, 0.7); transform: rotate(5deg) scaleX(-1); --d: -2s; }

/* --- Football (on-foot): tile art ------------------------------------------ */
.pa-football {
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(74, 222, 128, 0.22), transparent 55%),
    linear-gradient(180deg, #157a3f 0%, #0a3f21 100%);
}
.pa-football .ft-circle {
  position: absolute;
  left: 50%; top: 50%;
  width: 50%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
}
.pa-football .ft-line {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.26);
}
.pa-football .ft-ball {
  position: absolute;
  left: 50%; top: 50%;
  width: 30%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff 0%, #e8edf2 62%, #c3ccd6 100%);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.45), inset 0 0 0 1.5px rgba(0, 0, 0, 0.08);
}
.pa-football .ft-ball::before {        /* the soccer-ball pentagon */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 42%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: #14181f;
  clip-path: polygon(50% 4%, 94% 36%, 77% 92%, 23% 92%, 6% 36%);
}

/* --- Pool / billiards: tile art -------------------------------------------- */
.pa-pool {
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% 28%, rgba(16, 122, 72, 0.55), transparent 62%),
    linear-gradient(180deg, #0c5a34 0%, #05381f 100%);
}
.pa-pool .pl-felt {                    /* table rail */
  position: absolute;
  inset: 15%;
  border: 3px solid rgba(120, 78, 44, 0.9);
  border-radius: 14%;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
}
.pa-pool .pl-ball {
  position: absolute;
  width: 19%; aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.55);
}
.pa-pool .pl-ball::after {             /* specular highlight */
  content: "";
  position: absolute;
  left: 24%; top: 18%;
  width: 30%; aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}
.pa-pool .pl-b1 { left: 28%; top: 30%; background: radial-gradient(circle at 62% 62%, #fbbf24, #d97706); }
.pa-pool .pl-b2 { left: 50%; top: 46%; background: radial-gradient(circle at 62% 62%, #ef4444, #b91c1c); }
.pa-pool .pl-b8 { left: 37%; top: 58%; background: radial-gradient(circle at 62% 62%, #2b2f36, #0b0e12); }
.pa-pool .pl-b8::before {              /* the white "8" disc */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 46%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #f3f4f6;
  z-index: 1;
}
.pa-pool .pl-cue {
  position: absolute;
  right: 4%; top: 6%;
  width: 66%; height: 4%;
  transform: rotate(34deg);
  transform-origin: right center;
  border-radius: 3px;
  background: linear-gradient(90deg, #f5e6c8 0%, #c89b5a 28%, #6b4a23 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ====================================================================== *
 *  CAR FOOTBALL — screen view. Vendored Three.js game in an iframe
 *  (games/carfootball/). Full-bleed frame + corner "now playing" pill,
 *  same chrome as Drive/Glitch. Interactive until the phone controller
 *  + input firewall land. Football-green accent.
 * ====================================================================== */
.view-carfb {
  padding: 0;
  gap: 0;
  background: #04150d;
  position: relative;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}
.cfb-screen-header {
  position: absolute;
  top: clamp(0.6rem, 1.2vh, 1.4rem);
  left: clamp(0.8rem, 1.5vw, 1.6rem);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.cfb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(9px, 0.7vw, 11px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  color: #34d399;
}
.cfb-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.cfb-player-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.05vw, 1.2rem);
  color: var(--fg);
}
.cfb-stage { position: absolute; inset: 0; }
.cfb-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #04150d;
  display: block;
  /* Interactive for now (no phone controller yet). The input firewall
     that makes only phone events drive the game arrives next pass. */
  pointer-events: auto;
}
.cfb-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.7);
  z-index: 20;
}
.cfb-over-eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.78rem, 0.9vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #34d399;
}
.cfb-over-hint { font-family: var(--font-body); color: var(--fg-dim); margin: 0; }

/* Woods — full-bleed first-person forest iframe (played on the screen). */
.view-woods {
  padding: 0;
  gap: 0;
  background: #060b08;
  position: relative;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}
.woods-stage { position: absolute; inset: 0; }
.woods-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #060b08;
  display: block;
  pointer-events: auto;   /* keyboard/mouse drive the game directly (no phone pad yet) */
}
.woods-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.74);
  z-index: 20;
}
.woods-over-eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.78rem, 0.9vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #5ba36b;
}
.woods-over-hint { font-family: var(--font-body); color: var(--fg-dim); margin: 0; }

/* CardBluff — vendored card game iframe (plays on the screen; no phone pad yet) */
.view-cardbluff {
  padding: 0; gap: 0; background: #0a1830;
  position: relative; overflow: hidden;
  justify-content: center; align-items: center;
}
.cardbluff-stage { position: absolute; inset: 0; }
.cardbluff-frame {
  width: 100%; height: 100%; border: 0; background: #0a1830; display: block;
  pointer-events: auto;   /* mouse/touch drive the game directly (no phone pad yet) */
}
.cardbluff-over {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  background: rgba(0, 0, 0, 0.74);
}
.cardbluff-over-eyebrow {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(0.78rem, 0.9vw, 1rem); letter-spacing: 0.22em; text-transform: uppercase;
  color: #f0a81e;
}
.cardbluff-over-hint { font-family: var(--font-body); color: var(--fg-dim); margin: 0; }

/* Woods — launcher tile art: moonlit conifer silhouettes. */
.pa-woods {
  background:
    radial-gradient(60% 50% at 78% 22%, rgba(150, 200, 170, 0.18), transparent 60%),
    linear-gradient(180deg, #0e2018 0%, #050d09 100%);
}
.pa-woods .wd-moon {
  position: absolute;
  right: 16%; top: 14%;
  width: 22%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #eef7ee, #b9d4c0 70%, #8fae9a 100%);
  box-shadow: 0 0 18px rgba(200, 230, 210, 0.55);
}
.pa-woods .wd-tree {
  position: absolute;
  bottom: 4%;
  width: 26%;
  background: linear-gradient(180deg, #1c3a2a, #0a1a12);
  clip-path: polygon(50% 0%, 76% 34%, 62% 34%, 88% 66%, 70% 66%, 100% 100%, 0% 100%, 30% 66%, 12% 66%, 38% 34%, 24% 34%);
}
.pa-woods .wd-t1 { left: 4%;  height: 58%; opacity: 0.95; }
.pa-woods .wd-t2 { left: 36%; height: 74%; }
.pa-woods .wd-t3 { left: 68%; height: 52%; opacity: 0.9; }
.pa-woods .wd-fog {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(140, 170, 150, 0.22));
}

/* Nulmire — vendored "Abandoned House" first-person horror in an iframe. */
.view-nulmire {
  padding: 0;
  gap: 0;
  background: #060406;
  position: relative;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}
.nulmire-stage { position: absolute; inset: 0; }
.nulmire-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #060406;
  display: block;
  pointer-events: none;   /* phone is the only controller — no native input on the screen */
}

/* Trivia Quest — full-bleed, display-only board. All play happens on the phones
   (Kahoot-style), so the screen iframe ignores pointer input entirely. */
.view-trivia {
  padding: 0;
  gap: 0;
  background: #2e2548;
  position: relative;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}
.trivia-stage { position: absolute; inset: 0; }
.trivia-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #2e2548;
  display: block;
  pointer-events: none;
}
.nulmire-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.78);
  z-index: 20;
}
.nulmire-over-eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.78rem, 0.9vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b0413e;
}
.nulmire-over-hint { font-family: var(--font-body); color: var(--fg-dim); margin: 0; }

/* Nulmire — launcher tile art: a haunted house under a blood moon. */
.pa-nulmire {
  background:
    radial-gradient(55% 45% at 74% 20%, rgba(190, 80, 70, 0.22), transparent 60%),
    linear-gradient(180deg, #20090b 0%, #060305 100%);
}
.pa-nulmire .nm-moon {
  position: absolute;
  right: 16%; top: 13%;
  width: 20%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #f3c9bd, #d07767 64%, #99403a 100%);
  box-shadow: 0 0 22px rgba(200, 90, 80, 0.55);
}
.pa-nulmire .nm-house {
  position: absolute;
  left: 24%; bottom: 6%;
  width: 52%; height: 56%;
  background: linear-gradient(180deg, #1a1416, #070405);
  clip-path: polygon(0% 38%, 50% 0%, 100% 38%, 100% 100%, 0% 100%);
}
.pa-nulmire .nm-win {
  position: absolute;
  width: 8%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 45%, #ffd27a, #c8861f 70%, #5a3a0c 100%);
  box-shadow: 0 0 10px rgba(255, 190, 110, 0.6);
}
.pa-nulmire .nm-w1 { left: 34%; bottom: 36%; }
.pa-nulmire .nm-w2 { right: 34%; bottom: 36%; }
.pa-nulmire .nm-door {
  position: absolute;
  left: 47%; bottom: 6%;
  width: 6%; height: 18%;
  background: linear-gradient(180deg, #3a2410, #160c04);
  border-radius: 3px 3px 0 0;
}
.pa-nulmire .nm-fog {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(150, 90, 90, 0.22));
}

/* HyperDrive — vendored 2-player Three.js + Rapier racer in an iframe. */
.view-hyper {
  padding: 0;
  gap: 0;
  background: #05080f;
  position: relative;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}
.hyper-stage { position: absolute; inset: 0; }
.hyper-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #05080f;
  display: block;
  pointer-events: none;   /* phones are the only controllers — no native input on the screen */
}
.hyper-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.76);
  z-index: 20;
}
.hyper-over-eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.78rem, 0.9vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3aa0ff;
}
.hyper-over-hint { font-family: var(--font-body); color: var(--fg-dim); margin: 0; }
.hyper-paused {
  position: absolute; inset: 0; z-index: 18;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 15, 0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.hyper-paused span {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3rem, 9vw, 7rem); letter-spacing: 0.3em; color: #eaf4ff;
  text-shadow: 0 0 40px rgba(58, 160, 255, 0.55);
}

/* HyperDrive — launcher tile art: two cars on a sunset highway. */
.pa-hyper { background: linear-gradient(180deg, #1a2740 0%, #0a1020 100%); overflow: hidden; }
.pa-hyper .hy-sky {
  position: absolute; left: 0; right: 0; top: 0; height: 56%;
  background: linear-gradient(180deg, #ff8a4c 0%, #c64f8e 45%, #3b3a78 100%);
}
.pa-hyper .hy-sun {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%);
  width: 26%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #ffe39a, #ff9d4d 70%, transparent 72%);
  filter: blur(0.5px);
}
.pa-hyper .hy-road {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(180deg, #2a2f3a 0%, #14171f 100%);
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
}
.pa-hyper .hy-lane {
  position: absolute; left: 50%; bottom: 0; height: 46%; width: 3%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, #ffd84a 0 14%, transparent 14% 28%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
}
.pa-hyper .hy-car {
  position: absolute; bottom: 9%; width: 20%; height: 12%; border-radius: 5px 5px 3px 3px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
.pa-hyper .hy-car-l { left: 20%; background: linear-gradient(180deg, #5ab0ff, #1c6fd0); }
.pa-hyper .hy-car-r { right: 20%; bottom: 6%; width: 22%; height: 13%; background: linear-gradient(180deg, #ff7a5a, #d23b2c); }

/* Car Football — TV match-setup card (over the orbiting-stadium menu). */
.cfb-setup {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.4vh, 16px);
  text-align: center;
  background: radial-gradient(120% 100% at 50% 50%, rgba(4, 21, 13, 0.35), rgba(4, 21, 13, 0.78));
  pointer-events: none;
}
.cfb-setup-eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(11px, 1vw, 15px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #34d399;
}
.cfb-setup-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vh, 64px);
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}
.cfb-setup-rows {
  display: flex;
  gap: clamp(14px, 2vw, 32px);
  margin-top: clamp(6px, 1.4vh, 16px);
}
.cfb-setup-row {
  min-width: clamp(110px, 12vw, 160px);
  padding: clamp(12px, 1.8vh, 20px) clamp(14px, 1.6vw, 24px);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cfb-setup-k {
  font-size: clamp(10px, 0.8vw, 13px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.cfb-setup-v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3vh, 34px);
  color: #fff;
}
.cfb-setup-hint {
  margin: clamp(8px, 1.6vh, 18px) 0 0;
  font-size: clamp(13px, 1.1vw, 17px);
  color: rgba(255, 255, 255, 0.62);
}

/* Car Football — "select sides" board, modelled 1:1 on the PES screen:
   a dark HOME | AWAY header bar, a translucent light panel over the pitch
   with Home pinned to the far left and Away to the far right, and a slim
   legend bar along the bottom. The live stadium shows around the card. */
.cfb-sides {
  position: absolute;
  inset: clamp(14px, 4vh, 42px) clamp(20px, 5vw, 90px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
/* the dark navy title bar */
.cfb-sides-bar {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #10142a, #0b0e1e);
  border-bottom: 2px solid rgba(120, 150, 230, 0.28);
}
.cfb-sides-bar-side {
  flex: 1 1 50%;
  padding: clamp(8px, 1.5vh, 16px) clamp(20px, 4vw, 64px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 2vw, 30px);
  letter-spacing: 0.06em;
  color: #fff;
}
.cfb-sides-bar-home { text-align: left; }
.cfb-sides-bar-away { text-align: right; }
.cfb-sides-bar::after {              /* faint centre divider, like the screen */
  content: ""; position: absolute; top: 22%; bottom: 22%; left: 50%;
  width: 1px; background: rgba(255, 255, 255, 0.12);
}
/* the translucent light "pitch" panel: Home left edge, Away right edge */
.cfb-sides-pitch {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(14px, 3vh, 34px) clamp(20px, 4vw, 70px);
  background:
    linear-gradient(180deg, rgba(232, 238, 222, 0.10), rgba(214, 224, 200, 0.07)),
    rgba(238, 244, 228, 0.06);
  backdrop-filter: blur(2px) brightness(1.04);
  -webkit-backdrop-filter: blur(2px) brightness(1.04);
}
.cfb-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(10px, 2vh, 22px);
}
.cfb-side-home { align-items: flex-start; }
.cfb-side-away { align-items: flex-end; }

/* one slot = P-tag + name stacked over the phone+chevron row */
.cfb-slot {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.5vh, 5px);
}
.cfb-side-home .cfb-slot { align-items: flex-start; }
.cfb-side-away .cfb-slot { align-items: flex-end; }
.cfb-slot-row {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
}
.cfb-slot-tag {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(16px, 1.7vw, 26px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px color-mix(in srgb, currentColor 55%, transparent);
}
.cfb-slot-name {
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14ch;
}
.cfb-slot.empty { opacity: 0.9; }
/* the inward-pointing chevron next to each filled slot */
.cfb-chev {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 0.7;
  color: color-mix(in srgb, var(--pc) 85%, #fff);
  text-shadow: 0 0 16px color-mix(in srgb, var(--pc) 60%, transparent);
}

/* horizontal phone (landscape) with our game buttons — controller stand-in */
.cfb-phone-ic {
  position: relative;
  flex-shrink: 0;
  width: clamp(74px, 7vw, 116px);
  height: clamp(40px, 3.9vw, 64px);
  border-radius: clamp(9px, 0.9vw, 14px);
  background: linear-gradient(180deg, #2c3447, #141a26);
  border: 2px solid var(--pc, #fff);
  box-shadow: 0 0 20px color-mix(in srgb, var(--pc) 50%, transparent),
              0 6px 16px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13%;
}
.cfb-phone-ic.is-ghost {                 /* empty position — plain grey phone */
  background: linear-gradient(180deg, rgba(120, 130, 150, 0.5), rgba(80, 90, 110, 0.42));
  border-color: rgba(190, 200, 215, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.cfb-phone-stick {
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12));
  border: 1.5px solid color-mix(in srgb, var(--pc, #fff) 70%, #fff);
}
.cfb-phone-ic.is-ghost .cfb-phone-stick { border-color: rgba(225, 230, 240, 0.6); }
.cfb-phone-acts { display: flex; flex-direction: column; gap: 16%; }
.cfb-phone-acts i {
  display: block;
  width: clamp(8px, 0.85vw, 13px);
  height: clamp(8px, 0.85vw, 13px);
  border-radius: 50%;
  background: var(--pc, #fff);
  box-shadow: 0 0 7px color-mix(in srgb, var(--pc, #fff) 60%, transparent);
}
.cfb-phone-ic.is-ghost .cfb-phone-acts i {
  background: rgba(225, 230, 240, 0.7); box-shadow: none;
}
/* slim legend bar along the bottom */
.cfb-sides-legend {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 20px);
  padding: clamp(7px, 1.3vh, 13px) clamp(16px, 3vw, 40px);
  background: linear-gradient(180deg, #0b0e1e, #10142a);
  border-top: 1px solid rgba(120, 150, 230, 0.22);
}
.cfb-legend-item {
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cfb-legend-key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: clamp(34px, 3vw, 46px);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-display); font-weight: 800; font-size: 0.86em;
  color: rgba(255, 255, 255, 0.9);
}
.cfb-legend-key.cfb-legend-go { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); min-width: 0; padding: 2px 9px; }
.cfb-legend-sep { width: 1px; height: 1.2em; background: rgba(255, 255, 255, 0.16); }

/* ---------------- POOL (8-ball iframe) ---------------- */
.view-pool {
  padding: 0; gap: 0; background: #0a0c10;
  position: relative; overflow: hidden;
  justify-content: center; align-items: center;
}
.pool-stage { position: absolute; inset: 0; }
.pool-frame {
  width: 100%; height: 100%; border: 0; background: #0a0c10; display: block;
  pointer-events: none;   /* only the phone drives the game */
}
.pool-over {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  background: rgba(0, 0, 0, 0.7);
}
.pool-over-eyebrow {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: 0.22em; text-transform: uppercase; color: #7fd1ff;
}
.pool-over-hint { font-family: var(--font-body); color: var(--fg-dim); margin: 0; }
/* === Football (screen) ================================================== */
.view-football { padding: 0; }
.fb-stage { position: relative; width: 100%; height: 100%; background: #05070d; overflow: hidden; }
.fb-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.fb-ov {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; text-align: center; color: #eaf0fb;
  background: radial-gradient(120% 90% at 50% 28%, rgba(6, 10, 20, 0.74), rgba(4, 6, 12, 0.93));
}
.fb-ov-eyebrow { margin: 0; letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.85rem; color: #8fb0e8; }
.fb-ov-title { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; }
.fb-ov-hint { margin: 0; color: #93a0bd; font-size: 1rem; }

.fb-sides-cols { display: flex; gap: 22px; }
.fb-side { min-width: 220px; padding: 18px; border-radius: 18px; border: 1px solid rgba(140, 170, 225, 0.18); background: rgba(12, 18, 32, 0.5); }
.fb-side-home { border-color: rgba(216, 31, 51, 0.5); }
.fb-side-away { border-color: rgba(23, 105, 255, 0.5); }
.fb-side-h { font-weight: 800; letter-spacing: 0.12em; margin-bottom: 12px; color: #c7d2e6; }
.fb-side-home .fb-side-h { color: #ff6b78; }
.fb-side-away .fb-side-h { color: #6ea8ff; }
.fb-side-list { display: flex; flex-direction: column; gap: 8px; min-height: 64px; }
.fb-tok { display: inline-block; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-weight: 600; }

.fb-teams-cards { display: flex; align-items: center; gap: 26px; }
.fb-team-card { min-width: 240px; padding: 24px; border-radius: 18px; border: 1px solid rgba(140, 170, 225, 0.2); background: rgba(12, 18, 32, 0.5); }
.fb-team-home { border-color: rgba(216, 31, 51, 0.5); }
.fb-team-away { border-color: rgba(23, 105, 255, 0.5); }
.fb-team-side { letter-spacing: 0.14em; font-weight: 800; color: #93a0bd; margin-bottom: 10px; }
.fb-team-name { font-size: 1.8rem; font-weight: 800; }
.fb-team-vs { color: #93a0bd; font-weight: 700; }

.fb-menu-opts { display: flex; flex-direction: column; gap: 12px; }
.fb-menu-opt { padding: 12px 40px; border-radius: 14px; border: 1px solid rgba(140, 170, 225, 0.18); font-weight: 700; font-size: 1.2rem; color: #c7d2e6; }
.fb-menu-opt.sel { background: rgba(77, 155, 255, 0.22); border-color: rgba(120, 180, 255, 0.7); color: #fff; box-shadow: 0 0 22px rgba(80, 150, 255, 0.35); }

/* P2P status badge — bottom-left; shown (green) only while a controller is on a
   direct WebRTC channel, hidden when everything is on the server relay. */
.p2p-badge {
  position: fixed;
  left: 14px; bottom: 14px;
  z-index: 9999;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(8, 10, 18, 0.62);
  border: 1px solid rgba(74, 222, 128, 0.4);
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(10px, 0.85vw, 13px); letter-spacing: 0.14em; text-transform: uppercase;
  color: #4ade80;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.p2p-badge .p2p-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 9px rgba(74, 222, 128, 0.9);
}

/* ============================================================
   Weak-network warning (big screen) — a red wifi badge pinned
   to the top centre that pulses ("comes and goes") whenever a
   player's link gets laggy enough to feel, or the screen's own
   socket drops. Platform-wide; hidden while links are healthy.
   ============================================================ */
.net-warn {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 14px; border-radius: 999px;
  background: rgba(40, 8, 12, 0.74);
  border: 1px solid rgba(248, 84, 84, 0.55);
  color: #ff5a5a;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(12px, 1vw, 16px); letter-spacing: 0.1em; text-transform: uppercase;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  animation: net-warn-pulse 1.1s ease-in-out infinite;
}
.net-warn[hidden] { display: none !important; }
.net-warn-ico { width: clamp(20px, 1.6vw, 26px); height: clamp(20px, 1.6vw, 26px); flex: 0 0 auto; }
.net-warn-txt { white-space: nowrap; }
@keyframes net-warn-pulse {
  0%, 100% { opacity: 0.32; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .net-warn { animation: none; opacity: 1; } }

/* === Console boot/intro splash ========================================
   The uploaded PORT AND PLAY logo fades up on a black field while the
   opening sound plays, then the whole overlay clears to reveal the
   game-selection screen. Shown on platform open and on return from a game. */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;                 /* the logo's own background colour */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;             /* purely a transition — never traps input */
}
.boot-splash[hidden] { display: none; }
.boot-splash.is-out { opacity: 0; } /* the black field clears at the end */

.boot-splash-logo {
  width: min(64vw, 72vh);
  max-width: 820px;
  height: auto;
  opacity: 0;                       /* starts faded… */
  transform: scale(0.975);
  transition: opacity 1s ease, transform 1.25s ease;
  filter: drop-shadow(0 0 64px rgba(36, 96, 240, 0.22));
}
.boot-splash.is-in .boot-splash-logo { opacity: 1; transform: scale(1); }  /* …to fully seen */

@media (prefers-reduced-motion: reduce) {
  .boot-splash-logo { transition: opacity 0.4s ease; transform: none; }
  .boot-splash.is-in .boot-splash-logo { transform: none; }
}

/* === Connect view: connected-players waiting room =====================
   Once a phone joins, the left demo-reel slot is swapped for the live list of
   connected players; the host presses "Start Port and Play" to open the game
   selection. Sits on the blue connect-ground, so text/cards are light. */
.connect-players-panel {
  width: 100%;
  max-width: clamp(440px, 56vw, 920px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.4vh, 32px);
}
.connect-players-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 34px);
  color: #fff;
  margin: 0;
  text-align: center;
}
.connect-players-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 1.4vw, 22px);
  width: 100%;
}
.connect-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(12px, 1.4vw, 20px);
  min-width: clamp(110px, 12vw, 150px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  animation: connect-player-pop 0.4s cubic-bezier(.2, .8, .3, 1.2) both;
}
@keyframes connect-player-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to   { opacity: 1; transform: none; }
}
.connect-player-av {
  width: clamp(48px, 5vw, 72px);
  height: clamp(48px, 5vw, 72px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 34px);
  color: #fff;
  background: var(--av-c, #2563eb);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.connect-player-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 1.4vw, 20px);
  color: #fff;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.connect-player-host {
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b1020;
  background: #ffd400;
  padding: 2px 8px;
  border-radius: 999px;
}
.connect-start-hint {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(13px, 1.2vw, 18px);
  color: #cdd6e4;
  margin: clamp(6px, 1vh, 14px) 0 0;
  text-align: center;
}
.connect-start-hint b { color: #fff; }

/* === Draw Battle (screen) — vendored game iframe, scaled to fill ========
   The game is a fixed 1180x720 stage; we keep the iframe at that logical size
   (so the game's internal layout + pointer maths are untouched) and scale the
   IFRAME ELEMENT to fill the TV (contain — biggest size with no clipping). */
.view-drawbattle { position: absolute; inset: 0; background: #15112e; overflow: hidden; }
.db-frame {
  position: absolute; left: 50%; top: 50%;
  width: 1180px; height: 720px; border: 0; display: block;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(var(--db-scale, 1));
}

/* 8-Bit Party: the suite's own pages letterbox their canvas to the viewport,
   so the iframe just fills the view. */
.view-eightbit { position: absolute; inset: 0; background: #14111f; overflow: hidden; }
.eb-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
