:root {
  --bg: #0a0b1a;
  --bg-2: #141634;
  --card: rgba(26, 28, 58, 0.72);
  --card-solid: #1a1c3a;
  --line: rgba(140, 155, 230, 0.22);
  --text: #eef2ff;
  --muted: #a6b1da;
  --accent: #22d3ee;   /* cyaan */
  --accent-2: #a78bfa; /* violet */
  --pink: #f472b6;
  --lime: #a3e635;
  --gold: #fbbf24;
  --green: #34d399;
  --danger: #fb7185;
  --radius: 18px;
  --glow: 0 0 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(1400px 900px at 15% -10%, #241a4d 0%, transparent 55%),
    radial-gradient(1200px 900px at 100% 0%, #10284a 0%, transparent 55%),
    linear-gradient(160deg, #0b0c20 0%, var(--bg) 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Bewegend aurora-verloop op de achtergrond (vrolijk-futuristisch). */
body::before {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at 12% 18%, rgba(34, 211, 238, 0.22), transparent 60%),
    radial-gradient(38vmax 38vmax at 88% 12%, rgba(244, 114, 182, 0.20), transparent 60%),
    radial-gradient(46vmax 46vmax at 78% 88%, rgba(167, 139, 250, 0.22), transparent 62%),
    radial-gradient(34vmax 34vmax at 18% 92%, rgba(163, 230, 53, 0.14), transparent 60%);
  filter: blur(14px);
  animation: aurora 26s ease-in-out infinite alternate;
}
/* Subtiel raster met een zachte fade eromheen. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(160, 175, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 175, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask: radial-gradient(circle at 50% 38%, #000 25%, transparent 82%);
  mask: radial-gradient(circle at 50% 38%, #000 25%, transparent 82%);
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) rotate(1deg) scale(1.06); }
  100% { transform: translate3d(-2%, 2%, 0) rotate(-1.5deg) scale(1.02); }
}

/* ---- Schermen ---- */
.screen { display: none; height: 100dvh; flex-direction: column; }
.screen.active { display: flex; }
.screen.scrollable { overflow-y: auto; -webkit-overflow-scrolling: touch; height: auto; min-height: 100dvh; }

.center-card {
  margin: auto;
  padding: 34px 30px;
  width: min(440px, 92vw);
  background: linear-gradient(160deg, rgba(40, 38, 82, 0.72), rgba(16, 18, 44, 0.72));
  border: 1px solid var(--line);
  border-radius: 26px;
  text-align: center;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 46px rgba(124, 92, 255, 0.16);
  animation: cardIn 0.5s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}
.center-card.wide { width: min(680px, 94vw); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.logo {
  font-size: 60px; line-height: 1; margin-bottom: 6px;
  filter: drop-shadow(0 6px 18px rgba(34, 211, 238, 0.45));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }

h1 { font-size: 34px; letter-spacing: -0.02em; }
h2 { font-size: 26px; letter-spacing: -0.01em; }
h3 { font-size: 18px; color: var(--muted); font-weight: 600; margin: 28px 0 10px; }
.sub { color: var(--muted); margin-top: 6px; font-size: 16px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 12px; }
.center { text-align: center; }

/* Merknaam: neon-verloop met zachte gloed. */
.brand {
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 45%, var(--pink));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(167, 139, 250, 0.4));
  animation: brandShift 7s linear infinite;
}
@keyframes brandShift { to { background-position: 220% center; } }

.topic {
  margin: 10px 0 24px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.3));
}

/* ---- Formulier / knoppen ---- */
form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }

input[type=text] {
  width: 100%;
  padding: 16px 18px;
  font-size: 18px;
  color: var(--text);
  background: rgba(10, 12, 32, 0.6);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type=text]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18), 0 0 24px rgba(34, 211, 238, 0.2);
}

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  padding: 14px 22px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 55%, var(--pink));
  background-size: 180% auto;
  border-color: transparent;
  color: #0b0c20;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 12px 38px rgba(124, 92, 255, 0.5); }
.btn.primary:disabled { filter: grayscale(0.7) brightness(0.7); box-shadow: none; color: #d7dcf5; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.big { padding: 18px 26px; font-size: 18px; }

.hidden { display: none !important; }

/* Vaste geluidsknop rechtsboven. */
.audio-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  right: calc(env(safe-area-inset-right) + 10px);
  z-index: 60;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(20, 22, 52, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
.audio-toggle:active { transform: scale(0.9); }
.audio-toggle.muted { opacity: 0.6; }

/* ---- Confetti-laag ---- */
.fx-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 45;
}

/* ---- Wachtkamer ---- */
.players { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0; }
.players li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  animation: cardIn 0.35s ease both;
}
.players li .crown { font-size: 14px; }
.players li.you { border-color: var(--accent); box-shadow: 0 0 18px rgba(34, 211, 238, 0.28); }

