/* ============================================================
   JOOKIJOO DESIGN SYSTEM — "a world, not a website"
   Tokens live here and only here. Coral is the ONLY action color.
   Character renders are near-white-background studio photographs;
   .stage-img uses multiply blending so they sit inside scenes.
   ============================================================ */
:root{
  /* neutrals */
  --cream:#FFFFFF; --paper:#FFFFFF; --white:#FFFFFF;
  --navy:#24324A; --navy-deep:#1A2538; --brown:#6B574A;
  --ink-soft:rgba(36,50,74,.62); --line:rgba(36,50,74,.10);
  /* action */
  --coral:#FF8C82; --coral-deep:#F0685F;
  /* world palette */
  --peach:#FFB38E; --butter:#FFD977; --mint:#A8E6CF; --sky:#8ED6FF;
  --lavender:#C7B5FF; --aqua:#7FE3D4; --leaf:#7BC99A; --blossom:#FFC9D6;
  --sky-high:#BFE3FF; --sky-low:#EAF6FF;
  --meadow-high:#DFF5E9; --meadow-low:#BCE8CF;
  --twilight-high:#B9C0F0; --twilight-low:#E4D9FA;
  --cove-high:#C4EAF7; --cove-low:#DFF7F0;
  --bakery-high:#FFEEC9; --bakery-low:#FFE0C2;
  --parade-high:#FFD9CF; --parade-low:#FFE9D6;
  /* geometry */
  --r-s:12px; --r-m:20px; --r-l:28px; --r-xl:40px;
  /* layered soft shadows: tight+dark, wide+faint */
  --sh-1:0 1px 2px rgba(36,50,74,.08), 0 8px 24px rgba(36,50,74,.07);
  --sh-2:0 2px 4px rgba(36,50,74,.10), 0 16px 40px rgba(36,50,74,.12);
  --sh-3:0 3px 6px rgba(36,50,74,.12), 0 28px 60px rgba(36,50,74,.16);
  --font-d:'Baloo 2','Nunito',ui-rounded,system-ui,sans-serif;
  --font-b:'Nunito',ui-rounded,system-ui,sans-serif;
  --wrap:1180px;
}
*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--font-b); background:var(--cream); color:var(--navy);
  font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img,svg{ display:block; max-width:100%; }
button{ font:inherit; cursor:pointer; border:0; background:none; color:inherit; }
input,select,textarea{ font:inherit; color:inherit; }
a{ color:inherit; }
h1,h2,h3,h4{ font-family:var(--font-d); line-height:1.12; font-weight:700; }
.skip-link{ position:absolute; left:-9999px; top:0; background:var(--navy); color:#fff; padding:10px 18px; border-radius:0 0 var(--r-s) 0; z-index:200; }
.skip-link:focus{ left:0; }
:focus-visible{ outline:3px solid var(--sky); outline-offset:2px; border-radius:6px; }
::selection{ background:var(--butter); }

/* ---------- Layout ---------- */
.wrap{ max-width:var(--wrap); margin:0 auto; padding:0 24px; }
.app-main{ min-height:calc(100vh - 76px); padding-bottom:96px; }
.section{ padding:72px 0; }
.section.tight{ padding:44px 0; }
.grid{ display:grid; gap:20px; }
.g2{ grid-template-columns:repeat(2,1fr); } .g3{ grid-template-columns:repeat(3,1fr); } .g4{ grid-template-columns:repeat(4,1fr); }
@media(max-width:960px){ .g4{ grid-template-columns:repeat(2,1fr);} .g3{ grid-template-columns:repeat(2,1fr);} }
@media(max-width:620px){ .g4,.g3,.g2{ grid-template-columns:1fr;} .section{ padding:52px 0;} }
.row{ display:flex; align-items:center; gap:12px; }
.row.between{ justify-content:space-between; }
.row.wrap-row{ flex-wrap:wrap; }
.stack{ display:flex; flex-direction:column; gap:12px; }

/* ---------- Type ---------- */
.h-display{ font-size:clamp(40px,6vw,74px); font-weight:800; letter-spacing:-.8px; line-height:1.04; }
.h-hero{ font-size:clamp(38px,5.4vw,62px); font-weight:800; letter-spacing:-.5px; }
.h1{ font-size:clamp(30px,4vw,46px); font-weight:800; letter-spacing:-.4px; }
.h2{ font-size:clamp(23px,2.6vw,32px); }
.h3{ font-size:20px; }
.eyebrow{ font-family:var(--font-d); font-weight:700; font-size:13.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-soft); }
.lead{ font-size:18px; color:var(--ink-soft); max-width:56ch; }
.muted{ color:var(--ink-soft); }
.small{ font-size:14px; }
.tiny{ font-size:12.5px; }
.center{ text-align:center; }
.center .lead{ margin-inline:auto; }

/* ---------- Buttons: coral owns primary, everything else is quiet ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--font-d); font-weight:700; font-size:16.5px;
  padding:13px 26px; border-radius:999px; transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration:none; white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-primary{ background:var(--coral); color:#fff; box-shadow:0 3px 0 var(--coral-deep), var(--sh-1); }
.btn-primary:hover{ background:var(--coral-deep); transform:translateY(-1px); }
.btn-ghost{ background:var(--white); color:var(--navy); border:2px solid var(--line); }
.btn-ghost:hover{ border-color:rgba(36,50,74,.22); transform:translateY(-1px); }
.btn-soft{ background:rgba(36,50,74,.06); color:var(--navy); }
.btn-soft:hover{ background:rgba(36,50,74,.1); }
.btn-big{ font-size:19px; padding:16px 34px; }
.btn-sm{ font-size:14.5px; padding:8px 16px; }
.btn[disabled]{ opacity:.45; cursor:not-allowed; transform:none !important; }
.btn-danger-soft{ background:rgba(240,104,95,.12); color:var(--coral-deep); }
/* the "game portal" flagship button */
.btn-portal{
  background:linear-gradient(160deg,var(--coral),var(--coral-deep)); color:#fff;
  box-shadow:0 4px 0 #D6564E, 0 0 0 6px rgba(255,140,130,.22), var(--sh-2);
  position:relative;
}
.btn-portal:hover{ transform:translateY(-2px); box-shadow:0 6px 0 #D6564E, 0 0 0 9px rgba(255,140,130,.28), var(--sh-3); }
.icon-btn{ display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:14px; background:rgba(36,50,74,.06); transition:background .15s; }
.icon-btn:hover{ background:rgba(36,50,74,.12); }

/* ---------- Cards / chips ---------- */
.card{ background:var(--white); border-radius:var(--r-m); box-shadow:var(--sh-1); padding:24px; border:1px solid rgba(36,50,74,.05); }
.card.lift{ transition:transform .2s ease, box-shadow .2s ease; }
.card.lift:hover{ transform:translateY(-4px); box-shadow:var(--sh-2); }
.card.pad-l{ padding:32px; border-radius:var(--r-l); }
.tinted{ border:none; }
.chip{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-d); font-weight:700; font-size:13.5px; padding:5px 13px; border-radius:999px; background:rgba(36,50,74,.07); }
.chip.on-white{ background:var(--cream); }
.pill-stat{ display:inline-flex; align-items:center; gap:7px; background:var(--white); color:var(--navy); border-radius:999px; padding:7px 15px; font-family:var(--font-d); font-weight:700; font-size:15px; box-shadow:var(--sh-1); }

