/* ==========================================================================
   Bolão Devs GTI — Design System
   Dark esmeralda premium · dourado como ação primária · glass refinado
   ========================================================================== */

/* ------------------------------------------------ tokens */
:root {
  /* superfícies */
  --bg: #0b1210;
  --bg-glow-green: rgba(0, 151, 57, 0.16);
  --bg-glow-gold: rgba(255, 201, 51, 0.07);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-sunken: rgba(0, 0, 0, 0.28);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* texto */
  --text: #f2f7f4;
  --text-secondary: #aebcb4;
  --text-muted: #7d8d84;

  /* marca */
  --green: #19c964;
  --green-deep: #009739;
  --gold: #ffc933;
  --gold-strong: #ffd75e;
  --on-gold: #241b00;

  /* semânticas */
  --success: #2fd575;
  --success-bg: rgba(47, 213, 117, 0.12);
  --warning: #ffc933;
  --warning-bg: rgba(255, 201, 51, 0.12);
  --danger: #ff7a70;
  --danger-bg: rgba(255, 122, 112, 0.12);

  /* geometria */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-full: 999px;

  /* espaçamento (escala 4pt) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* tipografia */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.75rem;   /* 12 */
  --fs-sm: 0.875rem;  /* 14 */
  --fs-base: 1rem;    /* 16 */
  --fs-lg: 1.125rem;  /* 18 */
  --fs-xl: 1.375rem;  /* 22 */
  --fs-2xl: 1.75rem;  /* 28 */

  /* movimento */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 200ms;

  /* camadas */
  --z-nav: 40;
  --z-toast: 100;
  --z-dialog: 200;
}

/* ------------------------------------------------ reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(52rem 30rem at 85% -8rem, var(--bg-glow-green), transparent 60%),
    radial-gradient(40rem 26rem at -10% 12rem, var(--bg-glow-gold), transparent 60%);
  background-attachment: fixed;
  min-height: 100dvh;
  padding: var(--sp-4);
  touch-action: manipulation;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:disabled { cursor: not-allowed; opacity: 0.45; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: rgba(255, 201, 51, 0.28); }

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

/* ------------------------------------------------ layout */
.wrap { max-width: 620px; margin: 0 auto; }

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

.brand-mark {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green-deep), #01592a);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 20px rgba(0, 151, 57, 0.35);
  color: var(--gold);
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-name {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-name em { font-style: normal; color: var(--gold); }

.site-tagline {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-top: var(--sp-1);
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  padding: var(--sp-10) 0 var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-secondary); }

.stack { display: flex; flex-direction: column; gap: var(--sp-4); }

/* ------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: var(--sp-4);
}
.card-title svg { width: 17px; height: 17px; flex: none; }

.card--center { text-align: center; }
.card--center .card-title { justify-content: center; }

/* ------------------------------------------------ pote / hero stat */
.pote-banner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: var(--sp-5);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 201, 51, 0.35);
  background:
    linear-gradient(120deg, rgba(255, 201, 51, 0.16), rgba(255, 201, 51, 0.04) 55%),
    var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.pote-banner .label {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.pote-banner .label svg { width: 15px; height: 15px; }
.pote-banner .valor {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--gold-strong);
  margin: var(--sp-1) 0;
}
.pote-banner .hint { color: var(--text-secondary); font-size: var(--fs-xs); }

/* ------------------------------------------------ lista de jogos */
.match-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.match-card:hover { border-color: var(--border-strong); background: var(--surface-strong); }
.match-card:active { transform: scale(0.985); }

.match-flag {
  width: 44px; height: 44px; flex: none;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  color: var(--green);
}
.match-flag svg { width: 22px; height: 22px; }

.match-info { flex: 1; min-width: 0; }
.match-info .teams { font-weight: 700; letter-spacing: -0.01em; }
.match-info .meta {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  margin-top: 2px;
}
.match-info .meta svg {
  width: 12px; height: 12px;
  display: inline-block;
  vertical-align: -1px;
  margin-right: 3px;
}

