/* ---------------------------------------------------------------------------
   Hullabaloo - shared styles
   Palette: night indigo + confetti colours. One family (Fredoka) for everything.
--------------------------------------------------------------------------- */
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #1B1446;
  --ink-deep: #0F0A30;
  --ink-soft: #2B2170;
  --ink-edge: #3a2f8f;
  --paper: #F7F3FF;
  --yellow: #FFD23F;
  --pink: #FF5D8F;
  --mint: #2ED3A0;
  --sky: #43BEFF;
  --violet: #9B6BFF;
  --orange: #FF9442;
  --text: #F7F3FF;
  --muted: #B9B0E8;
  --danger: #FF5A5F;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
  background-color: var(--ink);
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 2px, transparent 2.5px);
  background-size: 30px 30px;
  color: var(--text);
  font-family: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
h1 { font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
h2 { font-weight: 700; font-size: 1.7rem; line-height: 1.1; }
h3 { font-weight: 600; font-size: 1.2rem; }
a { color: inherit; }
.muted { color: var(--muted); }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 26px;
  border: 3px solid var(--ink-deep);
  border-radius: 18px;
  background: var(--yellow);
  color: var(--ink-deep);
  font: inherit;
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink-deep);
  transition: transform 0.06s ease, box-shadow 0.06s ease, filter 0.15s;
  touch-action: manipulation;
  user-select: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink-deep); }
.btn[disabled] { filter: grayscale(0.9) brightness(0.8); cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--ink-deep); }
.btn.sky { background: var(--sky); }
.btn.pink { background: var(--pink); }
.btn.mint { background: var(--mint); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--ink-edge); box-shadow: 0 5px 0 var(--ink-edge); }
.btn.small { min-height: 44px; padding: 8px 18px; font-size: 1rem; border-radius: 14px; }
.btn.block { display: flex; width: 100%; }

.icon-btn {
  appearance: none;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--ink-deep);
  background: rgba(15, 10, 48, 0.8);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  touch-action: manipulation;
}
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { transform: scale(0.94); }

/* ---- cards & forms ---------------------------------------------------------- */
.card {
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink-deep);
  border-radius: 26px;
  box-shadow: 0 8px 0 var(--ink-deep);
  padding: 22px;
}
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 1rem; }
.input {
  width: 100%;
  min-height: 58px;
  padding: 10px 16px;
  border: 3px solid var(--ink-deep);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 1.3rem;
}
.input::placeholder { color: #a79fd6; font-weight: 500; }
.input.pin { text-align: center; letter-spacing: 0.4em; font-size: 2.2rem; padding-left: calc(16px + 0.4em); }
.error {
  background: #ffe3e6;
  color: #8a1020;
  border: 3px solid var(--ink-deep);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 250px);
  transform: translate(-50%, 20px);
  max-width: min(92vw, 420px);
  background: var(--paper);
  color: var(--ink-deep);
  border: 3px solid var(--ink-deep);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink-deep);
  padding: 10px 18px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #ffd9de; }

/* ---------------------------------------------------------------------------
   Home
--------------------------------------------------------------------------- */
.home {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(20px, 5vw, 80px);
  padding: clamp(24px, 6vw, 80px);
  max-width: 1280px;
  margin: 0 auto;
}
.home h1 { font-size: clamp(3.4rem, 11vw, 8rem); color: var(--yellow); text-shadow: 0 6px 0 var(--ink-deep); }
.home .lede { margin-top: 18px; font-size: clamp(1.1rem, 2.2vw, 1.5rem); max-width: 30ch; color: var(--muted); }
.choices { display: grid; gap: 18px; margin-top: 36px; max-width: 520px; }
.choice {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 3px solid var(--ink-deep);
  border-radius: 26px;
  box-shadow: 0 8px 0 var(--ink-deep);
  text-decoration: none;
  color: var(--ink-deep);
  transition: transform 0.08s, box-shadow 0.08s;
}
.choice:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--ink-deep); }
.choice.play { background: var(--yellow); }
.choice.stream { background: var(--sky); }
.choice svg { width: 72px; height: 72px; }
.choice strong { display: block; font-size: 1.9rem; line-height: 1.05; font-weight: 700; }
.choice span { display: block; margin-top: 4px; font-weight: 500; font-size: 1.05rem; }
.hero-art { width: 100%; max-width: 560px; justify-self: center; overflow: visible; }
.hero-art .orbit { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-art { order: -1; max-width: 220px; justify-self: start; }
  .home .lede { max-width: 36ch; }
}

