/* Telas do STACK4 no estilo "kit de UI de madeira cartoon": painéis de tábuas com contorno escuro
   grosso, botões chanfrados e fofos, campos cor de pergaminho e botões verdes de ação. */
:root {
  --outline: #3b1c0a;
  --wood-hi: #d99350;
  --wood: #b8702f;
  --wood-lo: #8a4b1d;
  --plank-gap: #5a2c10;
  --cream: #fbecc8;
  --parchment: #f2dcae;
  --green-hi: #8fe35a;
  --green: #4fb52c;
  --green-lo: #2e7d17;
  --gold: #ffd25a;
  --danger: #d9473a;
  --ui-font: 'Lilita One', 'Alegreya Sans', system-ui, sans-serif;
}

#ui-root { position: absolute; inset: 0; overflow: hidden; display: none; z-index: 20; font-family: var(--ui-font); color: var(--cream); }
#ui-root.open { display: grid; place-items: center; }
#ui-root .backdrop { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(20, 8, 2, .25), rgba(20, 8, 2, .75)); }
/* no menu o papel de parede aparece: só uma sombra leve atrás do painel */
body.in-menu #ui-root .backdrop { background: radial-gradient(ellipse at 50% 50%, rgba(20, 8, 2, .35), rgba(20, 8, 2, 0) 55%); }

.screen { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px;
          width: min(460px, calc(100% - 24px)); padding: 4px; transform-origin: center center; }
/* Tela fixa, sem rolagem: o que não cabe no quadro é encolhido por inteiro (ui/app.js → fit) */
/* centrado de verdade (mesmo quando é maior que o quadro), para o encolhimento manter o painel inteiro à vista */
#ui-root > .screen, .account-body > .screen { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.logo { width: min(360px, 80vw); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .55)); user-select: none; }

/* ---------- painel de tábuas ---------- */
.panel {
  position: relative; width: 100%; box-sizing: border-box; padding: 22px 22px 24px;
  border: 5px solid var(--outline); border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(0, 0, 0, .14)),
    repeating-linear-gradient(180deg, var(--wood) 0 44px, var(--wood-lo) 44px 46px, var(--plank-gap) 46px 49px),
    var(--wood);
  box-shadow: inset 0 3px 0 rgba(255, 230, 180, .45), inset 0 -6px 0 rgba(0, 0, 0, .25), 0 8px 0 var(--outline), 0 14px 26px rgba(0, 0, 0, .5);
}
.panel::before, .panel::after {               /* pregos */
  content: ""; position: absolute; top: 10px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2c8, #c99a4a 50%, #6b4512); box-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}
.panel::before { left: 10px; } .panel::after { right: 10px; }
.panel h2 { margin: 0 0 14px; text-align: center; font-weight: 400; font-size: 1.7rem; letter-spacing: .02em; color: var(--gold);
            -webkit-text-stroke: 1.5px var(--outline); text-shadow: 0 3px 0 var(--outline); }

/* área de pergaminho dentro do painel */
.inset { background: var(--parchment); color: #4a2a12; border: 4px solid var(--wood-lo); border-radius: 14px; padding: 12px 14px;
         box-shadow: inset 0 3px 6px rgba(90, 50, 20, .35); font-family: 'Alegreya Sans', system-ui, sans-serif; font-weight: 700; }

/* ---------- campos ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: .95rem; color: var(--cream); text-shadow: 0 2px 0 var(--outline); }
.field input, .field select {
  font: 700 1.05rem 'Alegreya Sans', system-ui, sans-serif; color: #3b1c0a; padding: 10px 12px;
  background: var(--cream); border: 3px solid var(--outline); border-radius: 12px; outline: none;
  box-shadow: inset 0 3px 5px rgba(90, 50, 20, .3);
}
.lang-flags { display: flex; gap: 10px; }
.lang-pick { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; cursor: pointer;
  font: 400 .9rem var(--ui-font); color: var(--cream); text-shadow: 0 2px 0 var(--outline);
  background: var(--wood-lo); border: 3px solid var(--outline); border-radius: 12px; box-shadow: 0 3px 0 var(--outline); }
.lang-pick .flag { height: 28px; }
.lang-pick.sel { background: linear-gradient(180deg, #fff1b8, var(--gold)); color: var(--outline); text-shadow: none; box-shadow: 0 3px 0 var(--outline), 0 0 0 3px var(--gold); }
.field .readonly { font: 700 1.05rem 'Alegreya Sans', system-ui, sans-serif; color: #4a2a12; padding: 10px 12px; background: var(--parchment);
  border: 3px dashed var(--wood-lo); border-radius: 12px; }
.field input:focus, .field select:focus { border-color: var(--gold); box-shadow: inset 0 3px 5px rgba(90, 50, 20, .3), 0 0 0 3px rgba(255, 210, 90, .45); }

/* ---------- botões ---------- */
.btn {
  font-family: var(--ui-font); font-size: 1.25rem; letter-spacing: .03em; color: var(--cream); cursor: pointer;
  padding: 11px 20px; width: 100%; border: 4px solid var(--outline); border-radius: 16px;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood) 55%, var(--wood-lo));
  -webkit-text-stroke: 1px var(--outline); text-shadow: 0 2px 0 var(--outline);
  box-shadow: inset 0 3px 0 rgba(255, 235, 190, .5), inset 0 -5px 0 rgba(0, 0, 0, .25), 0 5px 0 var(--outline), 0 9px 14px rgba(0, 0, 0, .4);
  transition: transform .06s, box-shadow .06s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 235, 190, .5), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 1px 0 var(--outline), 0 3px 6px rgba(0, 0, 0, .4); }
.btn.green { background: linear-gradient(180deg, var(--green-hi), var(--green) 55%, var(--green-lo)); }
.btn.small { width: auto; font-size: 1rem; padding: 7px 14px; border-width: 3px; border-radius: 12px; }
.btn:disabled { cursor: default; filter: grayscale(.85) brightness(.75); transform: none; }
.btn .soon { display: inline-block; margin-left: 8px; font-size: .75rem; padding: 2px 8px; border-radius: 8px; vertical-align: 3px;
             background: var(--danger); border: 2px solid var(--outline); -webkit-text-stroke: 0; text-shadow: none; }
.btn-col { display: flex; flex-direction: column; gap: 14px; }
.btn-row { display: flex; gap: 12px; }

.link { background: none; border: 0; padding: 4px; font: 700 .95rem 'Alegreya Sans', sans-serif; color: var(--cream);
        text-decoration: underline; cursor: pointer; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.msg { min-height: 1.3em; margin: 4px 0 10px; text-align: center; font: 700 .95rem 'Alegreya Sans', sans-serif; text-shadow: 0 1px 2px #000; }
.msg.error { color: #ffb0a6; } .msg.ok { color: #c9f7a8; }

/* ---------- ícones e cartão do jogador ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 6px 0 14px; }
.icon-pick { aspect-ratio: 1; padding: 4px; border: 3px solid var(--outline); border-radius: 50%; cursor: pointer;
             background: radial-gradient(circle at 40% 30%, #f7dcab, #c88a4a); box-shadow: 0 3px 0 var(--outline); }
.icon-pick svg, .avatar svg { width: 100%; height: 100%; display: block; }
.icon-pick.sel { background: radial-gradient(circle at 40% 30%, #fff1b8, var(--gold)); box-shadow: 0 3px 0 var(--outline), 0 0 0 3px var(--gold); }
.player-card { display: flex; align-items: center; gap: 12px; }
.avatar { width: 56px; height: 56px; flex: none; padding: 5px; box-sizing: border-box; border: 4px solid var(--outline); border-radius: 50%;
          background: radial-gradient(circle at 40% 30%, #f7dcab, #c88a4a); box-shadow: 0 3px 0 var(--outline); }
.player-card .name { font-size: 1.35rem; text-shadow: 0 2px 0 var(--outline); }
.player-card .sub { font: 700 .85rem 'Alegreya Sans', sans-serif; opacity: .85; }

/* ---------- botão de som (canto do quadro do jogo) ---------- */
#music-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 30; width: 52px; height: 52px; padding: 0; font-size: 1.4rem;
                border-radius: 50%; }

/* com um painel aberto no quadro, os botões redondos somem para não cobrir o painel */
#ui-root.open ~ #music-toggle { display: none; }
/* papel de parede do menu (ui/menu-bg.js): cobre o 3D enquanto o menu está aberto.
   A imagem passeia devagar (zoom e deslize), escurecida e levemente desfocada. */
#menu-bg { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #4a2412, #120804 75%);
  transition: opacity .8s ease; }
body:not(.in-menu) #menu-bg { opacity: 0; pointer-events: none; }
#menu-bg .menu-bg-img { position: absolute; inset: -6%; background: center / cover no-repeat;
  filter: blur(1.5px) brightness(.8);
  animation: menu-drift 60s ease-in-out infinite alternate; }
