/* Brainwave design tokens and shared components. Kid pages use .kid, parent pages use .parent. */
:root {
  --ink: #17144a;
  --ink-2: #4b4680;
  --muted: #6c67a0;
  --night: #17144a;
  --night-2: #0c0a2e;
  --lilac: #c9c4ff;
  --coral: #ff6b5b;
  --coral-d: #c7402f;
  --mint: #2fd3a7;
  --mint-d: #12957a;
  --sun: #ffc23d;
  --sun-d: #c78a00;
  --orange: #ff8a2a;
  --violet: #8b7cff;
  --violet-d: #5c4ed6;
  --line: #e7e6f0;
  --paper: #f6f6fa;
  --r-lg: 28px;
  --r-md: 18px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family: Nunito, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* ---------- kid ---------- */
body.kid {
  min-height: 100vh;
  color: #fff;
  background-color: var(--night);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1.5px),
    radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1.5px);
  background-size:
    120px 120px,
    60px 60px;
  background-position:
    0 0,
    30px 40px;
}
.kid .center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}
.kid .stack {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  position: relative;
}
.kid h1 {
  font:
    700 clamp(40px, 7vw, 64px) / 1.04 Fredoka,
    system-ui,
    sans-serif;
  margin: 0;
}
.kid .lede {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--lilac);
  line-height: 1.45;
}
.kid .fine {
  margin: 0;
  font-size: 15px;
  color: var(--lilac);
  line-height: 1.5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font:
    700 28px Fredoka,
    sans-serif;
  text-decoration: none;
}
.brand img {
  width: 56px;
  height: 56px;
}
.brand .b {
  color: var(--sun);
  -webkit-text-stroke: 2px #1e1650;
  paint-order: stroke fill;
}
.brand .w {
  color: var(--orange);
  -webkit-text-stroke: 2px #1e1650;
  paint-order: stroke fill;
}
.card {
  width: 100%;
  background: #fff;
  color: var(--ink);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: 0 10px 0 var(--night-2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.label {
  font:
    800 14px Nunito,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.big-input {
  font:
    600 30px Fredoka,
    sans-serif;
  color: var(--ink);
  height: 72px;
  padding: 0 22px;
  width: 100%;
  border: 3px solid var(--violet);
  border-radius: var(--r-md);
  outline: none;
}
.big-input:focus {
  border-color: var(--coral);
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 68px;
  border: 0;
  border-radius: var(--r-md);
  font:
    700 24px Fredoka,
    sans-serif;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 6px 0 var(--coral-d);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
  width: 100%;
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--coral-d);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.btn.mint {
  background: var(--mint);
  box-shadow: 0 6px 0 var(--mint-d);
}
.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.otp input {
  height: 84px;
  min-width: 0;
  text-align: center;
  font:
    700 42px Fredoka,
    sans-serif;
  color: var(--ink);
  border: 3px solid #dad7ee;
  border-radius: var(--r-md);
  background: #fff;
}
.otp input:focus {
  border-color: var(--coral);
  outline: none;
}
.otp input.filled {
  border-color: var(--violet);
  background: #f1efff;
}
.row-between {
  display: flex;
  justify-content: space-between;
  font:
    700 15px Nunito,
    sans-serif;
  color: var(--ink-2);
}
.err {
  color: #b0302a;
  font-weight: 800;
  font-size: 16px;
  min-height: 22px;
  margin: 0;
}
.pill-link {
  position: absolute;
  left: 28px;
  top: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--lilac);
  text-decoration: none;
  font: 800 17px Nunito;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}
.icon-badge {
  width: 112px;
  height: 112px;
  border-radius: 32px;
  background: var(--mint);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 0 var(--mint-d);
  transform: rotate(-6deg);
}
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.blob.coral {
  width: 400px;
  height: 400px;
  left: -130px;
  bottom: -150px;
  background: var(--coral);
  box-shadow: inset 0 0 0 60px #ff8a7d;
}
.blob.mint {
  width: 240px;
  height: 240px;
  right: -60px;
  top: -70px;
  border: 50px solid var(--mint);
}
@media (max-width: 700px) {
  .blob {
    display: none;
  }
  .otp input {
    height: 64px;
    font-size: 32px;
  }
}

/* ---------- parent ---------- */
body.parent {
  background: var(--paper);
  font-family: Inter, system-ui, sans-serif;
  min-height: 100vh;
}
.parent .shell {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
}
.parent nav.side {
  flex: 1 1 240px;
  max-width: 260px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.parent nav.side a {
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}
.parent nav.side a[aria-current='page'] {
  background: #efedff;
  color: #2e2596;
  font-weight: 600;
}
.parent main {
  flex: 999 1 560px;
  min-width: 0;
  padding: 32px clamp(16px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.parent h1 {
  margin: 0;
  font:
    600 28px Inter,
    sans-serif;
  letter-spacing: -0.02em;
}
.parent h2 {
  margin: 0;
  font:
    600 17px Inter,
    sans-serif;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input,
.field select {
  font:
    500 15px Inter,
    sans-serif;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9d7e8;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
.pbtn {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font:
    600 14px Inter,
    sans-serif;
  cursor: pointer;
}
.pbtn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #d9d7e8;
}
.ptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ptable th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}
.ptable td {
  padding: 11px 6px;
  border-bottom: 1px solid #f0eff6;
}
.ok {
  color: #0b6e56;
  font-weight: 600;
}
.bad {
  color: #b0302a;
  font-weight: 600;
}
.signin-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gbtn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d9d7e8;
  font:
    600 16px Inter,
    sans-serif;
  text-decoration: none;
  color: var(--ink);
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--violet-d);
  font:
    800 15px Nunito,
    sans-serif;
  cursor: pointer;
  text-decoration: underline;
}
