/* Sparkle — "Stars Today. Habits Tomorrow."
   A scroll-told story: Tasks → Stars → Progress → Rewards → Habits.
   Motion is driven by /assets/js/sparkle-next.js; everything here degrades to
   a readable static page without JS or with prefers-reduced-motion. */

:root {
    --ink: #1c1736;
    --ink-2: #48425f;
    --ink-3: #68637d;
    --paper: #fbfaf6;
    --violet: #6b4ff0;
    --violet-2: #8d75ff;
    --gold: #f5a623;
    --gold-2: #ffcf4a;
    --amber-ink: #b85f00;
    --rose: #e2478f;
    --mint: #22c55e;
    --night-ink: #f5f2ff;

    --sky-top: rgb(255 247 236);
    --sky-bottom: rgb(244 238 255);
    --glow-a: rgb(255 214 168 / 0.6);
    --glow-b: rgb(203 184 255 / 0.6);

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.2, 1.45, 0.35, 1);
    --ease-soft-spring: cubic-bezier(0.25, 1.25, 0.4, 1);

    --nav-h: 76px;
    --pad: clamp(20px, 4.4vw, 72px);
    --max: 1440px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overflow-x: clip;
    background: var(--paper);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    overflow-x: clip;
    background: transparent;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

svg {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0;
}

:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
    border-radius: 12px;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 100;
    padding: 10px 16px;
    color: #fff;
    background: var(--ink);
    border-radius: 12px;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: none;
}

/* ---------------------------------------------------------------- Type ---- */

