:root {
  --bg: #121014;
  --surface: #1C1920;
  --surface-2: #262229;
  --surface-3: #302B33;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #F5F2ED;
  --text-dim: #9C96A3;
  --text-faint: #6B6672;

  --accent: #FF4B3E;
  --accent-dim: #D93A2E;
  --accent-ink: #2A0A06;
  --gold: #FFC53D;
  --gold-ink: #3A2600;
  --mint: #2FD98A;
  --mint-dim: #1FAF6C;
  --sky: #4FC8E8;
  --danger: #FF5C5C;

  --radius: 16px;
  --radius-lg: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0),
    radial-gradient(ellipse 900px 460px at 50% -8%, rgba(255, 75, 62, 0.16), transparent 65%);
  background-size: 26px 26px, 100% 100%;
  background-attachment: fixed, fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0 0 8px;
  line-height: 1.15;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p { margin: 0 0 12px; color: var(--text-dim); }

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Screens fade+rise in on a genuine screen change (new phase/round/route) -
   but not on the once-a-second timer re-renders, which never carry this
   class - see the screen-key check in main.js's render(). */
#app.screen-pop > * {
  animation: screenIn 0.5s var(--ease-out) both;
}
#app.screen-pop > *:nth-child(1) { animation-delay: 0s; }
#app.screen-pop > *:nth-child(2) { animation-delay: 0.035s; }
#app.screen-pop > *:nth-child(3) { animation-delay: 0.07s; }
#app.screen-pop > *:nth-child(4) { animation-delay: 0.105s; }
#app.screen-pop > *:nth-child(5) { animation-delay: 0.14s; }
#app.screen-pop > *:nth-child(n+6) { animation-delay: 0.16s; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #app.screen-pop > * { animation: none; }
}

/* ---------------- Brand / hero ---------------- */

.brand {
  text-align: center;
  margin: 20px 0 28px;
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--accent), var(--accent-dim));
  font-size: 26px;
  box-shadow: 0 6px 0 var(--accent-dim), 0 10px 20px rgba(255, 75, 62, 0.25);
  margin-bottom: 14px;
  transform: rotate(-4deg);
}
.brand .mark.gold {
  background: linear-gradient(160deg, var(--gold), #E5A317);
  box-shadow: 0 6px 0 #E5A317, 0 10px 20px rgba(255, 197, 61, 0.28);
  animation: winnerPop 0.6s var(--ease-out) both;
}
@media (prefers-reduced-motion: reduce) {
  .brand .mark.gold { animation: none; }
}
.brand h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
}
.brand p { font-size: 15px; }

/* ---------------- Cards & layout ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.spacer { flex: 1; }

/* ---------------- Inputs ---------------- */

input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 75, 62, 0.18);
}
input::placeholder { color: var(--text-dim); } /* --text-faint fails contrast at this size */

/* ---------------- Buttons ---------------- */

button {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  cursor: pointer;
  color: var(--text);
  background: var(--surface-3);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease, opacity 0.15s ease;
}
button:hover:not(:disabled) { filter: brightness(1.1); }
button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
button:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dim); }
.btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--accent-dim); }

.btn-success { background: var(--mint); color: #05271a; box-shadow: 0 3px 0 var(--mint-dim); }
.btn-success:active:not(:disabled) { box-shadow: 0 1px 0 var(--mint-dim); }

.btn-danger { background: var(--danger); color: #2b0505; box-shadow: 0 3px 0 #c94747; }
.btn-danger:active:not(:disabled) { box-shadow: 0 1px 0 #c94747; }

.btn-block { width: 100%; }
.btn-lg { padding: 18px; font-size: 17px; border-radius: 14px; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--text-dim); }
.btn-ghost:hover:not(:disabled) { color: var(--text); filter: none; }
.btn-ghost:active:not(:disabled) { transform: none; box-shadow: none; }

/* ---------------- Misc UI ---------------- */

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.room-code {
  font-family: "Space Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 7px;
  text-align: center;
  color: var(--gold);
  margin: 4px 0 2px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.room-code:active { transform: scale(0.97); }

.player-list { list-style: none; margin: 0; padding: 0; }
.player-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
}
.player-list li:last-child { border-bottom: none; }
.player-list .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 30vw;
}
.player-list .score {
  color: var(--mint);
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  position: relative;
}

/* Only applied on the one render where a score actually changed (see
   previousScores tracking in main.js) - never replays on routine
   once-a-second timer re-renders, so it can't turn into constant jitter. */
.player-list li.score-bumped { animation: scoreBumpRow 1.1s var(--ease-out); }
@keyframes scoreBumpRow {
  0% { background: rgba(47, 217, 138, 0.22); }
  100% { background: transparent; }
}
.score-delta {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  color: var(--mint);
  animation: scoreDeltaFloat 1.1s var(--ease-out) forwards;
}
@keyframes scoreDeltaFloat {
  0% { opacity: 0; transform: translateY(4px); }
  25% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .player-list li.score-bumped { animation: none; }
  .score-delta { animation: none; opacity: 1; transform: none; }
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--mint); flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(47, 217, 138, 0.18);
}
.dot.off { background: var(--text-faint); box-shadow: none; }