/* ---------- Nav: dimensional, characterful ---------- */
.nav{ position:sticky; top:0; z-index:60;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px) saturate(1.3);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(255,255,255,.8) inset, 0 6px 18px rgba(36,50,74,.05); }
.nav-inner{ display:flex; align-items:center; justify-content:space-between; height:76px; gap:18px; }
.logo{ display:flex; align-items:center; gap:11px; font-family:var(--font-d); font-weight:800; font-size:25px; text-decoration:none; letter-spacing:-.3px; }
.logo-mascot{ width:44px; height:44px; border-radius:50%; overflow:hidden; flex-shrink:0;
  background:radial-gradient(circle at 50% 34%, #fff 55%, var(--blossom) 130%);
  box-shadow:0 1px 3px rgba(36,50,74,.18), 0 0 0 3px var(--white), 0 0 0 4.5px rgba(36,50,74,.1);
  transition:transform .25s cubic-bezier(.34,1.56,.64,1); }
.logo-mascot img{ width:100%; height:100%; object-fit:cover; transform:scale(1.16) translateY(4%); }
.logo:hover .logo-mascot{ transform:rotate(-8deg) scale(1.07); }
.nav-links{ display:flex; gap:2px; align-items:center; }
.nav-links a{ font-family:var(--font-d); font-weight:700; font-size:15.5px; text-decoration:none; padding:9px 14px; border-radius:999px; color:var(--ink-soft); position:relative; transition:color .15s, transform .18s cubic-bezier(.34,1.56,.64,1); }
.nav-links a::after{ content:''; position:absolute; left:50%; bottom:2px; width:6px; height:6px; border-radius:50%; background:var(--coral); transform:translateX(-50%) scale(0); transition:transform .2s cubic-bezier(.34,1.56,.64,1); }
.nav-links a:hover{ color:var(--navy); transform:translateY(-2px); }
.nav-links a:hover::after{ transform:translateX(-50%) scale(1); }
.nav-links a.active{ color:var(--navy); }
.nav-links a.active::after{ transform:translateX(-50%) scale(1); }
.nav-cta{ display:flex; gap:10px; align-items:center; }
.burger{ display:none; }
@media(max-width:920px){
  .nav-links{ display:none; position:absolute; top:76px; left:0; right:0; background:var(--white); flex-direction:column; padding:16px; box-shadow:var(--sh-2); border-radius:0 0 var(--r-l) var(--r-l); }
  .nav-links.open{ display:flex; }
  .nav-links a{ width:100%; text-align:center; padding:13px; }
  .burger{ display:inline-flex; }
  .nav-cta .btn-ghost{ display:none; }
}

/* ============================================================
   CHARACTER STAGE — the one component every render passes through.
   Renders are 1:1 studio photographs on a near-white background;
   `mix-blend-mode:multiply` dissolves that background into any
   light surface, and the glow + contact shadow ground the figure.
   ============================================================ */
.char-stage{ position:relative; display:grid; place-items:center; flex-shrink:0; }
/* the renders carry their own studio lighting; a CSS glow behind a
   multiply-blended image lightens its backdrop and re-draws the studio
   box, so the glow slot stays reserved but off by default */
.char-stage .stage-glow{ display:none; }
/* brightness lifts the renders' 250-254 studio backdrop to a clamped
   255 white — multiply of pure white is an exact no-op, so the figure
   melts into any scene with zero edge, in every compositing pipeline */
.char-stage .stage-img{ position:relative; width:100%; height:100%; object-fit:contain;
  mix-blend-mode:multiply; filter:brightness(1.03); user-select:none; -webkit-user-drag:none; }
.char-stage .stage-shadow{ position:absolute; left:50%; bottom:1%;
  width:62%; height:9%; transform:translateX(-50%);
  background:radial-gradient(closest-side, rgba(36,50,74,.28), rgba(36,50,74,0) 70%);
  border-radius:50%; pointer-events:none; }
/* studio variant: sits on white product-photography surfaces —
   multiply is imperceptible there and removes the render's box edge */
.char-stage.studio .stage-glow{ display:none; }
/* mystery variant: unreleased characters appear as sculpted
   silhouettes on a deep navy plate (multiply of the white backdrop
   over navy leaves only the figure, darkened) */
/* multiply over the navy plate does the silhouetting itself: the white
   studio backdrop becomes the plate color, the figure goes near-black.
   Keep overall brightness untouched or the backdrop box reappears. */
.char-stage.mystery .stage-img{ mix-blend-mode:multiply; filter:grayscale(.85) contrast(1.06); }
.char-stage.mystery .stage-shadow{ background:radial-gradient(closest-side, rgba(0,0,0,.4), transparent 70%); }
.char-stage.mystery .mystery-mark{ position:absolute; inset:auto auto 6% 50%; transform:translateX(-50%);
  font-family:var(--font-d); font-weight:800; font-size:26px; color:#fff; opacity:.9;
  width:40px; height:40px; display:grid; place-items:center; border-radius:50%;
  background:rgba(36,50,74,.55); backdrop-filter:blur(2px); }
/* airborne characters: soft detached shadow far below */
.char-stage.fly .stage-shadow{ bottom:-14%; width:44%; height:6%; opacity:.5; }
/* fill a %-sized wrapper (photo-stage placements) */
.char-stage.fill{ width:100%; height:100%; }
/* legacy SVG placeholder passthrough */
.char-stage > svg{ position:relative; }

/* character motion (gentle, always subtle) */
@keyframes breathe{ 0%,100%{ transform:translateY(0) scale(1);} 50%{ transform:translateY(-4px) scale(1.012);} }
@keyframes bob{ 0%,100%{ transform:translateY(0) rotate(-1deg);} 50%{ transform:translateY(-7px) rotate(1.2deg);} }
@keyframes floaty{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-14px);} }
@keyframes sway{ 0%,100%{ transform:rotate(-2deg);} 50%{ transform:rotate(2deg);} }
@keyframes wiggle{ 0%,100%{ transform:rotate(0);} 25%{ transform:rotate(-5deg);} 75%{ transform:rotate(5deg);} }
@keyframes hop{ 0%{ transform:translateY(0) scale(1);} 40%{ transform:translateY(-16px) scale(1.06);} 100%{ transform:translateY(0) scale(1);} }
.jook-breathe{ animation:breathe 4.5s ease-in-out infinite; }
.jook-bob{ animation:bob 2.6s ease-in-out infinite; }
.jook-float{ animation:floaty 5.5s ease-in-out infinite; }
.jook-sway{ animation:sway 5s ease-in-out infinite; transform-origin:50% 90%; }
.jook-react{ animation:wiggle .6s ease-in-out 2; }
.jook-hop{ animation:hop .55s cubic-bezier(.34,1.56,.64,1) 1; }
.float-slow{ animation:floaty 7s ease-in-out infinite; }
.float-slower{ animation:floaty 9s ease-in-out infinite reverse; }
.char-stage.char-hover .stage-img{ transition:top .25s cubic-bezier(.34,1.56,.64,1); }
.char-stage.char-hover:hover .stage-img{ top:-6px; }

