/* Clube do Mathias: estilos comuns da tela do Clube (index.html) e do menu do futebol (futebol/index.html).
   Um visual só: estádio à noite, com as cores e o contorno grosso da logo. */
:root {
  color-scheme: dark;
  /* cores tiradas da logo */
  --noite: #070c16;          /* fundo */
  --noite-2: #0c1528;        /* cartões */
  --noite-3: #13213d;        /* céu dos desenhos */
  --contorno: #04070d;       /* contorno grosso, como o do escudo */
  --azul: #1f7bff;           /* borda do escudo */
  --azul-claro: #6fb0ff;
  --azul-sombra: #0a3a8c;
  --verde: #6cc93a;
  --grama-1: #2a7626;
  --grama-2: #33882d;
  --grama-fora: #1f4f26;
  --ouro: #ffc21a;           /* coroa */
  --ouro-claro: #ffe27a;
  --ouro-escuro: #c98d00;
  --laranja: #ff8a1f;
  --laranja-escuro: #c85f0a;
  --branco: #f4f6f8;
  --cinza: #c3cddb;
  --tinta: #9db0cf;          /* texto apagado */
  --pele: #e0a982;
  --madeira-1: #c98f55;
  --madeira-2: #b77d45;
  --quadra-fora: #2b3546;
  --vermelho: #ff3b30;
  /* luzes e sombras */
  --halo-azul: rgba(31, 123, 255, .34);
  --halo-verde: rgba(108, 201, 58, .14);
  --halo-luz: rgba(200, 222, 255, .16);
  --reflexo: rgba(255, 255, 255, .62);
  --verniz: rgba(255, 255, 255, .12);
  --apagado: rgba(157, 176, 207, .28);
  --linha: rgba(255, 255, 255, .22);
  --painel: rgba(6, 10, 18, .74);
  --sombra: rgba(0, 0, 0, .55);
  /* letras: placa grossa (parecida com a da logo) e a condensada dos jogos */
  --fonte: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --fonte-placa: "Russo One", "Arial Black", Impact, system-ui, sans-serif;
  /* letra do sistema (a do iPhone/iPad) para os textos de interface; as de cima ficam nos títulos grandes */
  --fonte-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  /* a mesma letra do sistema, na versão redondinha do iPad (SF Rounded): saudação, abas e botões */
  --fonte-redonda: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  /* acabamento de iOS: cantos contínuos, vidro fosco, sombras macias e toque com mola */
  --raio: 22px;
  --vidro: rgba(16, 24, 42, .9);          /* sem blur no aparelho: mais escuro para ler bem */
  --borda-vidro: rgba(255, 255, 255, .14);
  --brilho-vidro: inset 0 1px 0 rgba(255, 255, 255, .12);
  --sombra-macia: 0 10px 30px rgba(0, 0, 0, .42), 0 2px 6px rgba(0, 0, 0, .25);
  --mola: cubic-bezier(.2, .9, .3, 1);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  :root { --vidro: rgba(30, 40, 64, .5); }
}

*, *::before, *::after { box-sizing: border-box; }
/* tela cheia: a página ocupa a tela toda (no Safari, a altura dinâmica 100dvh; antes dela, 100%).
   O espaço da barra de status e da barrinha de baixo (safe-area) fica por dentro do body, com o fundo do estádio atrás. */
html { height: 100%; background: var(--noite); -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { position: relative; z-index: 0; margin: 0; min-height: 100%; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
       padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px); overscroll-behavior: none;
       background: var(--noite); color: var(--branco); font-family: var(--fonte); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
       /* no iPad/iPhone: segurar o dedo não seleciona texto nem abre menu, e tocar rápido não dá zoom */
       -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
/* nos campos de escrever (nome do piloto, da cozinha...) o texto volta a ser selecionável: no Safari antigo, sem isto, não dava para digitar */
input, textarea { -webkit-user-select: text; user-select: text; }
/* céu do estádio: brilho azul no alto, refletores nos cantos e um pouco de grama embaixo */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 42% at 50% -4%, var(--halo-azul), transparent 72%),
    radial-gradient(28% 24% at 6% 0%, var(--halo-luz), transparent 70%),
    radial-gradient(28% 24% at 94% 0%, var(--halo-luz), transparent 70%),
    radial-gradient(120% 38% at 50% 112%, var(--halo-verde), transparent 72%),
    var(--noite); }
@supports (min-height: 100dvh) { body { min-height: 100dvh; } }
main { flex: 1 0 auto; }
a:focus-visible { outline: 4px solid var(--ouro); outline-offset: 4px; }

