:root {
  --bg: #0D1B12;
  --line: rgba(242, 245, 239, 0.10);
  --ink: #F2F5EF;
  --ink-dim: rgba(242, 245, 239, 0.62);
  --panel: rgba(242, 245, 239, 0.05);
  --vermelho: #FF4D3E;
  --amarelo: #FFD400;
  --azul: #2E9BFF;
  --ink-on-colete: #14100A;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  min-height: 100vh;
  padding: 0 16px 64px;
}
/* linhas de quadra ao fundo */
.court {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
.court svg { width: 100%; height: 100%; }

.wrap { max-width: 920px; margin: 0 auto; }

header { text-align: center; padding: 40px 0 26px; }
h1 {
  font-family: 'Anton', 'Arial Narrow', Impact, sans-serif;
  font-weight: 400; font-size: clamp(40px, 8vw, 64px);
  letter-spacing: 0.02em; text-transform: uppercase; line-height: 1;
}

/* configuração do racha */
.config { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.stepper, .coletes-cfg {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; text-align: center;
}
.stepper { flex: 1 1 130px; }
.coletes-cfg { flex: 2 1 220px; }
.s-label {
  display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 8px;
}
.s-controls { display: flex; align-items: center; justify-content: center; gap: 4px; }
.s-controls button {
  width: 38px; height: 38px; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.s-controls button:disabled { opacity: 0.3; cursor: not-allowed; }
.s-controls output {
  font-family: 'Anton', 'Arial Narrow', Impact, sans-serif;
  font-size: 26px; min-width: 44px; color: var(--ink);
}
.coletes-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.colete-dot {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent;
  color: var(--ink-on-colete); font-family: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer;
}
.colete-dot.escuro { color: var(--ink); }
.colete-dot.aberto { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(242, 245, 239, 0.35); }
.paleta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 14px;
}
.paleta[hidden] { display: none; }
.paleta-titulo { font-size: 13px; color: var(--ink-dim); margin-right: 4px; }
.paleta-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25); cursor: pointer;
}
.paleta-dot:disabled { opacity: 0.25; cursor: not-allowed; }
.paleta-dot.atual { box-shadow: 0 0 0 2px var(--ink); }

button:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amarelo); outline-offset: 2px;
}

/* entrada */
.field label { display: block; font-weight: 700; margin-bottom: 8px; }
.field .hint { font-weight: 400; color: var(--ink-dim); font-size: 13px; }
textarea {
  width: 100%; min-height: 170px; resize: vertical;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-family: inherit; font-size: 15px; line-height: 1.6;
  padding: 14px;
}
textarea::placeholder { color: rgba(242, 245, 239, 0.32); }

.parsed { margin-top: 14px; }
.counter { font-size: 14px; color: var(--ink-dim); margin-bottom: 10px; }
.counter strong { color: var(--ink); }
.counter.ok strong { color: #8BE36B; }
.counter.warn strong { color: var(--amarelo); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 12px; font-size: 14px;
}
.chip.bench-chip { opacity: 0.55; }
.chip button {
  background: none; border: none; color: var(--ink-dim); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 50%;
}
.chip button:hover { color: var(--ink); }

.cta {
  display: block; width: 100%; margin-top: 18px;
  background: var(--ink); color: var(--bg); border: none; border-radius: var(--radius);
  font-family: 'Anton', 'Arial Narrow', Impact, sans-serif;
  font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 16px; cursor: pointer;
}
.cta:disabled { opacity: 0.35; cursor: not-allowed; }

/* resultado */
.r-note { font-size: 14px; color: var(--amarelo); margin-bottom: 14px; }
.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }

.colete {
  border-radius: var(--radius); padding: 16px 16px 18px; color: var(--ink-on-colete);
  /* trama do colete */
  background-image: radial-gradient(rgba(0,0,0,0.16) 1px, transparent 1.4px);
  background-size: 7px 7px;
  animation: entra .35s ease both;
}
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .colete { animation: none; } }

.colete .t-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }
.colete h2 {
  font-family: 'Anton', 'Arial Narrow', Impact, sans-serif; font-weight: 400;
  font-size: 26px; letter-spacing: 0.03em; text-transform: uppercase; margin: 2px 0 12px;
}
.colete ol { list-style: none; }
.colete li {
  font-weight: 500; font-size: 15px; padding: 7px 0;
  border-top: 1px solid rgba(0,0,0,0.14);
}

/* coletes escuros (preto, roxo, marrom) precisam de texto claro */
.colete.escuro {
  color: var(--ink);
  background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1.4px);
}
.colete.escuro li { border-top-color: rgba(255,255,255,0.16); }

.bench { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.bench h3 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; }
.bench p { font-size: 15px; line-height: 1.7; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
#waBtn { grid-column: 1 / -1; background: #25D366; color: #06210F; border: none; font-size: 16px; }
.actions button {
  border-radius: var(--radius); padding: 13px; font-family: inherit; font-weight: 700;
  font-size: 15px; cursor: pointer;
}
#copyBtn { background: var(--ink); color: var(--bg); border: none; }
#againBtn { background: none; color: var(--ink); border: 1px solid var(--line); }

#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* wizard */
.passos {
  display: flex; justify-content: center; gap: 16px; margin-top: 12px;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim);
}
.passo.ativo { color: var(--amarelo); font-weight: 700; }

.etapa-titulo {
  font-family: 'Anton', 'Arial Narrow', Impact, sans-serif; font-weight: 400;
  font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px;
}
.etapa-sub { font-size: 13px; color: var(--ink-dim); margin-bottom: 14px; }

.nav-sec { display: flex; justify-content: center; gap: 22px; margin-top: 14px; }
.btn-link {
  background: none; border: none; color: var(--ink-dim); cursor: pointer;
  font-family: inherit; font-size: 14px; text-decoration: underline; padding: 6px;
}
.btn-link:hover { color: var(--ink); }

/* etapa 2 — linhas de avaliação */
#avaliacao { margin-bottom: 6px; }
.aval-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.aval-proximo { opacity: 0.55; }
.aval-nome { font-weight: 500; font-size: 15px; }
.estrelas { display: flex; }
.estrela {
  background: none; border: none; cursor: pointer;
  font-size: 24px; line-height: 1; padding: 6px 3px; color: var(--ink-dim);
}
.estrela.cheia { color: var(--amarelo); }
