:root {
  --bg: #1D1E48;
  --bg-deep: #12133A;
  --field: #2A2C63;
  --ink: #FFF7E6;
  --ink-soft: #B9BBE3;
  --red: #E0485F;
  --orange: #F07A3C;
  --yellow: #F6BD3B;
  --green: #3FB478;
  --blue: #4585F6;
  --purple: #9A6BF5;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: inherit; margin: 0; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.display { font-family: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif; }

.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.sky svg { position: absolute; }

main {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  margin: 0 auto;
  padding: 36px 20px 28px;
  display: flex; flex-direction: column; align-items: center;
}

/* ---------- Marca ---------- */
.brand { text-align: center; }
.power { width: 148px; height: auto; display: block; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .power .ring { animation: switchOn .9s cubic-bezier(.3,1.4,.5,1) both; transform-origin: 100px 112px; }
  .power .stem { animation: drop .5s .5s cubic-bezier(.3,1.6,.5,1) both; }
  @keyframes switchOn { from { transform: rotate(-120deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes drop { from { transform: translateY(-26px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.wordmark {
  font-family: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 13vw, 3.3rem);
  line-height: 1;
  margin-top: 14px;
  display: flex; justify-content: center; gap: .02em;
}
.wordmark span { text-shadow: 0 4px 0 var(--bg-deep); }
.wordmark .gap { width: .28em; }
.c1 { color: var(--red); } .c2 { color: var(--orange); } .c3 { color: var(--yellow); }
.c4 { color: var(--green); } .c5 { color: var(--blue); } .c6 { color: var(--purple); }
.tagline {
  display: inline-block;
  margin-top: 16px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--bg-deep);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .08em;
}

/* marca pequena nas páginas internas */
.mini {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 1.5rem;
}
.mini img { width: 40px; height: 40px; }
.mini:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 8px; }

.intro { margin-top: 22px; text-align: center; font-size: 1.02rem; line-height: 1.5; color: var(--ink-soft); max-width: 32ch; }

/* ---------- Status de acesso ---------- */
.access { width: 100%; margin-top: 24px; }
.unlock {
  padding: 20px 18px 18px;
  border-radius: 26px;
  background: var(--bg-deep);
  border: 3px solid var(--yellow);
  text-align: center;
}
.unlock h2 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 1.35rem; line-height: 1.2; }
.unlock p { margin-top: 6px; color: var(--ink-soft); font-size: .95rem; line-height: 1.45; }
.price { font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; color: var(--yellow); }
.again { display: inline-block; margin-top: 12px; color: var(--ink-soft); font-size: .9rem; }
.again:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(63, 180, 120, .18);
  border: 2px solid var(--green);
  font-weight: 700;
}
.welcome a { color: var(--ink-soft); font-weight: 600; font-size: .88rem; }

/* ---------- Botão principal ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 16px 20px;
  border: 0;
  border-radius: 20px;
  background: var(--yellow);
  color: var(--bg);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 0 #B98718;
  transition: transform .08s ease, box-shadow .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #B98718; }
.btn:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Jogos ---------- */
.games { width: 100%; margin-top: 26px; display: grid; gap: 22px; }
.game {
  --face: var(--green);
  --edge: #26885A;
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 16px 14px;
  border-radius: 26px;
  background: var(--face);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 0 var(--edge), 0 14px 22px rgba(8, 9, 30, .45);
  transition: transform .08s ease, box-shadow .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.game:active, .game.pressed { transform: translateY(6px); box-shadow: 0 2px 0 var(--edge), 0 4px 8px rgba(8, 9, 30, .4); }
.game:focus-visible { outline: 4px solid var(--yellow); outline-offset: 5px; }
.game.time { --face: var(--blue); --edge: #2A5DC2; }
.game.zoom { --face: var(--purple); --edge: #6A42C8; }
.game.stars { --face: var(--orange); --edge: #B4531F; }
.emblem { width: 76px; height: 76px; border-radius: 20px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.emblem svg { width: 60px; height: 60px; }
.game h2 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 1.32rem; line-height: 1.12; }
.game p { margin-top: 4px; font-size: .92rem; line-height: 1.35; opacity: .95; }
.play {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--edge);
  font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: .95rem;
}
.play svg { width: 16px; height: 16px; }
.locked .play { background: rgba(255,255,255,.85); }

/* ---------- Formulários ---------- */
.card { width: 100%; margin-top: 26px; }
.card h1 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 1.8rem; line-height: 1.15; }
.card .lead { margin-top: 8px; color: var(--ink-soft); line-height: 1.5; }
form { margin-top: 22px; display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; }
.hint { font-weight: 600; font-size: .82rem; color: var(--ink-soft); }
input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--field);
  color: var(--ink);
  font: inherit; font-size: 1.05rem;
}
input::placeholder { color: #7C7FB8; }
input:focus { outline: none; border-color: var(--yellow); }
input[aria-invalid="true"] { border-color: var(--red); }
.error {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(224, 72, 95, .18);
  border: 2px solid var(--red);
  font-weight: 700;
  line-height: 1.4;
}
.note {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  line-height: 1.5;
}
.note strong { color: var(--ink); }
.secure { margin-top: 14px; text-align: center; font-size: .85rem; color: var(--ink-soft); }
.links { margin-top: 22px; text-align: center; }
.links a { color: var(--ink-soft); }

/* ---------- Rodapé ---------- */
.more { margin-top: 34px; width: 100%; padding: 18px; border: 2px dashed rgba(185, 187, 227, .35); border-radius: 20px; text-align: center; }
.more strong { font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: 1.05rem; display: block; }
.more span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: .92rem; }
.ig { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 16px; border-radius: 14px; background: var(--purple); color: #fff; text-decoration: none; font-weight: 800; font-size: .95rem; }
.ig:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.ig svg { width: 18px; height: 18px; }
footer { margin-top: 26px; font-size: .82rem; color: var(--ink-soft); text-align: center; }

[hidden] { display: none !important; }

/* status da página de obrigado */
.big-emoji { font-size: 3.4rem; line-height: 1; }
.spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 7px solid var(--field); border-top-color: var(--yellow);
}
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin 1s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.center { display: grid; justify-items: center; text-align: center; gap: 14px; }