/* ---------------------------------------------------------------------------
   Player app
--------------------------------------------------------------------------- */
.app { min-height: 100%; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 20px); max-width: 560px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; min-height: 46px; }
.brand { font-weight: 700; font-size: 1.4rem; color: var(--yellow); text-decoration: none; text-shadow: 0 3px 0 var(--ink-deep); }
.topbar .spacer { flex: 1; }
.screen { display: grid; gap: 16px; align-content: start; flex: 1; }
.screen > h2 { margin-top: 4px; }

.game-card {
  display: grid;
  gap: 8px;
  text-align: left;
  width: 100%;
  padding: 20px;
  border: 3px solid var(--ink-deep);
  border-radius: 26px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 0 var(--ink-deep);
  font: inherit;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}
.game-card:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--ink-deep); }
.game-card .art { height: 120px; margin: -6px -6px 4px; border-radius: 18px; background: var(--ink-soft); display: grid; place-items: center; overflow: hidden; }
.game-card .art svg { height: 110px; }
.game-card h3 { font-size: 1.6rem; font-weight: 700; }
.game-card p { color: #4b4287; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tag { background: var(--yellow); color: var(--ink-deep); border-radius: 999px; padding: 3px 12px; font-weight: 600; font-size: 0.9rem; border: 2px solid var(--ink-deep); }

.how { color: var(--muted); display: grid; gap: 6px; }
.how li { margin-left: 18px; }
.how ul { margin: 0; padding: 0; }

.pin-big { font-size: clamp(3.4rem, 18vw, 5.6rem); font-weight: 700; letter-spacing: 0.12em; padding-left: 0.12em; color: var(--ink-deep); line-height: 1; text-align: center; }
.pin-label { text-align: center; font-weight: 600; color: #4b4287; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.player-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--ink-deep); border-radius: 16px; padding: 8px 12px; font-weight: 600; min-width: 0; color: var(--ink-deep); }
.player-chip .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--ink-deep); }
.player-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip .badge { margin-left: auto; font-size: 0.75rem; background: var(--yellow); border: 2px solid var(--ink-deep); border-radius: 999px; padding: 0 8px; }
.player-chip.away { opacity: 0.5; }
.count-line { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; color: #4b4287; margin: 14px 0 10px; }

/* ---- in-game (player) ---- */
.playview { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #120c35; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }

.hud-top { position: absolute; top: calc(var(--safe-t) + 10px); left: calc(var(--safe-l) + 10px); right: calc(var(--safe-r) + 10px); display: flex; gap: 8px; align-items: center; pointer-events: none; }
.me-chip { display: flex; align-items: center; gap: 8px; max-width: 46vw; background: rgba(15, 10, 48, 0.8); border: 3px solid var(--ink-deep); border-radius: 999px; padding: 5px 14px 5px 6px; font-weight: 600; }
.me-chip .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; }
.me-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: flex; gap: 6px; margin-left: auto; }
.stat { background: rgba(15, 10, 48, 0.8); border: 3px solid var(--ink-deep); border-radius: 14px; padding: 2px 10px; text-align: center; font-size: 0.78rem; line-height: 1.1; color: var(--muted); }
.stat b { display: block; font-size: 1.25rem; color: var(--text); }
.hud-btns { display: flex; gap: 6px; }

.banner { position: absolute; left: 0; right: 0; top: 19%; text-align: center; pointer-events: none; padding: 0 16px; }
.banner .big {
  display: inline-block;
  font-weight: 700;
  font-size: clamp(2.6rem, 14vw, 5rem);
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 6px var(--ink-deep);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink-deep);
}
.banner .sub { margin-top: 12px; display: inline-block; background: rgba(15, 10, 48, 0.85); border: 3px solid var(--ink-deep); border-radius: 14px; padding: 6px 14px; font-weight: 600; }
.banner .pop { animation: pop 0.28s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.hint { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 68px); width: max-content; max-width: 88vw; text-align: center; background: rgba(15, 10, 48, 0.8); border: 3px solid var(--ink-deep); border-radius: 14px; padding: 6px 12px; font-weight: 600; font-size: 0.9rem; pointer-events: none; }
.hint.go { background: var(--yellow); color: var(--ink-deep); animation: nudge 0.7s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateX(-50%) translateY(-5px); } }

