/* ================================================================
   Torneio de Natal AUDMC — formulário (light mode)
   ================================================================ */
:root {
  --bg: #f7f7f7;
  --panel: #ffffff;
  --line: #ececec;
  --line-strong: #dedede;
  --text: #1c1c1e;
  --muted: #5f6370;
  --muted-2: #8b8f99;

  --gold: #f4b42a;
  --gold-deep: #d98e0b;
  --gold-text: #b06d00;
  --gold-ink: #2b1a02;

  --red: #e5484d;

  --green: #4cc46a;
  --green-deep: #2f9a4b;

  --display: "Inter", "Geist", system-ui, sans-serif;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 80% -10%, rgba(244, 180, 42, 0.12), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(90, 140, 230, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.gold {
  background: linear-gradient(180deg, #e9a516 0%, var(--gold-deep) 60%, #b06d00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- Layout ---------------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.cover { position: sticky; top: 40px; }

.cover-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 24px 48px -20px rgba(20, 20, 40, 0.35),
    0 2px 6px rgba(40, 40, 40, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

.cover-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.panel {
  position: relative;
  background: var(--panel);
  border-radius: 22px;
  padding: 36px 36px 32px;
  box-shadow:
    0 20px 40px -24px rgba(40, 40, 40, 0.18),
    0 1px 2px rgba(40, 40, 40, 0.06),
    0 0 0 1px var(--line);
}

/* ---------------- Header ---------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(244, 180, 42, 0.7);
}

h1, h2, .q {
  margin: 12px 0 10px;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.05;
}
h1 { font-size: clamp(32px, 3.8vw, 44px); }
h2 { font-size: clamp(28px, 3.2vw, 36px); }

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 46ch;
}
.lead strong { color: var(--text); font-weight: 600; }

.facts {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9f9f9);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.06), 0 0 0 1px var(--line);
  overflow: hidden;
}
.facts li {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.facts li + li { box-shadow: -1px 0 0 var(--line); }
.fact-label {
  font-size: 11.5px;
  color: var(--muted-2);
  font-weight: 500;
}
.fact-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.closed-note {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff5f5;
  box-shadow: 0 0 0 1px #ffd6d6;
  color: #a12a2e;
  font-size: 14px;
}

/* ---------------- Form ---------------- */
form { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field-small { max-width: 180px; }

.field label,
.field legend {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.hint {
  margin: 7px 0 0;
  min-height: 16px;
  font-size: 12.5px;
  color: var(--muted-2);
  transition: color 0.15s;
}
.field.is-invalid .hint { color: var(--red); }

/* Input — receita "All integrations":
   gradiente vertical #FFFFFF → #F7F7F7
   drop shadow #282828 8% y1 blur2 + anel #ECECEC spread1 */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow:
    0 1px 2px rgba(40, 40, 40, 0.08),
    0 0 0 1px var(--line);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.input-wrap:hover {
  box-shadow:
    0 1px 2px rgba(40, 40, 40, 0.10),
    0 0 0 1px var(--line-strong);
}
.input-wrap:focus-within {
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(40, 40, 40, 0.08),
    0 0 0 1px var(--gold),
    0 0 0 4px rgba(244, 180, 42, 0.18);
}
.field.is-invalid .input-wrap {
  box-shadow:
    0 1px 2px rgba(40, 40, 40, 0.08),
    0 0 0 1px var(--red),
    0 0 0 4px rgba(229, 72, 77, 0.12);
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: 500 15px/1 var(--font);
  letter-spacing: -0.005em;
}
.input-wrap input::placeholder { color: #a9adb6; font-weight: 400; }
.input-wrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.has-avatar input { padding-left: 8px; }
.avatar {
  margin-left: 10px;
  width: 28px; height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(40, 40, 40, 0.1);
  background: #eeeeee;
}
.prefix {
  padding-left: 14px;
  color: var(--muted-2);
  font-weight: 500;
}
.prefix + input { padding-left: 4px; }

/* ---------------- Opções (modalidade) ---------------- */
.options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.option { position: relative; display: block; margin: 0 !important; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }

.option-body {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow:
    0 1px 2px rgba(40, 40, 40, 0.08),
    0 0 0 1px var(--line);
  transition: box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.option:hover .option-body {
  box-shadow:
    0 2px 6px rgba(40, 40, 40, 0.08),
    0 0 0 1px var(--line-strong);
}
.option:active .option-body { transform: translateY(1px); }

.option input:focus-visible + .option-body {
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 0 4px rgba(244, 180, 42, 0.22);
}
.option input:checked + .option-body {
  background: linear-gradient(180deg, #fffdf6 0%, #fff6e0 100%);
  box-shadow:
    0 3px 10px -3px rgba(217, 142, 11, 0.35),
    0 0 0 1.5px var(--gold),
    inset 0 1px 0 #ffffff;
}

.option-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #f2f2f2);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.08), 0 0 0 1px var(--line);
  transition: color 0.15s, background 0.15s;
}
.option-icon svg { width: 19px; height: 19px; }
.option input:checked + .option-body .option-icon {
  color: var(--gold-ink);
  background: linear-gradient(180deg, #ffd56b, var(--gold));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 1px var(--gold-deep), 0 1px 2px rgba(217, 142, 11, 0.3);
}

.option-text { display: flex; flex-direction: column; gap: 2px; }
.option-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.option-sub { font-size: 12.5px; color: var(--muted-2); }

.radio {
  position: absolute;
  top: 14px; right: 14px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f4f4f4, #ffffff);
  box-shadow: inset 0 1px 2px rgba(40, 40, 40, 0.12), 0 0 0 1px var(--line-strong);
  transition: box-shadow 0.15s, background 0.15s;
}
.radio::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--gold-ink);
  transform: scale(0);
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.option input:checked + .option-body .radio {
  background: linear-gradient(180deg, #ffd56b, var(--gold));
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.option input:checked + .option-body .radio::after { transform: scale(1); }

.field.is-invalid .option-body { box-shadow: 0 1px 2px rgba(40, 40, 40, 0.08), 0 0 0 1px rgba(229, 72, 77, 0.55); }

/* ---------------- Botões ----------------
   Receita da referência:
   1. Drop shadow  #000 20%  y3 blur6
   2. Inner shadow #FFF 24%  blur6 spread2
   3. Drop shadow  cor do fill 100% spread1 (anel)
   + stroke interno 1px em gradiente linear branco 40% → 0
*/
.btn {
  --fill: var(--gold);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  font: 600 16px/1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.btn-primary {
  color: var(--gold-ink);
  background: linear-gradient(180deg, #ffc94a 0%, var(--fill) 100%);
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.20),
    inset 0 0 6px 2px rgba(255, 255, 255, 0.24),
    0 0 0 1px var(--gold-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow:
    0 8px 16px -4px rgba(217, 142, 11, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.16),
    inset 0 0 6px 2px rgba(255, 255, 255, 0.28),
    0 0 0 1px var(--gold-deep);
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.22),
    inset 0 0 6px 2px rgba(255, 255, 255, 0.18),
    0 0 0 1px var(--gold-deep);
}
.btn:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

/* Secundário — receita "All integrations" */
.btn-secondary {
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow:
    0 1px 2px rgba(40, 40, 40, 0.08),
    0 0 0 1px var(--line);
}
.btn-secondary::before { display: none; }
.btn-secondary:hover {
  box-shadow:
    0 2px 6px rgba(40, 40, 40, 0.08),
    0 0 0 1px var(--line-strong);
}
.btn-secondary:active { transform: translateY(1px); background: #f5f5f5; }

#submit { width: 100%; margin-top: 4px; }

.btn .spinner {
  display: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(43, 26, 2, 0.25);
  border-top-color: var(--gold-ink);
  animation: spin 0.7s linear infinite;
}
.btn.is-loading { pointer-events: none; filter: saturate(0.85); }
.btn.is-loading .spinner { display: inline-block; }
.btn[disabled] { cursor: not-allowed; filter: grayscale(0.7) opacity(0.7); }

@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff5f5;
  box-shadow: 0 0 0 1px #ffd6d6;
  color: #a12a2e;
  font-size: 14px;
  line-height: 1.45;
}

.fineprint {
  margin: -6px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* ---------------- Sucesso ---------------- */
.success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 0;
  outline: none;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.success[hidden] { display: none; }
.success-avatar {
  width: 96px; height: 96px;
  margin-bottom: 20px;
  border-radius: 16px;
  image-rendering: pixelated;
  background: #eeeeee;
  box-shadow: 0 0 0 1.5px var(--gold), 0 10px 30px -8px rgba(217, 142, 11, 0.45);
}
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.success-actions .btn[hidden] { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- Responsivo ---------------- */
@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 40px;
  }
  .cover { position: relative; top: 0; }
  .cover-frame {
    border-radius: 0;
    box-shadow: none;
    max-height: 78vh;
  }
  .cover-frame img { object-fit: cover; object-position: top; }
  .cover-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 30%;
    background: linear-gradient(180deg, transparent, rgba(247, 247, 247, 0.9) 85%, var(--bg));
  }
  .panel {
    margin: -64px 14px 0;
    padding: 28px 20px 24px;
  }
}

@media (max-width: 520px) {
  .options { grid-template-columns: 1fr; }
  .option-body { flex-direction: row; align-items: center; padding: 12px 14px; }
  .radio { top: 50%; transform: translateY(-50%); }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:last-child { grid-column: 1 / -1; box-shadow: 0 -1px 0 var(--line); }
  .field-small { max-width: none; }
  .success-actions { width: 100%; }
  .success-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #snow { display: none; }
}

/* ================================================================
   Etapas (wizard gamificado)
   ================================================================ */
.panel-head h1 { margin-bottom: 0; }

/* ---- Progresso / XP ---- */
.progress {
  position: relative;
  margin-top: 24px;
  padding: 16px 16px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f9f9f9);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.06), 0 0 0 1px var(--line);
}
.progress[hidden] { display: none; }
.progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.progress-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.progress-label b { color: var(--text); font-weight: 600; }
.xp {
  font-family: var(--display);
  font-size: 18px;
  color: var(--green-deep);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.xp-max { font-size: 13px; color: var(--muted-2); margin-left: 2px; }
.xp-num { display: inline-block; transition: transform 0.2s; }
.xp-num.bump { animation: bump 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }

.xp-pop {
  position: absolute;
  right: 16px;
  top: -6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 14px;
  color: #fff;
  background: linear-gradient(180deg, #62d77f, var(--green-deep));
  box-shadow: 0 0 0 1px var(--green-deep), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 10px -2px rgba(47, 154, 75, 0.5);
  opacity: 0;
  pointer-events: none;
}
.xp-pop.show { animation: pop 0.9s ease-out forwards; }

.track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.track li { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.seg {
  position: relative;
  height: 10px;
  border-radius: 4px;
  background: #ececec;
  box-shadow: inset 0 1px 2px rgba(40, 40, 40, 0.12);
  overflow: hidden;
}
.seg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(0, 0, 0, 0.08) 7px 8px),
    linear-gradient(180deg, #7be592 0%, var(--green) 55%, var(--green-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.track li.done .seg::after { transform: scaleX(1); }
.track li.current .seg { box-shadow: inset 0 1px 2px rgba(40, 40, 40, 0.12), 0 0 0 1.5px var(--gold); }
.seg-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track li.current .seg-label { color: var(--text); font-weight: 600; }
.track li.done .seg-label { color: var(--green-deep); }

/* ---- Etapa ---- */
.step[hidden] { display: none; }
.step.enter { animation: stepIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.step.enter-back { animation: stepInBack 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }

.q {
  display: block;
  margin: 0 0 6px !important;
  font-size: clamp(24px, 2.6vw, 30px) !important;
  font-weight: 400 !important;
  color: var(--text);
}
.q-sub { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }

.nick-row { display: flex; align-items: center; gap: 12px; }
.nick-row .input-wrap { flex: 1; height: 52px; }
.nick-row input { font-size: 16px; }
.nick-head {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 10px;
  image-rendering: pixelated;
  background: #eeeeee;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(40, 40, 40, 0.12);
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.nick-head.pop { transform: scale(1.08) rotate(-3deg); }

.input-wrap { height: 52px; }
.input-wrap input { font-size: 16px; }
.input-age { max-width: none; }
.suffix { padding-right: 14px; color: var(--muted-2); font-weight: 500; }

/* ---- Revisão ---- */
.review {
  margin: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9f9f9);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.06), 0 0 0 1px var(--line);
}
.review-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.review-row + .review-row { border-top: 1px solid var(--line); }
.review-row > div { flex: 1; min-width: 0; }
.review dt { font-size: 12px; color: var(--muted-2); font-weight: 500; }
.review dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.review-head {
  width: 36px; height: 36px;
  border-radius: 8px;
  image-rendering: pixelated;
  background: #eeeeee;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.link-btn {
  flex: none;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: 500 13px var(--font);
  color: var(--gold-text);
  cursor: pointer;
}
.link-btn:hover { background: #fff6e0; }
.link-btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 1px; }

/* ---- Ações ---- */
.actions { display: flex; gap: 10px; }
.actions .btn-primary { flex: 1; }
.actions .btn[hidden] { display: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-secondary { padding: 0 18px 0 14px; gap: 6px; }
.btn-arrow { transition: transform 0.15s; }
.btn-primary:hover .btn-arrow { transform: translateX(2px); }
.btn.is-loading .btn-arrow { display: none; }
#next.is-final { --fill: var(--gold); }

/* ---- Conquista (sucesso) ---- */
.achievement {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 22px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf6, #fff3d6);
  box-shadow: 0 0 0 1.5px var(--gold), 0 10px 24px -10px rgba(217, 142, 11, 0.5), inset 0 1px 0 #fff;
  animation: achieve 0.6s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.achievement > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.achievement-head {
  width: 48px; height: 48px;
  border-radius: 10px;
  image-rendering: pixelated;
  background: #eeeeee;
  box-shadow: 0 0 0 1px var(--gold-deep);
}
.achievement-kicker { font-family: var(--display); font-size: 15px; color: var(--gold-text); }
.achievement-title { font-size: 14px; font-weight: 600; }
.achievement-xp {
  font-family: var(--display);
  font-size: 15px;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #62d77f, var(--green-deep));
  box-shadow: 0 0 0 1px var(--green-deep), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes bump { 50% { transform: scale(1.3); } }
@keyframes pop {
  0% { opacity: 0; transform: translateY(6px) scale(0.8); }
  20% { opacity: 1; transform: translateY(-4px) scale(1.05); }
  70% { opacity: 1; transform: translateY(-10px); }
  100% { opacity: 0; transform: translateY(-18px); }
}
@keyframes achieve { from { opacity: 0; transform: translateY(-10px) scale(0.96); } to { opacity: 1; transform: none; } }
.shake { animation: shake 0.35s; }

@media (max-width: 520px) {
  .seg-label { font-size: 10.5px; }
  .progress-label { font-size: 12.5px; }
  .input-age { max-width: none; }
  .achievement-xp { display: none; }
}

/* ================================================================
   Layout centralizado: banner no topo + formulário em foco
   ================================================================ */
.page {
  grid-template-columns: 1fr;
  max-width: 620px;
  gap: 0;
  padding: 32px 20px 64px;
}
.cover {
  position: relative;
  top: 0;
  max-height: 320px;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}
.cover-frame { height: 300px; }
.cover-frame img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%; /* ajuste o 2º valor para subir/descer o recorte */
}
.cover-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(10, 16, 32, 0.35));
}
.panel {
  z-index: 2;
  margin-top: -56px;
  transition: margin-top 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.intro strong { color: var(--text); font-weight: 600; }

/* Modo foco: depois da 1ª pergunta, a foto e o cabeçalho saem de cena */
body.focus .cover { max-height: 0; opacity: 0; }
body.focus .panel { margin-top: 0; }
body.focus .intro,
body.focus .facts { display: none; }
body.focus .panel-head h1 { font-size: clamp(22px, 2.6vw, 26px); }

/* H1 em Inter */
h1 {
  font-family: "Inter", var(--font);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

@media (max-width: 900px) {
  .page { padding: 0 0 40px; }
  .cover-frame { height: 260px; max-height: none; border-radius: 0; }
  .cover-frame::after { height: 35%; background: linear-gradient(180deg, transparent, var(--bg)); }
  .panel { margin: -48px 14px 0; }
  body.focus .panel { margin-top: 14px; }
}

/* Tudo em Inter */
h2, .q { font-weight: 800 !important; letter-spacing: -0.03em; }
.q { font-size: clamp(22px, 2.4vw, 26px) !important; line-height: 1.15; }
.xp, .xp-pop, .achievement-xp { font-weight: 700; letter-spacing: -0.02em; }
.xp-pop, .achievement-xp { font-size: 13px; }
.achievement-kicker { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }

/* ---- Etapa de horário (múltipla escolha) ---- */
.track { grid-template-columns: repeat(5, 1fr); }
.options-list { grid-template-columns: 1fr; }
.options-list .option-body { flex-direction: row; align-items: center; padding: 12px 14px; }
.options-list .option-text { flex: 1; }
.check {
  position: relative;
  flex: none;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f4f4f4, #ffffff);
  box-shadow: inset 0 1px 2px rgba(40, 40, 40, 0.12), 0 0 0 1px var(--line-strong);
  transition: box-shadow 0.15s, background 0.15s;
}
.check::after {
  content: "";
  position: absolute;
  left: 6.5px; top: 3px;
  width: 5px; height: 10px;
  border: solid var(--gold-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.option input:checked + .option-body .check {
  background: linear-gradient(180deg, #ffd56b, var(--gold));
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.option input:checked + .option-body .check::after { transform: rotate(45deg) scale(1); }

/* ---- Aceite das regras ---- */
.agree-field { margin-top: 16px; }
.agree {
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.08), 0 0 0 1px var(--line);
  transition: box-shadow 0.15s, background 0.15s;
}
.agree:hover { box-shadow: 0 2px 6px rgba(40, 40, 40, 0.08), 0 0 0 1px var(--line-strong); }
.agree input { position: absolute; opacity: 0; pointer-events: none; }
.agree .check { margin-top: 0; }
.agree input:checked + .check {
  background: linear-gradient(180deg, #ffd56b, var(--gold));
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.agree input:checked + .check::after { transform: rotate(45deg) scale(1); }
.agree input:focus-visible + .check { box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px rgba(244, 180, 42, 0.25); }
.agree:has(input:checked) {
  background: linear-gradient(180deg, #fffdf6 0%, #fff6e0 100%);
  box-shadow: 0 0 0 1.5px var(--gold);
}
.agree-text { font-size: 14px; line-height: 1.45; color: var(--text); font-weight: 500; }
.agree-text a { color: var(--gold-text); font-weight: 600; text-underline-offset: 2px; }
.agree-field.is-invalid .agree { box-shadow: 0 0 0 1px var(--red), 0 0 0 4px rgba(229, 72, 77, 0.12); }
.field.agree-field label.agree { padding: 14px; font-size: inherit; }

/* ---- Etapa da dupla ---- */
.options-list .radio { position: relative; top: auto; right: auto; transform: none; flex: none; }
.parceiro-field { margin-top: 18px; animation: stepIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.parceiro-field[hidden] { display: none; }
.field label.parceiro-label { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.success-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #f7f7f7);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.08), 0 0 0 1px var(--line);
}
.success-note[hidden] { display: none; }
.review-row[hidden] { display: none; }

/* ================================================================
   Banner novo (2000x667)
   ================================================================ */
.cover { max-height: 260px; }
.cover-frame { height: auto; aspect-ratio: 3 / 1; }
.cover-frame img { object-position: 50% 50%; }
.cover-frame::after { display: none; }
.panel { margin-top: 16px; }

@media (max-width: 900px) {
  .page { padding: 0 0 40px; }
  .cover-frame { aspect-ratio: auto; height: 190px; }
  .panel { margin: 14px 14px 0; }
}

/* ================================================================
   Conquista estilo Minecraft
   ================================================================ */
.mc-card,
.mc-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 12px;
  background: #212121;
  color: #fff;
  font-family: "Pixelify Sans", ui-monospace, monospace;
  border-radius: 0;
  /* moldura em "pixels": contorno preto + bisel cinza */
  box-shadow:
    inset 0 0 0 2px #0b0b0b,
    inset 0 0 0 4px #555555;
  clip-path: polygon(
    0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px)
  );
}
.mc-icon {
  flex: none;
  width: 32px; height: 32px;
  image-rendering: pixelated;
  background: #3a3a3a;
}
.mc-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-kicker {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  color: #ffff55;
  text-shadow: 2px 2px 0 #3f3f15;
}
.mc-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
}
.mc-xp {
  flex: none;
  font-family: "Pixelify Sans", ui-monospace, monospace;
  font-size: 15px;
  font-weight: 600;
  color: #80ff20;
  text-shadow: 2px 2px 0 #203f08;
}

/* cartão fixo na tela de sucesso */
.achievement.mc-card {
  width: 100%;
  margin: 2px 0 24px;
  border-radius: 0;
  background: #212121;
  animation: achieve 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) 0.2s both;
}

/* toast que entra pelo canto, como no jogo */
.mc-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 320px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transform: translateX(calc(100% + 40px));
}
.mc-toast.show { animation: mcToast 5.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }

@keyframes mcToast {
  0%   { transform: translateX(calc(100% + 40px)); }
  8%   { transform: translateX(0); }
  88%  { transform: translateX(0); }
  100% { transform: translateX(calc(100% + 40px)); }
}

@media (prefers-reduced-motion: reduce) {
  .mc-toast { display: none; }
}

/* eyebrow sem o ponto */
.eyebrow::before { display: none; }

/* ================================================================
   Janela de regras
   ================================================================ */
.inline-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--gold-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.inline-link:hover { color: var(--gold-deep); }
.inline-link:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; border-radius: 4px; }

.rules {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 48px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font);
  box-shadow:
    0 30px 60px -20px rgba(20, 20, 40, 0.35),
    0 0 0 1px var(--line);
  overflow: hidden;
}
.rules[open] { display: flex; flex-direction: column; animation: rulesIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rules::backdrop {
  background: rgba(15, 18, 30, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.rules-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.rules-head h2 {
  margin: 6px 0 0;
  font-family: "Inter", var(--font);
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
}
.rules-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #f7f7f7);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.08), 0 0 0 1px var(--line);
  cursor: pointer;
}
.rules-close svg { width: 18px; height: 18px; }
.rules-close:hover { color: var(--text); box-shadow: 0 1px 2px rgba(40, 40, 40, 0.1), 0 0 0 1px var(--line-strong); }

.rules-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 8px;
  overscroll-behavior: contain;
}
.rules-sec { padding: 16px 0; }
.rules-sec + .rules-sec { border-top: 1px solid var(--line); }
.rules-sec h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: "Inter", var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.rules-num {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-ink);
  background: linear-gradient(180deg, #ffd56b, var(--gold));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 1px var(--gold-deep);
}
.rules-sec ul { margin: 0; padding: 0 0 0 34px; display: grid; gap: 8px; }
.rules-sec li { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.rules-sec li::marker { color: var(--gold-deep); }

.rules-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fafafa);
}
.rules-foot .btn { height: 48px; }
.rules-foot .btn-primary { flex: 1; }
.rules-foot .btn-secondary { padding: 0 20px; }

@keyframes rulesIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .rules {
    width: 100vw;
    max-width: 100vw;
    max-height: 88dvh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .rules-head, .rules-body, .rules-foot { padding-left: 18px; padding-right: 18px; }
}

/* ---- Etapa de regras (inline) ---- */
.rules-inline {
  padding: 4px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fafafa);
  box-shadow: 0 1px 2px rgba(40, 40, 40, 0.06), 0 0 0 1px var(--line);
}
.rules-inline .rules-sec { padding: 14px 0; }
.success-actions:empty { display: none; }
