:root {
  --bg: #0d0c0b;
  --panel: #171512;
  --panel-2: #201d19;
  --line: #2e2a24;
  --text: #f4efe6;
  --muted: #a8a196;
  --accent: #ffc23d;
  --accent-ink: #1a1408;
  --ok: #4ade80;
  --bad: #ff7a6b;
  --radius: 14px;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 1120px; margin: 0 auto; padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); }

/* marca */
.marca { font-family: var(--display); font-weight: 900; letter-spacing: .02em; line-height: .9; text-transform: uppercase; margin: 0; }
.marca b { color: var(--accent); }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.topo .marca { font-size: 28px; }
.topo a { color: inherit; text-decoration: none; }

/* blocos */
.cartao { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.estreito { max-width: 460px; margin: 0 auto; }
h1, h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: 1; margin: 0 0 8px; }
h2 { font-size: 30px; }
.sub { color: var(--muted); margin: 0 0 20px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }

.campo {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  font-size: 17px;
}
.campo:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(255 194 61 / .25); }
.campo::placeholder { color: #77716a; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, background .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.prim { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.prim:hover:not(:disabled) { background: #ffcf61; }
.btn.fantasma { background: transparent; }
.btn.fantasma:hover:not(:disabled) { background: var(--panel-2); }
.btn.cheio { width: 100%; }
.erro { color: var(--bad); font-size: 14px; min-height: 21px; margin: 8px 0 0; }

/* início */
.hero { text-align: center; padding: 6vh 0 28px; }
.hero .marca { font-size: clamp(64px, 18vw, 128px); }
.hero p { color: var(--muted); font-size: 18px; max-width: 30ch; margin: 16px auto 0; }
.fita { display: flex; justify-content: center; gap: 6px; margin: 24px 0 0; }
.fita span {
  width: 44px; height: 30px; border-radius: 4px; border: 2px solid var(--line);
  display: grid; place-items: center; font: 700 14px/1 var(--display); color: var(--muted);
}
.fita span:first-child { border-color: var(--accent); color: var(--accent); }
.form-linha { display: grid; gap: 10px; }
.regras { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.regras li { display: flex; gap: 10px; }
.regras li::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--accent); }

/* lobby */
.link-sala { display: flex; gap: 8px; margin: 4px 0 12px; }
.link-sala .campo { font-size: 15px; color: var(--muted); }
.acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.acoes .btn { flex: 1 1 160px; }

/* jogadores */
.jogadores { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.jogador { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.jogador.off { opacity: .45; }
.avatar { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #111; }
.jogador .nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.jogador .nome small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.jogador .st { font-size: 13px; color: var(--muted); white-space: nowrap; }
.jogador .st.ok { color: var(--ok); }
.jogador .st.bad { color: var(--bad); }
.jogador .pts { font: 900 22px/1 var(--display); min-width: 34px; text-align: right; }

/* jogo */
.barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.barra .rod { font: 700 20px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.barra .rod span { color: var(--muted); }
.relogio { font: 900 22px/1 var(--display); padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.relogio.urgente { color: var(--bad); border-color: var(--bad); }

.grade { display: grid; gap: 16px; }
@media (min-width: 900px) { .grade { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }

.tela {
  position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
}
.tela img { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .25s ease; }
.tela img.on { opacity: 1; }
.tela .selo {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgb(0 0 0 / .7); font-size: 13px; font-weight: 600; backdrop-filter: blur(4px);
}
.tela.treme { animation: treme .35s ease; }
@keyframes treme { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.frames { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0 4px; }
.frames button {
  min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel);
  font: 700 18px/1 var(--display); display: grid; place-items: center; gap: 2px; padding: 4px 0;
}
.frames button small { font: 500 11px/1 Inter, sans-serif; color: var(--muted); }
.frames button:disabled { opacity: .35; cursor: not-allowed; }
.frames button.ativo { border-color: var(--accent); background: rgb(255 194 61 / .12); color: var(--accent); }
.dica { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.dica b { color: var(--accent); }

.chute { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.combo { position: relative; }
.sugestoes {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 5;
  list-style: none; margin: 0; padding: 6px; max-height: 300px; overflow: auto; overscroll-behavior: contain;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 -12px 32px rgb(0 0 0 / .5);
}
.sugestoes li { padding: 10px 12px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.sugestoes li small { display: block; color: var(--muted); font-size: 13px; }
.sugestoes li[aria-selected="true"], .sugestoes li:hover { background: rgb(255 194 61 / .14); }
.pular { margin-top: 8px; }
.abas { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.aba { min-height: 44px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--muted); }
.aba[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.meu-chute { margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: rgb(255 194 61 / .1); border: 1px solid rgb(255 194 61 / .35); font-size: 15px; }
.meu-chute strong { color: var(--accent); }
.espera { color: var(--ok); font-size: 14px; text-align: center; margin: 10px 0 0; }
.respostas { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.resposta { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.resposta .corpo { flex: 1; min-width: 0; display: grid; gap: 4px; }
.resposta p { margin: 0; }
.resposta .quem { font-weight: 600; }
.resposta .quem small { color: var(--muted); font-weight: 500; }
.resposta .texto { font-size: 17px; overflow-wrap: anywhere; }
.resposta .st { font-size: 14px; color: var(--muted); }
.resposta .st.ok { color: var(--ok); }
.resposta .st.bad { color: var(--bad); }
.resposta .pts { font: 900 24px/1 var(--display); color: var(--accent); align-self: center; }
.votos { display: flex; gap: 8px; margin-top: 4px; }
.btn.voto { min-height: 44px; flex: 1; }
.btn.voto.sim { background: var(--ok); border-color: var(--ok); color: #06210f; }
.btn.voto.nao { background: var(--bad); border-color: var(--bad); color: #2b0703; }
.palpites { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.palpites li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgb(255 122 107 / .12); color: var(--bad); }
.palpites li.pulo { background: var(--panel-2); color: var(--muted); }

.resultado { text-align: center; padding: 18px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.resultado .era { color: var(--muted); font-size: 14px; margin: 0; }
.resultado .titulo { font: 900 clamp(30px, 6vw, 44px)/1 var(--display); text-transform: uppercase; margin: 6px 0; color: var(--accent); }
.resultado .orig { color: var(--muted); margin: 0; }
.resultado .meu { font-weight: 700; margin: 12px 0 0; }
.resultado .meu.ok { color: var(--ok); }
.resultado .prox { color: var(--muted); font-size: 14px; margin: 10px 0 0; font-variant-numeric: tabular-nums; }

/* fim */
.podio { text-align: center; padding: 8px 0 20px; }
.podio .marca { font-size: clamp(44px, 12vw, 84px); }
.podio p { color: var(--muted); margin: 8px 0 0; font-size: 18px; }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); font-weight: 700; padding: 12px 18px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; z-index: 20;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.ok { background: var(--ok); color: #06210f; }
#toast.bad { background: var(--bad); color: #2b0703; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
