/* Top Ten — preto, branco e azul, cantos arredondados. Ver brand.html */
/* Topzi — vermelho, preto e creme. Ver brand.html */
:root {
  --accent: #FF4D3D;        /* vermelho Topzi: botões, destaques, o topo do "10" */
  --accent-ink: #D93A2B;    /* o mesmo vermelho, mais escuro, para texto pequeno */
  --accent-soft: #FFE1D4;
  --on-accent: #171717;
  --bad: #B8261A;           /* erros */
  --team1: #171717;         /* Time Preto */
  --on-team1: #FFF4DE;

  --bg: #FFF4DE;            /* creme */
  --surface: #F7E7C8;
  --fg: #171717;            /* preto */
  --muted: #6B6151;
  --line: #E8D5B0;

  --r: 16px;
  --r-sm: 11px;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Modo escuro: segue o aparelho, a menos que o jogador escolha. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-ink: #FF6B5D; --accent-soft: #3B1F1A; --bad: #FF8A7F;
    --team1: #4A4540; --on-team1: #FFF4DE;
    --bg: #171717; --surface: #232120; --fg: #FFF4DE; --muted: #B5AA93; --line: #38342F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent-ink: #FF6B5D; --accent-soft: #3B1F1A; --bad: #FF8A7F;
  --team1: #4A4540; --on-team1: #FFF4DE;
  --bg: #171717; --surface: #232120; --fg: #FFF4DE; --muted: #B5AA93; --line: #38342F;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Nada passa da largura da tela no celular (nem animação de entrada), senão o navegador afasta o zoom. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.45;
  min-height: 100vh;
  transition: background-color .25s, color .25s;
}

