/* Timer Quest public site. Same game-lobby world as the apps: dusk sky, sun rays,
   white panels on solid lips (the only depth system), chunky buttons, Lilita One + Fredoka. */

@font-face { font-family: "Lilita One"; src: url("fonts/LilitaOne_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
    --sky: #a876b8;
    --lobby: #6e4ba6;
    --lobby-deep: #46297f;
    --night: #2b1a4f;
    --night-2: #24163f;
    --ray: rgba(255, 217, 168, 0.14);

    --panel: #ffffff;
    --tint: #f4eef8;
    --tint-2: #ebe1f6;
    --ink: #2b1a4f;
    --muted: #5f4f7b;
    --on-dark: #efe6fa;
    --on-dark-muted: #d9c9ee;

    --panel-lip: #24163f;
    --soft-lip: #d8c8ec;

    --green-hi: #8be04e;
    --green: #3fa824;
    --green-lip: #22671a;
    /* Green behind white text: darker than the Child app's face so labels pass WCAG AA (5:1+). */
    --go-hi: #298218;
    --go: #24771a;
    --go-lip: #154a0f;
    --gold-hi: #ffdd4a;
    --gold: #f5b300;
    --gold-lip: #a86a00;
    --gold-ink: #4a2c00;
    --blue-hi: #7ee6f2;
    --blue: #1592b0;
    --blue-lip: #0b5e73;
    --wood: #6e4220;
    --wood-lip: #3e240f;
    --purple-hi: #b98af0;
    --purple: #7b3fc4;
    --purple-lip: #4a237a;
    --error: #b3261e;

    --display: "Lilita One", "Fredoka", system-ui, sans-serif;
    --body: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;

    --gutter: clamp(16px, 4vw, 40px);
    --section: clamp(80px, 10vw, 128px);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    scrollbar-color: var(--purple) var(--night);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--night);
    color: var(--ink);
    font-family: var(--body);
    font-weight: 500;
    font-size: 17px;
    line-height: 1.55;
    caret-color: var(--green);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; }
button { font: inherit; }

::selection { background: var(--gold-hi); color: var(--ink); }

:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 12px; }
.light :focus-visible, .panel :focus-visible, .faq :focus-visible, .duo-parent :focus-visible { outline-color: var(--purple); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip {
    position: absolute; left: 16px; top: -100px; z-index: 100;
    background: var(--gold-hi); color: var(--ink); padding: 10px 16px; border-radius: 12px;
    font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 860px; }

/* ---------- Buttons: a white rim, a gradient face, and a solid lip they press into ---------- */

.btn {
    --face-hi: var(--go-hi);
    --face: var(--go);
    --lip: var(--go-lip);
    --lip-size: 6px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 12px 24px;
    border: 3px solid #fff; border-radius: 18px;
    background: linear-gradient(180deg, var(--face-hi), var(--face));
    box-shadow: 0 var(--lip-size) 0 var(--lip);
    color: #fff;
    font-family: var(--display); font-size: 19px; line-height: 1.1; letter-spacing: 0.01em;
    text-decoration: none; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
    cursor: pointer; user-select: none;
    transition: transform 70ms ease-out, box-shadow 70ms ease-out, filter 120ms ease-out;
}
.btn:hover { filter: brightness(1.06) saturate(1.05); }
.btn:active:not(:disabled) { transform: translateY(var(--lip-size)); box-shadow: 0 0 0 var(--lip); }
.btn:disabled { cursor: not-allowed; filter: saturate(0.55); opacity: 0.8; }
.btn.is-status:disabled { --face-hi: #3b2468; --face: var(--night); --lip: var(--night-2); color: var(--gold-hi); text-shadow: none; opacity: 1; filter: none; cursor: default; }
.btn .icon { font-size: 1.05em; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.18)); }