/* Escudo: a logo com um reflexo recortado pelo formato dela (a máscara é a própria logo) */
.escudo { position: relative; display: block; width: var(--tam-logo, 220px); max-width: 100%; aspect-ratio: 720 / 740; }
.escudo img { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
              filter: drop-shadow(0 10px 22px var(--sombra)) drop-shadow(0 0 22px var(--halo-azul)); transition: filter .6s ease; }
.reflexo { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, var(--reflexo) 50%, transparent 58%) no-repeat 0 0 / 300% 100%;
  -webkit-mask-image: url(../marca/logo.webp); mask-image: url(../marca/logo.webp);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: brilho 6.5s 1.4s ease-in-out infinite; }
/* 100% = reflexo escondido à esquerda, 0% = escondido à direita: passa da esquerda para a direita */
@keyframes reflexo { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes brilho { 0% { background-position: 100% 0; } 22%, 100% { background-position: 0% 0; } }

/* Botão de voltar como o do iOS: setinha fina (‹) + nome, numa pílula de vidro fosco (mesmo jeito do "‹ Futebol" dos jogos) */
.voltar { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 120px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px;
          border: 1px solid var(--borda-vidro); background: var(--vidro); box-shadow: var(--brilho-vidro), var(--sombra-macia); color: var(--ouro); text-decoration: none;
          -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
          font: 600 17px/1 var(--fonte-ui); letter-spacing: -.01em; white-space: nowrap;
          transition: transform .16s var(--mola), opacity .16s ease, background-color .16s ease; }
.voltar::before { content: ""; flex: none; width: 10px; height: 10px; margin-left: 4px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor;
                  border-radius: 1px; transform: rotate(45deg); }
.voltar:active { transform: scale(.97); opacity: .8; }
@media (hover: hover) { .voltar:hover { background: rgba(255, 255, 255, .14); } }

/* Cartões no jeito do iOS: cantos bem arredondados, borda fininha azul da logo, brilho no alto e sombra macia */
.cartao { position: relative; display: grid; align-items: center; border-radius: var(--raio); border: 1.5px solid rgba(111, 176, 255, .45);
          background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 60%), var(--noite-2);
          box-shadow: var(--brilho-vidro), var(--sombra-macia); color: var(--branco); text-decoration: none; overflow: hidden;
          transition: transform .18s var(--mola), box-shadow .18s ease, border-color .18s ease; }
@media (hover: hover) {
  a.cartao:hover { transform: translateY(-3px); border-color: var(--azul-claro);
                   box-shadow: var(--brilho-vidro), 0 16px 36px rgba(0, 0, 0, .45), 0 0 30px var(--halo-azul); }
}
/* toque: encolhe de leve e volta rápido, com mola */
a.cartao:active { transform: scale(.97); transition-duration: .1s; }
.cartao-nome { display: block; font-family: var(--fonte-placa); font-weight: 400; line-height: 1; text-transform: uppercase; letter-spacing: .02em;
               text-shadow: 0 3px 0 var(--contorno); }
.cartao-sub { display: block; font-family: var(--fonte-ui); font-weight: 500; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }

/* Tintas dos desenhos em SVG (cores chapadas e contorno grosso, no estilo da logo) */
.t { stroke: var(--contorno); stroke-linecap: round; stroke-linejoin: round; }
.t-branco { stroke: var(--branco); stroke-linecap: round; stroke-linejoin: round; }
.t-linha { stroke: var(--branco); stroke-opacity: .85; }
.t-rede { stroke: var(--branco); stroke-opacity: .38; }
.t-ouro { stroke: var(--ouro); stroke-linecap: round; }
.t-laranja { stroke: var(--laranja); stroke-linecap: round; }
.f-branco { fill: var(--branco); }
.f-escuro { fill: var(--contorno); }
.f-cinza { fill: var(--cinza); }
.f-ouro { fill: var(--ouro); }
.f-ouro-claro { fill: var(--ouro-claro); }
.f-ouro-escuro { fill: var(--ouro-escuro); }
.f-laranja { fill: var(--laranja); }
.f-laranja-escuro { fill: var(--laranja-escuro); }
.f-azul { fill: var(--azul); }
.f-pele { fill: var(--pele); }
.f-ceu { fill: var(--noite-3); }
.f-luz { fill: var(--halo-luz); }
.f-grama-1 { fill: var(--grama-1); }
.f-grama-2 { fill: var(--grama-2); }
.f-grama-fora { fill: var(--grama-fora); }
.f-madeira-1 { fill: var(--madeira-1); }
.f-madeira-2 { fill: var(--madeira-2); }
.f-quadra-fora { fill: var(--quadra-fora); }