.joy-zone { position: absolute; left: 0; bottom: 0; width: 62%; height: 58%; touch-action: none; }
.joy-base { position: absolute; left: calc(var(--safe-l) + 22px); bottom: calc(var(--safe-b) + 38px); width: 132px; height: 132px; border-radius: 50%; background: rgba(255, 255, 255, 0.13); border: 3px solid rgba(255, 255, 255, 0.42); transition: opacity 0.2s; pointer-events: none; }
.joy-base.idle { opacity: 0.55; }
.joy-knob { position: absolute; left: 33px; top: 33px; width: 60px; height: 60px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink-deep); box-shadow: 0 4px 0 var(--ink-deep); }
.radar { position: absolute; right: calc(var(--safe-r) + 10px); bottom: calc(var(--safe-b) + 10px); width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--ink-deep); background: rgba(15, 10, 48, 0.7); pointer-events: none; }

.out-bar { position: absolute; left: calc(var(--safe-l) + 10px); bottom: calc(var(--safe-b) + 14px); width: max-content; max-width: calc(100% - 150px); background: var(--pink); color: var(--ink-deep); border: 3px solid var(--ink-deep); border-radius: 14px; padding: 8px 16px; font-weight: 700; text-align: center; box-shadow: 0 4px 0 var(--ink-deep); }
.claim-bar { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: transparent; pointer-events: none; }
.claim-bar i { display: block; height: 100%; background: var(--yellow); transform-origin: left; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82%; overflow: auto; background: var(--paper); color: var(--ink-deep); border: 3px solid var(--ink-deep); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 20px 18px calc(var(--safe-b) + 20px); box-shadow: 0 -8px 0 var(--ink-deep); animation: rise 0.35s cubic-bezier(0.2, 1, 0.3, 1); }
@keyframes rise { from { transform: translateY(100%); } }
.sheet h2 { text-align: center; margin-bottom: 4px; }
.sheet .winner-name { text-align: center; font-size: 2.2rem; font-weight: 700; line-height: 1; margin: 6px 0 14px; }
.standings { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.standings li { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--ink-deep); border-radius: 14px; padding: 6px 12px; font-weight: 600; }
.standings .place { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink-deep); font-weight: 700; }
.standings li:not(:first-child) .place { background: #e5defc; }
.standings .dot { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--ink-deep); flex: none; }
.standings .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .me { margin-left: auto; font-size: 0.8rem; background: var(--pink); border: 2px solid var(--ink-deep); border-radius: 999px; padding: 0 8px; }

