/* =====================================================================
   Galerô · Arcade — sistema visual
   Fundo espacial escuro, cores de categoria em arco-íris, botões de
   jogo com profundidade e molduras HUD com cantos cortados em neon.
   Mantém os nomes de classe do styles.css (.btn, .panel, .sq, .opt…)
   para virar substituto direto quando for aplicado nas telas.
   ===================================================================== */

:root {
  /* ---- superfícies (espaço) ---- */
  --bg: #0b0a1a;
  --bg-2: #120f2a;
  --surface: #1a1740;
  --surface-2: #26225a;
  --line: #3b3678;
  --ink: #f5f3ff;          /* texto principal */
  --muted: #c3bfe8;        /* texto secundário (claro o bastante para ler sobre as texturas) */
  --on-light: #14112e;     /* texto sobre amarelo/verde/laranja */

  /* ---- neon das molduras ---- */
  --cyan: #22e3ff;
  --magenta: #ff3df2;
  --violet: #8b5cff;

  /* ---- categorias (arco-íris) ---- */
  --c-green: #2bd46b;
  --c-yellow: #ffcc29;
  --c-orange: #ff8a1f;
  --c-red: #ff3b52;
  --c-pink: #ff5fb0;
  --c-purple: #9a5cff;
  --c-blue: #2f8cff;

  /* ---- papéis ---- */
  --accent: var(--magenta);
  --ok: var(--c-green);
  --gold: var(--c-yellow);
  --danger: var(--c-red);
  --card: var(--surface);

  /* quiz: 4 alternativas */
  --q0: var(--c-red);
  --q1: var(--c-blue);
  --q2: var(--c-yellow);
  --q3: var(--c-green);

  /* ---- tipografia ---- */
  --f-display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --f-ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-hud: 'Chakra Petch', ui-monospace, 'Segoe UI', sans-serif;

  /* ---- forma ---- */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --radius: var(--r);
  --cut: 18px;             /* tamanho do canto cortado */
  --depth: 6px;            /* altura do botão */

  /* ---- movimento ---- */
  --t-fast: 80ms;
  --t: 160ms;
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: dark;
  font-family: var(--f-ui);
  font-weight: 700;
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); }
body { min-height: 100dvh; -webkit-font-smoothing: antialiased; background: transparent; }
/* o fundo fica no html: assim as camadas de textura (body::before/::after, z-index -1) aparecem por cima dele */
html {
  background:
    radial-gradient(1100px 600px at 50% -12%, rgb(139 92 255 / .38), transparent 62%),
    radial-gradient(700px 480px at 105% 105%, rgb(255 61 242 / .18), transparent 60%),
    radial-gradient(600px 420px at -5% 80%, rgb(34 227 255 / .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* grade de "sala de controle" bem sutil */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(rgb(34 227 255 / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(34 227 255 / .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
}

h1, h2, h3, .display { font-family: var(--f-display); font-weight: 400; margin: 0; line-height: 1.02; letter-spacing: .01em; }
h1 { font-size: clamp(34px, 6vw, 64px); text-shadow: 0 4px 0 rgb(0 0 0 / .35); }
h2 { font-size: clamp(24px, 3.4vw, 36px); }
h3 { font-size: 22px; }
p { line-height: 1.5; font-weight: 600; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cyan); }
::selection { background: var(--magenta); color: #fff; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 72px; }
.muted { color: var(--muted); }
.eyebrow, .hud-label {
  font-family: var(--f-hud); font-size: 12px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--cyan);
}
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.num, .hud-num { font-family: var(--f-hud); font-variant-numeric: tabular-nums; font-weight: 700; }

/* faixa arco-íris (assinatura da marca) */
.rainbow {
  height: 8px; border-radius: 99px;
  background: linear-gradient(90deg,
    var(--c-green) 0 14.28%, var(--c-yellow) 0 28.57%, var(--c-orange) 0 42.85%,
    var(--c-red) 0 57.14%, var(--c-pink) 0 71.42%, var(--c-purple) 0 85.71%, var(--c-blue) 0);
}

/* =====================================================================
   BOTÃO DE JOGO — face com brilho + "lateral" que afunda ao tocar
   ===================================================================== */
.btn {
  --face: var(--surface-2);
  --edge: color-mix(in srgb, var(--face) 50%, #000);
  --txt: var(--ink);
  appearance: none; position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px;
  border: 2px solid color-mix(in srgb, var(--face) 60%, #000); border-radius: var(--r);
  color: var(--txt); text-decoration: none; cursor: pointer; user-select: none;
  font-family: var(--f-display); font-size: 19px; letter-spacing: .03em; text-transform: uppercase;
  text-shadow: 0 2px 0 rgb(0 0 0 / .28);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--face) 72%, #fff) 0%, var(--face) 48%, color-mix(in srgb, var(--face) 84%, #000) 100%);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / .35),
    inset 0 -3px 0 rgb(0 0 0 / .16),
    0 var(--depth) 0 var(--edge),
    0 calc(var(--depth) + 8px) 16px rgb(0 0 0 / .45);
  transform: translateY(0);
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t);
}
/* reflexo de vidro na metade de cima */
.btn::before {
  content: ''; position: absolute; z-index: -1; left: 8px; right: 8px; top: 3px; height: 42%;
  border-radius: calc(var(--r) - 4px) calc(var(--r) - 4px) 40% 40% / calc(var(--r) - 4px) calc(var(--r) - 4px) 100% 100%;
  background: linear-gradient(180deg, rgb(255 255 255 / .32), rgb(255 255 255 / 0));
  pointer-events: none;
}
.btn:hover { filter: brightness(1.08) saturate(1.05); }
.btn:active {
  transform: translateY(var(--depth));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .25), inset 0 -2px 0 rgb(0 0 0 / .2), 0 0 0 var(--edge), 0 4px 8px rgb(0 0 0 / .4);
}
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.btn:disabled, .btn[aria-disabled=true] {
  cursor: not-allowed; filter: grayscale(.85) brightness(.7); transform: translateY(calc(var(--depth) / 2));
}

/* variantes de cor */
.btn.primary, .btn.c-green { --face: var(--c-green); --txt: var(--on-light); text-shadow: 0 1px 0 rgb(255 255 255 / .35); }
.btn.c-yellow, .btn.gold   { --face: var(--c-yellow); --txt: var(--on-light); text-shadow: 0 1px 0 rgb(255 255 255 / .4); }
.btn.c-orange { --face: var(--c-orange); --txt: var(--on-light); text-shadow: 0 1px 0 rgb(255 255 255 / .3); }
.btn.c-red, .btn.danger { --face: #e8243e; }
.btn.c-pink   { --face: #f0449c; }
.btn.c-purple { --face: #7c45f0; }
.btn.c-blue   { --face: #1f78f0; }
.btn.dark     { --face: var(--surface-2); }
/* fantasma neon: contorno, sem profundidade */
.btn.ghost {
  --face: transparent; background: transparent; border-color: color-mix(in srgb, var(--cyan) 55%, transparent);
  color: var(--cyan); box-shadow: 0 0 0 0 transparent, inset 0 0 12px rgb(34 227 255 / .12); text-shadow: none;
}
.btn.ghost::before { display: none; }
.btn.ghost:active { transform: translateY(2px); }

/* tamanhos */
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 15px; --depth: 4px; border-radius: 12px; }
.btn.big   { min-height: 64px; padding: 16px 32px; font-size: 24px; --depth: 8px; border-radius: 20px; }
.btn.huge  { min-height: 84px; padding: 18px 40px; font-size: 32px; --depth: 10px; border-radius: 24px; }
.btn.block { width: 100%; }
.btn.round { width: 56px; min-height: 56px; padding: 0; border-radius: 50%; font-size: 24px; }

/* carregando: listras correndo */
.btn.loading { pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(-45deg, rgb(255 255 255 / .18) 0 10px, transparent 10px 20px);
  background-size: 28px 28px; animation: stripes .6s linear infinite;
}
@keyframes stripes { to { background-position: 28px 0; } }
a.btn { color: var(--txt); }

/* =====================================================================
   MOLDURA HUD — cantos cortados, borda em degradê neon e brilho
   Uso: <section class="hud"> … </section>   (+ .magenta .gold .green .live)
   ===================================================================== */
.hud {
  --hud-a: var(--cyan);
  --hud-b: var(--violet);
  --shape: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  position: relative; isolation: isolate; padding: 24px 22px 22px;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--hud-a) 55%, transparent));
}
.hud::before {   /* a borda */
  content: ''; position: absolute; inset: 0; z-index: -2; clip-path: var(--shape);
  background: linear-gradient(135deg, var(--hud-a), var(--hud-b) 60%, var(--hud-a));
}
.hud::after {    /* o vidro escuro + risquinhos de painel no canto */
  content: ''; position: absolute; inset: 2px; z-index: -1; clip-path: var(--shape);
  background:
    repeating-linear-gradient(90deg, var(--hud-a) 0 6px, transparent 6px 11px) right 26px top 9px / 54px 3px no-repeat,
    repeating-linear-gradient(90deg, var(--hud-b) 0 3px, transparent 3px 7px) left 26px bottom 9px / 42px 3px no-repeat,
    linear-gradient(180deg, rgb(32 28 78 / .94), rgb(13 11 34 / .96));
}
.hud.magenta { --hud-a: var(--magenta); --hud-b: var(--violet); }
.hud.gold    { --hud-a: var(--c-yellow); --hud-b: var(--c-orange); }
.hud.green   { --hud-a: var(--c-green); --hud-b: var(--cyan); }
.hud.red     { --hud-a: var(--c-red); --hud-b: var(--magenta); }
.hud.four    { --shape: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.hud.flat    { filter: none; }
.hud.live    { animation: hudGlow 2.4s ease-in-out infinite; }
@keyframes hudGlow {
  50% { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--hud-a) 80%, transparent)); }
}
/* aba de título encaixada na borda de cima */
.hud > .hud-tab {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  padding: 5px 22px; white-space: nowrap;
  font-family: var(--f-hud); font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #07061a; background: linear-gradient(90deg, var(--hud-a), color-mix(in srgb, var(--hud-a) 70%, #fff));
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}
.hud > .hud-tab.left { left: calc(var(--cut) + 12px); transform: translate(0, -50%); }

/* painel comum (admin, formulários) — mais calmo que o HUD */
.panel {
  background: linear-gradient(180deg, rgb(38 34 90 / .75), rgb(22 19 52 / .85));
  border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 20px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 10px 30px rgb(0 0 0 / .35);
}

/* =====================================================================
   PEÇAS DE JOGO
   ===================================================================== */

/* selo AO VIVO */
.live-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 6px;
  font-family: var(--f-hud); font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  background: var(--c-red); color: #fff; box-shadow: 0 0 16px rgb(255 59 82 / .6);
}
.live-badge::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* código da sala */
.room-code {
  font-family: var(--f-hud); font-weight: 700; letter-spacing: .28em; color: var(--c-yellow);
  text-shadow: 0 0 12px rgb(255 204 41 / .55);
}