/* Entrada em cascata: cada .cascata usa --i para saber a sua vez (só roda com .anima num pai) */
@keyframes chega { from { opacity: 0; transform: translateY(22px) scale(.96); } }
@keyframes aparece { from { opacity: 0; } }
@keyframes pulo { from { transform: scale(.9); } 60% { transform: scale(1.03); } }
.anima .cascata { animation: chega .55s cubic-bezier(.2, .9, .3, 1.12) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }

@media (prefers-reduced-motion: reduce) {
  .anima .cascata { animation-name: aparece; animation-duration: .4s; animation-timing-function: ease; }
  .reflexo { animation: none; }
  .cartao, a.cartao:hover, a.cartao:active, .voltar, .voltar:active { transition: none; transform: none; }
}

/* ---------- Aplicativo (app/): barrinha da instalação, chip "Tem novidade!" e o aviso "baixando vozes…" ---------- */
/* Barrinha da primeira instalação (comum/app.js, só na tela do Clube): um fio no pé da tela com o texto em cima; não atrapalha nada */
.app-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
             padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 6px); opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s var(--mola); }
.app-barra-vista { opacity: 1; transform: none; }
.app-barra-texto { font: 500 13px/1.2 var(--fonte-ui); color: var(--tinta); letter-spacing: -.01em; text-shadow: 0 1px 2px var(--sombra); }
.app-barra-fio { display: block; width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.app-barra-cheio { display: block; width: 0; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--azul), var(--azul-claro)); box-shadow: 0 0 10px var(--halo-azul); transition: width .3s ease; }
/* Chip "Tem novidade! Atualizar" (só na tela do Clube): pílula de vidro no pé da tela; tocar troca a versão e recarrega */
.app-novidade { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); z-index: 60; display: inline-flex; align-items: center; gap: 8px;
                min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--borda-vidro); background: var(--vidro); box-shadow: var(--brilho-vidro), var(--sombra-macia);
                -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); color: var(--branco); font: 500 16px/1 var(--fonte-ui); letter-spacing: -.01em;
                white-space: nowrap; cursor: pointer; -webkit-appearance: none; appearance: none; opacity: 0; transform: translate(-50%, 20px); transition: opacity .35s ease, transform .35s var(--mola); }
.app-novidade b { color: var(--ouro); font-weight: 700; }
.app-novidade-vista { opacity: 1; transform: translate(-50%, 0); }
.app-novidade-vista:active { transform: translate(-50%, 0) scale(.97); }
.app-novidade:disabled { opacity: .7; cursor: default; }
/* "baixando vozes…" (comum/narrador.js): aviso pequenininho no canto de baixo, só quando um pacote demora mais de 1 s; some quando chega */
.narrador-baixando { position: fixed; left: calc(env(safe-area-inset-left, 0px) + 10px); bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); z-index: 60; pointer-events: none;
                     display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--borda-vidro); background: var(--painel);
                     color: var(--tinta); font: 500 12px/1 var(--fonte-ui); letter-spacing: .01em; opacity: 0; transition: opacity .3s ease; }
.narrador-baixando::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--azul-claro); box-shadow: 0 0 8px var(--azul-claro); animation: narrador-pisca 1.1s ease-in-out infinite; }
.narrador-baixando-vista { opacity: 1; }
@keyframes narrador-pisca { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .narrador-baixando::before { animation: none; }
  .app-barra, .app-novidade, .narrador-baixando { transition: none; }
}

/* ======================================================================================================================
   SISTEMA DE DESENHO DO CLUBE: as classes padrão de todas as telas dos jogos (a receita é a do Kart, kart/index.html).
   As 8 regras:
     1. Só dois botões: .botao-jogar (pílula dourada, o principal, um por tela, com a setinha) e .botao-2 (pílula de vidro,
        os outros). Lado a lado, dentro de .acoes, ficam do mesmo tamanho.
     2. Um voltar só: .voltar ("‹ Clube" ou "‹ Voltar") no canto de cima à esquerda, sempre com a palavra (nunca font-size: 0).
     3. Um título só por tela: .titulo (Russo One, sombra azul); nas telas de dentro, .titulo.menor.
     4. Controles: .bt redondos de vidro, só o símbolo, a cor diz a função (.acelera verde = acelerar/correr, .freia vermelho =
        freio/chute, .acao azul = ação/ré, .item dourado = turbo/item); #joy embaixo à esquerda, #botoes em losango à direita
        (.cima, .baixo, .esq, .dir).
     5. Telas: .tela (camada fixa que rola) > .caixa (.larga = até 560px) com .acoes grudado no pé (position: sticky, com um
        degradê): o botão principal aparece sempre, sem rolar. Deitado e baixinho (até 560px de altura): .caixa.colunas = duas
        colunas minmax(0, 1fr); .tela.menu deixa o lugar do voltar à esquerda, como no Kart.
     6. Pausa e fim iguais: .tela.pausa (título + coluna de botões no meio; a HUD some com body.pausado) e
        .final-cartao (cartão de vidro com as estrelas ou o pódio, os números em .final-numeros > .hud-pilula e os botões em .acoes).
     7. HUD mínima: .hud-pilula (38px, desenho + número) nos cantos (.hud-esq / .hud-dir, linhas .hud-linha), .bt-pausa redondo,
        avisos em .hud-aviso (pílula curta no alto, 1,2 s; nunca texto grande no meio) e .carregando ("Preparando…") até o primeiro quadro.
     8. Chip, opções e níveis iguais em todo jogo: .perfilBt (38px, desenho + nome + ˅), .opcao[role=switch] (interruptor verde
        do iOS) e .niveis/.nivel (pílulas de escolha, a escolhida em azul; .segs/.seg é a mesma receita).
   Tudo fica dentro de :where(): peso zero. O CSS de cada página ganha sempre (até um seletor simples como .titulo), então nada
   do que os jogos já têm muda; estas classes são o alvo: ao adotar, o jogo apaga a cópia local e fica só com o markup.
   Os @keyframes daqui têm o prefixo "clube-" para não bater com os das páginas.
   ====================================================================================================================== */
