:root {
  --bg: #140a33;
  --ink: #fff;
  --muted: #cfc8ff;
  --card: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .14);
  --yellow: #ffd34d;
  --pink: #ff5fa2;
  --cyan: #3ee6d2;
  --violet: #8b5cff;
  --c: #8b5cff;
  --font: "Baloo Bhaijaan 2", system-ui, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0; }

/* ---------- Background ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 700px at 85% -10%, #4a1fb0 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 110%, #0d5a8a 0%, transparent 60%),
    linear-gradient(180deg, #160b3a, #10082a);
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .4; animation: blob 20s ease-in-out infinite; }
.b1 { width: 460px; height: 460px; background: #ff5fa2; top: 12%; left: -140px; }
.b2 { width: 520px; height: 520px; background: #22d3c5; bottom: -160px; right: -120px; animation-delay: -6s; }
.b3 { width: 380px; height: 380px; background: #8b5cff; top: 45%; left: 40%; animation-delay: -12s; opacity: .3; }
@keyframes blob { 50% { transform: translate(60px, -40px) scale(1.12); } }
.starfield {
  position: absolute; inset: -50%;
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 140px 80px, #fff, transparent),
    radial-gradient(2px 2px at 220px 190px, #ffe9a8, transparent),
    radial-gradient(1.2px 1.2px at 80px 240px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 260px 40px, #bdf, transparent);
  background-size: 300px 300px;
  opacity: .45;
  animation: drift 120s linear infinite;
}
@keyframes drift { to { transform: translate(300px, 300px); } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(14px, 3vw, 36px);
  background: rgba(20, 10, 51, .6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 52px; height: auto; display: block; margin: -4px 0; animation: logo-bob 3s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)) drop-shadow(0 0 12px rgba(62, 160, 255, .5)); }
@keyframes logo-bob { 50% { transform: translateY(-3px) rotate(-6deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.brand-name b { background: linear-gradient(90deg, var(--yellow), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hud { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .09); border: 1px solid var(--line);
  font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap;
}
.chip small { opacity: .6; }
.chip.icon { cursor: pointer; font-size: 18px; padding: 6px 12px; }
.chip.icon:hover { background: rgba(255, 255, 255, .16); }
.install-chip {
  cursor: pointer; font-size: 14px; font-weight: 800; padding: 6px 14px;
  background: linear-gradient(180deg, #6eeaf3, #22bfd0);
  border-color: #b5f6fb; color: #04303d;
  box-shadow: 0 3px 0 #0e8a9c, 0 8px 18px -8px rgba(34, 211, 238, .85);
  animation: install-pulse 1.6s ease-in-out infinite;
}
.install-chip:hover { filter: brightness(1.06); }
.install-chip:disabled { opacity: .7; animation: none; }
@keyframes install-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.star-chip { background: linear-gradient(135deg, rgba(255, 211, 77, .25), rgba(255, 138, 61, .2)); border-color: rgba(255, 211, 77, .5); }
.star-chip b { font-size: 18px; color: var(--yellow); }
.star-ico { display: inline-block; animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-18deg) scale(1.2); } 20% { transform: rotate(14deg); } 30% { transform: rotate(0); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 0; border-radius: 14px; cursor: pointer;
  background: #fff; color: #2a1a5e; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 0 #b6acec, 0 8px 18px -6px rgba(0, 0, 0, .4);
  transition: transform .08s, box-shadow .08s, filter .2s;
  user-select: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b6acec; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--c); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, #000), 0 10px 22px -8px var(--c); }
.btn.primary:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 60%, #000); }
.btn.primary-y { background: linear-gradient(180deg, #ffe169, #ffc21a); color: #3b2300; box-shadow: 0 6px 0 #c98a00, 0 16px 30px -10px rgba(255, 194, 26, .7); }
.btn.primary-y:active { box-shadow: 0 2px 0 #c98a00; }
.btn.big { font-size: 22px; padding: 14px 30px; border-radius: 20px; }
.btn.danger { background: #ff5d5d; color: #fff; box-shadow: 0 4px 0 #b52f2f; }
.btn.glow { animation: glowpulse 1.2s ease-in-out infinite; }
@keyframes glowpulse { 50% { box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 8px color-mix(in srgb, var(--c) 35%, transparent); } }

/* ---------- Home: hero ---------- */
.hero { position: relative; min-height: calc(100vh - 64px); display: flex; align-items: center; overflow: hidden; }
.hero-play { position: absolute; inset: 0; }
.hero-play canvas { display: block; }
.hero-inner {
  position: relative; z-index: 2; pointer-events: none;
  width: min(1200px, 100%); margin: 0 auto; padding: 40px clamp(18px, 4vw, 40px);
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 30px;
}
.hero-inner .btn, .hero-inner a { pointer-events: auto; }
.pill {
  display: inline-block; padding: 6px 16px; border-radius: 999px; font-weight: 700;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(64px, 11vw, 140px); font-weight: 800; letter-spacing: -2px; line-height: 1;
  background: linear-gradient(100deg, #fff 10%, #9ef0ff 50%, #c3a6ff 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 30px rgba(139, 92, 255, .5));
}
.hero h1 span { background: linear-gradient(90deg, var(--yellow), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(18px, 2vw, 22px); color: #e7e2ff; max-width: 600px; margin: 18px 0 26px; }
.lead b { color: var(--yellow); }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-stats { color: var(--muted); }
.hero-stats b { color: #fff; font-size: 20px; }
.hero-hint { margin-top: 26px; display: inline-block; padding: 8px 16px; border-radius: 14px; background: rgba(62, 230, 210, .12); border: 1px dashed rgba(62, 230, 210, .5); color: #bffcf4; }
.hero-mascot { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-mascot .fizo { width: min(340px, 80%); animation: hover 3.5s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
@keyframes hover { 50% { transform: translateY(-18px) rotate(3deg); } }
.hero-bubble {
  background: #fff; color: #2a1a5e; font-size: 20px; padding: 14px 22px; border-radius: 24px; font-weight: 600;
  position: relative; margin-bottom: 10px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5);
  animation: pop-in .6s .4s both cubic-bezier(.3, 1.6, .5, 1);
}
.hero-bubble::after { content: ""; position: absolute; bottom: -12px; left: 50%; margin-left: -12px; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; }
.hero-bubble b { color: var(--violet); }
@keyframes pop-in { from { transform: scale(.3); opacity: 0; } }

.fizo { display: block; height: auto; user-select: none; -webkit-user-drag: none; }

/* ---------- Home: map ---------- */
.map, .journey { width: min(1200px, 100%); margin: 0 auto; padding: 40px clamp(18px, 4vw, 40px); }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: 18px; margin: 6px 0 0; }
.lab-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.lab-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 24px 22px 18px; border-radius: 28px; min-height: 290px;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, .35), transparent 50%),
    linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 45%, #1a0d40));
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 40%, #0b0520), 0 24px 40px -18px var(--c);
  transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), box-shadow .25s;
  animation: card-in .7s calc(var(--i) * 80ms) both cubic-bezier(.3, 1.4, .5, 1);
}
@keyframes card-in { from { opacity: 0; transform: translateY(40px) scale(.9); } }
.lab-card::before {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .25); top: -60px; left: -60px; animation: spin 30s linear infinite;
}
.lab-card:hover { transform: translateY(-10px) rotate(-1.5deg) scale(1.02); box-shadow: 0 14px 0 color-mix(in srgb, var(--c) 40%, #0b0520), 0 34px 50px -18px var(--c); }
.lab-card:hover .lc-emo i { animation-duration: .9s; }
.lc-num { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .25); font-weight: 800; }
.lc-badge { position: absolute; top: 14px; left: 14px; background: var(--yellow); color: #3b2300; font-weight: 800; padding: 2px 12px; border-radius: 999px; font-size: 14px; }
.lc-emo {
  width: 108px; height: 108px; border-radius: 50%; margin: 6px auto 12px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, .7) 60%, rgba(255, 255, 255, .4));
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .1), 0 12px 24px -8px rgba(0, 0, 0, .5);
}
.lc-emo i { font-style: normal; font-size: 62px; display: inline-block; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .3)); animation: bob 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.4s); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(8deg) scale(1.08); } }
.lab-card h3 { font-size: 26px; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.lab-card p { text-align: center; margin: 6px 0 14px; color: rgba(255, 255, 255, .92); flex: 1; }
.lc-foot { display: flex; justify-content: space-between; align-items: center; }
.lc-stars span, .lab-stars span { color: rgba(255, 255, 255, .3); font-size: 22px; }
.lc-stars span.on, .lab-stars span.on { color: var(--yellow); text-shadow: 0 0 12px rgba(255, 211, 77, .8); }
.lc-go { background: #fff; color: #2a1a5e; font-weight: 800; padding: 5px 16px; border-radius: 999px; }
.lab-card.full { outline: 3px solid var(--yellow); outline-offset: 4px; }

/* ---------- Home: worlds ---------- */
.map, .world { scroll-margin-top: 76px; }
.portals { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.portal {
  position: relative; overflow: hidden; border: 0; cursor: pointer; color: #fff; text-align: center;
  padding: 30px 22px 24px; border-radius: 32px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .35), transparent 55%),
    linear-gradient(170deg, var(--c), color-mix(in srgb, var(--c) 35%, #120830));
  box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 35%, #0b0520), 0 30px 50px -20px var(--c);
  transition: transform .3s cubic-bezier(.3, 1.5, .5, 1);
  animation: card-in .7s calc(var(--i) * 120ms) both cubic-bezier(.3, 1.4, .5, 1);
}
.portal:hover { transform: translateY(-10px) scale(1.03); }
.portal:active { transform: translateY(2px); }
.p-ring { position: absolute; width: 260px; height: 260px; top: -40px; left: 50%; margin-left: -130px; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .25); animation: spin 25s linear infinite; }
.p-emo { font-size: 82px; line-height: 1.1; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); animation: bob 3s ease-in-out infinite; animation-delay: calc(var(--i) * -.7s); position: relative; }
.portal h3 { font-size: 30px; position: relative; }
.portal p { margin: 0; opacity: .92; position: relative; }
.p-meta { margin-top: 8px; font-weight: 800; background: rgba(0, 0, 0, .25); padding: 3px 14px; border-radius: 999px; }
.p-bar { width: 80%; height: 10px; border-radius: 999px; background: rgba(0, 0, 0, .25); overflow: hidden; margin-top: 6px; }
.p-bar span { display: block; height: 100%; background: var(--yellow); border-radius: 999px; }
.world { width: min(1200px, 100%); margin: 0 auto; padding: 50px clamp(18px, 4vw, 40px) 20px; }
.world-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px dashed color-mix(in srgb, var(--c) 50%, transparent); }
.w-emo { font-size: 46px; width: 82px; height: 82px; border-radius: 26px; display: grid; place-items: center; flex: none; background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 40%, #120830)); box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 35%, #0b0520); }
.world-head h2 { font-size: clamp(28px, 3.5vw, 42px); }
.world-head p { margin: 2px 0 0; color: var(--muted); font-size: 17px; }
.lc-new { position: absolute; top: 14px; left: 14px; background: #fff; color: #e0246b; font-weight: 800; padding: 2px 12px; border-radius: 999px; font-size: 14px; animation: wiggle 2.4s infinite; }
.lab-card.full .lc-new { display: none; }

/* ---------- Home: journey ---------- */
.journey { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; padding-top: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px 22px; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.j-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.j-top small { color: var(--muted); }
.j-top h3 { font-size: 30px; margin: 0; }
.j-count { font-size: 22px; font-weight: 800; color: var(--yellow); }
.bar { height: 18px; border-radius: 999px; background: rgba(255, 255, 255, .1); margin: 16px 0 8px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--yellow), var(--pink)); box-shadow: 0 0 20px rgba(255, 211, 77, .6); transition: width 1s; }
.j-next { color: var(--muted); margin: 0 0 14px; }
.j-next b { color: #fff; }
.ranks { display: flex; gap: 8px; flex-wrap: wrap; }
.ranks span { flex: 1; min-width: 80px; text-align: center; font-size: 30px; padding: 8px 4px; border-radius: 16px; background: rgba(255, 255, 255, .05); filter: grayscale(1); opacity: .45; }
.ranks span.got { filter: none; opacity: 1; background: rgba(255, 211, 77, .14); border: 1px solid rgba(255, 211, 77, .4); }
.ranks small { display: block; font-size: 12px; font-weight: 700; }
.fact-card p { font-size: 19px; min-height: 90px; }
.fact-card p.pop { animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.foot { text-align: center; color: var(--muted); padding: 30px 20px 50px; }
.foot-name {
  display: inline-flex; align-items: center; justify-content: center;
  margin: 10px auto 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 800; cursor: pointer;
}
.foot-name:hover { background: rgba(255, 255, 255, .16); }
.legal-links {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; font-weight: 800;
}
.legal-links a {
  padding: 5px 12px; border-radius: 999px; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
}
.legal-links a:hover { background: rgba(255, 255, 255, .16); }

/* ---------- Legal pages ---------- */
.legal-page { width: min(1100px, 100%); margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 70px; }
.legal-back { margin-bottom: 18px; }
.legal-hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) 340px; gap: 24px; align-items: center;
  padding: 28px; border-radius: 34px;
  background:
    radial-gradient(circle at 95% 10%, rgba(255, 211, 77, .22), transparent 38%),
    linear-gradient(160deg, rgba(139, 92, 255, .28), rgba(62, 230, 210, .1));
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -28px #000;
}
.legal-copy h1 { font-size: clamp(38px, 7vw, 72px); margin: 8px 0 10px; }
.legal-copy p { color: #f1ecff; font-size: clamp(18px, 2.2vw, 23px); margin: 0; }
.legal-fizo {
  width: min(320px, 100%); justify-self: center;
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, .45));
  animation: hover 3.5s ease-in-out infinite;
}
.legal-card {
  margin-top: 22px; display: grid; gap: 14px;
}
.legal-card article {
  padding: 20px 22px; border-radius: 24px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.legal-card h2 { font-size: 25px; color: var(--yellow); margin-bottom: 6px; }
.legal-card p { margin: 0; color: #f0ebff; font-size: 18px; }
.legal-card a { color: var(--yellow); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Lab page ---------- */
.lab { width: min(1400px, 100%); margin: 0 auto; padding: 18px clamp(12px, 2.5vw, 30px) 120px; }
.lab-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.lab-title { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 260px; }
.lab-emo {
  font-size: 46px; width: 76px; height: 76px; flex: none; border-radius: 22px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 50%, #1a0d40));
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 40%, #0b0520), inset 0 -6px 10px rgba(0, 0, 0, .25), inset 0 5px 8px rgba(255, 255, 255, .45);
  text-shadow: 0 6px 8px rgba(0, 0, 0, .35);
  animation: bob 2.6s ease-in-out infinite;
}
.lab-title small { color: var(--muted); font-weight: 700; }
.lab-title h1 { font-size: clamp(28px, 3.4vw, 40px); }
.lab-title p { margin: 2px 0 0; color: #e7e2ff; }
.lab-stars { background: rgba(0, 0, 0, .25); padding: 4px 16px; border-radius: 999px; }
.lab-stars span { font-size: 28px; }
.lab-sound, .ms-strip, .hb-short { display: none; }

/* ---------- World page ---------- */
.world-page { padding-top: 24px; }
.world-page .back { margin-bottom: 18px; }
.w-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-weight: 800; color: var(--yellow); }
.w-progress .p-bar { width: 180px; margin: 0; }
.world-next { text-align: center; margin-top: 30px; }

/* ---------- Phone mission sheet ---------- */
.lab-sheet { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 3, 28, 0); transition: background .3s; }
.lab-sheet.in { background: rgba(8, 3, 28, .72); }
.ls-card {
  width: min(560px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 30px 30px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 55%, #2a1a5e), #1a0d40 70%);
  border: 2px solid color-mix(in srgb, var(--c) 70%, transparent); border-bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  transform: translateY(100%); transition: transform .35s cubic-bezier(.2, .9, .3, 1);
}
.lab-sheet.in .ls-card { transform: none; }
.ls-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ls-emo {
  width: 72px; height: 72px; flex: none; border-radius: 22px; display: grid; place-items: center; font-size: 42px;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, .7) 60%, rgba(255, 255, 255, .4)); box-shadow: 0 6px 0 rgba(0, 0, 0, .2);
}
.ls-top small { color: var(--yellow); font-weight: 800; }
.ls-top h2 { font-size: 28px; }
.ls-top p { margin: 2px 0 0; color: #e7e2ff; font-size: 15px; line-height: 1.4; }
.ls-card h3 { font-size: 19px; margin: 6px 0 10px; }
.ls-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ls-list li {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .12);
}
.ls-list .tick { width: 32px; height: 32px; font-size: 15px; }
.ls-m b { display: block; font-size: 16px; line-height: 1.4; }
.ls-m small { display: block; margin-top: 6px; color: #fff3c4; font-size: 14px; line-height: 1.6; font-weight: 600; }
.ls-list li.done { background: rgba(90, 209, 90, .2); border-color: rgba(130, 235, 130, .6); }
.ls-list li.done .tick { background: radial-gradient(circle at 35% 28%, #c4ffbe, #3fc43f 58%, #22862a); box-shadow: 0 3px 0 #1d6b22; }
.ls-list li.done .tick i { display: none; }
.ls-list li.done .tick::after { content: "✓"; color: #fff; font-weight: 900; font-size: 18px; }
.ls-how { margin: 12px 0; padding: 10px 12px; border-radius: 16px; background: rgba(62, 230, 210, .12); border: 1px dashed rgba(62, 230, 210, .5); color: #d9fffa; font-size: 14px; line-height: 1.7; }
.ls-how b { display: block; color: #fff; font-size: 15px; }
.ls-play { width: 100%; margin: 4px 0 12px; }
.ls-more { background: rgba(0, 0, 0, .2); border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; font-size: 15px; }
.ls-more summary { font-weight: 800; cursor: pointer; }
.ls-more p { margin: 8px 0 0; }
.ls-nav { display: flex; justify-content: space-between; gap: 8px; }
.ls-nav .btn { flex: 1; font-size: 14px; }

/* ---------- Help ---------- */
.btn.help-btn {
  position: relative; gap: 10px; padding: 8px 22px 8px 14px; border-radius: 22px;
  background: linear-gradient(180deg, #fff27a, #ffc21a 55%, #ff9f1a); color: #3b2300;
  border: 2px solid #fff6b8;
  box-shadow: 0 6px 0 #c47a00, 0 14px 30px -8px rgba(255, 170, 0, .9), inset 0 2px 0 rgba(255, 255, 255, .7);
}
.btn.help-btn::before {
  content: ""; position: absolute; inset: -4px; border-radius: 26px; pointer-events: none;
  border: 3px solid rgba(255, 211, 77, .95); animation: help-ring 1.8s ease-out infinite;
}
@keyframes help-ring { from { opacity: .95; transform: scale(1); } to { opacity: 0; transform: scale(1.12, 1.45); } }
.btn.help-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .8) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; animation: help-shine 2.8s ease-in-out infinite;
}
@keyframes help-shine { 0% { background-position: 150% 0; } 60%, 100% { background-position: -60% 0; } }
.btn.help-btn:active { box-shadow: 0 2px 0 #c47a00, inset 0 2px 0 rgba(255, 255, 255, .7); }
.hb-fizo { width: 58px; height: auto; margin: -18px 0 -12px; filter: drop-shadow(0 5px 5px rgba(120, 60, 0, .35)); animation: hb-wave 1.6s ease-in-out infinite; }
@keyframes hb-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) translateY(-3px); } 50% { transform: rotate(8deg); } }
.hb-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.hb-txt b { font-size: 20px; }
.hb-txt small { font-size: 13px; font-weight: 700; color: #7a4a00; }
.btn.help-btn.nudge { animation: help-nudge .9s cubic-bezier(.3, 1.6, .5, 1) 3; }
@keyframes help-nudge { 20% { transform: scale(1.15) rotate(-6deg); } 40% { transform: scale(1.15) rotate(6deg); } 60% { transform: scale(1.1) rotate(-3deg); } }
.play-col { position: relative; }
.help-pop {
  position: absolute; z-index: 30; top: 0; left: 0; right: 0; margin: 0 auto; width: min(600px, 100%);
  background: #fff; color: #2a1a5e; border-radius: 24px; padding: 18px 20px 16px;
  border: 4px solid #ffc21a; box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .75);
  animation: pop-in .45s cubic-bezier(.3, 1.6, .5, 1);
}
.help-pop[hidden] { display: none; }
.help-pop h4 { margin: 0 0 10px; font-size: 21px; }
.hp-x { position: absolute; top: 10px; left: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: #f1edff; color: #2a1a5e; font-size: 18px; font-weight: 900; }
.hp-x:hover { background: #ffe3f1; }
.hp-live { background: #fff6d6; border: 2px dashed #ffc21a; border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; font-size: 18px; line-height: 1.7; }
.hp-m { background: #f1edff; border-radius: 16px; padding: 10px 14px; }
.hp-m small { display: block; color: #6a5aa8; font-weight: 700; }
.hp-m > b { display: block; font-size: 18px; margin: 2px 0 6px; }
.hp-m p { margin: 0; font-size: 17px; line-height: 1.75; }
.hp-sol { color: #1d9b4f; font-weight: 900; }
.hp-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.hp-nav .btn { font-size: 14px; background: #2a1a5e; color: #fff; }
.missions li.helping { border-color: #ffc21a; background: linear-gradient(180deg, rgba(255, 194, 26, .35), rgba(255, 194, 26, .15)); box-shadow: 0 4px 0 rgba(0, 0, 0, .25), 0 0 22px -4px #ffc21a; }

.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ctrl-group {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 8px;
}
.ctrl-label { font-weight: 700; color: var(--muted); padding: 0 6px; font-size: 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg-btn {
  border: 0; cursor: pointer; padding: 7px 12px; border-radius: 12px; font-weight: 700; font-size: 15px;
  background: rgba(255, 255, 255, .08); color: #fff; transition: background .15s, transform .1s;
}
.seg-btn:hover { background: rgba(255, 255, 255, .16); }
.seg-btn:active { transform: scale(.95); }
.seg-btn.on { background: var(--c); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 55%, #000), 0 0 18px -4px var(--c); }
.slider { display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-weight: 700; }
.slider input { accent-color: var(--c); width: 150px; cursor: pointer; }
.s-val { min-width: 72px; color: var(--yellow); }

.stage {
  position: relative; height: clamp(380px, 62vh, 680px);
  border-radius: 28px; overflow: hidden;
  border: 3px solid color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .04), 0 30px 60px -24px rgba(0, 0, 0, .7), 0 0 60px -20px var(--c);
  background: #0c0624;
}
.stage canvas { position: absolute; top: 0; left: 0; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.howto { text-align: center; color: var(--muted); margin-top: 10px; font-weight: 600; }
.stage-banner {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; border-radius: 20px;
  background: rgba(255, 255, 255, .95); color: #2a1a5e; font-weight: 800; font-size: 18px;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6);
  animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1);
}
.stage-banner[hidden] { display: none; }

.side { display: flex; flex-direction: column; gap: 14px; }
.card.missions {
  position: relative; margin-top: 26px; padding-top: 16px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--c) 45%, transparent), transparent 60%),
    linear-gradient(165deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03));
  border: 2px solid color-mix(in srgb, var(--c) 75%, transparent);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 35%, #0b0520), 0 26px 44px -20px var(--c), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ms-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ms-title h3 { margin: 0; font-size: 25px; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.ms-title small { color: var(--yellow); font-weight: 800; font-size: 15px; }
.ms-logo {
  width: 96px; height: auto; flex: none; margin: -52px 0 -10px; margin-inline-start: auto;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .45)); animation: hover 3.5s ease-in-out infinite;
}
.ms-bar { height: 12px; border-radius: 999px; background: rgba(0, 0, 0, .3); overflow: hidden; margin-bottom: 14px; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .35); }
.ms-bar span { display: block; height: 100%; min-width: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--yellow), var(--pink)); box-shadow: 0 0 14px rgba(255, 211, 77, .7); transition: width .8s cubic-bezier(.3, 1.4, .5, 1); }
.missions ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.missions li {
  display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06));
  border: 2px solid rgba(255, 255, 255, .12); box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
  font-weight: 700; font-size: 16px; line-height: 1.45;
  transition: transform .2s, box-shadow .2s, background .3s, border-color .3s;
  --ms-in: ms-in .55s calc(var(--k) * 90ms + .1s) both cubic-bezier(.3, 1.4, .5, 1);
  animation: var(--ms-in);
}
@keyframes ms-in { from { opacity: 0; transform: translateX(-24px) scale(.95); } }
.missions li:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, .25); border-color: color-mix(in srgb, var(--c) 75%, transparent); }
.tick {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 17px; font-weight: 900; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .45);
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--c) 35%, #fff), var(--c) 58%, color-mix(in srgb, var(--c) 55%, #000));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 45%, #000), inset 0 -3px 5px rgba(0, 0, 0, .25), inset 0 2px 3px rgba(255, 255, 255, .55);
}
.tick i { font-style: normal; }
.missions li.done { background: linear-gradient(180deg, rgba(90, 209, 90, .32), rgba(90, 209, 90, .12)); border-color: rgba(130, 235, 130, .75); }
.missions li.done .tick { background: radial-gradient(circle at 35% 28%, #c4ffbe, #3fc43f 58%, #22862a); box-shadow: 0 3px 0 #1d6b22, inset 0 -3px 5px rgba(0, 0, 0, .25), inset 0 2px 3px rgba(255, 255, 255, .6); }
.missions li.done .tick i { display: none; }
.missions li.done .tick::after { content: "✓"; color: #fff; font-weight: 900; font-size: 20px; }
.missions li.just { animation: var(--ms-in), just 1.1s; }
@keyframes just { 30% { transform: scale(1.06); background: rgba(255, 211, 77, .35); } }
.explain { color: #e7e2ff; }
.explain p { margin: 0 0 8px; }
.explain b { color: var(--yellow); }
.fact { background: linear-gradient(160deg, rgba(255, 211, 77, .14), rgba(255, 95, 162, .1)); border-color: rgba(255, 211, 77, .3); }
.fact p { margin: 0; }
.lab-nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lab-nav .btn { font-size: 14px; }

/* ---------- Sound lab specifics ---------- */
.xylo { display: flex; gap: 6px; direction: ltr; align-items: center; padding: 4px; }
.key {
  position: relative; width: 46px; border: 0; border-radius: 12px; cursor: pointer; color: #fff;
  font-weight: 800; font-size: 14px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35), inset 0 3px 0 rgba(255, 255, 255, .35);
  transition: transform .06s; text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.key::before, .key::after { content: ""; position: absolute; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.key::before { top: 8px; }
.key::after { bottom: 30px; }
.key.hit { transform: translateY(4px) scale(.96); box-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 0 22px rgba(255, 255, 255, .6); }
.hold {
  border: 0; cursor: pointer; width: 92px; height: 92px; border-radius: 50%; font-size: 15px; font-weight: 800; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff9ccc, var(--pink)); box-shadow: 0 6px 0 #a3245f, 0 0 0 0 rgba(255, 95, 162, .5);
  touch-action: none; user-select: none; line-height: 1.2;
}
.hold.on { transform: translateY(4px); box-shadow: 0 2px 0 #a3245f, 0 0 0 12px rgba(255, 95, 162, .25); }

/* ---------- Mascot (lab) ---------- */
.mascot { position: fixed; left: 18px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.mascot.hidden { display: none; }
.mascot-body { pointer-events: auto; background: none; border: 0; padding: 0; cursor: pointer; width: 104px; height: 104px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .5)); animation: hover 3.5s ease-in-out infinite; }
.mascot-body .fizo { width: 100%; height: 100%; object-fit: contain; }
.mascot.bounce .mascot-body { animation: jump .6s cubic-bezier(.3, 1.6, .5, 1), hover 3.5s 0.6s ease-in-out infinite; }
@keyframes jump { 40% { transform: translateY(-22px) scale(1.08, .94); } }
.bubble {
  pointer-events: auto; position: relative; max-width: 320px; margin: 0 0 12px 10px; padding: 12px 16px; border-radius: 20px;
  background: #fff; color: #2a1a5e; font-weight: 600; font-size: 16px; line-height: 1.5;
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(10px) scale(.8); transform-origin: bottom left; transition: all .3s cubic-bezier(.3, 1.6, .5, 1);
}
.bubble::after { content: ""; position: absolute; bottom: -10px; left: 36px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.mascot.talk .bubble { opacity: 1; transform: none; }

/* ---------- Toasts & confetti ---------- */
.toasts { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px; border-radius: 20px;
  background: #fff; color: #2a1a5e; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6);
  transform: translateY(-30px) scale(.8); opacity: 0; transition: all .4s cubic-bezier(.3, 1.6, .5, 1);
}
.toast.in { transform: none; opacity: 1; }
.toast b { display: block; font-size: 18px; }
.toast small { display: block; color: #6a5aa8; font-weight: 600; }
.t-star { font-size: 34px; animation: wiggle 1s ease-in-out 2; }
.toast.gold { background: linear-gradient(135deg, #ffe169, #ffb41a); color: #3b2300; }
.toast.gold small { color: #6b4500; }
.toast.rank { background: linear-gradient(135deg, #8b5cff, #ff5fa2); color: #fff; }
.toast.rank small { color: #ffe3f1; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }

/* ---------- Name Gate ---------- */
.name-gate {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 211, 77, .22), transparent 34%),
    radial-gradient(circle at 10% 90%, rgba(62, 230, 210, .18), transparent 34%),
    rgba(8, 3, 28, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.name-card {
  width: min(560px, 100%); border-radius: 34px; padding: 22px;
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 211, 77, .32), transparent 45%),
    linear-gradient(160deg, rgba(139, 92, 255, .96), rgba(42, 26, 94, .98));
  border: 3px solid rgba(255, 211, 77, .75);
  box-shadow: 0 12px 0 rgba(85, 45, 8, .65), 0 40px 80px -24px #000, inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1);
}
.name-top { display: flex; align-items: center; gap: 14px; }
.name-fizo {
  width: 116px; flex: none; margin: -36px -10px -16px 0;
  filter: drop-shadow(0 16px 16px rgba(0, 0, 0, .45));
  animation: hover 3.5s ease-in-out infinite;
}
.name-top span { color: var(--yellow); font-weight: 900; }
.name-top h2 { font-size: clamp(28px, 6vw, 44px); margin-top: 2px; }
.name-card p { margin: 12px 0 16px; color: #f2eeff; font-size: 18px; }
.name-card label { display: grid; gap: 8px; font-weight: 900; }
.name-card input {
  width: 100%; border: 0; border-radius: 20px; padding: 14px 18px;
  font: inherit; font-size: 24px; font-weight: 800; color: #2a1a5e; background: #fff;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .12), 0 7px 0 rgba(0, 0, 0, .18);
  outline: 4px solid transparent;
}
.name-card input:focus { outline-color: rgba(255, 211, 77, .65); }
.name-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.name-actions .btn { flex: 1; min-width: 170px; font-size: 17px; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .lab-grid { grid-template-columns: minmax(0, 1fr); }
  .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 20px; }
  .hero-cta { justify-content: center; }
  .lead { margin-inline: auto; }
  .hero-mascot { order: -1; }
  .hero-mascot .fizo { width: 180px; }
  .journey { grid-template-columns: 1fr; }
  .portals { grid-template-columns: 1fr; }
  .p-emo { font-size: 60px; }
  .rank b { display: none; }
  .brand-name { font-size: 22px; }
  .mascot-body { width: 76px; height: 76px; }
  .bubble { max-width: 230px; font-size: 14px; }
  .stage { height: 62vh; min-height: 360px; }
  .slider input { width: 110px; }
  .name-card { padding: 18px; border-radius: 28px; }
  .name-top { align-items: flex-start; }
  .name-fizo { width: 90px; margin-top: -28px; }
  .name-card input { font-size: 21px; }
  .legal-page { padding-top: 16px; }
  .legal-hero { grid-template-columns: 1fr; text-align: center; padding: 22px 18px; }
  .legal-fizo { width: min(230px, 80%); order: -1; }
  .legal-card article { padding: 18px; }
}
@media (max-width: 480px) {
  .topbar { gap: 8px; padding: 8px 10px; }
  .brand { gap: 6px; min-width: 0; }
  .logo { width: 40px; }
  .brand-name { font-size: 19px; }
  .hud { gap: 5px; min-width: 0; }
  .chip { padding: 5px 9px; font-size: 13px; gap: 4px; }
  .chip.icon { padding: 5px 8px; font-size: 16px; }
  .install-chip { padding: 5px 12px; font-size: 13px; }
}

/* ---------- Phone: app-style game screen ---------- */
@media (max-width: 820px) {
  body[data-view="lab"] { overflow: hidden; }
  body[data-view="lab"] .topbar { display: none; }
  body[data-view="lab"] .lab {
    height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) 10px calc(8px + env(safe-area-inset-bottom));
  }
  body[data-view="lab"] .lab-head { flex-wrap: nowrap; gap: 8px; margin: 0; flex: none; }
  body[data-view="lab"] .back { padding: 8px 13px; font-size: 18px; }
  body[data-view="lab"] .bk-txt, body[data-view="lab"] .lab-title small, body[data-view="lab"] .lab-title p,
  body[data-view="lab"] .lab-stars, body[data-view="lab"] .hb-long, body[data-view="lab"] .hb-txt small { display: none; }
  body[data-view="lab"] .hb-short { display: block; font-size: 15px; }
  body[data-view="lab"] .lab-title { min-width: 0; gap: 8px; }
  body[data-view="lab"] .lab-emo { display: none; }
  body[data-view="lab"] .lab-title > div { min-width: 0; }
  body[data-view="lab"] .lab-title h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body[data-view="lab"] .btn.help-btn { padding: 4px 12px 4px 8px; border-radius: 16px; gap: 6px; flex: none; }
  body[data-view="lab"] .hb-fizo { width: 34px; margin: -8px 0 -6px; }
  body[data-view="lab"] .lab-sound { display: inline-flex; flex: none; }

  body[data-view="lab"] .lab-grid { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
  body[data-view="lab"] .side, body[data-view="lab"] .howto { display: none; }
  body[data-view="lab"] .play-col { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

  body[data-view="lab"] .ms-strip {
    order: 0; display: flex; align-items: center; gap: 10px; width: 100%; flex: none; text-align: start; cursor: pointer;
    padding: 6px 10px; border-radius: 16px; color: #fff; font: inherit;
    border: 2px solid color-mix(in srgb, var(--c) 70%, transparent);
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  }
  .ms-strip.flash { animation: just 1.1s; }
  .mss-ico { font-size: 24px; flex: none; }
  .mss-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .mss-txt small { color: var(--yellow); font-weight: 800; font-size: 12px; }
  .mss-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mss-go { flex: none; font-size: 12px; font-weight: 800; background: var(--c); padding: 4px 10px; border-radius: 999px; }

  body[data-view="lab"] .stage { order: 1; flex: 1; height: auto; min-height: 200px; border-radius: 20px; border-width: 2px; }
  body[data-view="lab"] .controls {
    order: 2; flex: none; margin: 0; max-height: 34vh; max-height: 34dvh; overflow-y: auto;
    display: flex; flex-direction: column; flex-wrap: nowrap; gap: 6px; padding: 6px;
    border-radius: 18px; background: rgba(20, 10, 51, .85); border: 1px solid var(--line);
  }
  body[data-view="lab"] .controls:empty { display: none; }
  body[data-view="lab"] .ctrl-group { flex-wrap: nowrap; overflow-x: auto; padding: 4px 6px; border-radius: 14px; scrollbar-width: none; }
  body[data-view="lab"] .ctrl-group::-webkit-scrollbar { display: none; }
  body[data-view="lab"] .ctrl-group > * { flex: none; }
  body[data-view="lab"] .seg { flex-wrap: nowrap; }
  body[data-view="lab"] .ctrl-label { font-size: 12px; padding: 0 2px; white-space: nowrap; }
  body[data-view="lab"] .seg-btn { padding: 7px 11px; font-size: 14px; white-space: nowrap; }
  body[data-view="lab"] .controls .btn { padding: 8px 12px; font-size: 14px; }

  /* Labs with many build choices (car workshop, drone factory): two-column grid, emoji above the word */
  body[data-view="lab"] .controls.ctl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  body[data-view="lab"] .ctl-grid .ctrl-group { flex-direction: column; align-items: stretch; gap: 2px; padding: 3px 4px 4px; overflow: visible; min-width: 0; }
  body[data-view="lab"] .ctl-grid .ctrl-label { text-align: center; font-size: 11.5px; line-height: 1.2; }
  body[data-view="lab"] .ctl-grid .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
  body[data-view="lab"] .ctl-grid .seg-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 0; padding: 3px 2px; font-size: 12.5px; line-height: 1.15; overflow: hidden;
  }
  body[data-view="lab"] .ctl-grid .sg-e { font-size: 16px; line-height: 1.1; }
  body[data-view="lab"] .ctl-grid .ctl-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  body[data-view="lab"] .ctl-grid .ctl-wide > .seg { flex: 1; }
  body[data-view="lab"] .ctl-grid .ctl-wide .seg-btn { flex-direction: row; gap: 4px; padding: 6px 4px; font-size: 13.5px; }
  body[data-view="lab"] .ctl-grid .ctl-wide > .btn { flex: 1; padding: 7px 12px; }
  body[data-view="lab"] .ctl-grid .ctl-fly { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)) auto; gap: 5px; }
  body[data-view="lab"] .ctl-grid .ctl-fly > .btn { padding: 8px 2px; font-size: 19px; }
  body[data-view="lab"] .ctl-grid .ctl-fly > .btn:last-child { padding: 8px 8px; font-size: 13px; }
  body[data-view="lab"] .ctl-grid.driving .ctrl-group:not(.ctl-keep) { display: none; }

  body[data-view="lab"] .help-pop {
    position: fixed; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); left: 10px; right: 10px; width: auto;
    max-height: 70vh; max-height: 70dvh; overflow-y: auto; z-index: 120;
  }
  body[data-view="lab"] .toasts { top: calc(10px + env(safe-area-inset-top)); }

  body[data-view="lab"] .mascot { left: 10px; right: 10px; top: calc(124px + env(safe-area-inset-top)); bottom: auto; align-items: stretch; }
  body[data-view="lab"] .mascot-body { display: none; }
  body[data-view="lab"] .bubble {
    max-width: none; margin: 0; font-size: 15px; pointer-events: none;
    transform: translateY(-10px) scale(.95); transform-origin: top center;
  }
  body[data-view="lab"] .mascot.talk .bubble { pointer-events: auto; transform: none; }
  body[data-view="lab"] .bubble::after { display: none; }
  body[data-view="lab"] .bubble::before {
    content: ""; float: right; width: 36px; height: 36px; margin: -2px 0 0 8px;
    background: url(img/fz/mascot/fizo-logo.webp) center / contain no-repeat;
  }
}
@media (max-width: 560px) {
  .lab-card {
    min-height: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 16px;
  }
  .lab-card .lc-emo { width: 76px; height: 76px; margin: 0; grid-row: 1 / span 3; }
  .lab-card .lc-emo i { font-size: 42px; }
  .lab-card h3 { text-align: start; font-size: 21px; }
  .lab-card p { text-align: start; margin: 2px 0 8px; font-size: 14px; line-height: 1.45; }
  .lc-num { display: none; }
  .lab-cards { gap: 14px; }
  .world-head { gap: 12px; }
  .w-emo { width: 64px; height: 64px; font-size: 36px; border-radius: 20px; }
}
/* ---------- Language World ---------- */
.lang-world { padding-bottom: 10px; }
.lw-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: center;
  padding: 26px clamp(18px, 3vw, 34px); border-radius: 34px; overflow: hidden; position: relative;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, .22), transparent 40%),
    linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #1a0d40), #2a1670 70%, #123a7a);
  box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 30%, #0b0520), 0 30px 60px -24px var(--c);
}
.lw-copy h1 { font-size: clamp(38px, 6vw, 64px); margin: 4px 0 10px; text-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.lw-copy h1 small { display: block; font-size: .45em; color: var(--yellow); letter-spacing: .5px; }
.lw-copy p { font-size: clamp(17px, 2vw, 21px); color: #f4efff; margin: 0 0 18px; max-width: 560px; }
.lw-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lw-art { display: grid; place-items: center; }
.lw-svg { width: min(380px, 100%); height: auto; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .35)); overflow: visible; }
.lw-b { animation: lw-float 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.lw-b.b2 { animation-delay: -.8s; } .lw-b.b3 { animation-delay: -1.6s; } .lw-b.b4 { animation-delay: -2.4s; }
@keyframes lw-float { 50% { transform: translateY(-7px) rotate(-2deg); } }
.lw-head { margin: 34px 0 20px; }
.lang-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.lang-card {
  position: relative; display: flex; flex-direction: column; border-radius: 28px; overflow: hidden;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 32%, #22125a), #1a0d40 75%);
  border: 2px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 30%, #0b0520), 0 24px 40px -22px var(--c);
  animation: card-in .7s calc(var(--i) * 90ms) both cubic-bezier(.3, 1.4, .5, 1);
}
.lang-card.live { transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.lang-card.live:hover { transform: translateY(-8px) rotate(-1deg); }
.lang-card.soon { filter: saturate(.75); }
.lgc-thumb {
  position: relative; height: 150px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, .45), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 40%, #120830));
}
.lgc-flag .flag { width: 112px; height: auto; border-radius: 12px; box-shadow: 0 10px 18px -6px rgba(0, 0, 0, .55), 0 0 0 4px rgba(255, 255, 255, .85); display: block; }
.lang-card.live .lgc-flag { animation: bob 3s ease-in-out infinite; }
.lgc-hello {
  position: absolute; bottom: 12px; right: 14px; background: #fff; color: #2a1a5e; font-weight: 800; font-size: 17px;
  padding: 2px 14px; border-radius: 16px 16px 4px 16px; box-shadow: 0 6px 12px -4px rgba(0, 0, 0, .4);
}
.lgc-badge { position: absolute; top: 12px; left: 12px; font-weight: 800; font-size: 13px; padding: 3px 12px; border-radius: 999px; }
.lgc-badge.live { background: #3fe07a; color: #083018; box-shadow: 0 3px 0 #15803d; }
.lgc-badge.soon { background: var(--yellow); color: #3b2300; box-shadow: 0 3px 0 #c98a00; }
.lang-card h3 { font-size: 26px; text-align: center; margin: 14px 14px 0; }
.lgc-ar { text-align: center; margin: 0; color: var(--yellow); font-weight: 800; }
.lgc-desc { margin: 8px 18px 10px; color: #ece6ff; font-size: 15.5px; line-height: 1.6; flex: 1; text-align: center; }
.lgc-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 14px 12px; font-size: 13.5px; font-weight: 700; }
.lgc-meta span { background: rgba(0, 0, 0, .25); padding: 2px 10px; border-radius: 999px; }
.lgc-play { margin: 0 16px 18px; }
.lgc-locked {
  margin: 0 16px 18px; padding: 9px 16px; border-radius: 14px; text-align: center; font-weight: 800;
  background: rgba(255, 255, 255, .08); border: 2px dashed rgba(255, 255, 255, .25); color: #d9d2ff; cursor: not-allowed;
}

/* ---------- English Quest (and future language quests) ---------- */
.quest { width: min(1100px, 100%); margin: 0 auto; padding: 18px clamp(12px, 3vw, 30px) 60px; }
.qx-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.qx-hero {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; border-radius: 30px;
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, .2), transparent 45%), linear-gradient(140deg, #1e3a8a, #4c1d95 60%, #831843);
  box-shadow: 0 8px 0 #0f1440, 0 24px 50px -24px #3b82f6;
}
.qx-flag .flag { width: 92px; height: auto; border-radius: 12px; display: block; box-shadow: 0 0 0 4px #fff, 0 12px 20px -8px rgba(0, 0, 0, .6); }
.qx-title { flex: 1; min-width: 220px; }
.qx-title h1 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -.5px; }
.qx-title p { margin: 4px 0 0; color: #e9e4ff; font-weight: 600; }
.qx-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.qx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.qx-stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; text-align: center; }
.qx-stat b { display: block; font-size: 22px; }
.qx-stat small { color: var(--muted); font-weight: 700; }
.qx-overall { grid-column: 1 / -1; text-align: center; }
.qx-overall .bar { display: block; margin: 4px 0 2px; height: 14px; }
.qx-overall small { color: var(--muted); font-weight: 700; }
.qx-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.qx-tab {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 16px; cursor: pointer; color: #fff; font: inherit;
  background: color-mix(in srgb, var(--wc) 30%, #1a0d40); border: 2px solid color-mix(in srgb, var(--wc) 70%, transparent);
}
.qx-tab b { font-size: 14px; } .qx-tab small { font-weight: 800; color: var(--yellow); }
.qx-tab.locked { opacity: .6; }
.qx-tab.full { box-shadow: inset 0 0 0 2px var(--yellow); }
.qx-world {
  margin-top: 22px; border-radius: 30px; overflow: hidden; scroll-margin-top: 80px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--wc) 26%, #1a0d40), #170a3a);
  border: 2px solid color-mix(in srgb, var(--wc) 60%, transparent);
}
.qx-world.locked { filter: grayscale(.55) brightness(.85); }
.qx-wbanner {
  position: relative; display: flex; gap: 14px; align-items: center; padding: 18px 20px; overflow: hidden;
  background: radial-gradient(circle at 90% 20%, rgba(255, 255, 255, .3), transparent 45%), linear-gradient(135deg, var(--wc), color-mix(in srgb, var(--wc) 40%, #1a0d40));
}
.qx-scene { position: relative; width: 120px; height: 96px; flex: none; }
.qx-scene span { position: absolute; font-size: 34px; animation: bob 3.2s ease-in-out infinite; animation-delay: calc(var(--k) * -.6s); filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .3)); }
.qx-scene span:nth-child(1) { font-size: 58px; top: 16px; right: 28px; }
.qx-scene span:nth-child(2) { top: 0; right: 0; }
.qx-scene span:nth-child(3) { top: 0; left: 0; }
.qx-scene span:nth-child(4) { bottom: 0; right: -4px; font-size: 28px; }
.qx-scene span:nth-child(5) { bottom: -2px; left: 4px; font-size: 28px; }
.qx-winfo { flex: 1; min-width: 0; }
.qx-winfo small { font-weight: 800; color: #fff7d1; }
.qx-winfo h2 { font-size: clamp(24px, 3.4vw, 34px); text-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.qx-winfo h2 em { font-style: normal; font-size: .6em; opacity: .9; }
.qx-winfo p { margin: 2px 0 6px; color: #fff; opacity: .92; }
.qx-wprog { display: flex; align-items: center; gap: 10px; font-weight: 800; flex-wrap: wrap; }
.qx-wprog .p-bar { width: 160px; margin: 0; }
.qx-lockmsg, .qx-tip { margin: 14px 18px 0; padding: 10px 14px; border-radius: 16px; font-weight: 700; }
.qx-lockmsg { background: rgba(0, 0, 0, .3); border: 2px dashed rgba(255, 255, 255, .3); }
.qx-tip { background: rgba(62, 230, 210, .12); border: 1px dashed rgba(62, 230, 210, .5); color: #d9fffa; }
.qx-path {
  list-style: none; margin: 0; padding: 18px 10px 22px; position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 128px; row-gap: 14px;
}
.qx-path::before {
  content: ""; position: absolute; top: 45.5px; height: 147px; inset-inline-start: 10%; inset-inline-end: 10%;
  border: 5px dashed color-mix(in srgb, var(--wc) 55%, rgba(255, 255, 255, .25)); border-inline-start: 0;
  border-start-end-radius: 72px; border-end-end-radius: 72px; pointer-events: none;
}
.qx-node { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.qx-node button {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-size: 22px; font-weight: 800; color: #fff;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--wc) 40%, #fff), var(--wc) 62%, color-mix(in srgb, var(--wc) 60%, #000));
  box-shadow: 0 6px 0 color-mix(in srgb, var(--wc) 45%, #000), 0 10px 20px -6px rgba(0, 0, 0, .6);
  transition: transform .15s;
}
.qx-node button:hover { transform: translateY(-3px) scale(1.06); }
.qx-node button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.qx-node.open button { animation: qx-pulse 1.6s ease-in-out infinite; box-shadow: 0 6px 0 color-mix(in srgb, var(--wc) 45%, #000), 0 0 0 6px rgba(255, 211, 77, .55); }
@keyframes qx-pulse { 50% { transform: scale(1.1); } }
.qx-node.done button { background: radial-gradient(circle at 35% 28%, #fff6c4, #ffc21a 60%, #c98a00); color: #3b2300; box-shadow: 0 6px 0 #8a5a00; }
.qx-node.progress button { box-shadow: 0 6px 0 color-mix(in srgb, var(--wc) 45%, #000), 0 0 0 5px #3ee6d2; }
.qx-node.locked button { background: #3a3160; color: #b9b0e6; box-shadow: 0 5px 0 #231c44; font-size: 20px; }
.qx-badge { position: absolute; top: -6px; left: -6px; font-style: normal; font-size: 13px; background: #3ee6d2; color: #05302b; border-radius: 999px; padding: 0 6px; }
.qx-nstars { height: 18px; font-size: 15px; line-height: 18px; margin-top: 6px; }
.qx-nstars span { color: rgba(255, 255, 255, .3); } .qx-nstars span.on { color: var(--yellow); }
.qx-ntitle {
  font-size: 12px; font-weight: 700; line-height: 1.25; color: #e9e4ff; padding: 0 2px; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Dialogs */
.qx-dback { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 16px; background: rgba(8, 3, 28, 0); transition: background .25s; }
.qx-dback.in { background: rgba(8, 3, 28, .75); }
.qx-dialog {
  position: relative; width: min(520px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto; padding: 22px 20px 20px; border-radius: 28px;
  background: linear-gradient(170deg, #34207a, #1a0d40 70%); border: 2px solid rgba(255, 255, 255, .2); box-shadow: 0 30px 70px -20px #000;
  transform: scale(.9); opacity: 0; transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), opacity .2s;
}
.qx-dback.in .qx-dialog { transform: none; opacity: 1; }
.qx-x { position: absolute; z-index: 2; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; font-weight: 900; }
.qx-x:hover { background: rgba(255, 255, 255, .22); }
.qx-dhead { display: flex; gap: 12px; align-items: center; margin: 0 0 14px; padding-left: 40px; }
.qx-demo { width: 64px; height: 64px; flex: none; display: grid; place-items: center; font-size: 36px; border-radius: 20px; background: linear-gradient(160deg, var(--wc), color-mix(in srgb, var(--wc) 40%, #120830)); }
.qx-dhead small { color: var(--yellow); font-weight: 800; font-size: 13px; }
.qx-dhead h2 { font-size: 26px; }
.qx-dhead p { margin: 0; color: #e7e2ff; }
.qx-dtitle { font-size: 26px; margin-bottom: 12px; }
.qx-facts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 7px; }
.qx-facts li { background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 8px 12px; font-size: 15px; line-height: 1.55; }
.qx-diff { color: var(--yellow); letter-spacing: 2px; }
.qx-dstars span { color: rgba(255, 255, 255, .3); } .qx-dstars span.on { color: var(--yellow); }
.qx-note { color: var(--muted); font-size: 14px; margin: 8px 0; }
.qx-dbtns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.qx-dbtns .btn { flex: 1; min-width: 150px; }
.qx-dbtns.qx-col { flex-direction: column; }
.qx-toggles { display: grid; gap: 8px; margin-bottom: 12px; }
.qx-toggle {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; cursor: pointer;
  font: inherit; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .14);
}
.qx-toggle b { padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .15); font-size: 13px; }
.qx-toggle[aria-pressed="true"] { border-color: #3fe07a; }
.qx-toggle[aria-pressed="true"] b { background: #3fe07a; color: #083018; }
.qx-dialog hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.qx-celebrate, .qx-cert { text-align: center; }
.qx-cel-e { font-size: 64px; animation: bob 2s ease-in-out infinite; }
.qx-celebrate h2 { font-size: 28px; margin: 6px 0; }
.qx-cert { padding: 18px; border-radius: 22px; border: 4px double var(--yellow); background: radial-gradient(circle at 50% 0%, rgba(255, 211, 77, .2), transparent 60%); }
.qx-cert-top { font-size: 70px; line-height: 1; }
.qx-cert small { color: var(--yellow); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.qx-cert h2 { font-size: 30px; margin: 4px 0 8px; }
.qx-cert-name { font-size: 32px; font-weight: 800; color: var(--yellow); margin: 0 0 6px; }
.qx-cert-stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; font-weight: 800; }
.qx-cert-stats span { background: rgba(0, 0, 0, .25); padding: 3px 12px; border-radius: 999px; }

/* Playing */
.qp { max-width: 720px; margin: 0 auto; }
.qp-bar { display: flex; align-items: center; gap: 10px; }
.qp-pause, .qp-snd { padding: 8px 14px; font-size: 18px; flex: none; }
.qp-snd[aria-pressed="false"] { opacity: .75; }
.qp-progress { flex: 1; height: 16px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.qp-progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3fe07a, var(--yellow)); transition: width .4s; }
.qp-hearts { display: flex; gap: 2px; font-size: 22px; flex: none; }
.qp-hearts.hit { animation: qx-hit .5s; }
@keyframes qx-hit { 25% { transform: translateX(-6px) scale(1.15); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.qp-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 8px 2px 10px; color: var(--muted); font-weight: 700; font-size: 14px; }
.qz {
  position: relative; padding: 18px 18px 20px; border-radius: 28px; text-align: center;
  background: linear-gradient(170deg, color-mix(in srgb, var(--wc) 30%, #23125c), #1a0d40 80%);
  border: 2px solid color-mix(in srgb, var(--wc) 60%, transparent);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--wc) 25%, #0b0520);
}
.qz-tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .3); margin-bottom: 6px; }
.qz-ask { font-size: clamp(21px, 3vw, 27px); outline: none; }
.qz-ask small { display: block; font-size: 15px; color: var(--yellow); font-weight: 700; margin-top: 2px; }
.qz-prompt { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 14px 0 6px; }
.qz-emoji { font-size: clamp(70px, 14vw, 96px); line-height: 1.1; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .35)); animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.qz-swatch { width: 120px; height: 120px; border-radius: 30px; border: 4px solid rgba(255, 255, 255, .85); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .6); }
.qz-shape { width: 130px; height: 130px; fill: #ffd34d; stroke: #fff; stroke-width: 3; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4)); }
.qz-big { font-size: clamp(44px, 9vw, 70px); font-weight: 800; line-height: 1.1; letter-spacing: 1px; }
.qz-big.emo { font-size: clamp(30px, 6vw, 42px); letter-spacing: 4px; max-width: 420px; }
.qz-letters { letter-spacing: 6px; }
.qz-gap { display: inline-block; min-width: .8em; color: var(--yellow); border-bottom: 5px solid var(--yellow); }
.qz-word { font-size: clamp(34px, 7vw, 50px); font-weight: 800; background: rgba(255, 255, 255, .1); padding: 2px 24px; border-radius: 18px; }
.qz-sentence { font-size: clamp(20px, 3.4vw, 26px); font-weight: 700; background: rgba(255, 255, 255, .08); padding: 10px 18px; border-radius: 18px; max-width: 100%; }
.qz-question { background: rgba(255, 211, 77, .14); border: 1px dashed rgba(255, 211, 77, .5); }
.qz-blank { display: inline-block; min-width: 3em; color: var(--yellow); border-bottom: 3px solid var(--yellow); line-height: 1.1; }
.qz-ar { font-size: clamp(22px, 4vw, 30px); font-weight: 800; background: rgba(255, 255, 255, .1); padding: 6px 20px; border-radius: 18px; }
.qz-hint { margin: 6px auto 0; max-width: 520px; color: #fff3c4; font-weight: 600; font-size: 15px; }
.qz-listen { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.qz-play { font-size: 20px; padding: 12px 22px; background: linear-gradient(180deg, #7cf0c2, #22c55e); color: #052e16; box-shadow: 0 5px 0 #15803d; }
.qz-slow { font-size: 15px; }
.qz-hear { vertical-align: middle; margin-inline-start: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font-size: 20px; background: rgba(255, 255, 255, .16); color: inherit; }
.qz-hear:hover, .qz-hear:focus-visible { background: rgba(255, 255, 255, .28); }
.qz-fb-hear { margin-top: 8px; padding: 6px 14px; font-size: 16px; }
.qz-show { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.qz-said { background: rgba(255, 255, 255, .1); border-radius: 16px; padding: 8px 16px; font-weight: 700; font-size: 19px; }
.qz-said p { margin: 2px 0; }
.qz-nosound { margin: 0; color: #ffd0d0; font-size: 14px; font-weight: 700; }
.qz-answer { margin-top: 14px; }
.qz-opts { display: grid; gap: 10px; grid-template-columns: 1fr; }
.qz-opts.emo { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.qz-opt {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 44px; border-radius: 18px; cursor: pointer;
  font: inherit; font-size: 20px; font-weight: 800; color: #2a1a5e; background: #fff; border: 3px solid transparent;
  box-shadow: 0 5px 0 #b6acec; transition: transform .08s;
}
.qz-opt:hover:not(:disabled) { transform: translateY(-2px); }
.qz-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #b6acec; }
.qz-opt:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.qz-opt kbd { position: absolute; inset-inline-end: 12px; font-family: inherit; font-size: 12px; background: #efeaff; color: #6a5aa8; border-radius: 8px; padding: 0 7px; }
.qz-opts.emo .qz-opt { font-size: 52px; min-height: 96px; padding: 6px; }
.qz-opts.emo .qz-opt kbd { top: 6px; inset-inline-end: 6px; }
.qz-opt.right { background: #3fe07a; color: #052e16; box-shadow: 0 5px 0 #15803d; }
.qz-opt.wrong { background: #ff6b6b; color: #fff; box-shadow: 0 5px 0 #b52f2f; animation: qx-hit .45s; }
.qz-opt:disabled { cursor: default; }
.qz-opt:disabled:not(.right):not(.wrong) { opacity: .55; }
.qz-built {
  min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; padding: 10px; border-radius: 18px;
  background: rgba(0, 0, 0, .25); border: 3px dashed rgba(255, 255, 255, .25);
}
.qz-built.right { border-color: #3fe07a; background: rgba(63, 224, 122, .15); }
.qz-built.wrong { border-color: #ff6b6b; background: rgba(255, 107, 107, .15); animation: qx-hit .45s; }
.qz-ph { color: var(--muted); font-weight: 700; direction: rtl; }
.qz-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.qz-tile {
  min-width: 48px; min-height: 48px; padding: 6px 14px; border-radius: 14px; border: 0; cursor: pointer; font: inherit; font-size: 21px; font-weight: 800;
  background: #fff; color: #2a1a5e; box-shadow: 0 4px 0 #b6acec;
}
.qz-tile.in { background: var(--yellow); color: #3b2300; box-shadow: 0 4px 0 #c98a00; }
.qz-tile:disabled { opacity: .25; cursor: default; box-shadow: none; }
.qz-tile:focus-visible, .qz-m:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.qz-bank.spell .qz-tile, .qz-built.spell .qz-tile { min-width: 50px; font-size: 24px; }
.qz-input {
  width: min(360px, 100%); font: inherit; font-size: 28px; font-weight: 800; text-align: center; padding: 10px 16px; border-radius: 18px;
  border: 3px solid rgba(255, 255, 255, .4); background: #fff; color: #2a1a5e; outline: none;
}
.qz-input:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 211, 77, .35); }
.qz-input.right { border-color: #3fe07a; background: #dcfce7; }
.qz-input.wrong { border-color: #ff6b6b; background: #ffe4e4; }
.qz-match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qz-col { display: grid; gap: 8px; }
.qz-m {
  min-height: 52px; border-radius: 16px; border: 3px solid transparent; cursor: pointer; font: inherit; font-size: 19px; font-weight: 800;
  background: #fff; color: #2a1a5e; box-shadow: 0 4px 0 #b6acec;
}
.qz-m.emo { font-size: 32px; }
.qz-m.sel { border-color: var(--yellow); background: #fff6c4; }
.qz-m.ok { background: #3fe07a; color: #052e16; box-shadow: 0 4px 0 #15803d; cursor: default; }
.qz-m.no { background: #ff6b6b; color: #fff; animation: qx-hit .45s; }
.qp-foot { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.qp-foot:empty { display: none; }
.qz-fb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; padding: 14px clamp(12px, 3vw, 30px) calc(14px + env(safe-area-inset-bottom)); animation: qx-up .3s cubic-bezier(.2, .9, .3, 1); }
@keyframes qx-up { from { transform: translateY(100%); } }
.qz-fb.ok { background: linear-gradient(180deg, #14532d, #0b3a1f); border-top: 4px solid #3fe07a; }
.qz-fb.bad { background: linear-gradient(180deg, #7f1d1d, #4c0d0d); border-top: 4px solid #ff6b6b; }
.qz-fb-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.qz-fb-txt { flex: 1; min-width: 220px; }
.qz-fb-txt b { font-size: 21px; }
.qz-fb-txt p { margin: 4px 0 0; font-size: 16px; }
.qz-right { font-weight: 800; background: rgba(255, 255, 255, .15); padding: 0 10px; border-radius: 10px; }
.qz-wrongans { font-weight: 800; background: rgba(0, 0, 0, .25); padding: 0 10px; border-radius: 10px; text-decoration: line-through; text-decoration-color: #ff9b9b; }
.qz-ex { color: #fff3c4; }
.qz-why { background: rgba(255, 255, 255, .1); border-radius: 14px; padding: 6px 12px; line-height: 1.6; }
.qz-en { font-weight: 800; unicode-bidi: isolate; }
.qz-ex .qz-en, .qz-why .qz-en, .qx-rule-p .qz-en, .qx-help .qz-en, .qx-facts .qz-en, .qx-dhead .qz-en { color: var(--yellow); }
.qz-fb { max-height: 75vh; max-height: 75dvh; overflow-y: auto; }
.qz-fb-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.qz-fb-acts .qz-fb-hear { margin-top: 0; }
.qz-fb-rule { padding: 6px 14px; font-size: 16px; }
.qp-tools { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.qp-tools .btn { padding: 6px 14px; font-size: 15px; }
.qp-help b { display: inline-block; min-width: 1.5em; margin-inline-start: 4px; border-radius: 999px; background: var(--yellow); color: #3b2300; }
.qp-help:disabled { opacity: .5; cursor: default; }
.qp-help:disabled b { background: rgba(255, 255, 255, .25); color: #fff; }
.qz-opt.gone { opacity: .2 !important; text-decoration: line-through; box-shadow: none; }
.qx-rule-p { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 7px; }
.qx-rule-p li { background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 8px 12px; font-size: 16px; line-height: 1.65; }
.qx-rule-ex { display: grid; gap: 8px; padding: 10px 12px; border-radius: 16px; background: rgba(0, 0, 0, .25); }
.qx-rule-row { display: flex; align-items: center; gap: 10px; }
.qx-rule-row p { margin: 0; font-size: 18px; font-weight: 700; text-align: left; }
.qx-rule-row .qz-en { color: var(--yellow); }
.qx-rule-row small { color: var(--muted); font-size: 14px; }
.qx-rule-row .qz-hear { margin: 0; flex: none; width: 38px; height: 38px; font-size: 17px; }
.qx-help-card { font-size: 56px; line-height: 1; text-align: center; animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.qx-help .qx-dtitle { text-align: center; }
.qx-help-did { margin: 0 0 10px; padding: 8px 12px; border-radius: 14px; font-weight: 700; background: rgba(63, 224, 122, .15); border: 1px solid rgba(63, 224, 122, .5); }
.qx-help-row { margin: 8px 0; line-height: 1.65; }
.qx-help-rule h3 { font-size: 19px; margin: 14px 0 8px; }
body[data-view="quest"] .quest { padding-bottom: 170px; }

/* Results */
.qr { display: grid; place-items: center; padding: 10px 0 30px; }
.qr-card {
  width: min(560px, 100%); text-align: center; padding: 24px 20px; border-radius: 32px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 211, 77, .25), transparent 55%), linear-gradient(170deg, color-mix(in srgb, var(--wc) 35%, #2a1670), #1a0d40 75%);
  border: 2px solid color-mix(in srgb, var(--wc) 60%, transparent); box-shadow: 0 10px 0 #0b0520;
}
.qr.fail .qr-card { background: linear-gradient(170deg, #4a1d5e, #1a0d40 75%); }
.qr-burst { font-size: 76px; line-height: 1; animation: pop-in .6s cubic-bezier(.3, 1.6, .5, 1); }
.qr-card h2 { font-size: clamp(26px, 4vw, 34px); margin: 8px 0 4px; }
.qr-card p { color: #ece6ff; margin: 4px 0; }
.qr-stars { font-size: 56px; letter-spacing: 6px; margin: 6px 0; }
.qr-stars span { color: rgba(255, 255, 255, .2); display: inline-block; }
.qr-stars span.on { color: var(--yellow); text-shadow: 0 0 18px rgba(255, 211, 77, .8); animation: pop-in .5s calc(var(--k) * .25s) both cubic-bezier(.3, 1.6, .5, 1); }
.qr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.qr-grid div { background: rgba(0, 0, 0, .25); border-radius: 16px; padding: 8px 4px; }
.qr-grid b { display: block; font-size: 22px; }
.qr-grid small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.qr-rewards { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0 14px; font-weight: 800; }
.qr-rewards span { background: rgba(255, 211, 77, .16); border: 1px solid rgba(255, 211, 77, .5); padding: 4px 14px; border-radius: 999px; }
.qr-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 820px) {
  .lw-hero { grid-template-columns: 1fr; text-align: center; }
  .lw-art { order: -1; }
  .lw-svg { width: min(300px, 90%); }
  .lw-copy p { margin-inline: auto; }
  .lw-cta { justify-content: center; }
  .qx-hero { text-align: center; justify-content: center; }
  .qx-cta { justify-content: center; width: 100%; }
  .qx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .quest { padding-inline: 10px; }
  .qx-top .qx-gear span { display: none; }
  .qx-wbanner { padding: 14px; gap: 10px; }
  .qx-scene { width: 78px; height: 72px; }
  .qx-scene span { font-size: 24px; }
  .qx-scene span:nth-child(1) { font-size: 42px; top: 14px; right: 16px; }
  .qx-scene span:nth-child(4), .qx-scene span:nth-child(5) { font-size: 20px; }
  .qx-winfo p { font-size: 14px; }
  .qx-path { padding: 14px 2px 18px; grid-auto-rows: 120px; }
  .qx-path::before { top: 35px; height: 138px; border-width: 4px; border-inline-start-width: 0; }
  .qx-node button { width: 46px; height: 46px; font-size: 18px; }
  .qx-ntitle { font-size: 10.5px; }
  .qz { padding: 14px 12px 16px; border-radius: 24px; }
  .qz-opt { font-size: 18px; min-height: 52px; }
  .qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr-stars { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .qz-fb { animation: none; }
  .lw-b, .qx-scene span, .qx-node.open button, .lang-card.live .lgc-flag { animation: none !important; }
}

/* ---------- Fizoland illustrations ---------- */
.fz-i {
  display: inline-block; width: 1.25em; height: 1.25em; object-fit: contain;
  vertical-align: -.28em; user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.fz-mascot { display: block; width: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.hero-mascot .fizo { width: auto; max-width: 80%; height: min(380px, 48vh); }
.hb-fizo { width: auto; height: 64px; }
.ms-logo { width: auto; height: 120px; }
.legal-fizo { width: auto; max-width: 100%; height: min(420px, 60vh); }
.name-fizo { width: auto; height: 140px; }
.hp-fizo { display: inline-block; width: auto; height: 46px; vertical-align: middle; margin: -8px 0 -6px; }
.t-mascot { width: auto; height: 58px; flex: none; margin: -14px 0 -8px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.t-star .fz-i { width: 1.1em; height: 1.1em; }
.chip.rank .fz-i { width: 1.75em; height: 1.75em; margin: -6px 0; }
.star-chip .fz-i { width: 1.45em; height: 1.45em; margin: -4px 0; }
.qz-fb-fizo { height: 78px; flex: none; align-self: flex-start; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); animation: pop-in .45s cubic-bezier(.3, 1.6, .5, 1); }
.qx-demo:has(.qx-demo-fizo) { width: auto; height: 72px; background: none; }
.qx-demo-fizo { height: 82px; margin-top: -10px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.qx-help-fizo { height: 120px; margin: 0 auto; }
.qr-fizo { height: 150px; margin: -10px auto 4px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .4)); }
@media (max-width: 820px) {
  .qz-fb-fizo { height: 56px; }
  .qr-fizo { height: 120px; }
  .qx-help-fizo { height: 96px; }
  .hero-mascot .fizo { height: 220px; }
  .name-fizo { height: 110px; }
  .legal-fizo { height: 240px; }
  body[data-view="lab"] .hb-fizo { width: auto; height: 38px; }
}

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