/* calm-fun: soft sky, warm cream, chunky toy buttons. */
:root {
  color-scheme: light;
  --bg: #fff4e2; --sky: #bfe6ff; --sky-2: #e3f5ff; --card: #fffdf8; --edge: #f1dfc4;
  --ink: #33284a; --ink-soft: #675a80; --ink-mute: #8b80a0;
  --sun: #ffc35c; --sun-deep: #e69a1f; --coral: #ff8f6b; --mint: #a5e6cc; --lilac: #d6c8ff; --pink: #ffc4d4; --peach: #ffd9b8;
  --link: #6a3fd1; --good: #1f8a4c; --shadow: 0 4px 0 rgba(51, 40, 74, .08), 0 14px 30px rgba(51, 40, 74, .1);
  --r: 22px;
  --font-fun: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif; --font: "Nunito", ui-rounded, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1d1a2b; --sky: #2b2a52; --sky-2: #232140; --card: #2a2640; --edge: #3d3760;
    --ink: #f6f0ff; --ink-soft: #cdc3e6; --ink-mute: #a79dc2;
    --sun: #ffc35c; --sun-deep: #c9871a; --coral: #ff9f80; --mint: #3f8f76; --lilac: #6b5bb0; --pink: #a5587a; --peach: #9a6a45;
    --link: #c3adff; --good: #6fd69a; --shadow: 0 4px 0 rgba(0, 0, 0, .25), 0 14px 30px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 600 1.06rem/1.6 var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-fun); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 12px; z-index: 20; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* sky */
.sky { position: absolute; inset: 0 0 auto 0; height: 640px; z-index: -1; overflow: hidden; background: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 45%, var(--bg) 100%); }
.cloud { position: absolute; width: 180px; height: 56px; background: #fff; border-radius: 60px; opacity: .85; animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 76px; height: 76px; left: 26px; top: -34px; }
.cloud::after { width: 58px; height: 58px; right: 30px; top: -22px; }
.c1 { top: 90px; left: -10%; }
.c2 { top: 210px; left: 55%; transform: scale(.7); animation-duration: 85s; animation-delay: -30s; }
.c3 { top: 40px; left: 30%; transform: scale(.5); animation-duration: 110s; animation-delay: -60s; opacity: .7; }
@keyframes drift { from { translate: -30vw 0; } to { translate: 110vw 0; } }
@media (prefers-color-scheme: dark) { .cloud { background: #4a4780; opacity: .5; } }

/* header */
.top { max-width: 1120px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 1.7rem var(--font-fun); color: var(--ink); text-decoration: none; }
.logo b { color: var(--coral); }
.logo img { transition: rotate .4s; }
.logo:hover img { rotate: 20deg; }
.top nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 800; padding: 8px 4px; }
.top nav a:hover { text-decoration: underline wavy var(--coral); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 1.1rem var(--font-fun); color: #33284a; background: var(--sun); text-decoration: none; box-shadow: 0 5px 0 var(--sun-deep); transition: translate .12s, box-shadow .12s; }
.btn:hover { translate: 0 -2px; box-shadow: 0 7px 0 var(--sun-deep); }
.btn:active { translate: 0 4px; box-shadow: 0 1px 0 var(--sun-deep); }
.btn.big { font-size: 1.3rem; padding: 14px 30px; min-height: 58px; }
.btn.small { font-size: 1rem; min-height: 44px; padding: 6px 16px; box-shadow: 0 3px 0 var(--sun-deep); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: 0 5px 0 var(--edge); border: 2px solid var(--edge); }
.btn.small.ghost { box-shadow: 0 3px 0 var(--edge); }
.btn.danger { background: #ffd0cf; box-shadow: 0 3px 0 #e39a98; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

/* hero */
.hero { max-width: 1120px; margin: 0 auto; padding: 28px 20px 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.eyebrow { display: inline-block; background: var(--card); border: 2px solid var(--edge); border-radius: 999px; padding: 4px 16px; font-weight: 800; font-size: .95rem; margin-bottom: 14px; }
.lead { font-size: 1.22rem; color: var(--ink-soft); max-width: 36em; }
.wiggle { display: inline-block; color: var(--coral); animation: wiggle 3.5s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wiggle { 0%, 100% { rotate: -2deg; } 50% { rotate: 2.5deg; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.hero-art { position: relative; min-height: 340px; }
.polaroid { position: absolute; width: 68%; border-radius: 22px; border: 8px solid #fff; box-shadow: var(--shadow); object-fit: cover; aspect-ratio: 4 / 3; }
.p1 { left: 0; top: 0; rotate: -5deg; animation: bob 6s ease-in-out infinite; }
.p2 { right: 0; bottom: 0; rotate: 6deg; animation: bob 7s ease-in-out -2s infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.float { position: absolute; font-size: 2.2rem; animation: bob 5s ease-in-out infinite; }
.f1 { right: 8%; top: 4%; } .f2 { left: 26%; bottom: 2%; animation-delay: -1s; } .f3 { left: 8%; top: 62%; animation-delay: -2s; font-size: 2.8rem; } .f4 { right: 30%; top: -6%; animation-delay: -3s; }

/* blocks */
.block { max-width: 1120px; margin: 0 auto; padding: 36px 20px; }
.sub { color: var(--ink-soft); margin-top: -4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; margin-top: 22px; }
.card { background: var(--card); border: 3px solid var(--edge); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: translate .2s, rotate .2s; }
.card:hover { translate: 0 -6px; rotate: -.6deg; }
.card:nth-child(even):hover { rotate: .6deg; }
.card-art { display: block; aspect-ratio: 4 / 3; background: var(--peach); overflow: hidden; }
.card.mint .card-art { background: var(--mint); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: scale .4s; }
.card:hover .card-art img { scale: 1.05; }
.card-body { padding: 16px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body p { color: var(--ink-soft); }
.card-body .btn { margin-top: auto; align-self: flex-start; }
.card.soon { border-style: dashed; background: transparent; box-shadow: none; }
.card.soon .card-art { background: var(--lilac); display: grid; place-items: center; font-size: 5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1em; }
.chips span { background: var(--bg); border: 2px solid var(--edge); border-radius: 999px; padding: 2px 12px; font-size: .92rem; font-weight: 800; color: var(--ink); }
.card-best { font-weight: 800; color: var(--ink) !important; background: color-mix(in srgb, var(--sun) 35%, transparent); border-radius: 12px; padding: 6px 12px; }

.perk-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.perk-list li { background: var(--card); border: 3px solid var(--edge); border-radius: var(--r); padding: 20px; color: var(--ink-soft); }
.perk-list span { font-size: 2.4rem; display: block; }
.perk-list b { display: block; font: 600 1.3rem var(--font-fun); color: var(--ink); }
.perk-list li:nth-child(1) { background: color-mix(in srgb, var(--sun) 28%, var(--card)); }
.perk-list li:nth-child(2) { background: color-mix(in srgb, var(--pink) 40%, var(--card)); }
.perk-list li:nth-child(3) { background: color-mix(in srgb, var(--mint) 40%, var(--card)); }
.perk-list li:nth-child(4) { background: color-mix(in srgb, var(--lilac) 40%, var(--card)); }

.calm { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; background: color-mix(in srgb, var(--sky) 55%, var(--card)); border-radius: 32px; padding: 32px 36px; margin-top: 20px; margin-bottom: 20px; }
.bubble { width: 170px; height: 170px; border-radius: 50%; border: 0; cursor: pointer; font: 600 1.25rem var(--font-fun); color: #33284a;
  background: radial-gradient(circle at 32% 28%, #fff 0 12%, #d9f2ff 30%, #9fd8f7 100%); box-shadow: inset -8px -10px 22px rgba(60, 120, 190, .3), 0 12px 30px rgba(60, 120, 190, .25); transition: scale 4s ease-in-out; }
.bubble.in { scale: 1.3; } .bubble.out { scale: .82; }

.about { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.about-art { font-size: 5rem; background: var(--pink); border-radius: 50%; width: 140px; height: 140px; display: grid; place-items: center; rotate: -6deg; }

.faq details { background: var(--card); border: 3px solid var(--edge); border-radius: 18px; padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font: 600 1.15rem var(--font-fun); padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--coral); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq p { color: var(--ink-soft); }

/* game page */
.crumbs { max-width: 1120px; margin: 0 auto; padding: 4px 20px; font-size: .95rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.game-head { max-width: 1120px; margin: 0 auto; padding: 10px 20px 6px; }
.game-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin-bottom: .2em; }
.game-head .lead { margin-bottom: .6em; }
.stage-wrap { max-width: 1120px; margin: 0 auto; padding: 8px 20px 0; }
.stage { position: relative; border-radius: 26px; overflow: hidden; border: 5px solid var(--card); box-shadow: var(--shadow); background: var(--peach); height: min(78vh, 760px); min-height: 480px; }
.mint .stage { background: var(--mint); }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.stage:fullscreen { border: 0; border-radius: 0; height: 100vh; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: none; display: grid; place-items: center; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); transition: scale .5s; }
.poster:hover img { scale: 1.03; }
.poster-play { position: relative; background: var(--sun); color: #33284a; font: 600 clamp(1.5rem, 4vw, 2.2rem) var(--font-fun); padding: 16px 40px; border-radius: 999px; box-shadow: 0 7px 0 var(--sun-deep), 0 20px 40px rgba(0, 0, 0, .3); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
.stage-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 14px 0 0; }
.best-list { list-style: none; padding: 0; margin: 14px 0 10px; display: flex; flex-wrap: wrap; gap: 14px; }
.best-list li { background: var(--card); border: 3px solid var(--edge); border-radius: 18px; padding: 12px 22px; min-width: 170px; }
.best-val { display: block; font: 700 1.9rem var(--font-fun); }
.best-label { color: var(--ink-soft); font-size: .95rem; }
.best-list li.pop { animation: pop .7s; border-color: var(--sun-deep); }
@keyframes pop { 40% { scale: 1.12; rotate: -2deg; } }
.tiny { font-size: .92rem; color: var(--ink-mute); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.steps { padding-left: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 10px 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: #33284a; display: grid; place-items: center; font: 700 1.05rem var(--font-fun); }
.features { list-style: none; padding: 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 14px; background: var(--card); border: 3px solid var(--edge); border-radius: 18px; padding: 12px 16px; color: var(--ink-soft); }
.features span { font-size: 1.8rem; }
.features b { display: block; color: var(--ink); font-family: var(--font-fun); font-weight: 600; font-size: 1.1rem; }

/* text pages */
.prose { max-width: 760px; margin: 0 auto; padding: 30px 20px 50px; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.lost { text-align: center; padding-top: 60px; }
.lost-emoji { font-size: 6rem; animation: bob 4s ease-in-out infinite; }
.lost .lead { margin-inline: auto; }

/* footer */
.foot { margin-top: 50px; padding: 36px 20px 46px; text-align: center; background: color-mix(in srgb, var(--lilac) 35%, var(--bg)); color: var(--ink-soft); border-radius: 40px 40px 0 0; }
.foot-logo { display: inline-flex; gap: 8px; align-items: center; font: 700 1.3rem var(--font-fun); color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.foot a { color: var(--ink); font-weight: 800; }

/* sign-in sheet + toast */
.sheet { border: 0; border-radius: 28px; padding: 30px 28px 22px; max-width: min(430px, 92vw); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); text-align: center; }
.sheet::backdrop { background: rgba(40, 30, 70, .5); backdrop-filter: blur(3px); }
.sheet .x { position: absolute; right: 14px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink); font-size: 1rem; cursor: pointer; }
.sheet-emoji { font-size: 3.4rem; }
.grownup { background: color-mix(in srgb, var(--sun) 30%, transparent); border-radius: 14px; padding: 8px 12px; }
.google-btn { display: flex; justify-content: center; min-height: 48px; margin: 14px 0 6px; gap: 8px; flex-wrap: wrap; color-scheme: light; }
.msg { min-height: 1.4em; color: var(--ink-soft); margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 140%; background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px; font-weight: 800; box-shadow: var(--shadow); transition: translate .3s; z-index: 30; max-width: 92vw; text-align: center; }
.toast.on { translate: -50% 0; }

/* my scores */
.me-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 18px 0 30px; }
.me-card { background: var(--card); border: 3px solid var(--edge); border-radius: var(--r); padding: 18px 22px; }
.me-card dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 0 0 14px; }
.me-card dt { color: var(--ink-soft); } .me-card dd { margin: 0; font: 700 1.2rem var(--font-fun); text-align: right; }
.history { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 18px; overflow: hidden; border: 3px solid var(--edge); }
.history th, .history td { text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--edge); }
.history th { font-family: var(--font-fun); font-weight: 600; }
.history tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.me-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero-art { min-height: 0; aspect-ratio: 4 / 3; max-width: 460px; width: 100%; margin: 0 auto; }
  .two, .calm, .about { grid-template-columns: 1fr; }
  .calm { text-align: center; justify-items: center; margin-inline: 14px; padding: 26px 20px; }
  .about-art { width: 100px; height: 100px; font-size: 3.4rem; }
  .stage { height: 82vh; border-width: 3px; border-radius: 18px; }
  .stage-wrap { padding-inline: 8px; }
  .top { padding: 10px 14px; } .logo { font-size: 1.4rem; }
  .top nav { gap: 2px 12px; font-size: .98rem; }
  .stage-bar { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------ dashboard (plain and quiet; the data does the talking) */
.dash-page .sky { display: none; }
.dash { --surface: #fcfcfb; --grid: #e9e7e1; --t1: #0b0b0b; --t2: #52514e; --t3: #7d7b74; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --seq: #2a78d6; --seq-soft: #cde2fb; --up: #008300; --down: #d03b3b;
  max-width: 1240px; margin: 0 auto; padding: 16px 20px 40px; font: 500 .95rem/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--t1); }
@media (prefers-color-scheme: dark) { .dash { --surface: #1a1a19; --grid: #333330; --t1: #f0efec; --t2: #c3c2b7; --t3: #96958c; --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --seq: #3987e5; --seq-soft: #184f95; --up: #0ca30c; --down: #e66767; } }
.dash h1 { font: 650 1.6rem system-ui, sans-serif; margin: 0; }
.dash h2 { font: 650 1rem system-ui, sans-serif; margin: 0 0 2px; }
.dash .sub { color: var(--t2); margin: 2px 0 0; font-size: .88rem; }
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.range { display: inline-flex; border: 1px solid var(--grid); border-radius: 10px; overflow: hidden; background: var(--surface); }
.range button { border: 0; background: none; color: var(--t2); padding: 8px 14px; font: inherit; cursor: pointer; min-height: 38px; }
.range button[aria-pressed="true"] { background: var(--t1); color: var(--surface); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile, .panel { background: var(--surface); border: 1px solid var(--grid); border-radius: 14px; padding: 14px 16px; }
.tile .k { color: var(--t2); font-size: .84rem; }
.tile .v { font: 650 1.75rem system-ui, sans-serif; letter-spacing: -.01em; }
.tile .d { font-size: .8rem; color: var(--t3); }
.tile .d b { font-weight: 600; } .tile .d .up { color: var(--up); } .tile .d .down { color: var(--down); }
.panels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.panel { grid-column: span 4; min-width: 0; }
.panel.w6 { grid-column: span 6; } .panel.w8 { grid-column: span 8; } .panel.w12 { grid-column: span 12; }
@media (max-width: 980px) { .panel, .panel.w6, .panel.w8 { grid-column: span 12; } }
.panel svg { display: block; width: 100%; height: auto; overflow: visible; }
.panel svg text { fill: var(--t2); font: 500 11px system-ui, sans-serif; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--t2); margin: 6px 0 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.bars { display: grid; gap: 7px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.bar-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t1); }
.bar-row .track { height: 14px; }
.bar-row .fill { height: 100%; min-width: 2px; background: var(--seq); border-radius: 0 4px 4px 0; }
.bar-row .c { color: var(--t2); font-variant-numeric: tabular-nums; }
.empty { color: var(--t3); padding: 14px 0; font-size: .88rem; }
.dash table { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: 8px; }
.dash th { text-align: left; color: var(--t2); font-weight: 600; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.dash td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
.dash td.num, .dash th.num { text-align: right; }
.dash tr:last-child td { border-bottom: 0; }
.tip { position: fixed; pointer-events: none; background: var(--t1); color: var(--surface); padding: 7px 10px; border-radius: 8px; font: 500 12px/1.4 system-ui, sans-serif; z-index: 40; white-space: nowrap; }
.tip b { font-weight: 650; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 104px; gap: 10px; align-items: center; margin-top: 8px; font-size: .88rem; }
.funnel-row .track { height: 22px; }
.funnel-row .fill { height: 100%; background: var(--seq); border-radius: 0 4px 4px 0; min-width: 2px; }
.funnel-row .c { color: var(--t2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gate { max-width: 460px; margin: 60px auto; text-align: center; }