:where([hidden]) { display: none !important; }
:where(.anima-entra) { animation: chega .5s cubic-bezier(.2, .9, .3, 1.12) both; }

/* ---- 1. Os dois botões ---- */
:where(.botao-jogar) { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 60px; min-width: 200px; padding: 0 32px; border: 0; border-radius: 999px;
                       background: var(--ouro); color: var(--contorno); cursor: pointer; font: 700 23px/1 var(--fonte-ui); letter-spacing: -.01em; text-decoration: none;
                       box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 22px rgba(255, 194, 26, .38); transition: transform .16s var(--mola); -webkit-tap-highlight-color: transparent; }
:where(.botao-jogar)::after { content: ""; flex: none; border-left: 17px solid currentColor; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 2px; }
:where(.botao-2) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; min-width: 150px; padding: 0 22px; border: 0; border-radius: 999px;
                   background: rgba(120, 128, 150, .32); color: var(--branco); cursor: pointer; font: 600 17px/1 var(--fonte-ui); letter-spacing: -.01em; text-decoration: none;
                   box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px rgba(0, 0, 0, .3); transition: transform .16s var(--mola); -webkit-tap-highlight-color: transparent; }
:where(.botao-jogar:active, .botao-2:active) { transform: scale(.96); }
:where(.botao-jogar:focus-visible, .botao-2:focus-visible) { outline: 4px solid #fff; outline-offset: 4px; }
:where(.botao-jogar:disabled, .botao-2:disabled) { opacity: .5; cursor: default; }
/* botão de vidro "escolhido" (uma escolha entre várias, como o som do motor): fica azul, igual aos níveis */
:where(.botao-2.escolhido) { background: var(--azul); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 12px rgba(31, 123, 255, .4); }

/* ---- 3. Título ---- */
:where(.titulo) { margin: 0; font: 400 clamp(40px, 10vmin, 76px)/1 var(--fonte-placa); text-transform: uppercase; letter-spacing: .03em;
                  text-shadow: 0 4px 0 var(--azul-sombra), 0 0 26px var(--halo-azul); }
:where(.titulo.menor) { font-size: clamp(28px, 6.5vmin, 48px); }

/* ---- 5. Telas: camada fixa que rola, conteúdo no meio, ações grudadas no pé ---- */
:where(.tela) { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-start; align-items: flex-start; overflow: auto; -webkit-overflow-scrolling: touch;
                padding: calc(env(safe-area-inset-top, 0px) + 64px) calc(env(safe-area-inset-right, 0px) + 16px) calc(env(safe-area-inset-bottom, 0px) + 18px) calc(env(safe-area-inset-left, 0px) + 16px);
                background: radial-gradient(ellipse at 50% 45%, rgba(7, 12, 22, .25), rgba(7, 12, 22, .82) 78%); }
:where(.tela > .caixa) { margin: auto; }
:where(.tela .voltar) { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); left: calc(env(safe-area-inset-left, 0px) + 16px); z-index: 2; }
:where(.tela .caixa) { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2vh, 16px); text-align: center; }
:where(.tela .caixa.larga) { width: min(100%, 560px); }
:where(.tela .coluna) { display: flex; flex-direction: column; align-items: center; gap: clamp(9px, 1.8vh, 14px); min-width: 0; }
:where(.tela .topo) { display: flex; align-items: center; gap: 12px; align-self: stretch; justify-content: center; }
:where(.tela .topo .voltar) { position: static; min-width: 0; }
:where(.tela .vidro) { border-radius: 22px; background: rgba(12, 21, 40, .8); border: 1px solid var(--borda-vidro); }
/* ações: o dourado e o de vidro lado a lado, do mesmo tamanho; grudam no pé da tela enquanto o resto rola.
   O degradê escuro por trás só nas telas baixas ou estreitas, onde o menu rola de verdade: no iPad ele virava um retângulo escuro
   em cima do cenário 3D (Kart, Fórmula 1) */