.btn-gold { --face-hi: var(--gold-hi); --face: var(--gold); --lip: var(--gold-lip); color: var(--gold-ink); text-shadow: none; }
.btn-small { min-height: 42px; padding: 8px 16px; font-size: 16px; border-width: 2.5px; border-radius: 14px; --lip-size: 4px; }
.btn-mini { min-height: 34px; padding: 6px 12px; font-size: 13px; border-width: 2px; border-radius: 12px; --lip-size: 4px; }
.btn-big { min-height: 62px; padding: 14px 30px; font-size: clamp(19px, 1.2rem + 0.3vw, 22px); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */

.hud {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px var(--gutter);
    background: transparent;
    transition: background-color 200ms ease-out, box-shadow 200ms ease-out;
}
.hud.is-scrolled { background: var(--lobby-deep); box-shadow: 0 4px 0 var(--night-2); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-name { font-family: var(--display); font-size: 21px; text-shadow: 0 3px 0 rgba(43, 26, 79, 0.55); }
.brand-mark { display: block; height: 44px; width: auto; filter: drop-shadow(0 3px 0 rgba(43, 26, 79, 0.45)); }
.brand-quest { color: var(--gold-hi); }

.hud-nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.hud-link { color: var(--on-dark); font-weight: 600; font-size: 15.5px; text-decoration: none; text-shadow: 0 2px 0 rgba(43, 26, 79, 0.45); }
.hud-link:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- The lobby ground and its sun rays ---------- */

.lobby {
    position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(180deg, var(--sky) 0, var(--lobby) 420px, var(--lobby-deep) 1100px, var(--night) 100%);
    color: #fff;
}
.rays {
    position: absolute; z-index: -1; left: 50%; top: -60px; width: 2200px; height: 1500px; margin-left: -1100px;
    background: repeating-conic-gradient(from -90deg at 50% 0%, var(--ray) 0deg 7deg, transparent 7deg 19deg);
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 10%, transparent 72%);
            mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 10%, transparent 72%);
    pointer-events: none;
}
.rays-faint { opacity: 0.55; }
.rays-small { width: 900px; height: 700px; margin-left: -450px; top: -40px; }

/* ---------- First viewport ---------- */

.hero { margin-top: -66px; padding: 96px var(--gutter) clamp(56px, 7vw, 88px); }
.hero-copy { max-width: 920px; margin: 0 auto; text-align: center; }
.hero-title {
    font-family: var(--display); font-weight: 400;
    font-size: clamp(2.9rem, 1.6rem + 5.6vw, 6rem); line-height: 0.95; letter-spacing: -0.005em;
    color: #fff; text-shadow: 0 5px 0 var(--night);
    text-wrap: balance;
}
.hero-lead {
    max-width: 50ch; margin: 18px auto 0;
    font-size: clamp(1.08rem, 0.98rem + 0.45vw, 1.32rem); font-weight: 600; line-height: 1.5;
    color: #fff; text-shadow: 0 2px 0 rgba(43, 26, 79, 0.55);
    text-wrap: pretty;
}

/* ---------- The toy ---------- */

.toy { max-width: 1000px; margin: clamp(32px, 4vw, 48px) auto 0; }

.toy-switch { display: none; }

.toy-stage { display: grid; grid-template-columns: 1fr minmax(220px, 250px) 1fr; align-items: center; justify-items: center; gap: 12px; }

.phone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone-label span {
    display: inline-block; padding: 5px 14px; border-radius: 999px;
    background: var(--night); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
    font-family: var(--display); font-size: 15px; letter-spacing: 0.01em; color: #fff;
}
.phone-child .phone-label span { background: var(--gold); color: var(--gold-ink); box-shadow: 0 3px 0 var(--gold-lip); }

.phone-shell {
    width: 300px; aspect-ratio: 300 / 612;
    padding: 10px; border-radius: 46px;
    background: #1d1233;
    box-shadow: 0 9px 0 #0f0820, inset 0 0 0 2px #3a2763;
}
.phone-screen {
    position: relative; isolation: isolate; height: 100%; overflow: hidden;
    border-radius: 36px;
    font-size: 13px; line-height: 1.35;
}

