/* Sum Shark — shared styles, derived from the Claude Design handoff tokens. */

:root {
  --bg: #FFF1D3;
  --bg2: #FFF8E4;
  --card: #FFFFFF;
  --ink: #1B2444;
  --ink-soft: #6B7390;
  --line: #F0E6D2;
  --line-soft: #FAEFD7;
  --sky: #3FB0EB;   --sky-deep: #1E89C4;   --sky-soft: #D5EEFB;
  --coral: #FF7A6B; --coral-deep: #E5594B; --coral-soft: #FFDFD9;
  --sun: #FFC940;   --sun-deep: #F0A91A;   --sun-soft: #FFEEB8;
  --mint: #4ECF99;  --mint-deep: #2BA774;  --mint-soft: #CFF1DF;
  --berry: #A472E0; --berry-deep: #7E48C2; --berry-soft: #E6D5F7;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sky-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Page layouts ──────────────────────────────────────── */

.center-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 80px;
  position: relative;
  overflow-x: hidden;
}

.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark svg { display: block; overflow: visible; }
.wordmark .name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.wordmark.sm .name { font-size: 18px; }

.wordmark-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1024px;
  padding: 0 4px;
}

/* ─── Card ──────────────────────────────────────────────── */

.card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: 36px;
  padding: 44px 36px 32px;
  box-shadow:
    0 14px 0 var(--line),
    0 24px 60px rgba(20, 30, 60, 0.10);
  border: 1.5px solid var(--line);
  position: relative;
  z-index: 1;
}

/* ─── Typography ────────────────────────────────────────── */

.eyebrow {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}

h1.display {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 52px;
  color: var(--ink);
  margin: 0 0 32px;
  letter-spacing: -1px;
  text-align: center;
  line-height: 1;
}

.subtitle {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-soft);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
}