/* barra de tempo segmentada */
.timebar {
  --p: 100%; height: 14px; padding: 2px; border-radius: 4px; overflow: hidden;
  background: rgb(0 0 0 / .45); border: 1.5px solid color-mix(in srgb, var(--cyan) 50%, transparent);
}
.timebar i {
  display: block; height: 100%; width: var(--p); border-radius: 2px; transition: width .1s linear;
  background:
    repeating-linear-gradient(90deg, transparent 0 9px, rgb(0 0 0 / .55) 9px 12px),
    linear-gradient(90deg, var(--c-green), var(--c-yellow) 60%, var(--c-red));
  box-shadow: 0 0 10px rgb(34 227 255 / .5);
}
.timebar.danger i { animation: blink .5s steps(2) infinite; }

/* relógio redondo (telão) */
.ring {
  --p: 70; --c: var(--cyan);
  font-size: 42px;          /* o tamanho do anel acompanha a fonte */
  width: 2.8em; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--bg-2) 78%, transparent 79% 100%),
    conic-gradient(var(--c) calc(var(--p) * 1%), rgb(255 255 255 / .08) 0);
  box-shadow: 0 0 24px color-mix(in srgb, var(--c) 45%, transparent);
  font-family: var(--f-hud); font-weight: 700;
}