.statusbar { display: flex; justify-content: space-between; align-items: center; height: 34px; padding: 0 22px; font-weight: 700; font-size: 12px; color: #fff; }
.statusbar-dark { color: var(--ink); }
.sb-icons { display: inline-flex; gap: 4px; align-items: center; }
.sb-icons i { display: block; width: 12px; height: 8px; border-radius: 2px; background: currentColor; opacity: 0.85; }
.sb-icons i:first-child { width: 8px; height: 8px; border-radius: 50%; }

/* Parent phone: calm lavender dashboard. */

.p-screen { background: #f3ecf9; color: var(--ink); padding: 0 12px 64px; display: flex; flex-direction: column; gap: 10px; }
.p-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 2px; }
.p-greet { font-family: var(--display); font-size: 17px; line-height: 1.15; max-width: 15ch; }
.p-kids { display: flex; gap: 4px; }
.p-kid { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--muted); font-family: var(--display); font-size: 12px; box-shadow: inset 0 0 0 2px var(--soft-lip); }
.p-kid.is-on { background: var(--lobby); color: #fff; box-shadow: none; }

.p-card { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 4px 0 var(--soft-lip); }
.p-child-top { display: flex; align-items: center; gap: 10px; }
.p-child-top > div { flex: 1; min-width: 0; }
.p-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--gold); color: var(--gold-ink); font-family: var(--display); font-size: 18px; box-shadow: 0 3px 0 var(--gold-lip); }
.p-child-name { font-family: var(--display); font-size: 16px; }
.p-muted { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.p-pill { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; background: #e2f7d3; color: #22671a; font-weight: 700; font-size: 11px; transition: background-color 200ms, color 200ms; }
.p-pill.is-playing { background: #d8f4fa; color: #0b5e73; }
.p-pill.is-done { background: #fff3c4; color: var(--gold-ink); }
.p-balance { margin-top: 8px; font-weight: 700; color: var(--muted); font-size: 12px; }
.p-balance b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--lobby); margin-right: 2px; font-variant-numeric: tabular-nums; }

.p-card-title { font-family: var(--display); font-size: 14px; margin-bottom: 8px; }
.p-chore { display: flex; gap: 10px; }
.p-chore-icon, .p-done-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--tint-2); color: var(--purple); font-size: 18px; }
.p-done-icon { background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-lip); }
.p-chore-name { font-family: var(--display); font-size: 15px; }
.p-tags { display: flex; gap: 5px; margin-top: 6px; }
.tag { padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 11px; }
.tag-gold { background: #fff3c4; color: var(--gold-ink); }
.tag-xp { background: #efe3fb; color: var(--purple-lip); }
.p-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; }
.p-reject { padding: 6px 12px; border-radius: 12px; border: 2px solid #f0c9c4; color: var(--error); font-family: var(--display); font-size: 13px; }
.p-done { display: flex; gap: 10px; align-items: center; animation: pop-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }

.p-tabs, .c-tabs {
    position: absolute; left: 0; right: 0; bottom: 0;
    display: flex; justify-content: space-around; align-items: center;
    height: 54px; padding: 0 8px 4px;
    font-weight: 700; font-size: 10.5px;
}
.p-tabs { background: #fff; color: var(--muted); box-shadow: 0 -2px 0 var(--soft-lip); }
.p-tabs .is-on { color: var(--purple); }

/* Child phone: the game lobby. */

.c-screen {
    background: linear-gradient(180deg, var(--sky) 0%, var(--lobby) 38%, var(--lobby-deep) 74%, var(--night) 100%);
    color: #fff; padding: 0 12px 64px;
}
.c-hud { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; }
.c-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--gold); color: var(--gold-ink); font-family: var(--display); font-size: 18px; box-shadow: 0 3px 0 var(--gold-lip), inset 0 0 0 2px #fff; }
.c-hud-mid { flex: 1; min-width: 0; }
.c-name { font-family: var(--display); font-size: 13px; text-shadow: 0 2px 0 rgba(43, 26, 79, 0.6); }
.c-xp { display: block; height: 8px; margin-top: 3px; border-radius: 6px; background: var(--night); overflow: hidden; }
.c-xp i { display: block; width: 100%; height: 100%; border-radius: 6px; background: linear-gradient(180deg, var(--green-hi), var(--green)); transform: scaleX(0.38); transform-origin: left center; transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1); }
.c-coin { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--night); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.c-coin-face { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 70%); color: var(--gold-ink); font-size: 14px; }
.c-coin b { font-family: var(--display); font-weight: 400; font-size: 15px; min-width: 2ch; font-variant-numeric: tabular-nums; }
.c-coin.is-hit { animation: coin-hit 520ms cubic-bezier(0.2, 0.9, 0.3, 1.4); }