.match-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); }

/* ------------------------------------------------ badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge svg { width: 12px; height: 12px; }
.badge--aberto   { background: var(--success-bg); color: var(--success); border-color: rgba(47,213,117,.3); }
.badge--lotado   { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(255,122,112,.3); }
.badge--sorteado { background: var(--warning-bg); color: var(--gold);    border-color: rgba(255,201,51,.3); }
.badge--encerrado{ background: var(--surface-strong); color: var(--text-secondary); border-color: var(--border); }

/* ------------------------------------------------ progresso */
.progress {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  overflow: hidden;
  margin: var(--sp-3) 0 var(--sp-2);
}
.progress > div {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--green-deep), var(--green) 60%, var(--gold));
  transition: width 400ms var(--ease);
}

/* ------------------------------------------------ formulários */
.field { margin-bottom: var(--sp-4); }

.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.field label .req { color: var(--gold); }

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-sunken);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.field select option { color: #111; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 201, 51, 0.18);
}

.field .helper {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}
.field .error-msg {
  display: none;
  font-size: var(--fs-xs);
  color: var(--danger);
  margin-top: var(--sp-1);
}
.field.invalid input, .field.invalid textarea, .field.invalid select {
  border-color: var(--danger);
}
.field.invalid .error-msg { display: block; }

/* ------------------------------------------------ botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--fs-base);
  text-decoration: none;
  color: var(--on-gold);
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  box-shadow: 0 2px 14px rgba(255, 201, 51, 0.22);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              filter var(--dur) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { filter: brightness(1.05); box-shadow: 0 4px 20px rgba(255, 201, 51, 0.3); }
.btn:active { transform: scale(0.97); }

.btn--ghost {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover { filter: none; background: rgba(255, 255, 255, 0.12); box-shadow: none; }

.btn--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 122, 112, 0.35);
  box-shadow: none;
}
.btn--danger:hover { filter: none; background: rgba(255, 122, 112, 0.2); }

.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: var(--fs-lg); border-radius: var(--radius-sm); }

/* estado de carregamento */
.btn.loading { pointer-events: none; opacity: 0.75; }
.btn.loading .btn-label { visibility: hidden; }
.btn.loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn { position: relative; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ listas */
.plain-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }

.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.row-item .name { display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; min-width: 0; }
.row-item .name svg { width: 15px; height: 15px; color: var(--text-muted); flex: none; }
.row-item .check { color: var(--success); }
.row-item .check svg { width: 17px; height: 17px; }

/* ------------------------------------------------ sorteio (pares) */
.pair {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-2);
  background: linear-gradient(90deg, rgba(255, 201, 51, 0.1), rgba(255, 201, 51, 0.02));
  border: 1px solid rgba(255, 201, 51, 0.2);
}
.pair .who {
  font-weight: 600;
  font-size: var(--fs-sm);
  flex: 0 0 38%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pair .arrow { color: var(--text-muted); flex: none; }
.pair .arrow svg { width: 14px; height: 14px; }
.pair .player {
  flex: 1;
  text-align: right;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--gold-strong);
}
.pair--winner {
  background: linear-gradient(90deg, rgba(47, 213, 117, 0.2), rgba(47, 213, 117, 0.04));
  border-color: rgba(47, 213, 117, 0.45);
}
.pair--winner .player { color: var(--success); }

/* ------------------------------------------------ status pill (PIX) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--fs-sm);
  margin: var(--sp-3) 0;
}
.status-pill svg { width: 16px; height: 16px; }
.status-pill--pendente { background: var(--warning-bg); color: var(--gold); border: 1px solid rgba(255,201,51,.3); }
.status-pill--pago     { background: var(--success-bg); color: var(--success); border: 1px solid rgba(47,213,117,.35); }
.status-pill--expirado { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255,122,112,.35); }

.status-pill--pendente svg { animation: spin 1.4s linear infinite; }

/* ------------------------------------------------ QR / copia-e-cola */
.qr-frame {
  background: #fff;
  border-radius: var(--radius);
  padding: var(--sp-4);
  display: inline-block;
  margin: var(--sp-4) auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.qr-frame img { width: 224px; height: 224px; }

.copy-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  word-break: break-all;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  margin: var(--sp-3) 0;
  max-height: 88px;
  overflow: auto;
  text-align: left;
  color: var(--text-secondary);
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--gold);
}