:where(.tela .acoes) { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; align-self: stretch;
                       width: 100%; max-width: 560px; margin: 0 auto; padding: 12px 0 calc(env(safe-area-inset-bottom, 0px) + 6px); box-sizing: border-box; }
@media (max-height: 700px), (max-width: 480px) {
  :where(.tela .acoes) { background: linear-gradient(to top, rgba(7, 12, 22, .96) 55%, rgba(7, 12, 22, 0)); }
}
:where(.tela .acoes > .botao-jogar, .tela .acoes > .botao-2) { flex: 1 1 0; min-width: 0; height: auto; min-height: 54px; padding-inline: 16px; white-space: nowrap; }
/* celular em pé: um embaixo do outro, da mesma largura */
@media (max-width: 480px) {
  :where(.tela .acoes) { flex-direction: column; gap: 8px; }
  :where(.tela .acoes > .botao-jogar, .tela .acoes > .botao-2) { flex: 0 0 auto; width: 100%; }
}

/* ---- 6. Pausa e fim ---- */
:where(.tela.pausa) { padding-left: calc(env(safe-area-inset-left, 0px) + 14px); padding-right: calc(env(safe-area-inset-right, 0px) + 14px); }
:where(.tela.pausa .caixa) { gap: 12px; width: min(100%, 320px); }
:where(.tela.pausa .titulo) { font-size: clamp(28px, 6.5vmin, 44px); }
:where(.tela.pausa .acoes) { position: static; flex-direction: column; gap: 10px; width: min(100%, 260px); padding: 0; background: none; }
:where(.tela.pausa .acoes > .botao-jogar, .tela.pausa .acoes > .botao-2) { flex: 0 0 auto; width: 100%; height: 50px; min-height: 0; font-size: 19px; }
:where(body.pausado) :where(.hud-esq, .hud-dir, .hud-aviso, .bt-pausa, #joy, #botoes, .bt.extra) { visibility: hidden; }   /* .bt.extra: os poderes do Boxe e da Teia */
:where(.final-cartao) { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 560px); padding: 16px 18px 14px; border-radius: var(--raio); text-align: center;
                        background: rgba(12, 21, 40, .8); border: 1px solid var(--borda-vidro); box-shadow: var(--brilho-vidro), var(--sombra-macia); }
