/* JoyNot — friendly site styles (dashboard, accounts, grown-ups). Games bring their own CSS. */
:root {
  --cream: #fff8ee; --cream2: #fff1dc; --card: #ffffff; --line: #eedfc8;
  --ink: #2b2350; --ink-soft: #6b6390;
  --coral: #ff6b4a; --coral-d: #d94a2b; --sun: #ffc93c; --sun-d: #d99a00;
  --mint: #3dd6a3; --sky: #4ba8ff; --grape: #8b6cff; --pink: #ff6b9d;
  --good: #1f9d6b; --bad: #e0453a;
  --r: 22px;
  --shadow: 0 2px 0 rgba(43, 35, 80, .06), 0 10px 30px -12px rgba(43, 35, 80, .25);
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 8% 12%, rgba(255, 201, 60, .28) 0 120px, transparent 121px),
    radial-gradient(circle at 92% 8%, rgba(75, 168, 255, .18) 0 150px, transparent 151px),
    radial-gradient(circle at 85% 92%, rgba(255, 107, 157, .16) 0 170px, transparent 171px),
    radial-gradient(circle at 4% 88%, rgba(61, 214, 163, .18) 0 130px, transparent 131px);
  background-attachment: fixed;
}
a { color: var(--coral-d); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(30px, 6vw, 46px); }
h2 { font-size: clamp(22px, 4vw, 28px); }
h3 { font-size: 20px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: 44px; }
.brand b { font-family: var(--head); font-weight: 700; font-size: 28px; letter-spacing: .3px; }
.brand b span { color: var(--coral); }
.top-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--coral); --bd: var(--coral-d); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--head); font-weight: 600; font-size: 18px; line-height: 1;
  padding: 14px 22px; border-radius: 16px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--bg); color: var(--fg); box-shadow: 0 5px 0 var(--bd);
  transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bd); }
.btn.sun { --bg: var(--sun); --bd: var(--sun-d); --fg: #3a2600; }
.btn.mint { --bg: var(--mint); --bd: #22a87c; --fg: #08372a; }
.btn.ghost { --bg: #fff; --bd: var(--line); --fg: var(--ink); }
.btn.danger { --bg: var(--bad); --bd: #a52a21; }
.btn.sm { font-size: 15px; padding: 10px 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--bd); }
.btn.sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--bd); }
.btn.block { width: 100%; }
.pill-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; cursor: pointer; font-family: var(--body); }
.pill-link:hover { border-color: var(--sun); }