/* ---------------------------------------------------------------------------
   Stream (TV)
--------------------------------------------------------------------------- */
.tv { font-size: clamp(16px, 1.25vw, 30px); }
.tv-list { min-height: 100%; padding: 4vw; display: grid; align-content: start; gap: 2.5vw; max-width: 1500px; margin: 0 auto; }
.tv-list header { display: flex; align-items: baseline; gap: 1.5vw; flex-wrap: wrap; }
.tv-list h1 { font-size: 4.2em; color: var(--yellow); text-shadow: 0 0.08em 0 var(--ink-deep); }
.tv-list .url { font-weight: 600; font-size: 1.4em; color: var(--muted); }
.tv-list .url b { color: var(--text); }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18em, 1fr)); gap: 1.4em; }
.room-card { appearance: none; text-align: left; font: inherit; cursor: pointer; display: grid; gap: 0.5em; padding: 1.1em 1.3em; border: 3px solid var(--ink-deep); border-radius: 1.4em; background: var(--paper); color: var(--ink-deep); box-shadow: 0 0.4em 0 var(--ink-deep); }
.room-card:active { transform: translateY(0.25em); box-shadow: 0 0.1em 0 var(--ink-deep); }
.room-card .pin { font-size: 3.2em; font-weight: 700; letter-spacing: 0.1em; line-height: 1; }
.room-card .meta { color: #4b4287; font-weight: 600; }
.empty-tv { background: rgba(15, 10, 48, 0.55); border: 3px dashed var(--ink-edge); border-radius: 1.6em; padding: 2.4em; max-width: 36em; }
.empty-tv h2 { font-size: 2.2em; margin-bottom: 0.4em; }
.empty-tv ol { margin: 0.6em 0 0; padding-left: 1.3em; display: grid; gap: 0.35em; font-size: 1.15em; color: var(--muted); }

.tv-room { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #120c35; overflow: hidden; }
.tv-hud { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.tv-top { position: absolute; top: 1.6vw; left: 1.8vw; right: 1.8vw; display: flex; gap: 0.9em; align-items: flex-start; }
.pill { background: rgba(15, 10, 48, 0.82); border: 3px solid var(--ink-deep); border-radius: 1.1em; padding: 0.3em 0.9em; font-weight: 600; }
.pill b { font-size: 1.5em; color: var(--yellow); margin-left: 0.2em; letter-spacing: 0.08em; }
.pill.stat-pill { text-align: center; line-height: 1.1; color: var(--muted); }
.pill.stat-pill b { display: block; margin: 0; color: var(--text); letter-spacing: 0; }
.tv-top .grow { flex: 1; }
.tv-top .pill-btn { pointer-events: auto; cursor: pointer; font: inherit; color: var(--text); }
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 1.2em; margin-right: 0.5em; vertical-align: -0.15em; }
.eq i { width: 0.28em; background: var(--mint); border-radius: 2px; animation: eq 0.6s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.2s; background: var(--yellow); }
.eq i:nth-child(3) { animation-delay: -0.4s; background: var(--pink); }
.eq i:nth-child(4) { animation-delay: -0.1s; background: var(--sky); }
@keyframes eq { from { height: 25%; } to { height: 100%; } }

.tv-roster { position: absolute; right: 1.8vw; top: 7.5vw; width: 17em; display: grid; gap: 0.45em; }
.tv-row { display: flex; align-items: center; gap: 0.6em; background: rgba(15, 10, 48, 0.82); border: 3px solid var(--ink-deep); border-radius: 1em; padding: 0.3em 0.8em 0.3em 0.4em; font-weight: 600; }
.tv-row .dot { width: 1.5em; height: 1.5em; border-radius: 50%; border: 3px solid #fff; flex: none; }
.tv-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tv-row .st { font-size: 0.8em; color: var(--muted); }
.tv-row.out { opacity: 0.55; }
.tv-row.out .dot { border-color: #777; filter: grayscale(1); }
.tv-row.seated .st { color: var(--mint); }

.tv-banner { position: absolute; left: 0; right: 0; top: 7%; text-align: center; padding: 0 4vw; }
.tv-banner .big { display: inline-block; font-weight: 700; font-size: 8em; line-height: 1; color: var(--yellow); -webkit-text-stroke: 0.09em var(--ink-deep); paint-order: stroke fill; text-shadow: 0 0.06em 0 var(--ink-deep); }
.tv-banner .big.mid { font-size: 4.6em; }
.tv-banner .sub { display: inline-block; margin-top: 0.4em; background: rgba(15, 10, 48, 0.88); border: 3px solid var(--ink-deep); border-radius: 0.8em; padding: 0.25em 0.9em; font-weight: 600; font-size: 1.7em; }
.tv-banner .pop { animation: pop 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }

.tv-lobby { position: absolute; left: 1.8vw; top: 6.2vw; width: 25em; display: grid; gap: 0.7em; justify-items: center; text-align: center; pointer-events: none; padding: 1.1em 1.2em 1.3em; }
.tv-lobby .qr { width: 10.5em; height: 10.5em; border: 3px solid var(--ink-deep); border-radius: 1em; background: #fff; padding: 0.35em; }
.tv-lobby h2 { font-size: 1.9em; }
.tv-lobby .pin-huge { font-size: 5.6em; line-height: 1; font-weight: 700; letter-spacing: 0.1em; padding-left: 0.1em; color: var(--ink-deep); }
.tv-lobby .how-to { font-size: 1.05em; color: #4b4287; font-weight: 600; }
.tv-lobby .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45em; }
.tv-lobby .chips .player-chip { font-size: 1.05em; padding: 0.3em 0.7em; }

.tv-finish { position: absolute; left: 50%; bottom: 3vw; transform: translateX(-50%); width: min(34em, 90vw); }
.tv-finish h2 { text-align: center; font-size: 2.2em; }
.tv-finish .winner-name { text-align: center; font-size: 3.2em; font-weight: 700; line-height: 1; margin: 0.1em 0 0.4em; }
.tv-finish .standings { grid-template-columns: 1fr 1fr; }
.sound-pill { position: fixed; left: 1.8vw; bottom: 4.2vw; z-index: 20; cursor: pointer; pointer-events: auto; font: inherit; color: var(--ink-deep); background: var(--yellow); border: 3px solid var(--ink-deep); border-radius: 999px; padding: 0.4em 1.2em; font-weight: 700; box-shadow: 0 4px 0 var(--ink-deep); }
.corner-brand { position: absolute; left: 1.8vw; bottom: 1.4vw; font-weight: 700; font-size: 1.3em; color: rgba(255, 255, 255, 0.5); }

.nogl { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; text-align: center; padding: 24px; }


@media (prefers-reduced-motion: reduce) {
  .hero-art .orbit, .eq i, .hint.go { animation: none; }
  .banner .pop, .tv-banner .pop, .sheet { animation: none; }
}


/* ---------------------------------------------------------------------------
   Host options (lobby)
--------------------------------------------------------------------------- */
.options h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.options .d { display: block; color: #4b4287; font-size: 0.95rem; font-weight: 500; margin-top: 2px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 0 12px; border-bottom: 3px dashed #d6ccf7; }
.opt-row strong, .opt-block strong { display: block; font-size: 1.15rem; font-weight: 600; }
.opt-block { padding-top: 12px; }
.switch { appearance: none; flex: none; position: relative; width: 70px; height: 42px; padding: 0; border-radius: 999px; border: 3px solid var(--ink-deep); background: #cfc6f5; cursor: pointer; transition: background 0.15s; touch-action: manipulation; }
.switch i { position: absolute; top: 3px; left: 3px; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--ink-deep); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--mint); }
.switch[aria-checked="true"] i { transform: translateX(28px); }
.switch[disabled] { opacity: 0.65; cursor: default; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; }
.seg button { appearance: none; min-height: 46px; padding: 4px 2px; border: 3px solid var(--ink-deep); border-radius: 14px; background: #fff; color: var(--ink-deep); font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; touch-action: manipulation; }
.seg button[aria-checked="true"] { background: var(--yellow); box-shadow: inset 0 -4px 0 rgba(15, 10, 48, 0.25); }
.seg button[disabled] { cursor: default; }
.range-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-weight: 600; color: var(--ink-deep); }
.input.num { width: 92px; min-height: 48px; text-align: center; font-size: 1.2rem; padding: 6px; }

/* ---------------------------------------------------------------------------
   Push button (only when the host switched pushing on)
--------------------------------------------------------------------------- */
.push-btn { position: absolute; right: calc(var(--safe-r) + 16px); bottom: calc(var(--safe-b) + 132px); width: 90px; height: 90px; padding: 0; border-radius: 50%; border: 4px solid var(--ink-deep); background: var(--pink); color: var(--ink-deep); font: inherit; font-weight: 700; font-size: 1.1rem; box-shadow: 0 6px 0 var(--ink-deep); display: grid; place-items: center; align-content: center; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; overflow: hidden; }
.push-btn svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.push-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink-deep); }
.push-btn::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; background: conic-gradient(rgba(15, 10, 48, 0.6) calc(var(--cd, 0) * 360deg), transparent 0); pointer-events: none; }
.push-btn.wait { filter: saturate(0.6); }

/* ---------------------------------------------------------------------------
   Stream page extras
--------------------------------------------------------------------------- */
.pin-form { display: flex; gap: 0.8em; align-items: center; flex-wrap: wrap; font-weight: 600; font-size: 1.1em; color: var(--muted); }
.pin-form .input { width: 7em; min-height: 3em; text-align: center; letter-spacing: 0.3em; font-size: 1.3em; }
.room-card:focus-visible, .pill-btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; }
.err-overlay { position: fixed; left: 1.8vw; right: 1.8vw; bottom: 1.8vw; z-index: 40; background: #ffd9de; color: #5b0a16; border: 3px solid var(--ink-deep); border-radius: 1em; padding: 0.7em 1.1em; font-weight: 600; box-shadow: 0 0.3em 0 var(--ink-deep); }
.fallback-note { position: absolute; right: 1.8vw; bottom: 1.6vw; font-size: 0.85em; color: var(--muted); background: rgba(15, 10, 48, 0.7); border-radius: 999px; padding: 0.15em 0.9em; }

.player-chip.me { box-shadow: 0 0 0 4px var(--yellow); }
.tv-top { flex-wrap: wrap; }
.tv-top .pill { white-space: nowrap; }