:where(.final-cartao .titulo) { font-size: clamp(28px, 6.5vmin, 44px); }
:where(.final-cartao .lugar) { margin: 0; font: 400 clamp(56px, 14vmin, 96px)/.95 var(--fonte-placa); color: var(--ouro); text-shadow: 0 6px 0 var(--contorno), 0 0 34px rgba(255, 194, 26, .45); }
:where(.final-cartao .estrelas) { display: flex; justify-content: center; gap: 8px; }
:where(.final-cartao .estrelas svg) { width: clamp(40px, 9vmin, 64px); height: clamp(40px, 9vmin, 64px); }
:where(.final-numeros) { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
:where(.final-numeros .hud-pilula) { pointer-events: auto; }
:where(.final-cartao .acoes) { background: none; padding-top: 6px; }

/* ---- 4. Controles: analógico à esquerda, os 4 botões em losango à direita ---- */
:where(#joy) { --js: 140px; position: fixed; z-index: 4; left: 0; bottom: 0; width: 50%; height: min(62%, 460px); touch-action: none; -webkit-tap-highlight-color: transparent; }
:where(#joy .joyBase) { position: absolute; left: calc(env(safe-area-inset-left, 0px) + 22px); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); width: var(--js); height: var(--js);
                        border-radius: 50%; pointer-events: none; opacity: .72; transition: opacity .2s ease-out, transform .28s cubic-bezier(.2, .9, .3, 1);
                        background: radial-gradient(circle, rgba(255, 255, 255, .02) 0 46%, rgba(255, 255, 255, .1) 70%, rgba(255, 255, 255, .16) 100%), rgba(16, 20, 30, .42);
                        border: 1.5px solid rgba(255, 255, 255, .26); box-shadow: 0 6px 22px rgba(0, 0, 0, .3), inset 0 0 0 7px rgba(255, 255, 255, .04); }
:where(#joy.ativo .joyBase) { opacity: 1; transition: opacity .12s ease-out; }
:where(#joy .joySetas) { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255, 255, 255, .5); }
:where(#joy .joyPino) { position: absolute; left: 26%; top: 26%; width: 48%; height: 48%; border-radius: 50%;
                        background: radial-gradient(circle at 50% 44%, #2a2e36 0 40%, #3d424c 58%, #5b616d 74%, #2b2f37 100%);
                        border: 1px solid rgba(255, 255, 255, .3); box-shadow: 0 6px 14px rgba(0, 0, 0, .5), inset 0 2px 1px rgba(255, 255, 255, .28), inset 0 -3px 4px rgba(0, 0, 0, .4);
                        transition: transform .3s cubic-bezier(.3, 1.7, .5, 1); will-change: transform; }
:where(#joy .joyPino)::after { content: ''; position: absolute; inset: 30%; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .14); }
:where(#joy.ativo .joyPino) { transition: none; }
:where(#botoes) { --bs: 76px; position: fixed; z-index: 4; right: calc(env(safe-area-inset-right, 0px) + 18px); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
                  width: calc(var(--bs) * 2.6); height: calc(var(--bs) * 2.6); border-radius: 50%; touch-action: none; -webkit-tap-highlight-color: transparent; }
:where(#botoes)::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; }
/* o botão redondo: vidro escuro com um degradê claro por cima (sem backdrop-filter: desfocar o 3D custaria quadros) e o símbolo na cor da função */
:where(.bt) { width: var(--bs, 76px); height: var(--bs, 76px); padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28);
              display: flex; align-items: center; justify-content: center; color: var(--cor, var(--branco)); cursor: pointer;
              background: rgba(16, 20, 30, .66) linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 55%, rgba(0, 0, 0, .08));
              touch-action: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
              box-shadow: 0 6px 18px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
              transition: transform .12s cubic-bezier(.3, 1.5, .5, 1), background-color .12s; }
:where(.bt .simb) { width: 54%; height: 54%; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
:where(.bt.apertado) { transform: scale(.92); background-color: rgba(58, 64, 78, .72); background-color: color-mix(in srgb, var(--cor, #fff) 26%, rgba(16, 20, 30, .6)); transition-duration: .05s; }
:where(.bt:focus-visible) { outline: 3px solid #fff; outline-offset: 3px; }
:where(.bt.acelera) { --cor: #34c759; }
:where(.bt.freia) { --cor: var(--vermelho); }
:where(.bt.acao) { --cor: #64d2ff; }
:where(.bt.item) { --cor: var(--ouro); }
:where(#botoes > .bt) { position: absolute; }
:where(#botoes > .bt.cima) { left: calc(50% - var(--bs) / 2); top: 0; }
:where(#botoes > .bt.baixo) { left: calc(50% - var(--bs) / 2); bottom: 0; }
:where(#botoes > .bt.esq) { left: 0; top: calc(50% - var(--bs) / 2); }
:where(#botoes > .bt.dir) { right: 0; top: calc(50% - var(--bs) / 2); }
@media (max-width: 760px) {
  :where(#botoes) { --bs: 64px; right: calc(env(safe-area-inset-right, 0px) + 10px); }
  :where(#joy) { --js: 124px; } :where(#joy .joyBase) { left: calc(env(safe-area-inset-left, 0px) + 14px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  :where(#joy) { --js: 112px; height: 72%; }
  :where(#joy .joyBase) { left: calc(env(safe-area-inset-left, 0px) + 14px); bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
  :where(#botoes) { --bs: 56px; right: calc(env(safe-area-inset-right, 0px) + 10px); bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); }
  :where(#botoes)::before { inset: -12px; }
}

/* ---- 7. HUD mínima: pílulas pequenas nos cantos, o botão de pausa, o aviso curto no alto e o "Preparando…" ---- */
:where(.hud-esq) { position: fixed; z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 10px); left: calc(env(safe-area-inset-left, 0px) + 12px);
                   display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
:where(.hud-dir) { position: fixed; z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 12px);
                   display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
:where(.hud-linha) { display: flex; gap: 6px; align-items: flex-start; }
:where(.hud-pilula) { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 10px; border-radius: 14px; border: 1px solid var(--borda-vidro); box-sizing: border-box;
                      background: rgba(8, 12, 22, .78); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); color: var(--branco); font: 800 21px/1 var(--fonte); font-variant-numeric: tabular-nums; white-space: nowrap; }
:where(.hud-pilula .ic, .hud-pilula > svg) { width: 20px; height: 20px; flex: none; }
:where(.hud-pilula.ouro) { border-color: rgba(255, 194, 26, .55); color: var(--ouro); }
:where(.hud-pilula.ruim) { background: rgba(255, 59, 48, .32); }
:where(.bt-pausa) { pointer-events: auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--borda-vidro); background: rgba(16, 24, 42, .72); color: var(--branco);
                    display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 16px rgba(0, 0, 0, .3);
                    -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform .16s var(--mola), opacity .16s; }
:where(.bt-pausa svg) { width: 18px; height: 18px; }
:where(.bt-pausa:active) { transform: scale(.92); opacity: .8; }
:where(.bt-pausa:focus-visible) { outline: 3px solid #fff; outline-offset: 3px; }
/* aviso curto ("Passou o Tucano!", "Chuá! +2"): pílula no alto, no meio, que sobe e some em 1,2 s (classe .mostra) */
:where(.hud-aviso) { position: fixed; z-index: 5; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translateX(-50%); max-width: calc(100% - 24px); box-sizing: border-box;
                     padding: 6px 14px; border-radius: 999px; background: rgba(8, 12, 22, .8); border: 1px solid var(--borda-vidro); overflow: hidden; text-overflow: ellipsis;
                     font: 800 21px/1 var(--fonte); text-transform: uppercase; letter-spacing: .04em; color: var(--ouro); pointer-events: none; opacity: 0; white-space: nowrap; }
:where(.hud-aviso.ruim) { color: var(--cinza); }
:where(.hud-aviso.azul) { color: #8fd0ff; }
:where(.hud-aviso.verde) { color: #7dff4a; }
:where(.hud-aviso.mostra) { animation: clube-aviso 1.2s ease-out both; }
@keyframes clube-aviso { 0% { opacity: 0; transform: translate(-50%, 8px); } 15% { opacity: 1; transform: translate(-50%, 0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }
/* "Preparando…": pílula de vidro no meio com a bolinha piscando; fica até o primeiro quadro (o jogo põe hidden) */
:where(.carregando) { position: fixed; z-index: 25; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px 0 15px;
                      border-radius: 999px; border: 1px solid var(--borda-vidro); background: var(--painel); box-shadow: var(--brilho-vidro), var(--sombra-macia); color: var(--branco);
                      font: 600 17px/1 var(--fonte-ui); letter-spacing: -.01em; white-space: nowrap; pointer-events: none; }
:where(.carregando)::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--azul-claro); box-shadow: 0 0 10px var(--azul-claro); animation: clube-pisca 1.1s ease-in-out infinite; }
@keyframes clube-pisca { 50% { opacity: .25; } }
/* celular em pé: o desenho do celular girando, "Gire" (dá para jogar assim mesmo) */
:where(.girar) { display: none; align-items: center; gap: 8px; margin: 0; font: 600 16px/1 var(--fonte-ui); color: var(--azul-claro); }
:where(.girar svg) { width: 40px; height: 40px; }
:where(.girar .cel) { transform-origin: 24px 24px; animation: clube-gira 2.6s ease-in-out infinite; }
@keyframes clube-gira { 0%, 25% { transform: rotate(0deg); } 55%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) { :where(.girar) { display: flex; } }
@media (max-height: 520px) and (orientation: landscape) {
  :where(.hud-pilula) { height: 34px; font-size: 18px; padding: 0 9px 0 8px; }
  :where(.bt-pausa) { width: 40px; height: 40px; }
  :where(.hud-aviso) { font-size: 18px; }
}

/* ---- 8. Chip do jogador, interruptor e níveis ---- */
:where(.perfilBt) { display: inline-flex; align-items: center; gap: 8px; height: 38px; max-width: 100%; padding: 0 14px 0 4px; border-radius: 999px; border: 1px solid var(--borda-vidro);
                    background: rgba(12, 21, 40, .82); color: var(--branco); font: 700 16px/1 var(--fonte-ui); cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(.perfilBt)::after { content: ''; flex: none; width: 7px; height: 7px; border-right: 2.5px solid var(--cinza); border-bottom: 2.5px solid var(--cinza); transform: rotate(45deg) translateY(-2px); }
:where(.perfilBt .av) { width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-flex; }
:where(.perfilBt .av svg) { width: 100%; height: 100%; display: block; }
:where(.perfilBt:focus-visible) { outline: 3px solid #fff; outline-offset: 3px; }
:where(.opcao[role="switch"]) { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 14px; border: 1px solid var(--borda-vidro); border-radius: 999px; background: rgba(12, 21, 40, .78);
                                color: var(--branco); font: 700 17px/1 var(--fonte-ui); cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(.opcao[role="switch"] > svg) { width: 22px; height: 22px; flex: none; color: #34c759; }
:where(.opcao[role="switch"] .chave) { position: relative; width: 51px; height: 31px; border-radius: 999px; background: rgba(120, 120, 128, .4); transition: background-color .2s; flex: none; }
:where(.opcao[role="switch"] .chave)::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); transition: transform .22s var(--mola); }
:where(.opcao[role="switch"][aria-checked="true"] .chave) { background: #34c759; }
:where(.opcao[role="switch"][aria-checked="true"] .chave)::after { transform: translateX(20px); }
:where(.opcao[role="switch"]:focus-visible) { outline: 3px solid #fff; outline-offset: 2px; }
:where(.niveis, .segs) { display: flex; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(12, 21, 40, .78); border: 1px solid var(--borda-vidro); max-width: 100%; box-sizing: border-box; }
:where(.nivel, .seg) { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; min-width: 0; padding: 0 12px; border: 0; border-radius: 999px;
                       background: transparent; color: var(--cinza); cursor: pointer; font: 600 16px/1 var(--fonte-ui); white-space: nowrap; -webkit-tap-highlight-color: transparent; }
:where(.nivel[aria-checked="true"], .seg[aria-checked="true"]) { background: var(--azul); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 12px rgba(31, 123, 255, .4); }
:where(.nivel:focus-visible, .seg:focus-visible) { outline: 3px solid #fff; outline-offset: 2px; }

/* ---- celular deitado (até 560px de altura): tudo mais baixinho e, se a tela pedir, duas colunas ---- */
@media (orientation: landscape) and (max-height: 560px) {
  :where(.tela) { padding-top: calc(env(safe-area-inset-top, 0px) + 10px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
                  padding-left: calc(env(safe-area-inset-left, 0px) + 14px); padding-right: calc(env(safe-area-inset-right, 0px) + 14px); }
  :where(.tela.menu) { padding-left: calc(env(safe-area-inset-left, 0px) + 148px); padding-right: calc(env(safe-area-inset-right, 0px) + 18px); }
  :where(.tela .caixa) { gap: 8px; }
  :where(.tela .caixa.colunas) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; justify-items: center; gap: clamp(16px, 3.5vw, 36px); width: fit-content; max-width: 100%; }
  :where(.tela .caixa.colunas > *) { min-width: 0; max-width: 100%; }
  :where(.tela .coluna) { gap: 8px; }
  :where(.titulo) { font-size: clamp(32px, 9.5vh, 44px); }
  :where(.titulo.menor) { font-size: clamp(24px, 7vh, 32px); }
  :where(.perfilBt) { height: 34px; } :where(.perfilBt .av) { width: 27px; height: 27px; }
  :where(.nivel, .seg) { height: 34px; font-size: 15px; }
  :where(.opcao[role="switch"]) { min-height: 40px; padding: 0 6px 0 12px; font-size: 16px; }
  :where(.botao-jogar) { height: 50px; } :where(.botao-2) { height: 40px; font-size: 16px; }
  :where(.tela .acoes > .botao-jogar, .tela .acoes > .botao-2) { height: auto; min-height: 46px; }
  :where(.tela.pausa .acoes > .botao-jogar, .tela.pausa .acoes > .botao-2) { height: 44px; font-size: 17px; }
  :where(.final-cartao) { padding: 10px 14px; gap: 8px; }
}
@media (orientation: landscape) and (max-height: 560px) and (max-width: 720px) { :where(.botao-jogar) { padding: 0 20px; gap: 10px; white-space: nowrap; } }
/* ---- iPad e computador: só aumenta aqui; o celular continua compacto ---- */
@media (min-width: 700px) and (min-height: 561px) {
  :where(.perfilBt) { height: 44px; padding: 0 16px 0 5px; font: 600 17px/1 var(--fonte-ui); } :where(.perfilBt .av) { width: 34px; height: 34px; }
  :where(.nivel, .seg) { height: 38px; font: 600 15px/1 var(--fonte-ui); padding: 0 14px; }
  :where(.botao-2) { height: 50px; min-width: 220px; padding: 0 24px; }
}
/* ---- sem movimento: nada pisca nem pula ---- */
@media (prefers-reduced-motion: reduce) {
  :where(.anima-entra) { animation-name: aparece; animation-duration: .4s; animation-timing-function: ease; }
  :where(.girar .cel) { animation: none; }
  :where(.carregando)::before { animation: none; }
  :where(.hud-aviso.mostra) { animation: clube-aviso-calmo 1.2s linear both; }
  @keyframes clube-aviso-calmo { 0%, 85% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; transform: translateX(-50%); } }
  :where(.bt, .botao-jogar, .botao-2, .bt-pausa, .opcao[role="switch"] .chave, #joy .joyBase, #joy .joyPino) { transition: none; }
  :where(.opcao[role="switch"] .chave)::after { transition: none; }
}
