/* DubDub on the web: game UI over the three.js studio. Matches the Flutter
   app's game style (mobile/lib/widgets/game_ui): navy glass panels with
   neon borders, LilitaOne type, candy buttons. */

@font-face {
  font-family: 'LilitaOne';
  src: url('assets/fonts/LilitaOne-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'PermanentMarker';
  src: url('assets/fonts/PermanentMarker-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --navy: #0b0d2e;
  --panel: rgba(24, 28, 78, 0.82);
  --panel-solid: #1a1f52;
  --panel-border: rgba(79, 123, 255, 0.85);
  --cyan: #3be6ff;
  --violet: #9b6bff;
  --pink: #ff4fb0;
  --gold: #ffc93c;
  --soft: #c9ccf2;
  --red: #ff6b6b;
  --green: #3af26a;
  --green-deep: #119a3a;
  --blue: #4f9bff;
  --blue-deep: #1a3fc8;
  --rose: #ff4f7b;
  --rose-deep: #a0133e;
  --game: 'LilitaOne', system-ui, sans-serif;
  --text-shadow: 0 2px 6px rgba(0, 0, 0, 0.53);
  --gutter: 12px;
  --top: max(env(safe-area-inset-top), 4px);
  --bottom: max(env(safe-area-inset-bottom), 10px);
}

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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

#studio {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  z-index: 0;
}

#app {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
#app > * { pointer-events: auto; }

.boot { position: absolute; inset: 0; display: grid; place-items: center; }

button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ── Layout ────────────────────────────────────────────────────────── */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--top) var(--gutter) var(--bottom);
  pointer-events: none;
}
.screen > * { pointer-events: auto; }
.screen .grow { flex: 1; pointer-events: none; }
.column { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; }
.fade { animation: fade-in 220ms ease-out both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.topbar { position: relative; display: flex; align-items: flex-start; justify-content: space-between; min-height: 82px; }
.topbar .side { display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1; }
.logo { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); width: 220px; height: 77px; pointer-events: none; }
.logo canvas { width: 100%; height: 100%; }

/* ── Type ──────────────────────────────────────────────────────────── */

.game { font-family: var(--game); text-shadow: var(--text-shadow); letter-spacing: 0.01em; }
.soft { color: var(--soft); }
.center { text-align: center; }
.caps { text-transform: uppercase; }

/* ── Panels and buttons ────────────────────────────────────────────── */

