/* Shared base (from MIND): sky dome, pill buttons, 3D scroll landing, dashboard. PAINT theme lives in art.css. */
@property --mood { syntax: '<color>'; inherits: true; initial-value: #9b7bff; }
:root {
  --mood: #9b7bff;
  --ink: #2c2a35; --muted: #6b6878; --paper: #fffdf8; --cream: #faf6ee; --line: #e7e1d6;
  --btn: #7b3cff; --btn-dark: #5420d6; --btn-soft: #efe7ff;
  --good: #2f9b6d; --good-bg: #c9eadb; --bad: #e0553e; --bad-bg: #ffdcd6;
  --display: 'Baloo 2', system-ui, sans-serif; --hand: 'Walter Turncoat', cursive; --body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; overflow-anchor: none; }
body { --dome: color-mix(in oklab, var(--mood) 14%, #fffdf8); --shade: color-mix(in oklab, var(--mood) 32%, #ffffff); transition: --mood .7s ease; margin: 0; min-height: 100vh; font-family: var(--body); color: var(--ink); background: var(--mood); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--btn); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, var(--mood), color-mix(in oklab, var(--mood) 70%, #fff)); }
.dome { position: absolute; left: 50%; top: 52px; width: 260vw; height: 260vw; transform: translateX(-50%); border-radius: 50%; background: linear-gradient(180deg, var(--dome) 0, var(--paper) 40vh, var(--paper) 100%); }
.cloud { position: absolute; width: 190px; height: 76px; animation: drift 18s ease-in-out infinite alternate; }
.cloud svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; }
.cloud svg.shade { fill: var(--shade); transform: translate(26px,-14px) scale(1.08); }
.c1 { top: 13%; left: 7%; } .c2 { top: 8%; right: 6%; width: 260px; height: 100px; animation-duration: 24s; } .c3 { top: 37%; left: 13%; width: 110px; height: 44px; }
.c4 { top: 27%; right: 15%; width: 120px; height: 48px; animation-duration: 15s; } .c5 { top: 58%; right: 3%; width: 220px; height: 88px; }
@keyframes drift { to { transform: translateX(34px); } }
.bolt { position: absolute; width: 70px; height: 140px; fill: color-mix(in oklab, var(--mood) 55%, #fff); opacity: 0; transform: scale(.6) rotate(-8deg); transition: opacity .4s, transform .5s var(--ease); }
.b1 { top: -10px; left: 39%; } .b2 { top: 10px; right: 30%; width: 50px; } .b3 { top: 70px; right: 12%; width: 90px; height: 170px; }
body[data-verdict="wrong"] .bolt { opacity: .9; transform: none; }

/* ground (quiz + result) */
.ground { position: fixed; left: 0; right: 0; bottom: 0; height: 26vh; z-index: 1; pointer-events: none; display: none; }
.hills { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; }
.hills .h1 { fill: color-mix(in oklab, var(--mood) 72%, #1d1640); } .hills .h2 { fill: color-mix(in oklab, var(--mood) 85%, #000 6%); }
.hills .orb { fill: color-mix(in oklab, var(--mood) 60%, #ffb36b); } .hills .sand { fill: color-mix(in oklab, var(--mood) 18%, #fbe6c8); }
.buddy { position: absolute; left: 3vw; bottom: 3vh; width: clamp(110px, 15vw, 210px); height: auto; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(-3deg); } }
body[data-scene="stage"] .ground { display: block; }

/* ---------- header ---------- */
.top { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(16px, 3vw, 36px); pointer-events: none; }
.top > * { pointer-events: auto; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.9rem/1 var(--display); letter-spacing: .04em; color: #fff; -webkit-text-stroke: 7px #3b1d8f; paint-order: stroke fill; text-shadow: 0 4px 0 #3b1d8f; }
.mark img { width: 50px; height: 50px; }
.mark img, .buddy, .mind-avatar img, .mcard img, .qc-brain, .empty img { filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 4px 0 #3b1d8f) drop-shadow(0 10px 12px rgba(40,20,110,.3)); }
.top-right { display: flex; gap: 12px; align-items: center; }
body[data-scene="app"] .top { display: none; }
body[data-scene="stage"] .top-cta { display: none; }
body[data-scene="result"] .dome { position: fixed; }
.round-btn { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--btn); background: var(--paper); color: var(--btn); cursor: pointer; display: grid; place-items: center; box-shadow: 0 5px 0 var(--btn-dark); transition: transform .15s, box-shadow .15s; font: 800 1.8rem/1 var(--display); }
.round-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--btn-dark); }
.round-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-dark); }
.lines, .lines::before { display: block; width: 22px; height: 3px; border-radius: 3px; background: currentColor; position: relative; }
.lines { top: -4px; } .lines::before { content: ''; top: 8px; }
body[data-scene="stage"] .lines { width: 5px; height: 18px; top: 0; left: -5px; } body[data-scene="stage"] .lines::before { width: 5px; height: 18px; top: 0; left: 10px; }

/* ---------- pills ---------- */
.pill { --c: var(--btn); --d: var(--btn-dark); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 0 40px; border-radius: 999px; border: 2px solid var(--c); background: var(--paper); color: var(--c); font: 800 1.35rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; text-decoration: none; cursor: pointer; box-shadow: 0 6px 0 var(--d); transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .3s, color .3s, border-color .3s; }
.pill:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--d); }
.pill:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--d); }
.pill.primary { background: var(--c); color: #fff; }
.pill.small { min-height: 46px; padding: 0 22px; font-size: 1rem; box-shadow: 0 4px 0 var(--d); }
.pill.ghost { --c: var(--ink); --d: #000; }
.pill:disabled { opacity: .55; cursor: wait; transform: none; }
.answer:disabled { opacity: 1; cursor: default; }
.text-link { font: 700 1.05rem var(--display); color: var(--btn); text-decoration: none; text-transform: uppercase; }

/* ---------- type ---------- */
.headline { margin: 0; font: 800 clamp(2.4rem, 5.8vw, 5.4rem)/.98 var(--display); text-transform: uppercase; letter-spacing: .005em; color: var(--ink); text-wrap: balance; }
.headline.md { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.headline em { font-style: normal; }
.headline .good { color: var(--good); } .headline .bad { color: var(--bad); } .headline .accent { color: var(--btn); }
.hand { font-family: var(--hand); font-variant: small-caps; color: #514e5e; letter-spacing: .04em; margin: 0; }
.eyebrow { font-size: clamp(1rem, 1.4vw, 1.25rem); text-transform: lowercase; }
.lede { font: 500 clamp(1.05rem, 1.4vw, 1.3rem)/1.45 var(--display); color: var(--muted); margin: 0; max-width: 34em; }

main { position: relative; z-index: 5; outline: none; }

/* ---------- quiz stage ---------- */
.stage { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: clamp(96px, 15vh, 150px) 20px 30vh; text-align: center; gap: 18px; }
.count { font: 500 1.4rem var(--display); color: var(--muted); margin: 0; }
.stage .headline { max-width: 15em; font-size: clamp(2rem, 4vw, 3.5rem); min-height: 2.1em; display: flex; align-items: center; justify-content: center; }
.stage .sub { min-height: 1.4em; font-size: 1.05rem; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 18px 16px; margin-top: 22px; }
.answer { width: 100%; min-height: 74px; padding: 8px 22px; font-size: clamp(1rem, 1.5vw, 1.3rem); line-height: 1.1; text-transform: uppercase; }
.answer.is-right { --c: var(--good); --d: transparent; background: var(--good-bg); box-shadow: none; transform: none; }
.answer.is-wrong { --c: var(--bad); --d: transparent; background: var(--bad-bg); box-shadow: none; transform: none; animation: shake .4s; }
.answer.is-dim { --c: #cfc9c0; --d: transparent; background: #faf8f4; box-shadow: none; transform: none; }
.answer.is-pending { animation: pulse .8s infinite; }
.answers.locked .answer { pointer-events: none; }
@keyframes shake { 25% { translate: -6px; } 75% { translate: 6px; } }
@keyframes pulse { 50% { opacity: .55; } }
.drawer { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--paper); padding: 30px clamp(20px, 4vw, 48px); display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: center; box-shadow: 0 -18px 40px rgba(40,30,80,.08); transform: translateY(105%); transition: transform .5s var(--ease); text-align: left; }
.drawer.open { transform: none; }
.drawer h2 { margin: 0 0 6px; font: 800 1.6rem var(--display); text-transform: uppercase; color: #3d3b47; }
.drawer p { margin: 0; font: 500 clamp(1.05rem, 1.5vw, 1.35rem)/1.4 var(--display); color: #3d3b47; max-width: 52em; }
.drawer .src { font: 600 .9rem var(--body); color: var(--muted); margin-top: 8px; display: inline-block; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: color-mix(in oklab, var(--mood) 25%, #fff); border: 2px solid color-mix(in oklab, var(--mood) 60%, #000 10%); }
.dots i.r { background: var(--good); border-color: var(--good); } .dots i.w { background: var(--bad); border-color: var(--bad); }

/* ---------- result ---------- */
.result { padding-bottom: 10vh; }
.result .headline { font-size: clamp(3rem, 8vw, 7rem); min-height: 0; color: var(--ink); }
.reveal { animation: pop .9s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(30px); } }
.mind-avatar { position: relative; width: 210px; height: 210px; margin: 6px auto; display: grid; place-items: center; }
.mind-avatar::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--tier, var(--mood)) 45%, #fff) 0, transparent 70%); animation: glow 2.4s ease-in-out infinite; }
.mind-avatar img { position: relative; width: 82%; animation: bob 3s ease-in-out infinite; }
.mind-avatar .lvl { position: absolute; bottom: 2px; right: 6px; background: var(--tier, var(--btn)); color: #fff; font: 800 1rem var(--display); padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 0 color-mix(in oklab, var(--tier, var(--btn)) 70%, #000); }
@keyframes glow { 50% { transform: scale(1.12); opacity: .7; } }
.pips { display: flex; gap: 6px; justify-content: center; }
.pips i { width: 26px; height: 10px; border-radius: 6px; background: #e6e0f3; }
.pips i.on { background: var(--tier, var(--btn)); }
.traits { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.traits li { background: var(--paper); border: 2px solid color-mix(in oklab, var(--tier, var(--btn)) 50%, #fff); border-radius: 999px; padding: 8px 16px; font: 700 1rem var(--display); }
.row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.ladder { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.ladder span { font: 700 .95rem var(--display); padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--muted); }
.ladder span.on { background: var(--tier); color: #fff; }

/* ---------- landing (3D scroll) ---------- */
body[data-scene="landing"] .dome { position: fixed; }
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(110px, 16vh, 160px) 20px 0; gap: 22px; position: relative; overflow: hidden; }
.hero .headline { font-size: clamp(3rem, 7.6vw, 7rem); }
.hero .row { margin-top: 6px; }
.hero-brain { --bw: min(560px, 80vw); position: relative; width: calc(var(--bw) + 200px); max-width: 100vw; padding: 0 100px; margin: 10px auto calc(var(--bw) * -.3); perspective: 1200px; z-index: 1; }
@media (max-width: 600px) { .hero-brain { --bw: 72vw; padding: 0 14vw; width: 100vw; } }
.hero > *:not(.hero-brain) { position: relative; z-index: 2; }
.hero-brain img { width: 100%; transform: translateY(calc(4% - var(--hp, 0) * 18%)) rotateX(calc(28deg - var(--hp, 0) * 40deg)) rotateY(calc(var(--mx, 0) * 14deg)) scale(calc(1 + var(--hp, 0) * .15)); transform-style: preserve-3d; filter: drop-shadow(4px 0 0 #fff) drop-shadow(-4px 0 0 #fff) drop-shadow(0 4px 0 #fff) drop-shadow(0 -4px 0 #fff) drop-shadow(0 10px 0 #3b1d8f) drop-shadow(0 40px 40px rgba(70,30,170,.28)); transition: transform .12s linear; }
.hero-brain .bank { position: absolute; left: -12%; right: -12%; bottom: -10px; height: 34%; }
.bank .cloud { animation: none; }
.bank .k1 { left: 0; bottom: 0; width: 46%; height: 100%; } .bank .k2 { right: 0; bottom: -10%; width: 50%; height: 110%; } .bank .k3 { left: 30%; bottom: -30%; width: 44%; height: 90%; }
.hero .scroll-hint { display: none; bottom: 18px; left: 50%; translate: -50%; z-index: 3; font-size: 1rem; }

.pin { position: relative; }
.pin .sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(28px, 5vh, 56px); padding: 90px 0 24px; overflow: hidden; perspective: 1400px; }
.pin.questions { height: 320vh; }
.pin.minds { height: 520vh; }
.pin-copy { position: relative; text-align: center; padding: 0 20px; display: grid; gap: 10px; justify-items: center; z-index: 3; flex: none; }
.pin-copy .headline.md { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.qcloud { position: relative; width: min(1000px, 94vw); height: min(420px, 44vh); flex: none; margin-top: clamp(40px, 8vh, 80px); transform-style: preserve-3d; transform: rotateX(10deg) rotateY(calc(var(--p, 0) * -70deg + 20deg)); }
.qcloud .qc-brain { position: absolute; left: 50%; top: 50%; width: 240px; translate: -50% -50%; transform: translateZ(0) rotateY(calc(var(--p, 0) * 70deg - 20deg)); }
.qcard { position: absolute; left: 50%; top: 50%; width: 260px; margin: -60px 0 0 -130px; background: var(--paper); border-radius: 26px; padding: 18px 20px; text-align: left; box-shadow: 0 8px 0 var(--line), 0 30px 50px rgba(40,30,90,.12); font: 800 1.05rem/1.15 var(--display); text-transform: uppercase; transform-style: preserve-3d; transition: opacity .4s; }
.qcard small { display: block; font: 600 .8rem var(--body); color: var(--muted); text-transform: none; margin-bottom: 6px; }
.qcard .opt { display: block; margin-top: 10px; border: 2px solid var(--btn); color: var(--btn); border-radius: 999px; padding: 6px 12px; font-size: .85rem; text-align: center; }
.qcard .opt.ok { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.ring-label { position: relative; text-align: center; z-index: 3; flex: none; }
.ring-label b { font: 800 clamp(1.6rem, 3vw, 2.6rem) var(--display); text-transform: uppercase; }

.panel-section { position: relative; padding: 14vh 20px; display: grid; justify-items: center; gap: 22px; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); gap: 22px; perspective: 1000px; margin-top: 16px; }
.step { background: var(--paper); border-radius: 32px; padding: 28px 24px; text-align: left; box-shadow: 0 8px 0 var(--line), 0 24px 50px rgba(40,30,90,.08); transform: rotateX(calc((1 - var(--v, 1)) * 20deg)) translateY(calc((1 - var(--v, 1)) * 50px)); opacity: calc(.25 + var(--v, 1) * .75); will-change: transform; }
.step .n { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--btn); color: #fff; font: 800 1.4rem var(--display); box-shadow: 0 4px 0 var(--btn-dark); }
.step h3 { margin: 16px 0 6px; font: 800 1.5rem/1.05 var(--display); text-transform: uppercase; }
.step p { margin: 0; color: var(--muted); line-height: 1.5; }
.coin-tilt { perspective: 1000px; margin-top: 10px; }
.coin-ticket { width: min(420px, 90vw); background: var(--paper); border-radius: 34px; padding: 24px; display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; text-align: left; box-shadow: 0 10px 0 var(--line), 0 40px 60px rgba(40,30,90,.14); transform: rotateX(calc(18deg - var(--v, 1) * 18deg)) rotateY(calc(var(--mx, 0) * 12deg)) rotateZ(-3deg); }
.coin-ticket .img { width: 110px; height: 110px; border-radius: 26px; background: repeating-linear-gradient(45deg, #f1ecff 0 10px, #e6ddff 10px 20px); display: grid; place-items: center; font: 700 .8rem var(--display); color: var(--muted); text-align: center; padding: 8px; }
.coin-ticket b { font: 800 1.6rem/1 var(--display); text-transform: uppercase; display: block; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font: 800 .85rem var(--display); text-transform: uppercase; background: var(--tier, var(--btn)); color: #fff; }
.chip.soft { background: color-mix(in oklab, var(--tier, var(--btn)) 16%, #fff); color: color-mix(in oklab, var(--tier, var(--btn)) 70%, #000); }
.final { min-height: 90vh; padding-bottom: 10vh; align-content: center; }
.foot { position: relative; z-index: 5; text-align: center; padding: 30px 20px 40px; font: 600 .9rem var(--body); color: var(--muted); background: var(--paper); }
.foot a { margin: 0 10px; }


/* mind cards: chunky slab with a coloured top, carousel positioned by JS (cards behind blur, never vanish) */
.ring { position: relative; width: min(1200px, 100vw); height: var(--card-h); flex: none; perspective: 1300px; --card-w: min(300px, 40vh); --card-h: min(410px, 54vh); }
.mcard { --dark: color-mix(in oklab, var(--tier) 62%, #1a1030); position: absolute; left: 50%; top: 0; width: var(--card-w); height: var(--card-h); margin-left: calc(var(--card-w) / -2); border-radius: 34px; background: var(--paper); display: flex; flex-direction: column; overflow: visible; will-change: transform, filter;
  box-shadow: 0 2px 0 var(--dark), 0 5px 0 var(--dark), 0 8px 0 var(--dark), 0 11px 0 var(--dark), 0 14px 0 var(--dark), 0 34px 50px color-mix(in oklab, var(--tier) 45%, transparent), inset 0 0 0 3px var(--tier); }
.mc-top { position: relative; flex: 0 0 46%; border-radius: 34px 34px 26px 26px; margin: 8px 8px 0; background: radial-gradient(120% 90% at 30% 15%, color-mix(in oklab, var(--tier) 55%, #fff) 0, var(--tier) 55%, color-mix(in oklab, var(--tier) 80%, #2a1660) 100%); display: grid; place-items: center; overflow: hidden; }
.mc-top::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 45%, transparent 60%); transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(120%); } }
.mc-top .big { position: absolute; right: 12px; top: -14px; font: 800 clamp(5rem, 13vh, 8rem)/1 var(--display); color: rgba(255,255,255,.28); }
.mc-top img { width: min(130px, 16vh); position: relative; animation: bob 3.4s ease-in-out infinite; }
.mc-top .score { position: absolute; left: 14px; top: 14px; font: 800 .95rem var(--display); background: #fff; color: var(--dark); border-radius: 999px; padding: 5px 13px; box-shadow: 0 3px 0 var(--dark); }
.mc-body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 16px 18px; min-height: 0; }
.mcard h3 { margin: 0; font: 800 clamp(1.4rem, 3.4vh, 2rem)/1 var(--display); text-transform: uppercase; color: var(--ink); }
.mcard p { margin: 0; font: 600 clamp(.85rem, 2vh, 1rem)/1.3 var(--display); color: var(--dark); }
.mcard ul { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.mcard li { font: 700 clamp(.72rem, 1.7vh, .88rem) var(--display); background: color-mix(in oklab, var(--tier) 16%, #fff); border: 2px solid color-mix(in oklab, var(--tier) 45%, #fff); border-radius: 999px; padding: 4px 10px; }
.mcard.flat { position: relative; left: auto; margin: 0 0 14px; width: auto; height: 430px; }

/* ---------- dashboard ---------- */
body[data-scene="app"] { background: var(--cream); }
body[data-scene="app"] .sky { opacity: .55; }
.shell { position: relative; z-index: 5; display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; padding: 22px 18px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); border-right: 2px solid var(--line); }
.rail .mark { margin: 0 8px 22px; }
.rail a.nav { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; text-decoration: none; font: 700 1.1rem var(--display); color: #4a4757; transition: background .2s, transform .2s; }
.rail a.nav:hover { background: var(--btn-soft); transform: translateX(3px); }
.rail a.nav.active { background: var(--btn); color: #fff; box-shadow: 0 4px 0 var(--btn-dark); }
.rail .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(123,60,255,.12); font-size: 1rem; }
.rail a.nav.active .ico { background: rgba(255,255,255,.22); }
.rail .rail-foot { margin-top: auto; display: grid; gap: 10px; }
.rail .rail-foot .pill { width: 100%; }
.board { padding: 26px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.board-head h1 { margin: 0; font: 800 clamp(2rem, 3.6vw, 3rem)/1 var(--display); text-transform: uppercase; }
.board-head .hand { margin-top: 6px; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: 1.3fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--paper); border-radius: 30px; padding: 24px; box-shadow: 0 6px 0 var(--line), 0 18px 40px rgba(40,30,90,.06); min-width: 0; }
.card h2 { margin: 0 0 12px; font: 800 1.45rem/1.05 var(--display); text-transform: uppercase; }
.card p { line-height: 1.55; color: var(--muted); }
.card.tilt { transition: transform .25s var(--ease); }
.card.tilt:hover { transform: translateY(-4px) rotate(-.6deg); }
.my-mind { background: linear-gradient(140deg, color-mix(in oklab, var(--tier) 22%, #fff), var(--paper) 70%); border: 3px solid color-mix(in oklab, var(--tier) 60%, #fff); display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: center; }
.my-mind .mind-avatar { width: 170px; height: 170px; margin: 0; }
.my-mind h2 { font-size: 2.4rem; margin: 6px 0; }
.stat { display: grid; gap: 4px; }
.stat b { font: 800 2.6rem/1 var(--display); }
.stat span { font: 600 .9rem var(--body); color: var(--muted); }
.action { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.action .big-ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; background: var(--btn-soft); }
.bars { display: grid; gap: 10px; margin-top: 6px; }
.bar { display: grid; grid-template-columns: 110px 1fr 34px; gap: 10px; align-items: center; font: 700 .95rem var(--display); }
.bar .track { height: 16px; border-radius: 999px; background: #f0ebe2; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; background: var(--tier); width: 0; transition: width 1s var(--ease); }
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.coin { background: var(--paper); border-radius: 26px; padding: 14px; text-decoration: none; box-shadow: 0 6px 0 var(--line); display: grid; gap: 8px; transition: transform .25s var(--ease); }
.coin:hover { transform: translateY(-5px) rotate(-1deg); }
.coin img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; background: #f1ecff; }
.coin b { font: 800 1.25rem/1 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font: 600 .85rem var(--body); color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.filters a { text-decoration: none; padding: 9px 16px; border-radius: 999px; font: 700 .95rem var(--display); background: var(--paper); box-shadow: 0 4px 0 var(--line); text-transform: uppercase; }
.filters a.on { background: var(--tier, var(--btn)); color: #fff; box-shadow: 0 4px 0 color-mix(in oklab, var(--tier, var(--btn)) 70%, #000); }
.coins > .empty, .coins > .fine { grid-column: 1 / -1; }
.empty { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 12px; }
.empty img { width: 110px; animation: bob 3s ease-in-out infinite; }
.empty h2 { margin: 0; font: 800 1.8rem var(--display); text-transform: uppercase; }
.loading { padding: 40px; text-align: center; font: 600 1.1rem var(--display); color: var(--muted); }

/* forms */
.form { display: grid; gap: 16px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; font: 700 1rem var(--display); }
.field small { font: 500 .82rem var(--body); color: var(--muted); }
.field input, .field textarea { font: 500 1rem var(--body); color: var(--ink); background: var(--cream); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; width: 100%; transition: border-color .2s, background .2s; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--btn); background: #fff; }
.drop { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; border: 2px dashed var(--line); border-radius: 22px; padding: 12px; cursor: pointer; background: var(--cream); }
.drop img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; background: #f1ecff; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { border-color: var(--btn); }
.status { font: 600 .95rem/1.5 var(--body); padding: 12px 16px; border-radius: 16px; background: var(--btn-soft); color: #3c2a7a; }
.status:empty { display: none; }
.status.error { background: var(--bad-bg); color: #8a2a1b; } .status.ok { background: var(--good-bg); color: #1d5f42; }
.fine { font: 500 .85rem/1.5 var(--body); color: var(--muted); margin: 0; }
.ca { display: flex; gap: 10px; align-items: center; background: var(--cream); border-radius: 16px; padding: 10px 14px; font: 600 .85rem ui-monospace, monospace; overflow: hidden; }
.ca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chat { display: grid; gap: 10px; }
.bubble { justify-self: start; max-width: 85%; background: color-mix(in oklab, var(--tier) 16%, #fff); border-radius: 22px 22px 22px 6px; padding: 12px 16px; font: 600 1rem/1.4 var(--display); }
.bubble.me { justify-self: end; background: var(--btn); color: #fff; border-radius: 22px 22px 6px 22px; }
.chat form { display: flex; gap: 10px; }
.chat input { flex: 1; font: 500 1rem var(--body); border: 2px solid var(--line); border-radius: 999px; padding: 12px 18px; background: var(--cream); }
.detail { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.detail .art { width: 100%; aspect-ratio: 1; border-radius: 28px; object-fit: cover; box-shadow: 0 8px 0 var(--line); background: #f1ecff; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* menu */
dialog#menu { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: var(--paper); color: var(--ink); }
dialog#menu[open] { display: grid; place-items: center; animation: fade .35s var(--ease); }
dialog#menu .close { position: absolute; top: 20px; right: clamp(16px, 3vw, 36px); }
.menu-links { display: grid; gap: 4px; text-align: center; }
.menu-links a { font: 800 clamp(2rem, 5vw, 3.6rem)/1.15 var(--display); text-transform: uppercase; text-decoration: none; transition: color .2s, transform .2s; }
.menu-links a:hover { color: var(--btn); transform: scale(1.04); }
.menu-foot { position: absolute; bottom: 30px; left: 0; right: 0; display: grid; justify-items: center; gap: 10px; }
@keyframes fade { from { opacity: 0; transform: scale(.98); } }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; translate: -50%; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font: 600 .95rem var(--body); max-width: 90vw; }
.mobile-tabs { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .mobile-tabs { display: flex; position: fixed; z-index: 25; left: 10px; right: 10px; bottom: 10px; background: var(--paper); border-radius: 999px; padding: 6px; box-shadow: 0 6px 0 var(--line), 0 10px 30px rgba(0,0,0,.1); justify-content: space-around; }
  .mobile-tabs a { flex: 1; text-align: center; padding: 10px 4px; border-radius: 999px; text-decoration: none; font: 700 .8rem var(--display); text-transform: uppercase; }
  .mobile-tabs a.active { background: var(--btn); color: #fff; }
  .board { padding-bottom: 100px; }
  .grid.two, .grid.three, .detail, .steps { grid-template-columns: 1fr; }
  .form .two { grid-template-columns: 1fr; }
  .my-mind { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .answers { grid-template-columns: 1fr 1fr; gap: 12px 10px; width: 100%; max-width: 420px; margin-top: 10px; }
  .answer { min-height: 62px; padding: 6px 10px; font-size: .88rem; box-shadow: 0 4px 0 var(--d); }
  .stage { padding-top: 92px; gap: 12px; }
  .stage .headline { font-size: 1.75rem; min-height: 2.2em; }
  .stage .sub { font-size: .9rem; }
  .cloud { transform: scale(.6); } .c2 { width: 170px; height: 66px; right: -20px; } .c4 { display: none; }
  .bolt { width: 44px; height: 90px; }
  .drawer { gap: 10px; } .drawer h2 { font-size: 1.25rem; } .drawer p { font-size: 1rem; } .drawer .pill { min-height: 54px; }
  .drawer { grid-template-columns: 1fr; padding: 22px 18px; }
  .drawer .pill { width: 100%; }
  .qcard { width: 200px; margin-left: -100px; }
  .top-cta { display: none; }
  .ground { height: 18vh; }
  .stage { padding-bottom: 24vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-brain img, .qcloud, .qcloud .qc-brain { transform: none; }
}

/* scroll depth: content tilts with scroll speed, clouds drift at different depths */
body[data-scene="landing"] .qcloud { transform: rotateX(calc(10deg + var(--tilt, 0) * 1deg)) rotateY(calc(var(--p, 0) * -70deg + 20deg)); }
body[data-scene="landing"] .c1 { translate: 0 calc(var(--sy, 0) * -.06px); } body[data-scene="landing"] .c2 { translate: 0 calc(var(--sy, 0) * -.14px); } body[data-scene="landing"] .c3 { translate: 0 calc(var(--sy, 0) * -.22px); }
body[data-scene="landing"] .c4 { translate: 0 calc(var(--sy, 0) * -.1px); } body[data-scene="landing"] .c5 { translate: 0 calc(var(--sy, 0) * -.3px); }
body[data-scene="landing"] .dome { translate: 0 calc(min(var(--sy, 0), 900) * -.05px); }
body[data-scene="landing"] .ring { transform: rotateX(calc(var(--tilt, 0) * .6deg)); }
/* hero brain: the lower half blurs and fades into the page instead of a hard cut */
.hero-brain { -webkit-mask-image: linear-gradient(180deg, #000 38%, rgba(0,0,0,.55) 54%, transparent 70%); mask-image: linear-gradient(180deg, #000 38%, rgba(0,0,0,.55) 54%, transparent 70%); }
.hero-brain::after { content: ''; position: absolute; left: -10%; right: -10%; top: 36%; height: 38%; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%), linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent, #000 60%), linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask-composite: intersect; pointer-events: none; }
.hero-brain .bank { display: none; }
body[data-scene="landing"] .top, body[data-scene="result"] .top { background: linear-gradient(180deg, var(--mood) 0, color-mix(in oklab, var(--mood) 60%, transparent) 55%, transparent); padding-bottom: 34px; }

.iq-badge { display: inline-flex; align-items: baseline; gap: 8px; background: var(--ink); color: #fff; font: 700 1rem var(--display); text-transform: uppercase; padding: 6px 18px; border-radius: 999px; box-shadow: 0 4px 0 #000; transform: rotate(-3deg); }
.iq-badge b { font: 800 1.9rem/1 var(--display); color: var(--tier, #fff); }
/* socials: X + pump.fun */
.soc { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; flex: none; }
.soc img { display: block; }
.soc.x { background: #111; box-shadow: 0 5px 0 #000, 0 0 0 3px #fff; }
.soc.pump { background: #fff; box-shadow: 0 5px 0 #3fa56a, 0 0 0 3px #5fcb88; }
.soc.pump img { transform: rotate(-12deg); transition: transform .3s var(--ease); }
.soc:hover { transform: translateY(-3px) rotate(-6deg); }
.soc.pump:hover img { transform: rotate(20deg) scale(1.08); }
.soc:active { transform: translateY(3px); }
body[data-scene="stage"] .top .soc { display: none; }
.soc-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.rail .soc-row { justify-content: flex-start; margin-bottom: 4px; } .rail .soc-row .hand { text-decoration: none; font-size: .95rem; }
.foot .soc-row { margin-bottom: 14px; }
.hero-note { font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: -4px; }
.hero-note a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); background: var(--paper); padding: 4px 12px 4px 6px; border-radius: 999px; box-shadow: 0 3px 0 var(--line); transition: transform .2s var(--ease); font-variant: normal; font-family: var(--display); font-weight: 700; }
.hero-note a:hover { transform: translateY(-2px) rotate(-2deg); }
.xdot { width: 26px; height: 26px; border-radius: 50%; background: #111; display: grid; place-items: center; }
.pumpbtn { --c: #2f9b6d; --d: #237a54; }
.stickers { display: flex; gap: clamp(20px, 4vw, 56px); justify-content: center; flex-wrap: wrap; perspective: 1100px; margin-top: 18px; }
.sticker { --rot: -5deg; width: min(340px, 86vw); border-radius: 36px; padding: 30px 28px; text-decoration: none; display: grid; justify-items: start; gap: 10px; text-align: left; position: relative; transform: rotateY(calc(var(--mx, 0) * 8deg)) rotateX(calc((1 - var(--v, 1)) * 22deg)) rotate(var(--rot)) translateY(calc((1 - var(--v, 1)) * 50px)); opacity: calc(.25 + var(--v, 1) * .75); transform-style: preserve-3d; will-change: transform; }
.sticker::before { content: ''; position: absolute; inset: 10px; border: 3px dashed rgba(255,255,255,.35); border-radius: 28px; pointer-events: none; }
.sticker b { font: 800 2.2rem/1 var(--display); }
.sticker > span:not(.st-ico):not(.st-cta) { font: 600 1rem/1.4 var(--body); opacity: .85; }
.st-ico { width: 104px; height: 104px; border-radius: 30px; display: grid; place-items: center; transform: translateZ(40px) rotate(-8deg); }
.st-cta { margin-top: 6px; font: 800 1.05rem var(--display); text-transform: uppercase; padding: 10px 20px; border-radius: 999px; }
.sx { background: #121212; color: #fff; box-shadow: 0 12px 0 #000, 0 40px 60px rgba(0,0,0,.25); }
.sx .st-ico { background: #2a2a2a; box-shadow: 0 6px 0 #000; }
.sx .st-cta { background: #fff; color: #111; box-shadow: 0 4px 0 #9a9a9a; }
.sp { --rot: 4deg; background: linear-gradient(150deg, #8ef0b1, #5fcb88 60%, #3fa56a); color: #0f3d24; box-shadow: 0 12px 0 #2d7c50, 0 40px 60px rgba(63,165,106,.35); }
.sp::before { border-color: rgba(15,61,36,.25); }
.sp .st-ico { background: #fff; box-shadow: 0 6px 0 #2d7c50; }
.sp .st-ico img { animation: bob 3s ease-in-out infinite; }
.sp .st-cta { background: #0f3d24; color: #fff; box-shadow: 0 4px 0 #062113; }
.sticker:hover { --rot: 0deg; }
@media (max-width: 600px) { .top .soc { width: 40px; height: 40px; } .top .soc.pump img { width: 24px; height: 24px; } .top .soc.x img { width: 17px; height: 17px; } .top-right { gap: 8px; } }
.ca-chip { display: inline-flex; align-items: center; gap: 10px; max-width: min(640px, 92vw); background: var(--paper); border: 2px solid #5fcb88; border-radius: 999px; padding: 6px 6px 6px 12px; cursor: pointer; box-shadow: 0 4px 0 #3fa56a; transition: transform .15s var(--ease); font: inherit; color: var(--ink); position: relative; z-index: 2; }
.ca-chip:hover { transform: translateY(-2px); } .ca-chip:active { transform: translateY(3px); box-shadow: 0 1px 0 #3fa56a; }
.ca-chip img { transform: rotate(-12deg); flex: none; } .ca-chip b { font: 800 1.05rem var(--display); flex: none; }
.ca-chip span { font: 600 .85rem ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-chip i { font: 800 .85rem var(--display); font-style: normal; text-transform: uppercase; background: #0f3d24; color: #fff; padding: 8px 14px; border-radius: 999px; flex: none; }