/* alternativas do quiz: blocos grandes coloridos */
.opt {
  --face: var(--q0); --edge: color-mix(in srgb, var(--face) 50%, #000);
  position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px;
  min-height: 72px; padding: 14px 18px; text-align: left; cursor: pointer; color: #fff;
  border: 2px solid color-mix(in srgb, var(--face) 60%, #000); border-radius: var(--r);
  font-family: var(--f-ui); font-weight: 900; font-size: clamp(17px, 2.2vw, 22px); line-height: 1.15;
  text-shadow: 0 2px 0 rgb(0 0 0 / .3);
  background: linear-gradient(180deg, color-mix(in srgb, var(--face) 78%, #fff), var(--face) 45%, color-mix(in srgb, var(--face) 85%, #000));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .3), 0 var(--depth) 0 var(--edge), 0 14px 18px rgb(0 0 0 / .4);
  transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t);
}
.opt:active { transform: translateY(var(--depth)); box-shadow: inset 0 2px 0 rgb(255 255 255 / .2), 0 0 0 var(--edge); }
.opt .shape {
  width: 44px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; font-size: 22px;
  background: rgb(0 0 0 / .22); box-shadow: inset 0 2px 4px rgb(0 0 0 / .25);
}
.opt.o0 { --face: var(--q0); }
.opt.o1 { --face: var(--q1); }
.opt.o2 { --face: var(--q2); color: var(--on-light); text-shadow: 0 1px 0 rgb(255 255 255 / .4); }
.opt.o3 { --face: var(--q3); color: var(--on-light); text-shadow: 0 1px 0 rgb(255 255 255 / .4); }
.opt.correct { box-shadow: 0 0 0 4px var(--bg), 0 0 0 8px var(--c-green), 0 0 28px var(--c-green); }
.opt.wrong { animation: shake .35s; }
.opt:disabled { cursor: default; }
.opt.dim, .opt.dim:disabled { opacity: .3; filter: grayscale(.4); }
@keyframes shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }

/* cartela do bingo: casas como peças */
.grid { display: grid; gap: 8px; }
.sq {
  position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px;
  border-radius: 14px; border: 1.5px solid var(--line); color: var(--ink);
  font-weight: 800; font-size: clamp(11px, 3.3vw, 16px); line-height: 1.12;
  background: linear-gradient(180deg, #2c2768, #1c1946);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 4px 0 #0c0a24;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.sq:active { transform: translateY(3px); box-shadow: 0 1px 0 #0c0a24; }
.sq.done {
  cursor: default; color: #fff; border-color: transparent;
  background: linear-gradient(180deg, #ff6bd0, var(--magenta) 50%, #c21fb8);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .35), 0 4px 0 #6e0f68, 0 0 18px rgb(255 61 242 / .45);
  animation: stamp .35s var(--ease-pop);
}
.sq.done.line {
  color: var(--on-light);
  background: linear-gradient(180deg, #7cf2a6, var(--c-green) 50%, #179a4b);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .4), 0 4px 0 #0d5a2b, 0 0 18px rgb(43 212 107 / .5);
}
.sq .ph { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .9; }
.sq .who {
  position: absolute; left: 6px; right: 6px; bottom: 6px; border-radius: 6px; padding: 3px 6px; font-size: 11px;
  background: rgb(7 6 26 / .82); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@keyframes stamp { from { transform: scale(1.25) rotate(-4deg); } }

/* placar */
.lb { display: grid; gap: 8px; }
.lb-row {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px; border-radius: 12px;
  background: linear-gradient(90deg, rgb(255 255 255 / .07), rgb(255 255 255 / .02));
  border: 1px solid rgb(255 255 255 / .08);
}
.lb-row .pos {
  width: 36px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  font-family: var(--f-display); font-size: 20px; background: var(--surface-2); color: var(--ink);
}
.lb-row:nth-child(1) .pos { background: var(--c-yellow); color: var(--on-light); box-shadow: 0 0 14px rgb(255 204 41 / .6); }
.lb-row:nth-child(2) .pos { background: #c9d2ff; color: var(--on-light); }
.lb-row:nth-child(3) .pos { background: var(--c-orange); color: var(--on-light); }
.lb-row .pts { font-family: var(--f-hud); font-weight: 700; font-size: 1.15em; color: var(--c-yellow); }

/* =====================================================================
   FORMULÁRIOS E PEÇAS DA PLATAFORMA
   ===================================================================== */
label.field { display: grid; gap: 6px; font-weight: 800; }
input[type=text], input[type=number], input[type=password], input[type=email], textarea, select {
  width: 100%; padding: 13px 14px; border-radius: 12px; outline: none;
  border: 1.5px solid var(--line); background: rgb(7 6 26 / .55); color: var(--ink); font-weight: 700;
  transition: border-color var(--t), box-shadow var(--t);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgb(34 227 255 / .25), 0 0 18px rgb(34 227 255 / .25); }
.badge-input { font-family: var(--f-hud); font-size: 34px; letter-spacing: .4em; text-align: center; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: rgb(7 6 26 / .6); border: 1.5px solid var(--line); }
.seg button {
  border: 0; border-radius: 10px; padding: 8px 16px; cursor: pointer; background: transparent; color: var(--muted);
  font-family: var(--f-display); font-size: 16px; letter-spacing: .03em; text-transform: uppercase;
}
.seg button.on { background: var(--c-blue); color: #fff; box-shadow: 0 3px 0 #0b3c80, 0 0 14px rgb(47 140 255 / .5); }

.check { display: flex; gap: 10px; align-items: center; font-weight: 800; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--c-green); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; white-space: nowrap;
  font-family: var(--f-hud); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  border: 1.5px solid currentColor; color: var(--cyan); background: rgb(34 227 255 / .08);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.tag.online { color: var(--c-blue); background: rgb(47 140 255 / .1); }
.tag.in_person { color: var(--c-orange); background: rgb(255 138 31 / .1); }
.tag.soon { color: var(--muted); background: transparent; }
.tag.ok { color: var(--c-green); background: rgb(43 212 107 / .1); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50;
  max-width: calc(100% - 32px); padding: 14px 20px; text-align: center; border-radius: 12px;
  background: linear-gradient(180deg, #2c2768, #1a1740); border: 1.5px solid var(--cyan); color: var(--ink); font-weight: 800;
  box-shadow: 0 0 22px rgb(34 227 255 / .35), 0 10px 30px rgb(0 0 0 / .5); animation: pop .22s var(--ease-pop);
}
.toast.err { border-color: var(--c-red); box-shadow: 0 0 22px rgb(255 59 82 / .4); }
@keyframes pop { from { transform: translate(-50%, 14px) scale(.96); opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: end center; padding: 12px; background: rgb(5 4 18 / .7); backdrop-filter: blur(4px); }
.modal .sheet {
  width: 100%; max-width: 480px; padding: 22px; border-radius: var(--r-lg); animation: up .22s var(--ease-pop);
  background: linear-gradient(180deg, #2a2566, #15123a); border: 1.5px solid color-mix(in srgb, var(--violet) 70%, transparent);
  box-shadow: 0 0 30px rgb(139 92 255 / .35);
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

.err-text { color: #ff8a98; font-weight: 800; min-height: 1.4em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.topbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
/* menu de quem está logado: no celular vira um botão que abre a lista */
.topbar .menu-btn { display: none; }
@media (max-width: 640px) {
  .topbar:has(.menu-btn) { position: relative; flex-wrap: nowrap; }
  .topbar .menu-btn { display: inline-flex; gap: 6px; }
  .topbar .navlinks { display: none; position: absolute; z-index: 120; top: calc(100% + 8px); right: 0; width: min(260px, calc(100vw - 32px));
    flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-radius: 16px;
    background: rgb(17 14 40 / .97); border: 1px solid rgb(255 255 255 / .14); box-shadow: 0 18px 40px rgb(0 0 0 / .55); }
  .topbar.open .navlinks { display: flex; }
  .topbar .navlinks .btn { justify-content: center; }
}

/* marca */
.logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-family: var(--f-display); font-size: 24px; letter-spacing: .02em;
}

/* confete com as cores de categoria */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti span { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* =====================================================================
   TELÃO (TV) — tudo em "em", escala com a largura da tela
   1280px → 16px · 1920px → 24px · 3840px (4K) → 48px
   ===================================================================== */
.tv {
  font-size: clamp(12px, 1.25vw, 48px);
  height: 100dvh; padding: 1.4em 2em; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 1em;
}
.tv .hud { --cut: 1.1em; padding: 1.4em 1.4em 1.3em; }
.tv .hud > .hud-tab { font-size: .7em; }
.tv h1 { font-size: 3.2em; }
.tv .opt { font-size: 1.35em; min-height: 2.9em; padding: .5em .8em; --depth: .28em; }
.tv .opt .shape { width: 1.9em; font-size: .95em; }
.tv .lb-row { font-size: 1.05em; grid-template-columns: 2.2em 1fr auto; padding: .3em .8em .3em .3em; gap: .7em; border-radius: .6em; }
.tv .lb-row .pos { width: 1.8em; font-size: 1.05em; border-radius: .45em; }
.tv .lb { gap: .45em; }
.tv .live-badge { font-size: .8em; }
.tv .ring { font-size: 2.4em; }

/* ===== TEXTURAS ======================================================
   Arquivos em /tex (gerados): waves.svg (ondas de pontos), hexglow.svg
   (colmeia com trilhas acesas), hexfloor.svg (piso de hexágonos),
   circuit.svg (trilhas de circuito). Pequenas texturas embutidas aqui.
   ===================================================================== */
:root {
  --tex-noise: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.85%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix values=%270 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .22 0%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url%28%23n%29%27/%3E%3C/svg%3E");
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.7%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix values=%270 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .35 0%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url%28%23n%29%27/%3E%3C/svg%3E");
  --tex-hex: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2742%27%3E%3Cpath d=%27M12 0 L24 7 L24 21 L12 28 L0 21 L0 7 Z M12 28 L12 42%27 fill=%27none%27 stroke=%27%2322e3ff%27 stroke-opacity=%27.08%27 stroke-width=%271%27/%3E%3C/svg%3E");
  --tex-dots: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%2710%27%3E%3Ccircle cx=%272%27 cy=%272%27 r=%271.1%27 fill=%27%23fff%27 fill-opacity=%27.10%27/%3E%3C/svg%3E");
  --tex-waves: url('tex/waves.svg');
  --tex-hexglow: url('tex/hexglow.svg');
  --tex-hexfloor: url('tex/hexfloor.svg');
  --tex-circuit: url('tex/circuit.svg');
  --tex-scan: repeating-linear-gradient(0deg, rgb(255 255 255 / .035) 0 1px, transparent 1px 4px);
  --tex-brushed:
    repeating-linear-gradient(90deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgb(0 0 0 / .16) 0 1px, transparent 1px 2px);
}

/* fundo: ondas de pontos neon + grão por cima */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    linear-gradient(180deg, rgb(11 10 26 / 0), rgb(11 10 26 / .5)),
    var(--tex-waves) center / cover no-repeat;
}

/* superfície "colmeia acesa" (telão, telas de destaque) */
.tex-hexglow { background: var(--tex-hexglow) center / cover no-repeat, var(--bg); }

/* placa de metal com circuito (barras do telão, topo do celular) */
.plate {
  position: relative; border-radius: 14px; padding: 12px 18px;
  border: 1px solid #4a4d6a;
  background:
    var(--tex-circuit) 0 0 / 480px 320px,
    var(--tex-brushed),
    var(--tex-grain),
    linear-gradient(170deg, #3a3d56, #1c1d2c 45%, #2b2d43 70%, #14151f);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), inset 0 -2px 0 rgb(0 0 0 / .4), 0 10px 24px rgb(0 0 0 / .45);
}

/* botões: grão na face + listras finas embaixo (plástico de fliperama) */
.btn {
  background:
    var(--tex-noise),
    repeating-linear-gradient(-45deg, rgb(0 0 0 / .07) 0 5px, transparent 5px 11px) left bottom / 100% 45% no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--face) 72%, #fff) 0%, var(--face) 48%, color-mix(in srgb, var(--face) 84%, #000) 100%);
}
.btn.ghost { background: var(--tex-scan), rgb(34 227 255 / .04); }

/* moldura HUD padrão: vidro com scanlines + colmeia + grão */
.hud::after {
  background:
    repeating-linear-gradient(90deg, var(--hud-a) 0 6px, transparent 6px 11px) right 26px top 9px / 54px 3px no-repeat,
    repeating-linear-gradient(90deg, var(--hud-b) 0 3px, transparent 3px 7px) left 26px bottom 9px / 42px 3px no-repeat,
    var(--tex-scan),
    var(--tex-noise),
    var(--tex-hex),
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--hud-a) 16%, transparent), transparent 60%),
    linear-gradient(180deg, rgb(32 28 78 / .95), rgb(13 11 34 / .97));
}
.hud.circuit::after {
  background:
    repeating-linear-gradient(90deg, var(--hud-a) 0 6px, transparent 6px 11px) right 26px top 9px / 54px 3px no-repeat,
    var(--tex-scan),
    var(--tex-circuit) 0 0 / 480px 320px,
    var(--tex-noise),
    linear-gradient(180deg, rgb(32 28 78 / .95), rgb(13 11 34 / .97));
}

/* moldura de METAL: aro escovado grosso, luzes embutidas e filete neon por dentro */
.hud.metal { padding: 30px 28px 28px; }
.hud.metal::before {
  background:
    linear-gradient(var(--hud-a), var(--hud-a)) center top 2px / 24% 3px no-repeat,
    linear-gradient(var(--hud-a), var(--hud-a)) center bottom 2px / 24% 3px no-repeat,
    linear-gradient(var(--hud-b), var(--hud-b)) left 2px center / 3px 26% no-repeat,
    linear-gradient(var(--hud-b), var(--hud-b)) right 2px center / 3px 26% no-repeat,
    var(--tex-brushed),
    var(--tex-grain),
    linear-gradient(160deg, #474a66, #1b1c2b 38%, #353852 58%, #121320);
}
.hud.metal::after {
  inset: 8px; border: 2px solid transparent;
  background:
    linear-gradient(135deg, transparent calc(50% - 1.5px), var(--hud-a) 0 calc(50% + 1.5px), transparent 0) left top / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(135deg, transparent calc(50% - 1.5px), var(--hud-a) 0 calc(50% + 1.5px), transparent 0) right bottom / var(--cut) var(--cut) no-repeat border-box,
    repeating-linear-gradient(90deg, var(--hud-a) 0 6px, transparent 6px 11px) right 22px top 8px / 54px 3px no-repeat padding-box,
    var(--tex-scan) padding-box,
    var(--tex-noise) padding-box,
    var(--tex-hex) padding-box,
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--hud-a) 18%, transparent), transparent 60%) padding-box,
    linear-gradient(180deg, rgb(28 25 70), rgb(11 10 30)) padding-box,
    linear-gradient(135deg, var(--hud-a), var(--hud-b)) border-box;
}
.hud.metal.four::after {
  background:
    linear-gradient(135deg, transparent calc(50% - 1.5px), var(--hud-a) 0 calc(50% + 1.5px), transparent 0) left top / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(135deg, transparent calc(50% - 1.5px), var(--hud-a) 0 calc(50% + 1.5px), transparent 0) right bottom / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(45deg, transparent calc(50% - 1.5px), var(--hud-a) 0 calc(50% + 1.5px), transparent 0) right top / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(45deg, transparent calc(50% - 1.5px), var(--hud-a) 0 calc(50% + 1.5px), transparent 0) left bottom / var(--cut) var(--cut) no-repeat border-box,
    var(--tex-scan) padding-box,
    var(--tex-noise) padding-box,
    var(--tex-hex) padding-box,
    linear-gradient(180deg, rgb(28 25 70), rgb(11 10 30)) padding-box,
    linear-gradient(135deg, var(--hud-a), var(--hud-b)) border-box;
}

/* painel calmo também ganha grão */
.panel { background: var(--tex-noise), linear-gradient(180deg, rgb(38 34 90 / .75), rgb(22 19 52 / .85)); }

/* alternativas do quiz: grão + listras */
.opt {
  background:
    var(--tex-noise),
    repeating-linear-gradient(-45deg, rgb(0 0 0 / .08) 0 6px, transparent 6px 13px) left bottom / 100% 50% no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--face) 78%, #fff), var(--face) 45%, color-mix(in srgb, var(--face) 85%, #000));
}

/* casas do bingo: pontinhos de cartela */
.sq { background: var(--tex-dots), var(--tex-noise), linear-gradient(180deg, #2c2768, #1c1946); }
.sq.done { background: var(--tex-dots), var(--tex-noise), linear-gradient(180deg, #ff6bd0, var(--magenta) 50%, #c21fb8); }
.sq.done.line { background: var(--tex-dots), var(--tex-noise), linear-gradient(180deg, #7cf2a6, var(--c-green) 50%, #179a4b); }

/* relógio: marcas de mostrador */
.ring {
  background:
    radial-gradient(closest-side, transparent 66%, var(--bg-2) 67% 78%, transparent 79%),
    repeating-conic-gradient(rgb(255 255 255 / .22) 0 1.2deg, transparent 1.2deg 15deg),
    radial-gradient(closest-side, var(--bg-2) 66%, transparent 67% 100%),
    conic-gradient(var(--c) calc(var(--p) * 1%), rgb(255 255 255 / .08) 0);
}

.lb-row { background: var(--tex-noise), linear-gradient(90deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); }
.modal .sheet { background: var(--tex-noise), var(--tex-hex), linear-gradient(180deg, #2a2566, #15123a); }
.toast { background: var(--tex-scan), var(--tex-noise), linear-gradient(180deg, #2c2768, #1a1740); }

/* telão: colmeia acesa ao fundo + piso de hexágonos em perspectiva */
.tv { position: relative; isolation: isolate; overflow: hidden; background: var(--tex-hexglow) center / cover no-repeat, var(--bg); }
.tv::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(80% 60% at 50% 30%, rgb(139 92 255 / .28), transparent 70%), linear-gradient(180deg, rgb(11 10 26 / .2), rgb(11 10 26 / .65));
}
.tv::after {
  content: ''; position: absolute; left: -25%; right: -25%; bottom: -8%; height: 46%; z-index: -1; pointer-events: none;
  background: var(--tex-hexfloor) center top / 1600px 700px repeat-x;
  background-size: 62% auto;
  transform: perspective(500px) rotateX(58deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(180deg, transparent, #000 45%);
  opacity: .7;
}
.tv .hud.metal { padding: 1.5em 1.4em 1.3em; }
.tv .hud.metal::after { inset: .5em; }
/* ===== FIM TEXTURAS ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* =====================================================================
   COMPATIBILIDADE COM AS TELAS DE JOGO
   ===================================================================== */
/* alternativa do quiz usa .btn.opt: mantém a letra de leitura e o alinhamento à esquerda */
.btn.opt { font-family: var(--f-ui); font-weight: 900; text-transform: none; letter-spacing: 0; justify-content: start; }
.btn.opt:disabled { filter: none; transform: none; cursor: default; }
.btn.opt.dim:disabled, .btn.opt.dim { filter: grayscale(.45); opacity: .32; }
.btn.opt.mine { outline: 4px solid var(--ink); outline-offset: 3px; }

/* telão: colmeia acesa ao fundo e piso de hexágonos em perspectiva */
body.telao::after {
  background:
    linear-gradient(180deg, rgb(11 10 26 / .25), rgb(11 10 26 / .55)),
    var(--tex-hexglow) center / cover no-repeat;
}
body.telao::before {
  inset: auto -25% -6% -25%; height: 40%;
  background: var(--tex-hexfloor) center top / 62% auto repeat-x;
  transform: perspective(500px) rotateX(58deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(180deg, transparent, #000 50%);
  opacity: .5;
}
body.telao h1, body.telao .title { text-shadow: 0 0 24px rgb(139 92 255 / .55), 0 4px 0 rgb(0 0 0 / .4); }
/* números grandes do telão em fonte de painel */
body.telao .clock, body.telao .code, body.telao .big-n, .clock, .big-n, .host-code, .bigbadge, .badge-input { font-family: var(--f-hud); }
body.telao .code { color: var(--c-yellow); text-shadow: 0 0 18px rgb(255 204 41 / .5); }
.qr { box-shadow: 0 0 0 6px #fff, 0 0 0 9px var(--cyan), 0 0 26px rgb(34 227 255 / .5); }

/* painéis e pílulas que as telas antigas montavam com borda escura */
.chip { background: var(--tex-noise), var(--surface) !important; }
.lb .r, .lb-row { font-weight: 800; }
.lb .r { background: var(--tex-noise), linear-gradient(90deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02)); }
.lb .r .pts, .lb .pts { font-family: var(--f-hud); color: var(--c-yellow); }
.podium .bar, .podium .bar2, .podium .b2 { box-shadow: inset 0 2px 0 rgb(255 255 255 / .4), 0 0 24px rgb(255 255 255 / .12); background-image: var(--tex-noise) !important; font-family: var(--f-hud); }
.progress { background: rgb(0 0 0 / .45) !important; border-color: color-mix(in srgb, var(--cyan) 50%, transparent) !important; }
.progress i { background: linear-gradient(90deg, var(--c-green), var(--cyan)) !important; box-shadow: 0 0 10px rgb(34 227 255 / .5); }

/* telão: barra de topo em placa, relógio grande em painel */
.topbar.plate { padding: 10px 16px; margin-bottom: 14px; }
.topbar.plate h1 { margin: 0; }
body.telao .clock { color: var(--c-yellow); text-shadow: 0 0 18px rgb(255 204 41 / .45); }
body.telao .hud { margin-top: 14px; }
body.telao .stat { background: var(--tex-noise), var(--surface) ; }
body.telao .stat b { font-family: var(--f-hud); color: var(--c-yellow); }
.hud .hud-tab .live-badge { box-shadow: none; }
.stats b, .mybadge b, .kpis b, .me .pts, .head .clock { font-family: var(--f-hud); }
.stats b, .me .pts { color: var(--c-yellow); }

/* =====================================================================
   IMPRESSÃO (relatório em PDF): papel branco, sem textura nem brilho
   ===================================================================== */
@media print {
  :root {
    --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-2: #f2f2f6; --card: #fff;
    --line: #c9c9d6; --ink: #14112e; --muted: #555066; color-scheme: light;
  }
  html, body { background: #fff !important; }
  body::before, body::after { display: none !important; }
  .panel, .hud, .stat, .tbl { background: #fff !important; box-shadow: none !important; filter: none !important; }
  .hud::before, .hud::after { display: none !important; }
  .hud { border: 1.5px solid var(--line); }
  h1, h2, h3 { text-shadow: none !important; }
  .eyebrow, .hud-label { color: var(--muted); }
}
.btn.ghost.danger { color: #ff8a98; border-color: rgb(255 59 82 / .6); box-shadow: inset 0 0 12px rgb(255 59 82 / .12); }

/* =====================================================================
   ÍCONES (icons.js): traço arredondado + preenchimento suave
   ===================================================================== */
.ico {
  width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; display: inline-block;
  fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}
.ico .d { fill: currentColor; fill-opacity: .22; }
.ico .s { fill: currentColor; stroke: none; }
.ico-play .s { stroke: currentColor; stroke-width: 1; }
.ico.gold { color: var(--c-yellow); filter: drop-shadow(0 0 6px rgb(255 204 41 / .5)); }
.ico.silver { color: #c9d2ff; }
.ico.bronze { color: var(--c-orange); }
.btn .ico { width: 1.1em; height: 1.1em; filter: drop-shadow(0 2px 0 rgb(0 0 0 / .2)); }
.btn.big .ico, .btn.huge .ico { stroke-width: 2.4; }
h1 .ico, h2 .ico { stroke-width: 2.3; }
/* ícone sozinho num selo/casa (ex.: ⭐ ❓ 👥 nas casas do bingo) */
.sq .kind .ico, .opt .shape .ico { width: 1.2em; height: 1.2em; }

/* =====================================================================
   LOGO GALERÔ (Anton): degradê de pôr do sol, retícula, grão, relevo 3D
   Uso: <span class="lx" data-t="Galerô"><span data-t="Galerô">Galerô</span></span>
   (+ .cyber para a versão ciano, .flat sem relevo, tamanho em --s)
   ===================================================================== */
.lx {
  --s: 1em;
  --sun: linear-gradient(180deg, #fff27a 0%, #ffc23d 22%, #ff7a3d 44%, #ff3d8b 66%, #c42bff 88%, #7a2bff 100%);
  --edge: #1c0638;
  position: relative; display: inline-block; isolation: isolate; padding-top: .12em;
  font-family: 'Anton', 'Impact', sans-serif; font-size: var(--s); line-height: .86; letter-spacing: .01em; font-weight: 400;
  text-transform: uppercase; white-space: nowrap; text-shadow: none;
  filter: drop-shadow(0 0 .12em rgb(255 61 160 / .45)) drop-shadow(0 .14em .16em rgb(0 0 0 / .5));
}
.lx::before {
  content: attr(data-t); position: absolute; inset: 0; z-index: -1; padding-top: inherit; color: var(--edge);
  -webkit-text-stroke: .1em var(--edge);
  text-shadow: 0 .015em 0 #3a0d63, 0 .03em 0 #3a0d63, 0 .045em 0 #2e0a50, 0 .06em 0 #2e0a50, 0 .075em 0 #22073d, 0 .09em 0 #22073d, 0 .105em 0 #170429;
}
.lx > span {
  position: relative; display: inline-block; color: transparent; text-shadow: none;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .5) 0 5%, rgb(255 255 255 / 0) 28%),
    linear-gradient(180deg, transparent 0 52%, rgb(255 255 255 / .1) 52% 54%, transparent 54%),
    radial-gradient(circle, rgb(90 0 110 / .28) 30%, transparent 34%) 0 0 / .045em .045em,
    var(--tex-noise),
    var(--sun);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: .012em rgb(255 255 255 / .55);
}
.lx.cyber { --sun: linear-gradient(180deg, #e9fdff 0%, #6ff3ff 25%, #22b8ff 50%, #8b5cff 78%, #ff3df2 100%); --edge: #070a2a;
  filter: drop-shadow(0 0 .12em rgb(34 227 255 / .45)) drop-shadow(0 .14em .16em rgb(0 0 0 / .5)); }
.lx.flat { filter: none; }
.lx.flat::before { text-shadow: none; -webkit-text-stroke: .08em var(--edge); }
/* em tamanho pequeno a retícula vira borrão: some */
.logo .lx > span { background: linear-gradient(180deg, rgb(255 255 255 / .45) 0 6%, transparent 30%), var(--sun); -webkit-background-clip: text; background-clip: text; }

/* marca no cabeçalho: ícone + nome */
.logo { gap: .4em; font-size: 26px; }
.logo img { width: 1.6em; height: 1.6em; flex: none; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .4)); }
.logo .lx { --s: 1.15em; }
body.telao .logo img { width: 2em; height: 2em; }
@media print { .lx, .lx::before { filter: none; text-shadow: none; } .lx > span { -webkit-text-fill-color: #c42bff; } }

/* o acento do "ô": a mesma seta do símbolo, desenhada (o acento fino da fonte ficava solto) */
.lx .o { position: relative; display: inline-block; line-height: inherit; font: inherit; color: inherit; }
.lx .o::after {
  content: ''; position: absolute; left: 50%; top: var(--hat-top, -.27em);
  width: .28em; height: .28em; box-sizing: border-box;
  border: solid var(--hat, #6ff3ff); border-width: .085em 0 0 .085em; border-radius: .035em 0 0 0;
  transform: translateX(-50%) rotate(45deg);
  filter: drop-shadow(0 .03em 0 var(--edge)) drop-shadow(0 0 .07em rgb(34 227 255 / .9));
}
.lx.cyber .o::after { --hat: #ffc23d; filter: drop-shadow(0 .03em 0 var(--edge)) drop-shadow(0 0 .07em rgb(255 122 61 / .9)); }
.lx.flat .o::after { filter: drop-shadow(0 .03em 0 var(--edge)); }

/* selo do plano no botão "Minha conta" */
.plan-pill { font-family: var(--f-hud); font-size: .78em; letter-spacing: .08em; padding: 1px 7px; border-radius: 5px; background: var(--c-yellow); color: var(--on-light); text-shadow: none; }

/* =====================================================================
   NOTIFICAÇÕES E CAIXAS DE DIÁLOGO (no lugar das do navegador)
   ===================================================================== */
.toast { all: unset; } /* zera o estilo antigo do toast único */
.toasts { position: fixed; z-index: 200; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; display: grid; gap: 10px; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
@media (max-width: 560px) { .toasts { left: 14px; right: 14px; width: auto; } }
.toasts .toast {
  all: revert; box-sizing: border-box; position: relative; overflow: hidden; pointer-events: auto;
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 14px 14px 16px; border-radius: 16px; color: #fff; font-family: var(--f-ui); font-weight: 800; font-size: 15.5px; line-height: 1.35;
  background: var(--tex-noise), linear-gradient(180deg, #2b2668, #17143c); border: 1.5px solid var(--tc, var(--c-green));
  box-shadow: 0 16px 34px rgb(0 0 0 / .45), 0 0 18px color-mix(in srgb, var(--tc, var(--c-green)) 35%, transparent);
  animation: toastIn .32s var(--ease-pop) both;
}
.toasts .toast.ok { --tc: var(--c-green); } .toasts .toast.err { --tc: var(--c-red); } .toasts .toast.info { --tc: var(--cyan); } .toasts .toast.warn { --tc: var(--c-yellow); }
.toasts .toast.out { animation: toastOut .24s ease-in both; }
.toasts .ticon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: var(--on-light);
  background: var(--tc, var(--c-green)); box-shadow: inset 0 2px 0 rgb(255 255 255 / .35), 0 3px 0 rgb(0 0 0 / .35); }
.toasts .toast.err .ticon, .toasts .toast.info .ticon { color: #fff; }
.toasts .tbody { display: grid; gap: 2px; min-width: 0; }
.toasts .tbody b { font-family: var(--f-display); font-weight: 400; font-size: 17px; letter-spacing: .02em; }
.toasts .tclose { all: unset; cursor: pointer; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #cfc8f0; font-size: 14px; }
.toasts .tclose:hover, .toasts .tclose:focus-visible { background: rgb(255 255 255 / .1); color: #fff; outline: 2px solid var(--cyan); }
.toasts .tbar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--tc, var(--c-green)); transform-origin: left; animation: toastBar linear forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 560px) { @keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.96); } } }

.dlg-back { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; padding: 18px;
  background: radial-gradient(circle at 50% 40%, rgb(40 20 90 / .55), rgb(5 4 18 / .82)); backdrop-filter: blur(5px); animation: fadeIn .18s ease both; }
.dlg-back.out { animation: fadeOut .18s ease both; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.dlg { width: min(460px, 100%); display: grid; justify-items: center; gap: 12px; text-align: center; padding: 34px 26px 24px; animation: dlgIn .32s var(--ease-pop) both; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.dlg .dlg-icon { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hud-a) 85%, #fff), var(--hud-a)); box-shadow: inset 0 2px 0 rgb(255 255 255 / .4), 0 5px 0 rgb(0 0 0 / .35), 0 0 24px color-mix(in srgb, var(--hud-a) 55%, transparent); }
.dlg.gold .dlg-icon, .dlg.green .dlg-icon { color: var(--on-light); }
.dlg h2 { font-size: clamp(22px, 4vw, 28px); line-height: 1.1; }
.dlg p { margin: 0; color: #e6e1ff; font-size: 16px; line-height: 1.5; }
.dlg .dlg-input { width: 100%; font-size: 17px; text-align: center; }
.dlg .dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; width: 100%; }
.dlg .dlg-actions .btn { flex: 1 1 140px; }
@media (prefers-reduced-motion: reduce) { .toasts .tbar { display: none; } }

/* banco de temas (editores) */
.bank { display: grid; gap: 10px; margin-top: 6px; }
.bank:empty { display: none; }
.bank-head { display: flex; gap: 8px 12px; align-items: baseline; flex-wrap: wrap; color: #e6e1ff; font-size: 14.5px; }
.bank-head b { color: var(--c-yellow); font-size: 16px; }
.bank-free { margin-left: auto; font-family: var(--f-hud); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-green); }
.bank-list { display: grid; gap: 8px; }
.bank-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: rgb(255 204 41 / .07); border: 1px solid rgb(255 204 41 / .35); }
.bank-theme { font-weight: 900; color: #fff; }
.bank-meta { color: #cfc8f0; font-size: 13.5px; margin-top: 2px; }
.bank-prev { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bank-prev span { font-size: 12.5px; padding: 3px 8px; border-radius: 8px; background: rgb(255 255 255 / .08); color: #e6e1ff; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-empty { margin: 0; color: #cfc8f0; font-size: 14px; }
@media (max-width: 560px) { .bank-item { grid-template-columns: 1fr; } }

/* =====================================================================
   PÁGINAS LEGAIS (termos e privacidade): leitura longa, contraste alto
   ===================================================================== */
.legal { display: grid; grid-template-columns: 260px 1fr; gap: 34px; align-items: start; margin-top: 24px; }
@media (max-width: 860px) { .legal { grid-template-columns: 1fr; } }
.legal nav { position: sticky; top: 16px; display: grid; gap: 4px; padding: 16px; border-radius: 16px; background: rgb(11 10 26 / .78); border: 1px solid rgb(255 255 255 / .12); }
@media (max-width: 860px) { .legal nav { position: static; } }
.legal nav b { font-family: var(--f-hud); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 6px; }
.legal nav a { color: #e6e1ff; text-decoration: none; font-size: 14.5px; padding: 5px 8px; border-radius: 8px; }
.legal nav a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.legal article { max-width: 760px; padding: 30px clamp(18px, 4vw, 44px); border-radius: 22px; background: rgb(11 10 26 / .85); border: 1px solid rgb(255 255 255 / .12); }
.legal article h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 6px; }
.legal article .upd { color: #cfc8f0; margin: 0 0 20px; }
.legal article h2 { font-size: 24px; margin: 34px 0 10px; scroll-margin-top: 20px; color: var(--c-yellow); }
.legal article h3 { font-size: 18px; margin: 20px 0 6px; font-family: var(--f-ui); font-weight: 900; color: #fff; }
.legal article p, .legal article li { color: #ece8ff; font-size: 16.5px; line-height: 1.7; font-weight: 600; }
.legal article ul { padding-left: 22px; display: grid; gap: 6px; }
.legal article a { color: var(--cyan); }
.legal article .box { padding: 14px 18px; border-radius: 14px; background: rgb(34 227 255 / .08); border: 1px solid rgb(34 227 255 / .35); }
.legal article table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.legal article th, .legal article td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgb(255 255 255 / .1); vertical-align: top; color: #ece8ff; }
.legal article th { color: #fff; font-family: var(--f-hud); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.legal .tblw { overflow-x: auto; }
/* dado da empresa ainda por preencher */
.ph { background: rgb(255 204 41 / .2); color: var(--c-yellow); border-radius: 5px; padding: 0 5px; font-weight: 900; }
@media print {
  .legal { grid-template-columns: 1fr; } .legal nav, .topbar { display: none !important; }
  .legal article { background: #fff; border: 0; } .legal article * { color: #111 !important; }
}

/* =====================================================================
   CELULAR DE QUEM JOGA (body.phone): ler tudo de primeira, sem esforço
   - o fundo de pontos/ondas fica bem apagado (atrapalhava as letras)
   - texto secundário mais claro
   - blocos de texto soltos (espera, recap) ganham painel sólido
   - a barra do jogador (nome, posição, pontos) vira um painel fixo no topo
   ===================================================================== */
body.phone::after { opacity: .16; }
body.phone::before { opacity: .5; }
body.phone { --muted: #e2deff; }
body.phone .wrap { padding-top: 12px; padding-bottom: 28px; }
body.phone .center { background: #17143a; border: 1.5px solid #3b3678; border-radius: 18px; padding: 22px 18px; margin-top: 4vh;
  box-shadow: 0 10px 24px rgb(0 0 0 / .35); }
body.phone .center h2 { font-size: clamp(24px, 7vw, 30px); }
body.phone .center p { margin: 0; line-height: 1.5; }
body.phone .me { position: sticky; top: 0; z-index: 5; background: #17143a; border: 1.5px solid #3b3678; border-radius: 16px;
  padding: 10px 14px; box-shadow: 0 8px 20px rgb(0 0 0 / .4); }
body.phone .me .name { color: #fff; font-weight: 900; }
body.phone .me .pts { color: var(--c-yellow); font-family: 'Chakra Petch', sans-serif; font-weight: 700; }
body.phone .panel { background: #17143a; }
body.phone h1, body.phone h2, body.phone h3 { text-shadow: 0 2px 0 rgb(0 0 0 / .45); }

/* ---------- telão: relógio em anel (Mostra Aí!, Desenha e Adivinha) ---------- */
.tring { position: relative; width: clamp(92px, 8.5vw, 132px); aspect-ratio: 1; display: grid; place-content: center; justify-items: center; flex: none; }
.tring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.tring circle { fill: none; stroke-width: 8; }
.tring .trk { stroke: rgb(255 255 255 / .1); }
.tring .val { stroke: var(--cyan); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .1s linear, stroke .3s; filter: drop-shadow(0 0 6px rgb(34 227 255 / .8)); }
.tring b { font-family: 'Anton', sans-serif; font-size: clamp(34px, 3.4vw, 54px); line-height: 1; font-variant-numeric: tabular-nums; position: relative; }
.tring small { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #cfc9ff; position: relative; }
.tring.hot .val { stroke: var(--c-red); filter: drop-shadow(0 0 8px rgb(255 59 82 / .9)); }
.tring.hot b { color: #ffd0d6; animation: pulse-hot 1s ease-in-out infinite; }
.tring.wait .val { stroke: var(--c-yellow); filter: drop-shadow(0 0 6px rgb(255 204 41 / .8)); }
@media (prefers-reduced-motion: reduce) { .tring.hot b { animation: none; } }

/* ---------- telão: balões de "Fulano entrou na sala!" (arrivals.js) ---------- */
/* canto de baixo à direita: na espera é área livre (o QR e o código ficam à esquerda) */
.arrivals { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px; pointer-events: none; max-width: min(460px, 46vw); }
.arrival { --ac: var(--cyan); --dark: color-mix(in srgb, var(--ac) 30%, #0d0b24);
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; min-width: 230px;
  border-radius: 18px 18px 6px 18px; color: #fff; border: 2px solid color-mix(in srgb, var(--ac) 80%, #fff);
  /* cada pessoa com a sua cor: degradê da cor + linhas de varredura + brilho de vidro em cima */
  background:
    linear-gradient(180deg, rgb(255 255 255 / .22), rgb(255 255 255 / 0) 45%),
    repeating-linear-gradient(0deg, rgb(255 255 255 / .06) 0 1px, transparent 1px 4px),
    linear-gradient(120deg, color-mix(in srgb, var(--ac) 75%, #1d1440), var(--dark));
  box-shadow: 0 10px 26px rgb(0 0 0 / .45), 0 0 22px color-mix(in srgb, var(--ac) 45%, transparent), inset 0 1px 0 rgb(255 255 255 / .35);
  font-size: clamp(16px, 1.35vw, 22px); font-weight: 700; line-height: 1.2; text-shadow: 0 1px 2px rgb(0 0 0 / .45);
  transform-origin: 100% 100%; animation: arrive-in .55s cubic-bezier(.2, 1.4, .4, 1) both; }
/* rabinho do balão (na cor escura do degradê) */
.arrival::after { content: ''; position: absolute; right: 16px; bottom: -9px; width: 14px; height: 14px; background: var(--dark);
  border-right: 2px solid color-mix(in srgb, var(--ac) 80%, #fff); border-bottom: 2px solid color-mix(in srgb, var(--ac) 80%, #fff);
  transform: rotate(45deg); border-bottom-right-radius: 3px; }
/* cantinho "HUD" no alto à esquerda */
.arrival::before { content: ''; position: absolute; left: 8px; top: 6px; width: 14px; height: 14px; border-left: 2px solid rgb(255 255 255 / .55);
  border-top: 2px solid rgb(255 255 255 / .55); border-top-left-radius: 4px; }
.arrival .av { flex: none; width: 2.1em; height: 2.1em; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--dark);
  font-family: 'Lilita One', sans-serif; font-size: 1.05em; text-shadow: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 60%, transparent), inset 0 -3px 0 rgb(0 0 0 / .12); }
.arrival .tx { display: grid; gap: 1px; white-space: nowrap; }
.arrival .tx b { font-family: 'Lilita One', sans-serif; font-weight: 400; color: #fff; font-size: 1.1em; }
.arrival .tx .ph { color: #fff; opacity: .92; }
.arrival .tx small { font-size: .72em; font-weight: 800; color: #fff; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.arrival.out { animation: arrive-out .45s ease both; overflow: hidden; transition: height .45s ease .15s, padding .45s ease .15s, margin .45s ease .15s, border-width .45s ease .15s; }
.arrival.out.closing { height: 0 !important; padding-top: 0; padding-bottom: 0; margin-top: -14px; border-width: 0; }
.arrival.out::after { display: none; }
@keyframes arrive-in { 0% { opacity: 0; transform: translateX(40px) scale(.6); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes arrive-out { to { opacity: 0; transform: translateX(60px); } }
@media (prefers-reduced-motion: reduce) { .arrival, .arrival.out { animation: none; } }
@media (max-width: 700px) { .arrivals { max-width: calc(100vw - 36px); } }

/* ---------- telão: quem já está na sala (cartões coloridos, a mesma cor do balão de chegada) ---------- */
.roster { display: flex; flex-wrap: wrap; gap: 10px; max-height: 34vh; overflow: hidden; align-content: flex-start;
  mask-image: linear-gradient(180deg, #000 85%, transparent); }
.roster .who { --ac: var(--cyan); display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 4px),
    linear-gradient(120deg, color-mix(in srgb, var(--ac) 38%, #17143a), #17143a 80%);
  border: 1.5px solid color-mix(in srgb, var(--ac) 70%, transparent);
  box-shadow: 0 4px 12px rgb(0 0 0 / .3); font-weight: 800; font-size: clamp(15px, 1.15vw, 19px); color: #fff; }
.roster .who .av { width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ac); color: #1d1a2e; font-family: 'Lilita One', sans-serif; font-weight: 400; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18); }
.roster .who .nm { display: grid; line-height: 1.1; }
.roster .who small { font-size: .7em; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #e6e1ff; opacity: .85; }
.roster .who.wait { opacity: .6; border-style: dashed; }
.roster .who.new { animation: roster-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes roster-pop { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .roster .who.new { animation: none; } }

/* sala de espera do telão em tela estreita: QR em cima, pessoas embaixo */
@media (max-width: 900px) { body.telao .lobby { grid-template-columns: 1fr !important; } }
body.telao .lobby #qrBox { width: 100%; }
body.telao .lobby .code { font-size: clamp(48px, 6.5vw, 96px); }

/* =====================================================================
   TELÃO: sempre do tamanho da tela, sem rolagem (TV não tem barra de rolagem).
   O que passar da altura é encolhido por inteiro pelo common.js (fitTelao), como um "ajustar à tela".
   ===================================================================== */
html:has(body.telao) { overflow: hidden; }
body.telao { height: 100dvh; overflow: hidden; }
body.telao > .wrap { height: 100dvh; display: flex; flex-direction: column; padding-top: 10px; padding-bottom: 10px; box-sizing: border-box; }
body.telao > .wrap > .topbar { flex: none; }
body.telao > .wrap > section { flex: none; min-height: 0; transform-origin: 50% 0; }
/* listas longas do telão (mural do fim, galeria de desenhos): mostram o que cabe e esmaecem embaixo, sem rolar */
body.telao #wall, body.telao .gallery { max-height: 58vh; overflow: hidden; mask-image: linear-gradient(180deg, #000 82%, transparent); }