.panel {
  background: var(--panel);
  border: 1.5px solid rgba(124, 140, 255, 0.55);
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@media (pointer: coarse) {
  /* Phones: blur under every panel costs frames; a denser fill reads the same. */
  .panel { background: rgba(20, 24, 66, 0.92); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.candy {
  --c: var(--green);
  --d: var(--green-deep);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 6px 18px 10px;
  border-radius: 17px;
  background: linear-gradient(180deg, var(--c), var(--d));
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.28), 0 4px 10px rgba(0, 0, 0, 0.35);
  font-family: var(--game);
  font-size: 19px;
  text-shadow: var(--text-shadow);
  transition: transform 90ms ease-out;
}
.candy::before {
  content: '';
  position: absolute;
  left: 10%; right: 10%; top: 5px; height: 34%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.candy .caption { display: block; font-size: 11px; opacity: 0.85; text-transform: uppercase; }
.candy.blue { --c: var(--blue); --d: var(--blue-deep); }
.candy.rose { --c: var(--rose); --d: var(--rose-deep); }
.candy.gold { --c: #ffb31f; --d: #b0450a; }
.press:active, .candy:active { transform: scale(0.92); }
.press { transition: transform 420ms cubic-bezier(.34, 1.8, .64, 1); }
.press:active { transition-duration: 90ms; }

.icon-button {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
}
.icon-button canvas { width: 54px; height: 54px; }
.icon-button.gold {
  background: linear-gradient(180deg, #2a2f6e, #161a45);
  border: 1.6px solid rgba(255, 201, 60, 0.85);
  box-shadow: 0 0 12px rgba(255, 201, 60, 0.35), 0 3px 6px rgba(0, 0, 0, 0.4);
  color: var(--gold);
  font-size: 26px;
  filter: drop-shadow(0 0 6px rgba(255, 201, 60, 0.6));
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: #4f8bff; box-shadow: 0 0 8px rgba(79, 139, 255, 0.7); flex: none; }
.dot.cyan { background: var(--cyan); animation: pulse 1.4s ease-out infinite; }
.dot.rec { background: #ff4f4f; box-shadow: 0 0 8px rgba(255, 79, 79, 0.7); animation: blink 0.8s ease-in-out infinite alternate; width: 14px; height: 14px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 230, 255, 0.9); } 100% { box-shadow: 0 0 4px 10px rgba(59, 230, 255, 0); } }
@keyframes blink { from { opacity: 0.35; } to { opacity: 1; } }

.loader {
  width: 36px; height: 36px; border-radius: 50%;
  border: 4px solid rgba(59, 230, 255, 0.25);
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}
.loader.small { width: 16px; height: 16px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ── Home ──────────────────────────────────────────────────────────── */

.badge { width: 78px; height: 89px; }
.badge canvas { width: 78px; height: 89px; }

.play-main .candy { min-height: 72px; font-size: 28px; gap: 10px; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.action {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 900 / 396;
  background-size: 100% 100%;
  text-align: left;
}
.action .words { position: absolute; left: 31%; right: 5%; top: 3%; bottom: 6%; display: flex; flex-direction: column; justify-content: center; }
.action .title { font-family: var(--game); font-size: 12cqw; line-height: 1.05; text-shadow: var(--text-shadow); white-space: nowrap; }
.action .caption { font-family: var(--game); font-size: 7.2cqw; opacity: 0.85; text-transform: uppercase; text-shadow: var(--text-shadow); white-space: nowrap; }

.status { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.status .panel { padding: 8px 20px 8px 16px; }
.status .title { font-family: var(--game); font-size: 16px; }
.status .line { font-size: 12px; color: var(--soft); }
.practice { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px 10px 14px; font-family: var(--game); font-size: 16px; }
.practice .mic { color: var(--green); }

.get-app {
  margin: 0 auto 4px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
}
.get-app a { color: var(--cyan); font-family: var(--game); text-decoration: none; }
.get-app .close { margin-left: auto; color: var(--soft); font-size: 18px; padding: 0 4px; }

/* ── Room ──────────────────────────────────────────────────────────── */

.round-header { width: 330px; max-width: 70vw; aspect-ratio: 440 / 150; margin: 0 auto; pointer-events: none; }
.round-header canvas { width: 100%; height: 100%; }
.countdown { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; transform: translate(-50%, -50%); pointer-events: none; }
.countdown canvas { width: 100%; height: 100%; }
.countdown.off { visibility: hidden; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti canvas { width: 100%; height: 100%; }

.hud { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.hud .line { text-align: center; }
.hud .character { color: var(--gold); font-size: 13px; letter-spacing: 0.09em; margin-right: 8px; }
.hud .words { font-family: var(--game); font-size: 19px; text-shadow: var(--text-shadow); }
.hud .hint { font-size: 12px; color: var(--soft); text-align: center; }
.hud .rec { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--game); font-size: 17px; color: var(--red); text-transform: uppercase; }
.hud .code-label { font-size: 12px; letter-spacing: 0.12em; color: var(--soft); text-align: center; text-transform: uppercase; }
.hud .code { font-family: var(--game); font-size: 44px; letter-spacing: 10px; color: var(--cyan); text-align: center; text-shadow: 0 0 14px rgba(59, 230, 255, 0.6); user-select: text; -webkit-user-select: text; }
.hud .mic-off { display: flex; align-items: center; gap: 8px; color: #ff9ab2; font-size: 13px; }
.hud .row { display: flex; gap: 10px; }
.hud .row > * { flex: 1; }
.lobby-status { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--game); font-size: 22px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.67); }
.lobby-status.counting { color: var(--gold); font-size: 30px; }
.searching { margin: 4px auto 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-family: var(--game); font-size: 14px; }

.players { margin-top: 10px; display: flex; justify-content: center; align-items: flex-end; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.players::-webkit-scrollbar { display: none; }
.chip { position: relative; width: 74px; height: 106px; flex: none; }
.chip canvas { width: 74px; height: 106px; }
.chip.muted canvas { opacity: 0.6; }
.chip .muted-badge { position: absolute; top: 30px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: #1c2050; border: 1.5px solid #ff5f7e; display: grid; place-items: center; font-size: 12px; }
.ghost { width: 74px; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.ghost .ring { width: 52px; height: 52px; margin-top: 6px; border-radius: 50%; background: rgba(20, 24, 63, 0.13); border: 2px solid rgba(127, 140, 255, 0.4); display: grid; place-items: center; color: rgba(127, 140, 255, 0.33); font-size: 26px; }
.ghost .label { font-family: var(--game); font-size: 11px; color: rgba(127, 140, 255, 0.53); text-transform: uppercase; }

.notice { position: absolute; left: 50%; top: calc(var(--top) + 90px); transform: translateX(-50%); padding: 10px 18px; font-family: var(--game); font-size: 16px; animation: drop 300ms cubic-bezier(.34, 1.56, .64, 1) both; z-index: 5; }
@keyframes drop { from { transform: translate(-50%, -20px); opacity: 0; } }

.emotes { align-self: flex-end; width: 204px; padding: 10px; margin-bottom: 8px; }
.emotes .head { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--game); font-size: 16px; margin-bottom: 6px; }
.emotes .grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.emote { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-family: var(--game); }
.emote .ring { width: 54px; height: 54px; border-radius: 50%; border: 2.5px solid var(--ring, var(--cyan)); background: rgba(16, 19, 56, 0.9) center / 70% no-repeat; }
.flyer { position: absolute; width: 56px; height: 56px; pointer-events: none; background: center / contain no-repeat; animation: fly 1.4s cubic-bezier(.2, .7, .3, 1) forwards; z-index: 4; }
@keyframes fly {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--spin)); opacity: 0; }
}

.perf {
  position: absolute; width: 320px; max-width: 86vw; z-index: 3;
  transform: translate(-50%, 0);
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 34px;
  border: 3px solid var(--glow);
  background: radial-gradient(120% 140% at 30% 20%, color-mix(in srgb, var(--glow) 30%, #1a1440), rgba(26, 20, 64, 0.88));
  box-shadow: 0 0 22px color-mix(in srgb, var(--glow) 70%, transparent), inset 0 0 18px color-mix(in srgb, var(--glow) 45%, transparent);
  animation: jelly 700ms cubic-bezier(.34, 1.56, .64, 1) both;
  pointer-events: none;
}
.perf .portrait { width: 104px; height: 104px; flex: none; border-radius: 50%; border: 3px solid var(--glow); background: center / cover no-repeat, #2a2160; box-shadow: 0 0 16px var(--glow); }
.perf .who { font-family: var(--game); font-size: 24px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perf .score { font-family: var(--game); font-size: 64px; line-height: 0.95; background: linear-gradient(180deg, #fff 0%, var(--glow) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35)); }
.perf .verdict { font-family: 'PermanentMarker', var(--game); font-size: 19px; color: color-mix(in srgb, var(--glow) 55%, #fff); transform: rotate(-4deg); }
@keyframes jelly {
  0% { transform: translate(-50%, 20px) scale(0.4, 0.4); opacity: 0; }
  45% { transform: translate(-50%, 0) scale(1.12, 0.9); opacity: 1; }
  70% { transform: translate(-50%, 0) scale(0.95, 1.05); }
  100% { transform: translate(-50%, 0) scale(1, 1); }
}

.results { width: 100%; max-width: 420px; margin: 8px auto 0; padding: 16px; animation: jelly-in 650ms cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes jelly-in { 0% { transform: scale(0.6, 0.4); opacity: 0; } 55% { transform: scale(1.06, 0.95); opacity: 1; } 100% { transform: none; } }
.results h2 { margin: 0; font-family: var(--game); font-size: 26px; text-align: center; text-shadow: var(--text-shadow); }
.results .sub { text-align: center; font-size: 12px; color: var(--soft); margin-bottom: 10px; }
.results .row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; }
.results .row.winner { background: rgba(255, 201, 60, 0.12); box-shadow: inset 0 0 0 1.5px rgba(255, 201, 60, 0.5); }
.results .face { width: 38px; height: 38px; border-radius: 50%; background: center / cover no-repeat; border: 2px solid var(--tint); }
.results .name { font-family: var(--game); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .parts { font-size: 11px; color: var(--soft); }
.results .total { font-family: var(--game); font-size: 26px; color: var(--tint); }
.results .crown { color: var(--gold); margin-left: 6px; }
.results .foot { text-align: center; font-size: 11px; color: var(--soft); margin-top: 8px; }

.xp { width: 100%; max-width: 420px; margin: 10px auto 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.xp .top { display: flex; justify-content: space-between; font-family: var(--game); font-size: 16px; }
.xp .bar { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.xp .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.xp .parts { font-size: 12px; color: var(--soft); }
.xp .up { color: var(--gold); font-family: var(--game); }

/* ── Dialogs and sheets ────────────────────────────────────────────── */

.scrim { position: fixed; inset: 0; background: rgba(6, 8, 24, 0.6); z-index: 20; display: grid; place-items: center; padding: 24px; animation: fade-in 160ms ease-out both; }
.dialog {
  width: 100%; max-width: 380px; max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 20px 18px 16px;
  background: rgba(26, 31, 82, 0.96);
  border: 1.6px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: 0 0 22px rgba(79, 123, 255, 0.35), 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: pop 260ms cubic-bezier(.34, 1.56, .64, 1) both;
  user-select: text; -webkit-user-select: text;
}
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.dialog h2 { margin: 0 0 10px; font-family: var(--game); font-size: 24px; text-align: center; text-shadow: var(--text-shadow); }
.dialog p { margin: 0 0 12px; font-size: 14px; line-height: 1.35; color: var(--soft); }
.dialog .stack { display: flex; flex-direction: column; gap: 10px; }
.dialog .choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dialog .choice { padding: 12px 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1.5px solid rgba(124, 140, 255, 0.5); font-family: var(--game); font-size: 16px; }
.dialog .choice:hover { border-color: var(--cyan); }
.field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f1236;
  border: 1.6px solid rgba(124, 140, 255, 0.6);
  color: #fff;
  font: 16px system-ui, sans-serif;
  outline: none;
}
.field:focus { border-color: var(--cyan); box-shadow: 0 0 10px rgba(59, 230, 255, 0.35); }
.field.code { font-family: var(--game); font-size: 30px; letter-spacing: 10px; text-align: center; text-transform: uppercase; }
textarea.field { resize: vertical; min-height: 70px; }
.error { color: #ff9ab2; font-size: 13px; text-align: center; }

.sheet-scrim { position: fixed; inset: 0; z-index: 10; background: rgba(6, 8, 24, 0.55); animation: fade-in 160ms ease-out both; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11;
  max-width: 560px; margin: 0 auto;
  max-height: 88dvh; overflow-y: auto;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(22, 26, 72, 0.98);
  border: 1.6px solid var(--panel-border);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  animation: rise 260ms cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { margin: 0 0 12px; font-family: var(--game); font-size: 26px; text-align: center; }
.sheet h3 { margin: 18px 0 8px; font-family: var(--game); font-size: 17px; color: var(--cyan); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 15px; }
.setting input[type=range] { width: 50%; accent-color: var(--cyan); }
.setting input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--cyan); }
.setting .value { color: var(--soft); font-size: 13px; }
.segmented { display: inline-flex; flex-shrink: 0; padding: 3px; border-radius: 18px; background: rgba(8, 10, 40, 0.6); border: 1px solid rgba(127, 140, 255, 0.4); }
.segmented button { font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: none; border: 1.5px solid transparent; border-radius: 15px; padding: 6px 12px; cursor: pointer; }
.segmented button.on { background: linear-gradient(90deg, #1e8bff, #2a3fd0); border-color: var(--cyan); }
.link { color: var(--cyan); text-decoration: none; font-size: 15px; }
.danger { color: #ff8fa3; }
.sheet .account { display: flex; flex-direction: column; gap: 8px; }

.safety { display: flex; flex-direction: column; gap: 8px; }

/* Wide windows: the TV sits high in the view, so the round header moves to
   the top-left corner instead of covering it. */
@media (min-aspect-ratio: 4/3) {
  .round-header { position: absolute; left: var(--gutter); top: calc(var(--top) + 64px); width: 260px; margin: 0; }
}

.rive-pending canvas { opacity: 0; }

/* ── Paywall ───────────────────────────────────────────────────────── */

.small { font-size: 12px; }
.features { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.feature { display: flex; gap: 10px; align-items: flex-start; }
.feature .tick { color: var(--gold); font-size: 18px; line-height: 1.2; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 12px; }
.plan { position: relative; padding: 14px 6px 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(124, 140, 255, 0.45); text-align: center; }
.plan.selected { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 201, 60, 0.45); background: rgba(255, 201, 60, 0.08); }
.plan .price { font-family: var(--game); font-size: 20px; margin-top: 4px; }
.plan .best { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: var(--gold); color: #3a2400; font-family: var(--game); font-size: 11px; white-space: nowrap; }
.plan .trial { color: var(--cyan); font-size: 11px; margin-top: 4px; }
.links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.links .link { font-size: 13px; }

/* The app bar lives above the screens (lib/app/top_bar.dart). */
.shell-bar { position: absolute; left: 0; right: 0; top: var(--top); padding: 0 var(--gutter); pointer-events: none; z-index: 2; }
.shell-bar .side > *, .shell-bar .slot-item { pointer-events: auto; }
.shell-bar .slot { position: relative; width: 78px; min-height: 90px; align-items: flex-start; }
.shell-bar .slot-item { position: absolute; left: 0; top: 0; }
.shell-bar .off { visibility: hidden; pointer-events: none !important; }
.shell-bar .topbar { flex-direction: row; }
.row-buttons { display: flex; gap: 10px; }

/* A private lobby's game settings (host): rounds and packs, compact. */
.lobby-settings { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 10px; }
.lobby-settings .line { display: flex; align-items: center; gap: 10px; }
.lobby-settings .label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--soft); font-weight: 700; }
.lobby-settings .packs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-height: 64px; overflow-y: auto; }
.lobby-settings .pack { font: inherit; font-size: 12px; font-weight: 600; color: var(--soft); background: rgba(16, 20, 80, 0.2); border: 1px solid rgba(127, 140, 255, 0.4); border-radius: 14px; padding: 4px 10px; cursor: pointer; }
.lobby-settings .pack.on { color: #fff; background: linear-gradient(90deg, #1e8bff, #2a3fd0); border: 1.5px solid var(--cyan); }

/* After a match: how were the packs? */
.rate { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--soft); font-size: 13px; }
.rate .thumb { font-size: 20px; line-height: 1; padding: 6px 10px; border-radius: 14px; background: rgba(42, 63, 208, 0.2); border: 1px solid rgba(127, 140, 255, 0.4); cursor: pointer; }

/* ── Voice chat ──────────────────────────────────────────────────────── */

.mic-toggle {
  position: absolute; right: 12px; top: 74px;
  width: 54px; height: 54px; border-radius: 16px;
  background: linear-gradient(180deg, #2a2f6e, #161a45);
  border: 1.6px solid rgba(138, 147, 201, 0.85);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  font-size: 24px; display: grid; place-items: center;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out, opacity 160ms ease-out;
}
.mic-toggle.on { border-color: rgba(59, 230, 255, 0.85); box-shadow: 0 0 12px rgba(59, 230, 255, 0.35), 0 3px 6px rgba(0, 0, 0, 0.4); }
.mic-toggle.closed { opacity: 0.45; pointer-events: none; }
.chip-wrap { flex: none; border-radius: 30%; transition: box-shadow 160ms ease-out; }
.chip-wrap.speaking { box-shadow: 0 0 14px 1px rgba(58, 242, 106, 0.6); }