/* ---- Tekentijd-keuze (host) ---- */
.time-setting { margin: 4px 0 20px; }
.time-label {
  display: block; margin-bottom: 10px;
  color: var(--muted); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.time-options { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.time-opt {
  -webkit-appearance: none; appearance: none;
  min-width: 60px; padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.time-opt:active { transform: scale(0.94); }
.time-opt.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(167, 139, 250, 0.22));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
  color: #fff;
}

.waiting { color: var(--muted); display: flex; gap: 10px; align-items: center; justify-content: center; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25 } 30% { opacity: 1 } }

.round-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; font-weight: 700; }
.countdown-ring {
  width: 92px; height: 92px; margin: 8px auto 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 40px; font-weight: 800;
  color: #fff;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--pink), var(--accent));
  box-shadow: 0 0 40px rgba(124, 92, 255, 0.5);
  animation: pop 0.5s ease, spinRing 3s linear infinite;
  position: relative;
}
.countdown-ring::before {
  content: '';
  position: absolute; inset: 4px;
  border-radius: 50%;
  background: rgba(12, 14, 34, 0.92);
}
.countdown-ring span { position: relative; z-index: 1; }
@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(0.8); opacity: 0.4 } to { transform: scale(1); opacity: 1 } }

/* ---- Balk boven ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  padding-right: 62px; /* ruimte voor de vaste geluidsknop rechtsboven */
  background: rgba(14, 16, 40, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 5;
}
.bar-left, .bar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pill {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  white-space: nowrap;
}
.topic-inline {
  font-size: clamp(15px, 2.4vw, 22px); font-weight: 750;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.timer {
  min-width: 56px; text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 22px; font-weight: 800;
  padding: 6px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
}
.timer.urgent { color: #fff; background: var(--danger); border-color: var(--danger); box-shadow: 0 0 22px rgba(251, 113, 133, 0.6); animation: pulse 0.9s infinite; }
@keyframes pulse { 50% { opacity: 0.55 } }

/* ---- Canvas ---- */
.canvas-wrap {
  flex: 1;
  min-height: 0;
  padding: 10px;
  position: relative;
}
/* Absoluut gepositioneerd + margin:auto om te centreren. Als vrij grid-item
   negeert de browser 'max-height: 100%' (de hoogte van het vak is dan niet
   definitief) en puilt het canvas over de gereedschapsbalk heen — dan tik je
   op het canvas in plaats van op een kleur. */
#canvas {
  position: absolute;
  inset: 10px;
  margin: auto;
  width: auto;
  height: auto;
  max-width: calc(100% - 20px);
  max-height: calc(100% - 20px);
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  touch-action: none;
  cursor: crosshair;
}
.canvas-lock {
  position: absolute; inset: 10px;
  background: rgba(10, 12, 32, 0.88);
  border-radius: 14px;
  display: grid; place-items: center;
  text-align: center;
  backdrop-filter: blur(3px);
}
.canvas-lock p { font-size: 22px; font-weight: 700; margin-top: 4px; }
.big-check { font-size: 56px; color: var(--green); filter: drop-shadow(0 0 16px rgba(52, 211, 153, 0.6)); animation: pop 0.4s ease; }

/* ---- Gereedschap ---- */
.toolbar {
  position: relative; /* ankerpunt voor de kleurkiezer */
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  background: rgba(14, 16, 40, 0.82);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* iOS/iPadOS geeft knoppen anders een eigen uiterlijk: achtergrondkleur van een
   swatch wordt dan genegeerd. appearance:none zet dat uit. */
.swatch, .tool, .btn {
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.color-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 40px; height: 40px; border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  padding: 0;
  cursor: pointer; transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.swatch:active { transform: scale(0.9); }
.swatch.selected { border-color: #fff; transform: scale(1.08); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 0 16px rgba(34, 211, 238, 0.4); }

/* Knop die de kleurkiezer opent: regenboogrand met de huidige kleur erin. */
.swatch.rainbow {
  display: grid; place-items: center;
  background: conic-gradient(#22d3ee, #a3e635, #fbbf24, #fb7185, #f472b6, #a78bfa, #22d3ee);
  border-color: rgba(255, 255, 255, 0.3);
  flex: none;
}
.swatch-dot {
  width: 22px; height: 22px; border-radius: 7px;
  background: #111111;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: block;
}

.tools { display: flex; align-items: center; gap: 8px; }

/* ---- Dikte ---- */
.size-control {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  border-radius: 12px; padding: 0 14px 0 10px; height: 46px;
  margin-right: 4px;
}
.size-dot-wrap { width: 44px; display: grid; place-items: center; flex: none; }
.size-dot { background: var(--text); border-radius: 50%; display: block; width: 10px; height: 10px; }

.size-control input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 150px; height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--pink));
  outline: none;
}
.size-control input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 12px rgba(34, 211, 238, 0.5);
  cursor: pointer;
}
.size-control input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent);
  cursor: pointer;
}