.kick-btn {
  flex-shrink: 0;
  padding: 4px 9px;
  font-size: 12px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-dim); /* --text-faint fails contrast at this size on this background */
  box-shadow: none;
}
.kick-btn:hover:not(:disabled) { background: var(--danger); color: #2b0505; filter: none; }
.kick-btn.confirm {
  background: var(--danger);
  color: #2b0505;
  font-weight: 700;
  animation: kickPulse 0.9s ease-in-out infinite;
}
@keyframes kickPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .kick-btn.confirm { animation: none; }
}

.host-btn:hover:not(:disabled) { background: var(--gold); color: var(--gold-ink); filter: none; }
.host-btn.confirm {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  animation: kickPulse 0.9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  /* Has to come after .host-btn.confirm's own rule above, not just be
     inside a reduced-motion query - same specificity means source order
     still decides the winner when the query matches. */
  .host-btn.confirm { animation: none; }
}
.host-btn:disabled { opacity: 0.35; }

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.72);
  flex-shrink: 0;
  font-family: "Space Grotesk", sans-serif;
}

/* ---------------- Modal (How it works) ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 150;
  animation: modalFadeIn 0.2s ease-out both;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: modalPopIn 0.25s var(--ease-out) both;
}
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-card { animation: none; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
}

.qr-code {
  display: block;
  margin: 10px auto 6px;
  border-radius: 10px;
  background: #F5F2ED;
  padding: 6px;
}

.badge-host {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------------- Game picker ---------------- */