.muted {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ─── Forms ─────────────────────────────────────────────── */

label {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.field { margin-bottom: 22px; }

.input {
  width: 100%;
  height: 72px;
  background: var(--bg2);
  border: 3px solid var(--line);
  border-radius: 24px;
  padding: 0 24px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 24px;
  color: var(--ink);
  outline: none;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.input::placeholder { color: var(--ink-soft); opacity: 0.55; }
.input:focus {
  border-color: var(--sky);
  background: #fff;
  box-shadow: 0 0 0 5px var(--sky-soft);
}
.input-sm { height: 56px; font-size: 18px; padding: 0 16px; border-radius: 18px; }

/* ─── Buttons ───────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: none; cursor: pointer; padding: 0 24px;
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  letter-spacing: -0.2px;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  height: 84px; width: 100%;
  background: var(--sky); color: white;
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--sky-deep), 0 12px 24px rgba(20, 30, 60, 0.12);
  font-size: 28px;
}
.btn-primary:hover { filter: brightness(1.03); }
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 var(--sky-deep), 0 6px 12px rgba(20, 30, 60, 0.12);
}

.btn-ghost {
  background: white;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 18px;
  height: 48px;
  font-size: 16px;
  font-family: 'Nunito', sans-serif; font-weight: 800;
  letter-spacing: 0.4px;
  padding: 0 18px;
  box-shadow: 0 3px 0 var(--line);
}
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }

.btn-square {
  width: 48px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}

.btn-danger {
  background: white; color: var(--coral-deep);
  border: 2px solid var(--coral-soft);
  border-radius: 16px;
  height: 48px;
  font-size: 14px;
  font-family: 'Nunito', sans-serif; font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 0 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--coral-soft);
}
.btn-danger:hover { background: var(--coral-soft); }
.btn-danger:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-soft); }

.btn-text {
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Nunito', sans-serif; font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 10px 18px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.btn-text:hover { color: var(--ink); text-decoration: none; }

.signout {
  background: transparent;
  border: none;
  color: var(--sky-deep);
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 12px;
}
.signout:hover { background: var(--sky-soft); }

/* ─── Alert ─────────────────────────────────────────────── */

.alert {
  background: var(--coral-soft);
  border: 2px solid var(--coral);
  color: var(--coral-deep);
  border-radius: 18px;
  padding: 12px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 22px;
}

/* ─── Footnote ──────────────────────────────────────────── */

.footnote {
  margin-top: 28px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.footnote svg { vertical-align: -2px; margin-right: 4px; }

/* ─── Decorative bubbles ────────────────────────────────── */

.bubble { position: absolute; border-radius: 50%; opacity: 0.5; pointer-events: none; }
.bubble.b1 { left: 6%;  top: 22%; width: 14px; height: 14px; background: var(--sky); }
.bubble.b2 { left: 10%; top: 26%; width: 8px;  height: 8px;  background: var(--sky); }
.bubble.b3 { right: 8%; top: 30%; width: 18px; height: 18px; background: var(--coral); }
.bubble.b4 { right: 12%; top: 35%; width: 9px;  height: 9px;  background: var(--coral); }
.bubble.b5 { left: 12%; bottom: 14%; width: 16px; height: 16px; background: var(--sun); }
.bubble.b6 { right: 10%; bottom: 18%; width: 10px; height: 10px; background: var(--sky); }

/* ─── Picker ────────────────────────────────────────────── */

.picker {
  width: 100%;
  max-width: 760px;
  padding: 40px 24px 100px;
  margin-top: 24px;
}
.picker h1.display { font-size: 56px; margin-bottom: 8px; }
.picker .subtitle { margin-bottom: 0; }
.picker .tiles {
  display: flex; gap: 24px;
  justify-content: center;
  margin-top: 56px;
  flex-wrap: wrap;
}

.tile {
  --tile-bg: var(--sky);
  --tile-deep: var(--sky-deep);
  --tile-soft: var(--sky-soft);
  flex: 1 1 280px;
  min-width: 240px;
  max-width: 320px;
  background: var(--tile-bg);
  border: none;
  border-radius: 40px;
  padding: 32px 24px 28px;
  box-shadow: 0 12px 0 var(--tile-deep), 0 18px 30px rgba(20, 30, 60, 0.18);
  cursor: pointer;
  text-decoration: none;
  color: white;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.tile:hover { text-decoration: none; }
.tile.tilt-left  { transform: rotate(-3deg); }
.tile.tilt-right { transform: rotate( 3deg); }
.tile.tilt-left:hover  { transform: rotate(-3deg) translateY(-3px); }
.tile.tilt-right:hover { transform: rotate( 3deg) translateY(-3px); }
.tile.tilt-left:active  { transform: rotate(-3deg) translateY(5px);
  box-shadow: 0 6px 0 var(--tile-deep), 0 10px 20px rgba(20, 30, 60, 0.18); }
.tile.tilt-right:active { transform: rotate( 3deg) translateY(5px);
  box-shadow: 0 6px 0 var(--tile-deep), 0 10px 20px rgba(20, 30, 60, 0.18); }

.tile[data-color="coral"] { --tile-bg: var(--coral); --tile-deep: var(--coral-deep); --tile-soft: var(--coral-soft); }
.tile[data-color="sky"]   { --tile-bg: var(--sky);   --tile-deep: var(--sky-deep);   --tile-soft: var(--sky-soft); }
.tile[data-color="mint"]  { --tile-bg: var(--mint);  --tile-deep: var(--mint-deep);  --tile-soft: var(--mint-soft); }
.tile[data-color="sun"]   { --tile-bg: var(--sun);   --tile-deep: var(--sun-deep);   --tile-soft: var(--sun-soft); }
.tile[data-color="berry"] { --tile-bg: var(--berry); --tile-deep: var(--berry-deep); --tile-soft: var(--berry-soft); }

.avatar {
  width: 180px; height: 180px; border-radius: 50%;
  background: white;
  border: 8px solid var(--tile-deep);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 -8px 0 var(--tile-soft);
  position: relative;
}
.avatar span {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 110px;
  color: var(--tile-deep);
  line-height: 1;
  margin-top: -6px;
}
.avatar::before, .avatar::after {
  content: '';
  position: absolute;
  bottom: 38px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--tile-soft);
}
.avatar::before { left: 30px; }
.avatar::after  { right: 30px; }

.tile-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 36px;
  color: white;
  letter-spacing: -0.5px;
  text-align: center;
}
.tile-sub {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

/* ─── Empty state ───────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 40px 28px;
  margin: 48px auto 0;
  background: white;
  border: 3px dashed var(--line);
  border-radius: 28px;
  max-width: 480px;
}
.empty-state h2 {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 28px; color: var(--ink); margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.empty-state p {
  font-family: 'Nunito', sans-serif; font-weight: 600;
  font-size: 16px; color: var(--ink-soft); margin: 0 0 20px;
}

/* "For grown-ups" link */
.parent-link-wrap {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
}

/* ─── Child space ───────────────────────────────────────── */

.top-bar-child {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  max-width: 960px;
  margin: 0 auto;
}
.child-hero {
  text-align: center;
  margin: 60px auto 0;
  max-width: 600px;
  padding: 0 24px;
}
.child-hero .hello {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 64px;
  letter-spacing: -1.5px;
  margin: 0 0 12px;
  line-height: 1;
}
.child-hero .stub {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-soft);
  margin: 16px 0 0;
}

.color-coral { color: var(--coral-deep); }
.color-sky   { color: var(--sky-deep); }
.color-mint  { color: var(--mint-deep); }
.color-sun   { color: var(--sun-deep); }
.color-berry { color: var(--berry-deep); }

/* ─── Settings ──────────────────────────────────────────── */

.settings-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.settings-page header.bar {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.settings-page header.bar .titles h1 {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 22px; color: var(--ink); margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.settings-page header.bar .titles .sub {
  font-family: 'Nunito', sans-serif; font-weight: 600;
  font-size: 12px; color: var(--ink-soft);
  margin-top: 2px;
}
.section {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.section .head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
  gap: 10px;
}
.section h2 {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 22px; color: var(--ink); margin: 0; letter-spacing: -0.3px;
}
.section .sub {
  font-family: 'Nunito', sans-serif; font-weight: 600;
  font-size: 12px; color: var(--ink-soft);
}
.section p { font-family: 'Nunito', sans-serif; font-weight: 600;
             color: var(--ink-soft); margin: 0 0 14px; }

/* Child row */
.child-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--bg2);
  border-radius: 18px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.child-row .swatch {
  --c-bg: var(--sky); --c-deep: var(--sky-deep);
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--c-bg); border: 3px solid var(--c-deep);
  display: flex; align-items: center; justify-content: center;
  color: white; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 22px;
  flex-shrink: 0;
}
.child-row .swatch[data-color="coral"] { --c-bg: var(--coral); --c-deep: var(--coral-deep); }
.child-row .swatch[data-color="sky"]   { --c-bg: var(--sky);   --c-deep: var(--sky-deep); }
.child-row .swatch[data-color="mint"]  { --c-bg: var(--mint);  --c-deep: var(--mint-deep); }
.child-row .swatch[data-color="sun"]   { --c-bg: var(--sun);   --c-deep: var(--sun-deep); }
.child-row .swatch[data-color="berry"] { --c-bg: var(--berry); --c-deep: var(--berry-deep); }

.child-row .edit-form {
  flex: 1; min-width: 220px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.child-row .edit-form .input { flex: 1; min-width: 140px; }

/* Color picker for child form */
.color-picker { display: inline-flex; gap: 8px; }
.color-picker input[type=radio] { display: none; }
.color-picker label {
  margin: 0;
  display: inline-block;
  width: 40px; height: 40px;
  border-radius: 14px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 120ms ease, border-color 120ms ease;
}
.color-picker label[data-color="coral"] { background: var(--coral); }
.color-picker label[data-color="sky"]   { background: var(--sky); }
.color-picker label[data-color="mint"]  { background: var(--mint); }
.color-picker label[data-color="sun"]   { background: var(--sun); }
.color-picker label[data-color="berry"] { background: var(--berry); }
.color-picker input[type=radio]:checked + label[data-color="coral"] { border-color: var(--coral-deep); }
.color-picker input[type=radio]:checked + label[data-color="sky"]   { border-color: var(--sky-deep); }
.color-picker input[type=radio]:checked + label[data-color="mint"]  { border-color: var(--mint-deep); }
.color-picker input[type=radio]:checked + label[data-color="sun"]   { border-color: var(--sun-deep); }
.color-picker input[type=radio]:checked + label[data-color="berry"] { border-color: var(--berry-deep); }
.color-picker label:hover { transform: translateY(-2px); }

.add-child-button {
  height: 64px;
  font-size: 22px;
  max-width: 320px;
  margin-top: 4px;
}

/* Setup / login / gate centered card layout */
.center-page > .wordmark { margin-bottom: 48px; }
.gate-help {
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  color: var(--ink-soft);
  margin: -16px 0 28px;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Practice screen
   ═══════════════════════════════════════════════════════════════════════════ */

.practice {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* State-dependent backgrounds (whole page tints). Body class set by JS. */
body.state-tryagain { background: var(--sun-soft); }
body.state-reveal   { background: var(--sky-soft); }

/* Top bar */
.practice-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.practice-top .im-done {
  color: var(--ink-soft);
}
.practice-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mute-btn {
  width: 48px; height: 48px;
  border-radius: 18px;
  background: white;
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 var(--line);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mute-btn .mute-off { display: none; }
body.is-muted .mute-btn .mute-on  { display: none; }
body.is-muted .mute-btn .mute-off { display: inline-flex; }
.mute-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }

.kid-badge {
  --badge-bg: var(--sky);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: 999px;
  padding: 6px 16px 6px 6px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
}
.kid-badge[data-color="coral"] { --badge-bg: var(--coral); }
.kid-badge[data-color="sky"]   { --badge-bg: var(--sky); }
.kid-badge[data-color="mint"]  { --badge-bg: var(--mint); }
.kid-badge[data-color="sun"]   { --badge-bg: var(--sun); }
.kid-badge[data-color="berry"] { --badge-bg: var(--berry); }
.kid-badge .pill {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--badge-bg);
  color: white;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.kid-badge-name {
  font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: 18px;
  color: var(--ink);
}

/* Progress (Phase 3 will bind to a reward target) */
.practice-progress {
  margin-top: 22px;
}
.progress-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.progress-label {
  font-family: 'Nunito', sans-serif; font-weight: 700;
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.progress-value {
  --pv-color: var(--sky-deep);
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 28px;
  color: var(--pv-color);
}
.progress-value[data-color="coral"] { --pv-color: var(--coral-deep); }
.progress-value[data-color="sky"]   { --pv-color: var(--sky-deep); }
.progress-value[data-color="mint"]  { --pv-color: var(--mint-deep); }
.progress-value[data-color="sun"]   { --pv-color: var(--sun-deep); }
.progress-value[data-color="berry"] { --pv-color: var(--berry-deep); }

.progress-track {
  --pt-fill: var(--sky);
  --pt-deep: var(--sky-deep);
  position: relative;
  height: 22px;
  background: var(--line-soft);
  border-radius: 999px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.progress-track[data-color="coral"] { --pt-fill: var(--coral); --pt-deep: var(--coral-deep); }
.progress-track[data-color="sky"]   { --pt-fill: var(--sky);   --pt-deep: var(--sky-deep); }
.progress-track[data-color="mint"]  { --pt-fill: var(--mint);  --pt-deep: var(--mint-deep); }
.progress-track[data-color="sun"]   { --pt-fill: var(--sun);   --pt-deep: var(--sun-deep); }
.progress-track[data-color="berry"] { --pt-fill: var(--berry); --pt-deep: var(--berry-deep); }
.progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(180deg, var(--pt-fill), var(--pt-deep));
  border-radius: 999px;
  transition: width 400ms cubic-bezier(.4, 1.4, .5, 1);
}

/* Question line */
.practice-question {
  margin-top: 28px;
  text-align: center;
}
.qline {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.qa {
  font-family: 'Fredoka', sans-serif; font-weight: 500;
  font-size: 108px;
  color: var(--ink);
  letter-spacing: -2px;
  line-height: 1;
}
.qop, .qeq {
  font-family: 'Fredoka', sans-serif; font-weight: 500;
  font-size: 108px;
  color: var(--ink-soft);
  letter-spacing: -2px;
  line-height: 1;
}
.qans {
  --ans-color: var(--sky-deep);
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 108px;
  color: var(--ans-color);
  letter-spacing: -2px;
  line-height: 1;
  background: white;
  padding: 0 22px;
  border-radius: 24px;
  box-shadow: 0 6px 0 rgba(30, 137, 196, 0.25);
}
.qans[data-color="coral"] { --ans-color: var(--coral-deep); box-shadow: 0 6px 0 rgba(229, 89, 75, 0.25); }
.qans[data-color="sky"]   { --ans-color: var(--sky-deep);   box-shadow: 0 6px 0 rgba(30, 137, 196, 0.25); }
.qans[data-color="mint"]  { --ans-color: var(--mint-deep);  box-shadow: 0 6px 0 rgba(43, 167, 116, 0.25); }
.qans[data-color="sun"]   { --ans-color: var(--sun-deep);   box-shadow: 0 6px 0 rgba(240, 169, 26, 0.25); }
.qans[data-color="berry"] { --ans-color: var(--berry-deep); box-shadow: 0 6px 0 rgba(126, 72, 194, 0.25); }

.answer-box {
  margin: 18px auto 0;
  max-width: 600px;
  height: 96px;
  background: white;
  border: 3px dashed var(--line);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 64px;
  color: var(--ink);
  letter-spacing: -1px;
}
.answer-box .placeholder {
  font-size: 24px;
  font-weight: 500;
  color: var(--ink-soft);
  opacity: 0.6;
  letter-spacing: 0;
}
/* Note: in try-again state the answer box stays visually neutral.
   The page background tint and mascot card carry the state signal — the live
   input must never look like negative feedback while the child is still trying
   (SPEC.md §3 positive-only reinforcement). */

/* Mascot card (try-again / reveal) */
.mascot-card {
  margin: 16px auto 0;
  max-width: 560px;
  background: white;
  border-radius: 24px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 3px solid var(--sky);
  box-shadow: 0 4px 0 rgba(30, 137, 196, 0.2);
}
.mascot-sun { border-color: var(--sun); box-shadow: 0 4px 0 rgba(240, 169, 26, 0.2); }
.mascot-sky { border-color: var(--sky); box-shadow: 0 4px 0 rgba(30, 137, 196, 0.2); }
.mascot-svg { flex: 0 0 auto; line-height: 0; }
.mascot-text { text-align: left; }
.mascot-headline {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 24px; color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.mascot-sub {
  font-family: 'Nunito', sans-serif; font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.key-hint {
  display: inline-block;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--sun-soft);
  color: var(--sun-deep);
  font-weight: 800;
}

/* Numpad — in document flow, sits below the question so the layout fits any
   realistic viewport (iPad landscape/portrait, phone portrait) without
   overlapping the problem or feedback card. */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 480px;
  margin: 20px auto 0;
}
.num-key {
  height: 84px;
  border: none;
  border-radius: 24px;
  background: white;
  box-shadow: 0 6px 0 #E8DCC0, 0 8px 16px rgba(20, 30, 60, 0.08);
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 44px;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  letter-spacing: -1px;
  transition: transform 80ms ease, box-shadow 80ms ease, filter 80ms ease;
}
.num-key:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #E8DCC0, 0 4px 8px rgba(20, 30, 60, 0.08);
}
.num-key:disabled { opacity: 0.42; cursor: default; }
.key-back {
  background: var(--sun-soft);
  box-shadow: 0 6px 0 rgba(240, 169, 26, 0.32);
}
.key-back:active:not(:disabled) {
  box-shadow: 0 3px 0 rgba(240, 169, 26, 0.32);
}
.key-enter {
  background: var(--mint);
  box-shadow: 0 6px 0 var(--mint-deep), 0 8px 16px rgba(43, 167, 116, 0.18);
  color: white;
}
.key-enter:active:not(:disabled) {
  box-shadow: 0 3px 0 var(--mint-deep), 0 4px 8px rgba(43, 167, 116, 0.18);
}
.numpad-disabled .num-key { pointer-events: none; }

/* Correct-feedback overlay (client-side, fires on submit before navigation) */
.correct-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
  transition: opacity 120ms ease-out;
}
.correct-overlay.show {
  opacity: 1;
}
.correct-overlay.show .correct-ring.r1 { animation: corral-burst 600ms ease-out forwards; }
.correct-overlay.show .correct-ring.r2 { animation: corral-burst 600ms ease-out 60ms forwards; }
.correct-overlay.show .correct-disc    { animation: corral-pop 500ms cubic-bezier(.5,1.6,.4,1) forwards; }
.correct-overlay.show .correct-check   { animation: corral-pop 500ms cubic-bezier(.5,1.6,.4,1) 80ms forwards; transform: scale(0); }
.correct-overlay.show .correct-plus    { animation: corral-plus 600ms cubic-bezier(.5,1.6,.4,1) 100ms forwards; transform: scale(0) rotate(0); }
.correct-overlay.show .correct-card    { animation: corral-pop 500ms cubic-bezier(.5,1.6,.4,1) 120ms forwards; transform: scale(0); }
.correct-ring {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 8px solid var(--mint);
  opacity: 0;
}
.correct-ring.r2 { width: 280px; height: 280px; border-width: 6px; }
.correct-disc {
  position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--mint);
  opacity: 0;
}
.correct-check {
  position: absolute;
  filter: drop-shadow(0 8px 16px rgba(20, 30, 60, 0.18));
  transform: scale(0);
}
.correct-plus {
  position: absolute;
  top: 30%; right: 22%;
  background: var(--sun);
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 40px;
  padding: 4px 22px;
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--sun-deep);
  transform: scale(0) rotate(0);
}
.correct-card {
  position: absolute;
  bottom: 28%;
  background: white;
  border-radius: 28px;
  padding: 18px 36px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 44px;
  letter-spacing: -0.5px;
  color: var(--ink);
  box-shadow: 0 8px 0 rgba(43, 167, 116, 0.25), 0 14px 30px rgba(20, 40, 30, 0.14);
  transform: scale(0);
}
@keyframes corral-burst {
  0%   { transform: scale(0.4); opacity: 0.0; }
  40%  { opacity: 0.4; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes corral-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes corral-plus {
  0%   { transform: scale(0) rotate(0); opacity: 0; }
  60%  { transform: scale(1.1) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(8deg); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Curriculum editor
   ═══════════════════════════════════════════════════════════════════════════ */

.op-section { transition: border-color 120ms ease; }
.op-section .op-header {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  margin: 0;
  padding: 4px 0;
}
.op-section .op-header input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 44px; height: 28px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background 160ms ease;
  flex-shrink: 0;
}
.op-section .op-header input[type=checkbox]::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: left 160ms cubic-bezier(.4, 1.4, .5, 1);
}
.op-section .op-header input[type=checkbox]:checked { background: var(--mint); }
.op-section.op-subtraction .op-header input[type=checkbox]:checked { background: var(--sky); }
.op-section.op-multiplication .op-header input[type=checkbox]:checked { background: var(--coral); }
.op-section.op-division .op-header input[type=checkbox]:checked { background: var(--berry); }
.op-section .op-header input[type=checkbox]:checked::after { left: 19px; }

.op-section .op-sym {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 36px;
  color: var(--ink-soft);
  width: 40px; text-align: center; line-height: 1;
  letter-spacing: -1px;
}
.op-section.op-on.op-addition       .op-sym { color: var(--mint-deep); }
.op-section.op-on.op-subtraction    .op-sym { color: var(--sky-deep); }
.op-section.op-on.op-multiplication .op-sym { color: var(--coral-deep); }
.op-section.op-on.op-division       .op-sym { color: var(--berry-deep); }

.op-section .op-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.3px;
  flex: 1;
}
.op-section .op-toggle { flex: 0 0 auto; }

.op-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.op-section:not(.op-on) .op-body { opacity: 0.55; }
.row-label {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.range-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.range-num {
  width: 90px;
  height: 56px;
  font-size: 22px;
  padding: 0 14px;
  text-align: center;
}
.range-dash {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.op-hint {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  display: inline-block;
}
.chip input[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: white;
  border: 2px solid var(--line);
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  transition: transform 80ms ease, background 120ms ease;
}
.chip input[type=checkbox]:checked + span {
  background: var(--coral);
  border-color: var(--coral-deep);
  color: white;
  box-shadow: 0 3px 0 var(--coral-deep);
}
.chip span:hover { transform: translateY(-1px); }

.save-bar {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-bottom: 32px;
}

.saved-toast {
  background: var(--mint-soft);
  border: 2px solid var(--mint);
  color: var(--mint-deep);
  border-radius: 16px;
  padding: 10px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Practice screen — responsive sizing
   ═══════════════════════════════════════════════════════════════════════════
   Default sizes above target tall viewports (iPad portrait, desktop). On
   shorter viewports (iPad landscape ≈ 768px tall, phone portrait ≈ 844px)
   we compress the question, answer box and numpad keys so the whole
   practice surface — top bar, progress, question, answer, mascot card,
   numpad — fits without scrolling and without overlap.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-height: 900px) {
  .qa, .qop, .qeq, .qans { font-size: 84px; }
  .practice-question     { margin-top: 20px; }
  .answer-box            { height: 80px; font-size: 52px; margin-top: 14px; }
  .answer-box .placeholder { font-size: 20px; }
  .mascot-card           { padding: 10px 16px; margin-top: 12px; }
  .num-key               { height: 72px; font-size: 38px; }
  .numpad                { gap: 12px; }
  .practice-progress     { margin-top: 16px; }
  .progress-track        { height: 18px; }
}

/* Tight: iPad landscape (~768px tall) and any shorter viewport. */
@media (max-height: 820px) {
  .practice              { padding: 6px 16px 14px; }
  .practice-top          { gap: 8px; }
  .practice-top .im-done { height: 40px; padding: 0 14px; font-size: 14px; }
  .practice-top .mute-btn { width: 40px; height: 40px; border-radius: 14px; }
  .practice-top .mute-btn svg { width: 18px; height: 18px; }
  .kid-badge             { padding: 4px 12px 4px 4px; }
  .kid-badge .pill       { width: 28px; height: 28px; font-size: 16px; }
  .kid-badge-name        { font-size: 15px; }

  .practice-progress     { margin-top: 8px; }
  .progress-row          { margin-bottom: 4px; }
  .progress-label        { font-size: 12px; letter-spacing: 1.2px; }
  .progress-value        { font-size: 20px; }
  .progress-track        { height: 12px; }

  .practice-question     { margin-top: 10px; }
  .qa, .qop, .qeq, .qans { font-size: 52px; }
  .qline                 { gap: 10px; }
  .qans                  { padding: 0 12px; border-radius: 16px; }
  .answer-box            { height: 54px; font-size: 32px; margin-top: 8px; border-radius: 16px; }
  .answer-box .placeholder { font-size: 14px; }
  .mascot-card           { margin-top: 8px; padding: 6px 12px; gap: 10px; border-radius: 18px; border-width: 2px; }
  .mascot-card .mascot-svg svg { width: 44px !important; height: 34px !important; }
  .mascot-headline       { font-size: 17px; }
  .mascot-sub            { font-size: 11px; margin-top: 0; }
  .num-key               { height: 50px; font-size: 26px; border-radius: 16px; }
  .numpad                { gap: 8px; max-width: 380px; margin-top: 10px; }
  .num-key .key-back svg { width: 26px !important; height: 20px !important; }
  .key-enter svg         { width: 26px !important; height: 26px !important; }
}

/* Narrow widths (phone portrait): keep operands from overflowing. */
@media (max-width: 460px) {
  .qa, .qop, .qeq, .qans { font-size: 60px; }
  .qline                 { gap: 10px; }
  .qans                  { padding: 0 12px; }
  .numpad                { max-width: 360px; gap: 10px; }
  .num-key               { height: 64px; font-size: 30px; }
  .answer-box            { height: 64px; font-size: 36px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   No-active-reward pill (practice screen)
   ═══════════════════════════════════════════════════════════════════════════ */

.no-reward-row { display: flex; justify-content: center; }
.no-reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px dashed var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Reward editor
   ═══════════════════════════════════════════════════════════════════════════ */

.reward-active.reward-earned { border-color: var(--sun); box-shadow: 0 4px 0 var(--sun-soft); }
.reward-earned-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--sun-soft);
  border: 2px solid var(--sun);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.reward-earned-icon { font-size: 32px; line-height: 1; }
.reward-earned-title {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 20px; color: var(--ink); letter-spacing: -0.3px;
}
.reward-earned-sub {
  font-family: 'Nunito', sans-serif; font-weight: 600;
  font-size: 14px; color: var(--ink-soft);
  margin-top: 2px;
}
.reward-progress-summary {
  display: flex;
  gap: 24px;
  background: var(--bg2);
  border-radius: 18px;
  padding: 12px 16px;
  margin: 12px 0 4px;
}
.reward-progress-summary[data-color="coral"] strong { color: var(--coral-deep); }
.reward-progress-summary[data-color="sky"]   strong { color: var(--sky-deep); }
.reward-progress-summary[data-color="mint"]  strong { color: var(--mint-deep); }
.reward-progress-summary[data-color="sun"]   strong { color: var(--sun-deep); }
.reward-progress-summary[data-color="berry"] strong { color: var(--berry-deep); }
.reward-summary-label {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.reward-summary-value {
  font-family: 'Fredoka', sans-serif; font-weight: 500;
  font-size: 26px;
  color: var(--ink-soft);
}
.reward-summary-value strong { font-weight: 600; color: var(--ink); }

/* ═══════════════════════════════════════════════════════════════════════════
   Big celebration overlay (Phase 3 reward moment)
   Distinct from the per-answer .correct-overlay flash:
   - Full-screen, persistent until dismissed by JS or the parent delivers
   - Berry-purple stage, confetti, crowned shark, "WOO-HOO!"
   - Two actions: Claim my reward (→ /done → picker), Keep swimming (dismiss)
   ═══════════════════════════════════════════════════════════════════════════ */

body.celebrating { overflow: hidden; }

.celebration {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--berry);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  overflow: hidden;
  animation: celebration-in 320ms cubic-bezier(.4, 1.4, .5, 1);
}
.celebration.dismissed {
  animation: celebration-out 220ms ease-out forwards;
  pointer-events: none;
}

@keyframes celebration-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes celebration-out {
  to { opacity: 0; transform: scale(1.02); }
}

.celebration-sunburst {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  width: 1400px;
  height: 1400px;
  background: repeating-conic-gradient(var(--berry-deep) 0deg 12deg, transparent 12deg 24deg);
  opacity: 0.18;
  border-radius: 50%;
  pointer-events: none;
  animation: sunburst-spin 60s linear infinite;
}
@keyframes sunburst-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.celebration-confetti {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.confetti {
  position: absolute;
  width: 12px; height: 18px;
  opacity: 0;
  border-radius: 3px;
  animation: confetti-fall 1400ms cubic-bezier(.3,1.4,.6,1) forwards;
}
.confetti.c1 { background: var(--coral); }
.confetti.c2 { background: var(--sun); }
.confetti.c3 { background: var(--mint); border-radius: 50%; width: 10px; height: 10px; }
.confetti.c4 { background: var(--sky); }
.confetti.c5 { background: var(--coral-deep); border-radius: 0; }
.confetti.c6 { background: var(--mint-deep); border-radius: 50%; width: 10px; height: 10px; }
@keyframes confetti-fall {
  0%   { opacity: 0; transform: translateY(-200px) rotate(0); }
  40%  { opacity: 0.95; }
  100% { opacity: 0.85; transform: translateY(0) rotate(720deg); }
}

.celebration-eyebrow {
  position: relative; z-index: 2;
  background: rgba(255, 255, 255, 0.22);
  color: white;
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  margin-bottom: 18px;
}

.celebration-mascot {
  position: relative; z-index: 2;
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.celebration-mascot .celebration-shark {
  transform: rotate(-8deg);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
}
.celebration-mascot .celebration-shark svg {
  width: 260px !important;
  height: 200px !important;
}
.celebration-crown {
  position: absolute;
  top: -10px;
  left: calc(50% - 60px);
  transform: rotate(-6deg);
  z-index: 3;
}

.celebration-headline {
  position: relative; z-index: 2;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 96px;
  color: white;
  line-height: 0.95;
  letter-spacing: -3px;
  text-align: center;
  margin: 0;
  text-shadow: 0 6px 0 var(--berry-deep), 0 14px 30px rgba(0, 0, 0, 0.28);
}
.celebration-subline {
  position: relative; z-index: 2;
  font-family: 'Fredoka', sans-serif; font-weight: 500;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.2px;
  margin-top: 4px;
  text-align: center;
}

.celebration-reward-card {
  position: relative; z-index: 2;
  margin-top: 28px;
  background: white;
  color: var(--ink);
  border-radius: 28px;
  padding: 18px 22px;
  display: flex; align-items: center; gap: 18px;
  max-width: 480px; width: 100%;
  box-shadow: 0 14px 0 var(--berry-deep), 0 20px 40px rgba(0, 0, 0, 0.2);
}
.celebration-reward-icon {
  flex: 0 0 auto;
  width: 72px; height: 72px;
  border-radius: 18px;
  background: var(--sun-soft);
  border: 3px solid var(--sun);
  display: inline-flex; align-items: center; justify-content: center;
}
.celebration-reward-label {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.celebration-reward-desc {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.4px;
  line-height: 1.15;
  margin-top: 2px;
}

.celebration-actions {
  position: relative; z-index: 2;
  display: flex;
  gap: 12px;
  margin-top: 28px;
  width: 100%;
  max-width: 480px;
}
.celebration-claim {
  width: 100%;
  height: 76px;
  background: var(--sun);
  color: var(--ink);
  border-radius: 26px;
  box-shadow: 0 8px 0 var(--sun-deep), 0 12px 24px rgba(0, 0, 0, 0.15);
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 24px;
  border: none;
  cursor: pointer;
}
.celebration-claim:active { transform: translateY(4px); box-shadow: 0 4px 0 var(--sun-deep); }
.celebration-keep {
  flex: 0 0 auto;
  height: 76px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 26px;
  font-family: 'Fredoka', sans-serif; font-weight: 500;
  font-size: 20px;
  color: white;
  cursor: pointer;
}
.celebration-keep:active { transform: translateY(2px); }

/* ═══════════════════════════════════════════════════════════════════════════
   Parent dashboard (Phase 4)
   Pure read view — lifetime correct + 7-day usage chart per child.
   Bars styled to the kid's palette colour for quick visual scanning.
   ═══════════════════════════════════════════════════════════════════════════ */

.dashboard-kid .dashboard-kid-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.dashboard-kid-head h2 {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 24px; margin: 0; letter-spacing: -0.3px;
}

.dashboard-headline {
  background: var(--bg2);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dashboard-headline[data-color="coral"] .dashboard-headline-value { color: var(--coral-deep); }
.dashboard-headline[data-color="sky"]   .dashboard-headline-value { color: var(--sky-deep); }
.dashboard-headline[data-color="mint"]  .dashboard-headline-value { color: var(--mint-deep); }
.dashboard-headline[data-color="sun"]   .dashboard-headline-value { color: var(--sun-deep); }
.dashboard-headline[data-color="berry"] .dashboard-headline-value { color: var(--berry-deep); }
.dashboard-headline-label {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 11px; color: var(--ink-soft);
  letter-spacing: 1.4px; text-transform: uppercase;
}
.dashboard-headline-sub {
  font-family: 'Nunito', sans-serif; font-weight: 600;
  font-size: 12px; color: var(--ink-soft);
  margin-top: 2px;
}
.dashboard-headline-value {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 56px; letter-spacing: -2px; line-height: 1;
}

.dashboard-aux-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.aux-stat {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
.aux-stat-label {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 10px; color: var(--ink-soft);
  letter-spacing: 1px; text-transform: uppercase;
  line-height: 1.2;
}
.aux-stat-value {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 28px; color: var(--ink); margin-top: 4px;
  line-height: 1; letter-spacing: -1px;
}

.dashboard-chart-section {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.dashboard-chart-label {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 11px; color: var(--ink-soft);
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 12px;
}
.dashboard-chart {
  display: flex; align-items: flex-end;
  gap: 8px;
  height: 130px;
}
.dashboard-chart .bar-col {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}
.dashboard-chart .bar-value {
  font-family: 'Nunito', sans-serif; font-weight: 700;
  font-size: 11px; color: var(--ink-soft);
  height: 14px;
  letter-spacing: 0.4px;
}
.dashboard-chart .bar {
  width: 100%;
  border-radius: 6px;
  background: var(--sky);
  transition: height 200ms ease;
  min-height: 4px;
}
.dashboard-chart .bar.bar-empty { background: var(--line-soft); }
.dashboard-chart[data-color="coral"] .bar:not(.bar-empty) { background: var(--coral); }
.dashboard-chart[data-color="sky"]   .bar:not(.bar-empty) { background: var(--sky); }
.dashboard-chart[data-color="mint"]  .bar:not(.bar-empty) { background: var(--mint); }
.dashboard-chart[data-color="sun"]   .bar:not(.bar-empty) { background: var(--sun); }
.dashboard-chart[data-color="berry"] .bar:not(.bar-empty) { background: var(--berry); }
.dashboard-chart .bar-label {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 11px; color: var(--ink-soft);
  letter-spacing: 0.4px;
}

.dashboard-empty {
  padding: 20px 16px;
  text-align: center;
  background: white;
  border: 2px dashed var(--line);
  border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Compress the celebration for short viewports (iPad landscape, phones). */
@media (max-height: 820px) {
  .celebration                 { padding: 16px; }
  .celebration-eyebrow         { font-size: 12px; padding: 6px 14px; margin-bottom: 10px; }
  .celebration-mascot          { margin-bottom: 10px; }
  .celebration-mascot .celebration-shark svg { width: 180px !important; height: 140px !important; }
  .celebration-crown           { width: 90px; top: -6px; left: calc(50% - 45px); }
  .celebration-headline        { font-size: 64px; letter-spacing: -2px; }
  .celebration-subline         { font-size: 18px; margin-top: 2px; }
  .celebration-reward-card     { margin-top: 14px; padding: 12px 16px; gap: 14px; }
  .celebration-reward-icon     { width: 52px; height: 52px; }
  .celebration-reward-icon svg { width: 36px !important; height: 36px !important; }
  .celebration-reward-desc     { font-size: 20px; }
  .celebration-actions         { margin-top: 14px; gap: 10px; }
  .celebration-claim, .celebration-keep { height: 60px; font-size: 18px; }
}