/* ---------- cards + forms ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; border: 1px solid rgba(43, 35, 80, .05); }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
label.field { display: block; font-weight: 700; margin: 0 0 12px; }
label.field span.hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; margin-top: 6px; border-radius: 12px;
  border: 2px solid var(--line); background: #fffdf9; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(75, 168, 255, .18); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.alert { padding: 12px 16px; border-radius: 14px; margin: 12px 0; font-weight: 600; }
.alert.ok { background: #e3f8ef; color: #0d5c3f; border: 2px solid #a8e9cf; }
.alert.err { background: #fde8e6; color: #8b1f17; border: 2px solid #f6b8b2; }
.err-text { color: var(--bad); font-size: 14px; font-weight: 600; margin-top: 4px; }

/* ---------- auth pages ---------- */
.auth { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 20px 0 40px; }
.auth .card { width: min(440px, 100%); padding: 28px 24px; }
.auth h1 { font-size: 32px; text-align: center; }
.auth .sub { text-align: center; color: var(--ink-soft); margin: -4px 0 18px; }
.auth .links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 15px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; padding: 30px 0 40px; }
.hero h1 { font-size: clamp(36px, 7vw, 60px); }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero p.lead { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-art { position: relative; }
.hero-art .bubble { position: absolute; background: #fff; border-radius: 16px; padding: 8px 12px; font-weight: 800; box-shadow: var(--shadow); font-size: 15px; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 10px 0 40px; }
.feature { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.feature .ic { font-size: 30px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 10px; } }

/* ---------- who's playing ---------- */
.who { text-align: center; padding: 10px 0 40px; }
.who h1 { font-size: clamp(36px, 8vw, 58px); margin-bottom: 4px; }
.who .sub { color: var(--ink-soft); font-size: 19px; margin: 0 0 24px; }
.kids { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 3vw, 28px); }
.kid {
  --c: var(--coral);
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: clamp(130px, 28vw, 180px);
  text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.kid .av {
  width: clamp(110px, 24vw, 150px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font-size: clamp(56px, 12vw, 78px); background: var(--c);
  box-shadow: 0 0 0 6px #fff, 0 8px 0 6px rgba(43, 35, 80, .12), 0 16px 30px -8px rgba(43, 35, 80, .35);
  transition: transform .15s cubic-bezier(.3, 1.6, .5, 1);
}
.kid:hover .av, .kid:focus-visible .av { transform: translateY(-6px) rotate(-4deg) scale(1.04); }
.kid:active .av { transform: scale(.95); }
.kid .nm { font-family: var(--head); font-weight: 600; font-size: clamp(22px, 4.6vw, 28px); overflow-wrap: anywhere; }
.kid.last .nm::after { content: ' ⭐'; }
.who-foot { margin-top: 34px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.empty { max-width: 480px; margin: 10px auto; }
.empty .big { font-size: 64px; }

/* ---------- kid's game cards ---------- */
.hello { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.hello .av { --c: var(--coral); width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 42px; background: var(--c); box-shadow: 0 0 0 4px #fff, var(--shadow); flex: none; }
.hello h1 { margin: 0; font-size: clamp(28px, 6vw, 42px); }
.hello p { margin: 0; color: var(--ink-soft); font-size: 18px; }
.hello .grow { flex: 1; min-width: 200px; }
.games { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); padding-bottom: 40px; }
.game {
  display: flex; flex-direction: column; background: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); transition: transform .15s; border: 3px solid transparent;
}
a.game:hover { transform: translateY(-4px) rotate(-.4deg); }
a.game:active { transform: scale(.98); }
.game .cover { aspect-ratio: 16 / 10; background: #222 center / cover no-repeat; position: relative; }
.game .cover .skills { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.game .cover .skills span { background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.game .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game h3 { font-size: 24px; margin: 0; }
.game p { margin: 0; color: var(--ink-soft); font-size: 15px; flex: 1; }
.game .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.game .chips span { background: var(--cream2); border-radius: 999px; padding: 4px 10px; font-size: 14px; font-weight: 800; }
.game .go { margin-top: 6px; }

/* Rusty's (and any other spooky game) keeps its own look */
.game.spooky { background: radial-gradient(ellipse at 50% 0%, #2a1840 0%, #120b1c 65%); color: #f4efe6; border-color: #3b2a55; }
.game.spooky h3 { font-family: 'Creepster', var(--head); font-weight: 400; letter-spacing: 1.5px; font-size: 32px; color: #ff6a3d; text-shadow: 0 0 14px #ff2a00, 0 3px 0 #400; }
.game.spooky p { color: #c9bedb; }
.game.spooky .chips span { background: #2b2140; color: #ffd84a; }
.game.spooky .btn { --bg: linear-gradient(#ffd84a, #f0a500); --bd: #8a5a00; --fg: #2a1600; background: linear-gradient(#ffd84a, #f0a500); }
.game.spooky:hover { border-color: #ff6a3d; box-shadow: 0 0 0 3px rgba(255, 106, 61, .25), 0 16px 40px -12px rgba(255, 42, 0, .55); }

.game.soon { background: rgba(255, 255, 255, .6); border: 3px dashed #e4d3b8; box-shadow: none; }
.game.soon .cover { display: grid; place-items: center; font-size: 64px; background: repeating-linear-gradient(-45deg, #fff4e2 0 18px, #ffeccd 18px 36px); }
.game.soon .cover::after { content: 'Coming soon'; position: absolute; top: 12px; right: 12px; background: var(--grape); color: #fff; font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.game.soon h3 { color: var(--ink-soft); }

/* ---------- grown-ups ---------- */
.gu-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 14px; margin: 4px 0 18px; }
.gu-bar .gu-title { font-family: var(--head); font-weight: 600; font-size: 18px; }
.gu-bar a, .gu-bar button { color: #fff; }
.gu-bar .pill-link { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.crumbs { font-size: 15px; margin: 0 0 10px; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.kid-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; }
.kid-row + .kid-row { border-top: 2px dashed var(--line); padding-top: 16px; margin-top: 16px; }
.mini-av { --c: var(--coral); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; background: var(--c); flex: none; }
.gprog { display: grid; gap: 8px; margin-top: 6px; }
.gprog .g { background: var(--cream); border-radius: 14px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; text-decoration: none; color: var(--ink); border: 2px solid transparent; }
.gprog .g:hover { border-color: var(--sun); }
.gprog .g b { font-family: var(--head); font-weight: 600; font-size: 17px; width: 100%; }
.gprog .g span { font-size: 14px; }
.gprog .g .off { color: var(--bad); font-weight: 700; }
.row-actions { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 600px) { .kid-row { grid-template-columns: auto 1fr; } .row-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; margin-top: 6px; }
.pick label { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: grid; place-items: center; height: 48px; border-radius: 12px; background: var(--cream); font-size: 28px; border: 3px solid transparent; }
.pick input:checked + span { border-color: var(--ink); background: #fff3c4; }
.pick input:focus-visible + span { box-shadow: 0 0 0 3px var(--sky); }
.pick.colors span { font-size: 0; border-radius: 50%; width: 40px; height: 40px; }
.pick.colors { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.big-num { font-family: var(--head); font-weight: 600; font-size: 40px; }
.meter { height: 12px; background: var(--cream2); border-radius: 8px; overflow: hidden; margin: 8px 0; }
.meter div { height: 100%; background: linear-gradient(90deg, var(--coral), var(--sun)); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--cream2); font-weight: 800; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--ink-soft); }
.ok { color: var(--good); font-weight: 700; } .no { color: var(--bad); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 130px; margin-top: 6px; }
.bars div { flex: 1; text-align: center; font-size: 10px; color: var(--ink-soft); min-width: 0; }
.bars span { display: block; background: var(--sky); border-radius: 4px 4px 0 0; margin-bottom: 3px; }
.settings-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pin-input { font-size: 32px !important; text-align: center; letter-spacing: 10px; font-family: var(--head) !important; }
.lock-art { font-size: 54px; text-align: center; }
.danger-zone { border: 2px solid #f6b8b2; }
details summary { cursor: pointer; font-weight: 700; }
footer.foot { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 20px 0 30px; }

/* ---------- v2: grown-ups tabs + kid page ---------- */
.gu-bar form { margin: 0; }
.gu-tabs { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding: 2px 2px 10px; margin: 0 0 14px; scrollbar-width: thin; }
.gu-tab { --c: var(--sun); flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 800; font-size: 15px; white-space: nowrap; }
.gu-tab .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c); font-size: 21px; }
.gu-tab .ic { width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; }
.gu-tab.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.gu-tab.add { border-style: dashed; }
.game-block { margin-top: 26px; scroll-margin-top: 12px; }
.game-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); margin-bottom: 14px; }
.game-head > div { flex: 1; min-width: 180px; }
.game-head h2 { margin: 0; }
.game-head .thumb { width: 96px; aspect-ratio: 16 / 10; border-radius: 12px; background: #222 center / cover; flex: none; }
.game-head.spooky { background: radial-gradient(ellipse at 30% 0%, #2a1840 0%, #120b1c 70%); color: #f4efe6; }
.game-head.spooky h2 { font-family: 'Creepster', var(--head); font-weight: 400; letter-spacing: 1.5px; color: #ff6a3d; text-shadow: 0 0 12px #ff2a00; }
.game-block > .grid + .grid, .game-block .card + .card { margin-top: 0; }
.game-block > .grid:last-child, .game-block > .card:last-child { margin-top: 16px; }

/* ---------- v2: phones + tablets (iPhone, iPad, Android) ---------- */
body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.top { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
a, button, select, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
select { -webkit-appearance: none; appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
input, select, textarea { font-size: max(16px, 1em); } /* 16px+ stops iPhone from zooming in on tap */
input[type=checkbox] { accent-color: var(--coral); }
@media (max-width: 600px) {
    .card { padding: 16px; border-radius: 18px; }
    .btn { font-size: 17px; padding: 13px 18px; }
    .gu-bar { border-radius: 14px; }
    .game-head .thumb { width: 72px; }
    .game-head .btn { width: 100%; }
    .top-links .pill-link { padding: 7px 11px; font-size: 14px; }
    th, td { padding: 6px; }
}
@media (hover: none) { a.game:hover { transform: none; } .kid:hover .av { transform: none; } }

/* ---------- Sparkle's Rainbow Journey (and any bright "rainbow" game) ---------- */
.game.rainbow { background: linear-gradient(160deg, #fff6fb 0%, #f3e9ff 60%, #e6f6ff 100%); border-color: #ffd1e8; }
.game.rainbow h3 { font-family: var(--head); font-weight: 700; font-size: 28px; background: linear-gradient(90deg, #ff4f6d, #ff9f1c, #e6b800, #2fbf71, #2fb5ff, #8a5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.game.rainbow .chips span { background: #fff; color: #8a5cf6; box-shadow: 0 0 0 2px #ecdcff inset; }
.game.rainbow .btn { --bg: linear-gradient(#ff7ab8, #ff4f9a); --bd: #c2266b; background: linear-gradient(#ff7ab8, #ff4f9a); }
a.game.rainbow:hover { border-color: #ff9ad5; box-shadow: 0 0 0 3px rgba(255, 154, 213, .35), 0 16px 40px -12px rgba(138, 92, 246, .45); }
.game-head.rainbow { background: linear-gradient(120deg, #fff0f7, #f1e6ff, #e3f4ff); }
.game-head.rainbow h2 { color: #d6337a; }

/* ---------- v4: learning mini-games (Clock Shop, Coin Carnival, Code Quest, ...) ---------- */
.game.learn { --g1: #fff6e5; --g2: #e7f4ff; --ga: #ff6b4a; --gd: #c94a2d; background: linear-gradient(160deg, var(--g1) 0%, #fff 55%, var(--g2) 100%); border-color: color-mix(in srgb, var(--ga) 25%, #fff); }
.game.learn h3 { font-family: var(--head); font-weight: 700; font-size: 26px; color: var(--gd); }
.game.learn .chips span { background: #fff; color: var(--gd); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ga) 30%, #fff) inset; }
.game.learn .btn { --bg: var(--ga); --bd: var(--gd); --fg: #fff; }
a.game.learn:hover { border-color: var(--ga); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ga) 25%, transparent), 0 16px 40px -12px color-mix(in srgb, var(--gd) 55%, transparent); }
.game-head.learn { --g1: #fff6e5; --g2: #e7f4ff; --gd: #c94a2d; background: linear-gradient(120deg, var(--g1), #fff, var(--g2)); }
.game-head.learn h2 { color: var(--gd); }
.learn.time    { --g1: #fff2e0; --g2: #e6f2ff; --ga: #e2683c; --gd: #a94822; }
.learn.dash    { --g1: #e9fff0; --g2: #fff0e3; --ga: #2bb36b; --gd: #1d8350; }
.learn.bus     { --g1: #fff7d1; --g2: #e3f0ff; --ga: #f2a20c; --gd: #a86e00; }
.learn.coins   { --g1: #ffeef6; --g2: #e9f7ff; --ga: #ef5aa0; --gd: #b33a74; }
.learn.change  { --g1: #eaf6ff; --g2: #fff0e0; --ga: #3a7bd5; --gd: #2858a0; }
.learn.lemon   { --g1: #fffbd6; --g2: #ffe9ef; --ga: #e5a800; --gd: #9a7000; }
.learn.island  { --g1: #e0fbf6; --g2: #fff3d9; --ga: #14a38b; --gd: #0c7564; }
.learn.science { --g1: #eafbe7; --g2: #d8f1ff; --ga: #2f9e5b; --gd: #1f7442; }
.learn.spark   { --g1: #fff8d9; --g2: #e4ecff; --ga: #f0a400; --gd: #a87000; }
.learn.code    { --g1: #e7fbff; --g2: #eae6ff; --ga: #00a3b8; --gd: #007585; }
.learn.map     { --g1: #e3f7ff; --g2: #fff3d6; --ga: #1c8fc9; --gd: #136a96; }
.learn.history { --g1: #f3eaff; --g2: #ffeede; --ga: #7b4fd6; --gd: #5a33a8; }
.learn.feel    { --g1: #fff0f3; --g2: #fff7da; --ga: #e2557a; --gd: #a93556; }
@supports not (color: color-mix(in srgb, red 50%, white)) {
  .game.learn { border-color: #f1e6d6; }
  .game.learn .chips span { box-shadow: 0 0 0 2px #eee inset; }
}

/* ---------- v5: donate (green ribbon, Grown-ups only) ---------- */
.gu-bar .gu-title { margin-right: auto; }
.gu-bar .gu-lock { order: 1; }
.gu-bar .donate-wrap { order: 2; }
.donate-wrap { display: inline-flex; align-items: center; gap: 6px; }
.donate-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px 9px 12px; border-radius: 999px; background: linear-gradient(180deg, #2fbf71, #1e9e5a); color: #fff !important; border: 0; font: 800 15px/1 var(--body); text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 #13703f, 0 6px 14px rgba(30, 158, 90, .35); transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.donate-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #13703f, 0 8px 18px rgba(30, 158, 90, .45); }
.donate-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #13703f; }
.donate-btn:focus-visible, .donate-why:focus-visible { outline: 3px solid #b8f5d2; outline-offset: 2px; }
.donate-btn .ribbon-ic { flex: none; width: 22px; height: 22px; }
.donate-btn.big { padding: 13px 22px 13px 16px; font-size: 17px; }
.donate-btn.sm { padding: 7px 12px 7px 9px; font-size: 14px; }
.donate-btn.off { background: #b9c4bd; box-shadow: none; cursor: default; }
.gu-bar .donate-btn { animation: donate-glow 2.4s ease-in-out 3; }
@keyframes donate-glow { 50% { box-shadow: 0 3px 0 #13703f, 0 0 0 6px rgba(47, 191, 113, .35); } }
@media (prefers-reduced-motion: reduce) { .gu-bar .donate-btn { animation: none; } }
.donate-why { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; font: 800 16px/1 var(--body); cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.donate-why:hover { background: rgba(255, 255, 255, .25); }
.donate-pop { position: fixed; inset: 0; z-index: 100; background: rgba(20, 24, 40, .55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.donate-pop[hidden] { display: none; }
.donate-pop-card { position: relative; background: #fff; color: var(--ink); border-radius: 22px; max-width: 460px; width: 100%; padding: 26px 22px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); border-top: 6px solid #2fbf71; margin: auto; }
.donate-pop-card h2 { margin: 6px 0 10px; font-size: 24px; }
.donate-pop-card p { margin: 0 0 10px; line-height: 1.5; }
.donate-pop-ic { width: 56px; height: 56px; border-radius: 50%; background: #e3f8ec; color: #1e9e5a; display: grid; place-items: center; }
.donate-pop-ic svg { width: 32px; height: 32px; }
.donate-pop-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.donate-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f1f3f7; color: var(--ink); font-size: 16px; cursor: pointer; }
body.donate-lock { overflow: hidden; }
.donate-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 2px solid #bfeccf; background: linear-gradient(120deg, #f4fff8, #e6f9ee); }
.donate-card .grow { flex: 1; min-width: 220px; }
.donate-card h3 { margin: 0 0 4px; }
.donate-card p { margin: 0; }
.donate-ic { width: 52px; height: 52px; border-radius: 50%; background: #d7f5e3; color: #1e9e5a; display: grid; place-items: center; flex: none; }
.donate-ic svg { width: 30px; height: 30px; }
@media (max-width: 560px) {
    .gu-bar .donate-wrap { order: 1; }
    .gu-bar .gu-lock { order: 2; width: 100%; }
    .gu-bar .gu-lock .pill-link { width: 100%; justify-content: center; }
}
/* voice picker (Account) */
.voice-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.voice-row select { flex: 1; min-width: 200px; }
.learn.bee     { --g1: #fff9d6; --g2: #ffeedd; --ga: #e0a000; --gd: #8f6500; }
.learn.write   { --g1: #eef6ff; --g2: #fff2e6; --ga: #3a7bd5; --gd: #2858a0; }
.learn.space   { --g1: #e8ecff; --g2: #f3e6ff; --ga: #5b5bd6; --gd: #3d3da8; }
.learn.gizmo   { --g1: #fff1e3; --g2: #e9f1ff; --ga: #e06a1b; --gd: #a64a0d; }
.learn.ai      { --g1: #eef0ff; --g2: #e6fbff; --ga: #6a4cff; --gd: #4a2fd1; }
.learn.tech    { --g1: #e6fbf7; --g2: #e9eeff; --ga: #0f9d8a; --gd: #0a6f62; }

/* v6: dark ("night") cards for the dark-theme games: space, AI, tech, Clock Dash, the Lab, Code Quest, Time Tunnel */
.game.learn.night { background: linear-gradient(160deg, #1d2748 0%, #0e1424 60%, color-mix(in srgb, var(--ga) 30%, #0e1424) 100%); border-color: color-mix(in srgb, var(--ga) 45%, #0e1424); color: #e8edf8; }
.game.learn.night h3 { color: #fff; }
.game.learn.night p, .game.learn.night .muted, .game.learn.night small { color: #c4cde3; }
.game.learn.night .chips span { background: #1b2540; color: #ffd67a; box-shadow: 0 0 0 2px color-mix(in srgb, var(--ga) 45%, #1b2540) inset; }
.game-head.learn.night { background: linear-gradient(120deg, #1d2748, #0e1424, color-mix(in srgb, var(--ga) 30%, #0e1424)); color: #e8edf8; }
.game-head.learn.night h2 { color: #fff; }

/* ---------------------------------------------------------------- footer + legal pages */
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
.foot-links a { color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--ink); text-decoration: underline; }
.legal { max-width: 820px; margin: 10px auto 24px; line-height: 1.6; }
.legal h1 { margin: 0 0 4px; }
.legal h2 { font-size: 20px; margin: 26px 0 6px; }
.legal h3 { font-size: 17px; margin: 18px 0 4px; }
.legal p, .legal li { color: var(--ink); font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal .updated { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }
.legal .note { background: #fff7e0; border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.legal address { font-style: normal; line-height: 1.5; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 16px; font-size: 14px; line-height: 1.45; text-align: left; }
.check-row input { width: 20px; height: 20px; flex: none; margin-top: 2px; }
