/* ═══════ HootiniLabs — Celestial Lab (magical design system) ═══════
   Studio Ghibli × Hogwarts × fluid tech. Deep cosmic indigo/violet,
   glowing gold + magic teal + sparky pink, rich gradients, soft glows,
   floating depth. Dark "Midnight Lab" default; light "Enchanted Day" variant. */
:root, :root[data-theme="dark"] {
  --bg: #0e0a1f;
  --bg-deep: #0a0717;
  --surface-lowest: #0b0818;
  --surface-low: #171033;
  --surface-container: #1c1440;     /* card base (glass over this) */
  --surface-high: #271a52;
  --surface-highest: #34246b;
  --on-surface: #f3ecff;
  --on-surface-variant: #cbbcf0;
  --muted: #8e7fbd;
  --outline-variant: #3a2e63;
  --border: rgba(190,160,255,.16);
  --border-strong: rgba(190,160,255,.34);
  --primary: #b79dff;               /* Wizard Violet (glowing) */
  --primary-deep: #7c4dff;
  --on-primary: #1d0a52;
  --primary-container: rgba(150,110,255,.22);
  --on-primary-container: #e3d6ff;
  --gold: #ffd24a;                  /* Glowing Gold */
  --gold-dim: #e9b400;
  --gold-light: #ffe27a;
  --teal: #46e0d0;                  /* Magic Teal */
  --teal-container: rgba(70,224,208,.16);
  --pink: #ff8fd8;                  /* Sparky Pink */
  --error: #ff9a8f;
  --glass: rgba(28,20,64,0.55);
  --glass-border: rgba(190,160,255,.20);
  --glass-border-hover: rgba(190,160,255,.42);
  --glow-violet: 0 0 28px rgba(150,110,255,.45);
  --glow-gold: 0 0 22px rgba(255,210,74,.40);
  --glow-teal: 0 0 22px rgba(70,224,208,.38);
  --r-chip: 12px;
  --r-btn: 9999px;
  --r-card: 22px;
  --shadow-sm: 0 4px 16px rgba(8,4,28,.45);
  --shadow-md: 0 14px 40px rgba(12,6,40,.55);
  --shadow-lg: 0 28px 70px rgba(10,4,36,.6);
  --space: 8px;
  --font: 'Lexend', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
}
:root[data-theme="light"] {
  --bg: #f4eeff;
  --bg-deep: #ece2ff;
  --surface-lowest: #fbf8ff;
  --surface-low: #f3ecff;
  --surface-container: #ffffff;
  --surface-high: #f6f0ff;
  --surface-highest: #ece2ff;
  --on-surface: #281850;
  --on-surface-variant: #5b4a86;
  --muted: #8b7bb0;
  --outline-variant: #ddd0f5;
  --border: rgba(124,77,255,.16);
  --border-strong: rgba(124,77,255,.30);
  --primary: #7c4dff;
  --primary-deep: #6a35f0;
  --on-primary: #ffffff;
  --primary-container: rgba(124,77,255,.12);
  --on-primary-container: #4a2bb0;
  --gold: #d99b12;
  --gold-dim: #b07d0c;
  --gold-light: #f0b53a;
  --teal: #109e92;
  --teal-container: rgba(16,158,146,.12);
  --pink: #e85fb0;
  --error: #d3453c;
  --glass: rgba(255,255,255,0.66);
  --glass-border: rgba(124,77,255,.18);
  --glass-border-hover: rgba(124,77,255,.36);
  --glow-violet: 0 0 24px rgba(124,77,255,.28);
  --glow-gold: 0 0 18px rgba(217,155,18,.28);
  --glow-teal: 0 0 18px rgba(16,158,146,.26);
  --shadow-sm: 0 4px 16px rgba(80,50,160,.10);
  --shadow-md: 0 14px 40px rgba(80,50,160,.14);
  --shadow-lg: 0 28px 70px rgba(80,50,160,.18);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f4eeff; --bg-deep: #ece2ff; --surface-lowest: #fbf8ff; --surface-low: #f3ecff;
    --surface-container: #ffffff; --surface-high: #f6f0ff; --surface-highest: #ece2ff;
    --on-surface: #281850; --on-surface-variant: #5b4a86; --muted: #8b7bb0; --outline-variant: #ddd0f5;
    --border: rgba(124,77,255,.16); --border-strong: rgba(124,77,255,.30);
    --primary: #7c4dff; --primary-deep: #6a35f0; --on-primary: #ffffff; --primary-container: rgba(124,77,255,.12); --on-primary-container: #4a2bb0;
    --gold: #d99b12; --gold-dim: #b07d0c; --gold-light: #f0b53a; --teal: #109e92; --teal-container: rgba(16,158,146,.12); --pink: #e85fb0; --error: #d3453c;
    --glass: rgba(255,255,255,0.66); --glass-border: rgba(124,77,255,.18); --glass-border-hover: rgba(124,77,255,.36);
    --glow-violet: 0 0 24px rgba(124,77,255,.28); --glow-gold: 0 0 18px rgba(217,155,18,.28); --glow-teal: 0 0 18px rgba(16,158,146,.26);
    --shadow-sm: 0 4px 16px rgba(80,50,160,.10); --shadow-md: 0 14px 40px rgba(80,50,160,.14); --shadow-lg: 0 28px 70px rgba(80,50,160,.18);
  }
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { color-scheme: dark light; }
body {
  font-family:var(--font); color:var(--on-surface);
  background:
    radial-gradient(1100px 760px at 18% -10%, rgba(124,77,255,.28), transparent 55%),
    radial-gradient(900px 680px at 100% 8%, rgba(70,224,208,.14), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  overflow:hidden; height:100dvh; font-size:15.5px; line-height:1.6; font-weight:300;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
h1,h2,h3,h4 { font-weight:700; letter-spacing:-.01em; line-height:1.18; }
button { font-family:inherit; cursor:pointer; border:none; }
button:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline:2px solid var(--teal); outline-offset:2px; border-radius:10px;
}
.ico { width:18px; height:18px; flex-shrink:0; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

#aurora-canvas { position:fixed; inset:0; width:100vw; height:100vh; z-index:0; pointer-events:none; }
/* Light mode: hide the dark cosmic shader so the body's light gradient shows — a true light theme */
:root[data-theme="light"] #aurora-canvas { display:none; }

/* gradient "Magic" text */
.magic-text {
  background:linear-gradient(90deg, var(--teal), var(--gold));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}

/* ── screens ── */
.screen {
  position:fixed; inset:0; display:none; flex-direction:column;
  align-items:center; justify-content:center; padding:24px;
  text-align:center; overflow:hidden; z-index:1;
}
.screen.active { display:flex; animation:screenIn .4s cubic-bezier(.22,1,.36,1); }
@keyframes screenIn { from { opacity:0; transform:translateY(10px);} to { opacity:1; transform:translateY(0);} }
.stars { display:none; } /* replaced by aurora shader */

/* ── glass card base ── */
.glass {
  background:var(--glass); backdrop-filter:blur(20px);
  border:1px solid var(--glass-border);
  transition:border-color .3s cubic-bezier(.4,0,.2,1), box-shadow .3s cubic-bezier(.4,0,.2,1);
}

/* ── Hootini ── */
.hootini-wrap { width:176px; height:185px; position:relative; z-index:2; }
.hootini-wrap.small { width:108px; height:113px; }
.hootini-svg { width:100%; height:100%; filter:drop-shadow(0 0 30px rgba(204,190,255,.35)); }
.float { animation:floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-15px)} }
.fly-in { animation:flyIn 1.4s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes flyIn {
  0% { transform:translate(-46vw,26vh) scale(.55); opacity:0; }
  60% { opacity:1; }
  100% { transform:translate(0,0) scale(1); opacity:1; }
}
.wing { transform-origin:center 110px; animation:flap 2.6s ease-in-out infinite; }
@keyframes flap { 0%,100%{transform:rotate(0)} 50%{transform:rotate(-7deg)} }
.wing-r { animation-name:flapR; animation-delay:.1s; }
@keyframes flapR { 0%,100%{transform:rotate(0)} 50%{transform:rotate(7deg)} }
.blink { animation:blink 5.5s infinite; }
@keyframes blink { 0%,94%,100%{height:0} 96%{height:24px} }
.scarf { animation:scarfGlow 4s ease-in-out infinite; }
@keyframes scarfGlow { 0%,100%{filter:drop-shadow(0 0 1px #47d6ff)} 50%{filter:drop-shadow(0 0 6px #47d6ff88)} }
.sparkle-pulse { animation:sparklePulse 2.4s ease-in-out infinite; transform-origin:center; transform-box:fill-box; }
@keyframes sparklePulse { 0%,100%{opacity:.6} 50%{opacity:1} }
.tw { animation:tw 3.2s ease-in-out infinite; }
.tw2{animation-delay:.9s} .tw3{animation-delay:1.7s}
@keyframes tw { 0%,100%{opacity:.12} 50%{opacity:.7} }
.wand-wave { transform-origin:148px 118px; animation:wandWave 3.4s ease-in-out infinite; }
@keyframes wandWave { 0%,100%{transform:rotate(0)} 50%{transform:rotate(7deg)} }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* ── splash ── */
.logo-text { font-size:36px; margin-top:22px; color:#e7deff; }
.tagline { color:var(--on-surface-variant); margin-top:8px; font-size:16px; font-weight:400; }

/* ── onboarding ── */
.ob-slides { position:relative; width:100%; max-width:440px; height:420px; }
.ob-slide { position:absolute; inset:0; display:none; flex-direction:column; align-items:center; justify-content:center; gap:18px; }
.ob-slide.active { display:flex; animation:screenIn .4s ease; }
.ob-slide h2 { font-size:28px; }
.ob-slide p { color:var(--on-surface-variant); font-size:16px; line-height:1.7; max-width:340px; font-weight:300; }
.ob-dots { display:flex; gap:8px; margin:16px 0 28px; }
.dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.14); transition:all .3s; }
.dot.active { background:var(--primary); width:24px; border-radius:5px; }

.btn-primary {
  background:var(--primary); color:var(--on-primary);
  font-size:15px; font-weight:600; padding:15px 44px; border-radius:9999px;
  transition:box-shadow .3s, transform .2s;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn-primary:hover { box-shadow:0 0 15px 4px rgba(204,190,255,.4); transform:translateY(-2px); }
.btn-primary:active { transform:translateY(0); }

/* ── quiz ── */
.quizscreen { justify-content:flex-start; padding-top:max(48px, env(safe-area-inset-top)); }
.quiz-hootini { margin-bottom:12px; }
.quiz-progress { width:100%; max-width:440px; height:8px; background:var(--surface-highest); border-radius:9999px; overflow:hidden; margin-bottom:30px; }
.quiz-progress-fill { height:100%; width:0%; border-radius:9999px; background:linear-gradient(90deg, var(--teal), var(--gold)); transition:width .4s ease; position:relative; }
.quiz-progress-fill::after { content:''; position:absolute; right:0; top:50%; transform:translateY(-50%); width:8px; height:8px; background:#fff; border-radius:50%; box-shadow:0 0 8px #fff; }
.quiz-card { width:100%; max-width:440px; animation:screenIn .35s ease; }
.quiz-card h2 { font-size:24px; margin-bottom:24px; }
.quiz-opt {
  display:flex; align-items:center; gap:14px; width:100%; text-align:left;
  background:var(--glass); backdrop-filter:blur(20px); color:var(--on-surface);
  border:1px solid var(--glass-border);
  padding:16px 18px; border-radius:16px; font-size:15.5px; font-weight:400;
  margin-bottom:12px; transition:border-color .3s, box-shadow .3s; cursor:pointer; min-height:56px;
}
.quiz-opt:hover { border-color:var(--glass-border-hover); box-shadow:0 0 20px rgba(204,190,255,.1); }
.quiz-opt .key {
  width:34px; height:34px; flex-shrink:0; border-radius:10px; display:grid; place-items:center;
  background:rgba(78,49,170,.3); color:var(--primary); font-size:13px; font-weight:700;
}

/* ── path reveal ── */
.reveal-title { font-size:26px; margin:16px 0 8px; }
.reveal-sub { color:var(--on-surface-variant); max-width:360px; margin-bottom:28px; line-height:1.65; font-weight:300; }
.path-nodes { display:flex; flex-direction:column; align-items:center; margin-bottom:32px; }
.path-node {
  display:flex; align-items:center; gap:12px;
  background:var(--glass); backdrop-filter:blur(20px);
  border:1px solid var(--glass-border); padding:14px 24px; border-radius:9999px;
  font-weight:500; font-size:15px; min-width:300px; text-align:left;
}
.path-node span { background:var(--surface-high); color:var(--muted); width:28px; height:28px; flex-shrink:0; border-radius:50%; display:grid; place-items:center; font-size:13px; font-weight:700; }
.path-node.glow { border-color:rgba(204,190,255,.45); box-shadow:0 0 20px rgba(204,190,255,.12); }
.path-node.glow span { background:var(--primary); color:var(--on-primary); }
.path-line { width:2px; height:18px; background:linear-gradient(var(--primary), transparent); opacity:.5; }

/* ── main app ── */
.mainapp { justify-content:flex-start; padding:0; }
#main-content { width:100%; max-width:520px; margin:0 auto; flex:1; overflow-y:auto; padding:max(24px, env(safe-area-inset-top)) 22px 120px; text-align:left; }
.bottom-nav {
  position:fixed; bottom:0; left:0; right:0;
  display:flex; justify-content:space-around; align-items:center;
  background:rgba(15,13,20,.6); backdrop-filter:blur(24px); border-top:1px solid rgba(255,255,255,.1);
  box-shadow:0 -8px 32px rgba(0,0,0,.5);
  padding:10px 16px calc(10px + env(safe-area-inset-bottom)); z-index:50;
}
.nav-btn { background:none; color:rgba(202,196,213,.8); font-size:11px; font-weight:600; display:flex; flex-direction:column; align-items:center; gap:3px; padding:7px 20px; border-radius:9999px; transition:all .3s; min-width:64px; min-height:52px; }
.nav-btn svg { width:22px; height:22px; }
.nav-btn.active { color:var(--on-primary); background:var(--primary); box-shadow:0 4px 16px rgba(204,190,255,.3); }

/* realm labels */
.realm-label {
  font-size:11px; font-weight:700; letter-spacing:.18em; text-transform:uppercase;
  background:linear-gradient(90deg, var(--teal), var(--gold), var(--teal));
  background-size:200% auto; -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:realmShimmer 6s linear infinite; margin-bottom:3px;
}
@keyframes realmShimmer { to { background-position:200% center; } }

/* dashboard */
.greet-row { display:flex; align-items:center; gap:16px; margin-bottom:22px; }
.greet-row .hootini-wrap { width:64px; height:67px; flex-shrink:0; }
.greet-row h2 { font-size:22px; }
.greet-row p { color:var(--muted); font-size:14px; font-weight:300; margin-top:2px; }
.stat-row { display:flex; gap:10px; margin-bottom:20px; }
.stat-card {
  flex:1; background:var(--glass); backdrop-filter:blur(20px);
  border:1px solid var(--glass-border); border-radius:16px;
  padding:14px 8px; text-align:center;
}
.stat-card .s-ico { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; margin:0 auto 8px; }
.stat-card .s-ico svg { width:16px; height:16px; }
.stat-card .s-ico.flame { background:rgba(255,219,60,.12); color:var(--gold); }
.stat-card .s-ico.bolt { background:rgba(78,49,170,.35); color:var(--primary); }
.stat-card .s-ico.medal { background:rgba(71,214,255,.12); color:var(--teal); }
.stat-card .big { font-size:20px; font-weight:700; }
.stat-card .lbl { font-size:10px; color:var(--muted); font-weight:600; letter-spacing:.08em; margin-top:1px; }
.xpbar { background:var(--surface-highest); height:8px; border-radius:9999px; overflow:hidden; margin:2px 0 24px; }
.xpbar-fill { height:100%; width:var(--fill, 0%); background:linear-gradient(90deg, var(--teal), var(--gold)); border-radius:9999px; transition:width .8s cubic-bezier(.22,1,.36,1); position:relative; }
.xpbar-fill::after { content:''; position:absolute; right:0; top:50%; transform:translateY(-50%); width:8px; height:8px; background:#fff; border-radius:50%; box-shadow:0 0 8px #fff; }
.section-title { font-size:12px; font-weight:700; color:var(--on-surface-variant); letter-spacing:.14em; text-transform:uppercase; margin:22px 0 12px; }

.quest-card {
  background:var(--glass); backdrop-filter:blur(20px);
  border:1px solid var(--glass-border);
  border-radius:var(--r-card); padding:16px 18px; margin-bottom:12px; cursor:pointer;
  transition:border-color .3s, box-shadow .3s;
  position:relative; display:flex; align-items:center; gap:14px; min-height:72px;
}
.quest-card:hover { border-color:var(--glass-border-hover); box-shadow:0 0 20px rgba(204,190,255,.1); }
.quest-card.done { opacity:.55; }
.quest-card .qtag {
  width:44px; height:44px; flex-shrink:0; border-radius:14px; display:grid; place-items:center;
  background:rgba(78,49,170,.3);
  color:var(--primary); font-weight:700; font-size:13px; border:1px solid rgba(204,190,255,.2);
}
.quest-card h3 { font-size:15.5px; font-weight:600; margin-bottom:3px; }
.quest-card .meta { font-size:13px; color:var(--muted); font-weight:300; display:flex; align-items:center; gap:5px; }
.quest-card .meta svg { width:13px; height:13px; }
.quest-card .mark { margin-left:auto; flex-shrink:0; display:flex; align-items:center; gap:5px; font-weight:600; font-size:12px; padding:5px 12px; border-radius:9999px; }
.quest-card .mark svg { width:13px; height:13px; }
.quest-card .mark.ok { color:var(--teal); background:rgba(71,214,255,.15); border:1px solid rgba(71,214,255,.4); }
.quest-card .mark.lock { color:var(--muted); background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); }
.quest-card.locked { opacity:.6; }

/* hero quest (Enchanted) */
.hero-quest {
  background:var(--glass); backdrop-filter:blur(20px);
  border:1px solid rgba(204,190,255,.3);
  overflow:hidden;
}
.hero-quest::before {
  content:''; position:absolute; top:-80px; right:-80px; width:240px; height:240px;
  background:rgba(204,190,255,.1); border-radius:50%; filter:blur(60px); pointer-events:none;
}
.hero-quest::after {
  content:''; position:absolute; top:0; left:-60%; width:50%; height:100%;
  background:linear-gradient(105deg, transparent, rgba(255,219,60,.06), transparent);
  animation:enchantSweep 5s ease-in-out infinite;
}
@keyframes enchantSweep { 0%, 60% { left:-60%; } 100% { left:120%; } }
.hero-quest:hover { border-color:rgba(204,190,255,.5); box-shadow:0 0 24px rgba(204,190,255,.15); }

/* layout & sizing utilities */
.center-block { text-align:center; }
.hootini-center { margin:0 auto; }
.hootini-xs { width:60px; height:63px; }
.lq-question { font-weight:700; font-size:18px; }
.swatch-default { background:#3d3568; }
.swatch-ice { background:#2a6f9d; }
.swatch-fire { background:#b85c38; }
.swatch-galaxy { background:#1a1530; }
.outfit .ico { width:11px; height:11px; }

/* glass utility */
.glass-card {
  background:var(--glass); backdrop-filter:blur(20px);
  border:1px solid var(--glass-border);
}

/* ── The Great Library: orb path ── */
.lib-rank {
  display:flex; align-items:center; justify-content:space-between;
  border-radius:16px; padding:14px 18px; margin-bottom:26px;
}
.lib-rank-name { font-size:15px; font-weight:700; color:var(--primary); }
.lib-rank-xp { font-size:12.5px; color:var(--muted); font-weight:300; }
.lib-rank-ico { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:rgba(78,49,170,.35); color:var(--primary); }
.lib-rank-ico svg { width:17px; height:17px; }

.orb-path { display:flex; flex-direction:column; align-items:center; padding-bottom:20px; }
.orb-node { position:relative; display:flex; flex-direction:column; align-items:center; width:100%; padding-bottom:34px; }
.orb-node:last-child { padding-bottom:0; }
.orb-node:last-child .orb-line { display:none; }
.orb-line {
  position:absolute; top:76px; bottom:-6px; width:2px;
  background:linear-gradient(rgba(204,190,255,.5), rgba(204,190,255,.08));
}
.orb-node.done .orb-line { background:linear-gradient(rgba(71,214,255,.6), rgba(71,214,255,.15)); }
.orb {
  width:76px; height:76px; border-radius:50%; display:grid; place-items:center; z-index:1;
  background:radial-gradient(circle at 35% 30%, rgba(204,190,255,.25), rgba(20,18,26,.9) 70%);
  border:2px solid rgba(204,190,255,.35); margin-bottom:14px;
  box-shadow:0 0 24px rgba(204,190,255,.18);
}
.orb-num { font-size:17px; font-weight:700; color:var(--primary); }
.orb-ico { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.orb-node.current .orb {
  border-color:var(--gold);
  box-shadow:0 0 28px rgba(255,219,60,.35);
  animation:orbPulse 2.6s ease-in-out infinite;
}
@keyframes orbPulse { 0%,100%{box-shadow:0 0 18px rgba(255,219,60,.25)} 50%{box-shadow:0 0 34px rgba(255,219,60,.45)} }
.orb-node.current .orb-num { color:var(--gold); }
.orb-node.done .orb { border-color:rgba(71,214,255,.55); box-shadow:0 0 20px rgba(71,214,255,.2); color:var(--teal); }
.orb-node.locked .orb {
  background:radial-gradient(circle at 35% 30%, rgba(255,255,255,.06), rgba(15,13,20,.95) 70%);
  border-color:rgba(255,255,255,.12); box-shadow:none; color:var(--muted);
}
.orb-node.locked .orb-card { opacity:.55; }
.orb-card {
  width:100%; max-width:400px; border-radius:var(--r-card); padding:20px 22px;
  background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border);
  text-align:center; cursor:pointer; transition:border-color .3s, box-shadow .3s;
  display:flex; flex-direction:column; align-items:center; gap:9px; z-index:1;
}
.orb-card:hover { border-color:var(--glass-border-hover); box-shadow:0 0 20px rgba(204,190,255,.1); }
.orb-card h3 { font-size:17px; font-weight:700; }
.orb-card p { font-size:13.5px; color:var(--on-surface-variant); font-weight:300; line-height:1.6; max-width:320px; }
.orb-btn { padding:11px 34px; font-size:14px; margin-top:4px; }
.orb-locked-note { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:12.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; margin-top:4px; }
.orb-locked-note svg { width:13px; height:13px; }

/* ── AI Coach: Tip of the Day ── */
.coach-row { display:flex; flex-direction:column; align-items:center; gap:22px; margin:34px 0 10px; }
.coach-avatar { position:relative; width:128px; height:128px; flex-shrink:0; }
.coach-avatar img {
  position:relative; z-index:1; width:100%; height:100%; object-fit:cover; border-radius:50%;
  border:1px solid rgba(255,255,255,.15); padding:6px; background:rgba(32,30,38,.5); backdrop-filter:blur(12px);
}
.coach-glow { position:absolute; inset:-14px; border-radius:50%; background:rgba(204,190,255,.22); filter:blur(28px); animation:coachPulse 3.5s ease-in-out infinite; }
@keyframes coachPulse { 0%,100%{opacity:.55} 50%{opacity:1} }
.speech-bubble {
  position:relative; width:100%; border-radius:var(--r-card); padding:22px;
  border-color:rgba(204,190,255,.3) !important;
  box-shadow:0 20px 50px rgba(0,0,0,.3); text-align:left;
}
.speech-bubble::after {
  content:''; position:absolute; left:50%; top:-12px; transform:translateX(-50%);
  border-width:0 6px 12px 6px; border-style:solid;
  border-color:transparent transparent rgba(32,30,38,.8) transparent;
}
.tip-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.tip-title { font-size:13px; font-weight:700; color:var(--primary); }
.tip-text { font-size:16.5px; font-weight:500; line-height:1.6; color:var(--on-surface); margin-bottom:16px; }
.tip-actions { display:flex; gap:10px; }
.tip-btn { padding:11px 22px; border-radius:9999px; font-size:13.5px; font-weight:600; transition:background .3s, box-shadow .3s; min-height:44px; }
.tip-btn.ghost { background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); color:var(--on-surface); }
.tip-btn.ghost:hover { background:rgba(255,255,255,.1); }
.tip-btn.solid { background:var(--primary); color:var(--on-primary); box-shadow:0 4px 16px rgba(204,190,255,.2); }
.tip-btn.solid:hover { box-shadow:0 0 15px 4px rgba(204,190,255,.4); }

/* ── Spell Arcade ── */
.arcade-row { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:12px; }
.arcade-card {
  background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border);
  border-radius:16px; padding:16px 10px; text-align:center; cursor:pointer;
  transition:border-color .3s, box-shadow .3s, transform .2s; min-height:120px;
  display:flex; flex-direction:column; align-items:center; gap:6px;
}
.arcade-card:hover { border-color:var(--glass-border-hover); box-shadow:0 0 20px rgba(204,190,255,.12); transform:translateY(-2px); }
.arcade-card h3 { font-size:13px; font-weight:700; line-height:1.3; }
.arcade-card p { font-size:11px; color:var(--muted); font-weight:300; line-height:1.4; }
.arcade-ico { width:38px; height:38px; border-radius:12px; display:grid; place-items:center; margin-bottom:2px; }
.arcade-ico svg { width:17px; height:17px; }
.arcade-ico.teal { background:rgba(71,214,255,.12); color:var(--teal); }
.arcade-ico.gold { background:rgba(255,219,60,.12); color:var(--gold); }
.arcade-ico.violet { background:rgba(78,49,170,.35); color:var(--primary); }

/* game screen */
.gamescreen { justify-content:flex-start; padding:0; }
.game-hud { display:flex; gap:8px; flex:1; justify-content:center; }
.hud-pill { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:9999px; padding:6px 14px; font-size:12.5px; font-weight:700; color:var(--on-surface-variant); }
.hud-pill.gold { color:var(--gold); border-color:rgba(255,219,60,.35); background:rgba(255,219,60,.08); }
.hud-pill.teal { color:var(--teal); border-color:rgba(71,214,255,.35); background:rgba(71,214,255,.08); }
.game-body { width:100%; max-width:520px; margin:0 auto; flex:1; overflow-y:auto; padding:18px 24px 48px; text-align:center; z-index:2; }
.game-title { margin-bottom:20px; display:flex; flex-direction:column; align-items:center; gap:10px; }
.game-title h2 { font-size:23px; }
.game-title .dim { color:var(--muted); font-size:14px; font-weight:300; max-width:340px; }

/* Real or Robot */
.myth-card { border-radius:var(--r-card); padding:30px 24px; margin-bottom:14px; min-height:120px; display:grid; place-items:center; }
.myth-card p { font-size:18px; font-weight:500; line-height:1.6; }
.myth-feedback { min-height:64px; margin-bottom:10px; }
.myth-note { border-radius:14px; padding:12px 16px; font-size:13.5px; font-weight:400; animation:screenIn .25s ease; }
.myth-note.good { background:rgba(71,214,255,.12); border:1px solid rgba(71,214,255,.4); color:var(--teal); }
.myth-note.bad { background:rgba(255,180,171,.1); border:1px solid rgba(255,180,171,.4); color:var(--error); }
.myth-actions { display:flex; gap:12px; }
.myth-btn { flex:1; padding:18px; border-radius:18px; font-size:16px; font-weight:700; transition:box-shadow .2s, transform .15s; min-height:60px; }
.myth-btn:disabled { opacity:.55; cursor:default; }
.myth-btn.fact { background:rgba(71,214,255,.15); border:1px solid rgba(71,214,255,.5); color:var(--teal); }
.myth-btn.fact:hover:not(:disabled) { box-shadow:0 0 16px rgba(71,214,255,.3); }
.myth-btn.myth { background:rgba(255,138,212,.12); border:1px solid rgba(255,138,212,.5); color:var(--pink); }
.myth-btn.myth:hover:not(:disabled) { box-shadow:0 0 16px rgba(255,138,212,.3); }

/* Prompt Potion */
.potion-flask {
  border-radius:var(--r-card); min-height:120px; padding:18px; margin-bottom:18px;
  display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center;
  border-color:rgba(255,219,60,.3) !important;
}
.potion-empty { color:var(--muted); font-style:italic; font-weight:300; font-size:14px; }
.potion-drop { padding:7px 14px; border-radius:9999px; font-size:13px; font-weight:600; animation:screenIn .3s ease; }
.potion-drop.good { background:rgba(71,214,255,.15); border:1px solid rgba(71,214,255,.5); color:var(--teal); }
.potion-drop.bad { background:rgba(255,180,171,.12); border:1px solid rgba(255,180,171,.5); color:var(--error); }
.potion-opts { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.potion-opt {
  background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border);
  border-radius:14px; padding:14px 12px; color:var(--on-surface); font-size:13.5px; font-weight:500;
  transition:border-color .3s, box-shadow .3s; min-height:52px;
}
.potion-opt:hover:not([disabled]) { border-color:var(--glass-border-hover); box-shadow:0 0 14px rgba(204,190,255,.12); }
.potion-opt[disabled] { opacity:.3; cursor:default; }

/* Memory Runes */
.rune-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.rune {
  position:relative; min-height:84px; border-radius:16px; background:none;
  perspective:600px; padding:0;
}
.rune-face {
  position:absolute; inset:0; display:grid; place-items:center; padding:10px 12px;
  border-radius:16px; backface-visibility:hidden;
  transition:transform .45s cubic-bezier(.4,0,.2,1);
  font-size:13px; font-weight:500; line-height:1.45;
}
.rune-back {
  background:radial-gradient(circle at 35% 30%, rgba(204,190,255,.2), rgba(20,18,26,.92) 75%);
  border:1px solid rgba(204,190,255,.3); color:var(--primary); font-size:22px;
  transform:rotateY(0);
}
.rune-front {
  background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border);
  color:var(--on-surface); transform:rotateY(180deg);
}
.rune-front.term { border-color:rgba(255,219,60,.4); color:var(--gold-light); font-weight:700; }
.rune.flipped .rune-back, .rune.matched .rune-back { transform:rotateY(-180deg); }
.rune.flipped .rune-front, .rune.matched .rune-front { transform:rotateY(0); }
.rune.matched .rune-front { border-color:rgba(71,214,255,.55); box-shadow:0 0 14px rgba(71,214,255,.25); opacity:.75; }
.rune:hover:not(.matched) .rune-back { border-color:rgba(204,190,255,.5); }

/* chips */
.chip {
  display:inline-flex; align-items:center; gap:6px; padding:4px 12px;
  background:rgba(71,214,255,.15); border:1px solid rgba(71,214,255,.4);
  border-radius:9999px; color:var(--teal); font-size:11px; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase;
}

/* name capture */
.name-input {
  width:100%; max-width:340px; background:#131322; border:1px solid var(--outline-variant);
  border-radius:var(--r-btn); padding:16px 18px; color:var(--on-surface); font-family:inherit;
  font-size:17px; font-weight:400; text-align:center; outline:none; margin-bottom:22px;
  transition:border-color .3s, box-shadow .3s;
}
.name-input:focus { border-color:var(--teal); box-shadow:0 0 12px rgba(71,214,255,.25); }
.name-input::placeholder { color:var(--muted); font-weight:300; }

/* daily challenges */
.daily-card { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:var(--r-card); padding:6px 18px; margin-bottom:12px; }
.daily-row { display:flex; align-items:center; gap:13px; padding:13px 0; border-bottom:1px solid rgba(255,255,255,.05); font-size:14.5px; font-weight:400; }
.daily-row:last-child { border-bottom:none; }
.daily-check {
  width:24px; height:24px; flex-shrink:0; border-radius:50%; display:grid; place-items:center;
  border:1.5px solid var(--outline-variant); color:var(--teal); transition:all .3s;
}
.daily-check svg { width:13px; height:13px; }
.daily-row.done .daily-check { border-color:var(--teal); background:rgba(71,214,255,.15); box-shadow:0 0 8px rgba(71,214,255,.3); }
.daily-row.done .daily-label { color:var(--muted); }
.daily-label { flex:1; }
.daily-xp { color:var(--gold); font-size:12px; font-weight:700; background:rgba(255,219,60,.1); border:1px solid rgba(255,219,60,.3); padding:3px 10px; border-radius:9999px; }
.daily-row.done .daily-xp { color:var(--teal); background:rgba(71,214,255,.12); border-color:rgba(71,214,255,.35); }

/* leaderboard */
.lb-card { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:var(--r-card); padding:6px 18px 12px; margin-bottom:12px; }
.lb-row { display:flex; align-items:center; gap:13px; padding:11px 0; border-bottom:1px solid rgba(255,255,255,.05); font-size:14.5px; font-weight:400; }
.lb-row.me { margin:0 -12px; padding-left:12px; padding-right:12px; background:rgba(78,49,170,.25); border-radius:14px; border-bottom:none; font-weight:600; }
.lb-rank { width:26px; height:26px; flex-shrink:0; display:grid; place-items:center; color:var(--muted); font-weight:700; font-size:12.5px; background:rgba(255,255,255,.05); border-radius:8px; }
.lb-row:nth-child(1) .lb-rank { background:rgba(255,219,60,.15); color:var(--gold); }
.lb-row.me .lb-rank { background:var(--primary); color:var(--on-primary); }
.lb-name { flex:1; }
.lb-xp { font-size:12.5px; color:var(--muted); font-weight:600; }
.lb-row.me .lb-xp { color:var(--primary); }
.lb-foot { text-align:center; font-size:11.5px; color:var(--muted); padding-top:10px; font-weight:300; }

/* certificate */
.cert-card {
  display:flex; align-items:center; gap:14px;
  background:var(--glass); backdrop-filter:blur(20px);
  border:1px solid rgba(255,219,60,.4); border-radius:var(--r-card); padding:16px 18px; margin-bottom:12px;
  box-shadow:0 0 16px rgba(255,219,60,.08);
}
.cert-card h3 { font-size:15px; font-weight:600; margin-bottom:2px; }
.cert-card .meta { font-size:13px; color:var(--muted); }
.cert-seal {
  width:44px; height:44px; flex-shrink:0; border-radius:50%; display:grid; place-items:center;
  background:linear-gradient(135deg, var(--gold), var(--gold-dim)); color:#3a3000;
}
.cert-seal svg { width:20px; height:20px; }

/* tutor — AI Coach bubble has Sparky Pink border per design system */
.chat-wrap { display:flex; flex-direction:column; height:calc(100dvh - 210px); }
.chat-log { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:12px; padding-bottom:12px; }
.msg { max-width:84%; padding:13px 17px; border-radius:18px; font-size:15px; line-height:1.6; animation:screenIn .25s ease; text-align:left; font-weight:300; }
.msg.user { align-self:flex-end; background:var(--primary-container); color:#e7deff; border-bottom-right-radius:6px; }
.msg.hootini { align-self:flex-start; background:rgba(32,30,38,.8); backdrop-filter:blur(12px); border:1px solid rgba(255,138,212,.35); border-bottom-left-radius:6px; }
.chat-input-row { display:flex; gap:10px; padding-top:12px; }
.chat-input-row input {
  flex:1; background:#131322; border:1px solid var(--outline-variant); border-radius:9999px;
  padding:14px 20px; color:var(--on-surface); font-family:inherit; font-size:15px; outline:none; transition:border-color .3s, box-shadow .3s;
}
.chat-input-row input:focus { border-color:var(--teal); box-shadow:0 0 12px rgba(71,214,255,.25); }
.chat-input-row input::placeholder { color:var(--muted); }
.chat-send {
  background:var(--primary); color:var(--on-primary);
  border-radius:50%; width:50px; height:50px; flex-shrink:0; display:grid; place-items:center;
  transition:box-shadow .3s;
}
.chat-send svg { width:18px; height:18px; }
.chat-send:hover { box-shadow:0 0 15px 4px rgba(204,190,255,.4); }

/* profile */
.profile-head { text-align:center; margin-bottom:22px; }
.level-chip {
  display:inline-flex; align-items:center; gap:6px; background:rgba(71,214,255,.15);
  border:1px solid rgba(71,214,255,.4); padding:6px 16px; border-radius:9999px;
  font-weight:600; font-size:13px; margin-top:10px; color:var(--teal);
}
.badge-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.badge-cell { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:16px; padding:16px 8px; text-align:center; }
.badge-cell .bi {
  width:42px; height:42px; margin:0 auto 8px; border-radius:50%; display:grid; place-items:center;
  background:var(--surface-high); color:var(--muted); font-weight:700; font-size:14px;
}
.badge-cell .bn { font-size:12px; font-weight:400; color:var(--muted); }
.badge-cell.locked { opacity:.4; }
.badge-cell.earned { border-color:rgba(204,190,255,.4); box-shadow:0 0 12px rgba(204,190,255,.1); }
.badge-cell.earned .bi { background:var(--primary); color:var(--on-primary); }
.badge-cell.earned .bn { color:var(--on-surface); }
.outfit-row { display:flex; gap:10px; overflow-x:auto; padding-bottom:6px; }
.outfit { flex-shrink:0; width:94px; background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:16px; padding:14px 6px; text-align:center; cursor:pointer; font-size:12px; font-weight:500; color:var(--muted); transition:border-color .3s; min-height:80px; }
.outfit:hover { border-color:var(--glass-border-hover); }
.outfit .swatch { width:32px; height:32px; border-radius:50%; margin:0 auto 8px; border:2px solid rgba(255,255,255,.15); }
.outfit.equipped { border-color:var(--teal); color:var(--on-surface); box-shadow:0 0 12px rgba(71,214,255,.2); }
.outfit.locked { opacity:.45; }

/* ── lesson ── */
.lessonscreen { justify-content:flex-start; padding:0; }
.lesson-header { width:100%; max-width:520px; margin:0 auto; display:flex; align-items:center; gap:14px; padding:max(20px, env(safe-area-inset-top)) 22px 10px; z-index:2; }
.back-btn { background:var(--glass); backdrop-filter:blur(20px); color:var(--on-surface); width:42px; height:42px; border-radius:50%; font-size:18px; border:1px solid var(--glass-border); transition:border-color .3s; }
.back-btn:hover { border-color:var(--glass-border-hover); }
.step-dots { display:flex; gap:6px; flex:1; justify-content:center; }
.step-dot { width:26px; height:5px; border-radius:9999px; background:rgba(255,255,255,.1); transition:background .3s; }
.step-dot.done { background:var(--gold); box-shadow:0 0 6px rgba(255,219,60,.4); }
.step-dot.current { background:var(--teal); box-shadow:0 0 6px rgba(71,214,255,.4); }
.lesson-body { width:100%; max-width:520px; margin:0 auto; flex:1; overflow-y:auto; padding:18px 24px 48px; text-align:left; z-index:2; }
.lesson-body h2 { font-size:24px; margin-bottom:16px; }
.lesson-body p { font-size:16px; line-height:1.75; color:var(--on-surface-variant); margin-bottom:14px; font-weight:300; }
.lesson-body .dim { color:var(--muted); font-size:14px; font-weight:400; }
.hootini-says {
  display:flex; gap:14px; background:rgba(32,30,38,.8); backdrop-filter:blur(12px);
  border:1px solid rgba(255,138,212,.4);
  border-radius:16px; padding:16px; margin:18px 0; align-items:flex-start; text-align:left;
}
.hootini-says .hs-avatar { width:38px; height:40px; flex-shrink:0; }
.hootini-says .hs-avatar svg { width:100%; height:100%; }
.hootini-says div p { margin:0; font-size:14.5px; line-height:1.65; color:var(--on-surface-variant); }
.hootini-says .hs-name { font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--pink); margin-bottom:4px; }
.example-card { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:16px; padding:15px 16px; margin-bottom:10px; display:flex; gap:14px; align-items:flex-start; text-align:left; }
.example-card .ei {
  flex-shrink:0; padding:5px 11px; border-radius:9999px; background:rgba(71,214,255,.15);
  border:1px solid rgba(71,214,255,.4);
  color:var(--teal); font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; margin-top:2px;
}
.example-card b { display:block; margin-bottom:3px; font-size:15px; font-weight:600; }
.example-card small { color:var(--muted); font-size:13.5px; line-height:1.55; display:block; font-weight:300; }
.lesson-cta { margin-top:26px; width:100%; }
.lq-opt { display:block; width:100%; text-align:left; background:var(--glass); backdrop-filter:blur(20px); color:var(--on-surface); border:1px solid var(--glass-border); padding:16px 18px; border-radius:16px; font-size:15px; font-weight:400; margin-bottom:10px; transition:border-color .3s, box-shadow .3s; min-height:54px; }
.lq-opt:hover { border-color:var(--glass-border-hover); box-shadow:0 0 16px rgba(204,190,255,.1); }
.lq-opt.correct { border-color:var(--teal); background:rgba(71,214,255,.12); box-shadow:0 0 12px rgba(71,214,255,.25); }
.lq-opt.wrong { border-color:var(--error); background:rgba(255,180,171,.1); animation:shake .35s ease; }
@keyframes shake { 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.try-link { display:inline-flex; align-items:center; gap:7px; background:rgba(71,214,255,.1); border:1px solid rgba(71,214,255,.45); border-radius:9999px; padding:12px 22px; color:var(--teal); font-weight:600; font-size:14px; text-decoration:none; margin:0 8px 12px 0; transition:box-shadow .3s; min-height:44px; }
.try-link:hover { box-shadow:0 0 12px rgba(71,214,255,.3); }
.try-link svg { width:14px; height:14px; }
.prompt-box {
  background:#131322; border:1px solid var(--outline-variant); border-radius:16px;
  padding:16px 18px; margin-bottom:16px; font-size:15px; line-height:1.65;
  color:var(--on-surface); text-align:left; font-weight:400;
  border-left:3px solid var(--gold);
}

/* ── paywall (Secret Vault) ── */
.close-x { position:absolute; top:max(20px, env(safe-area-inset-top)); right:20px; background:rgba(255,255,255,.07); backdrop-filter:blur(12px); color:var(--on-surface); width:40px; height:40px; border-radius:50%; font-size:14px; z-index:5; transition:background .3s; border:1px solid rgba(255,255,255,.1); }
.close-x:hover { background:rgba(255,255,255,.14); }
.paywall { overflow-y:auto; justify-content:flex-start; padding-top:max(56px, env(safe-area-inset-top)); }
.pw-mascot { position:relative; width:140px; margin-bottom:8px; }
.pw-mascot-img { width:100%; border-radius:28px; border:1px solid var(--glass-border); box-shadow:0 0 40px rgba(204,190,255,.25); }
.pw-premium-tag {
  position:absolute; bottom:-10px; left:50%; transform:translateX(-50%);
  background:linear-gradient(135deg, var(--gold), var(--gold-dim)); color:#3a3000;
  font-size:10px; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
  padding:4px 14px; border-radius:9999px; white-space:nowrap;
}
.paywall h2 { font-size:26px; margin:18px 0 8px; }
.pw-sub { color:var(--on-surface-variant); max-width:340px; margin-bottom:18px; line-height:1.65; font-weight:300; font-size:14.5px; }
.pw-benefits { list-style:none; text-align:left; margin-bottom:20px; display:flex; flex-direction:column; gap:8px; }
.pw-benefits li { display:flex; align-items:center; gap:10px; font-size:14.5px; font-weight:400; }
.pw-benefits li::before {
  content:''; width:20px; height:20px; flex-shrink:0; border-radius:50%;
  background:rgba(71,214,255,.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2347d6ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
  border:1px solid rgba(71,214,255,.4);
}
.pw-plans { display:flex; flex-direction:column; gap:14px; width:100%; max-width:380px; margin-bottom:18px; }
.pw-plan { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:var(--r-card); padding:18px 20px; cursor:pointer; position:relative; transition:border-color .3s, box-shadow .3s; text-align:left; }
.pw-plan:hover { border-color:var(--glass-border-hover); box-shadow:0 0 16px rgba(204,190,255,.12); }
.pw-plan h3 { font-size:15px; font-weight:600; }
.pw-price { font-size:26px; font-weight:700; margin-top:2px; }
.pw-price span { font-size:13px; color:var(--muted); font-weight:400; }
.pw-note { font-size:12.5px; color:var(--muted); font-weight:300; margin-top:4px; }
.pw-plan.best { border-color:rgba(255,219,60,.5); box-shadow:0 0 20px rgba(255,219,60,.12); }
.pw-plan.best .pw-price { color:var(--gold); }
.best-badge { position:absolute; top:-11px; right:18px; background:linear-gradient(135deg, var(--gold), var(--gold-dim)); color:#3a3000; font-size:10px; font-weight:800; padding:4px 14px; border-radius:9999px; letter-spacing:.1em; text-transform:uppercase; }
.pw-save { display:inline-flex; align-items:center; gap:6px; color:var(--teal); font-weight:600; font-size:12.5px; margin-top:6px; background:rgba(71,214,255,.12); border:1px solid rgba(71,214,255,.35); padding:3px 10px; border-radius:9999px; }
.pw-cta { width:100%; max-width:380px; background:linear-gradient(90deg, var(--primary), #beaeff); margin-bottom:14px; }
.pw-proof { color:var(--muted); font-size:11.5px; font-weight:300; letter-spacing:.06em; text-transform:uppercase; margin-bottom:24px; }

/* ── celebrate ── */
.celebrate { position:fixed; inset:0; z-index:100; background:rgba(20,18,26,.9); backdrop-filter:blur(12px); display:flex; align-items:center; justify-content:center; }
.celebrate.hidden { display:none; }
.celebrate-inner { text-align:center; display:flex; flex-direction:column; align-items:center; gap:16px; z-index:2; padding:24px; }
.celebrate-inner h2 { font-size:28px; }
.xp-pop {
  font-size:15px; font-weight:700; color:var(--gold); background:rgba(255,219,60,.1);
  border:1px solid rgba(255,219,60,.4); padding:8px 22px; border-radius:9999px;
  animation:xpRise .9s ease forwards; box-shadow:0 0 12px rgba(255,219,60,.2);
}
.xp-pop:empty { display:none; }
@keyframes xpRise { from{transform:translateY(14px); opacity:0} to{transform:translateY(0); opacity:1} }
.confetti-layer { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.confetto { position:absolute; width:8px; height:8px; top:-10px; animation:confettiFall linear forwards; }
@keyframes confettiFall { to { transform:translateY(110vh) rotate(540deg); } }

/* toast */
.toast {
  position:fixed; bottom:96px; left:50%; transform:translateX(-50%);
  background:rgba(43,41,49,.85); backdrop-filter:blur(20px); border:1px solid var(--glass-border); color:var(--on-surface);
  padding:13px 24px; border-radius:9999px; font-weight:500; font-size:14px; z-index:200;
  animation:screenIn .3s ease; box-shadow:0 12px 40px rgba(0,0,0,.55); white-space:nowrap;
}
.toast.hidden { display:none; }

/* tier selector (Great Library) */
.tier-row {
  display:flex; gap:8px; overflow-x:auto; padding:2px 2px 14px;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.tier-row::-webkit-scrollbar { display:none; }
.tier-chip {
  flex:0 0 auto; display:flex; align-items:center; gap:8px;
  padding:10px 16px; border-radius:9999px;
  background:var(--glass); border:1px solid var(--glass-border);
  color:var(--on-surface-variant); font-family:var(--font);
  font-size:13px; font-weight:500; cursor:pointer;
  transition:border-color .2s, color .2s, box-shadow .2s, background .2s;
}
.tier-chip:hover { border-color:var(--glass-border-hover); color:var(--on-surface); }
.tier-chip.active {
  background:var(--primary); border-color:var(--primary); color:var(--on-primary);
  font-weight:600; box-shadow:0 0 12px rgba(204,190,255,.35);
}
.tier-cnt { font-size:11px; font-weight:600; opacity:.75; }

@media (min-width:560px){ .screen { padding:32px; } }

/* ═══════════ SPELL ARCADE ═══════════ */
/* 5-up bottom nav fit */
.bottom-nav { padding-left:8px; padding-right:8px; }
.nav-btn { padding:7px 8px; min-width:0; flex:1; font-size:10.5px; gap:2px; }
.nav-btn svg { width:21px; height:21px; }

/* home teaser */
.arcade-teaser { position:relative; overflow:hidden; display:flex; align-items:center; gap:14px; padding:16px 18px; margin-bottom:14px; border-radius:var(--r-card); cursor:pointer; background:linear-gradient(120deg, rgba(255,111,216,.16), rgba(75,212,255,.14)); border:1px solid var(--glass-border); transition:transform .2s, border-color .2s; }
.arcade-teaser:hover { transform:translateY(-2px); border-color:var(--glass-border-hover); }
.at-glow { position:absolute; inset:0; background:radial-gradient(circle at 82% 50%, rgba(255,210,61,.20), transparent 60%); pointer-events:none; }
.at-body { flex:1; z-index:1; text-align:left; }
.at-label { font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--teal); }
.at-body h3 { font-size:16px; font-weight:700; margin:2px 0; }
.at-body p { font-size:12px; color:var(--muted); }
.at-go { z-index:1; width:42px; height:42px; flex:0 0 auto; border-radius:50%; display:grid; place-items:center; background:var(--primary); color:var(--on-primary); }
.at-go svg { width:22px; height:22px; }

/* hub wizard card */
.wiz-card { display:flex; align-items:center; gap:14px; padding:16px; margin-bottom:12px; }
.wiz-badge { width:54px; height:54px; flex:0 0 auto; border-radius:16px; display:grid; place-items:center; color:var(--wc,#c9a7ff); background:rgba(255,255,255,.05); border:1px solid var(--glass-border); box-shadow:0 0 16px color-mix(in srgb, var(--wc, #c9a7ff) 32%, transparent); }
.wiz-badge svg { width:34px; height:34px; }
.wiz-info { flex:1; min-width:0; }
.wiz-name { font-size:15px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wiz-lv { font-size:11.5px; color:var(--teal); font-weight:600; margin:1px 0 6px; }
.wiz-bar { height:7px; border-radius:9999px; background:rgba(255,255,255,.08); overflow:hidden; }
.wiz-fill { height:100%; width:var(--fill,0%); border-radius:9999px; background:linear-gradient(90deg,var(--teal),var(--gold)); transition:width .5s; }
.wiz-pts { font-size:11px; color:var(--muted); margin-top:5px; }
.wiz-edit { flex:0 0 auto; width:38px; height:38px; border-radius:12px; background:var(--glass); border:1px solid var(--glass-border); color:var(--on-surface-variant); display:grid; place-items:center; cursor:pointer; }
.wiz-edit svg { width:20px; height:20px; }

/* daily reward */
.daily-claim { width:100%; display:flex; align-items:center; gap:12px; padding:14px 16px; margin-bottom:18px; border-radius:var(--r-card); background:linear-gradient(100deg, rgba(255,219,60,.14), rgba(204,190,255,.10)); border:1px solid rgba(255,219,60,.3); color:var(--on-surface); text-align:left; cursor:pointer; transition:transform .15s; }
.daily-claim:active { transform:scale(.99); }
.daily-claim.claimed { background:var(--glass); border-color:var(--glass-border); opacity:.75; }
.dc-ico { width:40px; height:40px; flex:0 0 auto; border-radius:12px; display:grid; place-items:center; background:rgba(255,219,60,.16); color:var(--gold); }
.dc-ico svg { width:22px; height:22px; }
.dc-text { flex:1; display:flex; flex-direction:column; }
.dc-text b { font-size:13.5px; font-weight:700; }
.dc-text small { font-size:11px; color:var(--muted); }
.dc-go { font-size:12px; font-weight:800; color:var(--gold); padding:6px 12px; border-radius:9999px; background:rgba(255,219,60,.12); }
.claimed .dc-go { color:var(--teal); background:rgba(71,214,255,.12); }

/* game cards */
.ag-grid { display:flex; flex-direction:column; gap:10px; margin-bottom:8px; }
.ag-card { display:flex; align-items:center; gap:14px; padding:14px; border-radius:var(--r-card); cursor:pointer; text-align:left; width:100%; background:linear-gradient(110deg, color-mix(in srgb,var(--ag) 22%, transparent), rgba(255,255,255,.03)); border:1px solid color-mix(in srgb,var(--ag) 35%, var(--glass-border)); transition:transform .15s, box-shadow .2s; }
.ag-card:hover { transform:translateY(-2px); box-shadow:0 8px 28px color-mix(in srgb,var(--ag) 28%, transparent); }
.ag-art { width:52px; height:52px; flex:0 0 auto; border-radius:14px; background:rgba(0,0,0,.25); display:grid; place-items:center; }
.ag-art svg { width:42px; height:42px; }
.ag-meta { flex:1; min-width:0; }
.ag-name { font-size:15px; font-weight:700; }
.ag-tag { font-size:11.5px; color:var(--on-surface-variant); margin:2px 0; }
.ag-best { font-size:11px; color:var(--muted); }
.ag-best b { color:var(--gold); }
.ag-play { width:40px; height:40px; flex:0 0 auto; border-radius:50%; display:grid; place-items:center; background:var(--ag); color:#16121f; }
.ag-play svg { width:22px; height:22px; }

/* leaderboard */
.lb-tabs { display:flex; gap:8px; margin-bottom:10px; }
.lb-tab { flex:1; padding:9px; border-radius:12px; background:var(--glass); border:1px solid var(--glass-border); color:var(--on-surface-variant); font-weight:600; font-size:12.5px; font-family:var(--font); cursor:pointer; }
.lb-tab.active { background:var(--primary); border-color:var(--primary); color:var(--on-primary); }
.lb-list { display:flex; flex-direction:column; gap:4px; }
.lb-row { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:12px; background:rgba(255,255,255,.03); }
.lb-row.you { background:rgba(204,190,255,.12); border:1px solid var(--glass-border-hover); }
.lb-rank { width:22px; font-weight:800; font-size:13px; color:var(--muted); text-align:center; flex:0 0 auto; }
.lb-rank.top { color:var(--gold); }
.lb-dot { width:10px; height:10px; border-radius:50%; flex:0 0 auto; }
.lb-name { flex:1; font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lb-name em { color:var(--teal); font-style:normal; font-size:11px; }
.lb-score { font-weight:800; font-size:13px; color:var(--gold); flex:0 0 auto; }

/* cosmetics */
.cos-row { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:8px; }
.cos-chip { display:flex; align-items:center; gap:7px; padding:8px 12px; border-radius:9999px; background:var(--glass); border:1px solid var(--glass-border); color:var(--on-surface-variant); font-size:12px; font-weight:600; font-family:var(--font); cursor:pointer; }
.cos-chip.active { border-color:var(--cc); color:var(--on-surface); box-shadow:0 0 12px color-mix(in srgb,var(--cc) 40%, transparent); }
.cos-chip.locked { opacity:.5; }
.cos-dot { width:13px; height:13px; border-radius:50%; background:var(--cc); }

/* play surface */
.arcadescreen { padding:0; overflow:hidden; }
#arcade-canvas { position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; }
.arcade-hud { position:absolute; top:max(14px,env(safe-area-inset-top)); left:0; right:0; display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:7px; padding:0 60px; z-index:3; pointer-events:none; }
.arcade-exit { position:absolute; top:max(12px,env(safe-area-inset-top)); right:14px; width:40px; height:40px; border-radius:50%; background:rgba(20,16,34,.6); backdrop-filter:blur(10px); border:1px solid var(--glass-border); color:var(--on-surface); display:grid; place-items:center; z-index:6; cursor:pointer; }
.arcade-exit svg { width:20px; height:20px; }
.arcade-help { position:absolute; top:max(12px,env(safe-area-inset-top)); left:14px; width:40px; height:40px; border-radius:50%; background:rgba(20,16,34,.6); backdrop-filter:blur(10px); border:1px solid var(--glass-border); color:var(--on-surface); display:grid; place-items:center; z-index:6; cursor:pointer; }
.arcade-help svg { width:22px; height:22px; }
.arcade-help:hover { border-color:var(--glass-border-hover); box-shadow:var(--glow-violet); }
.ov-howto { font-size:14.5px; line-height:1.6; }
.arcadescreen .arcade-help, .arcadescreen .arcade-exit { opacity:.85; }
.arcade-controls { position:absolute; bottom:max(20px,calc(env(safe-area-inset-bottom) + 8px)); left:0; right:0; display:flex; justify-content:center; gap:12px; z-index:4; pointer-events:none; }
.ac-btn { pointer-events:auto; min-width:78px; padding:14px 22px; border-radius:16px; font-family:var(--font); font-weight:800; font-size:15px; color:#16121f; border:none; display:flex; align-items:center; justify-content:center; gap:8px; box-shadow:0 6px 20px rgba(0,0,0,.4); user-select:none; -webkit-user-select:none; cursor:pointer; }
.ac-btn svg { width:20px; height:20px; }
.ac-btn.cast { background:linear-gradient(120deg,#ff7a3c,#ff3d6e); color:#fff; }
.ac-btn.elem.fire { background:rgba(255,122,60,.22); color:#ff7a3c; border:2px solid rgba(255,122,60,.4); }
.ac-btn.elem.ice { background:rgba(75,212,255,.20); color:#4bd4ff; border:2px solid rgba(75,212,255,.4); }
.ac-btn.elem.on { box-shadow:0 0 18px currentColor, 0 6px 20px rgba(0,0,0,.4); filter:brightness(1.35); }

/* in-game HUD meters */
.hud-book, .hud-mana { position:relative; width:100px; height:24px; border-radius:9999px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); overflow:hidden; display:flex; align-items:center; justify-content:center; }
.hud-book-fill { position:absolute; left:0; top:0; bottom:0; background:linear-gradient(90deg,#c9a7ff,#ff6fd8); transition:width .2s; }
.hud-mana-fill { position:absolute; left:0; top:0; bottom:0; background:linear-gradient(90deg,#4bd4ff,#5ef0a0); transition:width .1s; }
.hud-book i, .hud-mana i { position:relative; font-size:10px; font-weight:800; font-style:normal; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.6); letter-spacing:.04em; }

/* overlay (tutorial / game over) */
.arcade-overlay { position:absolute; inset:0; z-index:8; display:grid; place-items:center; padding:24px; background:rgba(13,10,24,.74); backdrop-filter:blur(8px); }
.arcade-overlay.hidden { display:none; }
.ov-card { width:100%; max-width:340px; text-align:center; padding:28px 24px; border-radius:24px; background:rgba(28,24,44,.92); border:1px solid var(--glass-border-hover); box-shadow:0 24px 60px rgba(0,0,0,.5); animation:screenIn .3s ease; }
.ov-emoji { font-size:46px; line-height:1; margin-bottom:8px; }
.ov-card h2 { font-size:22px; font-weight:800; margin-bottom:6px; }
.ov-card p { font-size:13.5px; color:var(--on-surface-variant); line-height:1.55; margin-bottom:18px; }
.ov-score { font-size:46px; font-weight:800; color:var(--gold); line-height:1; margin:6px 0; }
.ov-score span { font-size:16px; color:var(--muted); font-weight:600; }
.ov-sub { font-size:12.5px; color:var(--on-surface-variant); }
.ov-lv { font-size:11.5px; color:var(--teal); margin:8px 0 18px; font-weight:600; }
.ov-btns { display:flex; flex-direction:column; gap:10px; }
.ov-card .ov-btns .btn-primary { width:100%; }
.ov-ghost { background:var(--glass); border:1px solid var(--glass-border); color:var(--on-surface); padding:13px; border-radius:14px; font-weight:700; font-family:var(--font); font-size:14px; cursor:pointer; }

/* ═══════════════════════════════════════════════════════════════════
   CELESTIAL ENHANCEMENT LAYER — premium magical polish (loaded last).
   Glows, 3D depth/tilt, floating cards, sparkles, portal transitions.
   ═══════════════════════════════════════════════════════════════════ */

/* premium display serif for hero moments */
.logo-text, .reveal-title, .ob-slide h2, #celebrate-title {
  font-family:var(--font-display); font-weight:600; letter-spacing:.005em;
}
.logo-text { font-size:46px; }

/* aurora visible behind everything */
#aurora-canvas { display:block; opacity:.9; }

/* glassmorphism: richer blur + 1px top-light edge (crystal) */
.glass-card, .quiz-card, .quest-card, .hero-quest, .orb-card, .arcade-card, .ag-card,
.daily-card, .lb-card, .wiz-card, .daily-claim, .example-card, .lq-opt, .quiz-opt,
.potion-opt, .badge-cell, .outfit, .pw-plan, .myth-card, .speech-bubble, .tier-chip, .cos-chip {
  backdrop-filter:blur(14px) saturate(1.15); -webkit-backdrop-filter:blur(14px) saturate(1.15);
  background:var(--glass);
  border:1px solid var(--glass-border);
  box-shadow:var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.10);
}

/* floating depth cards react to pointer (JS sets --rx/--ry/--gx/--gy) */
.tilt {
  transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateZ(0);
  transition:transform .18s cubic-bezier(.22,1,.36,1), box-shadow .25s;
  transform-style:preserve-3d; will-change:transform; position:relative;
}
.tilt.lifted { box-shadow:var(--shadow-lg), var(--glow-violet), inset 0 1px 0 rgba(255,255,255,.14); }
.tilt::after {
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:radial-gradient(180px circle at var(--gx,50%) var(--gy,0%), rgba(255,255,255,.16), transparent 60%);
  opacity:0; transition:opacity .25s;
}
.tilt.lifted::after { opacity:1; }

/* buttons: gradient fill, violet glow, springy 3D press */
.btn-primary {
  background:linear-gradient(135deg, var(--primary-deep), var(--primary));
  color:#fff; border:1px solid rgba(255,255,255,.18);
  box-shadow:var(--glow-violet), 0 8px 24px rgba(80,40,180,.4), inset 0 1px 0 rgba(255,255,255,.3);
  transition:transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, filter .2s;
}
.btn-primary:hover { transform:translateY(-2px) scale(1.015); box-shadow:var(--glow-violet), 0 14px 34px rgba(80,40,180,.5), inset 0 1px 0 rgba(255,255,255,.35); filter:brightness(1.06); }
.btn-primary:active { transform:translateY(0) scale(.98); }

/* magical screen transition: step through a glowing portal */
.screen.active { animation:portalIn .55s cubic-bezier(.22,1,.36,1); }
@keyframes portalIn {
  0% { opacity:0; transform:scale(.94) translateY(14px); filter:blur(6px); }
  60% { opacity:1; filter:blur(0); }
  100% { opacity:1; transform:scale(1) translateY(0); }
}

/* sparkle particles spawned by magic.js */
.spark-layer { position:fixed; inset:0; pointer-events:none; z-index:90; overflow:hidden; }
.spark {
  position:absolute; width:var(--s,8px); height:var(--s,8px); margin:calc(var(--s,8px)/-2);
  color:var(--c,#ffd24a); pointer-events:none;
  animation:sparkPop var(--life,.7s) cubic-bezier(.22,1,.36,1) forwards;
}
.spark svg { width:100%; height:100%; filter:drop-shadow(0 0 6px currentColor); }
@keyframes sparkPop {
  0% { transform:translate(0,0) scale(0) rotate(0deg); opacity:1; }
  100% { transform:translate(var(--dx,0),var(--dy,0)) scale(var(--sc,1.2)) rotate(var(--rot,140deg)); opacity:0; }
}

/* nav: glassy with glowing active orb */
.bottom-nav { box-shadow:0 -12px 40px rgba(8,4,30,.5); }
.nav-btn.active { box-shadow:var(--glow-violet); }

/* gentle continuous float for the hero quest card */
.hero-quest { animation:bob 7s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

/* theme toggle (Profile › Appearance) */
.theme-toggle { display:flex; gap:8px; }
.theme-opt { flex:1; padding:12px; border-radius:var(--r-chip); background:var(--glass); backdrop-filter:blur(12px); border:1px solid var(--glass-border); color:var(--on-surface-variant); font-family:var(--font); font-weight:600; font-size:13px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:7px; transition:all .25s; }
.theme-opt:hover { border-color:var(--glass-border-hover); }
.theme-opt.active { border-color:var(--primary); color:var(--on-surface); background:var(--primary-container); box-shadow:var(--glow-violet); }
.theme-opt svg { width:16px; height:16px; }

/* mascot slots (coach bubble + paywall) sized for the owl */
.coach-avatar { width:64px; height:64px; flex:0 0 auto; position:relative; background:none; border:none; padding:0; }
.coach-avatar .hootini-wrap { width:64px; height:64px; }
.pw-mascot { display:flex; flex-direction:column; align-items:center; gap:10px; }
.pw-mark { width:128px; height:135px; margin:0 auto; }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-quest, .float, .tilt { animation:none !important; }
  .tilt { transform:none !important; }
  .spark-layer { display:none; }
  .splash-portal, .splash-loader i, .owl-think i { animation:none !important; }
}

/* ── Hootini "thinking" loader (AI tutor) ── */
.msg.thinking { padding:14px 18px !important; }
.owl-think { display:inline-flex; align-items:center; gap:7px; }
.owl-think i { width:9px; height:9px; border-radius:50%; background:var(--teal);
  box-shadow:var(--glow-teal); animation:thinkPulse 1.1s ease-in-out infinite; }
.owl-think i:nth-child(2) { animation-delay:.18s; background:var(--primary); box-shadow:var(--glow-violet); }
.owl-think i:nth-child(3) { animation-delay:.36s; background:var(--gold); box-shadow:var(--glow-gold); }
@keyframes thinkPulse { 0%,100%{transform:translateY(0) scale(.7); opacity:.5} 50%{transform:translateY(-5px) scale(1); opacity:1} }

/* ── epic splash: swirling portal behind a flying Hootini ── */
.splash-stage { position:relative; display:grid; place-items:center; width:236px; height:236px; }
.splash-stage .hootini-wrap { position:relative; z-index:2; }
.splash-portal {
  position:absolute; inset:0; border-radius:50%; z-index:1;
  background:
    conic-gradient(from 0deg, transparent, rgba(124,77,255,.55), rgba(70,224,208,.5), rgba(255,210,74,.45), transparent 75%);
  filter:blur(10px); opacity:.85;
  animation:portalSpin 7s linear infinite;
  mask:radial-gradient(circle, transparent 38%, #000 42%, #000 70%, transparent 74%);
  -webkit-mask:radial-gradient(circle, transparent 38%, #000 42%, #000 70%, transparent 74%);
}
@keyframes portalSpin { to { transform:rotate(360deg); } }
.splash-loader { display:flex; gap:8px; margin-top:26px; }
.splash-loader i { width:8px; height:8px; border-radius:50%; background:var(--gold); box-shadow:var(--glow-gold); animation:thinkPulse 1.2s ease-in-out infinite; }
.splash-loader i:nth-child(2){ animation-delay:.2s; background:var(--teal); box-shadow:var(--glow-teal); }
.splash-loader i:nth-child(3){ animation-delay:.4s; background:var(--primary); box-shadow:var(--glow-violet); }

/* ── Lottie containers (lazy; coexist with confetti + CSS fallbacks) ── */
.celebrate-lottie {
  position:absolute; left:50%; top:42%; transform:translate(-50%,-50%);
  width:min(380px, 88vw); height:min(380px, 88vw); z-index:1; pointer-events:none;
}
.celebrate-lottie svg { width:100% !important; height:100% !important; }
.owl-think svg { width:54px; height:26px; }

/* fullscreen FX overlays (portal transition + potion brew) */
.fx-overlay { position:fixed; inset:0; z-index:120; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; opacity:0; transition:opacity .3s ease; }
.fx-overlay.show { opacity:1; }
.fx-portal { background:radial-gradient(circle at 50% 50%, rgba(124,77,255,.30), rgba(10,7,23,0) 62%); }
.fx-portal-anim { width:min(72vw, 340px); height:min(72vw, 340px); }
.fx-portal-anim svg, .fx-brew-anim svg { width:100% !important; height:100% !important; }
.fx-brew { background:rgba(10,7,23,.80); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
.fx-brew-anim { width:172px; height:172px; }
.fx-brew-anim:empty::before { content:""; width:46px; height:46px; border-radius:50%; border:3px solid var(--glass-border); border-top-color:var(--primary); animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.fx-brew-msg { margin-top:8px; font-family:var(--font-display); font-size:23px; font-weight:600; color:var(--on-surface); text-align:center; padding:0 24px; }
@media (prefers-reduced-motion: reduce) { .fx-portal { display:none; } }

/* splash boot-cast rune circle (behind the owl) */
.splash-cast { position:absolute; inset:-18px; z-index:1; pointer-events:none; }
.splash-cast svg { width:100% !important; height:100% !important; }
/* when the lottie cast mounts, the CSS portal ring steps back */
.has-cast .splash-portal { opacity:.35; }

/* progressive 3D Hootini — overlays the SVG; SVG hides once 3D is ready */
.hootini-3d { position:absolute; inset:0; width:100%; height:100%; --poster-color:transparent; background:transparent; z-index:3; }
.hootini-wrap.is-3d > svg { opacity:0; }

/* ═══════ Arcade enhancements: energy · daily challenges · trophies ═══════ */

/* energy meter */
.energy-row { display:flex; align-items:center; gap:10px; padding:12px 16px; margin-bottom:6px; border-radius:var(--r-card); background:var(--glass); border:1px solid var(--glass-border); backdrop-filter:blur(14px); }
.energy-row .en-ico { width:30px; height:30px; flex:0 0 auto; border-radius:9px; display:grid; place-items:center; color:var(--gold); background:rgba(255,210,74,.14); box-shadow:var(--glow-gold); }
.energy-row .en-ico svg { width:18px; height:18px; }
.en-label { font-size:13px; font-weight:600; color:var(--on-surface-variant); }
.en-val { margin-left:auto; font-size:14px; font-weight:800; color:var(--gold); }
.en-toggle { font-size:11px; font-weight:700; font-family:var(--font); color:var(--on-surface-variant); padding:7px 12px; border-radius:9999px; background:rgba(255,255,255,.06); border:1px solid var(--glass-border); cursor:pointer; }
.en-toggle:hover { border-color:var(--glass-border-hover); color:var(--on-surface); }

/* daily challenges */
.chal-list { display:flex; flex-direction:column; gap:8px; margin-bottom:6px; }
.chal-row { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:var(--r-card); background:var(--glass); border:1px solid color-mix(in srgb,var(--ag) 28%, var(--glass-border)); backdrop-filter:blur(14px); transition:opacity .3s; }
.chal-row.done { border-color:color-mix(in srgb,var(--ag) 55%, transparent); box-shadow:0 0 16px color-mix(in srgb,var(--ag) 24%, transparent); }
.chal-ico { width:38px; height:38px; flex:0 0 auto; border-radius:11px; background:rgba(0,0,0,.25); display:grid; place-items:center; }
.chal-ico svg { width:30px; height:30px; }
.chal-body { flex:1; min-width:0; }
.chal-text { font-size:13.5px; font-weight:600; margin-bottom:6px; }
.chal-game { font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); margin-left:4px; }
.chal-bar { height:7px; border-radius:9999px; background:rgba(255,255,255,.08); overflow:hidden; }
.chal-fill { height:100%; width:var(--fill,0%); border-radius:9999px; background:linear-gradient(90deg, var(--ag), var(--gold)); transition:width .5s cubic-bezier(.22,1,.36,1); }
.chal-status { flex:0 0 auto; font-size:13px; font-weight:800; color:var(--gold); min-width:42px; text-align:right; }
.chal-row.done .chal-status { color:var(--teal); }

/* trophy shelf */
.tr-count { font-size:11px; font-weight:700; color:var(--gold); background:rgba(255,210,74,.12); padding:2px 9px; border-radius:9999px; margin-left:8px; letter-spacing:0; }
.trophy-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; padding-bottom:8px; }
.trophy { display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; padding:14px 10px; border-radius:var(--r-card); background:var(--glass); border:1px solid var(--glass-border); backdrop-filter:blur(14px); opacity:.5; filter:grayscale(.6); transition:all .3s; }
.trophy.got { opacity:1; filter:none; border-color:rgba(255,210,74,.4); box-shadow:0 0 18px rgba(255,210,74,.12); }
.trophy .tr-ico { width:34px; height:34px; color:var(--muted); }
.trophy.got .tr-ico { color:var(--gold); filter:drop-shadow(0 0 6px rgba(255,210,74,.5)); }
.trophy .tr-ico svg { width:34px; height:34px; }
.tr-name { font-size:12.5px; font-weight:700; }
.tr-desc { font-size:10.5px; color:var(--muted); line-height:1.35; }

/* achievement / challenge notification popup */
.arcade-notify { position:fixed; top:max(18px, env(safe-area-inset-top)); left:50%; transform:translate(-50%,-140%); z-index:160; display:flex; align-items:center; gap:12px; padding:12px 18px; border-radius:9999px; background:rgba(28,20,64,.92); backdrop-filter:blur(18px); border:1px solid var(--glass-border-hover); box-shadow:var(--shadow-lg), var(--glow-gold); opacity:0; transition:transform .45s cubic-bezier(.22,1.4,.4,1), opacity .35s; pointer-events:none; max-width:90vw; }
.arcade-notify.show { transform:translate(-50%, 0); opacity:1; }
.arcade-notify .an-ico { width:36px; height:36px; flex:0 0 auto; border-radius:50%; display:grid; place-items:center; color:var(--gold); background:rgba(255,210,74,.16); box-shadow:var(--glow-gold); }
.arcade-notify .an-ico.challenge { color:var(--teal); background:rgba(70,224,208,.16); box-shadow:var(--glow-teal); }
.arcade-notify .an-ico svg { width:20px; height:20px; }
.arcade-notify .an-txt { display:flex; flex-direction:column; line-height:1.25; }
.arcade-notify .an-txt b { font-size:13px; font-weight:800; }
.arcade-notify .an-txt small { font-size:11.5px; color:var(--on-surface-variant); }
@media (prefers-reduced-motion: reduce) { .arcade-notify { transition:opacity .3s; transform:translate(-50%,0); } }

/* freemium: paywall reason banner + home "free lessons left" chip */
.pw-reason { max-width:400px; margin:0 auto 4px; padding:10px 16px; border-radius:14px; background:rgba(255,210,74,.12); border:1px solid rgba(255,210,74,.32); color:var(--gold-light); font-size:13.5px; font-weight:600; line-height:1.5; text-align:center; }
.pw-reason.hidden { display:none; }
.pw-restore { background:none; border:none; color:var(--on-surface-variant); font-family:inherit; font-size:13px; font-weight:600; text-decoration:underline; text-underline-offset:3px; cursor:pointer; margin-top:12px; padding:6px; }
.pw-restore:hover { color:var(--on-surface); }
.pw-restore.hidden { display:none; }
.free-left { display:inline-flex; align-items:center; gap:6px; margin-left:10px; padding:3px 10px; border-radius:9999px; font-size:11px; font-weight:700; letter-spacing:.02em; background:rgba(255,210,74,.12); border:1px solid rgba(255,210,74,.30); color:var(--gold-light); vertical-align:middle; }
.free-left.none { background:rgba(255,143,216,.12); border-color:rgba(255,143,216,.3); color:var(--pink); }

/* age verification (neutral age gate) */
.guardian-note.hidden, .age-error.hidden, .about-editor.hidden { display:none; }

/* Wisdom Feathers currency */
.greet-row { display:flex; align-items:center; gap:12px; }
.greet-copy { flex:1; min-width:0; }
.feather-pill { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; padding:7px 12px; border-radius:9999px; background:rgba(255,210,74,.13); border:1px solid rgba(255,210,74,.34); color:var(--gold-light); font-weight:700; font-size:15px; }
.feather-pill .fico, .feather-chip .fico { width:15px; height:15px; }
.fico { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.chip-row { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; align-items:center; }
.feather-chip { display:inline-flex; align-items:center; gap:5px; padding:5px 12px; border-radius:9999px; background:rgba(255,210,74,.13); border:1px solid rgba(255,210,74,.34); color:var(--gold-light); font-weight:700; font-size:13px; }
.section-sub { font-size:11px; font-weight:500; color:var(--muted); text-transform:none; letter-spacing:0; margin-left:6px; }

/* cosmetics shop */
.outfit { position:relative; display:flex; flex-direction:column; align-items:center; }
.outfit .rarity { position:absolute; top:6px; right:6px; font-size:8px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; padding:2px 5px; border-radius:6px; }
.r-common { background:rgba(202,196,213,.18); color:#cac4d5; }
.r-rare { background:rgba(70,224,208,.18); color:var(--teal); }
.r-epic { background:rgba(122,107,255,.22); color:#b7a6ff; }
.r-legendary { background:rgba(255,210,74,.2); color:var(--gold-light); }
.outfit-foot { margin-top:7px; font-size:10.5px; font-weight:700; color:var(--gold-light); display:inline-flex; align-items:center; gap:4px; }
.outfit-foot .fico { width:11px; height:11px; }
.outfit.equipped .outfit-foot { color:var(--teal); }
.outfit.shop .swatch { opacity:.55; }
.swatch-gold { background:linear-gradient(135deg,#ffd24a,#c9962a); }
.swatch-aurora { background:linear-gradient(135deg,#ff8fd8,#7a6bff,#46e0d0); }

/* equipped-aura glow on avatars */
.profile-head .hootini-center { filter:drop-shadow(0 0 16px var(--owl-glow, #b79dff)); transition:filter .4s; }

/* daily challenge enhancements */
.daily-progress-head { display:flex; align-items:center; gap:10px; padding:12px 0 10px; font-size:12px; font-weight:700; color:var(--on-surface-variant); border-bottom:1px solid rgba(255,255,255,.05); }
.daily-progress-head > span { flex-shrink:0; }
.daily-bar { flex:1; height:6px; border-radius:9999px; background:rgba(255,255,255,.08); overflow:hidden; }
.daily-bar-fill { height:100%; border-radius:9999px; background:linear-gradient(90deg,var(--teal),var(--gold-light)); transition:width .5s; }
.daily-xp .df { display:inline-flex; align-items:center; gap:2px; color:var(--gold-light); }
.daily-xp .df .fico { width:11px; height:11px; }
.daily-bonus { display:flex; align-items:center; gap:11px; padding:13px 0 4px; font-size:13.5px; font-weight:600; color:var(--on-surface-variant); }
.daily-bonus-ico { width:24px; height:24px; flex-shrink:0; border-radius:50%; display:grid; place-items:center; border:1.5px dashed rgba(255,210,74,.5); color:var(--gold-light); }
.daily-bonus-ico .ico { width:13px; height:13px; }
.daily-bonus .daily-xp { margin-left:auto; }
.daily-bonus.won { color:var(--on-surface); }
.daily-bonus.won .daily-bonus-ico { border-style:solid; background:rgba(70,224,208,.16); border-color:transparent; color:var(--teal); }

/* streak reward card */
.streak-card { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:var(--r-card); padding:16px; margin-bottom:12px; }
.streak-main { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.streak-flame { position:relative; display:grid; place-items:center; width:48px; height:48px; flex-shrink:0; }
.streak-flame .ico { width:44px; height:44px; fill:rgba(255,138,76,.18); stroke:#ff8f5e; stroke-width:1.5; }
.streak-flame b { position:absolute; font-size:15px; font-weight:800; color:#ffb37a; }
.streak-copy h3 { font-size:16px; margin:0 0 2px; }
.streak-copy p { font-size:12.5px; color:var(--on-surface-variant); margin:0; }
.streak-track { display:flex; gap:6px; margin-bottom:12px; }
.streak-node { flex:1; display:flex; flex-direction:column; align-items:center; gap:5px; padding:8px 2px; border-radius:12px; background:rgba(255,255,255,.04); border:1px solid transparent; opacity:.6; transition:all .3s; }
.streak-node.claimed { opacity:1; background:rgba(70,224,208,.1); }
.streak-node.next { opacity:1; border-color:var(--gold-light); box-shadow:0 0 10px rgba(255,210,74,.2); }
.sn-day { font-size:10px; font-weight:800; letter-spacing:.03em; color:var(--on-surface-variant); }
.sn-dot { width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.08); color:var(--teal); }
.streak-node.claimed .sn-dot { background:rgba(70,224,208,.25); }
.streak-node.next .sn-dot { background:rgba(255,210,74,.2); }
.sn-dot .ico { width:12px; height:12px; }
.sn-rew { font-size:10px; font-weight:700; color:var(--gold-light); }
.streak-bar { height:6px; border-radius:9999px; background:rgba(255,255,255,.08); overflow:hidden; }
.streak-bar-fill { height:100%; border-radius:9999px; background:linear-gradient(90deg,#ff8f5e,var(--gold-light)); transition:width .5s; }

/* streak-at-risk nudge */
.streak-nudge { display:flex; align-items:center; gap:12px; margin:14px 0 4px; padding:12px 14px; border-radius:16px; background:linear-gradient(120deg,rgba(255,138,76,.16),rgba(255,143,216,.1)); border:1px solid rgba(255,138,76,.32); }
.sn-flame { flex-shrink:0; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; background:rgba(255,138,76,.2); }
.sn-flame .ico { width:19px; height:19px; fill:rgba(255,138,76,.3); stroke:#ff8f5e; stroke-width:1.6; }
.sn-text { flex:1; min-width:0; display:flex; flex-direction:column; }
.sn-text b { font-size:14px; }
.sn-text span { font-size:12px; color:var(--on-surface-variant); }
.sn-cta { flex-shrink:0; padding:8px 16px; border-radius:9999px; border:none; background:#ff8f5e; color:#231208; font-family:inherit; font-weight:700; font-size:13px; cursor:pointer; transition:transform .2s, filter .2s; }
.sn-cta:hover { filter:brightness(1.08); transform:translateY(-1px); }

/* reminder card + toggle */
.reminder-card { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:var(--r-card); padding:16px; margin-bottom:12px; }
.reminder-top { display:flex; align-items:center; gap:12px; }
.reminder-copy { flex:1; min-width:0; }
.reminder-copy h3 { font-size:15px; margin:0 0 2px; }
.reminder-copy .meta { font-size:12.5px; color:var(--on-surface-variant); }
.toggle { flex-shrink:0; width:50px; height:29px; border-radius:9999px; border:none; background:rgba(255,255,255,.14); position:relative; cursor:pointer; transition:background .3s; padding:0; }
.toggle.on { background:var(--teal); }
.toggle-knob { position:absolute; top:3px; left:3px; width:23px; height:23px; border-radius:50%; background:#fff; transition:transform .3s; box-shadow:0 1px 4px rgba(0,0,0,.3); }
.toggle.on .toggle-knob { transform:translateX(21px); }
.reminder-time-row { display:flex; align-items:center; gap:10px; margin-top:14px; font-size:13.5px; color:var(--on-surface-variant); transition:opacity .3s; }
.reminder-time-row.dim { opacity:.5; }
.reminder-time-row select { background:#131322; border:1px solid var(--outline-variant); border-radius:10px; padding:8px 12px; color:var(--on-surface); font-family:inherit; font-size:14px; outline:none; cursor:pointer; }
.reminder-note { margin-top:12px; font-size:12px; line-height:1.5; color:var(--muted); }

/* ── Spell Arcade: lives, boosts, chest, relics ── */
.lives-row { display:flex; align-items:center; gap:12px; background:var(--glass); border:1px solid var(--glass-border); border-radius:16px; padding:12px 14px; margin-bottom:14px; }
.lives-hearts { display:flex; align-items:center; gap:5px; flex:1; }
.heart svg, .heart-inf svg { width:20px; height:20px; display:block; }
.heart.full svg { fill:#ff6b8a; filter:drop-shadow(0 0 4px rgba(255,107,138,.5)); }
.heart.empty svg { fill:rgba(255,255,255,.14); }
.heart-inf { display:inline-flex; align-items:center; gap:2px; color:#ff6b8a; font-weight:800; }
.heart-inf svg { fill:#ff6b8a; }
.lives-label { font-size:11.5px; color:var(--on-surface-variant); margin-left:8px; font-weight:500; }
.lives-refill { flex-shrink:0; padding:8px 14px; border-radius:9999px; border:1px solid rgba(255,210,74,.4); background:rgba(255,210,74,.14); color:var(--gold-light); font-family:inherit; font-weight:700; font-size:12.5px; cursor:pointer; transition:filter .2s; }
.lives-refill:disabled { opacity:.4; cursor:default; }
.lives-refill:not(:disabled):hover { filter:brightness(1.12); }

.boost-tray { display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; }
.boost-chip { flex-shrink:0; display:flex; flex-direction:column; align-items:center; gap:3px; width:96px; padding:12px 8px; border-radius:14px; background:var(--glass); border:1.5px solid var(--glass-border); color:var(--on-surface); font-family:inherit; cursor:pointer; transition:all .2s; position:relative; }
.boost-chip.armed { border-color:var(--rc); box-shadow:0 0 12px color-mix(in srgb, var(--rc) 40%, transparent); background:color-mix(in srgb, var(--rc) 12%, var(--glass)); }
.boost-chip .bc-ico { font-size:22px; }
.boost-chip .bc-name { font-size:11px; font-weight:600; text-align:center; line-height:1.2; }
.boost-chip .bc-count { font-size:10px; font-weight:800; color:var(--rc); }
.boost-chip.armed::after { content:"ARMED"; position:absolute; top:5px; right:5px; font-size:7px; font-weight:800; letter-spacing:.05em; color:var(--rc); }
.boost-empty { font-size:12.5px; color:var(--muted); padding:10px 2px; line-height:1.5; }

.chest-btn { display:flex; align-items:center; gap:12px; width:100%; margin:14px 0 4px; padding:14px 16px; border-radius:16px; border:1px solid rgba(201,167,255,.34); background:linear-gradient(120deg,rgba(201,167,255,.14),rgba(70,224,208,.08)); color:var(--on-surface); font-family:inherit; cursor:pointer; transition:transform .2s, filter .2s; }
.chest-btn:hover { transform:translateY(-1px); filter:brightness(1.06); }
.chest-ico { width:34px; height:34px; flex-shrink:0; color:#c9a7ff; }
.chest-ico svg { width:100%; height:100%; }
.chest-txt { flex:1; display:flex; flex-direction:column; text-align:left; }
.chest-txt b { font-size:14.5px; }
.chest-txt small { font-size:12px; color:var(--on-surface-variant); }
.chest-cost { flex-shrink:0; font-weight:800; color:var(--gold-light); font-size:14px; }

.relic-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:10px; }
.relic { display:flex; flex-direction:column; align-items:center; gap:4px; padding:12px 6px; border-radius:14px; background:var(--glass); border:1px solid var(--glass-border); text-align:center; opacity:.5; }
.relic.got { opacity:1; border-color:color-mix(in srgb, var(--rc) 55%, transparent); box-shadow:0 0 10px color-mix(in srgb, var(--rc) 22%, transparent); }
.rl-ico { font-size:24px; }
.relic:not(.got) .rl-ico { color:var(--muted); }
.rl-name { font-size:10.5px; font-weight:600; line-height:1.2; }
.rl-rar { font-size:8px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--rc); }

/* overlay extras (game-over drop + boost banners) */
.ov-drop { display:flex; align-items:center; gap:10px; margin:12px auto; padding:10px 14px; border-radius:12px; background:color-mix(in srgb, var(--rc) 14%, rgba(0,0,0,.2)); border:1px solid var(--rc); max-width:280px; }
.ovd-ico { font-size:26px; }
.ovd-txt { display:flex; flex-direction:column; text-align:left; }
.ovd-txt b { font-size:13px; }
.ovd-txt small { font-size:11px; opacity:.85; text-transform:capitalize; }
.ov-boosts { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin:12px 0; }
.ov-boost { display:inline-flex; align-items:center; gap:5px; padding:6px 12px; border-radius:9999px; font-size:12px; font-weight:600; border:1px solid var(--rc); color:var(--rc); }
.ov-x2 { font-size:14px; color:#c9a7ff; font-weight:800; margin-left:6px; }

/* chest reveal modal */
.chest-reveal { position:fixed; inset:0; z-index:120; display:none; align-items:center; justify-content:center; padding:24px; background:rgba(6,4,16,.72); backdrop-filter:blur(6px); }
.chest-reveal.show { display:flex; animation:screenIn .35s cubic-bezier(.22,1,.36,1); }
.cr-card { text-align:center; max-width:320px; padding:28px 24px; border-radius:22px; background:var(--glass); border:1.5px solid var(--rc); box-shadow:0 0 40px color-mix(in srgb, var(--rc) 40%, transparent); }
.cr-ico { font-size:64px; line-height:1; margin-bottom:8px; filter:drop-shadow(0 0 16px var(--rc)); }
.cr-rar { font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--rc); margin-bottom:4px; }
.cr-card h3 { font-size:20px; margin:0 0 8px; }
.cr-card p { font-size:13.5px; color:var(--on-surface-variant); line-height:1.55; margin-bottom:18px; }

/* purchasable bonus course unlock banner */
.course-unlock { text-align:center; background:linear-gradient(135deg, rgba(255,210,74,.14), rgba(124,77,255,.12)); border:1px solid rgba(255,210,74,.36); border-radius:var(--r-card); padding:22px 18px; margin-bottom:16px; }
.cu-badge { display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--gold-light); margin-bottom:8px; }
.cu-badge .ico { width:13px; height:13px; }
.course-unlock h3 { font-size:20px; margin:0 0 4px; }
.course-unlock > p { font-size:13px; color:var(--on-surface-variant); margin-bottom:16px; }
.course-unlock .btn-primary.sm { display:inline-flex; align-items:center; gap:6px; }
.course-unlock .btn-primary.sm .fico { width:14px; height:14px; }
.cu-premium { display:block; margin:12px auto 0; background:none; border:none; color:var(--teal); font-family:inherit; font-size:12.5px; font-weight:600; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.cu-premium:hover { color:var(--on-surface); }

/* tappable feather chip (opens Feather Store) */
.feather-chip.tappable { cursor:pointer; transition:transform .15s, filter .2s; }
.feather-chip.tappable:hover { filter:brightness(1.1); }
.feather-chip.tappable:active { transform:scale(.96); }
.fc-plus { display:inline-grid; place-items:center; width:15px; height:15px; margin-left:2px; border-radius:50%; background:var(--gold-light); color:#231a00; font-weight:800; font-size:12px; }

/* Feather Store modal */
.fs-card { position:relative; max-width:340px; text-align:center; }
.fs-card .close-x { position:absolute; top:10px; right:12px; background:none; border:none; color:var(--muted); font-size:18px; cursor:pointer; }
.fs-head { display:flex; align-items:center; justify-content:center; gap:7px; font-family:var(--font-display); font-size:22px; color:var(--gold-light); margin-bottom:6px; }
.fs-head .fico { width:20px; height:20px; }
.fs-sub { font-size:13px; color:var(--on-surface-variant); line-height:1.5; margin-bottom:16px; }
.fs-packs { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.fs-pack { position:relative; display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-radius:14px; background:rgba(255,210,74,.1); border:1px solid rgba(255,210,74,.3); color:var(--on-surface); font-family:inherit; cursor:pointer; transition:all .2s; }
.fs-pack:hover { border-color:var(--gold-light); background:rgba(255,210,74,.16); transform:translateY(-1px); }
.fs-amt { display:inline-flex; align-items:center; gap:6px; font-weight:800; font-size:17px; color:var(--gold-light); }
.fs-amt .fico { width:16px; height:16px; }
.fs-price { font-weight:700; font-size:15px; color:var(--on-surface); }
.fs-tag { position:absolute; top:-8px; left:14px; font-size:9px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; background:var(--teal); color:#04201d; padding:2px 8px; border-radius:9999px; }
.fs-note { font-size:11px; color:var(--muted); line-height:1.5; }

/* Today in AI card */
.today-ai { display:flex; gap:12px; margin:14px 0 4px; padding:14px 16px; border-radius:16px; background:linear-gradient(120deg, rgba(70,224,208,.12), rgba(124,77,255,.1)); border:1px solid rgba(70,224,208,.28); }
.ta-ico { font-size:22px; flex-shrink:0; }
.ta-body { flex:1; min-width:0; }
.ta-label { font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--teal); margin-bottom:3px; }
.ta-body p { font-size:14px; line-height:1.55; color:var(--on-surface); margin:0 0 8px; }
.ta-try { display:inline-flex; align-items:center; gap:6px; padding:6px 13px; border-radius:9999px; border:1px solid rgba(255,138,212,.35); background:rgba(255,138,212,.1); color:var(--on-surface); font-family:inherit; font-size:12.5px; font-weight:600; cursor:pointer; transition:all .2s; }
.ta-try:hover { background:rgba(255,138,212,.18); border-color:var(--pink); }
.ta-try .ta-send { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* Daily Review card */
.review-card { display:flex; align-items:center; gap:12px; margin:12px 0 4px; padding:14px 16px; border-radius:16px; background:var(--glass); border:1px solid var(--glass-border); }
.review-card.done { opacity:.75; }
.rv-ico { width:38px; height:38px; flex-shrink:0; border-radius:50%; display:grid; place-items:center; background:rgba(70,224,208,.16); color:var(--teal); }
.rv-ico .ico { width:20px; height:20px; }
.rv-body { flex:1; min-width:0; }
.rv-body h3 { font-size:15px; margin:0 0 2px; }
.rv-body .meta { font-size:12.5px; color:var(--on-surface-variant); }
.rv-go { flex-shrink:0; padding:9px 18px; border-radius:9999px; border:none; background:var(--teal); color:#04201d; font-family:inherit; font-weight:700; font-size:13px; cursor:pointer; transition:transform .15s, filter .2s; }
.rv-go:hover { filter:brightness(1.08); } .rv-go:active { transform:scale(.96); }

/* Daily Review modal */
.rv-card { max-width:360px; text-align:left; }
.rv-head { display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-size:19px; color:var(--teal); margin-bottom:2px; }
.rv-head .ico { width:18px; height:18px; } .rv-head span { margin-left:auto; font-family:var(--font); font-size:12px; color:var(--muted); font-weight:600; }
.rv-from { font-size:11px; color:var(--muted); font-style:italic; margin-bottom:12px; }
.rv-q { font-size:16px; font-weight:500; line-height:1.5; margin-bottom:14px; color:var(--on-surface); }
.rv-opt { display:block; width:100%; text-align:left; margin-bottom:9px; padding:13px 16px; border-radius:12px; background:#131322; border:1px solid var(--outline-variant); color:var(--on-surface); font-family:inherit; font-size:14.5px; cursor:pointer; transition:all .2s; }
:root[data-theme="light"] .rv-opt { background:#fbf8ff; }
.rv-opt:hover { border-color:var(--teal); }
.rv-opt.correct { background:rgba(94,240,160,.18); border-color:#5ef0a0; color:#5ef0a0; }
.rv-opt.wrong { background:rgba(255,143,216,.16); border-color:var(--pink); }

/* light-mode inputs: these use a hardcoded dark bg (#131322) designed for dark mode —
   in light mode the ink text (--on-surface #281850) was invisible on it. Give them a light field bg. */
:root[data-theme="light"] .name-input,
:root[data-theme="light"] .chat-input-row input,
:root[data-theme="light"] .prompt-box,
:root[data-theme="light"] .reminder-time-row select,
:root[data-theme="light"] .dob-field select,
:root[data-theme="light"] .edit-input,
:root[data-theme="light"] .edit-textarea {
  background: #ffffff; border-color: var(--outline-variant);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .name-input,
  :root:not([data-theme]) .chat-input-row input,
  :root:not([data-theme]) .prompt-box,
  :root:not([data-theme]) .reminder-time-row select,
  :root:not([data-theme]) .dob-field select,
  :root:not([data-theme]) .edit-input,
  :root:not([data-theme]) .edit-textarea,
  :root:not([data-theme]) .rv-opt {
    background: #ffffff; border-color: var(--outline-variant);
  }
}

/* profile legal footer */
.legal-links { text-align:center; font-size:12px; color:var(--muted); margin:18px 0 8px; }
.legal-links a { color:var(--muted); text-decoration:underline; text-underline-offset:3px; }
.legal-links a:hover { color:var(--on-surface); }

/* certificate share button */
.cert-card { display:flex; align-items:center; gap:12px; }
.cert-info { flex:1; min-width:0; }
.cert-share { flex-shrink:0; width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:rgba(255,210,74,.14); border:1px solid rgba(255,210,74,.34); color:var(--gold-light); cursor:pointer; transition:all .2s; }
.cert-share .ico { width:17px; height:17px; }
.cert-share:hover { background:rgba(255,210,74,.24); transform:translateY(-1px); }
.cert-share:active { transform:scale(.94); }

/* ── tutor: suggestions + voice ── */
.suggest-row { display:flex; gap:8px; overflow-x:auto; padding:10px 0 2px; scrollbar-width:none; }
.suggest-row::-webkit-scrollbar { display:none; }
.suggest-chip { flex-shrink:0; padding:9px 15px; border-radius:9999px; border:1px solid rgba(255,138,212,.35); background:rgba(255,138,212,.08); color:var(--on-surface); font-family:inherit; font-size:13px; font-weight:500; white-space:nowrap; cursor:pointer; transition:all .2s; }
.suggest-chip:hover { background:rgba(255,138,212,.16); border-color:var(--pink); }
.chat-mic { flex-shrink:0; width:50px; height:50px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.06); border:1px solid var(--outline-variant); color:var(--on-surface-variant); cursor:pointer; transition:all .25s; }
.chat-mic svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.chat-mic:hover { color:var(--teal); border-color:var(--teal); }
.chat-mic.listening { color:#ff6b8a; border-color:#ff6b8a; background:rgba(255,107,138,.14); animation:micPulse 1.1s ease-in-out infinite; }
@keyframes micPulse { 0%,100% { box-shadow:0 0 0 0 rgba(255,107,138,.4);} 50% { box-shadow:0 0 0 8px rgba(255,107,138,0);} }

/* ── polish: tactile press feedback across new interactive surfaces ── */
.about-edit-btn, .suggest-chip, .boost-chip, .relic, .chest-btn, .lives-refill,
.sn-cta, .about-edit-btn, .reminder-time-row select, .feather-pill, .toggle,
.btn-ghost, .btn-primary.sm, .streak-nudge .sn-cta { -webkit-tap-highlight-color:transparent; }
.suggest-chip:active, .boost-chip:active, .chest-btn:active, .lives-refill:not(:disabled):active,
.about-edit-btn:active, .sn-cta:active, .btn-ghost:active, .btn-primary.sm:active { transform:scale(.96); }
.about-edit-btn, .suggest-chip, .boost-chip, .chest-btn, .lives-refill, .sn-cta, .btn-ghost, .btn-primary.sm { transition:transform .12s ease, background .2s, border-color .2s, color .2s, filter .2s; }
@media (prefers-reduced-motion: reduce) {
  .chat-mic.listening { animation:none; }
  .chest-reveal.show { animation:none; }
  .suggest-chip:active, .boost-chip:active, .chest-btn:active, .lives-refill:active,
  .about-edit-btn:active, .sn-cta:active, .btn-ghost:active, .btn-primary.sm:active { transform:none; }
}
.dob-row { display:flex; gap:10px; width:100%; max-width:360px; margin-bottom:18px; }
.dob-field { flex:1; display:flex; flex-direction:column; gap:6px; text-align:left; }
.dob-field > span { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding-left:2px; }
.dob-field select {
  width:100%; background:#131322; border:1px solid var(--outline-variant); border-radius:var(--r-btn);
  padding:13px 12px; color:var(--on-surface); font-family:inherit; font-size:15px; font-weight:400; outline:none;
  appearance:none; -webkit-appearance:none; cursor:pointer; transition:border-color .3s, box-shadow .3s;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a83a3' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; padding-right:26px;
}
.dob-field select:focus { border-color:var(--teal); box-shadow:0 0 12px rgba(71,214,255,.25); }
.guardian-note { width:100%; max-width:400px; margin:0 0 18px; padding:14px 16px; border-radius:14px; background:rgba(255,210,74,.1); border:1px solid rgba(255,210,74,.3); }
.guardian-check { display:flex; align-items:flex-start; gap:11px; text-align:left; font-size:13px; line-height:1.5; color:var(--on-surface-variant); cursor:pointer; }
.guardian-check input { width:20px; height:20px; flex-shrink:0; accent-color:var(--gold-light); margin-top:1px; cursor:pointer; }
.age-error { color:var(--pink); font-size:13.5px; font-weight:600; max-width:360px; margin:0 0 16px; line-height:1.5; }

/* profile — about / bio */
.about-card { background:var(--glass); backdrop-filter:blur(20px); border:1px solid var(--glass-border); border-radius:var(--r-card); padding:18px; margin-bottom:12px; text-align:left; }
.about-meta { font-size:13px; font-weight:600; color:var(--on-surface-variant); margin-bottom:8px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.junior-badge { display:inline-flex; align-items:center; gap:5px; padding:2px 9px; border-radius:9999px; font-size:11px; font-weight:700; background:rgba(255,210,74,.14); border:1px solid rgba(255,210,74,.32); color:var(--gold-light); }
.junior-badge .ico { width:12px; height:12px; }
.about-bio { font-size:14.5px; line-height:1.6; color:var(--on-surface); margin-bottom:14px; white-space:pre-wrap; }
.about-bio.empty { color:var(--muted); font-style:italic; }
.about-edit-btn { display:inline-flex; align-items:center; gap:7px; padding:8px 15px; border-radius:9999px; background:rgba(255,255,255,.06); border:1px solid var(--outline-variant); color:var(--on-surface); font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:all .25s; }
.about-edit-btn:hover { border-color:var(--teal); color:var(--teal); }
.about-edit-btn .ico { width:15px; height:15px; }
.mini-label { display:block; font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin:0 0 6px 2px; }
.edit-input, .edit-textarea { width:100%; background:#131322; border:1px solid var(--outline-variant); border-radius:12px; padding:12px 14px; color:var(--on-surface); font-family:inherit; font-size:15px; outline:none; margin-bottom:14px; transition:border-color .3s, box-shadow .3s; }
.edit-textarea { resize:vertical; min-height:76px; line-height:1.55; }
.edit-input:focus, .edit-textarea:focus { border-color:var(--teal); box-shadow:0 0 12px rgba(71,214,255,.22); }
.edit-actions { display:flex; gap:10px; justify-content:flex-end; }
.btn-ghost { background:none; border:1px solid var(--outline-variant); color:var(--on-surface-variant); font-family:inherit; font-weight:600; border-radius:9999px; cursor:pointer; transition:all .25s; }
.btn-ghost:hover { color:var(--on-surface); border-color:var(--on-surface-variant); }
.btn-primary.sm, .btn-ghost.sm { padding:9px 18px; font-size:14px; width:auto; }