main { max-width: 800px; margin: 0 auto; padding: 0 16px 80px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-stretch: 75%; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
h2 { font-size: 2.2rem; margin: 24px 0 16px; }
h3 { font-size: 1.5rem; margin: 40px 0 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ── barra do topo ── */
.topbar {
  max-width: 800px; margin: 0 auto; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.topbar-actions { display: flex; gap: 6px; }
.logo-btn { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.logo { height: 34px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }

/* ── botões ── */
button { font: inherit; cursor: pointer; color: inherit; }
.btn {
  border: 0; border-radius: 999px;
  padding: 12px 24px; font-weight: 700;
  background: var(--accent); color: var(--on-accent);
  transition: filter .12s, transform .08s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; filter: none; transform: none; }
.btn.big { font-size: 1.1rem; padding: 16px 52px; }
.btn.ghost { background: var(--surface); color: var(--fg); }
.btn.ghost:hover { filter: none; background: var(--line); }
.text-btn {
  border: 0; background: var(--surface); border-radius: 999px; padding: 8px 14px;
  font-size: .8rem; font-weight: 700;
}
.text-btn:hover { background: var(--line); }
.link-btn { background: none; border: 0; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.link-btn:hover { color: var(--fg); }
.link-btn:disabled { opacity: .4; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.actions.end { justify-content: flex-end; }
.actions.center { justify-content: center; }


/* ── jogadores ── */
.count-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.count {
  border: 0; background: var(--surface); border-radius: var(--r-sm);
  padding: 10px 0 8px; display: grid; justify-items: center;
}
.count:hover { background: var(--line); }
.count b { font-stretch: 75%; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.count span { font-size: .68rem; font-weight: 700; color: var(--muted); }
.count.active { background: var(--accent); color: var(--on-accent); }
.count.active span { color: var(--on-accent); opacity: .8; }
.mode-label { color: var(--muted); margin: 12px 0 20px; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.player-card { display: grid; gap: 8px; background: var(--surface); border-radius: var(--r); padding: 10px; }
.avatar-btn {
  position: relative; border: 0; background: var(--bg); border-radius: var(--r-sm);
  padding: 10px 20px 0; line-height: 0; overflow: hidden;
}
.avatar-btn svg { width: 100%; height: auto; }
.avatar-edit {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700; line-height: 1;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
  opacity: 0; transition: opacity .12s;
}
.avatar-btn:hover .avatar-edit, .avatar-btn:focus-visible .avatar-edit { opacity: 1; }
@media (hover: none) { .avatar-edit { opacity: 1; } }
.nick { display: grid; gap: 4px; }
.nick span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.nick input, .search, .guess input, .num-input, .editor-fields input {
  font: inherit; width: 100%; min-width: 0;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); color: var(--fg);
}
.nick input:focus, .search:focus, .guess input:focus, .num-input:focus, .editor-fields input:focus { outline: none; border-color: var(--accent); }
.skin-name { margin: 0; font-size: .8rem; color: var(--muted); text-align: center; }

/* ── diálogo de skins ── */
.avatar-dialog {
  border: 0; padding: 0; border-radius: 22px; background: var(--bg); color: var(--fg);
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.avatar-dialog::backdrop { background: rgba(10, 10, 10, .6); }
.dialog-inner { padding: 20px; display: grid; gap: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; font-size: 1.7rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab {
  border: 0; background: var(--surface); padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: .85rem; white-space: nowrap; color: var(--muted);
}
.tab:hover { color: var(--fg); background: var(--line); }
.tab.active { background: var(--fg); color: var(--bg); }
.tab.tab-builder { background: var(--accent-soft); color: var(--accent-ink); }
.tab.tab-builder.active { background: var(--accent); color: var(--on-accent); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.preset {
  position: relative; border: 2px solid transparent; background: var(--surface); border-radius: var(--r);
  display: grid; font-size: .76rem; font-weight: 600; overflow: hidden;
}
.preset:hover { border-color: var(--line); }
.preset.active { border-color: var(--accent); }
.preset-pick { border: 0; background: transparent; padding: 8px 8px 4px; display: grid; gap: 4px; text-align: left; font-weight: 600; }
.preset-pick svg { width: 100%; height: auto; }
.preset-edit { border: 0; background: transparent; padding: 6px 8px 8px; font-size: .7rem; font-weight: 700; color: var(--accent-ink); text-align: left; }
.preset-edit:hover { text-decoration: underline; }
.in-use { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: .62rem; font-weight: 700; background: var(--fg); color: var(--bg); padding: 2px 7px; border-radius: 999px; }
.builder { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
.builder-preview { background: var(--surface); border-radius: var(--r); padding: 12px 18px 0; line-height: 0; position: sticky; top: 0; overflow: hidden; }
.builder-preview svg { width: 100%; height: auto; }
.builder-sections { margin-bottom: 14px; }
.builder-controls { display: grid; gap: 12px; }
.ctrl { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: center; }
.ctrl-label { font-size: .75rem; font-weight: 700; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); padding: 0; }
.swatch.active { outline: 3px solid var(--accent); outline-offset: 1px; }
.swatch.none { background: linear-gradient(135deg, transparent 44%, var(--muted) 44% 56%, transparent 56%), var(--bg); }
.cycler { display: flex; align-items: center; background: var(--surface); border-radius: 999px; padding: 3px; }
.cycler button { border: 0; background: var(--bg); border-radius: 50%; width: 32px; height: 32px; font-size: 1.1rem; line-height: 1; }
.cycler button:hover { background: var(--accent); color: var(--on-accent); }
.cycler span { flex: 1; text-align: center; font-weight: 600; font-size: .88rem; }
.num-input { width: 80px; padding: 6px 12px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 560px) {
  .builder { grid-template-columns: 1fr; }
  .builder-preview { width: 150px; margin: 0 auto; position: static; }
  .ctrl { grid-template-columns: 1fr; gap: 4px; }
}

/* ── listas ── */
.lists-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; }
.search { margin: 0 0 14px; font-size: 1.05rem; padding: 12px 18px; border-radius: 999px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 0; background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: .84rem; font-weight: 600;
}
.chip:hover { background: var(--line); }
.chip small { color: var(--muted); margin-left: 3px; }
.chip.active { background: var(--fg); color: var(--bg); }
.chip.active small { color: var(--bg); opacity: .7; }
.chips.sizes { margin-top: 8px; }
.chips.sizes .chip.active { background: var(--accent); color: var(--on-accent); }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.list-card { background: var(--surface); border-radius: var(--r); border: 2px solid transparent; transition: border-color .12s; }
.list-card:hover { border-color: var(--accent); }
.list-play {
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 14px 16px; display: grid; gap: 4px;
}
.list-cat { font-size: .72rem; color: var(--accent-ink); font-weight: 700; }
.list-title { font-weight: 700; }
.list-played { font-size: .7rem; color: var(--muted); }
.list-card.played .list-title { color: var(--muted); }
.list-tools { display: flex; gap: 12px; padding: 0 16px 12px; margin-top: -6px; }
.list-tools button { background: none; border: 0; padding: 0; font-size: .75rem; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.list-tools button:hover { color: var(--fg); }

/* ── criar lista ── */
.editor-name-label { margin: 20px 0; }
.editor-name-label input { font-size: 1.15rem; }
.editor-size-label { margin: 0 0 6px; }
.editor-rows { margin-top: 20px; display: grid; gap: 8px; }
.editor-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px; background: var(--surface); border-radius: var(--r); }
.editor-row .rank { margin-top: 4px; }
.editor-fields { flex: 1; display: grid; gap: 6px; }
.editor-fields input { padding: 8px 12px; }
.editor-item { font-weight: 700 !important; }
.editor-alts { font-size: .82rem !important; }

/* ── partida ── */
.game-head { margin: 16px 0 14px; }
.game-head h2 { margin: 6px 0 0; font-size: 2rem; }
.tag { font-size: .75rem; font-weight: 700; color: var(--accent-ink); }
.progress { margin: 8px 0 0; font-size: .8rem; font-weight: 700; color: var(--muted); }
.scoreboard { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.scoreboard::-webkit-scrollbar { display: none; }
.score-chip {
  flex: 1 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; background: var(--surface); border-radius: var(--r);
  transition: background .2s, color .2s;
}
.score-chip.current { background: var(--accent); color: var(--on-accent); }
.mini { width: 36px; height: 42px; background: var(--bg); border-radius: 9px; overflow: hidden; line-height: 0; flex: none; }
.mini svg { width: 100%; height: 100%; }
.score-info { display: grid; line-height: 1.15; }
.score-name { font-weight: 700; font-size: .85rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-sub { font-size: .72rem; color: var(--muted); }
.score-chip.current .score-sub { color: var(--on-accent); opacity: .8; }
.score-pts { font-stretch: 75%; font-weight: 800; font-size: 1.6rem; min-width: 28px; text-align: right; margin-left: auto; }

.turn { display: flex; align-items: flex-end; gap: 12px; margin: 18px 0 10px; }
.turn.hidden { display: none; }
.turn.pop { animation: pop .35s ease-out; }
.turn-avatar { width: 56px; line-height: 0; flex: none; }
.turn-avatar svg { width: 100%; height: auto; }
.turn-label { margin: 0; font-size: .75rem; color: var(--muted); font-weight: 700; }
.turn-name { margin: 0 0 4px; font-stretch: 75%; font-size: 2.2rem; font-weight: 800; line-height: 1; }

.guess { display: flex; gap: 8px; align-items: stretch; }
.guess input { font-size: 1.15rem; border-radius: 999px; padding: 12px 18px; }
.guess-actions { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 8px; }
.feedback { min-height: 1.5em; margin: 8px 0 14px; font-weight: 700; }
/* Ideias para chutar */
.ideas { background: var(--surface); border-radius: var(--r); margin: 0 0 16px; }
.ideas summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 700; font-size: .95rem; }
.ideas summary::-webkit-details-marker { display: none; }
.ideas summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.ideas[open] summary::after { content: "−"; }
.ideas summary b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: .75rem; display: inline-grid; place-items: center; }
.ideas summary b:empty { display: none; }
.ideas-form { display: flex; gap: 8px; padding: 0 14px; }
.ideas-form input { flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--fg); }
.ideas-form input:focus { outline: none; border-color: var(--accent); }
.ideas-form .btn { padding: 9px 16px; }
.ideas-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; }
.ideas-list p { margin: 0; }
.idea { display: inline-flex; align-items: center; background: var(--bg); border-radius: 99px; overflow: hidden; max-width: 100%; }
.idea button { font: inherit; font-weight: 700; font-size: .88rem; border: 0; background: none; color: var(--fg); cursor: pointer; padding: 6px 4px 6px 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea button:hover { color: var(--accent-ink); }
.idea .idea-x { padding: 6px 10px 6px 4px; color: var(--muted); font-size: 1rem; line-height: 1; }
.feedback.good { color: var(--fg); }
.feedback.epic { color: var(--accent-ink); font-stretch: 80%; font-size: 1.35rem; }
.feedback.bad { color: var(--bad); }
.feedback.info { color: var(--muted); }

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.slot {
  display: flex; align-items: center; gap: 12px; min-height: 52px;
  background: var(--surface); border-radius: var(--r); padding: 6px 14px 6px 6px;
}
.rank {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg); font-stretch: 75%; font-weight: 800; font-size: 1.3rem; line-height: 1; color: var(--muted);
}
.slot-name { flex: 1; font-weight: 700; font-size: 1.02rem; min-width: 0; }
.hidden-name { display: block; height: 8px; max-width: 140px; border-radius: 99px; background: var(--line); }
.pts { flex: none; font-size: .78rem; font-weight: 700; color: var(--muted); }
.slot-who { width: 30px; height: 35px; background: var(--bg); border-radius: 8px; overflow: hidden; line-height: 0; flex: none; }
.slot-who svg { width: 100%; height: 100%; }
.slot.found { background: var(--fg); color: var(--bg); }
.slot.found .rank { background: var(--accent); color: var(--on-accent); }
.slot.found .pts { color: var(--bg); opacity: .75; }
.slot.missed { background: transparent; border: 2px dashed var(--line); }
.slot.missed .slot-name { color: var(--muted); }
.slot.reveal { animation: reveal .5s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes reveal {
  0% { transform: scale(.94); filter: brightness(1.6); }
  100% { transform: scale(1); filter: none; }
}
.board.big { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rows), auto); grid-auto-flow: column; column-gap: 10px; }
@media (max-width: 640px) { .board.big { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; } }
.board.big .slot { min-height: 46px; }
.board.big .rank { width: 34px; height: 34px; font-size: 1.1rem; }
.board.big .slot-name { font-size: .95rem; }

/* ── pódio ── */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 20px 0 32px; }
.podium-col { flex: 1; max-width: 210px; display: grid; justify-items: center; animation: rise .5s ease-out both; }
.place-1 { animation-delay: .5s; }
.place-2 { animation-delay: .25s; }
.podium-people { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.podium-person { display: grid; justify-items: center; text-align: center; line-height: 1.2; }
.podium-person b { font-size: .9rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-person > span:last-child { font-size: .78rem; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.podium-avatar { width: 84px; line-height: 0; }
.place-1 .podium-avatar { width: 104px; animation: bounce 1.4s ease-in-out 1.2s infinite; }
.podium-avatar svg { width: 100%; height: auto; }
.podium-block {
  width: 100%; display: grid; place-items: start center; padding-top: 10px;
  font-stretch: 75%; font-weight: 800; font-size: 2.6rem; line-height: 1;
  border-radius: var(--r) var(--r) 0 0; background: var(--surface);
}
.place-1 .podium-block { height: 140px; background: var(--accent); color: var(--on-accent); }
.place-2 .podium-block { height: 100px; }
.place-3 .podium-block { height: 70px; }

.results-table { display: grid; gap: 8px; }
.result-row { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: var(--r); padding: 12px; }
.result-place { font-stretch: 75%; font-weight: 800; font-size: 2rem; line-height: 1; min-width: 44px; padding-top: 4px; color: var(--accent-ink); }
.result-info { flex: 1; min-width: 0; }
.result-pts { font-weight: 700; color: var(--muted); }
.result-phrase { margin: 2px 0; font-style: italic; }
.result-stats { margin: 0; font-size: .82rem; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.badges span { font-size: .72rem; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); padding: 3px 9px; border-radius: 999px; }
.final .pts { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── efeitos ── */
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }
.float {
  position: absolute; z-index: 60; transform: translate(-50%, 0); pointer-events: none;
  font-stretch: 75%; font-weight: 800; font-size: 2.2rem; color: var(--accent-ink);
  animation: float-up 1.2s ease-out forwards;
}
.float.epic { font-size: 3.6rem; }
.float.bad { color: var(--bad); font-size: 1.4rem; }
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); }
  20% { opacity: 1; transform: translate(-50%, -12px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1); }
}
.shake { animation: shake .35s; }
@keyframes shake {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
@keyframes pop { 0% { opacity: .2; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
body.flash-epic .board { animation: glow .6s ease-out; }
body.flash-bad .guess input { border-color: var(--bad); }
@keyframes glow { 30% { filter: drop-shadow(0 0 16px var(--accent)); } }

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

@media (max-width: 480px) {
  .count-picker { grid-template-columns: repeat(4, 1fr); }
  .player-grid { grid-template-columns: repeat(2, 1fr); }
  .logo { height: 28px; }
  h2 { font-size: 1.9rem; }
  .podium-avatar { width: 64px; }
  .place-1 .podium-avatar { width: 80px; }
  .text-btn { padding: 7px 10px; }
}

/* insígnias */
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: .35em; flex: none; }
.chip .ico { width: 1.05em; height: 1.05em; }
.list-cat, .tag { display: inline-flex; align-items: center; }

/* ── modos de jogo ── */
.mode-intro { margin: -6px 0 20px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .mode-grid { grid-template-columns: 1fr; } }
.mode-card {
  display: grid; align-content: start; gap: 6px; text-align: left;
  border: 2px solid transparent; background: var(--surface); border-radius: var(--r);
  padding: 20px; transition: border-color .12s, transform .08s;
}
.mode-card:hover { border-color: var(--accent); }
.mode-card:active { transform: scale(.98); }
.mode-card.active { border-color: var(--fg); }
.mode-badge { font-stretch: 75%; font-weight: 800; font-size: 3.4rem; line-height: .9; color: var(--accent-ink); }
.mode-name { font-stretch: 75%; font-weight: 800; font-size: 1.6rem; line-height: 1.05; }
.mode-desc { font-size: .92rem; }
.mode-meta { font-size: .75rem; font-weight: 700; color: var(--muted); margin-top: 4px; }
.mode-card.team { background: var(--accent); color: var(--on-accent); }
.mode-card.team .mode-badge, .mode-card.team .mode-meta { color: var(--on-accent); }
.mode-card.team .mode-meta { opacity: .8; }
.mode-card.team.active { border-color: var(--fg); }
.mode-ico { width: 1em; height: 1em; vertical-align: -0.12em; }
.mode-badge .mode-ico { width: 3.4rem; height: 3.4rem; stroke-width: 1.6; }
.mode-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.mode-bar .link-btn { font-size: .85rem; }
.mode-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: .85rem;
  padding: 6px 14px; border-radius: 999px;
}
.mode-bar + h2, .mode-bar + .lists-head h2 { margin-top: 14px; }

/* ── equipe contra a lista ── */
.versus {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 14px;
  background: var(--surface); border-radius: var(--r); padding: 12px 16px; margin-bottom: 8px;
}
.vs-side { display: grid; justify-items: start; line-height: 1; }
.vs-side.list { justify-items: end; }
.vs-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.vs-pts { font-stretch: 75%; font-weight: 800; font-size: 2.4rem; }
.vs-side:first-child .vs-pts { color: var(--accent-ink); }
.vs-mid { min-width: 0; }
.vs-bar { position: relative; height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.vs-bar span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 99px; transition: width .5s cubic-bezier(.2, .9, .3, 1.1); }
.vs-bar i { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--fg); opacity: .5; }
.vs-goal { margin: 6px 0 0; font-size: .75rem; font-weight: 700; color: var(--muted); text-align: center; }
.lives { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 3px; flex-wrap: wrap; }
.heart { width: 20px; height: 20px; line-height: 0; }
.heart svg { width: 100%; height: 100%; fill: var(--accent); }
.heart.lost svg { fill: none; stroke: var(--line); stroke-width: 2; }
.lives-label { font-size: .75rem; font-weight: 700; color: var(--muted); margin-left: 6px; }

.vs-final { display: block; text-align: center; }
.vs-final-row { display: flex; justify-content: center; align-items: center; gap: 16px; }
.vs-final-side {
  flex: 1; max-width: 260px; display: grid; justify-items: center; gap: 2px;
  background: var(--surface); border-radius: var(--r); padding: 16px 12px; animation: rise .5s ease-out both;
}
.vs-final-side.winner { background: var(--accent); color: var(--on-accent); }
.vs-final-side.list { animation-delay: .2s; }
.vs-final-side b { font-size: .95rem; }
.vs-final-pts { font-stretch: 75%; font-weight: 800; font-size: 3rem; line-height: 1; }
.vs-team { display: flex; justify-content: center; align-items: flex-end; min-height: 72px; }
.vs-team .podium-avatar { width: 58px; margin: 0 -8px; }
.vs-more { font-weight: 800; font-size: .85rem; margin-left: 12px; }
.vs-list-icon { min-height: 72px; display: grid; place-items: center; }
.ico.big { width: 56px; height: 56px; margin: 0; }
.vs-x { font-stretch: 75%; font-weight: 800; font-size: 2rem; color: var(--muted); }
.vs-verdict { margin: 14px 0 0; font-weight: 700; color: var(--muted); }
@media (max-width: 480px) {
  .vs-pts { font-size: 1.9rem; }
  .vs-final-row { gap: 8px; }
  .vs-team .podium-avatar { width: 44px; }
  .vs-final-pts { font-size: 2.3rem; }
}


/* ── times ── */
.mode-card.teams .mode-badge { color: var(--fg); }
.count:disabled { opacity: .35; cursor: default; }
.count:disabled:hover { background: var(--surface); }
.mode-label.bad { color: var(--bad); font-weight: 700; }
.player-card.t0 { box-shadow: inset 0 0 0 2px var(--accent); }
.player-card.t1 { box-shadow: inset 0 0 0 2px var(--team1); }
.team-toggle {
  border: 0; border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 800;
  color: var(--on-accent); background: var(--accent);
}
.team-toggle.t1 { background: var(--team1); }
.score-chip.t0 { box-shadow: inset 0 -3px 0 var(--accent); }
.score-chip.t1 { box-shadow: inset 0 -3px 0 var(--team1); }
.score-chip.current.t1 { background: var(--team1); }
.turn.t0 .turn-name { color: var(--accent-ink); }
.turn.t1 .turn-name { color: var(--team1); }
.slot.found.t0 { background: var(--accent); color: var(--on-accent); }
.slot.found.t0 .rank { background: var(--on-accent); color: var(--accent); }
.slot.found.t0 .pts { color: var(--on-accent); }
.slot.found.t1 { background: var(--team1); color: var(--on-team1); }
.slot.found.t1 .pts { color: var(--on-team1); }
.versus.duel .vs-side.t0 .vs-pts { color: var(--accent-ink); }
.versus.duel .vs-side.t1 .vs-pts { color: var(--team1); }
.vs-bar.duel { background: var(--team1); }
.vs-final-side.t1.winner { background: var(--team1); color: var(--on-team1); }
.result-row.t0 { box-shadow: inset 4px 0 0 var(--accent); }
.result-row.t1 { box-shadow: inset 4px 0 0 var(--team1); }
.result-row.t1 .result-place { color: var(--team1); }

/* ── opções da partida (tempo por vez) ── */
.match-options { margin-top: 24px; padding: 16px; background: var(--surface); border-radius: var(--r); display: grid; gap: 8px; }
.match-options .ctrl-label { margin: 0; }
.match-options .chip { background: var(--bg); }
.match-options .chip.active { background: var(--fg); color: var(--bg); }
.match-options p.small { margin: 0; }
.turn-timer {
  margin-left: auto; align-self: center; position: relative; width: 110px; height: 34px;
  border-radius: 999px; background: var(--surface); overflow: hidden; display: grid; place-items: center;
}
.turn-timer span { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); transition: width .1s linear; }
.turn-timer b { position: relative; font-stretch: 75%; font-weight: 800; font-size: 1.2rem; }
.turn-timer.low span { background: var(--bad); opacity: .25; }
.turn-timer.low b { color: var(--bad); }

/* ── dicas ── */
.guess-actions { gap: 12px; flex-wrap: wrap; }

.board.picking .slot.pickable { cursor: pointer; outline: 2px dashed var(--accent); outline-offset: -2px; }
.board.picking .slot.pickable:hover, .board.picking .slot.pickable:focus-visible { background: var(--accent-soft); outline-style: solid; }
.hint { font-weight: 800; color: var(--accent-ink); letter-spacing: .02em; }

/* ── resultado e estatísticas ── */
.results-sub { margin: -8px 0 12px; font-weight: 800; color: var(--accent-ink); min-height: 1em; }
.share-hint { margin: 0; }
.stats-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
@media (max-width: 640px) { .stats-tiles { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; }
.stat b { font-stretch: 75%; font-weight: 800; font-size: 2rem; line-height: 1; color: var(--accent-ink); }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.chip.static { cursor: default; }
.chip.static:hover { background: var(--surface); }
.records { display: grid; gap: 6px; }
.record-row { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--r); padding: 10px 14px; }
.record-row p { margin: 0; }
.record-pts { font-stretch: 75%; font-weight: 800; font-size: 1.6rem; line-height: 1; min-width: 74px; color: var(--accent-ink); }
.record-pts small { font-size: .8rem; color: var(--muted); }
.list-record { font-size: .72rem; font-weight: 700; color: var(--accent-ink); }
.result-row.t1 .badges span:first-child { background: var(--surface); color: var(--team1); }

/* ── suspense antes do resultado ── */
.reveal {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; text-align: center; padding: 24px;
  background: var(--bg); color: var(--fg); cursor: pointer; transition: background-color .35s, color .35s, opacity .3s;
}
.reveal.out { opacity: 0; }
.reveal-inner { display: grid; justify-items: center; gap: 12px; max-width: 640px; }
.reveal-kicker { margin: 0; font-stretch: 75%; font-weight: 800; font-size: clamp(2.2rem, 10vw, 4rem); line-height: 1; animation: pulse-text .9s ease-in-out infinite; }
.drum { display: flex; gap: 12px; margin-top: 8px; }
.drum span { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: drum .45s ease-in-out infinite alternate; }
.drum span:nth-child(2) { animation-delay: .15s; }
.drum span:nth-child(3) { animation-delay: .3s; }
.reveal.show.win { background: var(--accent); color: #171717; }
.reveal.show.win.t1 { background: var(--team1); }
.reveal.show.lose { background: #0E0E0E; color: #FFF4DE; }
.reveal.show.tie { background: var(--fg); color: var(--bg); }
.reveal-title { margin: 0; font-size: clamp(2.8rem, 14vw, 6.2rem); line-height: .95; text-transform: uppercase; animation: slam .6s cubic-bezier(.2, .9, .3, 1.4) both; overflow-wrap: anywhere; }
.reveal-sub { margin: 0; font-size: 1.2rem; font-weight: 700; opacity: .92; animation: rise .5s .35s both; }
.reveal-avatars { display: flex; justify-content: center; align-items: flex-end; }
.reveal-avatars .podium-avatar { width: 130px; margin: 0 -10px; animation: drop .6s cubic-bezier(.2, .9, .3, 1.3) both; }
.reveal-avatars .vs-more { font-weight: 800; margin-left: 16px; }
.reveal-crown { font-size: 3.6rem; line-height: 1; margin-bottom: -22px; position: relative; z-index: 1; animation: crown-in .7s .25s cubic-bezier(.2, .9, .3, 1.4) both; }
.reveal-list { line-height: 0; }
.reveal-list .ico { width: 110px; height: 110px; margin: 0; animation: wobble-list 1s ease-in-out infinite; }
.reveal.lose .reveal-title { animation: slam .6s both, sad 1.4s .6s ease-in-out both; }
.reveal-skip { position: absolute; bottom: 20px; left: 0; right: 0; margin: 0; font-size: .8rem; opacity: .6; }
@keyframes slam { 0% { opacity: 0; transform: scale(2.2); } 60% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }
@keyframes drum { from { transform: translateY(0); } to { transform: translateY(-14px); } }
@keyframes pulse-text { 50% { transform: scale(1.04); } }
@keyframes crown-in { from { opacity: 0; transform: translateY(-80px) rotate(-40deg); } to { opacity: 1; transform: rotate(-8deg); } }
@keyframes sad { 30% { transform: rotate(-3deg) translateY(4px); } 60% { transform: rotate(2deg) translateY(8px); } 100% { transform: translateY(6px); } }
@keyframes wobble-list { 50% { transform: rotate(8deg) scale(1.05); } }
@keyframes drop { from { opacity: 0; transform: translateY(-40px) scale(.8); } to { opacity: 1; transform: none; } }

/* ── resultado animado (começa quando o suspense termina) ── */
.podium-col, .vs-final-side, .place-1 .podium-avatar { animation: none; }
.podium-person { position: relative; }
.crown { position: absolute; top: -28px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 2.1rem; line-height: 1; z-index: 1; }
.play .podium-block { transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .9, .3, 1.15) both; }
.play .place-3 .podium-block { animation-delay: .1s; }
.play .place-2 .podium-block { animation-delay: .45s; }
.play .place-1 .podium-block { animation-delay: .8s; }
.play .podium-person { animation: drop .5s cubic-bezier(.2, .9, .3, 1.3) both; }
.play .place-3 .podium-person { animation-delay: .45s; }
.play .place-2 .podium-person { animation-delay: .8s; }
.play .place-1 .podium-person { animation-delay: 1.15s; }
.play .place-1 .podium-avatar { animation: bounce 1.4s ease-in-out 2.2s infinite; }
.play .crown { animation: crown-drop .6s cubic-bezier(.2, .9, .3, 1.4) 1.6s both, crown-wobble 2.4s ease-in-out 2.4s infinite; }
.play .vs-final-side { animation: slam-left .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.play .vs-final-side:last-child { animation-name: slam-right; animation-delay: .2s; }
.play .vs-final-side.winner .vs-final-pts { display: inline-block; animation: pulse-text .8s ease-in-out 1s 3; }
.play .vs-x { animation: slam .5s .45s both; }
.play .highlight { animation: rise .45s ease-out both; animation-delay: calc(.9s + var(--i) * .12s); }
.play .result-row { animation: slide-in .45s ease-out both; animation-delay: calc(1.2s + var(--i) * .09s); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes crown-drop { from { opacity: 0; transform: translate(-50%, -60px) rotate(-30deg); } to { opacity: 1; transform: translateX(-50%) rotate(-8deg); } }
@keyframes crown-wobble { 0%, 100% { transform: translateX(-50%) rotate(-8deg); } 50% { transform: translateX(-50%) rotate(8deg); } }
@keyframes slam-left { from { opacity: 0; transform: translateX(-60px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes slam-right { from { opacity: 0; transform: translateX(60px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

/* ── destaques e linhas do resultado ── */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin: 0 0 16px; }
.highlight { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-radius: var(--r); padding: 12px 14px; }
.highlight-ico { font-size: 1.7rem; line-height: 1; }
.highlight p { margin: 0; font-size: .9rem; }
.highlight .highlight-title { font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); margin-bottom: 2px; }
.result-place { font-size: 2.1rem; text-align: center; }
.result-head { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.result-head b { font-size: 1.1rem; }
.result-pts { font-stretch: 75%; font-weight: 800; font-size: 1.35rem; color: var(--accent-ink); }
.result-phrase { font-style: normal; font-weight: 600; margin: 4px 0 8px; }
.hit-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.pill {
  min-width: 30px; height: 26px; padding: 0 7px; border-radius: 8px; display: inline-grid; place-items: center;
  font-stretch: 75%; font-weight: 800; font-size: .95rem; color: var(--fg);
  background: color-mix(in srgb, var(--accent) var(--a), var(--bg));
}
.pill.hot { color: var(--on-accent); }
.badges span { font-size: .76rem; }

/* ── algum chute estava certo? ── */
.late-contest { margin-top: 28px; padding: 16px; border: 2px dashed var(--line); border-radius: var(--r); }
.late-contest h3 { margin: 0 0 6px; font-size: 1.4rem; }
.late-contest > p { margin: 0; }
.contest-rows { display: grid; gap: 8px; margin-top: 12px; }
.contest-row { display: grid; grid-template-columns: 1fr minmax(150px, 260px) auto; gap: 8px; align-items: center; }
.contest-row select { font: inherit; min-width: 0; padding: 8px 10px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--fg); }
.contest-guess { margin: 0; }
.btn.small { padding: 8px 16px; font-size: .88rem; }
@media (max-width: 560px) {
  .contest-row { grid-template-columns: 1fr auto; }
  .contest-guess { grid-column: 1 / -1; }
}
.podium:not(.vs-final) { margin-top: 48px; }

/* ── modo online ── */
.btn.dark { background: var(--fg); color: var(--bg); }
.online-setup, .online-box, .online-me, .lobby-settings { background: var(--surface); border-radius: var(--r); padding: 16px; }
.online-setup { border: 2px dashed var(--line); background: transparent; }
.online-setup code { font-size: .9em; background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.online-me { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; margin: 16px 0 12px; }
.online-me .avatar-btn { padding: 8px 14px 0; }
.online-me-info { display: grid; gap: 8px; justify-items: start; }
.online-me-info .nick { width: 100%; }
.online-me-info p { margin: 0; }
.online-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.online-box { display: grid; gap: 10px; align-content: start; }
.online-box h3 { margin: 0; font-size: 1.4rem; }
.online-box p { margin: 0; }
.code-input {
  font: inherit; font-stretch: 75%; font-weight: 800; font-size: 1.8rem; letter-spacing: .2em; text-transform: uppercase; text-align: center;
  width: 100%; padding: 8px 12px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--fg);
}
.code-input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 380px) {
  .online-me { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .online-me .avatar-btn { width: 110px; }
  .online-me-info { justify-items: center; width: 100%; }
}
@media (max-width: 560px) {
  .online-grid { grid-template-columns: 1fr; }
  .online-me { grid-template-columns: 96px 1fr; }
}
.lobby-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.lobby-top .ctrl-label { margin: 0; }
.room-code { margin: 0; font-stretch: 75%; font-weight: 800; font-size: clamp(3rem, 16vw, 5rem); letter-spacing: .12em; line-height: 1; color: var(--accent-ink); }
.lobby-players { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 16px; }
.lobby-player { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r); padding: 6px 12px 6px 6px; }
.lobby-player b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-player b small { color: var(--muted); font-weight: 600; }
.lobby-player .mini { position: relative; overflow: visible; }
.lobby-player .mini svg { border-radius: 9px; }
.lobby-player.here .mini::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #2BA84A; border: 2px solid var(--surface); }
.lobby-player.t0 { box-shadow: inset 4px 0 0 var(--accent); }
.lobby-player.t1 { box-shadow: inset 4px 0 0 var(--team1); }
.lobby-player .team-toggle:disabled { opacity: .85; cursor: default; }
.host-tag { font-size: .75rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.kick { border: 0; background: var(--bg); border-radius: 50%; width: 30px; height: 30px; font-size: 1.1rem; line-height: 1; color: var(--muted); }
.kick:hover { background: var(--bad); color: #fff; }
.lobby-settings { display: grid; gap: 8px; }
.lobby-settings .ctrl-label { margin: 6px 0 0; }
.lobby-settings p { margin: 0; }
.lobby-settings .chip { background: var(--bg); }
.lobby-settings .chip.active { background: var(--fg); color: var(--bg); }
.lobby-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lobby-list { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats-account { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border-radius: var(--r); padding: 12px 16px; }
.stats-account p { margin: 0; flex: 1 1 240px; }
.lobby-settings .btn.ghost { background: var(--bg); }
.online-me .btn.ghost, .stats-account .btn.ghost { background: var(--bg); }

/* ── sugestões de lista e carregando ── */
.lobby-suggestions { display: grid; gap: 6px; margin-top: 12px; }
.lobby-suggestions .ctrl-label { margin: 0; }
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 2px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.suggestion p, .suggestion b { margin: 0; display: block; }
.suggestion.chosen { border-color: var(--accent); background: var(--accent-soft); }
.suggestion-ok { font-weight: 800; color: var(--accent-ink); white-space: nowrap; }
.btn.loading { position: relative; cursor: progress; }
.btn.loading::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ── marca Topzi ── */
.logo { height: 30px; }
@media (max-width: 480px) { .logo { height: 26px; } }

/* ── ícones da interface e selos de colocação (sem emoji) ── */
.ui-ico { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
.medal {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 999px;
  font-stretch: 75%; font-weight: 800; font-size: 1.1rem; line-height: 1;
  border: 2.5px solid var(--fg); color: var(--fg);
}
.medal.m1 { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.medal.m2 { background: var(--fg); color: var(--bg); }
.medal.m4 { border: 2px dashed var(--line); color: var(--muted); }
.result-place { font-size: 1rem; min-width: 44px; padding-top: 2px; }
.podium-block .medal { min-width: 52px; height: 52px; font-size: 1.45rem; }
.place-1 .podium-block .medal { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent); }
.record-pts .medal { min-width: 36px; height: 36px; font-size: 1rem; }
.crown { top: -34px; font-size: inherit; color: var(--accent); }
.crown-ico { width: 38px; height: 38px; display: block; }
.reveal-crown { display: block; line-height: 0; margin-bottom: -14px; color: #171717; }
.reveal-crown .crown-ico { width: 74px; height: 74px; }
.highlight-ico { color: var(--accent-ink); line-height: 0; }
.highlight-ico .ui-ico { width: 26px; height: 26px; }
.host-tag { display: inline-flex; align-items: center; gap: 4px; }
.host-tag .ui-ico { color: var(--accent); }
.suggestion-ok { display: inline-flex; align-items: center; gap: 4px; }
.float.streak { font-size: 1.3rem; color: var(--accent); white-space: nowrap; }

/* ── perfil ── */
.topbar-actions { align-items: center; }
.profile-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--surface);
  border-radius: 999px; padding: 3px 12px 3px 3px; font-size: .8rem; font-weight: 700;
}
.profile-btn:hover { background: var(--line); }
.profile-btn-avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--bg); line-height: 0; flex: none; }
.profile-btn-avatar svg { width: 100%; height: 125%; }
body[data-screen="game"] .profile-btn, body[data-screen="profile"] .profile-btn { display: none; }
@media (max-width: 480px) {
  .profile-btn { padding: 3px; }
  .profile-btn-label { display: none; }
}
.profile-head { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; margin: 20px 0 16px; }
.profile-head .avatar-btn { padding: 10px 18px 0; background: var(--surface); }
.profile-info { display: grid; gap: 8px; }
.profile-info .ctrl-label, .profile-info p { margin: 0; }
.profile-info h2 { margin: 0; font-size: 2.4rem; overflow-wrap: anywhere; }
@media (max-width: 560px) { .profile-head { grid-template-columns: 110px 1fr; gap: 14px; } .profile-info h2 { font-size: 1.9rem; } }

/* ── vidas de cada jogador ── */
.chip-lives { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; vertical-align: -1px; font-weight: 800; color: var(--accent-ink); }
.chip-lives svg { width: 11px; height: 11px; fill: var(--accent); }
.score-chip.current .chip-lives svg { fill: var(--on-accent); }
.score-chip.current .chip-lives { color: var(--on-accent); }
.score-chip.out { opacity: .45; }
.score-chip.out .score-pts { text-decoration: line-through; text-decoration-thickness: 2px; }

/* Idioma, tema e som no topo */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang-wrap { display: inline-flex; }
.lang-select {
  appearance: none; font: inherit; font-weight: 700; font-size: 0.85rem; color: var(--fg);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.8rem; cursor: pointer; min-height: 40px;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  color: var(--fg); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
}
.icon-btn .ui-ico { width: 20px; height: 20px; }
.lang-select:hover, .icon-btn:hover { border-color: var(--fg); }
.lang-select:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── janelas sem barra de rolagem à vista (continuam rolando com dedo, roda e teclado) ── */
.avatar-dialog { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.avatar-dialog::-webkit-scrollbar { display: none; }

/* ── como jogar ── */
/* O topo com o X fica fora da parte que rola (no celular, "sticky" dentro de janela rolando falha no toque),
   e a altura usa a tela visível (dvh), sem esconder nada atrás da barra do navegador. */
.help-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: hidden; }
.help-dialog[open] { display: flex; flex-direction: column; }
.help-dialog .dialog-head { flex: none; padding: 14px 14px 12px 20px; border-bottom: 1.5px solid var(--line); }
.help-dialog .help-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; gap: 12px; padding-top: 0; scrollbar-width: none; }
.help-dialog .help-scroll::-webkit-scrollbar { display: none; }
.dialog-x { width: 44px; height: 44px; flex: none; }
.dialog-x .ui-ico { width: 22px; height: 22px; }
.help-ok { justify-self: center; margin-top: 18px; }
.help-dialog p { margin: 0; }
.help-dialog h3 { margin: 18px 0 0; font-size: 1.35rem; }
.help-dialog .dialog-inner > p:first-of-type { margin-top: 16px; }
.help-list { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border-radius: var(--r); margin-top: 4px !important; }
.help-list b { font-stretch: 85%; font-size: 1.1rem; line-height: 1.15; }
.help-board { margin-top: 10px; }
.help-board .slot { min-height: 48px; }
.help-guess {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border: 2px solid var(--bad); border-radius: var(--r-sm);
  font-weight: 700; color: var(--bad);
}
.help-guess span { text-decoration: line-through; text-decoration-thickness: 2px; }
.help-guess .ui-ico { width: 20px; height: 20px; }
.help-modes { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.help-foot { display: flex; gap: 18px; padding-top: 14px; margin-top: 8px !important; border-top: 1.5px solid var(--line); font-size: .85rem; }
.help-foot a, .site-foot a { color: var(--muted); font-weight: 600; text-underline-offset: 3px; }
.help-foot a:hover, .site-foot a:hover { color: var(--fg); }

/* ── rodapé da tela inicial ── */
.site-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-top: 36px; padding-top: 16px; border-top: 1.5px solid var(--line); font-size: .85rem; }
.site-foot .link-btn { padding: 0; font-size: inherit; }
.site-foot span { margin-left: auto; color: var(--muted); }
@media (max-width: 480px) { .site-foot span { margin-left: 0; width: 100%; } }
.help-dialog .dialog-inner:focus { outline: none; }

/* ── início simples (no jeito do Contexto e do Termo): uma coluna, o jogo do dia e dois botões ── */
.home { max-width: 460px; margin: 0 auto; padding-top: 8px; display: grid; gap: 12px; }
.home-head { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 6px 0 4px; }
.home-symbol { width: 64px; height: auto; }
.home-tag { margin: 0; font-stretch: 100%; font-size: 1.1rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; max-width: 28ch; }
.home-account { display: flex; justify-content: center; }
.home-card { background: var(--surface); border-radius: var(--r); padding: 14px 16px; }
.home-row { display: flex; align-items: center; gap: 12px; }
.home-row > div { flex: 1; display: grid; gap: 2px; }
.home-row b, .daily-name { font-stretch: 75%; font-weight: 800; font-size: 1.4rem; line-height: 1.05; }
.home-row span { color: var(--muted); font-size: .85rem; }
.daily { border: 2px solid var(--accent); display: grid; gap: 12px; }
.daily-top { display: flex; align-items: center; gap: 10px; }
.daily-top .btn { flex: none; white-space: nowrap; }
.daily-top .btn.ghost { background: var(--bg); }
.daily-name { white-space: nowrap; }
.daily, .daily > * { min-width: 0; }
.daily-top .daily-date { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) { .daily-top .daily-date { display: none; } .daily-top .daily-name { margin-right: auto; } }
.daily-date { margin-right: auto; color: var(--muted); font-size: .9rem; font-weight: 600; }
.daily-status { margin: 0; font-size: .88rem; color: var(--muted); text-align: center; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week .day {
  display: grid; justify-items: center; padding: 6px 0; cursor: pointer;
  font: inherit; color: var(--fg); background: var(--bg); border: 0; border-radius: 10px;
}
.week .day small { font-size: .68rem; font-weight: 700; color: var(--muted); }
.week .day b { font-size: 1.05rem; }
.week .day.done { background: var(--accent); color: var(--on-accent); }
.week .day.done small { color: inherit; opacity: .8; }
.week .day.today { box-shadow: inset 0 0 0 2px var(--fg); }
.week .day:disabled { background: transparent; opacity: .45; cursor: default; }
.home-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 20px; margin-top: 4px; }
.home-links .link-btn, .home-links a { font-size: .95rem; font-weight: 700; color: var(--fg); text-decoration: none; padding: 6px 0; }
.home-links a:hover, .home-links .link-btn:hover { color: var(--accent-ink); }
.home .site-foot { justify-content: center; margin-top: 8px; border-top: 0; font-size: .78rem; }
.home .site-foot span { margin-left: 0; width: auto; }

/* ── configurações ── */
.settings-dialog { width: min(400px, calc(100vw - 24px)); }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--line); font-weight: 700; }
.setting-row:last-child { border-bottom: 0; }

/* ── modos em linhas curtas e "Mais opções" fechado ── */
.mode-grid { grid-template-columns: 1fr; gap: 8px; max-width: 520px; }
.mode-card { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px; min-height: 0; }
.mode-card .mode-badge { width: 54px; flex: none; text-align: center; font-size: 2.2rem; }
.mode-card .mode-badge .mode-ico { width: 2.2rem; height: 2.2rem; }
.mode-text { display: grid; gap: 2px; text-align: left; }
.mode-card .mode-name { font-size: 1.35rem; }
.mode-card .mode-desc { font-size: .85rem; color: var(--muted); }
.mode-card.team { background: var(--surface); color: var(--fg); }
.mode-card.team .mode-badge { color: var(--accent-ink); }
.more-opts { margin-top: 20px; }
.starter { margin-top: 18px; }
.starter .chip .ui-ico { margin-right: 4px; }
.more-opts summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none;
  background: var(--surface); border-radius: var(--r); font-weight: 700;
}
.more-opts summary::-webkit-details-marker { display: none; }
.more-opts summary::after { content: "+"; margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.more-opts[open] summary::after { content: "−"; }
.more-opts summary small { color: var(--muted); font-weight: 600; font-size: .85rem; }
.more-opts .match-options { margin-top: 8px; }

/* ── voltar para o Gamezi (seta à esquerda do logo, na tela inicial do jogo) ── */
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gamezi-back { flex: none; text-decoration: none; }
body[data-screen]:not([data-screen="home"]) .gamezi-back { display: none; }

/* ── escolher a lista: Sortear, sugestões, categorias em quadradinhos e listas em linhas curtas ── */
#screen-lists { max-width: 640px; margin: 0 auto; }
.lists-actions { display: flex; gap: 8px; align-items: center; margin: 4px 0 18px; }
.lists-actions #random-list-btn { flex: 1; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 6px 0 22px; }
#lists-cats { margin-top: 20px; }
.cat-tile {
  display: flex; align-items: center; gap: 8px; padding: 12px; cursor: pointer; text-align: left;
  font: inherit; font-weight: 700; font-size: .9rem; color: var(--fg); background: var(--surface);
  border: 2px solid transparent; border-radius: var(--r);
}
.cat-tile:hover { border-color: var(--accent); }
.cat-tile span { flex: 1; min-width: 0; line-height: 1.15; }
.cat-tile small { color: var(--muted); font-weight: 600; }
.cat-tile .ico, .cat-tile svg { color: var(--accent-ink); flex: none; }
.cat-back { margin: 0 0 6px; font-size: .95rem; }
/* Celular estreito: sem o número de listas, para o nome da categoria caber inteiro. */
@media (max-width: 380px) {
  .cat-tile { padding: 10px; gap: 6px; font-size: .84rem; }
  .cat-tile small { display: none; }
}
#lists-sub { margin: 4px 0 8px; }
#screen-lists .list-grid { grid-template-columns: 1fr; gap: 6px; }
#screen-lists .list-play { padding: 12px 16px; gap: 2px; }
#screen-lists .list-title { font-size: 1rem; }
#screen-lists .search { margin-bottom: 10px; }
#screen-lists .sizes { margin-bottom: 12px; }

/* ── ranking da lista do dia ── */
.leaderboard { max-width: 520px; margin: 18px auto; }
.leaderboard h3 { margin: 0 0 10px; }
.lb-pos { margin: 0 0 10px; font-weight: 800; font-size: 1.1rem; color: var(--accent-ink); }
.lb-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; }
.lb-row:nth-child(odd) { background: var(--surface); }
.lb-row.me { box-shadow: inset 0 0 0 2px var(--accent); }
.lb-row span { font-stretch: 75%; font-weight: 800; font-size: 1.2rem; color: var(--muted); text-align: center; }
.lb-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row em { font-style: normal; font-stretch: 75%; font-weight: 800; font-size: 1.3rem; color: var(--accent-ink); }


/* Ranking do dia: tempo (desempate) entre o nome e os pontos */
.lb-row { grid-template-columns: 32px 1fr auto auto; }
.lb-time { font-style: normal; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-note { margin: 8px 0 0; text-align: center; }