/* ------------------------------------------------ alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  border: 1px solid transparent;
}
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.alert--error   { background: var(--danger-bg); color: var(--danger); border-color: rgba(255,122,112,.3); }
.alert--success { background: var(--success-bg); color: var(--success); border-color: rgba(47,213,117,.3); }
.alert--info    { background: var(--surface-strong); color: var(--text-secondary); border-color: var(--border); }

/* ------------------------------------------------ toast */
.toast-region {
  position: fixed;
  bottom: max(var(--sp-4), env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  background: #17231d;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
  font-size: var(--fs-sm);
  font-weight: 600;
  animation: toast-in 250ms var(--ease);
  pointer-events: auto;
}
.toast svg { width: 17px; height: 17px; flex: none; }
.toast--success svg { color: var(--success); }
.toast--error svg { color: var(--danger); }
.toast.leaving { animation: toast-out 180ms var(--ease) forwards; }

@keyframes toast-in  { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------ dialog */
dialog.confirm {
  margin: auto;
  width: min(92vw, 400px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #131e18;
  color: var(--text);
  padding: var(--sp-6);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
dialog.confirm::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); }
dialog.confirm h3 { font-size: var(--fs-lg); font-weight: 700; margin-bottom: var(--sp-2); letter-spacing: -0.01em; }
dialog.confirm p { color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
dialog.confirm .actions { display: flex; gap: var(--sp-3); }
dialog.confirm .actions .btn { flex: 1; }

/* ------------------------------------------------ skeleton */
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-strong) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  min-height: 20px;
}
.skeleton--card { min-height: 76px; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------ empty state */
.empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.empty-state svg { width: 34px; height: 34px; margin: 0 auto var(--sp-3); opacity: 0.5; }

/* ------------------------------------------------ passos (como funciona) */
.steps { display: flex; flex-direction: column; gap: var(--sp-4); counter-reset: passo; }
.step { display: flex; gap: var(--sp-3); align-items: flex-start; }
.step-num {
  counter-increment: passo;
  flex: none;
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  font-size: var(--fs-xs);
  font-weight: 800;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--gold);
}
.step-num::before { content: counter(passo); }
.step p { font-size: var(--fs-sm); color: var(--text-secondary); padding-top: 3px; }
.step p b { color: var(--text); }

/* ------------------------------------------------ tabela admin */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
table.data th {
  text-align: left;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-strong);
}
table.data td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------ stats do jogo */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.stat {
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  text-align: center;
}
.stat .valor {
  font-size: var(--fs-lg);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat .rotulo {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.stat--gold .valor { color: var(--gold-strong); }
.stat--green .valor { color: var(--success); }

/* ------------------------------------------------ placar (bolão /bolao) */
.score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin: var(--sp-2) 0;
}
.score-row .lado {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: 700;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.score-row .lado--brasil { text-align: right; color: var(--green); }
.score-row .lado--adv { text-align: left; }
.score-row input[type="number"] {
  width: 68px;
  flex: none;
  text-align: center;
  font-size: var(--fs-xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.score-row input::-webkit-outer-spin-button,
.score-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-row .x { color: var(--text-muted); font-weight: 700; }

.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.score-chip--hit {
  background: var(--success-bg);
  border-color: rgba(47, 213, 117, 0.45);
  color: var(--success);
}

/* ------------------------------------------------ avatar com iniciais */
.avatar {
  width: 30px; height: 30px;
  flex: none;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* ------------------------------------------------ distribuição de palpites */
.dist-lista { display: flex; flex-direction: column; gap: var(--sp-2); }

.dist {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  overflow: hidden;
}
.dist summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 14px;
  min-height: 48px;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.dist summary::-webkit-details-marker { display: none; }
.dist summary:hover { background: rgba(255, 255, 255, 0.04); }
.dist .placar {
  flex: none;
  width: 52px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.dist .barra {
  flex: 1;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.dist .barra > div {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--gold), var(--gold-strong));
  transition: width 400ms var(--ease);
}
.dist .qtd {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.dist .qtd svg { width: 13px; height: 13px; color: var(--success); }
.dist .nomes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 14px 12px;
}
.dist .nomes .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 10px 3px 3px;
}
.dist .nomes .tag .avatar { width: 24px; height: 24px; font-size: 0.58rem; }
.dist--hit { border-color: rgba(47, 213, 117, 0.45); }
.dist--hit .barra > div { background: linear-gradient(90deg, var(--green), var(--success)); }
.dist--hit .placar { color: var(--success); }

/* ------------------------------------------------ stepper de placar */
.stepper-linha {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.stepper-linha .time {
  flex: 1;
  font-weight: 700;
  font-size: var(--fs-sm);
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stepper-linha .time--brasil { color: var(--green); }
.stepper { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.step-btn {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  display: grid; place-items: center;
  transition: background var(--dur) var(--ease), transform 120ms var(--ease);
}
.step-btn:active { transform: scale(0.92); background: rgba(255, 255, 255, 0.16); }
.stepper input[type="number"] {
  width: 56px;
  min-height: 46px;
  padding: 4px;
  text-align: center;
  font-size: var(--fs-xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ------------------------------------------------ confete */
.confete {
  position: fixed;
  top: -14px;
  width: 8px; height: 14px;
  border-radius: 2px;
  z-index: var(--z-toast);
  pointer-events: none;
  animation: confete-cair var(--dur-c, 2.2s) ease-in forwards;
}
@keyframes confete-cair {
  to { transform: translateY(105vh) rotate(var(--rot, 540deg)); opacity: 0.85; }
}

/* ------------------------------------------------ motion de entrada */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(10px); }
  }
  #conteudo > * { animation: rise-in 300ms var(--ease) backwards; }
  #conteudo > *:nth-child(2) { animation-delay: 60ms; }
  #conteudo > *:nth-child(3) { animation-delay: 120ms; }
  #conteudo > *:nth-child(4) { animation-delay: 180ms; }
  #conteudo > *:nth-child(n+5) { animation-delay: 240ms; }

  .plain-list .row-item, .pair, .dist {
    animation: rise-in 250ms var(--ease) backwards;
  }
  .plain-list .row-item:nth-child(2), .pair:nth-of-type(2), .dist:nth-of-type(2) { animation-delay: 30ms; }
  .plain-list .row-item:nth-child(3), .pair:nth-of-type(3), .dist:nth-of-type(3) { animation-delay: 60ms; }
  .plain-list .row-item:nth-child(4), .pair:nth-of-type(4), .dist:nth-of-type(4) { animation-delay: 90ms; }
  .plain-list .row-item:nth-child(5), .pair:nth-of-type(5), .dist:nth-of-type(5) { animation-delay: 120ms; }
  .plain-list .row-item:nth-child(n+6), .pair:nth-of-type(n+6), .dist:nth-of-type(n+6) { animation-delay: 150ms; }
}

/* ------------------------------------------------ histórico (home) */
.history-winner {
  color: var(--gold-strong);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-sm);
}
.history-winner svg { width: 14px; height: 14px; flex: none; }

/* ------------------------------------------------ utilitários */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mb-4 { margin-bottom: var(--sp-4); }
.hidden { display: none !important; }

.page-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-subtitle { color: var(--text-secondary); font-size: var(--fs-sm); margin-top: var(--sp-1); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--sp-4);
  min-height: 44px;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

@media (min-width: 640px) {
  body { padding: var(--sp-6); }
  .card { padding: var(--sp-6); }
}