.tool {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  color: var(--text); font-size: 20px; cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}
.tool:active { transform: scale(0.94); }
.tool.selected { border-color: var(--accent); background: rgba(34, 211, 238, 0.18); box-shadow: 0 0 16px rgba(34, 211, 238, 0.3); }

/* ---- Kleurkiezer ---- */
/* Zweeft altijd net boven de gereedschapsbalk, ook als die over twee rijen wrapt. */
.picker {
  position: absolute; z-index: 20;
  left: 14px;
  bottom: calc(100% + 10px);
  width: 284px;
  padding: 14px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(124, 92, 255, 0.2);
}
.picker-field, .picker-hue { position: relative; touch-action: none; }
.picker-hue { margin-top: 12px; }
.picker canvas {
  display: block; width: 100%; border-radius: 12px;
  touch-action: none;
  border: 1px solid var(--line);
}
#picker-sv { height: 200px; }
#picker-hue { height: 28px; }

.pick-cursor {
  position: absolute; top: 0; left: 0;
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.pick-cursor.hue { top: 50%; width: 14px; height: 34px; border-radius: 8px; }

.picker-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.picker-preview {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: #111111;
  border: 2px solid rgba(255, 255, 255, 0.35);
}
.picker-hex {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px; color: var(--muted); text-transform: uppercase;
}
.picker-foot .btn { padding: 10px 16px; }

/* ---- Galerij ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  animation: cardIn 0.45s ease both;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.card.mine { border-color: var(--accent); box-shadow: 0 0 22px rgba(34, 211, 238, 0.25); }
.card.winner { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35), 0 0 34px rgba(251, 191, 36, 0.35); }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; display: block; }
.card-body { padding: 10px 12px 14px; text-align: center; }
.card-title { font-weight: 700; font-size: 16px; }
.card-note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-score { font-size: 20px; font-weight: 800; color: var(--gold); margin-top: 4px; text-shadow: 0 0 16px rgba(251, 191, 36, 0.5); }

.stars { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.star {
  background: none; border: none; cursor: pointer;
  font-size: 30px; line-height: 1;
  padding: 4px 2px;
  filter: grayscale(1) opacity(0.35);
  transition: transform 0.1s ease, filter 0.15s ease;
}
.star.on { filter: none; transform: scale(1.06); animation: starPop 0.28s ease; }
.star:active { transform: scale(0.85); }
.stars.locked .star { cursor: default; }
@keyframes starPop { 0% { transform: scale(0.6) rotate(-12deg) } 60% { transform: scale(1.25) rotate(6deg) } 100% { transform: scale(1.06) rotate(0) } }

.center-actions { text-align: center; padding: 8px 16px 40px; }

/* ---- Standen ---- */
.standings { list-style: none; max-width: 520px; margin: 0 auto; padding: 0 16px; }
.standings li {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: cardIn 0.4s ease both;
}
.standings .rank { width: 28px; font-weight: 800; color: var(--muted); text-align: center; }
.standings .who { flex: 1; font-weight: 650; text-align: left; }
.standings .pts { color: var(--muted); font-size: 14px; white-space: nowrap; }
.standings li:first-child { border-color: var(--gold); box-shadow: 0 0 26px rgba(251, 191, 36, 0.3); }
.standings li:first-child .rank { color: var(--gold); }
.standings.big li { padding: 16px 18px; font-size: 18px; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--card-solid); border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none; /* mag nooit een tik op de gereedschapsbalk opvangen */
}

@media (max-width: 640px) {
  .toolbar { justify-content: center; }
  .swatch { width: 36px; height: 36px; }
  .gallery { grid-template-columns: 1fr; }
}

/* Respecteer de systeeminstelling voor minder beweging. */
@media (prefers-reduced-motion: reduce) {
  body::before, .logo, .brand, .countdown-ring, .card, .center-card,
  .players li, .standings li, .star.on {
    animation: none !important;
  }
}

/* ---- Spelcode (kamers) ---- */
.code-row { display: flex; gap: 10px; }
.code-row .btn { flex: 1; white-space: nowrap; }
input[type=text].code-input {
  width: 8.5em;
  flex: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 800;
  padding-left: 12px;
  padding-right: 6px;
}
input[type=text].code-input::placeholder { letter-spacing: 0.15em; font-weight: 600; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.room-code {
  margin: 14px auto 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.06);
  max-width: 340px;
}
.room-code-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.room-code-value {
  font-size: 46px;
  letter-spacing: 0.25em;
  margin-right: -0.25em;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-user-select: all;
  user-select: all;
}
#leave-btn, #leave-btn-end { margin-top: 14px; font-size: 14px; padding: 10px 16px; }
.players li.away { opacity: 0.45; }
.players li.away::after { content: ' · even weg'; font-size: 13px; color: var(--muted); }