/* Blend-safe motion overrides for renders.
   A transform ANIMATION promotes the blended image to a GPU layer where
   Chromium applies multiply in a different colour pipeline, and the
   near-white studio backdrop resurfaces as a faint box. Position
   animations repaint on the main thread and blend exactly — so every
   continuous idle animation on .stage-img runs on `top`, never transform. */
@keyframes stage-idle{ 0%,100%{ top:0; } 50%{ top:-5px; } }
@keyframes stage-float{ 0%,100%{ top:0; } 50%{ top:-13px; } }
@keyframes stage-hop{ 0%{ top:0; } 40%{ top:-16px; } 100%{ top:0; } }
.stage-img.jook-breathe, .stage-img.jook-bob, .stage-img.jook-sway{ animation:stage-idle 4.2s ease-in-out infinite; }
.stage-img.jook-float, .stage-img.float-slow{ animation:stage-float 6.5s ease-in-out infinite; }
.stage-img.float-slower{ animation:stage-float 8.5s ease-in-out infinite reverse; }
.stage-img.jook-hop{ animation:stage-hop .55s cubic-bezier(.34,1.56,.64,1) 1; }

/* legacy frame kept for auth/starter cards */
.jook-frame{ display:grid; place-items:center; border-radius:26px; position:relative; }

/* ============================================================
   SCENE SYSTEM — reusable layered environments
   ============================================================ */
/* NOTE: scene layering is done via DOM order, not z-index — character
   renders rely on mix-blend-mode reaching the scene background, and any
   z-indexed / transformed ancestor would isolate them into a white box. */
.scene{ position:relative; overflow:hidden; }
.scene > .wrap{ position:relative; }
.scene-layer{ position:absolute; inset:0; pointer-events:none; }
/* drifting cloud puffs (pure CSS) */
/* solid fill: translucent clouds behind a blended character re-draw
   its studio backdrop in Chromium */
.cl{ position:absolute; background:#FBFDFF; border-radius:999px;
  box-shadow:0 8px 22px rgba(36,50,74,.06); }
.cl::before,.cl::after{ content:''; position:absolute; background:inherit; border-radius:50%; box-shadow:none; }
.cl::before{ width:55%; height:120%; left:12%; top:-45%; }
.cl::after{ width:42%; height:95%; right:14%; top:-28%; }
@keyframes drift{ 0%{ transform:translateX(0);} 50%{ transform:translateX(34px);} 100%{ transform:translateX(0);} }
.cl-drift{ animation:drift 16s ease-in-out infinite; }
.cl-drift2{ animation:drift 22s ease-in-out infinite reverse; }
/* floating sparkle particles */
.sparkle{ position:absolute; width:8px; height:8px; pointer-events:none; opacity:.8; }
@keyframes twinkle{ 0%,100%{ transform:scale(.6); opacity:.25;} 50%{ transform:scale(1.15); opacity:.9;} }
.sparkle{ animation:twinkle 3.2s ease-in-out infinite; }
/* soft sun */
.sun-glow{ position:absolute; border-radius:50%;
  background:radial-gradient(circle, rgba(255,235,170,.95) 0%, rgba(255,217,119,.4) 42%, rgba(255,217,119,0) 70%); }