#menu-bg .menu-bg-img:not(.has-image) { display: none; }
#menu-bg .menu-bg-img.paused { animation-play-state: paused; }
#menu-bg::after { content: ""; position: absolute; inset: 0; pointer-events: none;      /* vinheta escura nas bordas */
  background: radial-gradient(ellipse at 50% 50%, rgba(20, 8, 2, 0) 45%, rgba(20, 8, 2, .55)); }
@keyframes menu-drift { from { transform: scale(1.04) translateX(-2%); } to { transform: scale(1.12) translateX(2%); } }
@media (prefers-reduced-motion: reduce) { #menu-bg .menu-bg-img { animation: none; transform: scale(1.06); } }

/* engrenagem: configurações do jogo, logo acima do botão de som */

/* ---------- jogo: logo no letreiro e botão de menu ---------- */
.sign-logo { height: 1.5em; vertical-align: middle; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
body.in-menu #sign, body.in-menu #controls, body.in-menu #hint { opacity: 0; pointer-events: none; }

/* ---------- site em quadros: topo, jogo, chat, rodapé ---------- */
body { background: radial-gradient(ellipse at 50% 0%, #4a2812, #1c0f07 70%) fixed, #1c0f07; }
#app { height: 100%; box-sizing: border-box; display: grid; gap: 12px; padding: 12px 16px 6px;
       grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: auto minmax(0, 1fr) auto; }
body:not(.logged-in) #app { grid-template-columns: minmax(0, 1fr); }
body:not(.logged-in) #chat, body:not(.logged-in) #player-bar { display: none; }
#topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; min-width: 0; }
#topbar .brand { height: 64px; flex: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .55)); user-select: none; }
.frame { border: 5px solid var(--outline); border-radius: 18px; box-shadow: 0 6px 0 var(--outline), 0 12px 24px rgba(0, 0, 0, .5); }
#stage { position: relative; overflow: hidden; min-height: 0; background: #1c0f07; }

/* página da conta: ocupa o lugar do quadro do jogo, que fica escondido enquanto ela está aberta */
#account-page { display: none; position: relative; min-height: 0; overflow: hidden; padding: 14px; box-sizing: border-box; font-family: var(--ui-font);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(0, 0, 0, .18)), var(--wood-lo); }
body.account-open #stage { display: none; }
body.account-open #account-page { display: flex; flex-direction: column; grid-column: 1; grid-row: 2; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.account-head h2 { margin: 0; font-weight: 400; font-size: 2rem; color: var(--gold); -webkit-text-stroke: 1.5px var(--outline); text-shadow: 0 3px 0 var(--outline); }
.account-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.account-tabs .btn { width: auto; flex: 1; font-size: 1rem; padding: 7px 10px; border-width: 3px; border-radius: 12px; }
.account-tabs .btn.sel { background: linear-gradient(180deg, var(--gold), #e2a52f 55%, #b77a17); color: var(--outline); -webkit-text-stroke: 0; text-shadow: none; }
.account-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.account-body .screen { width: min(460px, 100%); }
#account-page .panel .btn { margin-top: 2px; }

/* cartão do jogador no topo */
#player-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 8px 16px; font-family: var(--ui-font);
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .14)), var(--wood); }
#player-bar .avatar { width: 58px; height: 58px; }
#player-bar .who { flex: 1; min-width: 0; }
#player-bar .name { font-size: 1.4rem; color: var(--cream); text-shadow: 0 2px 0 var(--outline); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#player-bar .name { display: flex; align-items: center; gap: 10px; }
#player-bar .name span { overflow: hidden; text-overflow: ellipsis; }
/* bandeira do país (imagem 4:3) com contorno do kit */
.flag { height: 1em; aspect-ratio: 4 / 3; flex: none; border: 2px solid var(--outline); border-radius: 4px; box-shadow: 0 2px 0 var(--outline); background: var(--wood-lo); }
.country-row { display: flex; align-items: center; gap: 10px; }
.country-row select { flex: 1; min-width: 0; }
.country-row .flag-slot { display: contents; }
.country-row .flag { height: 30px; }
.field .note { font: 700 .8rem 'Alegreya Sans', sans-serif; opacity: .85; text-shadow: 0 1px 2px #000; }
#player-bar { justify-content: space-between; }
/* bandeira e nome, pequenos, logo à direita da logo */
#player-bar .bar-who { display: flex; align-items: center; gap: 6px; min-width: 0; font: 400 .85rem var(--ui-font); color: var(--cream);
  text-shadow: 0 1px 0 var(--outline); opacity: .9; }
#player-bar .bar-who .flag { height: 12px; border-width: 1.5px; border-radius: 2px; box-shadow: none; }
#player-bar .bar-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#player-bar .actions { display: flex; flex-direction: row; align-items: center; gap: 18px; }
#player-bar .actions .link { display: inline-flex; align-items: center; gap: 6px; }
#player-bar .ico { width: 18px; height: 18px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .8)); }

/* chat */
#chat { display: flex; flex-direction: column; min-height: 0; overflow: hidden; font-family: var(--ui-font);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .14)), var(--wood); }
.chat-tabs { display: flex; gap: 6px; padding: 10px 10px 0; }
.chat-tabs span { padding: 6px 14px; border: 3px solid var(--outline); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--wood-lo); }
.chat-tabs span.sel { background: var(--parchment); color: #4a2a12; }
/* ícone do chat e ✕: só no celular (no computador o chat fica sempre à direita) */
#player-bar .actions .chat-btn, .chat-close { display: none; }
.chat-close { margin-left: auto; align-self: center; width: 30px; height: 30px; padding: 0; cursor: pointer; font: 700 1rem sans-serif; color: var(--cream);
  background: var(--wood-lo); border: 3px solid var(--outline); border-radius: 50%; }
.chat-body { flex: 1; margin: 0 10px 10px; padding: 12px; background: var(--parchment); color: #4a2a12; border: 3px solid var(--outline);
  border-radius: 0 12px 12px 12px; overflow-y: auto; font: 700 .95rem 'Alegreya Sans', sans-serif; }
.chat-body p { margin: 0; opacity: .8; }

#footer { grid-column: 1 / -1; display: flex; justify-content: flex-start; gap: 14px; align-items: center; padding-left: 4px; font-family: 'Alegreya Sans', sans-serif; }
/* logo da empresa (PADA): letras brancas a 30% (a transparência já vem no próprio SVG), pequena e discreta */
#footer .pada { height: 14px; margin-right: 4px; user-select: none; pointer-events: none; }
/* Termos, Dados e Créditos ao lado da logo, discretos como ela */
#footer .link { font-size: .78rem; padding: 2px; text-decoration: none; text-shadow: none; color: rgba(255, 255, 255, .45); }
#footer .link:hover { color: rgba(255, 255, 255, .8); text-decoration: underline; }
.page { text-align: left; font: 700 1rem/1.45 'Alegreya Sans', sans-serif; }
.page h3 { margin: 10px 0 4px; font: 400 1.1rem var(--ui-font); color: #6b3a0e; }
.page ul { margin: 4px 0; padding-left: 20px; }
.page a { color: #2e5fb0; }
.range { width: 100%; accent-color: var(--green); }
/* caixinha de marcar no estilo do kit (madeira com visto verde) */
.check { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; cursor: pointer; font-size: 1.05rem; text-shadow: 0 2px 0 var(--outline); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box { width: 28px; height: 28px; flex: none; border: 3px solid var(--outline); border-radius: 8px; background: var(--cream);
  box-shadow: inset 0 2px 4px rgba(90, 50, 20, .35), 0 2px 0 var(--outline); display: grid; place-items: center; }
.check input:checked + .box { background: linear-gradient(180deg, var(--green-hi), var(--green)); }
.check input:checked + .box::after { content: ""; width: 7px; height: 13px; margin-top: -3px; border: solid #fff; border-width: 0 4px 4px 0;
  rotate: 45deg; filter: drop-shadow(0 1px 0 var(--outline)); }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(255, 210, 90, .6); }

/* celular (~80% dos jogadores): tudo empilhado; o quadro do jogo ocupa a tela e o chat fica embaixo */
@media (max-width: 760px) {
  /* celular: tela fixa — topo, jogo e chat dividem a altura da tela, nada rola */
  #app { height: 100svh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
         gap: 6px; padding: 6px 6px 2px; }
  body.account-open #account-page { grid-row: 2; }
  /* chat: fora da tela; o ícone no alto à direita abre uma janela por cima do jogo */
  #chat { display: none; position: fixed; z-index: 40; top: 56px; left: 8px; right: 8px; height: min(60svh, 460px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
  body.logged-in.chat-open #chat { display: flex; }
  #player-bar .actions .chat-btn { display: inline-flex; }
  body.chat-open #player-bar .chat-btn { color: var(--gold); }
  .chat-close { display: block; }
  #topbar { gap: 8px; }
  #topbar .brand { height: 34px; }
  #player-bar { padding: 4px 10px; gap: 8px; border-width: 3px; border-radius: 14px; }
  #player-bar .avatar { width: 40px; height: 40px; border-width: 3px; padding: 3px; }
  #player-bar .name { font-size: 1.05rem; }
  #player-bar .link { font-size: .8rem; padding: 2px; }

  .frame { border-width: 3px; border-radius: 14px; }
  .chat-tabs { padding: 6px 6px 0; } .chat-tabs span { padding: 3px 10px; font-size: .85rem; }
  .chat-body { margin: 0 6px 6px; padding: 8px; font-size: .85rem; }
  #player-bar .lbl { display: none; }          /* só os ícones de conta e sair, para o nome caber */
  #player-bar .actions { flex-direction: row; gap: 6px; }
  #account-page { padding: 10px; }
  .account-head h2 { font-size: 1.5rem; }
  #music-toggle { width: 42px; height: 42px; right: 10px; bottom: 74px; font-size: 1.1rem; }   /* acima dos botões da partida */
}

@media (max-width: 520px) {
  .panel { padding: 18px 14px 20px; }
  .btn { font-size: 1.1rem; }
}

/* ===================== menu do jogo (ui/menu-hud.js) =====================
   Ocupa o quadro do jogo inteiro, por cima do wallpaper. Tudo em "em": o app ajusta o tamanho da letra
   do .menu-hud à medida do quadro e o menu inteiro encolhe ou cresce por igual (tela fixa, sem rolagem). */
.menu-hud { position: absolute; inset: 0; font-family: var(--ui-font); color: var(--cream); }
.menu-hud .soon { font-size: .55em; }
.menu-hud svg { display: block; }

/* jogador: ícone com anel de nível, stamina, nome, divisão, perfil, passe */
/* card de madeira do jogador (ícone, nome, divisão, stamina), no estilo dos painéis do kit */
.hud-player { position: absolute; left: 1em; top: 1em; display: grid; grid-template-columns: auto auto; gap: .5em .8em; align-items: center;
  padding: .6em 1em .75em .6em; border: .2em solid var(--outline); border-radius: 1em;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .16)),
    repeating-linear-gradient(180deg, var(--wood) 0 2.4em, var(--wood-lo) 2.4em 2.5em, var(--plank-gap) 2.5em 2.65em), var(--wood);
  box-shadow: inset 0 .15em 0 rgba(255, 230, 180, .4), inset 0 -.25em 0 rgba(0, 0, 0, .22), 0 .3em 0 var(--outline), 0 .6em 1.2em rgba(0, 0, 0, .45); }
.hud-me { display: flex; flex-direction: column; align-items: center; gap: .5em; }
.hud-avatar { position: relative; width: 5.6em; height: 5.6em; border-radius: 50%; padding: .45em; box-sizing: border-box;
  background: conic-gradient(var(--green-hi) var(--p, 0%), rgba(20, 8, 2, .55) 0); border: .2em solid var(--outline); box-shadow: 0 .2em 0 var(--outline); }
.hud-avatar .avatar { width: 100%; height: 100%; border-width: .2em; box-shadow: none; padding: .35em; }
.hud-avatar .lvl { position: absolute; left: 50%; bottom: -.7em; translate: -50% 0; min-width: 2.4em; padding: .1em .5em; text-align: center;
  font-size: .95em; background: linear-gradient(180deg, var(--green-hi), var(--green-lo)); border: .18em solid var(--outline); border-radius: 1em;
  -webkit-text-stroke: .04em var(--outline); text-shadow: 0 .1em 0 var(--outline); }
/* stamina (embaixo da divisão): discreta — faixa fina e escura semitransparente, barrinhas finas
   num verde mais apagado e o tempo pequeno; só uma informação, sem chamar atenção */
.stamina { display: flex; align-items: center; gap: .35em; font-size: .9em; padding: .22em .5em .22em .35em;
  background: rgba(20, 10, 4, .55); border: .1em solid rgba(59, 28, 10, .8); border-radius: .5em; }
.stamina svg { width: 1em; height: 1em; flex: none; opacity: .85; }
.stamina-bars { display: flex; gap: .15em; height: .95em; }
.stamina-bars i { position: relative; width: .4em; border-radius: .15em; overflow: hidden; background: rgba(0, 0, 0, .45); }
.stamina-bars i::after { content: ""; position: absolute; inset: auto 0 0 0; height: calc(var(--f) * 100%);
  background: linear-gradient(180deg, #8fcf5f, #5a9a36); }
.stamina b { font: 400 .95em var(--ui-font); color: rgba(251, 236, 200, .85); letter-spacing: .03em; }
.hud-id { display: flex; flex-direction: column; gap: .45em; align-items: flex-start; }
.hud-name { display: flex; align-items: center; gap: .35em; font-size: 1.25em; text-shadow: 0 .12em 0 var(--outline), 0 0 .4em rgba(0, 0, 0, .6); white-space: nowrap; }
.hud-name .vip { font-size: .65em; padding: .15em .5em; border-radius: 1em; background: linear-gradient(180deg, #fff1b8, var(--gold)); color: var(--outline);
  border: .15em solid var(--outline); text-shadow: none; }
.hud-name .streak { display: inline-flex; align-items: center; gap: .1em; color: #ffb35a; }
.hud-name .streak svg { width: 1.1em; height: 1.1em; transform-origin: 50% 90%; animation: flame 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 .25em rgba(255, 140, 40, .75)); }
@keyframes flame { 0%, 100% { scale: 1 1; rotate: -3deg; } 30% { scale: .94 1.08; rotate: 2deg; } 60% { scale: 1.04 .96; rotate: -1deg; } }
@media (prefers-reduced-motion: reduce) { .hud-name .streak svg { animation: none; } }
.division { display: flex; align-items: center; justify-content: space-between; gap: 1em; min-width: 11em; padding: .25em .7em; font-size: .95em;
  background: linear-gradient(90deg, #8a4a22, #e3a06a 50%, #9a5a2a); border: .16em solid var(--outline); border-radius: .4em;
  color: #2a1208; text-shadow: 0 .06em 0 rgba(255, 230, 190, .6); }
.division b { font-size: 1.1em; }
/* Bronze: faixa de bronze metálico e moldura de bronze no card do jogador */
:root { --bronze-lo: #6e3f17; --bronze: #b8732f; --bronze-hi: #f2c08a; }
.division.tier-bronze { color: #2a1206; text-shadow: 0 .06em 0 rgba(255, 225, 185, .7);
  background: linear-gradient(115deg, var(--bronze-lo), var(--bronze) 22%, var(--bronze-hi) 42%, #cf8a45 58%, var(--bronze) 75%, var(--bronze-lo));
  box-shadow: inset 0 .12em 0 rgba(255, 235, 205, .55), inset 0 -.12em 0 rgba(60, 25, 5, .45); }
.hud-player.tier-bronze { border: .32em solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .16)) padding-box,
    repeating-linear-gradient(180deg, var(--wood) 0 2.4em, var(--wood-lo) 2.4em 2.5em, var(--plank-gap) 2.5em 2.65em) padding-box,
    linear-gradient(135deg, var(--bronze-hi), var(--bronze) 30%, var(--bronze-lo) 50%, var(--bronze) 70%, var(--bronze-hi)) border-box;
  box-shadow: 0 0 0 .14em var(--outline), inset 0 .15em 0 rgba(255, 230, 180, .4), inset 0 -.25em 0 rgba(0, 0, 0, .22),
    0 .3em 0 .14em var(--outline), 0 .6em 1.2em rgba(0, 0, 0, .45); }
.btn.tile { width: auto; display: inline-flex; align-items: center; gap: .4em; font-size: .9em; padding: .35em .8em; border-width: .18em; border-radius: .6em; }
.btn.tile svg { width: 1.3em; height: 1.3em; }
/* Passe de batalha: estandarte vermelho com moldura dourada e medalha grande. Parado (só o JOGAR é animado);
   destaca-se pela cor. Fica colorido mesmo "Em breve". */
.battle-pass { position: absolute; left: 1em; top: 40%; translate: 0 -50%; display: flex; align-items: center; gap: .6em; font-size: .78em;
  width: 15em; padding: .6em 1em .6em .6em; overflow: hidden; cursor: pointer; font-family: var(--ui-font); text-align: left;
  background: linear-gradient(135deg, #e0473a, #a8261e 55%, #6e1712); border: .25em solid #ffd25a; border-radius: 1em;
  box-shadow: 0 0 0 .18em var(--outline), 0 .35em 0 .18em var(--outline), inset 0 .25em 0 rgba(255, 200, 170, .35);
 }
.battle-pass .bp-medal { flex: none; width: 4.2em; height: 4.2em; filter: drop-shadow(0 .15em 0 var(--outline)); }
.battle-pass .bp-medal svg { width: 100%; height: 100%; }
.battle-pass .bp-text { display: flex; flex-direction: column; gap: .25em; }
.battle-pass b { font-weight: 400; font-size: 1.45em; line-height: 1.05; color: var(--gold); text-transform: uppercase; letter-spacing: .02em;
  -webkit-text-stroke: .05em var(--outline); text-shadow: 0 .12em 0 var(--outline); }
.battle-pass small { align-self: flex-start; font-size: .75em; padding: .15em .6em; border-radius: .6em; color: var(--cream);
  background: rgba(40, 10, 5, .55); border: .12em solid var(--outline); }
.menu-hud.portrait .battle-pass { top: auto; bottom: 14em; translate: none; width: 13em; }

/* carteira e botões redondos (direita, em cima) */
.hud-wallet { position: absolute; right: 1em; top: 1em; display: flex; gap: .6em; }
.pill { display: flex; align-items: center; gap: .5em; min-width: 7.5em; padding: .3em .5em .3em .35em; font-size: 1.05em;
  background: linear-gradient(180deg, #2c1a10, #170c06); border: .16em solid #c99a4a; border-radius: 2em; box-shadow: 0 .15em 0 var(--outline); }
.pill svg { width: 1.6em; height: 1.6em; flex: none; }
.pill .cur { width: 1.8em; height: 1.8em; flex: none; margin: -.15em 0; filter: drop-shadow(0 .08em .1em rgba(0, 0, 0, .6)); }
/* GOLD mais dourado: o original puxa para o laranja; leva o tom para o amarelo-ouro e dá mais brilho */
.pill .cur.gold { filter: hue-rotate(10deg) saturate(1.3) brightness(1.15) contrast(1.05) drop-shadow(0 .08em .1em rgba(0, 0, 0, .6)); }
.pill b { flex: 1; text-align: right; font-weight: 400; letter-spacing: .02em; }
.pill .plus { width: 1.5em; height: 1.5em; padding: 0; font: 400 1em var(--ui-font); color: var(--cream); border-radius: 50%;
  border: .14em solid #c99a4a; background: #3a2418; cursor: pointer; }
.pill .plus:disabled { opacity: .5; cursor: default; }
.hud-round { position: absolute; right: 1em; top: 4.2em; display: flex; flex-direction: column; gap: .5em; align-items: flex-end; }
.round { width: 4.4em; height: 4.4em; padding: .4em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05em;
  font: 400 .72em var(--ui-font); color: var(--cream); cursor: pointer; border-radius: 50%; border: .25em solid var(--outline);
  background: radial-gradient(circle at 40% 30%, var(--wood-hi), var(--wood-lo)); box-shadow: 0 .25em 0 var(--outline); text-shadow: 0 .1em 0 var(--outline); }
.round svg { width: 2.9em; height: 2.9em; filter: drop-shadow(0 .1em 0 var(--outline)); }
.round:disabled { filter: grayscale(.6) brightness(.8); cursor: default; }

/* loja, missões, runas (direita, embaixo) */
.hud-right { position: absolute; right: 1em; bottom: 1em; width: 13.5em; display: flex; flex-direction: column; gap: .55em; }
/* Loja, Missões diárias e Runas: uma família de cards — mesma moldura escura, brilho no alto, arte grande e
   plaquinha de madeira com o nome. A Loja é o card grande (dourado, com raios); Missões (verde-azulado) e
   Runas (roxo) ficam lado a lado embaixo. Parados (só o JOGAR é animado) */
.hud-right { gap: .6em; }
.tile-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.tile-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .3em;
  padding: .5em .35em .45em; cursor: pointer; font-family: var(--ui-font); color: var(--cream);
  border: .2em solid var(--outline); border-radius: .9em; transition: transform .12s, filter .15s;
  box-shadow: inset 0 .15em 0 rgba(255, 255, 255, .45), inset 0 -.3em .4em rgba(0, 0, 0, .22), 0 .25em 0 var(--outline), 0 .45em .8em rgba(0, 0, 0, .4); }
.tile-card:hover { filter: brightness(1.07); transform: translateY(-.08em); }
.tile-card:active { transform: translateY(.1em); }
.tile-art { width: 3.2em; height: 3.2em; filter: drop-shadow(0 .12em 0 var(--outline)); }
.tile-art svg { width: 100%; height: 100%; }
.tile-label { width: 100%; box-sizing: border-box; padding: .15em .3em .2em; text-align: center; font-size: 1em; line-height: 1.05;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood) 55%, var(--wood-lo)); border: .14em solid var(--outline); border-radius: .45em;
  -webkit-text-stroke: .03em var(--outline); text-shadow: 0 .1em 0 var(--outline); box-shadow: inset 0 .1em 0 rgba(255, 235, 190, .45); }
/* Loja: dourada com raios de sol atrás da barraquinha */
.tile-card.shop { padding: .4em .5em .55em;
  background: radial-gradient(circle at 50% 40%, rgba(255, 246, 200, .95) 0, rgba(255, 246, 200, 0) 40%),
    repeating-conic-gradient(from 0deg at 50% 40%, #ffcf4d 0deg 10deg, #f4b032 10deg 20deg), #f4b032; }
.tile-card.shop .tile-art { width: 4.8em; height: 4.8em; }
.tile-card.shop .tile-label { font-size: 1.35em; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(180deg, #f0604a, #c9342a 60%, #9a221c); box-shadow: inset 0 .1em 0 rgba(255, 200, 180, .5); }
/* Missões e Runas: cores próprias, mais calmas que a Loja */
.tile-card.missions { background: radial-gradient(circle at 50% 35%, #9fd6c9, #5fa3a0 55%, #3d7672); }
.tile-card.runes { background: radial-gradient(circle at 50% 35%, #cdb0e0, #9b6bb0 55%, #6a4482); }

/* JOGAR: botão de desenho animado (referência do dono, 17/10/2026), em verde — reto (sem inclinação),
   aro creme por fora, faixa verde-escura grossa embaixo, bolinhas de brilho no alto à esquerda,
   entalhes nas laterais e letras brancas com contorno grosso. É o único elemento do menu com animação
   (luz verde suave pulsando), para o olho ir direto nele */
.play { position: absolute; left: .7em; bottom: .85em; min-width: 6.4em; padding: .17em; cursor: pointer;
  font: 400 2.3em var(--ui-font); border: 0; background: #f7ecd2; border-radius: .6em;
  box-shadow: inset 0 -.06em 0 #dcc49a, 0 0 0 .05em rgba(59, 28, 10, .55), 0 .12em 0 .03em #c9a878, 0 .28em .45em rgba(0, 0, 0, .45);
  animation: play-glow 2.8s ease-in-out infinite; transition: transform .08s, filter .15s; }
.play-body { position: relative; display: flex; align-items: center; justify-content: center; gap: .28em; height: 100%;
  padding: .12em .8em .38em; box-sizing: border-box; overflow: hidden;
  border-radius: .5em;
  background: linear-gradient(170deg, #b6f27a 0%, #7ad646 38%, #52b92e 70%, #45a826 100%);
  box-shadow: inset 0 -.26em 0 #2f8a18, inset 0 -.31em 0 #24700f, inset 0 .08em 0 rgba(255, 255, 255, .5); }
/* brilho: um traço e uma bolinha no alto à esquerda */
.play-body::before { content: ""; position: absolute; left: .32em; top: .12em; width: 1.6em; height: .5em; pointer-events: none;
  background: radial-gradient(ellipse .32em .13em at .55em .14em, rgba(255, 255, 255, .95) 60%, transparent 62%),
    radial-gradient(circle .08em at 1.12em .14em, rgba(255, 255, 255, .95) 60%, transparent 66%); }
/* entalhes nas laterais (como madeira lascada) */
.play-body::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, transparent 47%, rgba(247, 236, 210, .9) 47% 53%, transparent 53%) left .02em top 38% / .38em .16em no-repeat,
    linear-gradient(20deg, transparent 47%, rgba(247, 236, 210, .9) 47% 53%, transparent 53%) right .02em top 30% / .34em .14em no-repeat; }
.play:hover { filter: brightness(1.06) saturate(1.08); }
.play:active { transform: translateY(.08em) scale(.98); animation: none; }
.play-ico { position: relative; width: 1em; height: 1em; flex: none; display: block; }
.play-ico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.play-txt { position: relative; font-size: 1.15em; color: #fff; letter-spacing: .05em; text-transform: uppercase;
  -webkit-text-stroke: .11em #1d5a0c; paint-order: stroke fill; text-shadow: 0 .07em 0 #1d5a0c; }
@keyframes play-glow { 50% { box-shadow: inset 0 -.06em 0 #dcc49a, 0 0 0 .05em rgba(59, 28, 10, .55), 0 .12em 0 .03em #c9a878,
  0 .28em .45em rgba(0, 0, 0, .45), 0 0 .5em .1em rgba(143, 227, 90, .55); } }
@media (prefers-reduced-motion: reduce) { .play { animation: none; } }
.hud-queue { position: absolute; left: 50%; top: 1em; translate: -50% 0; }

/* celular em pé: carteira em cima, jogador embaixo dela, botões da direita e JOGAR largo embaixo */
.menu-hud.portrait .hud-wallet { left: 1em; right: auto; top: 9.2em; }   /* celular: carteira embaixo do cartão do jogador */
.menu-hud.portrait .hud-player { top: .8em; }
.menu-hud.portrait .hud-round { top: auto; bottom: 7.1em; left: 1em; right: auto; flex-direction: row; }
.menu-hud.portrait .hud-right { bottom: 7.1em; width: 11em; }
.menu-hud.portrait .play { right: .5em; bottom: .75em; font-size: 2em; }
.menu-hud.portrait .play-body { padding: .2em .8em .4em; }
.menu-hud.portrait .hud-queue { top: auto; bottom: 18em; }

/* ---------- tela dos modos ---------- */
.menu-hud.modes { display: flex; flex-direction: column; gap: 1em; padding: 1em 1.2em 1.2em; box-sizing: border-box; }
.modes-head { display: flex; align-items: center; gap: .7em; }
.modes-head h2 { margin: 0; font-weight: 400; font-size: 1.7em; color: var(--gold); -webkit-text-stroke: .05em var(--outline); text-shadow: 0 .1em 0 var(--outline); }
.btn.round-back { width: 2.6em; height: 2.6em; padding: .45em; border-radius: 50%; border-width: .18em; }
.mode-cards { display: grid; grid-template-columns: repeat(4, 1fr) .75fr; gap: .8em; }
.mode-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em; min-height: 9em;
  padding: .7em .4em; font: 400 1em var(--ui-font); color: var(--cream); cursor: pointer; text-align: center;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood) 55%, var(--wood-lo)); border: .22em solid var(--outline); border-radius: 1em;
  box-shadow: inset 0 .2em 0 rgba(255, 235, 190, .45), 0 .3em 0 var(--outline); text-shadow: 0 .12em 0 var(--outline); }
.mode-card .mode-ico svg { width: 3em; height: 3em; }
.mode-card .mode-title { font-size: 1.15em; line-height: 1.1; }
.mode-card .mode-sub { font: 700 .7em 'Alegreya Sans', sans-serif; opacity: .9; }
.mode-card .soon { position: absolute; top: -.6em; right: -.4em; margin: 0; }
.mode-card.small .mode-title { font-size: 1em; }
.mode-card.sel { background: linear-gradient(180deg, #fff1b8, var(--gold) 55%, #c98a1c); color: var(--outline); text-shadow: none;
  box-shadow: inset 0 .2em 0 rgba(255, 255, 255, .6), 0 .3em 0 var(--outline), 0 0 0 .2em var(--gold); }
.mode-summary { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .4em; padding: 1em 1.2em; box-sizing: border-box;
  background: var(--parchment); color: #4a2a12; border: .22em solid var(--outline); border-radius: 1em; box-shadow: inset 0 .25em .5em rgba(90, 50, 20, .3); }
.mode-summary h3 { margin: 0; font: 400 1.4em var(--ui-font); color: #6b3a0e; }
.mode-summary p { margin: 0; font: 700 1em/1.35 'Alegreya Sans', sans-serif; }
.mode-summary .gains { opacity: .8; }
.mode-summary .btn { margin-top: auto; align-self: flex-end; width: auto; min-width: 8em; font-size: 1.2em; border-width: .18em; }
.menu-hud.modes.portrait .mode-cards { grid-template-columns: repeat(2, 1fr); }
.menu-hud.modes.portrait .mode-card { min-height: 6.5em; }
.menu-hud.modes.portrait .mode-card.small { grid-column: 1 / -1; min-height: 3.5em; flex-direction: row; }
.menu-hud.modes.portrait .mode-card.small svg { width: 2em; height: 2em; }

/* ---------- telas abertas pelos botões do menu (Perfil, Rank, Mail, Loja, Missões, Runas, Passe) ---------- */
.menu-hud.page { display: flex; flex-direction: column; gap: 1em; padding: 1em 1.2em 1.2em; box-sizing: border-box; }
.page-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 1em 1.2em; box-sizing: border-box; overflow: hidden;
  background: var(--parchment); color: #4a2a12; border: .22em solid var(--outline); border-radius: 1em; box-shadow: inset 0 .25em .5em rgba(90, 50, 20, .3); }
/* vazio: ícone grande, frase e dica */
.page-body .empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em; text-align: center; }
.page-body .empty-ico { width: 5em; height: 5em; opacity: .9; filter: drop-shadow(0 .15em 0 rgba(59, 28, 10, .5)); }
.page-body .empty-ico svg { width: 100%; height: 100%; }
.page-body .empty .big { margin: .2em 0 0; font: 400 1.4em var(--ui-font); color: #6b3a0e; }
.page-body .empty p { margin: 0; font: 700 1em 'Alegreya Sans', sans-serif; opacity: .8; }

/* perfil */
.profile-card { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2em; }
.hud-avatar.big { width: 9em; height: 9em; padding: .6em; }
.hud-avatar.big .lvl { font-size: 1.3em; }
.profile-info { display: flex; flex-direction: column; align-items: flex-start; gap: .55em; }
.profile-name { display: flex; align-items: center; gap: .4em; font: 400 2em var(--ui-font); color: #4a2a12; }
.profile-name .streak { display: inline-flex; align-items: center; gap: .1em; font-size: .7em; color: #d26a10; }
.profile-name .streak svg { width: 1.1em; height: 1.1em; }
.profile-country { display: flex; align-items: center; gap: .45em; font: 700 1.05em 'Alegreya Sans', sans-serif; }
.profile-country .flag { height: 1.1em; }
.profile-info .division { min-width: 12em; }
.profile-since { margin: .2em 0 0; font: 700 .95em 'Alegreya Sans', sans-serif; opacity: .75; }

/* rank */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4em; }
.rank-list.mine { margin-top: .6em; padding-top: .6em; border-top: .15em dashed rgba(90, 50, 20, .4); }
.rank-row { display: grid; grid-template-columns: 2.2em 2.4em 1fr auto; align-items: center; gap: .6em; padding: .35em .6em;
  background: rgba(255, 255, 255, .35); border: .14em solid rgba(90, 50, 20, .35); border-radius: .6em; }
.rank-row.me { background: #fff3c4; border-color: var(--gold); box-shadow: 0 0 0 .12em var(--outline); }
.rank-pos { font: 400 1.3em var(--ui-font); color: #6b3a0e; text-align: center; }
.rank-row .avatar { width: 2.4em; height: 2.4em; border-width: .14em; padding: .2em; box-shadow: none; }
.rank-name { display: flex; align-items: center; gap: .4em; min-width: 0; font: 700 1.05em 'Alegreya Sans', sans-serif; }
.rank-name > span:not(.streak) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name .flag { height: .95em; }
.rank-name .streak { display: inline-flex; align-items: center; color: #d26a10; font: 400 .95em var(--ui-font); }
.rank-name .streak svg { width: 1em; height: 1em; }
.rank-row .division { min-width: 8em; font-size: .85em; }
.loading-note { margin: auto; font: 400 1.5em var(--ui-font); opacity: .6; }
.menu-hud.page.portrait .profile-card { flex-direction: column; gap: 1em; }
.menu-hud.page.portrait .profile-info { align-items: center; }

/* resposta ao passar o mouse e ao clicar nos destaques (sem animação contínua) */
.battle-pass { transition: transform .12s, filter .15s; }
.battle-pass:hover { filter: brightness(1.07); transform: translateY(-.08em); }
.battle-pass:active { transform: translateY(.1em); }

/* ---------- Partida Personalizada: criar sala / entrar pelo código ---------- */
.custom-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; align-items: stretch; }
.custom-box { display: flex; flex-direction: column; gap: .6em; padding: .4em .2em; }
.custom-box h3 { margin: 0; font: 400 1.4em var(--ui-font); color: #6b3a0e; }
.page-body .hint { font: 700 .9em 'Alegreya Sans', sans-serif; opacity: .8; }
.fmt-picks { display: grid; grid-template-columns: 1fr 1fr; gap: .45em; }
.fmt-pick { padding: .45em .4em; font: 400 .9em var(--ui-font); color: var(--cream); cursor: pointer; border-radius: .6em;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood) 55%, var(--wood-lo)); border: .14em solid var(--outline);
  text-shadow: 0 .1em 0 var(--outline); box-shadow: 0 .15em 0 var(--outline); }
.fmt-pick.sel { background: linear-gradient(180deg, #fff1b8, var(--gold)); color: var(--outline); text-shadow: none; box-shadow: 0 .15em 0 var(--outline), 0 0 0 .14em var(--gold); }
.fmt-pick:disabled { cursor: default; }
.fmt-pick:disabled:not(.sel) { opacity: .55; }
.custom-box .btn { margin-top: auto; font-size: 1.1em; }
.code-input { font: 400 2em var(--ui-font); letter-spacing: .35em; text-align: center; text-transform: uppercase; color: #3b1c0a; padding: .25em .3em;
  background: var(--cream); border: .12em solid var(--outline); border-radius: .4em; box-shadow: inset 0 .1em .2em rgba(90, 50, 20, .3); outline: none; }
.code-input:focus { border-color: var(--gold); }
.page-msg { margin: .4em 0 0; min-height: 1.3em; color: #b02a1e; text-shadow: none; }
.page-msg.ok { color: #2e7d17; }

/* ---------- sala de espera ---------- */
.lobby { flex: 1; display: flex; flex-direction: column; gap: .8em; }
.lobby-code { display: flex; flex-direction: column; align-items: center; gap: .2em; }
.code-row { display: flex; align-items: center; gap: .6em; }
/* código da sala: cada caractere numa caixinha do mesmo tamanho, para ficar alinhado e centralizado */
.room-code { display: inline-flex; justify-content: center; gap: .18em; font: 400 2.6em var(--ui-font); color: #6b3a0e; padding: .08em .35em;
  background: rgba(255, 255, 255, .5); border: .08em dashed rgba(90, 50, 20, .5); border-radius: .3em; }
.room-code span { width: .78em; text-align: center; }
.btn.small.eye { width: 2.6em; height: 2.4em; padding: .3em; }
.btn.small.eye svg { width: 100%; height: 100%; display: block; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.slot { display: flex; align-items: center; gap: .5em; padding: .45em .6em; background: rgba(255, 255, 255, .45);
  border: .14em solid rgba(90, 50, 20, .4); border-radius: .7em; font: 700 1.05em 'Alegreya Sans', sans-serif; min-width: 0; }
.slot.empty { opacity: .6; border-style: dashed; }
.slot .avatar { width: 2.4em; height: 2.4em; border-width: .14em; padding: .2em; box-shadow: none; }
.slot.empty .avatar { background: rgba(0, 0, 0, .08); }
.slot.off { opacity: .7; }
.slot-name { display: flex; align-items: center; gap: .35em; flex: 1; min-width: 0; }
.slot-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-name .flag { height: .95em; }
.tag { font: 400 .72em var(--ui-font); padding: .12em .5em; border-radius: .6em; border: .12em solid var(--outline); white-space: nowrap; }
.tag.lead { background: var(--gold); color: var(--outline); }
.tag.on { background: var(--green); color: #fff; }
.tag.off { background: #8a8a8a; color: #fff; }
.lobby-format { display: flex; flex-direction: column; gap: .35em; }
.lobby-format .fmt-picks { grid-template-columns: repeat(4, 1fr); }
.lobby-actions { margin-top: auto; display: flex; gap: .8em; justify-content: flex-end; }
.lobby-actions .btn { width: auto; min-width: 9em; font-size: 1.05em; }
.menu-hud.page.portrait .custom-grid { grid-template-columns: 1fr; }
.menu-hud.page.portrait .slots { grid-template-columns: 1fr; }
.menu-hud.page.portrait .lobby-format .fmt-picks { grid-template-columns: 1fr 1fr; }

/* ---------- fim da partida online ---------- */
.match-end { text-align: center; }
.match-end h2 { font-size: 2.2rem; }
.match-end.won h2 { color: #c9f7a8; }
.match-end.lost h2 { color: #ffb0a6; }
.end-score { margin: 0 0 12px; font: 400 2.4rem var(--ui-font); color: var(--cream); text-shadow: 0 3px 0 var(--outline); }

/* ---------- partida online no 3D: cartões dos jogadores e avisos ---------- */
body.in-match #controls { display: none; }
/* o letreiro do meio saiu (decisão do dono): quem joga aparece na Placa do Duelo e o fim da rodada vira aviso temporário */
#sign { display: none !important; }
#toast { position: absolute; left: 50%; bottom: 84px; translate: -50% 0; z-index: 8; padding: 8px 16px; pointer-events: none;
  font: 400 1rem var(--ui-font); color: var(--cream); background: rgba(30, 14, 5, .85); border: 3px solid var(--outline); border-radius: 12px;
  opacity: 0; transition: opacity .25s; text-shadow: 0 2px 0 var(--outline); }
#toast.show { opacity: 1; }
#toast.big { top: 38%; bottom: auto; padding: 10px 28px; font-size: 2.2rem; color: var(--gold); border-width: 4px; border-radius: 16px;
  -webkit-text-stroke: 1px var(--outline); text-shadow: 0 3px 0 var(--outline); background: linear-gradient(180deg, rgba(90, 50, 24, .95), rgba(40, 18, 6, .95)); }
#toast.big.show { animation: toast-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes toast-pop { from { scale: .7; } to { scale: 1; } }
@media (max-width: 760px) {
    }


/* emotes: botão ao lado do seu cartão, paleta e balões embaixo dos cartões */
#emote-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; display: none; }
#emote-layer.active { display: block; }
body.intro #emote-layer { display: none; }
#emote-ui { position: absolute; top: 14px; left: calc(min(220px, 30%) + 26px); pointer-events: auto; }
#emote-ui.right { left: auto; right: calc(min(220px, 30%) + 26px); }
#emote-btn { width: 46px; height: 46px; padding: 6px; font-size: 16px; }
#emote-btn svg { width: 100%; height: 100%; }
#emote-pal { display: none; position: absolute; top: 54px; left: 0; width: 248px; padding: 8px; gap: 6px; grid-template-columns: repeat(6, 1fr);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .16)), var(--wood); border: 3px solid var(--outline); border-radius: 14px;
  box-shadow: 0 4px 0 var(--outline), 0 8px 18px rgba(0, 0, 0, .5); }
#emote-ui.right #emote-pal { left: auto; right: 0; }
#emote-ui.open #emote-pal { display: grid; }
#emote-pal .emo { font-size: 22px; line-height: 1; padding: 4px 0; cursor: pointer; background: rgba(0, 0, 0, .2); border: 2px solid var(--outline); border-radius: 10px; }
#emote-pal .phr { grid-column: span 3; padding: 6px 4px; cursor: pointer; font: 400 .85rem var(--ui-font); color: var(--cream); text-shadow: 0 1px 0 var(--outline);
  background: linear-gradient(180deg, var(--wood-hi), var(--wood-lo)); border: 2px solid var(--outline); border-radius: 10px; }
#emote-pal button:hover { filter: brightness(1.15); }
.obubble { position: absolute; top: 96px; max-width: 220px; padding: 6px 12px; opacity: 0; translate: 0 -6px; transition: opacity .2s, translate .2s;
  font: 400 1rem var(--ui-font); color: #3b1c0a; background: var(--cream); border: 3px solid var(--outline); border-radius: 14px; box-shadow: 0 3px 0 var(--outline); }
.obubble.b1 { left: 24px; }
.obubble.b2 { right: 24px; }
.obubble.big { font-size: 2rem; padding: 2px 10px; line-height: 1.2; }
.obubble.show { opacity: 1; translate: 0 0; }
.obubble::before { content: ""; position: absolute; top: -10px; width: 14px; height: 14px; background: var(--cream); border-left: 3px solid var(--outline);
  border-top: 3px solid var(--outline); rotate: 45deg; }
.obubble.b1::before { left: 22px; }
.obubble.b2::before { right: 22px; }

/* Personalizada: dois botões grandes; procurar sala abre uma janelinha por cima */
.custom-choice { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.1em; }
.big-choice { width: min(22em, 90%); font-size: 1.7em; padding: .55em .6em; text-transform: uppercase; letter-spacing: .05em; }
.page-body { position: relative; }
.popup-back { position: absolute; inset: 0; background: rgba(30, 14, 5, .45); border-radius: .8em; }
.popup { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(26em, 92%); box-sizing: border-box; display: flex; flex-direction: column; gap: .5em; }
.popup .hint { color: var(--cream); opacity: 1; text-shadow: 0 1px 0 var(--outline); }
.popup .code-row { display: flex; gap: .5em; }
.popup .code-input { flex: 1; min-width: 0; }
.popup .btn-row .btn { flex: 1; }
.popup .popup-msg { color: #ffb0a6; text-shadow: 0 1px 2px #000; }
/* sala de espera: código escondido e regras simples */
.room-code.hidden { color: #8a6a4a; }
.room-code.hidden span { translate: 0 .18em; }   /* o asterisco fica alto na fonte: desce para o meio */
.lobby-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; align-items: start; }
.lobby-rules .rule { display: flex; flex-direction: column; gap: .35em; }
.fmt-picks.three { grid-template-columns: repeat(3, 1fr); }
.fmt-picks.three .fmt-pick { font-size: 1.15em; }
.rule-note { margin: 1.4em 0 0; }
.menu-hud.page.portrait .lobby-rules { grid-template-columns: 1fr; }

/* ===================== Placa do Duelo (partida online e Treino) ===================== */
/* só aparece na partida online e no Treino; some durante a abertura (câmera chegando) */
body:not(.in-match):not(.in-training) #online-hud { display: none; }
body.intro #online-hud { opacity: 0; }
#online-hud { transition: opacity .6s; }
#online-hud { position: absolute; top: 18px; left: 50%; translate: -50% 0; width: min(780px, calc(100% - 24px)); pointer-events: none; z-index: 5; }
.duel { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 74px; padding: 0 12px;
  border: 4px solid var(--outline); border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(224, 71, 58, .28), rgba(224, 71, 58, 0) 38%, rgba(47, 99, 207, 0) 62%, rgba(47, 99, 207, .28)),
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(0, 0, 0, .2)),
    repeating-linear-gradient(180deg, var(--wood) 0 23px, var(--wood-lo) 23px 24px, var(--plank-gap) 24px 26px), var(--wood);
  box-shadow: inset 0 3px 0 rgba(255, 230, 180, .4), inset 0 -4px 0 rgba(0, 0, 0, .25), 0 5px 0 var(--outline), 0 10px 22px rgba(0, 0, 0, .5); }
/* correntinhas e pregos: a placa fica "pendurada" */
.duel::before, .duel::after { content: ""; position: absolute; top: -22px; width: 4px; height: 20px;
  background: repeating-linear-gradient(180deg, #8a7a60 0 4px, #3b2c18 4px 6px); border-radius: 2px; }
.duel::before { left: 18%; } .duel::after { right: 18%; }
.side { display: flex; align-items: center; gap: 10px; min-width: 0; transition: filter .25s, opacity .25s; }
.side.p2 { flex-direction: row-reverse; text-align: right; }
.duel:not(.local) .side:not(.turn) { filter: saturate(.75) brightness(.86); }
.side.off { filter: grayscale(.9) brightness(.7) !important; }
/* anel do tempo: esvazia na cor do jogador enquanto é a vez dele */
.ring { --team: #e0473a; position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; padding: 5px; box-sizing: border-box;
  background: conic-gradient(var(--team) calc(var(--t, 0) * 360deg), rgba(20, 8, 2, .55) 0); border: 3px solid var(--outline); box-shadow: 0 3px 0 var(--outline); }
.side.p2 .ring { --team: #3f7ae6; }
.side.hurry .ring { --team: #ff8a2a; }
.side.turn .ring { box-shadow: 0 3px 0 var(--outline), 0 0 14px 2px color-mix(in srgb, var(--team) 70%, transparent); }
.ava { width: 100%; height: 100%; border-radius: 50%; padding: 4px; box-sizing: border-box; border: 2px solid var(--outline);
  background: radial-gradient(circle at 40% 30%, #f7dcab, #c88a4a); display: grid; place-items: center; }
.ava svg { width: 100%; height: 100%; display: block; }
.ava .chip { width: 26px; height: 26px; }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-family: var(--ui-font); color: var(--cream); }
.side.p2 .who { align-items: flex-end; }
.who b { font-weight: 400; font-size: 1.15rem; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
  -webkit-text-stroke: .5px var(--outline); text-shadow: 0 2px 0 var(--outline); }
.who small { display: flex; align-items: center; gap: 6px; font: 700 .72rem 'Alegreya Sans', sans-serif; min-height: 14px; }
.who small .flag { height: 12px; border-width: 1.5px; border-radius: 2px; box-shadow: none; }
.who .you { color: var(--gold); font-family: var(--ui-font); font-weight: 400; text-shadow: 0 1px 0 var(--outline); }
.who .offtag { padding: 0 6px; border-radius: 8px; background: #6a6a6a; color: #fff; }
/* segundos da jogada: plaquinha na borda de baixo do anel de quem joga */
.secs { position: absolute; left: 50%; bottom: -9px; translate: -50% 0; min-width: 22px; padding: 0 5px; box-sizing: border-box;
  font: 400 .85rem/1.25 var(--ui-font); font-style: normal; color: var(--cream); text-align: center; text-shadow: 0 1px 0 var(--outline);
  background: #2a1408; border: 2px solid var(--outline); border-radius: 9px; }
.secs:empty { display: none; }
.side.hurry .secs { color: #ffb36a; }
/* rodadas: esferas encaixadas em buracos de madeira */
.sockets { display: flex; gap: 5px; margin-top: 3px; }
.side.p2 .sockets { flex-direction: row-reverse; }
.sock { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 230, 180, .35); background: #2a160a; }
.sock.won { background: radial-gradient(circle at 35% 30%, #d6ffad, #5fc23a 55%, #2e7d17); box-shadow: 0 0 0 2px #2a160a, 0 0 6px rgba(143, 227, 90, .6); }
.sock.lost { background: radial-gradient(circle at 35% 30%, #ffb3a6, #e0473a 55%, #9e2a20); box-shadow: 0 0 0 2px #2a160a; }
.sock.draw { background: radial-gradient(circle at 35% 30%, #fff1b8, var(--gold) 55%, #b9831c); box-shadow: 0 0 0 2px #2a160a; }
/* estrela de xerife no meio */
.medal { position: relative; width: 74px; height: 74px; margin: -6px 6px 0; display: grid; place-items: center; }
.medal svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 3px 0 var(--outline)); }
.medal .vs { position: relative; margin-top: -6px; font: 400 1.05rem var(--ui-font); color: #fff6d8; -webkit-text-stroke: .6px var(--outline); text-shadow: 0 2px 0 var(--outline); }
.medal .rd { position: absolute; bottom: -12px; padding: 1px 8px; white-space: nowrap; font: 400 .72rem var(--ui-font); color: var(--cream);
  background: linear-gradient(180deg, #c9342a, #8a1d17); border: 2px solid var(--outline); border-radius: 8px; text-shadow: 0 1px 0 var(--outline); }
.duel.local { height: 62px; }
/* treino: nome no meio de cada metade, para a placa ficar simétrica dos dois lados */
.duel.local .who { flex: 1; align-items: center; text-align: center; }
.duel.local .ring { width: 46px; height: 46px; }
/* emotes presos à placa: botão embaixo do seu lado, balões embaixo de cada lado */
#emote-ui { position: absolute; top: 104px; left: calc(50% - min(390px, 50% - 12px) + 14px); pointer-events: auto; }
#emote-ui.right { left: auto; right: calc(50% - min(390px, 50% - 12px) + 14px); }
.obubble { top: 104px; }
.obubble.b1 { left: calc(50% - min(390px, 50% - 12px) + 70px); }
.obubble.b2 { right: calc(50% - min(390px, 50% - 12px) + 70px); }
@media (max-width: 760px) {
  #online-hud { top: 26px; }
  .duel { height: 62px; padding: 0 6px; }
  .ring { width: 44px; height: 44px; padding: 4px; }
  .who b { font-size: .95rem; }
  .medal { width: 56px; height: 56px; margin: -4px 2px 0; }
  .medal .vs { font-size: .85rem; }
  .secs { font-size: .75rem; min-width: 20px; bottom: -8px; }
  .sock { width: 12px; height: 12px; }
  #emote-ui, .obubble { top: 94px; }
}

/* render-se: bandeira branca no canto inferior esquerdo (só na partida online) e confirmação */
#match-exit { position: absolute; left: 16px; bottom: 16px; z-index: 30; width: 52px; height: 52px; padding: 10px; border-radius: 50%; display: none; }
#match-exit svg { width: 100%; height: 100%; display: block; }
body.in-match:not(.intro) #match-exit { display: block; }
#ui-root.open ~ #match-exit { display: none !important; }
.btn.danger { background: linear-gradient(180deg, #f0604a, #c9342a 55%, #9a221c); }
.panel.surrender { text-align: center; }
.panel.surrender .btn-row .btn { flex: 1; }
@media (max-width: 760px) { #match-exit { width: 42px; height: 42px; left: 10px; bottom: 10px; padding: 8px; } }

/* ---------- aposta na sala, pot na placa e ouro no fim ---------- */
.gold-ico { width: 1.15em; height: 1.15em; vertical-align: -.22em; margin-right: .15em; filter: hue-rotate(10deg) saturate(1.3) brightness(1.15); }
.lobby-bet { display: flex; flex-direction: column; gap: .4em; padding: .55em .7em; background: rgba(255, 255, 255, .35); border: .12em solid rgba(90, 50, 20, .35); border-radius: .7em; }
.bet-head { display: flex; align-items: center; justify-content: space-between; gap: .6em; flex-wrap: wrap; }
.bet-sum { font: 700 1.05em 'Alegreya Sans', sans-serif; }
.bet-sum b { font-family: var(--ui-font); font-weight: 400; font-size: 1.15em; color: #6b3a0e; }
.bet-picks { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; }
.bet-picks .fmt-pick { flex: 1 1 auto; min-width: 5.5em; display: inline-flex; align-items: center; justify-content: center; }
.bet-custom { display: flex; gap: .35em; flex: 1 1 12em; }
.bet-custom input { flex: 1; min-width: 0; font: 700 1em 'Alegreya Sans', sans-serif; padding: .3em .5em; color: #3b1c0a; background: var(--cream);
  border: .12em solid var(--outline); border-radius: .5em; }
.bet-accept { align-self: flex-start; width: auto; font-size: 1.05em; }
.bet-status { display: flex; flex-wrap: wrap; gap: .4em; }
.tag.wait { background: #d9a43a; color: var(--outline); }
.medal .pot { position: absolute; bottom: -34px; display: flex; align-items: center; gap: 3px; padding: 1px 8px 1px 4px; white-space: nowrap;
  font: 400 .8rem var(--ui-font); color: #3b1c0a; background: linear-gradient(180deg, #fff1b8, var(--gold)); border: 2px solid var(--outline); border-radius: 10px; }
.medal .pot img { width: 16px; height: 16px; filter: hue-rotate(10deg) saturate(1.3) brightness(1.15); }
.end-gold { margin: 0 0 12px; font: 400 1.8rem var(--ui-font); color: var(--cream); text-shadow: 0 3px 0 var(--outline); }
.end-gold.plus { color: #c9f7a8; } .end-gold.minus { color: #ffb0a6; }
.end-gold .gold-ico { width: 1em; height: 1em; }

/* ===================== tela de carregamento da partida ===================== */
/* dois cartões de madeira com a moldura da divisão, VS/pot/rodadas no meio; tudo em em (cresce com o quadro) */
#match-loading { position: absolute; inset: 0; z-index: 9; display: none; place-items: center; overflow: hidden; container-type: size;
  background: radial-gradient(ellipse at 50% 45%, rgba(74, 36, 18, .92), rgba(18, 8, 4, .97) 70%); }
body.match-loading #match-loading { display: grid; }
body.match-loading #online-hud, body.match-loading #emote-layer, body.match-loading #match-exit, body.match-loading #hint { visibility: hidden; }
.ml-wrap { position: relative; font-size: min(2.55cqw, 2.9cqh); display: grid; grid-template-columns: 13em 8.5em 13em; align-items: center;
  column-gap: .6em; row-gap: 1.2em; font-family: var(--ui-font); color: var(--cream); }
.ml-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: .55em; padding: .8em .9em 1em;
  border: .22em solid var(--outline); border-radius: 1.2em;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .16)),
    repeating-linear-gradient(180deg, var(--wood) 0 2.4em, var(--wood-lo) 2.4em 2.5em, var(--plank-gap) 2.5em 2.65em), var(--wood);
  box-shadow: inset 0 .15em 0 rgba(255, 230, 180, .4), inset 0 -.25em 0 rgba(0, 0, 0, .22), 0 .3em 0 var(--outline), 0 .7em 1.4em rgba(0, 0, 0, .5); }
.ml-card.tier-bronze { border: .4em solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .16)) padding-box,
    repeating-linear-gradient(180deg, var(--wood) 0 2.4em, var(--wood-lo) 2.4em 2.5em, var(--plank-gap) 2.5em 2.65em) padding-box,
    linear-gradient(135deg, var(--bronze-hi), var(--bronze) 30%, var(--bronze-lo) 50%, var(--bronze) 70%, var(--bronze-hi)) border-box;
  box-shadow: 0 0 0 .16em var(--outline), inset 0 .15em 0 rgba(255, 230, 180, .4), inset 0 -.25em 0 rgba(0, 0, 0, .22),
    0 .3em 0 .16em var(--outline), 0 .7em 1.4em rgba(0, 0, 0, .5); }
.ml-top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; min-height: 1.5em; }
.ml-flag .flag { height: 1.3em; width: auto; border-radius: .2em; }
.ml-streak { display: inline-flex; align-items: center; gap: .1em; font-size: 1.05em; color: #ffb35a; text-shadow: 0 .1em 0 var(--outline); }
.ml-streak svg { width: 1.2em; height: 1.2em; }
.ml-ava { position: relative; margin-bottom: .5em; }
.ml-ava .ring { width: 7.6em; height: 7.6em; padding: .45em; --t: 1; border-width: .2em; }
.ml-card.p2 .ring { --team: #3f7ae6; }
.ml-ava .lvl { position: absolute; left: 50%; bottom: -.7em; translate: -50% 0; min-width: 2.4em; padding: .05em .5em; text-align: center;
  font-size: 1.05em; background: linear-gradient(180deg, var(--green-hi), var(--green-lo)); border: .18em solid var(--outline); border-radius: 1em;
  -webkit-text-stroke: .04em var(--outline); text-shadow: 0 .1em 0 var(--outline); }
.ml-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 1.35em;
  -webkit-text-stroke: .03em var(--outline); text-shadow: 0 .12em 0 var(--outline); }
.ml-card .division { align-self: stretch; justify-content: center; text-align: center; font-size: .95em; }
.ml-bet { display: inline-flex; align-items: center; gap: .2em; padding: .15em .8em .15em .4em; font-size: 1.15em; color: #3b1c0a;
  background: linear-gradient(180deg, #fff1b8, var(--gold)); border: .16em solid var(--outline); border-radius: 1em; box-shadow: 0 .15em 0 var(--outline); }
.ml-bet .gold-ico { margin: 0; }
.ml-load { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: .25em; margin-top: .2em; }
.ml-pct { font-size: 1em; text-shadow: 0 .1em 0 var(--outline); }
.ml-bar { align-self: stretch; height: .9em; border-radius: .6em; background: rgba(20, 8, 2, .6); border: .15em solid var(--outline); overflow: hidden; }
.ml-bar i { display: block; height: 100%; width: 0; border-radius: .4em; transition: width .5s ease-out;
  background: linear-gradient(180deg, var(--green-hi), var(--green) 55%, var(--green-lo)); }
.ml-card:not(.ready) { filter: saturate(.85); }
.ml-mid { display: flex; flex-direction: column; align-items: center; gap: 1.1em; }
/* VS: a mesma estrela de xerife da Placa do Duelo, maior */
.ml-vs { position: relative; width: 8em; height: 8em; display: grid; place-items: center; }
.ml-vs svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 .3em .4em rgba(0, 0, 0, .55)); }
.ml-vs span { position: relative; margin-top: -.22em; font-size: 1.6em; color: var(--cream); -webkit-text-stroke: .06em var(--outline); paint-order: stroke fill;
  text-shadow: 0 .08em 0 var(--outline); }
.ml-pot { display: flex; flex-direction: column; align-items: center; gap: .15em; }
.ml-pot small, .ml-series small { font-size: .95em; opacity: .9; text-shadow: 0 .1em 0 var(--outline); }
.ml-pot span { display: inline-flex; align-items: center; gap: .2em; padding: .2em .9em .2em .45em; font-size: 1.5em; color: #3b1c0a;
  background: linear-gradient(180deg, #fff1b8, var(--gold)); border: .14em solid var(--outline); border-radius: .8em; box-shadow: 0 .14em 0 var(--outline); }
.ml-pot b { font-weight: 400; min-width: 2.5em; text-align: center; }
.ml-series { display: flex; flex-direction: column; align-items: center; gap: .3em; }
.ml-series .sockets { display: flex; gap: .3em; }
.ml-series .sock { width: 1.1em; height: 1.1em; }
.ml-text { grid-column: 1 / -1; margin: 0; min-height: 1.4em; text-align: center; font: 700 1.15em 'Alegreya Sans', sans-serif; opacity: .9; }
/* moedas: o invólucro anda na horizontal, a moeda dentro faz o arco; somem dentro do pot */
.ml-coin { position: absolute; width: 0; height: 0; z-index: 2; animation: coin-x 1.1s linear var(--d) both; }
.ml-coin i { position: absolute; left: -1.1em; top: -1.1em; display: block; animation: coin-y 1.1s var(--d) both; }
.ml-coin img { width: 2.2em; height: 2.2em; display: block; filter: hue-rotate(10deg) saturate(1.3) brightness(1.15); animation: coin-spin .55s linear infinite; }
@keyframes coin-x { 0% { translate: 0 0; opacity: 0; } 8% { opacity: 1; } 90% { opacity: 1; } 100% { translate: var(--dx) 0; opacity: 0; } }
@keyframes coin-y { 0% { translate: 0 0; animation-timing-function: cubic-bezier(.2, .7, .4, 1); } 45% { translate: 0 -6em; animation-timing-function: cubic-bezier(.6, 0, .8, .4); } 100% { translate: 0 var(--dy); } }
@keyframes coin-spin { 0%, 100% { scale: 1 1; } 50% { scale: .25 1; } }
@media (prefers-reduced-motion: reduce) { .ml-coin { display: none; } .ml-bar i { transition: none; } }
/* quadro estreito (celular em pé): cartões menores, o meio entre eles */
@container (max-aspect-ratio: 3/4) { .ml-wrap { font-size: 2.6cqw; grid-template-columns: 12em 7.5em 12em; } }

/* sala: aviso de quem falta ficar pronto */
.lobby-wait { min-height: 1.3em; text-align: center; font-weight: 700; }
.lobby .page-msg:empty, .lobby-wait:empty { display: none; }
.menu-hud.page.portrait .lobby { gap: .55em; }

/* carregando: ferradura girando no canto inferior esquerdo */
.ml-spin { position: absolute; left: 3cqmin; bottom: 3cqmin; width: 9cqmin; height: 9cqmin; max-width: 64px; max-height: 64px; }
.ml-spin svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 .2em .3em rgba(0, 0, 0, .5)); transform-origin: 50% 61.7%; animation: shoe-spin 1.4s linear infinite; }
@keyframes shoe-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .ml-spin svg { animation-duration: 4s; } }