.game-search-input { margin-bottom: 14px; }
.game-search-empty { text-align: center; padding: 12px 0 4px; margin-bottom: 0; }
.game-list { display: flex; flex-direction: column; gap: 10px; }
/* .game-row and .answer-card are <div role="button"> for layout reasons -
   this keeps a visible focus ring for keyboard users tabbing through them,
   same accent color the mouse-hover state already uses. */
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.game-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.game-row:hover {
  border-color: var(--accent);
  background: var(--surface-3);
  transform: translateX(2px);
}
.game-row .icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-3);
}
.game-row-text { flex: 1; min-width: 0; }
.game-row-text strong { display: block; margin-bottom: 2px; font-family: "Space Grotesk", sans-serif; }
.game-row .chevron {
  font-size: 20px;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.game-row:hover .chevron { transform: translateX(3px); color: var(--accent); }

/* ---------------- Timer ---------------- */

.timer {
  font-family: "Space Grotesk", sans-serif;
  font-size: 44px;
  font-weight: 700;
  text-align: center;
  margin: 4px 0 14px;
  font-variant-numeric: tabular-nums;
}
.timer.low {
  color: var(--danger);
  animation: timerPulse 0.7s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .timer.low { animation: none; }
}

.word-card {
  background: linear-gradient(155deg, var(--accent), #ff8563);
  border-radius: var(--radius-lg);
  padding: 38px 20px;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  color: #fff;
  margin: 16px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 var(--accent-dim), 0 14px 28px rgba(255, 75, 62, 0.22);
}

/* ---------------- Category grid ---------------- */

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.category-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.category-grid label:has(input:checked) { border-color: var(--accent); }

/* ---------------- Answer cards ---------------- */

.answer-card {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
}
.answer-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.answer-card:active { transform: translateY(0); }
.answer-card.mine { opacity: 0.55; cursor: default; }
.answer-card.mine:hover { border-color: var(--border); transform: none; }
.answer-card .votes { margin-top: 6px; color: var(--mint); font-size: 13px; font-weight: 700; }
.answer-card .author { color: var(--text-dim); font-size: 13px; margin-top: 4px; }

/* Multi-choice answer buttons (trivia, odd-one-out, etc.) */
.stack > button.btn-block,
.stack > button[class="btn-block"] {
  text-align: left;
}

/* Visually hidden but still reachable by screen readers - standard
   clip-based pattern (display:none/visibility:hidden would hide it from
   assistive tech too, defeating the point). Used for the screen-change
   announcer below. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  z-index: 100;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  transform: translate(-50%, 0);
  opacity: 1;
}
.sound-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 90;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.sound-toggle:hover:not(:disabled) { color: var(--text); filter: none; }

.game-help-btn {
  position: fixed;
  top: 14px;
  right: 60px;
  z-index: 90;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.game-help-btn:hover:not(:disabled) { color: var(--text); filter: none; }
.game-help-btn.hidden { display: none; }
.modal-backdrop.hidden { display: none; }

.toast-error { background: var(--danger); color: #2b0505; }
.toast-success { background: var(--mint); color: #05271a; }
.toast.hidden {
  opacity: 0;
  transform: translate(-50%, -14px);
  pointer-events: none;
}

/* ---------------- Leaderboard / finished screen ---------------- */

@keyframes winnerPop {
  0% { opacity: 0; transform: scale(0.7); }
  60% { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.leaderboard { display: flex; flex-direction: column; gap: 16px; }
.leaderboard-row { display: flex; align-items: center; gap: 12px; }
.leaderboard-row.is-winner { animation: winnerPop 0.5s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .leaderboard-row.is-winner { animation: none; }
}
.lb-rank {
  font-size: 22px;
  width: 36px;
  flex-shrink: 0;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-dim);
}
.leaderboard-row.is-winner .lb-rank { font-size: 30px; }
.lb-main { flex: 1; min-width: 0; }
.lb-name {
  font-weight: 600;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard-row.is-winner .lb-name {
  font-size: 18px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--gold);
}
.lb-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.lb-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  transform-origin: left;
  animation: barFill 0.7s var(--ease-out) both;
  animation-delay: 0.1s;
}
.leaderboard-row.is-winner .lb-bar { background: linear-gradient(90deg, var(--gold), #E5A317); }
@keyframes barFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.lb-score {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--mint);
  flex-shrink: 0;
  min-width: 46px;
  text-align: right;
}
.leaderboard-row.is-winner .lb-score { color: var(--gold); font-size: 18px; }
@media (prefers-reduced-motion: reduce) {
  .lb-bar { animation: none; }
}

.confetti-piece {
  position: fixed;
  top: -12px;
  width: 8px;
  height: 14px;
  z-index: 200;
  pointer-events: none;
  animation-name: confettiFall;
  animation-timing-function: cubic-bezier(0.35, 0, 0.65, 1);
  animation-fill-mode: forwards;
  border-radius: 2px;
}
@keyframes confettiFall {
  to { transform: translateY(112vh) rotate(600deg); opacity: 0.15; }
}
@media (prefers-reduced-motion: reduce) {
  /* Confetti is 46 pieces flying across the full viewport on every win -
     the largest-scale motion in this app by far, and the one most likely
     to bother someone with a real motion sensitivity, yet it was the one
     animation in the whole reduced-motion audit missed (JS-spawned, not a
     static class already covered by the sweep of every other `animation:`
     in this file). `opacity: 0` (not just `animation: none`) because the
     pieces start at `top: -12px` - freezing them without hiding would just
     leave 46 invisible-anyway elements sitting off-screen, harmless but
     pointless; this keeps the existing JS cleanup timeout as the only
     thing that removes them, no JS change needed. */
  .confetti-piece { animation: none; opacity: 0; }
}

/* ---------------- Footer / hints ---------------- */

footer.leave { margin-top: auto; padding-top: 20px; text-align: center; }
.hint { font-size: 13px; color: var(--text-dim); text-align: center; margin-top: 8px; }

.wait-dots { display: inline-flex; gap: 3px; margin-left: 5px; vertical-align: middle; }
.wait-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.wait-dots span:nth-child(2) { animation-delay: 0.15s; }
.wait-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .wait-dots span { animation: none; opacity: 0.6; }
}

@media (max-width: 420px) {
  .room-code { font-size: 32px; letter-spacing: 5px; }
  .word-card { font-size: 25px; padding: 30px 16px; }
  .timer { font-size: 38px; }
}

/* ---------------- Tabs (lobby: Game vs Room Settings) ---------------- */

.tab-bar {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: 14px;
}
.tab-btn {
  flex: 1;
  background: transparent;
  box-shadow: none;
  color: var(--text-dim);
  padding: 10px 12px;
  border-radius: 12px;
}
.tab-btn:hover:not(:disabled) { color: var(--text); filter: none; }
.tab-btn:active:not(:disabled) { transform: none; box-shadow: none; }
.tab-btn.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

/* ---------------- Toggle switch (streamer mode etc) ---------------- */

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.switch-row .switch-text { flex: 1; }
.switch-row .switch-text strong { display: block; font-family: "Space Grotesk", sans-serif; margin-bottom: 2px; }
.switch-row .switch-text .hint { text-align: left; margin: 2px 0 0; }

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 27px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  top: 2.5px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.18s var(--ease-out), background 0.15s ease;
}
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(19px); background: #fff; }

/* ---------------- Streamer mode: blurred room code ---------------- */

.room-code.blurred {
  filter: blur(9px);
  /* Blur alone is purely visual - the text is still selectable/copyable
     underneath it unless this also blocks that, which is the actual point
     of Streamer Mode (a copy-pasted code defeats it exactly as much as a
     legible one would). Safari has never shipped the unprefixed
     `user-select` property (still true as of the newest versions), so
     without the -webkit- prefix this protection silently does nothing on
     any iPhone/iPad/Mac - a real gap for an app whose stated audience is
     "friends on their phones." */
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.room-code.blurred:hover { filter: blur(7px); }
.room-code.blurred.revealed { filter: blur(0); }

.streamer-hint {
  font-size: 12px;
  color: var(--text-dim); /* --text-faint fails contrast at this size */
  text-align: center;
  margin: -2px 0 4px;
}

.password-status {
  font-size: 12px;
  color: var(--mint);
  text-align: left;
  margin: -6px 0 10px;
}
.password-status.off { color: var(--text-dim); } /* --text-faint fails contrast at this size */