.c-panel {
    position: relative; margin: 30px 2px 0; padding: 26px 12px 14px;
    background: #fff; color: var(--ink); text-align: center;
    border-radius: 22px; box-shadow: 0 6px 0 var(--panel-lip);
}
.ribbon {
    position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
    padding: 3px 14px; white-space: nowrap;
    border: 2.5px solid #fff; border-radius: 10px;
    background: var(--wood); box-shadow: 0 3px 0 var(--wood-lip);
    font-family: var(--display); font-size: 13px; letter-spacing: 0.02em; color: #fff;
}
.ribbon-wood { background: var(--wood); }
.c-panel .ribbon.is-swinging { animation: ribbon-swing 520ms cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.c-big { display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.c-big b { font-family: var(--display); font-weight: 400; font-size: 74px; line-height: 0.95; color: var(--lobby); text-shadow: 0 4px 0 #e4d6f2; font-variant-numeric: tabular-nums; }
.c-big span { font-family: var(--display); font-size: 20px; color: var(--lobby); padding-bottom: 8px; }
.c-meter { display: block; height: 12px; margin: 12px 4px 0; border-radius: 7px; background: #ece2f6; overflow: hidden; }
.c-meter i { display: block; width: 0; height: 100%; border-radius: 7px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.c-msg { margin-top: 10px; font-weight: 700; font-size: 12.5px; text-wrap: balance; }

.burst {
    position: absolute; right: -8px; top: 10px;
    padding: 5px 11px; border-radius: 12px;
    background: var(--gold-hi); color: var(--gold-ink); box-shadow: 0 4px 0 var(--gold-lip);
    font-family: var(--display); font-size: 17px;
    transform: rotate(-7deg) scale(0); opacity: 0; pointer-events: none;
}
.burst.is-on { animation: burst 1700ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }

.c-mission, .c-playing {
    display: flex; align-items: center; gap: 10px;
    margin: 18px 2px 0; padding: 10px 12px;
    border-radius: 16px; background: #4e3285; box-shadow: 0 4px 0 var(--panel-lip);
}
.c-mission[hidden], .c-playing[hidden] { display: none; }
.c-mission-name { font-family: var(--display); font-size: 14px; }
.c-mission-note { font-weight: 600; font-size: 11.5px; color: var(--on-dark-muted); }
.c-mission.is-approved .c-mission-note { color: var(--gold-hi); }

.c-chest { position: relative; flex-shrink: 0; width: 40px; height: 38px; }
.chest-art { display: block; width: 100%; height: 100%; overflow: visible; }
.chest-art .chest-lid { transform-box: fill-box; transform-origin: 4% 100%; }
.chest-art .chest-clasp { transition: opacity 160ms ease-out; }
.chest-art .chest-glow { opacity: 0; transition: opacity 240ms ease-out; }
.c-mission.is-approved .c-chest .chest-lid { transform: rotate(-26deg); transition: transform 380ms cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.c-mission.is-approved .c-chest .chest-clasp, .join-done.is-open .chest-clasp { opacity: 0; }
.c-mission.is-approved .c-chest .chest-glow, .join-done.is-open .chest-glow { opacity: 0.9; }

.c-game { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; flex-shrink: 0; width: 36px; height: 36px; }
.c-game i { border-radius: 4px; animation: block 1.2s ease-in-out infinite; }
.c-game i:nth-child(1) { background: var(--green); }
.c-game i:nth-child(2) { background: var(--gold); animation-delay: 0.15s; }
.c-game i:nth-child(3) { background: var(--blue); animation-delay: 0.3s; }
.c-game i:nth-child(4) { background: var(--purple-hi); animation-delay: 0.45s; }

.c-tabs { background: var(--night); color: var(--on-dark-muted); }
.c-tabs .is-on { padding: 6px 10px; border-radius: 10px; background: var(--gold); color: var(--gold-ink); box-shadow: 0 3px 0 var(--gold-lip); }

.timesup {
    position: absolute; inset: 0; z-index: 5;
    display: grid; place-items: center; padding: 16px;
    background: linear-gradient(180deg, var(--sky) 0%, var(--lobby) 40%, var(--night) 100%);
}
.timesup[hidden] { display: none; }
.timesup.is-on .timesup-card { animation: pop-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.timesup-card {
    position: relative; width: 100%; padding: 30px 14px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: #fff; color: var(--ink); text-align: center;
    border-radius: 22px; box-shadow: 0 6px 0 var(--panel-lip);
}
.timesup-coin {
    display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 70%);
    box-shadow: 0 4px 0 var(--gold-lip), inset 0 0 0 3px #fff; color: var(--gold-ink); font-size: 28px;
}
.timesup-coin .icon { animation: hourglass 3s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.timesup-title { font-family: var(--display); font-size: 21px; line-height: 1.1; }
.timesup-text { font-weight: 600; font-size: 12px; color: var(--muted); margin-bottom: 4px; text-wrap: balance; }

.flycoin {
    position: fixed; z-index: 80; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
    display: grid; place-items: center; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 70%);
    box-shadow: 0 3px 0 var(--gold-lip), inset 0 0 0 2.5px #fff; color: var(--gold-ink); font-size: 18px;
    pointer-events: none;
}

.toy-controls { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 4px; text-align: center; }
.toy-steps { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.toy-steps li {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px 5px 7px; border-radius: 999px;
    background: rgba(36, 22, 63, 0.55); color: var(--on-dark);
    font-weight: 700; font-size: 14px;
    transition: background-color 200ms, color 200ms;
}
.toy-step-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2.5px currentColor; transition: background-color 200ms, box-shadow 200ms; }
.toy-steps li.is-now { background: var(--gold); color: var(--gold-ink); }
.toy-steps li.is-done { background: var(--go); color: #fff; }
.toy-steps li.is-done .toy-step-dot, .toy-steps li.is-now .toy-step-dot { background: currentColor; }
.toy-action { width: 100%; }
.toy-steps li { justify-content: flex-start; }
.toy-note { font-weight: 600; font-size: 14.5px; color: var(--on-dark-muted); }
.quick-join { width: 100%; padding-top: 16px; border-top: 2px solid rgba(217, 201, 238, 0.18); }
.quick-form { display: grid; gap: 8px; }
.quick-input { height: 48px; border-radius: 15px; font-size: 16px; padding: 0 14px; }
.quick-submit { width: 100%; min-height: 48px; height: 48px; font-size: 17px; }
.quick-error { margin-top: 0; padding: 8px 10px; border-radius: 12px; background: #fff; text-align: left; }
.quick-done { padding: 14px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--panel-lip); }
.quick-done-title { margin-top: 0; font-size: 22px; }
.quick-done-text { margin-top: 4px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.quick-done-text a { color: var(--purple); font-weight: 700; }

/* ---------- Panels and the waitlist ---------- */

.panel { background: #fff; color: var(--ink); border-radius: 30px; box-shadow: 0 8px 0 var(--panel-lip); }
.panel-title { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); line-height: 1.02; color: var(--ink); text-wrap: balance; }
.panel-text { margin-top: 10px; font-size: 17px; color: var(--muted); text-wrap: pretty; }

.hero-join {
    max-width: 1000px; margin: clamp(48px, 6vw, 72px) auto 0;
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 48px);
    padding: clamp(24px, 3.5vw, 40px);
}
.status { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.status li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15.5px; }
.status .icon { font-size: 26px; padding: 4px; border-radius: 9px; background: var(--tint); color: var(--purple); width: 34px; height: 34px; }
.status li:first-child .icon { color: var(--green-lip); background: #e2f7d3; }
.status li:last-child .icon { color: var(--gold-lip); background: #fff3c4; }

.join-form { position: relative; }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.join-row .field-email { display: contents; }
.join-row .field-label { grid-column: 1; grid-row: 1; margin-bottom: 6px; }
.join-row .input { grid-column: 1; grid-row: 2; }
.join-row .field-error { grid-column: 1 / -1; grid-row: 3; }
.join-row .join-submit { grid-column: 2; grid-row: 2; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-email { flex: 1; }
.field-label { font-weight: 700; font-size: 14.5px; color: var(--ink); padding: 0; }
.field-note { font-weight: 600; color: var(--muted); margin-left: 6px; }
.input {
    width: 100%; height: 60px; padding: 0 18px;
    border: 3px solid #e1d4ef; border-radius: 18px;
    background: #fbf8fe; color: var(--ink);
    font: 600 18px/1 var(--body);
    transition: border-color 150ms, background-color 150ms;
}
.input::placeholder { color: #8a7aa6; }
.input:hover { border-color: #cdb8e6; }
.input:focus { outline: none; border-color: var(--purple); background: #fff; }
.input:focus-visible { outline: 3px solid rgba(123, 63, 196, 0.28); outline-offset: 2px; }
.input[aria-invalid="true"] { border-color: var(--error); background: #fff7f6; }
.select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 48px; font-size: 16.5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237b3fc4'%3E%3Cpath d='M6.3 9.3a1.2 1.2 0 0 1 1.7 0l4 4 4-4a1.2 1.2 0 1 1 1.7 1.7l-4.9 4.8a1.2 1.2 0 0 1-1.7 0L6.3 11a1.2 1.2 0 0 1 0-1.7Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 22px;
}
.join-submit { flex-shrink: 0; height: 60px; min-height: 60px; }
.join-submit[aria-busy="true"] { cursor: progress; }
.field-error { margin-top: 8px; font-weight: 600; font-size: 14.5px; color: var(--error); }
.field-error:empty { display: none; }
.join-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.join-more { margin-top: 16px; border-radius: 18px; background: var(--tint); }
.join-more summary {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
    padding: 14px 52px 14px 18px; position: relative;
    font-weight: 700; cursor: pointer; list-style: none; border-radius: 18px;
}
.join-more summary::-webkit-details-marker { display: none; }
.join-more-hint { font-weight: 600; font-size: 14px; color: var(--muted); }
.join-more-chevron { position: absolute; right: 16px; top: 50%; width: 24px; height: 24px; margin-top: -12px; color: var(--purple); transition: transform 200ms ease-out; }
.join-more[open] .join-more-chevron { transform: rotate(180deg); }
.join-more-body { display: grid; gap: 18px; padding: 4px 18px 18px; }
.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice legend { margin-bottom: 8px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
    display: inline-flex; align-items: center; min-height: 40px; padding: 6px 15px;
    border-radius: 999px; background: #fff; border: 2px solid #d9c9ec;
    font-weight: 700; font-size: 15px; color: var(--ink);
    transition: background-color 120ms, color 120ms, border-color 120ms, transform 70ms;
}
.chip:hover span { border-color: var(--purple-hi); }
.chip input:checked + span { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 3px 0 var(--purple-lip); }
.chip input:focus-visible + span { outline: 3px solid var(--purple); outline-offset: 2px; }
.chip input:active + span { transform: translateY(2px); }

.join-fine { margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--muted); }

.join-done { text-align: center; padding: 8px 0 4px; }
.join-done[hidden] { display: none; }
.join-done:focus { outline: none; }
.join-done-title { margin-top: 10px; font-family: var(--display); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); color: var(--ink); }
.join-done-text { margin: 8px auto 0; max-width: 40ch; color: var(--muted); font-size: 17px; }

.chest { position: relative; display: block; width: 120px; height: 112px; margin: 8px auto 0; }
.chest-stars { position: absolute; inset: 0; z-index: 1; }
.chest-stars i { position: absolute; left: 50%; top: 40%; width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--gold-hi); opacity: 0; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 16.6l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9L12 2.6Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.6 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 16.6l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9L12 2.6Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.join-done.is-open .chest-art .chest-lid { animation: lid-open 600ms cubic-bezier(0.2, 0.9, 0.3, 1.35) 150ms both; }
.join-done.is-open .chest-stars i { animation: star-out 900ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both; }
.chest-stars i:nth-child(1) { --x: -70px; --y: -54px; }
.chest-stars i:nth-child(2) { --x: -38px; --y: -84px; }
.chest-stars i:nth-child(3) { --x: 0px; --y: -98px; }
.chest-stars i:nth-child(4) { --x: 40px; --y: -82px; }
.chest-stars i:nth-child(5) { --x: 72px; --y: -50px; }
.chest-stars i:nth-child(6) { --x: -88px; --y: -12px; }
.chest-stars i:nth-child(7) { --x: 90px; --y: -14px; }
.chest-stars i:nth-child(8) { --x: 16px; --y: -66px; background: var(--green-hi); }

/* ---------- Real apps ---------- */

.how { position: relative; overflow: hidden; isolation: isolate; padding: clamp(64px, 8vw, 104px) 0 calc(var(--section) + 24px); background: linear-gradient(180deg, var(--night) 0%, var(--lobby-deep) 55%, var(--night) 100%); color: #fff; }
.section-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.6rem); line-height: 1; color: var(--ink); text-wrap: balance; max-width: 18ch; }
.section-lead { margin-top: 16px; max-width: 52ch; font-size: 18px; color: var(--muted); text-wrap: pretty; }
.on-dark { color: #fff; }
.section-title.on-dark { text-shadow: 0 4px 0 var(--night); }
.section-lead.on-dark { color: var(--on-dark-muted); }

.film {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px);
    max-width: 1180px; margin: clamp(40px, 5vw, 64px) auto 0; padding: 0 var(--gutter);
}
.film-frame:nth-child(even) { margin-top: 64px; }
.shot { padding: 8px; border-radius: 32px; background: #1d1233; box-shadow: 0 9px 0 #0f0820, inset 0 0 0 2px #3a2763; }
.shot img, .shot video { display: block; width: 100%; height: auto; border-radius: 25px; background: #f3ecf9; }
.film-title { margin-top: 26px; font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.1; }
.film-text { margin-top: 6px; font-size: 15.5px; color: var(--on-dark-muted); text-wrap: pretty; }

/* ---------- Two apps ---------- */

.duo { display: grid; grid-template-columns: 1fr 1fr; }
.duo-side { display: grid; grid-template-columns: minmax(0, 1fr) clamp(160px, 15vw, 210px); gap: clamp(20px, 3vw, 40px); align-items: center; padding: var(--section) clamp(20px, 4.5vw, 72px); }
.duo-parent { background: var(--tint); color: var(--ink); }
.duo-child { color: #fff; background: linear-gradient(180deg, var(--sky) 0, var(--lobby) 40%, var(--lobby-deep) 100%); }
.duo-title { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); line-height: 1; }
.duo-child .duo-title { text-shadow: 0 4px 0 var(--night); }
.duo-text { margin-top: 14px; font-size: 17px; max-width: 42ch; color: var(--muted); text-wrap: pretty; }
.duo-child .duo-text { color: #fff; font-weight: 600; text-shadow: 0 2px 0 rgba(43, 26, 79, 0.45); }
.ticks { display: grid; gap: 10px; margin-top: 22px; }
.ticks li { position: relative; padding-left: 36px; font-weight: 600; font-size: 16.5px; text-wrap: pretty; }
.ticks li::before {
    content: ""; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 8px;
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9.5 17.2 4.3 12a1.6 1.6 0 1 1 2.3-2.3l2.9 2.9 7.9-7.9a1.6 1.6 0 1 1 2.3 2.3L11.8 17.2a1.6 1.6 0 0 1-2.3 0Z'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-shadow: 0 3px 0 var(--green-lip);
}
.ticks-light li { text-shadow: 0 2px 0 rgba(43, 26, 79, 0.45); }
.ticks-light li::before { background-color: var(--gold); box-shadow: 0 3px 0 var(--gold-lip); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a2c00'%3E%3Cpath d='M9.5 17.2 4.3 12a1.6 1.6 0 1 1 2.3-2.3l2.9 2.9 7.9-7.9a1.6 1.6 0 1 1 2.3 2.3L11.8 17.2a1.6 1.6 0 0 1-2.3 0Z'/%3E%3C/svg%3E"); }
.shot-tilt-left { transform: rotate(-3deg); }
.shot-tilt-right { transform: rotate(3deg); }

/* ---------- Rules ---------- */

.rules { padding: var(--section) 0; background: linear-gradient(180deg, var(--night) 0, var(--lobby-deep) 30%, var(--lobby) 70%, var(--lobby-deep) 100%); }
.rules .rays { top: 0; }
.rule-icon { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 15px; border: 2.5px solid #fff; color: #fff; font-size: 22px; }
.rule-icon .icon { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.18)); }
.rule-icon-blue { background: linear-gradient(180deg, var(--blue-hi), var(--blue)); box-shadow: 0 4px 0 var(--blue-lip); }
.rule-icon-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 4px 0 var(--gold-lip); color: var(--gold-ink); }
.rule-icon-green { background: linear-gradient(180deg, var(--green-hi), var(--green)); box-shadow: 0 4px 0 var(--green-lip); }
.rule-icon-purple { background: linear-gradient(180deg, var(--purple-hi), var(--purple)); box-shadow: 0 4px 0 var(--purple-lip); }
.sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); align-items: start; margin-top: clamp(40px, 5vw, 60px); }
.set { padding: 10px 22px 8px; }
.set:nth-child(2) { margin-top: 56px; }
.set-head { display: flex; align-items: center; gap: 12px; padding: 12px 0 14px; border-bottom: 2px solid var(--tint-2); font-family: var(--display); font-size: 22px; color: var(--ink); }
.set-head .p-avatar { width: 34px; height: 34px; font-size: 17px; }
.p-avatar-purple { background: var(--purple); color: #fff; box-shadow: 0 3px 0 var(--purple-lip); }
.set-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon body" ". value"; gap: 6px 16px; padding: 18px 0; border-bottom: 2px solid var(--tint); }
.set-row:last-child { border-bottom: 0; }
.set-row .rule-icon { grid-area: icon; }
.set-body { grid-area: body; }
.set-value { grid-area: value; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.set-title { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.15; color: var(--ink); }
.set-text { margin-top: 3px; font-size: 15.5px; color: var(--muted); text-wrap: pretty; }
.vchip { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--tint-2); color: var(--ink); font-weight: 700; font-size: 14px; }
.vchip-gold { background: #fff3c4; color: var(--gold-ink); box-shadow: inset 0 0 0 2px #f5d77a; }
.vchip-green { background: var(--go); color: #fff; box-shadow: 0 3px 0 var(--go-lip); }
.vchip-star { background: #efe3fc; color: var(--purple-lip); }
.set-meta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--muted); }
.set-meta::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.set-meta-ok::before { background: var(--green); }

/* ---------- Privacy ---------- */

.privacy { background: var(--night); color: #fff; padding: var(--section) 0; }
.privacy-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.privacy-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px; border-radius: 20px; background: #4e3285; box-shadow: 0 5px 0 var(--night-2); color: var(--gold-hi); font-size: 32px; }
.never { display: grid; }
.never li {
    display: flex; align-items: center; gap: 18px;
    padding: 18px 0; border-bottom: 2px solid rgba(217, 201, 238, 0.14);
    font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); line-height: 1.05;
}
.never li:last-child { border-bottom: 0; }
.never li::before {
    content: ""; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background:
        linear-gradient(45deg, transparent calc(50% - 2.5px), var(--gold-hi) calc(50% - 2.5px) calc(50% + 2.5px), transparent calc(50% + 2.5px)),
        transparent;
    box-shadow: inset 0 0 0 4px var(--gold-hi);
}

/* ---------- Questions ---------- */

.faq { background: var(--tint); padding: var(--section) 0; color: var(--ink); }
.faq-list { display: grid; gap: 14px; margin-top: clamp(32px, 4vw, 48px); }
.faq-item { background: #fff; border-radius: 22px; box-shadow: 0 5px 0 var(--soft-lip); }
.faq-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 20px 24px; cursor: pointer; list-style: none; border-radius: 22px;
    font-family: var(--display); font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); line-height: 1.15;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { width: 28px; height: 28px; color: var(--purple); transition: transform 200ms ease-out; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { padding: 0 24px 22px; max-width: 64ch; font-size: 17px; color: var(--muted); text-wrap: pretty; }

/* ---------- Close ---------- */

.close { padding: var(--section) var(--gutter) calc(var(--section) + 16px); }
.close-logo { display: block; width: clamp(200px, 26vw, 300px); height: auto; margin: 0 auto clamp(24px, 3vw, 36px); filter: drop-shadow(0 8px 0 rgba(36, 22, 63, 0.45)); }
.close-panel { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(28px, 4vw, 48px); }
.close-title { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); }
.close .panel-text { margin-bottom: 24px; }

/* ---------- Footer ---------- */

.footer { background: var(--night); color: var(--on-dark-muted); padding: 36px 0 44px; box-shadow: inset 0 2px 0 rgba(217, 201, 238, 0.08); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-text { font-size: 14.5px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Motion ---------- */

@keyframes pop-in { from { opacity: 0; transform: scale(0.86) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes burst {
    0% { opacity: 0; transform: rotate(-7deg) scale(0.2); }
    18% { opacity: 1; transform: rotate(-7deg) scale(1.12); }
    28% { transform: rotate(-7deg) scale(1); }
    82% { opacity: 1; transform: rotate(-7deg) scale(1); }
    100% { opacity: 0; transform: rotate(-7deg) translateY(-14px) scale(0.9); }
}
@keyframes coin-hit { 0% { transform: scale(1); } 35% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes ribbon-swing { 0% { transform: translateX(-50%) rotate(-9deg); } 55% { transform: translateX(-50%) rotate(4deg); } 100% { transform: translateX(-50%) rotate(0); } }
@keyframes hourglass { 0%, 40% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes block { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes lid-open { from { transform: rotate(0); } to { transform: rotate(-28deg); } }
@keyframes star-out {
    0% { opacity: 0; transform: translate(0, 0) scale(0.3) rotate(0); }
    25% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.1) rotate(90deg); }
}

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

/* ---------- Smaller screens ---------- */

@media (max-width: 1060px) {
    .duo { grid-template-columns: 1fr; }
    .film { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
    .film-frame:nth-child(even) { margin-top: 48px; }
}

@media (max-width: 820px) {
    .hud-link { display: none; }
    .brand-name { font-size: 19px; }

    .toy-switch {
        display: flex; justify-content: center; gap: 6px; width: fit-content; margin: 0 auto 22px; padding: 5px;
        border-radius: 18px; background: rgba(36, 22, 63, 0.6);
    }
    .toy-tab {
        min-height: 44px; padding: 8px 18px; border: 0; border-radius: 14px;
        background: transparent; color: var(--on-dark); font-family: var(--display); font-size: 16px; cursor: pointer;
    }
    .toy-tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--soft-lip); }
    .toy-stage { grid-template-columns: 1fr; gap: 0; }
    .toy-controls { order: 3; padding-top: 26px; width: 100%; max-width: 360px; }
    .toy-steps { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .toy-stage[data-showing="parent"] .phone-child, .toy-stage[data-showing="child"] .phone-parent { display: none; }
    .phone-label { display: none; }
    .phone-shell { width: min(300px, 82vw); }

    .hero-join { grid-template-columns: 1fr; }
    .sets { grid-template-columns: 1fr; }
    .set:nth-child(2) { margin-top: 0; }
    .quick-join { display: none; }
    .privacy-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .film {
        display: flex; overflow-x: auto; gap: 16px; padding: 4px var(--gutter) 28px;
        scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
        scrollbar-width: thin;
    }
    .film-frame { flex: 0 0 74%; scroll-snap-align: start; }
    .film-frame:nth-child(even) { margin-top: 0; }
    .duo-side { grid-template-columns: 1fr; }
    .duo-side .shot { width: min(240px, 70vw); justify-self: center; }
    .join-row { grid-template-columns: 1fr; }
    .join-row .join-submit { grid-column: 1; grid-row: 4; width: 100%; margin-top: 12px; }
    .hud .btn-small { padding: 8px 12px; font-size: 15px; }
}

@media (max-width: 380px) {
    .brand-name { display: none; }
}