.serif {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.gold:not(.is-split),
.gold .w,
.gold .char,
.violet:not(.is-split),
.violet .w,
.violet .char,
.rose:not(.is-split),
.rose .w,
.rose .char {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    padding-inline: 0.07em;
    margin-inline: -0.07em;
}

.gold:not(.is-split),
.gold .w,
.gold .char {
    background-image: linear-gradient(180deg, #f8b632 0%, #e8890c 55%, #c86400 100%);
}

.violet:not(.is-split),
.violet .w,
.violet .char {
    background-image: linear-gradient(180deg, #9a83ff 0%, #6b4ff0 55%, #4a2fd0 100%);
}

.rose:not(.is-split),
.rose .w,
.rose .char {
    background-image: linear-gradient(180deg, #ff7ab3 0%, #e2478f 55%, #b8296f 100%);
}

.theme-night .gold:not(.is-split),
.theme-night .gold .w,
.theme-night .gold .char {
    background-image: linear-gradient(180deg, #fff1b8 0%, #ffcf4a 45%, #f5a623 100%);
}

.display {
    margin: 0;
    font-size: clamp(42px, 5.9vw, 104px);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.display .serif {
    font-size: 1.05em;
    line-height: 0.9;
}

.lede {
    max-width: 30em;
    margin: 22px 0 0;
    color: var(--ink-2);
    font-size: clamp(17px, 1.35vw, 21px);
    line-height: 1.5;
    text-wrap: pretty;
}

.chapter {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.chapter b {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--violet);
    font-size: 12px;
    letter-spacing: 0;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.theme-night {
    color: var(--night-ink);
}

.theme-night .lede {
    color: rgb(232 226 255 / 0.74);
}

.theme-night .chapter {
    color: rgb(232 226 255 / 0.72);
}

.theme-night .chapter b {
    color: var(--gold-2);
}

/* Words that light up as you scroll. */
.w {
    opacity: clamp(0.13, calc(var(--wp, 99) - var(--i, 0)), 1);
}

/* ------------------------------------------------- Sky & ambient layers ---- */

.sky {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
    pointer-events: none;
}

.sky__glow {
    position: absolute;
    width: 72vmax;
    height: 72vmax;
    border-radius: 50%;
    filter: blur(20px);
    will-change: transform;
}

.sky__glow--a {
    top: -30vmax;
    left: -22vmax;
    background: radial-gradient(circle, var(--glow-a) 0%, transparent 64%);
    animation: drift-a 26s ease-in-out infinite alternate;
}

.sky__glow--b {
    right: -26vmax;
    bottom: -34vmax;
    background: radial-gradient(circle, var(--glow-b) 0%, transparent 64%);
    animation: drift-b 32s ease-in-out infinite alternate;
}

@keyframes drift-a {
    to { transform: translate3d(14vmax, 10vmax, 0) scale(1.08); }
}

@keyframes drift-b {
    to { transform: translate3d(-12vmax, -8vmax, 0) scale(1.12); }
}

.sky__grain {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

.stardust {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

.flights {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    overflow: hidden;
}

.fstar {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(var(--s, 22) * 1px);
    height: calc(var(--s, 22) * 1px);
    filter: drop-shadow(0 0 6px rgb(255 190 60 / 0.85));
    will-change: transform;
}

.fstar svg {
    width: 100%;
    height: 100%;
}

/* ------------------------------------------------------------------ Nav ---- */

.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: var(--nav-h);
    padding: 0 var(--pad);
    pointer-events: none;
}

.nav > * {
    pointer-events: auto;
}

.nav::before {
    position: absolute;
    inset: 0 0 -28px;
    z-index: -1;
    content: "";
    background: linear-gradient(180deg, var(--sky-top) 25%, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.nav.is-scrolled::before {
    opacity: 0.92;
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    padding: 6px 14px 6px 6px;
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.02em;
    text-decoration: none;
    border-radius: 999px;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
    /* Five quick taps open the star shower; keep them from selecting text. */
    -webkit-user-select: none;
    user-select: none;
}

.nav__brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 6px 16px -6px rgb(91 63 217 / 0.6);
    transition: transform 0.5s var(--ease-spring);
}

.nav__brand:hover img {
    transform: rotate(-8deg) scale(1.08);
}

.nav.is-scrolled .nav__brand {
    background: rgb(255 255 255 / 0.7);
    box-shadow: 0 8px 30px -12px rgb(40 25 110 / 0.3), inset 0 0 0 1px rgb(255 255 255 / 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
}

.hud {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px 0 10px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    background: rgb(255 255 255 / 0.72);
    border-radius: 999px;
    box-shadow: 0 10px 30px -12px rgb(40 25 110 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, transform 0.5s var(--ease-spring);
}

.hud__star {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
}

.hud__star svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 2px 6px rgb(245 166 35 / 0.6));
}

.hud__count {
    min-width: 1.6ch;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hud__label {
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 600;
}

/* Phones hide the label; a hint under the counter explains it instead. */
.hud__hint {
    display: none;
}

.hud.is-bump .hud__star {
    animation: hud-bump 0.5s var(--ease-spring);
}

.hud.is-bump .hud__count {
    animation: hud-count 0.45s var(--ease-spring);
}

@keyframes hud-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.45) rotate(18deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes hud-count {
    0% { transform: translateY(0); }
    35% { transform: translateY(-4px); color: #e8890c; }
    100% { transform: translateY(0); }
}

.nav__right {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-self: end;
}

.nav__lang {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    background: rgb(255 255 255 / 0.72);
    border-radius: 50%;
    box-shadow: 0 10px 30px -12px rgb(40 25 110 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
    transition: background-color 0.4s ease, color 0.4s ease, transform 0.4s var(--ease-spring);
}

.nav__lang:hover {
    transform: scale(1.08);
}

.nav.is-night .nav__lang {
    color: #fff;
    background: rgb(30 22 80 / 0.55);
    box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.5), inset 0 0 0 1px rgb(255 255 255 / 0.14);
}

.nav__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 20px;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    background: var(--ink);
    border-radius: 999px;
    box-shadow: 0 12px 28px -12px rgb(28 23 54 / 0.7);
    transition: background-color 0.4s ease, color 0.4s ease;
}

.nav.is-night .nav__brand {
    color: #fff;
}

.nav.is-night.is-scrolled .nav__brand,
.nav.is-night .hud {
    color: #fff;
    background: rgb(30 22 80 / 0.55);
    box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.5), inset 0 0 0 1px rgb(255 255 255 / 0.14);
}

.nav.is-night .hud__label {
    color: rgb(232 226 255 / 0.6);
}

.nav.is-night .nav__cta {
    color: var(--ink);
    background: #fff;
}

/* -------------------------------------------------- Magnetic buttons ---- */

.magnetic {
    --tx: 0px;
    --ty: 0px;
    transform: translate3d(var(--tx), var(--ty), 0);
    transition: transform 0.6s var(--ease-spring), background-color 0.4s ease, color 0.4s ease, box-shadow 0.3s ease;
}

.magnetic.is-near {
    transition: transform 0.15s linear, background-color 0.4s ease, color 0.4s ease, box-shadow 0.3s ease;
}

.magnetic > span {
    display: inline-block;
    transform: translate3d(calc(var(--tx) * 0.4), calc(var(--ty) * 0.4), 0);
    transition: inherit;
}

.magnetic::after {
    position: absolute;
    inset: 0;
    content: "";
    border-radius: inherit;
    background: radial-gradient(120px circle at var(--sx, 50%) var(--sy, 50%), rgb(255 255 255 / 0.35), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.magnetic.is-near::after {
    opacity: 1;
}

.store-btn {
    position: relative;
    display: inline-flex;
    border-radius: 14px;
    box-shadow: 0 18px 40px -16px rgb(28 23 54 / 0.65);
}

.store-btn img {
    width: auto;
    height: 56px;
}

.store-btn:hover {
    box-shadow: 0 24px 50px -16px rgb(28 23 54 / 0.75);
}

.ghost-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 22px 0 24px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    background: rgb(255 255 255 / 0.6);
    border-radius: 16px;
    box-shadow: inset 0 0 0 1.5px rgb(28 23 54 / 0.12);
}

.ghost-btn svg {
    width: 18px;
    height: 18px;
    animation: nudge 1.8s var(--ease-out) infinite;
}

@keyframes nudge {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(4px); }
}

/* -------------------------------------------------------- Film button ---- */

.film-btn {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    height: 56px;
    padding: 0 6px 0 4px;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    background: none;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
}

.film-btn__play {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #fff;
    background: linear-gradient(140deg, #8d75ff, #e2478f);
    border-radius: 50%;
    box-shadow: 0 10px 24px -8px rgb(194 51 143 / 0.6);
    transition: transform 0.5s var(--ease-spring);
}

.film-btn__play::after {
    position: absolute;
    inset: -6px;
    content: "";
    border: 2px solid rgb(141 117 255 / 0.4);
    border-radius: 50%;
    animation: pulse-ring 2.4s var(--ease-out) infinite;
}

@keyframes pulse-ring {
    0% { opacity: 1; transform: scale(0.9); }
    100% { opacity: 0; transform: scale(1.35); }
}

.film-btn__play svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

.film-btn:hover .film-btn__play {
    transform: scale(1.1);
}

.film-btn__label small {
    margin-left: 7px;
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 650;
}

.film {
    width: fit-content;
    max-width: none;
    height: fit-content;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
}

.film::backdrop {
    background: rgb(12 9 36 / 0.74);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.film[open] {
    animation: film-in 0.6s var(--ease-spring);
}

@keyframes film-in {
    from { opacity: 0; transform: translateY(40px) scale(0.9); }
}

.film__frame {
    height: min(86vh, 900px);
    aspect-ratio: 886 / 1920;
    overflow: hidden;
    background: #000;
    border-radius: 34px;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14), 0 40px 120px -20px rgb(0 0 0 / 0.7), 0 0 120px rgb(123 97 255 / 0.35);
}

.film__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film__close {
    position: absolute;
    top: 0;
    right: -60px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: rgb(255 255 255 / 0.14);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.4s var(--ease-spring);
}

.film__close:hover {
    background: rgb(255 255 255 / 0.26);
    transform: rotate(90deg);
}

.film__close svg {
    width: 20px;
    height: 20px;
}

/* ----------------------------------------------------------------- Rail ---- */

.rail {
    position: fixed;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 50%;
    z-index: 40;
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 8px;
    color: var(--ink-3);
    background: rgb(255 255 255 / 0.7);
    border-radius: 999px;
    box-shadow: 0 14px 40px -16px rgb(40 25 110 / 0.4), inset 0 0 0 1px rgb(255 255 255 / 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
    opacity: 0;
    transform: translate3d(-50%, 30px, 0);
    transition: opacity 0.5s ease, transform 0.6s var(--ease-spring), background-color 0.5s ease, color 0.5s ease;
    pointer-events: none;
}

.rail.is-on {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
}

.rail.is-night {
    color: rgb(232 226 255 / 0.5);
    background: rgb(30 22 80 / 0.55);
    box-shadow: 0 14px 40px -16px rgb(0 0 0 / 0.5), inset 0 0 0 1px rgb(255 255 255 / 0.14);
}

.rail__steps {
    position: relative;
    z-index: 1;
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rail__steps li {
    position: relative;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: color 0.4s ease;
}

.rail__steps li + li::before {
    position: absolute;
    left: -4px;
    content: "→";
    opacity: 0.4;
}

.rail__steps li.is-past {
    color: var(--ink-2);
}

.rail__steps li.is-now {
    color: var(--ink);
}

.rail.is-night .rail__steps li.is-past {
    color: rgb(232 226 255 / 0.75);
}

.rail.is-night .rail__steps li.is-now {
    color: #fff;
}

.rail__bead {
    position: absolute;
    top: -9px;
    left: 0;
    width: 18px;
    height: 18px;
    transform: translateX(var(--bead-x, 0));
    transition: transform 0.7s var(--ease-spring);
}

.rail__bead svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 6px rgb(255 190 60 / 0.9));
}

/* -------------------------------------------------------- iPhone frame ---- */

.iphone {
    --w: 300px;
    position: relative;
    width: var(--w);
    aspect-ratio: 30 / 63.1;
    padding: 0.82em;
    font-size: calc(var(--w) / 30);
    background: linear-gradient(150deg, #3a3943 0%, #121218 32%, #24232b 70%, #0b0b10 100%);
    border-radius: 4.75em;
    box-shadow:
        inset 0 0 0 0.12em #5a5964,
        inset 0 0 0 0.32em #0d0d12,
        0 3.2em 6em -1.6em rgb(40 25 110 / 0.5),
        0 1.2em 2.6em -1em rgb(40 25 110 / 0.35);
}

.iphone::before,
.iphone::after {
    position: absolute;
    content: "";
    width: 0.32em;
    background: linear-gradient(90deg, #2a2a31, #4a4a54);
    border-radius: 0.2em;
}

.iphone::before {
    top: 11em;
    left: -0.22em;
    height: 4.2em;
    box-shadow: 0 5.6em 0 #34343c;
}

.iphone::after {
    top: 13.5em;
    right: -0.22em;
    height: 6.6em;
}

.iphone__screen {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 3.95em;
    isolation: isolate;
}

.iphone__screen > video,
.iphone__screen > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* ------------------------------------------------- App UI (em-based kit) --- */

.app {
    position: absolute;
    inset: 0;
    color: #14122a;
    font-family: var(--font);
    font-size: 1em;
    line-height: 1.25;
    text-align: left;
}

.app--sky {
    background: linear-gradient(180deg, #8fc6ee 0%, #9bd6ec 24%, #a8e2e7 52%, #cfeef0 78%, #eef5f8 100%);
}

.app--control {
    color: #111;
    background: #f2f2f7;
}

.app-status {
    position: absolute;
    top: 1.15em;
    right: 2.3em;
    left: 3.3em;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.05em;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.app-status svg {
    width: 3.1em;
    height: 1.2em;
}

.app-island {
    position: absolute;
    top: 0.85em;
    left: 50%;
    z-index: 4;
    width: 7.9em;
    height: 2.3em;
    background: #000;
    border-radius: 2em;
    transform: translateX(-50%);
}

.app-topbar {
    position: absolute;
    top: 4.1em;
    right: 1.25em;
    left: 1.25em;
    display: flex;
    justify-content: space-between;
}

.app-circle {
    display: grid;
    place-items: center;
    width: 2.8em;
    height: 2.8em;
    color: #1a1a2e;
    background: rgb(255 255 255 / 0.62);
    border-radius: 50%;
    box-shadow: 0 0.3em 0.8em rgb(30 60 120 / 0.12);
}

.app-circle svg {
    width: 1.3em;
    height: 1.3em;
}

.app-circle--gold {
    color: #f0a12a;
}

.app-profile {
    position: absolute;
    top: 7.95em;
    right: 1em;
    left: 0.95em;
    display: flex;
    gap: 0.95em;
    align-items: center;
}

.app-avatar {
    position: relative;
    flex: none;
    width: 5.5em;
    height: 5.5em;
    padding: 0.32em;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0.26em #22c55e, 0 0.4em 1em rgb(20 60 40 / 0.18);
}

.app-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.app-profile__meta {
    flex: 1;
    min-width: 0;
}

.app-name {
    display: block;
    margin-bottom: 0.3em;
    font-size: 1.08em;
    font-weight: 700;
}

.app-pills {
    display: flex;
    gap: 0.5em;
    margin-bottom: 0.55em;
}

.app-pill {
    display: inline-flex;
    gap: 0.3em;
    align-items: center;
    height: 1.6em;
    padding: 0 0.6em 0 0.45em;
    font-size: 0.92em;
    background: rgb(255 255 255 / 0.42);
    border-radius: 1em;
}

.app-pill svg {
    width: 1em;
    height: 1em;
}

.app-pill b {
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.app-pill small {
    font-size: 0.72em;
    opacity: 0.6;
}

.app-pill--week {
    color: #1765c8;
    background: rgb(168 205 255 / 0.5);
}

.app-pill--week b {
    color: #14122a;
}

.app-pill.is-bump {
    animation: pill-bump 0.55s var(--ease-spring);
}

@keyframes pill-bump {
    40% { transform: scale(1.18); background: rgb(255 230 160 / 0.9); }
}

.app-level {
    height: 0.27em;
    overflow: hidden;
    background: rgb(255 255 255 / 0.35);
    border-radius: 1em;
}

.app-level i {
    display: block;
    width: calc(var(--v, 0.22) * 100%);
    height: 100%;
    background: linear-gradient(90deg, #7b61ff, #6d5bff);
    border-radius: inherit;
    transition: width 0.6s var(--ease-out);
}

.app-level__label {
    display: block;
    margin-top: 0.35em;
    color: rgb(30 40 80 / 0.42);
    font-size: 0.66em;
    font-weight: 650;
}

.app-tabs {
    position: absolute;
    top: 14.5em;
    right: 0;
    left: 0;
    display: flex;
    gap: 0.4em;
    align-items: center;
    justify-content: space-around;
    height: 3.15em;
    padding: 0 0.9em;
    background: rgb(255 255 255 / 0.18);
}

.app-tabs span {
    display: inline-flex;
    gap: 0.35em;
    align-items: center;
    height: 2em;
    padding: 0 0.75em;
    color: rgb(20 30 60 / 0.55);
    font-size: 0.76em;
    font-weight: 600;
    border-radius: 1.2em;
}

.app-tabs svg {
    width: 1.15em;
    height: 1.15em;
    stroke-width: 2px;
}

.app-tabs .is-active {
    color: #14122a;
    background: rgb(255 255 255 / 0.55);
    box-shadow: inset 0 0 0 1px rgb(110 140 255 / 0.35);
}

.app-tabs .is-active svg {
    color: #fff;
    background: #4e8cf7;
    border-radius: 50%;
    padding: 0.18em;
}

.app-list {
    position: absolute;
    top: 18.15em;
    right: 1.05em;
    left: 1.05em;
    display: grid;
    gap: 0.52em;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-task {
    position: relative;
    display: flex;
    gap: 0.85em;
    align-items: center;
    width: 100%;
    min-height: 5.55em;
    padding: 0.9em 0.95em;
    overflow: hidden;
    font-size: 1em;
    text-align: left;
    background: rgb(255 255 255 / 0.55);
    border: 1px solid rgb(255 255 255 / 0.75);
    border-radius: 1.15em;
    box-shadow: 0 0.2em 0.8em rgb(30 60 120 / 0.06);
    transition: background-color 0.4s ease, transform 0.35s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}

button.app-task {
    cursor: pointer;
}

button.app-task:hover {
    background: rgb(255 255 255 / 0.75);
    transform: translateY(-0.12em);
}

button.app-task:active {
    transform: scale(0.97);
}

.app-task::after {
    position: absolute;
    top: 50%;
    left: var(--rx, 80%);
    width: 2em;
    height: 2em;
    margin: -1em 0 0 -1em;
    content: "";
    background: radial-gradient(circle, rgb(255 210 90 / 0.7), rgb(255 210 90 / 0) 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.app-task.is-tapped::after {
    animation: ripple 0.8s var(--ease-out);
}

@keyframes ripple {
    0% { opacity: 1; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(9); }
}

.app-task__txt {
    flex: 1;
    min-width: 0;
}

.app-task__txt b {
    display: block;
    font-size: 0.97em;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.app-task__txt small,
.app-task__txt em {
    display: block;
    overflow: hidden;
    margin-top: 0.15em;
    color: rgb(20 30 60 / 0.48);
    font-size: 0.78em;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-task__txt em {
    display: flex;
    gap: 0.3em;
    align-items: center;
    color: rgb(20 30 60 / 0.6);
}

.app-task__txt em svg {
    width: 0.95em;
    height: 0.95em;
    color: #3b82f6;
}

.ico {
    display: grid;
    flex: none;
    place-items: center;
    width: 3.3em;
    height: 3.3em;
    background: radial-gradient(circle at 30% 25%, #f3f7ff, #dde6ff 70%);
    border: 1px solid rgb(120 150 255 / 0.22);
    border-radius: 50%;
}

.ico svg {
    width: 1.6em;
    height: 1.6em;
}

.ico--blue svg {
    fill: url(#g-ico-blue);
    stroke: url(#g-ico-blue);
}

.ico--pink {
    background: radial-gradient(circle at 30% 25%, #fbf1ff, #f1dcff 70%);
    border-color: rgb(200 110 255 / 0.25);
}

.ico--pink svg {
    fill: url(#g-ico-pink);
    stroke: url(#g-ico-pink);
}

.ico--gold {
    background: radial-gradient(circle at 30% 25%, #fffaf0, #ffe9b8 70%);
    border-color: rgb(245 166 35 / 0.3);
}

.ico--gold svg {
    fill: url(#g-ico-gold);
    stroke: url(#g-ico-gold);
}

.ico--lg {
    width: 52px;
    height: 52px;
}

.ico--lg svg {
    width: 26px;
    height: 26px;
}

.ico--xl {
    width: 72px;
    height: 72px;
}

.ico--xl svg {
    width: 36px;
    height: 36px;
}

.star-pill {
    display: inline-flex;
    flex: none;
    gap: 0.25em;
    align-items: center;
    height: 1.75em;
    padding: 0 0.6em 0 0.45em;
    color: #e48a00;
    font-size: 0.82em;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: rgb(247 214 128 / 0.42);
    border-radius: 1em;
    transition: transform 0.45s var(--ease-spring), opacity 0.3s ease;
}

.star-pill svg {
    width: 1.05em;
    height: 1.05em;
}

.star-pill--lg {
    height: 40px;
    padding: 0 14px 0 10px;
    font-size: 19px;
    border-radius: 999px;
}

.star-pill--lg svg {
    width: 22px;
    height: 22px;
}

.app-task__done,
.app-task__wait {
    position: absolute;
    top: 50%;
    right: 1em;
    display: grid;
    place-items: center;
    width: 2.2em;
    height: 2.2em;
    margin-top: -1.1em;
    color: #fff;
    background: linear-gradient(160deg, #34d877, #16a34a);
    border-radius: 50%;
    box-shadow: 0 0.3em 0.8em rgb(22 163 74 / 0.4);
    opacity: 0;
    transform: scale(0.2) rotate(-40deg);
    transition: transform 0.55s var(--ease-spring), opacity 0.25s ease;
}

.app-task__done svg,
.app-task__wait svg {
    width: 1.3em;
    height: 1.3em;
}

.app-task__wait {
    color: #f59e0b;
    background: #fff;
    box-shadow: 0 0.3em 0.8em rgb(245 158 11 / 0.3);
}

.app-task.is-done {
    background: rgb(232 255 240 / 0.78);
}

.app-task.is-done .star-pill,
.app-task.is-pending .star-pill {
    opacity: 0;
    transform: scale(0.4);
}

.app-task.is-done .app-task__done,
.app-task.is-pending .app-task__wait {
    opacity: 1;
    transform: none;
}

.app-task.is-pending {
    background: rgb(255 248 228 / 0.85);
}

.app-task .when-pending,
.app-task .when-approved {
    display: none;
}

.app-task.is-pending .when-idle,
.app-task.is-done .when-idle {
    display: none;
}

.app-task.is-pending .when-pending {
    display: block;
    color: #c27500;
    font-weight: 600;
}

.app-task.is-done .when-approved {
    display: block;
    color: #15803d;
    font-weight: 600;
}

.app-tabbar {
    position: absolute;
    right: 1.3em;
    bottom: 1.35em;
    left: 1.3em;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    height: 3.9em;
    padding: 0 0.3em;
    background: rgb(255 255 255 / 0.85);
    border-radius: 2em;
    box-shadow: 0 0.5em 1.6em rgb(30 60 120 / 0.14), inset 0 0 0 1px rgb(255 255 255 / 0.9);
}

.app-tabbar span {
    display: grid;
    gap: 0.15em;
    justify-items: center;
    padding: 0.4em 0;
    color: #1a1a1a;
    font-size: 0.66em;
    font-weight: 600;
    border-radius: 2em;
}

.app-tabbar svg {
    width: 2.3em;
    height: 2.3em;
}

.app-tabbar .is-active {
    color: #1e88f5;
    background: rgb(120 140 170 / 0.16);
}

.app-toast {
    position: absolute;
    top: 3.7em;
    right: 0.9em;
    left: 0.9em;
    z-index: 5;
    display: flex;
    gap: 0.7em;
    align-items: center;
    padding: 0.75em 0.9em;
    background: rgb(255 255 255 / 0.94);
    border-radius: 1.5em;
    box-shadow: 0 0.8em 2.4em rgb(30 30 80 / 0.25);
    opacity: 0;
    transform: translateY(-140%) scale(0.92);
    transition: transform 0.6s var(--ease-spring), opacity 0.3s ease;
}

.app-toast.is-on {
    opacity: 1;
    transform: none;
}

.app-toast__ico {
    display: grid;
    flex: none;
    place-items: center;
    width: 2.4em;
    height: 2.4em;
    background: #fff4d6;
    border-radius: 0.7em;
}

.app-toast__ico svg {
    width: 1.5em;
    height: 1.5em;
}

.app-toast b {
    display: block;
    font-size: 0.88em;
}

.app-toast small {
    display: block;
    color: rgb(20 20 40 / 0.6);
    font-size: 0.74em;
}

/* Control area (parent view) */

.app-status--dark {
    color: #111;
}

.ctl-title {
    position: absolute;
    top: 4.35em;
    right: 0;
    left: 0;
    font-size: 1.12em;
    font-weight: 650;
    text-align: center;
}

.ctl-tabs {
    position: absolute;
    top: 7.2em;
    right: 0.9em;
    left: 0.9em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.9em;
    border-bottom: 1px solid rgb(0 0 0 / 0.06);
}

.ctl-tabs span {
    display: inline-flex;
    gap: 0.3em;
    align-items: center;
    color: #6b6b75;
    font-size: 0.76em;
    font-weight: 500;
}

.ctl-tabs svg {
    width: 1.3em;
    height: 1.3em;
    stroke-width: 2px;
}

.ctl-tabs .is-active {
    display: grid;
    place-items: center;
    width: 3.2em;
    height: 2.3em;
    color: #3462c7;
    background: rgb(52 98 199 / 0.14);
    border-radius: 1.4em;
    box-shadow: inset 0 0 0 1px rgb(52 98 199 / 0.25);
}

.ctl-card {
    position: relative;
    margin: 0 1em 0.75em;
    padding: 0.85em 0.95em;
    background: #fff;
    border-radius: 1.2em;
    box-shadow: 0 0.1em 0.4em rgb(0 0 0 / 0.04);
}

.ctl-pin {
    display: flex;
    gap: 0.75em;
    align-items: center;
    margin-top: 11.2em;
}

.ctl-pin__ico {
    display: grid;
    flex: none;
    place-items: center;
    width: 2.6em;
    height: 2.6em;
    color: #22a35a;
    background: #e6f8ee;
    border-radius: 0.75em;
}

.ctl-pin__ico svg {
    width: 1.5em;
    height: 1.5em;
}

.ctl-pin b {
    display: block;
    font-size: 0.82em;
}

.ctl-pin small {
    display: block;
    color: #8a8a92;
    font-size: 0.66em;
    line-height: 1.3;
}

.ctl-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5em;
    margin: 0 1em 0.75em;
}

.ctl-stat {
    display: grid;
    justify-items: center;
    padding: 0.7em 0.2em;
    background: #fff;
    border: 1px solid #f0e6da;
    border-radius: 1em;
}

.ctl-stat--blue {
    border-color: #dde5f5;
}

.ctl-stat--pink {
    border-color: #efe0f3;
}

.ctl-stat b {
    display: inline-flex;
    gap: 0.25em;
    align-items: center;
    font-size: 1.2em;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.ctl-stat svg {
    width: 0.8em;
    height: 0.8em;
}

.ctl-stat--blue svg {
    color: #3b82f6;
}

.ctl-stat--pink svg {
    color: #c75cf0;
    stroke-width: 2.4px;
}

.ctl-stat small {
    color: #8a8a92;
    font-size: 0.66em;
}

.ctl-card__head {
    display: flex;
    gap: 0.5em;
    align-items: center;
    margin-bottom: 0.4em;
}

.ctl-card__head b {
    font-size: 0.88em;
}

.ctl-badge {
    display: grid;
    place-items: center;
    min-width: 1.5em;
    height: 1.5em;
    color: #555;
    font-size: 0.7em;
    font-weight: 700;
    background: #ececf0;
    border-radius: 1em;
    transition: transform 0.45s var(--ease-spring), background-color 0.3s ease, color 0.3s ease;
}

.ctl-badge.is-hot {
    color: #fff;
    background: #ff3b30;
    transform: scale(1.15);
}

.ctl-badge--gold {
    color: #e48a00;
    background: #fff1d1;
}

.ctl-pending {
    min-height: 5.6em;
}

.ctl-empty {
    display: flex;
    gap: 0.35em;
    align-items: center;
    padding: 0.7em 0 0.3em;
    color: #22a35a;
    font-size: 0.74em;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.ctl-empty svg {
    width: 1.2em;
    height: 1.2em;
}

.ctl-item {
    display: flex;
    gap: 0.55em;
    align-items: center;
    padding-top: 0.35em;
}

.ctl-pending .ctl-item {
    position: absolute;
    right: 0.95em;
    bottom: 0.8em;
    left: 0.95em;
    opacity: 0;
    transform: translateX(-30%);
    transition: transform 0.6s var(--ease-spring), opacity 0.3s ease;
}

.ctl-pending.has-item .ctl-item {
    opacity: 1;
    transform: none;
}

.ctl-pending.has-item:not(.is-approved) .ctl-empty {
    opacity: 0;
}

.ctl-pending.is-approved .ctl-item {
    opacity: 0;
    transform: translateX(40%) scale(0.9);
}

.ctl-item img {
    width: 2.3em;
    height: 2.3em;
    border-radius: 50%;
}

.ctl-item .ico {
    width: 2.3em;
    height: 2.3em;
}

.ctl-item .ico svg {
    width: 1.2em;
    height: 1.2em;
}

.ctl-item__txt {
    flex: 1;
    min-width: 0;
}

.ctl-item__txt b {
    display: block;
    overflow: hidden;
    font-size: 0.8em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ctl-item__txt small {
    display: block;
    color: #8a8a92;
    font-size: 0.66em;
}

.ctl-item .star-pill {
    color: #111;
    font-size: 0.66em;
    background: #fff4dc;
}

.ctl-btn {
    display: grid;
    flex: none;
    place-items: center;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.3s ease;
}

.ctl-btn svg {
    width: 1em;
    height: 1em;
}

.ctl-btn--no {
    color: #ef4444;
    background: #fde8e8;
}

.ctl-btn--yes {
    color: #fff;
    background: #3b82f6;
}

.ctl-btn--yes.is-pressed {
    background: #22c55e;
    box-shadow: 0 0 0 0.5em rgb(34 197 94 / 0.2);
    transform: scale(0.86);
}

.ctl-provided {
    display: inline-flex;
    flex: none;
    gap: 0.2em;
    align-items: center;
    height: 2em;
    padding: 0 0.7em;
    color: #fff;
    font-size: 0.68em;
    font-weight: 700;
    background: #22c55e;
    border-radius: 1em;
}

.ctl-provided svg {
    width: 1.1em;
    height: 1.1em;
}

.app-tabbar--light {
    background: rgb(255 255 255 / 0.95);
}

/* ---------------------------------------------------------------- Hero ---- */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--nav-h) + 8px) var(--pad) 64px;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: clamp(20px, 3vw, 56px);
    align-items: center;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
}

.eyebrow-pill {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 8px 16px 8px 12px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 650;
    background: rgb(255 255 255 / 0.6);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.9), 0 8px 24px -14px rgb(40 25 110 / 0.35);
}

.eyebrow-pill__dot {
    width: 9px;
    height: 9px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgb(245 166 35 / 0.6);
    animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgb(245 166 35 / 0.55); }
    70%, 100% { box-shadow: 0 0 0 12px rgb(245 166 35 / 0); }
}

.hero__title {
    margin: 22px 0 26px;
    font-size: clamp(60px, min(9vw, 15.2vh), 164px);
    font-weight: 820;
    line-height: 0.84;
    letter-spacing: -0.058em;
}

.hl {
    display: block;
    white-space: nowrap;
}

.hl.serif {
    padding-left: 0.62em;
    font-size: 1.04em;
    line-height: 0.92;
    letter-spacing: -0.035em;
}

.hl--3 {
    margin-top: 0.06em;
}

.char {
    display: inline-block;
    white-space: pre;
}

.js .hero__title .char {
    opacity: 0;
    transform: translate3d(0, 0.55em, 0) rotate(10deg) scale(0.9);
    transform-origin: 0 100%;
    animation: char-in 1s var(--ease-spring) forwards;
    animation-delay: calc(var(--line-delay, 0s) + var(--i, 0) * 34ms);
}

.hl--1 { --line-delay: 0.1s; }
.hl--2 { --line-delay: 0.28s; }
.hl--3 { --line-delay: 0.5s; }
.hl--4 { --line-delay: 0.68s; }

@keyframes char-in {
    to {
        opacity: 1;
        transform: none;
    }
}

.hero__lede {
    max-width: 29em;
    margin: 0 0 30px;
    color: var(--ink-2);
    font-size: clamp(17px, 1.4vw, 21px);
    line-height: 1.5;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 26px 0 0;
    padding: 0;
    color: var(--ink-3);
    font-size: 14px;
    font-weight: 600;
    list-style: none;
}

.hero__facts li {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.hero__facts li::before {
    width: 6px;
    height: 6px;
    content: "";
    background: var(--violet-2);
    border-radius: 50%;
}

.js .hero__lede,
.js .hero__actions,
.js .hero__facts,
.js .eyebrow-pill {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.9s var(--ease-out) forwards;
}

.js .eyebrow-pill { animation-delay: 0.05s; }
.js .hero__lede { animation-delay: 0.95s; }
.js .hero__actions { animation-delay: 1.08s; }
.js .hero__facts { animation-delay: 1.2s; }

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

.hero__visual {
    position: relative;
    display: grid;
    place-items: center;
    height: min(calc(100svh - var(--nav-h) - 60px), 760px);
    min-height: 560px;
    perspective: 1600px;
}

.hero__halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    aspect-ratio: 1;
    background:
        radial-gradient(circle, rgb(255 255 255 / 0.95) 0%, rgb(255 236 200 / 0.6) 22%, rgb(203 184 255 / 0.28) 42%, transparent 64%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero__halo.is-flash {
    animation: halo-flash 1.4s var(--ease-out);
}

@keyframes halo-flash {
    20% { transform: translate(-50%, -50%) scale(1.12); filter: brightness(1.15) saturate(1.4); }
}

.depth {
    position: relative;
    z-index: 2;
    will-change: transform;
}

.iphone--hero {
    --w: clamp(250px, 21vw, 322px);
    transform: rotateY(-14deg) rotateX(5deg) rotateZ(1.5deg);
    transform-style: preserve-3d;
}

.js .iphone--hero {
    animation: phone-in 1.5s var(--ease-soft-spring) 0.35s both;
}

@keyframes phone-in {
    from {
        opacity: 0;
        transform: translate3d(0, 26%, 0) rotateY(-38deg) rotateX(24deg) rotateZ(-6deg) scale(0.86);
    }
}

.float {
    position: absolute;
    z-index: 3;
}

.fcard {
    background: rgb(255 255 255 / 0.8);
    border-radius: 22px;
    box-shadow: 0 24px 60px -18px rgb(50 30 140 / 0.35), 0 2px 6px rgb(50 30 140 / 0.06), inset 0 0 0 1px rgb(255 255 255 / 0.95);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
    animation: bob 6s ease-in-out infinite;
}

.js .float .fcard {
    opacity: 0;
    animation: pop-in 0.9s var(--ease-spring) forwards, bob 6s ease-in-out 1s infinite;
}

.js .float--kid .fcard { animation-delay: 1.05s, 2s; }
.js .float--streak .fcard { animation-delay: 1.2s, 2.2s; }
.js .float--level .fcard { animation-delay: 1.35s, 2.5s; }
.js .float--reward .fcard { animation-delay: 0.95s, 1.8s; }

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.6) rotate(-6deg);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes bob {
    0%, 100% { opacity: 1; transform: translateY(0) rotate(0); }
    50% { opacity: 1; transform: translateY(-10px) rotate(0.6deg); }
}

.float--reward {
    right: -6%;
    bottom: 7%;
}

.float--streak {
    top: 9%;
    right: 3%;
}

.float--level {
    top: 37%;
    right: -6%;
}

.float--kid {
    top: 13%;
    left: 6%;
}

.float--girl {
    bottom: 2%;
    left: -15%;
    z-index: 4;
}

/* ------------------------------------------------------------ The girl ---- */
/* Pose-to-pose like the App Store clip: each swap pops up from her feet with
   squash & stretch and a short vertical smear; idle she breathes and bobs. */

.girl {
    --h: min(50vh, 400px);
    position: relative;
    width: calc(var(--h) * 0.97);
    height: var(--h);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* She is tapped repeatedly: no blue selection, no image drag or
       long-press menu. */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.girl img {
    -webkit-user-drag: none;
}

.girl__shadow {
    position: absolute;
    bottom: -1.5%;
    left: 50%;
    width: 46%;
    height: 7%;
    background: radial-gradient(closest-side, rgb(60 40 140 / 0.28), transparent);
    border-radius: 50%;
    transform: translateX(-50%);
}

.girl__hop,
.girl__body {
    position: absolute;
    inset: 0;
    transform-origin: 50% 100%;
}

.girl__body {
    animation: girl-idle 3.4s ease-in-out infinite;
}

.girl__pose {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-width: none;
    height: 100%;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    filter: drop-shadow(0 18px 22px rgb(50 30 120 / 0.22));
    transform-origin: 50% 100%;
    pointer-events: none;
}

.girl__pose.is-on {
    opacity: 1;
    visibility: visible;
    animation: girl-pop 0.8s var(--ease-out) both;
}

.girl__pose.is-off {
    visibility: visible;
    animation: girl-out 0.16s ease-in forwards;
}

/* The hero girl waits for the headline: JS adds .is-ready after 1.25 s and her
   pop starts then. An animation-delay here would need a later class change,
   and Chrome times that repaint as the page's LCP. */
.js .hero .girl:not(.is-ready) .girl__pose.is-on {
    opacity: 0;
    animation: none;
}

.girl.is-hop .girl__hop {
    animation: girl-hop 0.72s var(--ease-out);
}

.girl.is-hop .girl__shadow {
    animation: girl-shadow 0.72s var(--ease-out);
}

@keyframes girl-idle {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    50% { transform: translateY(-1.4%) scale(0.996, 1.012); }
}

@keyframes girl-pop {
    0% { opacity: 0; transform: translateY(24%) scale(0.76, 1.36); filter: blur(5px) drop-shadow(0 18px 22px rgb(50 30 120 / 0)); }
    26% { opacity: 1; transform: translateY(-6%) scale(1.07, 0.9); filter: blur(0) drop-shadow(0 18px 22px rgb(50 30 120 / 0.22)); }
    52% { transform: translateY(0) scale(0.96, 1.05); }
    76% { transform: scale(1.015, 0.985); }
    100% { opacity: 1; transform: none; filter: drop-shadow(0 18px 22px rgb(50 30 120 / 0.22)); }
}

@keyframes girl-out {
    to { opacity: 0; transform: translateY(-8%) scale(0.86, 1.22); filter: blur(4px); }
}

@keyframes girl-hop {
    0% { transform: none; }
    14% { transform: scale(1.1, 0.88); }
    40% { transform: translateY(-15%) scale(0.94, 1.08); }
    60% { transform: translateY(-18%) scale(1, 1); }
    84% { transform: translateY(0) scale(1.08, 0.92); }
    100% { transform: none; }
}

@keyframes girl-shadow {
    40%, 60% { opacity: 0.4; transform: translateX(-50%) scale(0.7); }
}

.reward-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    width: 352px;
    padding: 14px 16px 14px 14px;
    transition: box-shadow 0.5s ease;
}

.reward-card__txt small {
    display: block;
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.reward-card__txt b {
    display: block;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.reward-card__state em {
    display: inline-block;
    margin-top: 3px;
    color: var(--ink-3);
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}

.reward-card.is-unlocked {
    box-shadow: 0 0 0 2px rgb(245 166 35 / 0.7), 0 24px 70px -14px rgb(245 166 35 / 0.6), inset 0 0 0 1px rgb(255 255 255 / 0.95);
}

.reward-card.is-unlocked .reward-card__state em {
    color: #15803d;
}

.ring {
    position: relative;
    width: 60px;
    height: 60px;
}

.ring > svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring circle {
    fill: none;
    stroke-width: 5;
}

.ring__track {
    stroke: rgb(120 90 220 / 0.14);
}

.ring__fill {
    stroke: url(#g-ico-gold);
    stroke-linecap: round;
    stroke-dasharray: 125.66;
    stroke-dashoffset: 125.66;
    transition: stroke-dashoffset 0.5s var(--ease-out), stroke 0.4s ease;
}

.ring__label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.3s ease, transform 0.4s var(--ease-spring);
}

.ring__label b {
    color: var(--ink);
    font-size: 15px;
}

.ring__done {
    position: absolute;
    inset: 9px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(160deg, #ffcf4a, #f08a12);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.3) rotate(-30deg);
    transition: transform 0.6s var(--ease-spring), opacity 0.3s ease;
}

.ring__done svg {
    width: 22px;
    height: 22px;
}

.is-unlocked .ring__done {
    opacity: 1;
    transform: none;
}

.is-unlocked .ring__label {
    opacity: 0;
    transform: scale(0.5);
}

.ring.is-bump {
    animation: ring-bump 0.45s var(--ease-spring);
}

@keyframes ring-bump {
    40% { transform: scale(1.12); }
}

.streak-chip {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 18px 12px 12px;
}

.streak-chip__flame {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: radial-gradient(circle, #fff1dc, #ffe0bd);
    border-radius: 14px;
}

.streak-chip__flame svg {
    width: 28px;
    height: 28px;
    fill: url(#g-flame);
    filter: drop-shadow(0 2px 6px rgb(255 120 40 / 0.5));
    animation: flicker 1.6s ease-in-out infinite;
    transform-origin: 50% 90%;
}

@keyframes flicker {
    0%, 100% { transform: scale(1) rotate(0); }
    30% { transform: scale(1.06, 0.96) rotate(-3deg); }
    60% { transform: scale(0.97, 1.05) rotate(2deg); }
}

.streak-chip b {
    display: block;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.03em;
}

.streak-chip small,
.level-chip small,
.kid-chip small {
    display: block;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 650;
}

.level-chip {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 220px;
    padding: 12px 16px 12px 12px;
}

.level-chip img {
    width: 44px;
    height: 44px;
}

.level-chip span {
    flex: 1;
}

.level-chip b {
    display: block;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.level-chip__bar {
    display: block;
    height: 6px;
    margin-top: 6px;
    overflow: hidden;
    background: rgb(120 90 220 / 0.14);
    border-radius: 9px;
}

.level-chip__bar i {
    display: block;
    width: calc(var(--v, 0.42) * 100%);
    height: 100%;
    background: linear-gradient(90deg, #2bbdea, #6b4ff0);
    border-radius: inherit;
    transition: width 0.6s var(--ease-out);
}

.kid-chip {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 16px 8px 8px;
    border-radius: 999px;
}

.kid-chip img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #facc15;
}

.kid-chip b {
    display: block;
    font-size: 15px;
    line-height: 1.1;
}

.kid-chip small {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    color: var(--ink);
    font-weight: 750;
}

.kid-chip small svg {
    width: 14px;
    height: 14px;
}

.tap-hint {
    position: absolute;
    bottom: 1%;
    left: 62%;
    z-index: 4;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--ink);
    border-radius: 999px;
    box-shadow: 0 16px 34px -14px rgb(28 23 54 / 0.7);
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.9);
    transition: opacity 0.4s ease, transform 0.6s var(--ease-spring);
    pointer-events: none;
}

.tap-hint svg {
    width: 15px;
    height: 15px;
    color: var(--gold-2);
    animation: spin 4s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.tap-hint.is-on {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.scroll-cue {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    width: max-content;
    margin-inline: auto;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none;
}

.js .scroll-cue {
    opacity: 0;
    animation: rise 1s var(--ease-out) 2.2s forwards;
}

.scroll-cue__star {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    animation: hop 2.4s var(--ease-out) infinite;
}

.scroll-cue__star svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 6px rgb(245 166 35 / 0.6));
}

@keyframes hop {
    0%, 55%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-10px) rotate(72deg); }
}

/* --------------------------------------------------------- Scene base ---- */

.scene {
    position: relative;
    height: var(--len, 340vh);
}

.stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}

/* ---------------------------------------------------- 02 Tasks → Stars ---- */

.scene--tasks {
    --len: 400vh;
}

.tasks {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4vw;
    align-items: center;
    height: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 20px) var(--pad) 90px;
}

.dock {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin-top: 34px;
}

.dock__label {
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dock__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dock__chip {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    height: 34px;
    padding: 0 13px 0 9px;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
    background: rgb(220 252 231 / 0.9);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(34 197 94 / 0.25);
    opacity: 0.25;
    filter: grayscale(1);
    transform: scale(0.92);
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.6s var(--ease-spring);
}

.dock__chip svg {
    width: 16px;
    height: 16px;
}

.dock__chip.is-in {
    opacity: 1;
    filter: none;
    transform: scale(1);
}

.dock__count {
    color: var(--ink-3);
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dock__count b {
    color: var(--ink);
    font-size: 22px;
}

.tasks {
    position: relative;
}

.tasks__girl {
    position: absolute;
    bottom: 64px;
    left: calc(50% - 4vw);
    z-index: 3;
    pointer-events: none;
}

.tasks__girl .girl {
    --h: min(36vh, 300px);
    cursor: default;
}

.tasks__deck {
    position: relative;
    height: min(560px, 70svh);
    perspective: 1400px;
}

.tcard {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    width: min(100%, 520px);
    padding: 28px 26px 28px 24px;
    background: linear-gradient(160deg, #fff, #f4f7ff);
    border-radius: 34px;
    box-shadow: 0 34px 90px -30px rgb(60 40 160 / 0.42), 0 4px 14px rgb(60 40 160 / 0.06), inset 0 0 0 1px rgb(255 255 255 / 0.9);
    transform: translate(-50%, -50%);
    transform-origin: 50% 50%;
    transition: box-shadow 0.6s ease;
    will-change: transform, opacity;
}

.payoff {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(-12deg);
    transition: opacity 0.3s ease, transform 0.9s var(--ease-spring);
    pointer-events: none;
}

.tasks__deck.is-complete .payoff {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.payoff__rays {
    position: absolute;
    top: 110px;
    left: 50%;
    width: 520px;
    height: 520px;
    margin: -260px 0 0 -260px;
    background: repeating-conic-gradient(from 0deg, rgb(255 200 80 / 0.22) 0deg 7deg, transparent 7deg 20deg);
    border-radius: 50%;
    -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent);
    mask-image: radial-gradient(closest-side, #000 20%, transparent);
    animation: spin 26s linear infinite;
}

.payoff__badge {
    position: relative;
    display: grid;
    place-items: center;
    width: 230px;
    height: 230px;
}

.payoff__star {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 24px 40px rgb(232 137 12 / 0.5));
}

.payoff__num {
    position: relative;
    margin-top: 22px;
    color: #7a3e00;
    font-size: 30px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.payoff__num b {
    font-size: 64px;
}

.payoff__label {
    position: relative;
    display: grid;
    gap: 4px;
    color: var(--ink);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.payoff__label small {
    color: var(--ink-2);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
}

.tcard > * {
    transition: opacity 0.35s ease;
}

.tcard.is-behind > * {
    opacity: 0;
}

.tcard h3 {
    margin: 0 0 4px;
    font-size: 26px;
    letter-spacing: -0.025em;
}

.tcard p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15.5px;
    line-height: 1.4;
}

.tcard__meta {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
    color: #2f6fe0;
    font-size: 14px;
    font-weight: 700;
}

.tcard__meta svg {
    width: 16px;
    height: 16px;
}

.tcard__check {
    position: absolute;
    top: -16px;
    left: -16px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: transparent;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 8px 20px -6px rgb(60 40 160 / 0.35), inset 0 0 0 2px rgb(107 79 240 / 0.25);
    transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.6s var(--ease-spring);
}

.tcard__check svg {
    width: 26px;
    height: 26px;
}

.tcard__check svg use {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
}

.tcard.is-done .tcard__check {
    color: #fff;
    background: linear-gradient(160deg, #34d877, #16a34a);
    box-shadow: 0 10px 24px -6px rgb(22 163 74 / 0.6);
    transform: scale(1.12) rotate(-8deg);
}

.tcard.is-done .tcard__check svg use {
    animation: draw 0.5s var(--ease-out) 0.08s forwards;
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

.tcard.is-done {
    box-shadow: 0 0 0 3px rgb(245 166 35 / 0.55), 0 40px 100px -24px rgb(245 166 35 / 0.55), inset 0 0 0 1px rgb(255 255 255 / 0.9);
}

.tcard.is-done .star-pill {
    animation: pill-glow 0.8s var(--ease-spring);
}

@keyframes pill-glow {
    30% { transform: scale(1.25) rotate(-6deg); background: rgb(255 210 90 / 0.9); }
}

/* ------------------------------------------------ 03 Stars → Progress ---- */

.scene--road {
    --len: 340vh;
}

.road-head {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 24px) var(--pad) 0;
}

.road-head__copy {
    max-width: 640px;
}

.road-head .lede {
    max-width: 27em;
}

.meter {
    flex: none;
    width: 300px;
    padding: 20px 22px 18px;
    background: rgb(255 255 255 / 0.78);
    border-radius: 28px;
    box-shadow: 0 30px 70px -26px rgb(60 40 160 / 0.4), inset 0 0 0 1px rgb(255 255 255 / 0.95);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
    transition: box-shadow 0.6s ease;
}

.meter__who {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 700;
}

.meter__who img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #22c55e;
}

.odo {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0 10px;
    font-weight: 820;
    letter-spacing: -0.05em;
}

.odo__star {
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 4px 10px rgb(245 166 35 / 0.55));
}

.odo__star.is-bump {
    animation: hud-bump 0.5s var(--ease-spring);
}

.odo__num {
    display: inline-flex;
    height: 1em;
    overflow: hidden;
    font-size: 72px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.digit {
    display: inline-block;
    width: 0.6em;
    height: 1em;
    overflow: hidden;
}

.digit.is-hidden {
    width: 0;
}

.digit {
    transition: width 0.4s var(--ease-out);
}

.digit__strip {
    display: flex;
    flex-direction: column;
    transform: translateY(calc(var(--d, 0) * -1em));
    transition: transform 0.55s var(--ease-soft-spring);
}

.digit__strip span {
    display: block;
    height: 1em;
    text-align: center;
}

.odo__goal {
    align-self: flex-end;
    padding-bottom: 8px;
    color: var(--ink-3);
    font-size: 28px;
}

.meter__bar {
    height: 12px;
    overflow: hidden;
    background: rgb(120 90 220 / 0.12);
    border-radius: 9px;
}

.meter__bar i {
    display: block;
    width: calc(var(--v, 0) * 100%);
    height: 100%;
    background: linear-gradient(90deg, #ffcf4a, #f5a623 60%, #f08a12);
    border-radius: inherit;
    transition: width 0.45s var(--ease-out), background 0.5s ease;
}

.meter.is-win .meter__bar i {
    background: linear-gradient(90deg, #34d399, #22c55e);
}

.meter.is-win {
    box-shadow: 0 0 0 3px rgb(34 197 94 / 0.45), 0 30px 80px -24px rgb(34 197 94 / 0.45), inset 0 0 0 1px rgb(255 255 255 / 0.95);
}

.meter__msgs {
    position: relative;
    height: 24px;
    margin-top: 10px;
}

.meter__msgs span {
    position: absolute;
    inset: 0;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.5s var(--ease-spring);
}

.meter__msgs span.is-on {
    opacity: 1;
    transform: none;
}

.meter__msgs .meter__win {
    color: #15803d;
}

/* The road is projected in JS (2D transforms only) so it renders the same in
   every engine: no CSS 3D, no preserve-3d. */
.road {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent 22%, #000 46%);
    mask-image: linear-gradient(180deg, transparent 22%, #000 46%);
}

.road__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 0 40px rgb(255 200 120 / 0.45));
}

.road__lane {
    fill: url(#g-lane);
    stroke: none;
}

.road__edges {
    fill: none;
    stroke: rgb(107 79 240 / 0.22);
    stroke-width: 5;
    stroke-linejoin: round;
}

.road__dashes {
    fill: rgb(245 166 35 / 0.6);
    stroke: none;
}

.rtoken,
.rflag,
.road__goal {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 50% 100%;
    will-change: transform;
}

.rtoken {
    width: 64px;
    height: 64px;
    margin: -64px 0 0 -32px;
}

.rtoken__shadow {
    position: absolute;
    bottom: -10px;
    left: 4px;
    width: 56px;
    height: 20px;
    background: radial-gradient(closest-side, rgb(200 120 0 / 0.35), transparent);
    transition: opacity 0.3s ease;
}

.rtoken__star {
    position: absolute;
    inset: 0;
    transform: translateY(-14px);
    transition: transform 0.5s var(--ease-out), opacity 0.35s ease;
}

.rtoken__star svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 10px rgb(220 140 20 / 0.45));
}

.rtoken.is-got .rtoken__star {
    opacity: 0;
    transform: translateY(-150px) scale(1.5);
}

.rtoken.is-got .rtoken__shadow {
    opacity: 0;
}

.rflag {
    width: 220px;
    margin: 0 0 0 -110px;
}

.rflag__card {
    position: absolute;
    bottom: 0;
    left: 0;
    display: grid;
    justify-items: center;
    width: 220px;
    padding: 16px 12px;
    color: var(--ink);
    text-align: center;
    background: rgb(255 255 255 / 0.92);
    border-radius: 24px;
    box-shadow: 0 24px 50px -20px rgb(60 40 160 / 0.45);
}

.rflag__card b {
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.rflag__card small {
    color: var(--ink-3);
    font-size: 15px;
    font-weight: 700;
}

.road__goal {
    width: 380px;
    margin: 0 0 0 -190px;
}

.goal-card {
    position: absolute;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 6px;
    justify-items: center;
    width: 380px;
    padding: 40px 28px 34px;
    text-align: center;
    background: linear-gradient(170deg, #fff, #fff6e4);
    border-radius: 44px;
    box-shadow: 0 50px 100px -30px rgb(200 120 0 / 0.45), inset 0 0 0 1.5px rgb(255 255 255 / 0.95);
    transition: box-shadow 0.6s ease;
}

.goal-card .ico--xl {
    width: 96px;
    height: 96px;
}

.goal-card .ico--xl svg {
    width: 48px;
    height: 48px;
}

.goal-card small {
    color: var(--ink-3);
    font-size: 16px;
    font-weight: 700;
}

.goal-card b {
    font-size: 54px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.goal-card__glow {
    position: absolute;
    inset: -40%;
    z-index: -1;
    background: radial-gradient(closest-side, rgb(255 210 90 / 0.8), transparent);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.goal-card__done {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    height: 40px;
    margin-top: 6px;
    padding: 0 18px 0 12px;
    color: #fff;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    background: #22c55e;
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.6s var(--ease-spring);
}

.goal-card__done svg {
    width: 20px;
    height: 20px;
}

.road__goal.is-win .goal-card {
    box-shadow: 0 0 0 4px rgb(34 197 94 / 0.6), 0 60px 120px -30px rgb(245 166 35 / 0.8);
}

.road__goal.is-win .goal-card__glow {
    opacity: 1;
}

.road__goal.is-win .goal-card__done {
    opacity: 1;
    transform: none;
}

/* ----------------------------------------------- 04 Progress → Rewards ---- */

.scene--wishes {
    --len: 320vh;
}

.wishes-copy {
    position: relative;
    z-index: 3;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 24px) var(--pad) 0;
}

.wishes-copy .display {
    max-width: 8.2em;
}

.wishes-copy .lede {
    max-width: 25em;
}

.wishes {
    position: absolute;
    inset: 0;
    z-index: 2;
    perspective: 1800px;
}

.wish {
    --cw: 260px;
    --ch: 340px;
    position: absolute;
    top: 58%;
    left: 66%;
    width: var(--cw);
    height: var(--ch);
    margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

.wish__inner,
.wish__face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 26px 24px 24px;
    overflow: hidden;
    background:
        radial-gradient(120% 70% at 100% 0%, rgb(255 190 225 / 0.45), transparent 60%),
        linear-gradient(170deg, #fff 0%, #fff8f2 100%);
    border-radius: 32px;
    box-shadow: 0 40px 80px -30px rgb(150 50 110 / 0.45), 0 4px 14px rgb(150 50 110 / 0.06), inset 0 0 0 1px rgb(255 255 255 / 0.95);
}

.wish__inner {
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 0.6s var(--ease-spring);
}

.wish h3 {
    margin: 10px 0 0;
    font-size: 25px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.wish p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.4;
}

.wish .star-pill {
    margin-top: auto;
}

.wish--idea .wish__inner {
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgb(255 255 255 / 0.36);
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.9);
    border: 2px dashed rgb(226 71 143 / 0.35);
}

.wish__plus {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    color: var(--rose);
    font-size: 40px;
    font-weight: 300;
    background: rgb(255 255 255 / 0.85);
    border-radius: 50%;
}

.wish__flip {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.wish__face {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.wish__progress {
    width: 100%;
    height: 12px;
    margin-top: auto;
    overflow: hidden;
    background: rgb(226 71 143 / 0.12);
    border-radius: 9px;
}

.wish__progress i {
    display: block;
    width: calc(var(--v, 0) * 100%);
    height: 100%;
    background: linear-gradient(90deg, #ffcf4a, #f5a623);
    border-radius: inherit;
    transition: width 0.4s var(--ease-out);
}

.wish__count {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--ink-2);
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.wish__count svg {
    width: 22px;
    height: 22px;
}

.wish__count b {
    color: var(--ink);
    font-size: 24px;
}

.wish__count.is-bump {
    animation: hud-count 0.45s var(--ease-spring);
}

.wish__back {
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    text-align: center;
    background: radial-gradient(120% 90% at 50% 0%, #a98cff 0%, #7b55f0 40%, #c2338f 100%);
    transform: rotateY(180deg);
    box-shadow: 0 40px 90px -24px rgb(194 51 143 / 0.6), inset 0 0 0 1px rgb(255 255 255 / 0.3);
}

.wish__rays {
    position: absolute;
    inset: -50%;
    background: repeating-conic-gradient(from 0deg, rgb(255 220 120 / 0.22) 0deg 8deg, transparent 8deg 22deg);
    animation: spin 18s linear infinite;
    -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
    mask-image: radial-gradient(closest-side, #000, transparent);
}

.wish__check {
    position: relative;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin-bottom: 8px;
    color: #6b3a00;
    background: linear-gradient(160deg, #ffe17a, #f5a623);
    border-radius: 50%;
    box-shadow: 0 0 0 10px rgb(255 220 120 / 0.2), 0 16px 30px -8px rgb(0 0 0 / 0.3);
}

.wish__check svg {
    width: 44px;
    height: 44px;
}

.wish__back b {
    position: relative;
    font-size: 36px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.wish__back span:not(.wish__rays):not(.wish__check) {
    position: relative;
    font-size: 19px;
    font-weight: 650;
}

.wish__back small {
    position: relative;
    margin-top: 10px;
    color: rgb(255 255 255 / 0.82);
    font-family: var(--serif);
    font-size: 17px;
    font-style: italic;
}

/* Each chapter's girl pops in when the chapter pins (JS adds .is-in). */
.scene-girl {
    position: absolute;
    z-index: 4;
    pointer-events: none;
}

.scene-girl .girl,
.tasks__girl .girl {
    cursor: default;
}

.js .scene-girl .girl:not(.is-in) .girl__pose,
.js .tasks__girl .girl:not(.is-in) .girl__pose {
    visibility: hidden;
    animation: none;
}

.js .scene-girl .girl:not(.is-in) .girl__shadow,
.js .tasks__girl .girl:not(.is-in) .girl__shadow {
    opacity: 0;
}

.girl__shadow {
    transition: opacity 0.4s ease;
}

.scene-girl--wishes {
    bottom: 36px;
    left: calc(var(--pad) + 3vw);
}

.scene-girl--wishes .girl {
    --h: min(40vh, 350px);
}

.scene-girl--habits {
    bottom: 18px;
    left: calc(var(--pad) + 21vw);
}

.scene-girl--habits .girl {
    --h: min(25vh, 230px);
}

.theme-night .girl__shadow {
    background: radial-gradient(closest-side, rgb(0 0 0 / 0.5), transparent);
}

.theme-night .girl__body {
    filter: drop-shadow(0 0 34px rgb(141 117 255 / 0.35));
}

/* ------------------------------------------------- 05 Habits (night) ---- */

.scene--habits {
    --len: 460vh;
}

.streak {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 36px;
    align-items: center;
    justify-content: center;
    padding: var(--nav-h) var(--pad) 40px;
    text-align: center;
}

.streak__line {
    margin: 0;
    font-size: clamp(36px, 5.2vw, 84px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
}

.streak__week {
    display: flex;
    gap: clamp(10px, 2vw, 26px);
}

.sday {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.sday i {
    display: grid;
    place-items: center;
    width: clamp(48px, 6vw, 80px);
    height: clamp(48px, 6vw, 80px);
    background: rgb(255 255 255 / 0.06);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.14);
    transition: background 0.4s ease, box-shadow 0.5s ease, transform 0.6s var(--ease-spring);
}

.sday svg {
    width: 52%;
    height: 52%;
    opacity: 0.18;
    filter: grayscale(1);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.6s var(--ease-spring);
}

.sday small {
    color: rgb(232 226 255 / 0.5);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sday.is-lit i {
    background: radial-gradient(circle, rgb(255 210 90 / 0.3), rgb(255 210 90 / 0.06));
    box-shadow: inset 0 0 0 1.5px rgb(255 210 90 / 0.6), 0 0 40px rgb(255 190 60 / 0.45);
    transform: translateY(-6px);
}

.sday.is-lit svg {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgb(255 200 80 / 0.9));
    transform: scale(1.15) rotate(-10deg);
}

.sday.is-lit small {
    color: var(--gold-2);
}

.streak__flame {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 24px 12px 16px;
    background: rgb(255 255 255 / 0.07);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}

.streak__flame svg {
    width: 34px;
    height: 34px;
    fill: url(#g-flame);
    filter: drop-shadow(0 0 12px rgb(255 130 40 / 0.8));
    transform-origin: 50% 90%;
    animation: flicker 1.6s ease-in-out infinite;
}

.streak__flame b {
    min-width: 1ch;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.streak__flame span {
    color: rgb(232 226 255 / 0.7);
    font-size: 16px;
    font-weight: 700;
}

.streak__line--2 {
    font-size: clamp(26px, 3.2vw, 52px);
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    transition: opacity 0.5s ease, transform 0.7s var(--ease-spring);
}

.streak.is-full .streak__line--2 {
    opacity: 1;
    transform: none;
}

.streak.is-full .streak__flame {
    box-shadow: inset 0 0 0 1px rgb(255 190 60 / 0.5), 0 0 50px rgb(255 140 40 / 0.35);
}

.skymap {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
    gap: 3vw;
    align-items: center;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 10px) var(--pad) 90px;
}

.skymap__copy .display {
    font-size: clamp(42px, 5vw, 88px);
}

.level-readout {
    display: inline-flex;
    gap: 16px;
    align-items: center;
    margin-top: 30px;
    padding: 14px 24px 14px 14px;
    background: rgb(255 255 255 / 0.07);
    border-radius: 26px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12), 0 30px 60px -30px rgb(0 0 0 / 0.6);
}

.level-readout img {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 0 18px var(--lv, rgb(43 189 234 / 0.8)));
}

.level-readout img.is-swap {
    animation: pop-in 0.6s var(--ease-spring);
}

.level-readout small {
    display: block;
    color: rgb(232 226 255 / 0.6);
    font-size: 13px;
    font-weight: 700;
}

.level-readout strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.level-readout span {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--gold-2);
    font-size: 14px;
    font-weight: 700;
}

.level-readout span svg {
    width: 15px;
    height: 15px;
}

.constellation {
    position: relative;
    width: 100%;
    aspect-ratio: 1000 / 640;
    max-height: calc(100svh - var(--nav-h) - 120px);
}

.constellation__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.c-base {
    fill: none;
    stroke: rgb(255 255 255 / 0.22);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-dasharray: 0.002 0.006;
}

.c-line {
    fill: none;
    stroke: url(#g-constellation);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
    filter: drop-shadow(0 0 6px rgb(160 130 255 / 0.9));
}

.c-node {
    position: absolute;
    top: calc(var(--y) * 1%);
    left: calc(var(--x) * 1%);
    width: clamp(36px, 4.2vw, 60px);
    height: clamp(36px, 4.2vw, 60px);
    transform: translate(-50%, -50%);
}

.c-node img {
    width: 100%;
    height: 100%;
    opacity: 0.32;
    filter: grayscale(1) brightness(0.9);
    transform: scale(0.72);
    transition: opacity 0.4s ease, filter 0.5s ease, transform 0.7s var(--ease-spring);
}

.c-node::before {
    position: absolute;
    inset: -30%;
    content: "";
    background: radial-gradient(closest-side, var(--lv), transparent);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease, transform 0.8s var(--ease-out);
}

.c-node span {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 4px;
    color: rgb(232 226 255 / 0.85);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -4px);
    transition: opacity 0.4s ease, transform 0.5s var(--ease-spring);
}

.c-node.is-lit img {
    opacity: 1;
    filter: none;
    transform: scale(1);
}

.c-node.is-lit::before {
    opacity: 0.55;
    transform: scale(1);
}

.c-node.is-lit span {
    opacity: 0.75;
    transform: translate(-50%, 0);
}

.c-node.is-current img {
    transform: scale(1.22);
}

.c-node.is-current span {
    color: #fff;
    opacity: 1;
}

.constellation.is-complete .c-node.is-lit::before {
    animation: twinkle-glow 2.4s ease-in-out infinite;
    animation-delay: calc(var(--k) * 90ms);
}

@keyframes twinkle-glow {
    50% { opacity: 0.9; transform: scale(1.25); }
}

/* --------------------------------------------------- 06 Whole family ---- */

.scene--family {
    --len: 340vh;
}

.family {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 3vw;
    align-items: center;
    height: calc(100% - 76px);
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 16px) var(--pad) 0;
}

.family__copy .display {
    font-size: clamp(42px, 5.2vw, 92px);
}

.flow-steps {
    display: grid;
    gap: 10px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.flow-steps li {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--ink-3);
    font-size: 17px;
    font-weight: 600;
    opacity: 0.55;
    transition: color 0.4s ease, opacity 0.4s ease, transform 0.5s var(--ease-spring);
}

.flow-steps i {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px currentColor;
    transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.flow-steps li.is-past {
    color: var(--ink-2);
    opacity: 0.85;
}

.flow-steps li.is-now {
    color: var(--ink);
    opacity: 1;
    transform: translateX(8px);
}

.flow-steps li.is-now i,
.flow-steps li.is-past i {
    color: #fff;
    background: var(--violet);
    box-shadow: none;
}

.duo {
    position: relative;
    display: flex;
    gap: clamp(30px, 6vw, 110px);
    align-items: center;
    justify-content: center;
    height: 100%;
}

.duo__phone {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    justify-items: center;
    margin: 0;
}

.duo__phone figcaption {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 700;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dot--kid {
    background: #38bdf8;
}

.dot--parent {
    background: var(--violet);
}

.duo__lock {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    padding: 2px 8px 2px 6px;
    color: var(--violet);
    font-size: 11px;
    background: rgb(107 79 240 / 0.1);
    border-radius: 999px;
}

.duo__lock svg {
    width: 12px;
    height: 12px;
}

.duo .iphone {
    --w: clamp(220px, min(19vw, 30vh), 290px);
}

.duo__phone--kid .iphone {
    transform: rotate(-3deg);
}

.duo__phone--parent {
    margin-top: 60px;
}

.duo__phone--parent .iphone {
    transform: rotate(3deg);
}

.duo__arc {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.duo__arc-base {
    fill: none;
    stroke: rgb(107 79 240 / 0.28);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 2 9;
}

.duo__arc-live {
    fill: none;
    stroke: url(#g-ico-gold);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
}

.duo__girl {
    position: absolute;
    bottom: -24px;
    left: 50%;
    z-index: 4;
    transform: translateX(-50%);
    pointer-events: none;
}

.duo__girl .girl {
    --h: min(34vh, 290px);
    cursor: default;
}

.js .duo__girl .girl:not(.is-in) .girl__pose,
.js .finale__girl .girl:not(.is-in) .girl__pose {
    visibility: hidden;
    animation: none;
}

.js .duo__girl .girl:not(.is-in) .girl__shadow,
.js .finale__girl .girl:not(.is-in) .girl__shadow {
    opacity: 0;
}

.duo__packet,
.duo__star {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    opacity: 0;
    will-change: transform;
}

.duo__packet {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    height: 40px;
    padding: 0 14px 0 5px;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 14px 30px -10px rgb(60 40 160 / 0.45), inset 0 0 0 1px rgb(107 79 240 / 0.15);
}

.duo__packet img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.duo__packet svg {
    width: 16px;
    height: 16px;
    color: var(--violet);
}

.duo__star {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
}

.duo__star svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 14px rgb(255 190 60 / 0.95));
}

.duo__star b {
    position: absolute;
    color: #7a3e00;
    font-size: 15px;
    font-weight: 850;
}

.promises {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0;
    padding: 0 var(--pad);
    list-style: none;
}

.promises li {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    height: 40px;
    padding: 0 16px 0 12px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    background: rgb(255 255 255 / 0.78);
    border-radius: 999px;
    box-shadow: 0 10px 30px -14px rgb(40 25 110 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.4s ease, transform 0.6s var(--ease-spring);
    transition-delay: calc(var(--k, 0) * 60ms);
}

.promises li svg {
    width: 17px;
    height: 17px;
    color: var(--violet);
}

.promises li svg[data-stroke],
.promises li:nth-child(5) svg {
    fill: none;
    stroke-width: 2px;
}

.promises.is-in li {
    opacity: 1;
    transform: none;
}

/* ----------------------------------------------------- 07 In action ---- */

.scene--reel {
    --len: 420vh;
}

.reel-marquee {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 0;
    width: 100%;
    overflow: hidden;
    transform: translateY(-58%);
    pointer-events: none;
}

.reel-marquee__row {
    display: inline-block;
    color: transparent;
    font-size: clamp(110px, 17vw, 300px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.06em;
    white-space: nowrap;
    -webkit-text-stroke: 2px rgb(107 79 240 / 0.2);
    will-change: transform;
}

.reel-marquee__row i {
    color: rgb(245 166 35 / 0.35);
    font-style: normal;
    -webkit-text-stroke: 0;
}

.reel-head {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 16px) var(--pad) 0;
}

.reel-head .chapter {
    margin: 0;
}

.reel-title {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 52px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.reel {
    position: absolute;
    inset: 0;
    z-index: 2;
    perspective: 1600px;
}

.reel__item {
    --w: clamp(220px, 19vw, 300px);
    position: absolute;
    top: 52%;
    left: 50%;
    width: var(--w);
    margin: 0;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    cursor: pointer;
}

.reel__item .iphone {
    --w: inherit;
    width: 100%;
    font-size: calc(var(--w) / 30);
    transform: translateY(-50%);
}

/* The poster sits behind each clip so a switch never flashes black. */
.reel__item .iphone__screen {
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
}

.reel__item figcaption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.reel__item.is-active .iphone {
    box-shadow:
        inset 0 0 0 0.12em #5a5964,
        inset 0 0 0 0.32em #0d0d12,
        0 3.2em 6em -1.6em rgb(40 25 110 / 0.55),
        0 0 0 0.5em rgb(141 117 255 / 0.12),
        0 0 6em rgb(141 117 255 / 0.35);
}

.reel-caption {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 3;
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
}

.reel-caption__index {
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.reel-caption__index b {
    color: var(--violet);
}

.reel-caption__text {
    display: grid;
    gap: 2px;
    transition: opacity 0.25s ease, transform 0.4s var(--ease-spring);
}

.reel-caption__text b {
    font-size: 26px;
    letter-spacing: -0.03em;
}

.reel-caption__text span {
    color: var(--ink-2);
    font-size: 17px;
}

.reel-caption__text.is-swap {
    opacity: 0;
    transform: translateY(10px);
}

/* ------------------------------------------- Good to know & FAQ ---- */

.info {
    position: relative;
    padding: 18vh var(--pad) 8vh;
}

.info--faq {
    padding-top: 10vh;
    padding-bottom: 22vh;
}

.info__inner {
    max-width: var(--max);
    margin: 0 auto;
}

.info__inner--narrow {
    max-width: 880px;
}

.info__intro {
    max-width: 760px;
}

.info__intro--center {
    margin: 0 auto;
    text-align: center;
}

.chapter b svg {
    width: 15px;
    height: 15px;
}

.principles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 56px 0 0;
    padding: 0;
    list-style: none;
}

.principle {
    position: relative;
    padding: 28px 24px 26px;
    background: rgb(255 255 255 / 0.66);
    border-radius: 28px;
    box-shadow: 0 24px 60px -30px rgb(60 40 160 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.95);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
}

.principle__num {
    display: block;
    margin-bottom: 16px;
    color: var(--gold);
    font-family: var(--serif);
    font-size: 40px;
    font-style: italic;
    line-height: 1;
}

.principle h3,
.info-card h3 {
    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.principle p,
.info-card p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15.5px;
    line-height: 1.55;
}

.info__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 32px 30px 30px;
    background: rgb(255 255 255 / 0.72);
    border-radius: 32px;
    box-shadow: 0 30px 70px -34px rgb(60 40 160 / 0.4), inset 0 0 0 1px rgb(255 255 255 / 0.95);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
}

.info-card h3 {
    font-size: clamp(24px, 2.2vw, 32px);
    letter-spacing: -0.035em;
}

.info-card__kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    color: var(--violet);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.info-card__kicker svg {
    width: 16px;
    height: 16px;
}

.info-card .info-card__note {
    color: var(--ink-3);
    font-size: 14px;
}

.info-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.info-points li {
    display: grid;
    gap: 2px;
    padding: 14px 16px;
    background: rgb(107 79 240 / 0.06);
    border-radius: 18px;
}

.info-points b {
    font-size: 15px;
}

.info-points span {
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.4;
}

.info-ticks {
    display: grid;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.info-ticks li {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 15.5px;
    font-weight: 600;
}

.info-ticks svg {
    flex: none;
    width: 22px;
    height: 22px;
    padding: 4px;
    color: #fff;
    background: var(--mint);
    border-radius: 50%;
}

.info-link {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 6px;
    color: var(--violet);
    font-size: 15.5px;
    font-weight: 750;
    text-decoration: none;
}

.info-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.quote {
    max-width: 900px;
    margin: 13vh auto 0;
    text-align: center;
}

.quote__stars {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 20px;
}

.quote__stars svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 4px 10px rgb(245 166 35 / 0.45));
}

.quote blockquote {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(28px, 3.4vw, 50px);
    font-style: italic;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.quote figcaption {
    margin-top: 18px;
    color: var(--ink-3);
    font-size: 14px;
    font-weight: 600;
}

.faq {
    display: grid;
    gap: 12px;
    margin-top: 48px;
}

.faq__item {
    background: rgb(255 255 255 / 0.72);
    border-radius: 24px;
    box-shadow: 0 20px 50px -34px rgb(60 40 160 / 0.4), inset 0 0 0 1px rgb(255 255 255 / 0.95);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: box-shadow 0.3s ease;
}

.faq__item[open] {
    box-shadow: 0 26px 60px -30px rgb(60 40 160 / 0.45), inset 0 0 0 1.5px rgb(141 117 255 / 0.35);
}

.faq__item summary {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    list-style: none;
    cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
    display: none;
}

.faq__icon {
    position: relative;
    flex: none;
    width: 32px;
    height: 32px;
    background: rgb(107 79 240 / 0.1);
    border-radius: 50%;
    transition: transform 0.5s var(--ease-spring), background-color 0.3s ease;
}

.faq__icon::before,
.faq__icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    margin: -1px 0 0 -6px;
    content: "";
    background: var(--violet);
    border-radius: 2px;
}

.faq__icon::after {
    transform: rotate(90deg);
}

.faq__item[open] .faq__icon {
    background: var(--violet);
    transform: rotate(45deg);
}

.faq__item[open] .faq__icon::before,
.faq__item[open] .faq__icon::after {
    background: #fff;
}

.faq__answer {
    padding: 0 24px 22px;
    color: var(--ink-2);
    font-size: 16.5px;
    line-height: 1.6;
}

.faq__answer p {
    margin: 0;
}

.faq__item[open] .faq__answer {
    animation: rise 0.45s var(--ease-out);
}

.js .reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.8s ease, transform 1s var(--ease-out);
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

.principles .principle:nth-child(2) { transition-delay: 0.08s; }
.principles .principle:nth-child(3) { transition-delay: 0.16s; }
.principles .principle:nth-child(4) { transition-delay: 0.24s; }
.info__cards .info-card:nth-child(2) { transition-delay: 0.1s; }

/* -------------------------------------------------------- 08 Finale ---- */

.finale {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--nav-h) + 4px) var(--pad) 48px;
    text-align: center;
}

.finale__inner {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
}

.finale__girl {
    position: absolute;
    right: max(3vw, calc(50% - 690px));
    bottom: 40px;
    z-index: 1;
    pointer-events: none;
}

.finale__girl .girl {
    --h: min(46vh, 420px);
    cursor: default;
}

.orbit {
    position: relative;
    width: min(80vw, 440px, 52vh);
    aspect-ratio: 1;
    margin: -34px 0 -54px;
}

.orbit__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.13);
    transform: translate(-50%, -50%) rotate(-14deg);
}

.orbit__ring--1 { width: 60%; height: 24%; }
.orbit__ring--2 { width: 80%; height: 34%; }
.orbit__ring--3 { width: 98%; height: 44%; }

.orbit__logo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 34%;
    margin: -17% 0 0 -17%;
    overflow: hidden;
    border-radius: 23%;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18), 0 0 90px rgb(123 97 255 / 0.65), 0 0 180px rgb(244 114 190 / 0.35), 0 30px 60px -20px rgb(0 0 0 / 0.6);
    transition: transform 0.8s var(--ease-spring), box-shadow 0.6s ease;
    /* A long press on iOS would lift the square JPG out of its rounded frame. */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.orbit__logo img {
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
}

.orbit.is-gathered .orbit__logo {
    animation: logo-glow 3.6s ease-in-out infinite;
}

@keyframes logo-glow {
    50% { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.24), 0 0 120px rgb(123 97 255 / 0.85), 0 0 240px rgb(255 200 90 / 0.4), 0 30px 60px -20px rgb(0 0 0 / 0.6); }
}

.ostar {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    opacity: 0;
    will-change: transform;
}

.ostar svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 6px rgb(255 200 80 / 0.9));
}

.finale__earned {
    margin: 0 0 18px;
    color: rgb(232 226 255 / 0.75);
    font-size: 17px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}

.finale__earned b {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--gold-2);
}

.finale__earned svg {
    width: 20px;
    height: 20px;
}

.finale__earned.is-on {
    opacity: 1;
    transform: none;
}

.finale__title {
    margin: 0;
    font-size: clamp(48px, min(7.2vw, 12.5vh), 124px);
    font-weight: 820;
    line-height: 0.9;
    letter-spacing: -0.055em;
}

.finale__title span,
.finale__title em {
    display: block;
}

.finale__title .serif {
    font-size: 1.04em;
}

.finale__lede {
    margin: 20px 0 24px;
    color: rgb(232 226 255 / 0.78);
    font-size: clamp(18px, 1.6vw, 23px);
}

.store-btn--glow {
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35), 0 0 60px rgb(123 97 255 / 0.55), 0 24px 50px -16px rgb(0 0 0 / 0.6);
}

.store-btn--glow img {
    height: 67px;
}

.finale__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    justify-content: center;
    margin: 28px 0 0;
    padding: 0;
    color: rgb(232 226 255 / 0.6);
    font-size: 14px;
    font-weight: 600;
    list-style: none;
}

.finale__facts li {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.finale__facts li::before {
    width: 6px;
    height: 6px;
    content: "";
    background: var(--gold-2);
    border-radius: 50%;
}

.foot {
    position: relative;
    padding: 34px var(--pad) calc(34px + env(safe-area-inset-bottom));
    color: rgb(232 226 255 / 0.6);
    background: #0c0a24;
}

.foot__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max);
    margin: 0 auto;
    font-size: 14px;
}

.foot__brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: #fff;
    font-weight: 700;
}

.foot__brand img {
    border-radius: 7px;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.foot__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.foot__links a {
    text-decoration: none;
}

.foot__links a:hover {
    color: #fff;
}

/* ---------------------------------------------------------------- Toast ---- */

.toast {
    position: fixed;
    bottom: 84px;
    left: 50%;
    z-index: 70;
    padding: 12px 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    background: rgb(28 23 54 / 0.92);
    border-radius: 999px;
    box-shadow: 0 20px 50px -16px rgb(0 0 0 / 0.5);
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.92);
    transition: opacity 0.35s ease, transform 0.6s var(--ease-spring);
    pointer-events: none;
}

.toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

/* ----------------------------------------------------------- Responsive ---- */

@media (max-width: 1180px) {
    .float--level {
        right: -6%;
    }

    .reward-card {
        width: 300px;
    }
}

@media (max-width: 959px) {
    :root {
        --nav-h: 66px;
    }

    /* Size each control by its content; equal outer columns can collide
       with the centered counter when the language and sound controls fit. */
    .nav {
        grid-template-columns: auto auto minmax(0, 1fr);
        gap: 8px;
        /* The logo's own 4px padding brings its visible edge onto the content column. */
        padding-inline: calc(var(--pad) - 4px) var(--pad);
    }

    .nav__right {
        width: 100%;
        min-width: 0;
        justify-content: flex-end;
    }

    .nav::before {
        bottom: 0;
        background: var(--sky-top);
    }

    /* Keep travelling stars behind readable content and all controls.
       The transparent main still lets them show in the open background. */
    .flights {
        z-index: 0;
    }

    #main {
        position: relative;
        z-index: 1;
    }

    body {
        font-size: 16px;
    }

    .hud {
        height: 40px;
        padding: 0 13px 0 8px;
    }

    .hud__label {
        display: none;
    }

    .hud {
        position: relative;
    }

    .js .hud__hint {
        position: absolute;
        top: calc(100% + 9px);
        /* Flush with the content column; the arrow points at the star. */
        left: -44px;
        display: block;
        width: max-content;
        max-width: calc(100vw - 2 * var(--pad));
        padding: 7px 12px;
        color: var(--ink-2);
        font-size: 12.5px;
        font-weight: 700;
        line-height: 1.3;
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 10px 24px -12px rgb(40 25 110 / 0.45), inset 0 0 0 1px rgb(107 79 240 / 0.12);
        pointer-events: none;
        animation: rise 0.7s var(--ease-spring) 2.4s both;
        transition: filter 0.35s ease, translate 0.35s ease;
    }

    .hud__hint::before {
        position: absolute;
        top: -5px;
        left: 58px;
        width: 10px;
        height: 10px;
        content: "";
        background: #fff;
        transform: rotate(45deg);
    }

    /* filter, not opacity: the entrance animation holds opacity. */
    .nav.is-scrolled .hud__hint,
    .hud__hint.is-gone {
        filter: opacity(0);
        translate: 0 -6px;
    }

    .nav__brand span {
        display: none;
    }

    .nav__brand {
        padding: 4px;
    }

    .nav__cta {
        height: 40px;
        padding: 0 16px;
        font-size: 14px;
    }

    .hero {
        /* Room for the counter hint above the eyebrow. */
        padding-top: calc(var(--nav-h) + 34px);
        padding-bottom: 70px;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero__copy {
        display: contents;
    }

    .eyebrow-pill {
        justify-self: start;
    }

    .hero__title {
        margin: 18px 0 0;
    }

    .hero__visual {
        order: 1;
    }

    .hero__lede,
    .hero__facts {
        order: 2;
    }

    /* The App Store button and the film sit right under the headline, so
       they are in the first screen; the lede follows the phone. Above the
       visual, so the girl never covers them as she drifts up on scroll. */
    .hero__actions {
        position: relative;
        z-index: 5;
        gap: 10px 12px;
        margin-top: 22px;
    }

    .hero__actions .ghost-btn {
        display: none;
    }

    .hero__actions .store-btn img {
        height: 44px;
    }

    .hero__actions .film-btn__label {
        white-space: nowrap;
    }

    .hero__actions .film-btn__label small {
        display: none;
    }

    .hero__lede {
        margin-top: 4px;
    }

    .float {
        scale: 0.84;
    }

    .float--reward,
    .float--kid {
        transform-origin: 0 50%;
    }

    .float--streak,
    .float--level {
        transform-origin: 100% 50%;
    }

    .hero__title {
        font-size: clamp(54px, 16.5vw, 120px);
    }

    .hero__visual {
        height: auto;
        min-height: 0;
        padding: 26px 0 64px;
    }

    .iphone--hero {
        --w: clamp(230px, 58vw, 300px);
        transform: rotateY(-8deg) rotateX(3deg);
    }

    .float--reward {
        right: -3%;
        bottom: 6%;
    }

    .float--streak {
        top: 4%;
        right: -1%;
    }

    .float--level {
        right: -3%;
        bottom: 34%;
    }

    .float--kid {
        top: 12%;
        left: -1%;
    }

    /* The girl stands beside the top of the phone: in the first screen,
       clear of the tasks and of the reward card. */
    .iphone--hero {
        translate: 20% 0;
    }

    .float--girl {
        top: 0;
        bottom: auto;
        left: -11%;
    }

    .girl {
        --h: min(52vw, 340px);
    }

    .hero .girl {
        --h: min(42vw, 260px);
    }

    .reward-card {
        width: 268px;
        gap: 10px;
        padding: 11px 12px;
    }

    .reward-card .ico--lg {
        width: 42px;
        height: 42px;
    }

    .reward-card__txt b {
        font-size: 14px;
    }

    .ring {
        width: 50px;
        height: 50px;
    }

    .level-chip {
        width: 178px;
        padding: 9px 12px 9px 9px;
    }

    .level-chip img {
        width: 34px;
        height: 34px;
    }

    .streak-chip {
        padding: 9px 14px 9px 9px;
    }

    .streak-chip__flame {
        width: 36px;
        height: 36px;
    }

    .tasks {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 0;
        align-items: start;
        padding: calc(var(--nav-h) + 12px) var(--pad) 74px;
    }

    .tasks .display {
        font-size: clamp(36px, 9.6vw, 64px);
    }

    .tasks .lede {
        display: none;
    }

    .dock {
        margin-top: 18px;
    }

    .dock__chip {
        height: 28px;
        padding: 0 10px 0 7px;
        font-size: 12px;
    }

    .tasks__deck {
        height: 100%;
    }

    .tasks__girl {
        right: 2%;
        bottom: 60px;
        left: auto;
    }

    .payoff__badge {
        width: 160px;
        height: 160px;
    }

    .payoff__num {
        margin-top: 14px;
        font-size: 22px;
    }

    .payoff__num b {
        font-size: 46px;
    }

    .payoff__label {
        font-size: 22px;
    }

    .payoff__rays {
        top: 80px;
        width: 360px;
        height: 360px;
        margin: -180px 0 0 -180px;
    }

    .tasks__girl .girl {
        --h: 150px;
    }

    .film-btn {
        height: 48px;
        font-size: 15px;
    }

    .film-btn__play {
        width: 40px;
        height: 40px;
    }

    .film__frame {
        height: min(80svh, 760px);
        max-width: 92vw;
    }

    .film__close {
        top: -54px;
        right: 0;
    }

    .tcard {
        gap: 14px;
        width: min(100%, 440px);
        padding: 20px 18px;
        border-radius: 28px;
    }

    .tcard h3 {
        font-size: 21px;
    }

    .tcard p {
        font-size: 14px;
    }

    .tcard .ico--xl {
        width: 56px;
        height: 56px;
    }

    .tcard .ico--xl svg {
        width: 28px;
        height: 28px;
    }

    .star-pill--lg {
        height: 34px;
        font-size: 16px;
    }

    .scene--road .stage {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        row-gap: 16px;
    }

    .road-head {
        grid-row: 1;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .road-head .display,
    .wishes-copy .display,
    .family__copy .display,
    .skymap__copy .display {
        font-size: clamp(36px, 9.6vw, 64px);
    }

    .road-head .lede,
    .wishes-copy .lede,
    .family__copy .lede,
    .skymap__copy .lede {
        margin-top: 12px;
        font-size: 16px;
    }

    .meter {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 4px 14px;
        align-items: center;
        width: 100%;
        max-width: 420px;
        padding: 12px 16px;
        border-radius: 22px;
    }

    .meter__who {
        grid-column: 1 / -1;
        font-size: 13px;
    }

    .meter__who img {
        width: 26px;
        height: 26px;
    }

    .odo {
        margin: 0;
    }

    .odo__num {
        font-size: 46px;
    }

    .odo__star {
        width: 30px;
        height: 30px;
    }

    .odo__goal {
        padding-bottom: 4px;
        font-size: 20px;
    }

    .meter__msgs {
        grid-column: 1 / -1;
        height: 20px;
        margin-top: 2px;
    }

    .meter__msgs span {
        font-size: 13px;
    }

    .road {
        position: relative;
        grid-row: 2;
        min-height: 0;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .wish {
        --cw: 196px;
        --ch: 262px;
        top: 66%;
        left: 50%;
    }

    .wish__inner,
    .wish__face {
        gap: 6px;
        padding: 18px 16px;
        border-radius: 26px;
    }

    .wish h3 {
        font-size: 19px;
    }

    .wish p {
        font-size: 13px;
    }

    .wish .ico--xl {
        width: 52px;
        height: 52px;
    }

    .wish .ico--xl svg {
        width: 26px;
        height: 26px;
    }

    .wish__back b {
        font-size: 28px;
    }

    .wish__check {
        width: 64px;
        height: 64px;
    }

    .streak {
        gap: 24px;
    }

    .streak__week {
        gap: 6px;
    }

    .sday i {
        width: 40px;
        height: 40px;
    }

    .sday small {
        font-size: 10px;
    }

    .skymap {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 16px;
        align-items: start;
        padding: calc(var(--nav-h) + 10px) var(--pad) 24px;
    }

    .skymap__copy .lede {
        display: none;
    }

    .level-readout {
        margin-top: 14px;
        padding: 8px 18px 8px 8px;
    }

    .level-readout img {
        width: 44px;
        height: 44px;
    }

    .level-readout strong {
        font-size: 21px;
    }

    .constellation {
        justify-self: center;
        width: 100%;
        max-width: 520px;
        height: 100%;
        min-height: 0;
        max-height: none;
        container-type: size;
    }

    .reduced .constellation {
        /* The static layout has no fixed-height stage to fill. */
        height: min(110vw, 520px);
    }

    .c-node {
        /* Fill the mobile map without letting the highlighted badge collide
           with adjacent rows on short screens. */
        width: min(13cqw, 15cqh, 56px);
        height: min(13cqw, 15cqh, 56px);
    }

    .c-node span {
        display: none;
    }

    .family {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 4px;
        align-items: start;
        height: 100%;
        padding: calc(var(--nav-h) + 10px) var(--pad) 70px;
    }

    .family__copy .lede {
        display: none;
    }

    .flow-steps {
        display: block;
        position: relative;
        height: 30px;
        margin-top: 14px;
    }

    .flow-steps li {
        position: absolute;
        inset: 0;
        font-size: 16px;
        opacity: 0;
        transform: none;
    }

    .flow-steps li:not(.is-now) {
        opacity: 0;
    }

    .flow-steps li.is-now {
        opacity: 1;
        transform: none;
    }

    .scene-girl--wishes {
        bottom: 18px;
        left: 4px;
    }

    .scene-girl--wishes .girl {
        --h: 150px;
    }

    .scene-girl--habits {
        right: 6px;
        bottom: 14px;
        left: auto;
    }

    .scene-girl--habits .girl {
        --h: 120px;
    }

    .scene-girl--habits {
        transition: opacity 0.4s ease;
    }

    .scene--habits.is-map .scene-girl--habits {
        opacity: 0;
    }

    .duo {
        gap: 4vw;
        align-items: flex-start;
        padding-top: 10px;
    }

    .duo .iphone {
        --w: min(42vw, 26svh);
    }

    .duo__phone--parent {
        margin-top: 34px;
    }

    .duo__phone figcaption {
        font-size: 12px;
    }

    .duo__lock {
        display: none;
    }

    .duo__packet {
        height: 32px;
        font-size: 12px;
    }

    .duo__packet img {
        width: 24px;
        height: 24px;
    }

    .duo__star {
        width: 46px;
        height: 46px;
    }

    .promises {
        bottom: 14px;
        gap: 6px;
    }

    .promises li {
        height: 32px;
        padding: 0 12px 0 10px;
        font-size: 12px;
    }

    .promises li:nth-child(n + 5) {
        display: none;
    }

    .reel-head {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .reel__item {
        --w: min(50vw, 26svh);
        top: 54%;
    }

    .reel-head .film-btn {
        display: none;
    }

    .duo__girl .girl {
        --h: 130px;
    }

    .duo__girl {
        bottom: 96px;
    }

    .finale {
        padding-bottom: 180px;
    }

    .finale__girl {
        right: calc(50% - 40px);
        bottom: 16px;
    }

    .finale__girl .girl {
        --h: 150px;
    }

    .reel-caption {
        bottom: 26px;
        padding: 0 var(--pad);
    }

    .reel-caption__text b {
        font-size: 21px;
    }

    .reel-caption__text span {
        font-size: 15px;
    }

    .rail {
        display: none;
    }

    .nav__lang {
        width: 40px;
        height: 40px;
    }

    .info {
        padding-top: 12vh;
    }

    .info .display {
        font-size: clamp(36px, 9.6vw, 64px);
    }

    .principles,
    .info__cards {
        grid-template-columns: 1fr 1fr;
    }

    .info__cards {
        grid-template-columns: 1fr;
    }

    .toast {
        bottom: 28px;
    }
}

@media (max-width: 959px) and (max-height: 760px) {
    .wishes-copy .lede,
    .road-head .lede {
        display: none;
    }

    .duo .iphone {
        --w: min(38vw, 25svh);
    }

    .promises li:nth-child(n + 4) {
        display: none;
    }

    .reel__item {
        --w: min(46vw, 24svh);
        top: 53%;
    }

    .reel-caption {
        bottom: 16px;
    }

    .duo__girl {
        bottom: 64px;
    }

    .duo__girl .girl {
        --h: 110px;
    }

    .wish {
        --cw: 176px;
        --ch: 236px;
        top: 64%;
    }
}

@media (max-width: 599px) {
    .nav {
        padding-inline: calc(var(--pad) - 8px) var(--pad);
    }

    .nav__brand img {
        width: 28px;
        height: 28px;
    }

    .nav__brand {
        padding: 8px;
    }

    .hud {
        gap: 5px;
        padding-inline: 8px 10px;
    }

    .hud__star {
        width: 22px;
        height: 22px;
    }

    .hud__count {
        font-size: 18px;
    }

    .nav .nav__lang,
    .nav .nav__sound {
        flex-shrink: 0;
        width: 44px;
        height: 44px;
    }

    .nav .nav__cta {
        min-width: 0;
        height: 44px;
        padding-inline: 10px;
        font-size: 13px;
    }

    .principles,
    .info-points {
        grid-template-columns: 1fr;
    }

    .principle {
        padding: 22px 20px;
    }

    .principle__num {
        margin-bottom: 8px;
        font-size: 32px;
    }

    .info-card {
        padding: 26px 22px;
        border-radius: 28px;
    }

    .faq__item summary {
        padding: 18px 18px 18px 20px;
        font-size: 16.5px;
    }

    .faq__answer {
        padding: 0 20px 20px;
        font-size: 15.5px;
    }

    .nav__cta span {
        /* Wrap only at spaces or a soft hyphen from the locale text. */
        white-space: normal;
        line-height: 1.15;
        text-align: center;
    }

    .hero__title {
        letter-spacing: -0.055em;
    }

    .hero__lede {
        font-size: 17px;
    }

    .store-btn img {
        height: 50px;
    }

    .ghost-btn {
        height: 50px;
        padding: 0 16px 0 18px;
        font-size: 15px;
    }

    .hero__facts {
        gap: 6px 16px;
        font-size: 13px;
    }

    .float--level,
    .float--kid,
    .rflag {
        display: none;
    }

    .reward-card {
        width: 214px;
    }

    .reward-card .ico--lg {
        display: none;
    }

    .reward-card__txt small {
        display: none;
    }

    .tcard__check {
        top: -12px;
        left: -10px;
        width: 40px;
        height: 40px;
    }

    .tcard__body p {
        display: none;
    }

    .finale__earned {
        font-size: 15px;
    }

    .foot__inner {
        justify-content: center;
        text-align: center;
    }
}

@media (max-height: 760px) and (min-width: 960px) {
    .hero__title {
        font-size: clamp(56px, 8vw, 128px);
    }

    .tasks .lede,
    .road-head .lede {
        font-size: 17px;
    }

    .display {
        font-size: clamp(40px, 5vw, 84px);
    }
}

/* ------------------------------------------- Reduced motion & no JS ---- */

:is(.reduced, .no-js) {
    scroll-behavior: auto;
}

:is(.reduced, .no-js) .scene {
    height: auto;
}

:is(.reduced, .no-js) .stage {
    position: relative;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow: visible;
}

:is(.reduced, .no-js) .tasks {
    height: auto;
}

:is(.reduced, .no-js) .stage {
    overflow-x: clip;
}

:is(.reduced, .no-js) .theme-night {
    background: linear-gradient(180deg, #0b0a24, #1e1452);
}

:is(.reduced, .no-js) .tasks__deck {
    display: grid;
    gap: 22px;
    height: auto;
    padding: 20px;
}

:is(.reduced, .no-js) .tcard {
    position: relative;
    top: auto;
    left: auto;
    transform: none !important;
    opacity: 1 !important;
}

:is(.reduced, .no-js) .tasks .lede {
    display: block;
}

:is(.reduced, .no-js) .dock__chip {
    opacity: 1;
    filter: none;
    transform: none;
}

:is(.reduced, .no-js) .wishes,
:is(.reduced, .no-js) .road,
:is(.reduced, .no-js) .streak {
    position: relative;
    height: 80svh;
}

:is(.reduced, .no-js) .skymap,
:is(.reduced, .no-js) .reel {
    position: relative;
}

:is(.reduced, .no-js) .streak {
    height: auto;
    min-height: 70svh;
}

:is(.reduced, .no-js) .skymap {
    min-height: 100svh;
}

:is(.reduced, .no-js) .family {
    height: auto;
    min-height: 90svh;
}

:is(.reduced, .no-js) .promises {
    position: relative;
    bottom: auto;
    padding-bottom: 40px;
}

:is(.reduced, .no-js) .promises li {
    opacity: 1;
    transform: none;
}

:is(.reduced, .no-js) .reel {
    display: flex;
    gap: 32px;
    padding: 40px var(--pad) 60px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

:is(.reduced, .no-js) .reel__item {
    position: relative;
    top: auto;
    left: auto;
    flex: none;
    scroll-snap-align: center;
    transform: none !important;
    opacity: 1 !important;
}

:is(.reduced, .no-js) .reel__item .iphone {
    transform: none;
}

:is(.reduced, .no-js) .reel__item figcaption {
    position: static;
    width: auto;
    height: auto;
    margin-top: 16px;
    clip: auto;
}

:is(.reduced, .no-js) .reel__item figcaption b,
:is(.reduced, .no-js) .reel__item figcaption span {
    display: block;
}

:is(.reduced, .no-js) .reel-caption,
:is(.reduced, .no-js) .reel-marquee {
    display: none;
}

:is(.reduced, .no-js) .finale__earned {
    display: none;
}

.no-js .wish {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
    margin: 12px;
}

.no-js .wishes {
    height: auto;
    padding: 20px var(--pad);
}

.no-js .wish__back,
.no-js .road,
.no-js .duo__arc,
.no-js .duo__packet,
.no-js .duo__star {
    display: none;
}

.no-js .streak,
.no-js .skymap {
    position: relative;
}

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

:is(.reduced, .no-js) .payoff {
    display: none;
}

/* ------------------------------------------------- German typography ---- */

:lang(de) .hero__title {
    font-size: clamp(50px, min(7.6vw, 13.4vh), 138px);
}

:lang(de) .hl.serif {
    padding-left: 0.5em;
}

:lang(de) .finale__title {
    font-size: clamp(40px, min(5.7vw, 10.5vh), 100px);
}

:lang(de) .tcard h3,
:lang(de) .wish h3,
:lang(de) .principle h3,
:lang(de) .info-card h3,
:lang(de) .faq__item summary,
:lang(de) .display {
    -webkit-hyphens: auto;
    hyphens: auto;
}

.info-link--intro {
    display: inline-block;
    margin-top: 22px;
}

@media (max-width: 959px) {
    :lang(de) .hero__title {
        font-size: clamp(42px, 12.8vw, 96px);
    }

    :lang(de) .rail__steps li {
        padding: 0 10px;
    }
}

/* ---------------------------------------------------------------- Sound ---- */

.nav__sound {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--ink);
    background: rgb(255 255 255 / 0.72);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 10px 30px -12px rgb(40 25 110 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
    cursor: pointer;
    transition: background-color 0.4s ease, color 0.4s ease, transform 0.4s var(--ease-spring);
}

.nav__sound:hover {
    transform: scale(1.08);
}

.nav__sound svg {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: opacity 0.25s ease, transform 0.4s var(--ease-spring);
}

.nav__sound-on,
.nav__sound.is-on .nav__sound-off {
    opacity: 0;
    transform: scale(0.6);
}

.nav__sound.is-on .nav__sound-on {
    opacity: 1;
    transform: none;
}

.nav__sound.is-on {
    color: #fff;
    background: linear-gradient(140deg, #8d75ff, #e2478f);
    box-shadow: 0 10px 26px -10px rgb(194 51 143 / 0.6);
}

.nav.is-night .nav__sound:not(.is-on) {
    color: #fff;
    background: rgb(30 22 80 / 0.55);
    box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.5), inset 0 0 0 1px rgb(255 255 255 / 0.14);
}

@media (max-width: 959px) {
    .nav__sound {
        width: 40px;
        height: 40px;
    }

    .nav__right {
        gap: 8px;
    }
}

/* Narrow phones need the extra width on the right for the download button. */
@media (max-width: 389px) {
    .nav {
        padding-right: 12px;
    }
}

/* Give long localized labels enough room on the smallest phones. */
@media (max-width: 359px) {
    :root {
        --nav-h: 112px;
    }

    .nav {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: 1fr 1fr;
        row-gap: 4px;
        padding-block: 8px;
    }

    .nav .hud {
        justify-self: end;
    }

    .nav__right {
        grid-column: 1 / -1;
    }
}

/* -------------------------------------------------------- Language menu ---- */

.langs {
    position: static;
}

.langs > button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.langs__flag {
    flex-shrink: 0;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 23px;
    line-height: 1;
    letter-spacing: 0;
}

.langs__chevron {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.langs > button[aria-expanded="true"] .langs__chevron {
    transform: rotate(180deg);
}

.langs > button:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
}

.langs > button[aria-expanded="true"] {
    color: #fff;
    background: var(--ink);
}

.langs__list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    display: grid;
    width: min(260px, calc(100vw - 32px));
    max-height: calc(100dvh - var(--nav-h) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: rgb(255 255 255 / 0.92);
    border-radius: 22px;
    box-shadow: 0 24px 60px -18px rgb(40 25 110 / 0.45), inset 0 0 0 1px rgb(255 255 255 / 0.95);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
}

.langs__list[hidden] {
    display: none;
}

.langs__list a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
    border-radius: 14px;
}

.langs__list a:hover,
.langs__list a:focus-visible {
    background: rgb(107 79 240 / 0.1);
}

.langs__list a[aria-current="page"] {
    color: var(--violet);
    font-weight: 800;
}

.langs__list a[aria-current="page"]::after {
    margin-left: auto;
    content: "✓";
}

.nav.is-night .langs__list {
    background: rgb(24 18 66 / 0.92);
    box-shadow: 0 24px 60px -18px rgb(0 0 0 / 0.6), inset 0 0 0 1px rgb(255 255 255 / 0.12);
}

.nav.is-night .langs__list a {
    color: #fff;
}

.nav.is-night .langs__list a[aria-current="page"] {
    color: var(--gold-2);
}

/* Long single words (German, Dutch, Turkish…) may break inside cards. */
.wish h3,
.tcard h3,
.principle h3,
.info-card h3,
.faq__item summary {
    overflow-wrap: break-word;
}

.wish__back b,
.goal-card b,
.level-readout strong {
    max-width: 100%;
    white-space: nowrap;
}

/* ------------------------------------------- Japanese & Korean type ---- */

html:lang(ja) body {
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    line-break: strict;
}

html:lang(ko) body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    word-break: keep-all;
}

:lang(ja) .serif {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
}

:lang(ko) .serif {
    font-family: "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
}

:lang(ja) :is(.display, .hero__title, .finale__title, .reel-title, .streak__line, .principle h3, .info-card h3, .tcard h3, .wish h3),
:lang(ko) :is(.display, .hero__title, .finale__title, .reel-title, .streak__line, .principle h3, .info-card h3, .tcard h3, .wish h3) {
    letter-spacing: -0.01em;
    line-height: 1.12;
}

:lang(ja) .hero__title,
:lang(ko) .hero__title {
    font-size: clamp(48px, min(7.4vw, 12.6vh), 132px);
    line-height: 1.04;
}

:lang(ja) .hl.serif,
:lang(ko) .hl.serif {
    padding-left: 0.9em;
}

:lang(ja) .lede,
:lang(ko) .lede,
:lang(ja) .hero__lede,
:lang(ko) .hero__lede {
    line-height: 1.7;
}

:lang(ja) .chapter,
:lang(ko) .chapter {
    letter-spacing: 0.06em;
}

@media (max-width: 959px) {
    :lang(ja) .hero__title,
    :lang(ko) .hero__title {
        font-size: clamp(40px, 12vw, 88px);
    }
}

/* Japanese headlines break only at phrase boundaries (<wbr> in the texts). */
:lang(ja) :is(.display, .reel-title, .streak__line, .finale__title) {
    word-break: keep-all;
    overflow-wrap: anywhere;
}

@supports (word-break: auto-phrase) {
    :lang(ja) :is(.display, .reel-title, .streak__line, .finale__title) {
        word-break: auto-phrase;
    }
}