/* ---------- HERO WORLD: the Cloud District (committed scene art) ---------- */
.hero-world{ position:relative; overflow:hidden;
  background:#BEE0F7 url(../public/backgrounds/cloud.png) center bottom / cover no-repeat; }
.hero-world .hills{ position:absolute; left:0; right:0; bottom:0; width:100%; height:auto; pointer-events:none; }
/* sculpted cloud bank the cast perches on (solid fills: blending-safe) */
.cloud-floor{ position:absolute; left:-4%; right:-4%; bottom:-70px; height:380px; pointer-events:none; }
.cloud-floor i{ position:absolute; border-radius:50%; background:#FFFFFF;
  box-shadow:0 -10px 24px rgba(255,255,255,.9) inset, 0 18px 30px rgba(94,146,196,.14); }
.cloud-floor i.back{ background:#E2F0FB; box-shadow:none; }
.hero-inner{ position:relative; display:grid; grid-template-columns:1.05fr .95fr;
  gap:30px; align-items:center; padding:70px 0 0; min-height:600px; }
.hero-sign{ position:relative;
  background:linear-gradient(180deg, var(--paper), var(--cream));
  border-radius:var(--r-xl); padding:40px 42px 36px;
  box-shadow:0 2px 0 rgba(255,255,255,.9) inset, 0 -3px 0 rgba(36,50,74,.05) inset, var(--sh-3);
  border:1px solid rgba(36,50,74,.06); }

.hero-badge{ display:inline-flex; align-items:center; gap:8px; font-family:var(--font-d); font-weight:700;
  font-size:13.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--brown);
  background:rgba(255,217,119,.4); border-radius:999px; padding:6px 15px; }
.hero-trust{ display:flex; flex-wrap:wrap; gap:8px 20px; color:var(--ink-soft); font-size:13.5px; }
.hero-trust span{ display:inline-flex; gap:7px; align-items:center; }
/* the join kiosk — a little ticket booth */
.kiosk{ position:relative; margin-top:26px; max-width:400px;
  background:var(--white); border-radius:var(--r-m);
  box-shadow:0 3px 0 rgba(36,50,74,.08), var(--sh-2); padding:18px 20px 20px; overflow:hidden; }
.kiosk::before{ content:''; position:absolute; top:0; left:0; right:0; height:14px;
  background:repeating-linear-gradient(90deg, var(--coral) 0 26px, var(--paper) 26px 52px);
  border-radius:var(--r-m) var(--r-m) 0 0; }
.kiosk-form{ display:flex; gap:10px; margin-top:8px; }
.kiosk-form .input{ flex:1; font-family:var(--font-d); font-weight:800; font-size:20px;
  letter-spacing:.28em; text-align:center; padding:10px 12px; }
/* the standing cast */
.hero-cast{ position:relative; min-height:560px; align-self:stretch; }
.cast-jook{ position:absolute; cursor:pointer; }
.hero-ground-blur{ position:absolute; left:-4%; right:-4%; bottom:-20px; height:70px;
  background:linear-gradient(180deg, rgba(255,255,255,0), #FFFFFF 80%);
  filter:blur(5px); pointer-events:none; }
@media(max-width:920px){
  .hero-inner{ grid-template-columns:1fr; min-height:0; padding-top:46px; }
  .hero-cast{ min-height:300px; margin-top:-8px; }
  .hero-sign{ padding:30px 26px; }
}

/* photo scenes: committed environment art as full-bleed backdrops */
.scene-photo{ background-size:cover; background-position:center bottom; background-repeat:no-repeat; }
.photo-stage{ position:relative; width:100%; border-radius:var(--r-l); overflow:hidden; box-shadow:var(--sh-2); }
.photo-stage img.bg{ display:block; width:100%; height:auto; }
/* ---------- SCENIC SECTION shells ---------- */
.scenic{ position:relative; overflow:hidden; padding:76px 0; }
.scenic .wrap{ position:relative; }
.sc-cloud{ background:linear-gradient(180deg, var(--sky-low), #F4FAFF 60%, var(--sky-low)); }
.sc-meadow{ background:linear-gradient(180deg, var(--cream), var(--meadow-high) 85%); }
.sc-twilight{ background:linear-gradient(180deg, var(--twilight-low), var(--twilight-high)); }
.sc-cove{ background:linear-gradient(180deg, var(--cove-high), var(--cove-low)); }
.sc-bakery{ background:linear-gradient(180deg, var(--cream), var(--bakery-high)); }
.sc-parade{ background:linear-gradient(180deg, var(--parade-low), var(--parade-high)); }
.sc-paper{ background:var(--paper); }
.scenic-title{ font-size:clamp(28px,3.6vw,44px); font-weight:800; letter-spacing:-.5px; }
/* rounded horizon divider between scenic sections */
.horizon{ display:block; width:100%; height:56px; margin-bottom:-1px; }

/* ---------- JOURNEY (how it works as a path through a world) ---------- */
.journey{ position:relative; margin-top:34px; }
.journey-path{ position:absolute; left:0; right:0; top:0; height:100%; pointer-events:none; }
.journey-stops{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; position:relative; }
.journey-stop{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:14px; }
.journey-stop:nth-child(2){ transform:translateY(38px); }
.stop-scene{ width:100%; max-width:300px; aspect-ratio:5/4; border-radius:var(--r-l); position:relative;
  overflow:hidden; box-shadow:var(--sh-2); }
.stop-num{ position:absolute; top:12px; left:12px; z-index:4; width:34px; height:34px; display:grid; place-items:center;
  border-radius:12px; background:var(--navy); color:var(--butter);
  font-family:var(--font-d); font-weight:800; font-size:15px; box-shadow:var(--sh-1); }
@media(max-width:860px){
  .journey-stops{ grid-template-columns:1fr; gap:34px; }
  .journey-stop:nth-child(2){ transform:none; }
  .journey-path{ display:none; }
}

/* ---------- WORLD PORTAL CARDS (game modes) ---------- */
.world-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:26px; }
@media(max-width:820px){ .world-grid{ grid-template-columns:1fr; } }
.world-card{ position:relative; border-radius:var(--r-l); overflow:hidden; background:var(--white);
  box-shadow:var(--sh-2); display:flex; flex-direction:column;
  transition:transform .25s ease, box-shadow .25s ease; }
.world-card:hover{ transform:translateY(-6px); box-shadow:var(--sh-3); }
.world-scene{ position:relative; height:230px; overflow:hidden; }
.world-scene svg.terrain{ position:absolute; left:0; right:0; bottom:0; width:100%; height:auto; }
.world-card:hover .world-scene .stage-img{ animation:stage-hop .55s cubic-bezier(.34,1.56,.64,1) 1; }
.world-title-plate{ position:absolute; left:16px; bottom:14px; z-index:5;
  background:rgba(255,253,247,.92); backdrop-filter:blur(6px);
  border-radius:14px; padding:7px 16px; font-family:var(--font-d); font-weight:800; font-size:19px;
  box-shadow:var(--sh-1); display:flex; align-items:center; gap:9px; }
.world-body{ padding:16px 20px 20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.world-meta{ display:flex; flex-wrap:wrap; gap:6px; }
.world-meta .chip{ background:rgba(36,50,74,.05); font-size:12.5px; padding:4px 11px; }
.soon-ribbon{ position:absolute; top:14px; right:-34px; z-index:5; transform:rotate(38deg);
  background:var(--navy); color:var(--butter); font-family:var(--font-d); font-weight:700; font-size:12px;
  letter-spacing:.08em; padding:4px 40px; }
/* per-world palettes */
.w-orchard{ background:linear-gradient(180deg,#CDEFFF 0%, #E4F7EC 55%, #BCE8CF 100%); }
.w-cafe{ background:linear-gradient(180deg,#A8D8F8 0%, #D3ECFC 60%, #F0F8FF 100%); }
.w-tunnels{ background:linear-gradient(180deg,#F3D8B7 0%, #E0B98E 60%, #C99A6E 100%); }
.w-market{ background:linear-gradient(180deg,#8F8AD1 0%, #B9AEE8 55%, #E4D9FA 100%); }
.w-builder{ background:linear-gradient(180deg,#FFEBC2 0%, #FFE1B3 60%, #FFD9A8 100%); }
.w-parcel{ background:linear-gradient(180deg,#7D88C9 0%, #A5A8DF 55%, #D5D3F2 100%); }
.w-parade{ background:linear-gradient(180deg,#FFD9CF 0%, #FFE5D0 60%, #FFEFD9 100%); }
.w-rescue{ background:linear-gradient(180deg,#BFE0F5 0%, #DDF0FB 60%, #F2FAFF 100%); }

/* ============================================================
   COLLECTIBLE PRODUCT CARDS
   ============================================================ */
/* standard portrait product card — studio photography look */
.jook-product{ position:relative; border-radius:var(--r-l); overflow:hidden; background:var(--white);
  color:var(--navy); box-shadow:var(--sh-1); display:flex; flex-direction:column; text-align:center;
  transition:transform .25s ease, box-shadow .25s ease; border:1px solid rgba(36,50,74,.05); }
.jook-product:hover{ transform:translateY(-6px); box-shadow:var(--sh-2); }
.jook-product .product-photo{ position:relative; aspect-ratio:1/1; display:grid; place-items:center;
  background:radial-gradient(120% 90% at 50% 30%, #FFFFFF 55%, #F4F1EA 100%); overflow:hidden; }
.jook-product .product-photo .char-stage{ width:82%; height:82%; }
.jook-product:hover .product-photo .stage-img{ animation:stage-idle 1.8s ease-in-out infinite; }
.jook-product .product-photo .floor-line{ position:absolute; left:0; right:0; bottom:22%;
  height:1px; background:linear-gradient(90deg, transparent, rgba(36,50,74,.08), transparent); }
.jook-product .product-body{ padding:6px 18px 20px; display:flex; flex-direction:column; gap:6px; align-items:center; }
.jook-product .product-name{ font-family:var(--font-d); font-weight:800; font-size:20px; letter-spacing:-.2px; }
.jook-product .product-personality{ font-size:13.5px; color:var(--ink-soft); }
.series-chip{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-d); font-weight:700;
  font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--brown);
  background:var(--cream); border-radius:999px; padding:4px 12px; }
.coll-num{ position:absolute; top:12px; left:14px; z-index:3; font-family:var(--font-d); font-weight:800; font-size:13px; color:rgba(36,50,74,.4); }
.fav-btn{ position:absolute; top:8px; right:8px; z-index:3; }
/* mystery / locked card */
.jook-product.mystery-card .product-photo{
  background:radial-gradient(120% 100% at 50% 26%, #35486E 0%, var(--navy) 62%, var(--navy-deep) 100%); }
.jook-product.mystery-card .product-name{ color:var(--ink-soft); }
/* rarity tag */
.rarity-tag{ display:inline-flex; gap:6px; align-items:center; font-family:var(--font-d); font-weight:800; font-size:12px; letter-spacing:.06em; text-transform:uppercase; padding:4px 11px; border-radius:999px; color:var(--navy); }
/* wide featured spotlight */
.jook-feature{ position:relative; border-radius:var(--r-xl); overflow:hidden; box-shadow:var(--sh-2);
  display:grid; grid-template-columns:1fr 1.1fr; align-items:center; min-height:340px; }
.jook-feature .feature-photo{ position:relative; height:100%; min-height:300px; display:grid; place-items:center; }
.jook-feature .feature-photo .char-stage{ width:min(82%,330px); aspect-ratio:1/1; }
.jook-feature .feature-body{ padding:36px 40px; display:flex; flex-direction:column; gap:12px; }
@media(max-width:780px){
  .jook-feature{ grid-template-columns:1fr; }
  .jook-feature .feature-body{ padding:6px 26px 30px; text-align:center; align-items:center; }
}
/* series banner rows */
.series-banner{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;
  min-height:118px; color:var(--navy); border-radius:var(--r-l); padding:20px 26px 16px; margin:38px 0 18px;
  box-shadow:var(--sh-1); position:relative; overflow:hidden; }
.series-banner h3{ font-size:clamp(21px,2.4vw,27px); font-weight:800; letter-spacing:-.3px; }
/* small companion card */
.companion-card{ display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;
  background:var(--white); border-radius:var(--r-m); padding:14px 10px 12px; box-shadow:var(--sh-1);
  transition:transform .2s ease; }
.companion-card:hover{ transform:translateY(-4px); }
.companion-card .char-stage{ width:84px; height:84px; }
/* pedestal used in showcases */
.pedestal{ position:relative; display:grid; place-items:center; }
.pedestal::after{ content:''; position:absolute; bottom:-6px; left:50%; transform:translateX(-50%);
  width:74%; height:26px; border-radius:50%;
  background:radial-gradient(closest-side, rgba(36,50,74,.16), transparent 72%); }

/* ---------- Starry showcase pattern (from the shop reference:
   textured watercolor blue, spiky gold stars, clean cards floating) ---------- */
.starry, .page-starry{ position:relative; color:#fff; background-color:#3A72C2;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27260%27%20height%3D%27260%27%3E%3Cdefs%3E%3Cpolygon%20id%3D%27s%27%20points%3D%2713%2C0%204.6%2C1.9%209.2%2C9.2%201.9%2C4.6%200%2C13%20-1.9%2C4.6%20-9.2%2C9.2%20-4.6%2C1.9%20-13%2C0%20-4.6%2C-1.9%20-9.2%2C-9.2%20-1.9%2C-4.6%200%2C-13%201.9%2C-4.6%209.2%2C-9.2%204.6%2C-1.9%27%2F%3E%3Cfilter%20id%3D%27b%27%3E%3CfeGaussianBlur%20stdDeviation%3D%2718%27%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Crect%20width%3D%27260%27%20height%3D%27260%27%20fill%3D%27%233A72C2%27%2F%3E%3Cg%20filter%3D%27url(%23b)%27%20opacity%3D%27.5%27%3E%3Ccircle%20cx%3D%2740%27%20cy%3D%2760%27%20r%3D%2760%27%20fill%3D%27%232F62AE%27%2F%3E%3Ccircle%20cx%3D%27200%27%20cy%3D%2740%27%20r%3D%2770%27%20fill%3D%27%234B84D4%27%2F%3E%3Ccircle%20cx%3D%27120%27%20cy%3D%27170%27%20r%3D%2780%27%20fill%3D%27%2333689F%27%2F%3E%3Ccircle%20cx%3D%27230%27%20cy%3D%27210%27%20r%3D%2760%27%20fill%3D%27%234B84D4%27%2F%3E%3Ccircle%20cx%3D%2720%27%20cy%3D%27220%27%20r%3D%2750%27%20fill%3D%27%232F62AE%27%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%27%23FFC93C%27%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(36%2C34)%20rotate(14)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(130%2C20)%20rotate(-30)%20scale(.55)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(210%2C58)%20rotate(40)%20scale(.8)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(70%2C110)%20rotate(-12)%20scale(.5)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(170%2C130)%20rotate(22)%20scale(1.15)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(28%2C180)%20rotate(52)%20scale(.7)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(110%2C230)%20rotate(-24)%20scale(.9)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(226%2C200)%20rotate(10)%20scale(.6)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(250%2C130)%20rotate(-40)%20scale(.45)%27%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%27%23F0932F%27%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(92%2C66)%20rotate(30)%20scale(.4)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(196%2C96)%20rotate(-18)%20scale(.5)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(52%2C246)%20rotate(24)%20scale(.45)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(150%2C186)%20rotate(-8)%20scale(.35)%27%2F%3E%3Cuse%20href%3D%27%23s%27%20transform%3D%27translate(14%2C130)%20rotate(66)%20scale(.38)%27%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%27%23FFE39A%27%3E%3Ccircle%20cx%3D%2760%27%20cy%3D%2716%27%20r%3D%272%27%2F%3E%3Ccircle%20cx%3D%27236%27%20cy%3D%2726%27%20r%3D%271.6%27%2F%3E%3Ccircle%20cx%3D%27104%27%20cy%3D%27150%27%20r%3D%271.8%27%2F%3E%3Ccircle%20cx%3D%27190%27%20cy%3D%27236%27%20r%3D%272%27%2F%3E%3Ccircle%20cx%3D%276%27%20cy%3D%2784%27%20r%3D%271.6%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }
/* full-bleed page treatment: white product cards float straight on the sky */
.page-starry{ padding:6px 0 60px; }
.page-starry .appbar a{ color:rgba(255,255,255,.88); }
.page-starry .appbar a:hover:not(.active){ background:rgba(255,255,255,.16); transform:translateY(-2px); }
.page-starry .appbar a.active{ color:var(--navy); }
.page-starry .shop-shelf-row h3{ color:#fff; }
.page-starry .shop-shelf-row .tiny{ color:rgba(255,255,255,.85); }
.page-starry .field > .tiny{ color:rgba(255,255,255,.85); }
.page-starry > .wrap > h1{ color:#fff; }

/* ---------- SHOP ---------- */
.shop-front{ position:relative; border-radius:var(--r-l); overflow:hidden; margin-bottom:26px;
  color:var(--navy); background:linear-gradient(180deg, var(--bakery-high), var(--cream)); box-shadow:var(--sh-1); }
.shop-awning{ height:20px; background:repeating-linear-gradient(90deg, var(--coral) 0 42px, var(--paper) 42px 84px); }
.shop-awning-scallop{ display:flex; }
.shop-awning-scallop i{ flex:1; height:12px; border-radius:0 0 999px 999px; }
.shop-awning-scallop i:nth-child(odd){ background:var(--coral); }
.shop-awning-scallop i:nth-child(even){ background:var(--paper); }
.shop-front-inner{ display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; padding:22px 28px 24px; }
.shop-shelf-row{ margin:26px 0 8px; display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.shop-shelf-row h3{ font-size:22px; font-weight:800; }
.shelf-edge{ height:10px; border-radius:6px; margin-top:14px;
  background:linear-gradient(180deg,#C9A87E,#A9855C); box-shadow:0 3px 6px rgba(36,50,74,.15); }
.shop-product{ position:relative; border-radius:var(--r-l); overflow:hidden; background:var(--white);
  color:var(--navy); box-shadow:var(--sh-1); display:flex; flex-direction:column; text-align:center;
  transition:transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; }
.shop-product:hover{ transform:translateY(-6px) rotate(-.5deg); box-shadow:var(--sh-2); }
.shop-product .product-photo{ position:relative; height:190px; display:grid; place-items:center;
  background:radial-gradient(120% 95% at 50% 28%, #FFFFFF 52%, #F4F1EA 100%); }
.shop-product:hover .product-photo > *:first-child{ animation:bob 1.4s ease-in-out infinite; }
.shop-product .product-body{ padding:6px 18px 18px; display:flex; flex-direction:column; gap:8px; align-items:center; flex:1; }
.shop-tag{ position:absolute; top:12px; left:12px; z-index:3; }
/* CSS-built mystery pack (until final pack art lands) */
.pack-3d{ position:relative; width:118px; height:148px; border-radius:18px;
  background:linear-gradient(155deg, var(--lavender) 0%, #9F86E8 55%, #7A5BB5 100%);
  box-shadow:inset 0 2px 6px rgba(255,255,255,.5), inset 0 -8px 16px rgba(36,50,74,.25), 0 10px 22px rgba(36,50,74,.22); }
.pack-3d::before{ content:''; position:absolute; inset:0; border-radius:18px;
  background:radial-gradient(80% 45% at 30% 12%, rgba(255,255,255,.55), transparent 60%); }
.pack-3d .pack-ribbon{ position:absolute; left:50%; top:0; bottom:0; width:22px; transform:translateX(-50%);
  background:linear-gradient(90deg, #FFE9A8, var(--butter) 50%, #E8B94A); box-shadow:0 0 8px rgba(255,217,119,.5); }
.pack-3d .pack-ribbon::after{ content:''; position:absolute; top:-10px; left:50%; transform:translateX(-50%);
  width:44px; height:24px; border-radius:50% 50% 40% 40%;
  background:radial-gradient(circle at 30% 30%, #FFE9A8, #E8B94A); box-shadow:0 2px 4px rgba(36,50,74,.25); }
.pack-3d.sparkling{ background:linear-gradient(155deg, #8ED6FF 0%, #6FA8F0 55%, #4A6FD1 100%); }
.pedestal-disc{ width:120px; height:16px; border-radius:50%; margin-top:-6px;
  background:radial-gradient(closest-side, rgba(36,50,74,.2), transparent 75%); }

/* ---------- FINALE / PARADE ---------- */
.parade-strip{ display:flex; align-items:flex-end; justify-content:center; gap:2vw; padding:16px 0 4px; }
.parade-strip .char-stage{ width:clamp(64px,9vw,120px); aspect-ratio:1/1; }
.bunting{ display:flex; justify-content:center; gap:4px; margin-bottom:12px; }
.bunting i{ width:0; height:0; border-left:11px solid transparent; border-right:11px solid transparent; border-top-width:16px; border-top-style:solid; opacity:.85; }

/* ---------- Marketing leftovers ---------- */
.faq-item{ border-bottom:1px solid var(--line); }
.faq-item summary{ font-family:var(--font-d); font-weight:700; font-size:17px; padding:18px 0; cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item p{ padding:0 0 18px; color:var(--ink-soft); max-width:64ch; }
.quote-bubble{ position:relative; background:var(--white); border-radius:var(--r-m); padding:20px 22px; box-shadow:var(--sh-1); }
.quote-bubble::after{ content:''; position:absolute; left:34px; bottom:-10px; width:20px; height:20px;
  background:var(--white); transform:rotate(45deg); border-radius:4px; box-shadow:6px 6px 12px rgba(36,50,74,.05); }

/* ---------- Footer: night sky over the town ---------- */
.footer{ position:relative; overflow:hidden; color:rgba(255,255,255,.85); padding:64px 0 34px; margin-top:40px;
  background:linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius:var(--r-xl) var(--r-xl) 0 0; }
.footer a{ color:rgba(255,255,255,.72); text-decoration:none; }
.footer a:hover{ color:#fff; }
.footer .cols{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:28px; position:relative; }
@media(max-width:760px){ .footer .cols{ grid-template-columns:1fr 1fr; } }
.footer-stars{ position:absolute; inset:0; pointer-events:none; }
/* positioned (paints over the starfield) but never opacity/z-indexed —
   that would isolate the silhouettes' blend and bring back white boxes */
.footer-parade{ display:flex; justify-content:center; gap:14px; margin-bottom:30px; position:relative; }
.footer-parade .char-stage{ width:52px; height:52px; }

/* ---------- Forms ---------- */
.field{ display:flex; flex-direction:column; gap:7px; }
.field label{ font-family:var(--font-d); font-weight:700; font-size:14.5px; }
.input, select.input, textarea.input{
  background:var(--white); border:2px solid var(--line); border-radius:14px;
  padding:12px 15px; font-size:16px; transition:border-color .15s; width:100%;
}
.input:focus{ outline:none; border-color:var(--sky); }
textarea.input{ resize:vertical; min-height:110px; }
.seg{ display:inline-flex; background:rgba(36,50,74,.06); padding:4px; border-radius:999px; gap:4px; }
.seg button{ font-family:var(--font-d); font-weight:700; font-size:14.5px; padding:8px 16px; border-radius:999px; color:var(--ink-soft); }
.seg button.active{ background:var(--white); color:var(--navy); box-shadow:var(--sh-1); }

/* ---------- App shell (student / teacher) ---------- */
.appbar{ display:flex; gap:8px; overflow-x:auto; padding:14px 0 4px; scrollbar-width:none; }
.appbar::-webkit-scrollbar{ display:none; }
.appbar a{ font-family:var(--font-d); font-weight:700; font-size:15px; text-decoration:none; color:var(--ink-soft); padding:9px 16px; border-radius:999px; white-space:nowrap; display:inline-flex; gap:8px; align-items:center; transition:transform .18s cubic-bezier(.34,1.56,.64,1), background .15s; }
.appbar a.active{ background:var(--white); color:var(--navy); box-shadow:var(--sh-1); }
.appbar a:hover:not(.active){ background:rgba(36,50,74,.06); transform:translateY(-2px); }
.dash-hero{ border-radius:var(--r-l); padding:30px 34px; display:flex; align-items:center; gap:26px; flex-wrap:wrap; position:relative; overflow:hidden; box-shadow:var(--sh-1); }
.dash-hero .dash-scene-hills{ position:absolute; left:0; right:0; bottom:0; pointer-events:none; }
.xp-track{ height:12px; background:rgba(36,50,74,.1); border-radius:999px; overflow:hidden; min-width:180px; }
.xp-fill{ height:100%; background:linear-gradient(90deg,var(--butter),var(--peach)); border-radius:999px; transition:width .6s cubic-bezier(.4,0,.2,1); }
.bento{ display:grid; grid-template-columns:repeat(6,1fr); gap:18px; }
.bento > *{ grid-column:span 2; }
.bento .w3{ grid-column:span 3; } .bento .w6{ grid-column:span 6; } .bento .w4{ grid-column:span 4; }
.bento .w2{ grid-column:span 2; }
@media(max-width:960px){ .bento{ grid-template-columns:repeat(2,1fr);} .bento > *, .bento .w3, .bento .w4{ grid-column:span 2;} .bento .w6{ grid-column:span 2;} }
.mini-stat{ display:flex; flex-direction:column; gap:2px; }
.mini-stat b{ font-family:var(--font-d); font-size:24px; }
.list-row{ display:flex; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid var(--line); }
.list-row:last-child{ border-bottom:0; }
.bar{ height:10px; border-radius:999px; background:rgba(36,50,74,.08); overflow:hidden; flex:1; }
.bar i{ display:block; height:100%; border-radius:999px; }

/* ---------- Legacy jook-card (auth starter picker) ---------- */
.jook-card{ padding:0; overflow:hidden; text-align:center; position:relative; display:flex; flex-direction:column; }
.jook-card .art{ padding:22px 0 8px; display:grid; place-items:center; }
.jook-card .body{ padding:4px 16px 18px; display:flex; flex-direction:column; gap:6px; align-items:center; }
.jook-card.locked .art{ filter:saturate(.05) opacity(.85); }
.equip-star{ position:absolute; top:12px; right:12px; }

/* ---------- Shop odds / pack opening ---------- */
.odds-table{ width:100%; border-collapse:collapse; font-size:14.5px; }
.odds-table td{ padding:7px 4px; border-bottom:1px solid var(--line); }
.pack-stage{ min-height:380px; display:grid; place-items:center; position:relative; }
.pack{ width:170px; height:210px; border-radius:22px; background:linear-gradient(160deg,var(--lavender),#7A5BB5); box-shadow:inset 0 2px 6px rgba(255,255,255,.5), inset 0 -10px 18px rgba(36,50,74,.3), var(--sh-2); display:grid; place-items:center; position:relative; color:#fff; }
.pack::after{ content:''; position:absolute; inset:12px; border:2px dashed rgba(255,255,255,.5); border-radius:16px; }
.pack.shake, .shake{ animation:shake .5s ease-in-out 3; }
@keyframes shake{ 0%,100%{ transform:rotate(0);} 20%{ transform:rotate(-6deg) translateX(-4px);} 60%{ transform:rotate(6deg) translateX(4px);} }
.pack-glow{ position:absolute; width:280px; height:280px; border-radius:50%; filter:blur(46px); opacity:0; transition:opacity .7s; }
.pack-glow.on{ opacity:.85; }
.reveal-pop{ animation:pop .55s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes pop{ 0%{ transform:scale(.4); opacity:0;} 100%{ transform:scale(1); opacity:1;} }

/* ---------- Live game ---------- */
.game-shell{ min-height:calc(100vh - 76px); display:flex; flex-direction:column; }
.game-top{ display:flex; justify-content:space-between; align-items:center; gap:14px; padding:16px 0; flex-wrap:wrap; }
.timer-ring{ position:relative; width:64px; height:64px; }
.timer-ring svg{ transform:rotate(-90deg); }
.timer-ring b{ position:absolute; inset:0; display:grid; place-items:center; font-family:var(--font-d); font-size:19px; }
.q-card{ background:var(--white); border-radius:var(--r-l); box-shadow:var(--sh-2); padding:34px; text-align:center; }
.answers{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:22px; }
@media(max-width:620px){ .answers{ grid-template-columns:1fr; } }
.answer-btn{
  font-family:var(--font-d); font-weight:700; font-size:18px; padding:20px 18px;
  border-radius:20px; color:var(--navy); display:flex; align-items:center; gap:13px;
  border:3px solid transparent; transition:transform .12s, border-color .12s, filter .12s; min-height:76px; text-align:left;
}
.answer-btn:hover:not([disabled]){ transform:translateY(-2px); }
.answer-btn .key{ width:34px; height:34px; border-radius:11px; background:rgba(255,255,255,.7); display:grid; place-items:center; font-size:15px; flex-shrink:0; }
.answer-btn.picked{ border-color:var(--navy); }
.answer-btn.is-correct{ border-color:var(--navy); box-shadow:var(--sh-2); }
.answer-btn.is-wrong{ opacity:.45; }
.result-flag{ display:inline-flex; gap:8px; align-items:center; font-family:var(--font-d); font-weight:800; font-size:17px; padding:9px 18px; border-radius:999px; }
.orchard{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
@media(max-width:760px){ .orchard{ grid-template-columns:repeat(2,1fr);} }
.tree-plot{ background:var(--white); border-radius:20px; box-shadow:var(--sh-1); padding:16px 12px 14px; text-align:center; display:flex; flex-direction:column; gap:8px; align-items:center; min-height:210px; justify-content:space-between; }
.tree-svg{ height:104px; display:grid; place-items:center; }
.grow-pop{ animation:pop .4s cubic-bezier(.34,1.56,.64,1); }
.water-chip{ display:inline-flex; gap:7px; align-items:center; font-family:var(--font-d); font-weight:800; font-size:17px; background:var(--white); padding:8px 17px; border-radius:999px; box-shadow:var(--sh-1); }
.lobby-cloud{ display:flex; flex-wrap:wrap; gap:14px; justify-content:center; padding:20px 0; min-height:150px; }
.lobby-player{ display:flex; flex-direction:column; gap:6px; align-items:center; animation:pop .5s cubic-bezier(.34,1.56,.64,1) both; }
.lobby-player .char-stage, .standings .char-stage{ background:radial-gradient(circle at 50% 34%, #fff 60%, #F0EBDF 130%); border-radius:50%; overflow:hidden; box-shadow:var(--sh-1); }
.lobby-player .char-stage .stage-img, .standings .char-stage .stage-img{ transform:scale(1.12) translateY(3%); }
.lobby-player .nm{ font-family:var(--font-d); font-weight:700; font-size:13.5px; background:var(--white); border-radius:999px; padding:3px 12px; box-shadow:var(--sh-1); }
.code-display{ font-family:var(--font-d); font-weight:800; font-size:clamp(38px,6vw,58px); letter-spacing:.18em; background:var(--white); border-radius:var(--r-m); padding:8px 26px; box-shadow:var(--sh-1); }
.standings li{ display:flex; align-items:center; gap:13px; padding:11px 14px; border-radius:16px; background:var(--white); box-shadow:var(--sh-1); margin-bottom:9px; list-style:none; transition:transform .4s; }
.standings .rank{ font-family:var(--font-d); font-weight:800; width:30px; text-align:center; font-size:17px; }
.standings li.me{ border:2px solid var(--navy); }
.dist-row{ display:flex; align-items:center; gap:12px; margin-bottom:9px; }
.dist-row .bar{ height:26px; border-radius:10px; }
.dist-row .bar i{ display:flex; align-items:center; padding:0 10px; color:var(--navy); font-family:var(--font-d); font-weight:700; font-size:13.5px; min-width:fit-content; }

/* ---------- Modal / toast / confetti ---------- */
.modal-veil{ position:fixed; inset:0; background:rgba(36,50,74,.4); backdrop-filter:blur(6px); display:grid; place-items:center; z-index:100; padding:20px; animation:fade .2s ease both; }
@keyframes fade{ from{ opacity:0;} to{ opacity:1;} }
.modal{ background:var(--cream); border-radius:var(--r-l); box-shadow:var(--sh-2); max-width:640px; width:100%; max-height:88vh; overflow:auto; padding:30px; position:relative; animation:pop .3s cubic-bezier(.34,1.56,.64,1) both; }
.modal.wide{ max-width:840px; }
.modal-close{ position:absolute; top:14px; right:14px; }
.toast-zone{ position:fixed; bottom:22px; left:50%; transform:translateX(-50%); z-index:120; display:flex; flex-direction:column; gap:10px; align-items:center; pointer-events:none; }
.toast{ background:var(--navy); color:#fff; font-family:var(--font-d); font-weight:700; padding:12px 22px; border-radius:999px; box-shadow:var(--sh-2); display:flex; gap:10px; align-items:center; animation:toast-in .35s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes toast-in{ from{ transform:translateY(24px); opacity:0;} to{ transform:none; opacity:1;} }
.confetti-bit{ position:fixed; top:-16px; width:10px; height:14px; border-radius:3px; z-index:130; animation:confetti-fall linear both; pointer-events:none; }
@keyframes confetti-fall{ to{ transform:translateY(105vh) rotate(720deg); } }

/* ---------- Tables (teacher) ---------- */
.table{ width:100%; border-collapse:collapse; font-size:15px; }
.table th{ font-family:var(--font-d); text-align:left; font-size:13.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--ink-soft); padding:10px 12px; border-bottom:2px solid var(--line); }
.table td{ padding:12px; border-bottom:1px solid var(--line); }
.table tr:hover td{ background:rgba(36,50,74,.025); }
@media(max-width:760px){ .table-scroll{ overflow-x:auto; } .table{ min-width:640px; } }

/* ---------- Empty & misc ---------- */
.empty{ text-align:center; padding:44px 22px; color:var(--ink-soft); display:flex; flex-direction:column; gap:12px; align-items:center; }
.divider{ height:1px; background:var(--line); margin:20px 0; }
.streak-flame{ animation:flame 1.6s ease-in-out infinite; transform-origin:50% 90%; display:inline-flex; }
@keyframes flame{ 0%,100%{ transform:scale(1);} 50%{ transform:scale(1.08) rotate(-2deg);} }
.count-up{ font-variant-numeric:tabular-nums; }
.demo-note{ background:var(--navy); color:rgba(255,255,255,.9); font-size:13.5px; text-align:center; padding:8px 16px; }
.demo-note b{ color:var(--butter); }
.habitat-scene{ border-radius:var(--r-l); min-height:320px; position:relative; overflow:hidden; box-shadow:var(--sh-1); }
.habitat-slot{ position:absolute; width:96px; height:96px; border-radius:22px; border:3px dashed rgba(36,50,74,.25); display:grid; place-items:center; background:rgba(255,255,255,.35); transition:border-color .15s, background .15s; }
.habitat-slot:hover{ border-color:var(--navy); background:rgba(255,255,255,.6); }
.habitat-slot.filled{ border-style:solid; border-color:transparent; background:transparent; }
.qr-box{ background:var(--white); padding:12px; border-radius:16px; box-shadow:var(--sh-1); }
.hero-quiz-card{ background:var(--white); border-radius:var(--r-l); box-shadow:var(--sh-2); padding:22px; }
.demo-answers{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px; }
.demo-answer{ font-family:var(--font-d); font-weight:700; font-size:14.5px; padding:12px; border-radius:14px; display:flex; gap:8px; align-items:center; }

/* ---------- Game chrome / join ---------- */
.game-scene{ min-height:calc(100vh - 92px); padding:18px 0 40px;
  background:linear-gradient(180deg, var(--sky-low) 0%, var(--meadow-high) 70%, var(--meadow-low) 100%); }
.center-fill{ display:flex; align-items:center; justify-content:center; min-height:70vh; }
.game-hud{ display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;
  background:var(--white); border-radius:var(--r-m); padding:10px 14px; box-shadow:var(--sh-1); }
.code-input{ font-family:var(--font-d); font-weight:800; font-size:30px; letter-spacing:.35em;
  text-align:center; }
.count-num{ font-family:var(--font-d); font-weight:800; font-size:104px; color:var(--coral);
  line-height:1; text-shadow:0 6px 0 rgba(36,50,74,.08); }
.pop-in{ animation:popIn .45s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes popIn{ from{ transform:scale(.6); opacity:0; } to{ transform:scale(1); opacity:1; } }
.dots{ display:inline-flex; gap:4px; }
.dots i{ width:7px; height:7px; border-radius:50%; background:var(--brown); opacity:.5;
  animation:dotPulse 1.2s infinite; }
.dots i:nth-child(2){ animation-delay:.2s; } .dots i:nth-child(3){ animation-delay:.4s; }
@keyframes dotPulse{ 0%,100%{ transform:translateY(0); opacity:.4;} 50%{ transform:translateY(-4px); opacity:1;} }
.tree-art{ display:flex; justify-content:center; }
.empty-plot{ border:2.5px dashed var(--peach); background:rgba(255,255,255,.6); justify-content:center; }
.switch{ width:52px; height:30px; border-radius:999px; background:#E5DCCB; position:relative;
  transition:background .2s; flex-shrink:0; }
.switch i{ position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%;
  background:#fff; box-shadow:var(--sh-1); transition:left .2s; }
.switch.on{ background:var(--mint); }
.switch.on i{ left:25px; }
#proto-note{ position:fixed; left:16px; bottom:16px; z-index:60; max-width:330px;
  background:var(--navy); color:#fff; border-radius:var(--r-m); padding:14px 38px 14px 16px;
  font-size:13.5px; line-height:1.45; box-shadow:var(--sh-2); }
#proto-note b{ color:var(--butter); }
#proto-note button{ position:absolute; top:6px; right:8px; color:#fff; font-size:20px;
  width:28px; height:28px; border-radius:50%; }
#proto-note button:hover{ background:rgba(255,255,255,.15); }
@media(max-width:600px){ #proto-note{ left:10px; right:10px; max-width:none; } }
button.card{ text-align:left; }
button.jook-card{ display:flex; }
button.jook-product{ display:flex; }
button.product-photo{ width:100%; border:0; cursor:pointer; }
@media print{ #proto-note{ display:none; } }

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