/* Mission Control — retro space-agency toy console.
   Deep midnight launch pad, chunky pressable modules, mission-patch badges.
   Themes: body.theme-hen (orange) / body.theme-liz (green) / body.theme-space. */

@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-latin-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-latin-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/fonts/poppins-latin-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
    --space: #0c1030;
    --space-2: #161c48;
    --panel: #1d2456;
    --panel-edge: #2c357c;
    --ink: #f4f5ff;
    --ink-soft: #a9aed6;
    --hen: #ff8c1a;  --hen-deep: #c85e00;
    --liz: #3fce5e;  --liz-deep: #1e9a3a;
    --star: #ffd23f;
    --danger: #ff5c8a;
}
/* ── Day Ops (the DEFAULT): kids' UX research says 60% light neutral,
   30% bright hue, 10% accent — a dark canvas reads unwelcoming to kids.
   Midnight survives as Night Ops behind the sun/moon toggle. ── */
body.day {
    --space: #fdf4e0;
    --space-2: #f6e9cd;
    --panel: #fffaf0;
    --panel-edge: #e6d3ac;
    --ink: #33291f;
    --ink-soft: #7a6b56;
    --star: #b07207;
    --danger: #d6336c;
}
body.theme-space { --accent: #4da3ff; --accent-deep: #1f6fd0; }
body.theme-hen   { --accent: var(--hen); --accent-deep: var(--hen-deep); }
body.theme-liz   { --accent: var(--liz); --accent-deep: var(--liz-deep); }
body.theme-gst   { --accent: #ff6fae; --accent-deep: #d13d7f; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; }
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--space);
    color: var(--ink);
    min-height: 100%;
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    overflow-x: hidden;
}

/* Starfield: three layers of cheap radial-gradient dots. */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 34% 68%, #ffffffaa 50%, transparent 51%),
        radial-gradient(2px 2px at 58% 12%, #ffd23f88 50%, transparent 51%),
        radial-gradient(1px 1px at 71% 44%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 86% 78%, #ffffffcc 50%, transparent 51%),
        radial-gradient(1px 1px at 22% 88%, #fff9 50%, transparent 51%),
        radial-gradient(2px 2px at 92% 28%, #4da3ff88 50%, transparent 51%),
        radial-gradient(1px 1px at 45% 38%, #fff8 50%, transparent 51%),
        linear-gradient(180deg, var(--space) 0%, var(--space-2) 100%);
    background-size: 480px 480px, 480px 480px, 480px 480px, 480px 480px,
        480px 480px, 480px 480px, 480px 480px, 480px 480px, 100% 100%;
}

/* Day sky: warm morning light, a sun in the corner, sparse confetti dots. */
body.day::before {
    background:
        radial-gradient(circle at 84% 10%, #ffd23f 0 30px, rgba(255, 210, 63, 0.35) 55px, transparent 105px),
        radial-gradient(1.5px 1.5px at 12% 22%, rgba(240, 162, 50, 0.6) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 34% 68%, rgba(103, 201, 108, 0.45) 50%, transparent 51%),
        radial-gradient(2px 2px at 58% 30%, rgba(77, 163, 255, 0.4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 86% 78%, rgba(226, 84, 58, 0.35) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 22% 88%, rgba(181, 101, 242, 0.35) 50%, transparent 51%),
        linear-gradient(180deg, #fdf4e0 0%, #ffe9c4 100%);
    background-size: 100% 100%, 480px 480px, 480px 480px, 480px 480px, 480px 480px, 480px 480px, 100% 100%;
}
body.day .pick-hen {
    background: linear-gradient(160deg, #fff3e2, #ffe0b8);
    box-shadow: 0 0 30px rgba(255, 140, 26, 0.18), inset 0 0 50px rgba(255, 140, 26, 0.06);
}
body.day .pick-liz {
    background: linear-gradient(160deg, #eefbe9, #d6f2d0);
    box-shadow: 0 0 30px rgba(63, 206, 94, 0.18), inset 0 0 50px rgba(63, 206, 94, 0.06);
}
body.day .top-kid { text-shadow: none; }
/* Day wordmark: navy letters carry on cream (the cream fill vanishes). */
body.day .wordmark-line2 {
    color: #131a40;
    -webkit-text-stroke: 0;
    text-shadow:
        3px 3px 0 #f0a232,
        6px 6px 0 #d17c1e,
        9px 9px 16px rgba(122, 90, 30, 0.35);
}
body.day .wordmark-line1 { color: #b07207; text-shadow: 0 2px 0 #e8c98f; }
body.day .wordmark-orbit { opacity: 0.4; }
body.day .card, body.day .trail-node, body.day .quest, body.day .flight-step,
body.day .ladder-step, body.day .patch, body.day .arc-era, body.day .launchpad-link {
    box-shadow: 0 3px 0 rgba(122, 107, 86, 0.12);
}

body.flash::after {
    content: '';
    position: fixed; inset: 0; z-index: 50; pointer-events: none;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.35;
}

#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }

main {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1rem 1rem 7rem;
    outline: none;
}

.noscript { padding: 3rem 1rem; text-align: center; font-size: 1.2rem; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
#topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.6rem 0.9rem;
    padding-top: max(0.6rem, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--space) 82%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--panel-edge);
}
.top-home {
    font-size: 1.5rem; line-height: 1;
    min-width: 52px; min-height: 52px;
    background: var(--panel); color: var(--ink);
    border: 2px solid var(--panel-edge); border-radius: 14px;
    cursor: pointer;
}
.top-home:active { transform: translateY(2px); }
.top-kid { font-weight: 600; font-size: 1.05rem; white-space: nowrap; }

.xpbar { flex: 1; min-width: 0; }
.xpbar-rank { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.xpbar-track {
    height: 14px; border-radius: 7px;
    background: var(--panel);
    border: 2px solid var(--panel-edge);
    overflow: hidden;
}
.xpbar-fill {
    height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent));
    box-shadow: 0 0 8px var(--accent);
    transition: width 0.6s cubic-bezier(0.22, 1.4, 0.36, 1);
}
.xpbar-xp { font-size: 0.7rem; color: var(--ink-soft); text-align: right; }

/* ── Home / profile picker ───────────────────────────────────────────── */
/* Film grain over everything — kills the flat "AI gradient" look.
   (html::after, because body.flash::after is the celebration wash.) */
html::after {
    content: '';
    position: fixed; inset: 0; z-index: 200;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.home { text-align: center; padding-top: 4vh; }

/* ── Wordmark: chunky, tilted, extruded — drawn, not typed ───────────── */
.wordmark {
    position: relative;
    display: inline-block;
    margin: 0.8rem 0 0.4rem;
    transform: rotate(-2.5deg);
}
.wordmark-orbit {
    position: absolute;
    width: 110px; height: 110px;
    top: 58%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.28;
    z-index: 0;
}
.wordmark-text { position: relative; z-index: 1; display: grid; line-height: 0.95; }
.wordmark-line1 {
    font-size: clamp(1rem, 3.4vw, 1.3rem);
    font-weight: 600;
    letter-spacing: 0.52em;
    color: var(--star);
    text-shadow: 0 2px 0 #6b4a00;
    margin-left: 0.3em;
}
.wordmark-line2 {
    font-size: clamp(2.6rem, 10vw, 4rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fdf6e6;
    -webkit-text-stroke: 2px #0c1030;
    text-shadow:
        3px 3px 0 #f0a232,
        6px 6px 0 #b35c12,
        9px 9px 18px rgba(0,0,0,0.55);
}
.home-kicker {
    display: inline-block;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em;
    color: var(--star);
    border: 2px dashed color-mix(in srgb, var(--star) 45%, transparent);
    border-radius: 2rem; padding: 0.35rem 1.1rem;
}
.home-sub { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 2rem; }

.picker { display: grid; gap: 1.2rem; }
@media (min-width: 600px) { .picker { grid-template-columns: 1fr 1fr; } }

.pick {
    font-family: inherit; color: var(--ink);
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
    padding: 2.2rem 1rem 1.8rem;
    min-height: 38vh;
    justify-content: center;
    border-radius: 28px;
    cursor: pointer;
    transition: transform 0.15s;
}
.pick:active { transform: scale(0.97) translateY(4px); }
.pick-hen {
    background: linear-gradient(160deg, #3a2408, #1f1503);
    border: 3px solid var(--hen);
    border-bottom-width: 8px;
    box-shadow: 0 0 40px #ff8c1a33, inset 0 0 60px #ff8c1a14;
}
.pick-liz {
    background: linear-gradient(160deg, #0e2e14, #071b0a);
    border: 3px solid var(--liz);
    border-bottom-width: 8px;
    box-shadow: 0 0 40px #3fce5e33, inset 0 0 60px #3fce5e14;
}
.picker-guest { grid-template-columns: 1fr !important; max-width: 24rem; margin: 0 auto; }
.pick-gst {
    background: linear-gradient(160deg, #33101f, #1d0812);
    border: 3px solid #ff6fae;
    border-bottom-width: 8px;
    box-shadow: 0 0 40px #ff6fae33, inset 0 0 60px #ff6fae14;
}
body.day .pick-gst {
    background: linear-gradient(160deg, #ffeef5, #ffd9e8);
    box-shadow: 0 0 30px rgba(255, 111, 174, 0.18), inset 0 0 50px rgba(255, 111, 174, 0.06);
}
.mascot { display: block; }
.pick-mascot {
    width: clamp(96px, 26vw, 140px); height: auto;
    filter: drop-shadow(0 6px 0 rgba(0,0,0,0.35));
}
.pick:active .pick-mascot { transform: rotate(-4deg); }
.pick-name { font-size: 1.5rem; font-weight: 600; }
.pick-hen .pick-name { color: var(--hen); }
.pick-liz .pick-name { color: var(--liz); }
.pick-rank { font-size: 0.95rem; color: var(--ink-soft); }
.crew-line {
    margin-top: 1.4rem;
    font-size: 0.95rem; font-weight: 500;
    color: var(--ink-soft);
}

/* Launch Pad: links out to the crew's real tools */
.launchpad { margin-top: 2rem; }
.launchpad-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; color: var(--ink-soft); margin-bottom: 0.7rem; }
.launchpad-links { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.launchpad-link {
    display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
    text-decoration: none; color: var(--ink);
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-bottom-width: 6px;
    border-radius: 16px;
    padding: 0.8rem 0.6rem;
    min-height: 64px;
}
.launchpad-link:active { transform: translateY(2px); border-bottom-width: 4px; }
.launchpad-emoji { font-size: 1.6rem; }
.launchpad-label { font-weight: 600; font-size: 0.95rem; }
.launchpad-what { font-size: 0.72rem; color: var(--ink-soft); text-align: center; }

/* Blocks guide on mission cards */
.blocks-guide {
    text-align: left;
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    border-radius: 14px;
    padding: 0.7rem 0.9rem;
    margin: 0.6rem 0;
}
.blocks-guide-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 0.4rem; }
.block-row { display: grid; gap: 0.05rem; margin-bottom: 0.45rem; }
.block-name { font-weight: 600; font-size: 0.88rem; color: var(--accent); }
.block-what { font-size: 0.82rem; color: var(--ink-soft); }

/* ── Mission trail ───────────────────────────────────────────────────── */
.trail-wrap { padding: 1rem 0; }
.trail { list-style: none; position: relative; max-width: 22rem; margin: 0 auto; }
.trail::before {
    content: '';
    position: absolute; top: 40px; bottom: 40px; left: 50%;
    border-left: 4px dashed var(--panel-edge);
    transform: translateX(-2px);
}
.trail-stop {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    width: 50%;
    margin-bottom: 1.6rem;
}
.trail-right { margin-left: 50%; }
.trail-node {
    position: relative;
    width: 92px; height: 92px;
    border-radius: 50%;
    font-family: inherit;
    background: var(--panel);
    border: 4px solid var(--panel-edge);
    border-bottom-width: 8px;
    cursor: pointer;
    transition: transform 0.15s;
}
.trail-node:active { transform: translateY(3px); }
.trail-emoji { font-size: 2.4rem; line-height: 1; }
.trail-done .trail-node {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 22%, var(--panel));
    box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
}
.trail-open .trail-node { border-color: var(--accent); }
.trail-locked .trail-node { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.6); }
.trail-check {
    position: absolute; right: -6px; top: -6px;
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}
.trail-pulse {
    position: absolute; inset: -10px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    animation: pulse 1.6s ease-out infinite;
    pointer-events: none;
}
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1.25); opacity: 0; }
}
.trail-label {
    margin-top: 0.5rem;
    font-size: 0.85rem; font-weight: 600; text-align: center;
    color: var(--ink-soft);
    max-width: 10rem;
}
.trail-done .trail-label, .trail-open .trail-label { color: var(--ink); }

/* ── Cards & buttons ─────────────────────────────────────────────────── */
.card {
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: 22px;
    padding: 1.4rem;
    margin: 1rem auto;
    max-width: 26rem;
}
.mission-emoji {
    font-size: 2.6rem; line-height: 1;
    display: grid; place-items: center;
    width: 84px; height: 84px;
    margin: 0 auto;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 16%, var(--space-2));
    border: 3px solid var(--accent);
    outline: 2px dashed color-mix(in srgb, var(--accent) 65%, transparent);
    outline-offset: -9px;
}
.mission-title { font-size: 1.35rem; font-weight: 600; margin: 0.5rem 0 0.3rem; }
.mission-line { font-size: 1.12rem; line-height: 1.6; margin-bottom: 0.6rem; }
.mission-goal { font-size: 0.95rem; color: var(--ink-soft); margin: 0.5rem 0; text-align: left; }
.learn-fold {
    text-align: left;
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    border-radius: 14px;
    padding: 0.3rem 0.9rem;
    margin: 0.6rem 0;
}
.learn-fold-title {
    cursor: pointer;
    font-weight: 600; font-size: 0.95rem;
    min-height: 48px;
    display: flex; align-items: center;
    color: var(--ink-soft);
}
.learn-fold[open] .learn-fold-title { color: var(--ink); }
.learn-fold .blocks-guide { border: none; background: none; padding: 0.2rem 0 0.6rem; margin: 0; }
.mission-done-note { font-weight: 600; color: var(--accent); font-size: 1.05rem; }
.mission-locked-note { font-weight: 600; color: var(--ink-soft); font-size: 1.05rem; }

.big-btn, .ghost-btn, .danger-btn {
    font-family: inherit; font-weight: 600; font-size: 1.05rem;
    color: var(--ink);
    border-radius: 18px;
    min-height: 64px;
    padding: 0.8rem 1.4rem;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
}
.big-btn {
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
    border: none;
    border-bottom: 6px solid color-mix(in srgb, var(--accent-deep) 60%, #000);
    color: #101020;
    font-size: 1.15rem;
    text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}
.big-btn:active { transform: translateY(3px); border-bottom-width: 3px; }
.ghost-btn {
    background: transparent;
    border: 3px dashed var(--panel-edge);
}
.ghost-btn:active { background: var(--panel-edge); }
.danger-btn {
    background: transparent;
    border: 3px solid var(--danger);
    color: var(--danger);
}

/* Hold-to-confirm fill */
.hold-btn { position: relative; overflow: hidden; touch-action: none; }
.hold-fill {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.35);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}
.hold-btn.holding .hold-fill {
    transform: scaleX(1);
    transition: transform var(--hold-ms, 1200ms) linear;
}
.hold-label { position: relative; }

/* ── Trophy Room ─────────────────────────────────────────────────────── */
.trophy-head { text-align: center; margin: 1rem 0; }
.view-title { font-size: 1.6rem; font-weight: 600; }
.view-sub { color: var(--ink-soft); }
.patch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.9rem;
}
.patch {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 0.35rem;
    padding: 1rem 0.5rem 0.8rem;
    border-radius: 18px;
    background: var(--panel);
    border: 3px solid var(--panel-edge);
}
.patch-earned {
    border-color: var(--star);
    background:
        radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--star) 22%, transparent), transparent 65%),
        var(--panel);
    box-shadow: 0 0 18px color-mix(in srgb, var(--star) 30%, transparent);
}
.patch-locked { opacity: 0.55; }
.patch-locked .patch-emoji { filter: grayscale(1) brightness(0.7); }
/* Embroidered-patch medallion: solid ring + dashed stitch ring around the mark. */
.patch-emoji {
    font-size: 2rem; line-height: 1;
    display: grid; place-items: center;
    width: 66px; height: 66px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--star) 14%, var(--space-2));
    border: 3px solid var(--star);
    outline: 2px dashed color-mix(in srgb, var(--star) 70%, transparent);
    outline-offset: -8px;
}
.patch-locked .patch-emoji {
    background: var(--space-2);
    border-color: var(--panel-edge);
    outline-color: color-mix(in srgb, var(--panel-edge) 80%, transparent);
}
.patch-name { font-weight: 600; font-size: 0.85rem; }
.patch-how { font-size: 0.72rem; color: var(--ink-soft); }

/* Badge celebration overlay */
.patch-overlay {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center;
    background: rgba(6, 8, 24, 0.85);
    cursor: pointer;
}
.patch-card {
    text-align: center;
    background: var(--panel);
    border: 4px solid var(--star);
    border-radius: 28px;
    padding: 2rem 2.5rem;
    max-width: 20rem;
    box-shadow: 0 0 60px color-mix(in srgb, var(--star) 40%, transparent);
    animation: pop 0.45s cubic-bezier(0.22, 1.6, 0.36, 1);
}
@keyframes pop {
    0% { transform: scale(0.4) rotate(-6deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
.patch-card-kicker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; color: var(--star); }
.patch-card-emoji { font-size: 4.5rem; margin: 0.4rem 0; }
.patch-card-name { font-size: 1.5rem; font-weight: 600; }
.patch-card-how { color: var(--ink-soft); margin: 0.3rem 0 0.6rem; }
.patch-card-xp { font-weight: 600; color: var(--star); font-size: 1.2rem; }
.patch-card-tap { font-size: 0.75rem; color: var(--ink-soft); margin-top: 1rem; }

/* ── Tab bar & footer ────────────────────────────────────────────────── */
#tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    display: flex; justify-content: center; gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--space) 88%, transparent);
    backdrop-filter: blur(8px);
    border-top: 2px solid var(--panel-edge);
}
.tab {
    font-family: inherit; color: var(--ink-soft);
    display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
    min-width: 58px; min-height: 60px;
    flex: 0 1 84px;
    background: var(--space-2);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
}
.tab-on {
    background: color-mix(in srgb, var(--accent) 20%, var(--space-2));
    color: var(--ink);
    border-color: var(--accent);
    border-bottom-width: 4px;
}
.tab-emoji { font-size: 1.5rem; }
.tab-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; }

#foot {
    position: fixed; left: 0.7rem; z-index: 31;
    bottom: max(5.4rem, calc(env(safe-area-inset-bottom) + 5.4rem));
    display: flex; flex-direction: column; gap: 0.5rem;
}
body.theme-space #foot { bottom: 0.9rem; flex-direction: row; }
.gear-btn, .mute-btn {
    font-family: inherit; font-size: 1.1rem;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--space-2); color: var(--ink);
    border: 2px solid var(--panel-edge);
    cursor: pointer;
    opacity: 0.75;
}
.gear-btn .hold-fill { background: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ── Parent panel ────────────────────────────────────────────────────── */
.pp-section { max-width: 34rem; user-select: text; }
.pp-section h4 { margin: 0.9rem 0 0.4rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.pp-kid { font-size: 1.2rem; }
.pp-toggles { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pp-toggle {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.85rem;
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    border-radius: 10px;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
}
.pp-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.pp-xp { display: flex; align-items: center; gap: 0.7rem; }
.pp-xp-num { font-weight: 600; }
.pp-step {
    font-family: inherit; font-weight: 600;
    min-width: 56px; min-height: 44px;
    background: var(--space-2); color: var(--ink);
    border: 2px solid var(--panel-edge); border-radius: 12px;
    cursor: pointer;
}
.pp-row { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.7rem 0; }
.pp-code {
    font-family: ui-monospace, monospace; font-size: 0.75rem;
    background: var(--space); color: var(--ink);
    border: 2px solid var(--panel-edge); border-radius: 10px;
    padding: 0.5rem;
    width: 100%;
    resize: vertical;
}
.pp-msg { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.5rem; }
.pp-warn { font-weight: 600; color: var(--star); }
.pp-ship { flex-direction: row; align-items: center; justify-content: space-between; gap: 0.6rem; }
.pp-ship span:first-child { font-size: 0.85rem; }

/* ── Watch Simulator ─────────────────────────────────────────────────── */
.sim-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-top: 0.5rem; }
.sim-back { width: auto; min-height: 48px; margin: 0; }
.sim-say {
    min-height: 3.2em;
    max-width: 24rem;
    text-align: center;
    font-size: 1.1rem; font-weight: 500;
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: 18px;
    padding: 0.7rem 1.1rem;
}
.watch {
    position: relative;
    width: 190px; height: 300px;
    border-radius: 34px;
    display: grid; place-items: center;
    background: linear-gradient(160deg, var(--accent), var(--accent-deep));
    border-bottom: 10px solid color-mix(in srgb, var(--accent-deep) 55%, #000);
    box-shadow: 0 14px 40px rgba(0,0,0,0.55), inset 0 2px 0 rgba(255,255,255,0.35);
}
.watch-strap {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 84px; height: 34px;
    background: color-mix(in srgb, var(--accent-deep) 55%, #000);
    z-index: -1;
}
.watch-strap-top { top: -30px; border-radius: 12px 12px 0 0; }
.watch-strap-bot { bottom: -34px; border-radius: 0 0 12px 12px; }
.watch-screen {
    width: 128px; height: 212px;
    border-radius: 12px;
    background: #000;
    border: 5px solid #11131a;
    overflow: hidden;
    display: grid;
    cursor: pointer;
    transform: translateY(-8px);
}
.watch-btn {
    position: absolute;
    font-family: inherit; font-weight: 600; font-size: 0.8rem;
    color: rgba(0,0,0,0.65);
    background: linear-gradient(180deg, #f2f3f7, #c9ccd6);
    border: none; border-bottom: 4px solid #8f93a3;
    cursor: pointer;
}
.watch-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.watch-btn-a {
    bottom: 8px; left: 50%; transform: translateX(-50%);
    width: 64px; height: 26px;
    border-radius: 13px;
}
.watch-btn-a:active { transform: translateX(-50%) translateY(2px); }
/* Real M5StickS3: Button B centered on the right side… */
.watch-btn-b {
    right: -14px; top: 50%;
    transform: translateY(-50%);
    width: 14px; height: 48px;
    border-radius: 0 8px 8px 0;
    border-bottom-width: 0; border-right: 4px solid #8f93a3;
}
.watch-btn-b:active { transform: translateY(-50%) translateX(2px); }
/* …and the power button low on the LEFT side. */
.watch-btn-pwr {
    left: -14px; bottom: 46px;
    width: 14px; height: 38px;
    font-size: 0.6rem;
    border-radius: 8px 0 0 8px;
    border-bottom-width: 0; border-left: 4px solid #8f93a3;
}
.watch-btn-pwr:active { transform: translateX(-2px); }
.watch-asleep > * { visibility: hidden; }
.watch-asleep {
    background: #000 !important;
}
.watch-asleep::after {
    content: '😴';
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-size: 1.4rem; opacity: 0.5;
    visibility: visible;
}
.watch-wrong { animation: wrongshake 0.4s; }
@keyframes wrongshake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px) rotate(-2deg); }
    75% { transform: translateX(8px) rotate(2deg); }
}
.watch-shaking { animation: wrongshake 0.2s; }

.ws-text {
    display: grid; place-items: center;
    text-align: center;
    font-size: 1.05rem; font-weight: 600;
    color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    padding: 0.4rem;
    word-break: break-word;
}
.ws-msg { display: grid; place-content: center; gap: 0.4rem; text-align: center; padding: 0.5rem; background: #04240f; }
.ws-msg-from { font-size: 0.6rem; letter-spacing: 0.12em; color: #3fce5e; text-transform: uppercase; }
.ws-msg-text { font-size: 0.95rem; font-weight: 600; color: #d8ffe3; }
.ws-counter { display: grid; place-content: center; text-align: center; gap: 0.2rem; background: #0b1d3d; }
.ws-count { font-size: 3.2rem; font-weight: 600; color: #ffd23f; line-height: 1; }
.ws-label { font-size: 0.65rem; letter-spacing: 0.14em; color: #9db5e0; }
.ws-dice { display: grid; place-items: center; font-size: 4.5rem; color: #fff; background: #33131a; animation: pop 0.4s; }
.ws-chart { display: flex; align-items: flex-end; justify-content: center; gap: 5px; padding: 1rem 0.6rem; background: #0b1d3d; }
.ws-bar { width: 11px; background: linear-gradient(180deg, #ffd23f, #f77f00); border-radius: 3px 3px 0 0; }
.ws-song { display: flex; align-items: center; justify-content: center; gap: 4px; background: #1c0b3d; }
.ws-note { font-size: 1.4rem; opacity: 0.25; animation: notepop 2s infinite; }
@keyframes notepop {
    0%, 100% { opacity: 0.25; transform: translateY(0); }
    15% { opacity: 1; transform: translateY(-8px); }
}
.ws-pixels {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 14px 8px;
    align-self: center;
}
.ws-px { aspect-ratio: 1; border-radius: 2px; background: #14161f; }

.sim-extras { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; min-height: 52px; width: 100%; max-width: 22rem; }
.sim-swatch {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 4px solid #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.sim-swatch:active { transform: scale(0.9); }
.sim-dots { display: flex; gap: 0.5rem; }
.sim-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--panel);
    border: 2px solid var(--panel-edge);
}
.sim-dot-done { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ── Side quests ─────────────────────────────────────────────────────── */
.chips { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.chip {
    font-family: inherit; font-weight: 600; font-size: 0.95rem;
    color: var(--ink-soft);
    background: var(--panel);
    border: 2px solid var(--panel-edge);
    border-radius: 2rem;
    min-height: 48px; min-width: 64px;
    padding: 0 1rem;
    cursor: pointer;
}
.chip-on { color: var(--ink); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.quest-list { display: grid; gap: 0.7rem; }
.quest {
    display: flex; align-items: center; gap: 0.8rem;
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: 18px;
    padding: 0.9rem 1rem;
}
.quest-done { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.quest-emoji { font-size: 1.9rem; }
.quest-body { flex: 1; min-width: 0; }
.quest-title { font-weight: 600; }
.quest-stars { font-size: 0.75rem; color: var(--star); white-space: nowrap; }
.quest-stars-parent { color: var(--danger); }
.quest-desc { font-size: 0.85rem; color: var(--ink-soft); }
.quest-check {
    font-family: inherit; font-weight: 600; font-size: 0.9rem;
    min-width: 64px; min-height: 56px;
    color: var(--ink);
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    border-radius: 14px;
    cursor: pointer;
}
.quest-check-on { font-size: 1.4rem; border-color: var(--accent); }

/* ── Ship-It Friday ──────────────────────────────────────────────────── */
.ship-form { display: grid; gap: 0.8rem; }
.ship-input {
    font-family: inherit; font-size: 1rem;
    color: var(--ink);
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    width: 100%;
}
.ship-input::placeholder { color: var(--ink-soft); }
.ship-emojis { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.ship-emoji {
    font-size: 1.3rem;
    width: 50px; height: 50px;
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    border-radius: 12px;
    cursor: pointer;
}
.ship-emoji-on { border-color: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.ship-log { display: grid; gap: 0.7rem; max-width: 26rem; margin: 1rem auto; }
.ship-entry {
    display: flex; align-items: center; gap: 0.8rem;
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-left-width: 8px;
    border-radius: 16px;
    padding: 0.8rem 1rem;
}
.ship-hen { border-left-color: var(--hen); }
.ship-liz { border-left-color: var(--liz); }
.ship-entry-emoji { font-size: 1.7rem; }
.ship-entry-text { font-weight: 500; }
.ship-entry-meta { font-size: 0.75rem; color: var(--ink-soft); }

/* ── Egg-O-Meter ─────────────────────────────────────────────────────── */
.egg-wrap { display: flex; flex-direction: column; align-items: center; }
.egg-btn {
    font-size: 7rem; line-height: 1;
    width: 190px; height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff8ec, #f5dfb8 70%);
    border: none;
    border-bottom: 10px solid #c9a86a;
    cursor: pointer;
    box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}
.egg-btn:active { transform: translateY(4px) scale(0.98); border-bottom-width: 5px; }
.egg-btn-readonly { display: grid; place-items: center; opacity: 0.55; filter: grayscale(0.4); cursor: default; }
.pick-visit-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.3rem; }
.pick.hold-btn { display: flex; }
.pick.hold-btn .hold-label { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.egg-today { display: flex; align-items: baseline; gap: 0.5rem; margin: 1rem 0; }
.egg-today-n { font-size: 3.4rem; font-weight: 600; color: var(--accent); line-height: 1; }
.egg-today-label { font-size: 1.1rem; color: var(--ink-soft); }
.egg-chart-card { width: 100%; max-width: 26rem; }
.egg-h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 0.6rem; }
.egg-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.4rem; height: 130px; }
.egg-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.2rem; height: 100%; }
.egg-col-n { font-size: 0.8rem; font-weight: 600; color: var(--star); }
.egg-bar {
    width: 100%; max-width: 34px;
    min-height: 3px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.egg-col-label { font-size: 0.68rem; color: var(--ink-soft); }
.egg-stats { display: flex; gap: 1rem; width: 100%; max-width: 26rem; }
.egg-stat { flex: 1; text-align: center; display: grid; gap: 0.2rem; margin: 0; }
.egg-stat-n { font-size: 2rem; font-weight: 600; color: var(--star); }
.egg-stat-label { font-size: 0.8rem; color: var(--ink-soft); }

/* ── Color Collection ────────────────────────────────────────────────── */
.colors-wrap { display: flex; flex-direction: column; }
.color-form { width: 100%; max-width: 26rem; margin: 0 auto 1rem; display: grid; gap: 0.8rem; }
.color-form-row { display: flex; gap: 0.7rem; align-items: center; }
.color-pick {
    width: 72px; height: 60px;
    border: 3px solid var(--panel-edge);
    border-radius: 14px;
    background: var(--space-2);
    padding: 4px;
    cursor: pointer;
}
.color-name { flex: 1; }
.color-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.8rem;
}
.color-card {
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 0.6rem;
    animation: pop 0.35s;
}
.color-swatch { height: 74px; margin-bottom: 0.4rem; }
.color-card-name { font-weight: 600; font-size: 0.9rem; padding: 0 0.4rem; }
.color-card-hex { font-size: 0.7rem; color: var(--ink-soft); font-family: ui-monospace, monospace; }

/* ── Brain Check quiz ────────────────────────────────────────────────── */
.quiz-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-top: 0.5rem; }
.quiz-head { text-align: center; display: grid; gap: 0.5rem; justify-items: center; }
.quiz-kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; color: var(--star); }
.quiz-progress { display: flex; gap: 0.5rem; }
.quiz-q {
    font-size: 1.35rem; font-weight: 600; text-align: center;
    max-width: 26rem; line-height: 1.4;
}
.quiz-answers { display: grid; gap: 0.8rem; width: 100%; max-width: 24rem; }
.quiz-answer {
    font-family: inherit; font-weight: 600; font-size: 1.05rem;
    color: var(--ink);
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-bottom-width: 6px;
    border-radius: 18px;
    min-height: 68px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
}
.quiz-answer:active { transform: translateY(2px); border-bottom-width: 4px; }
.quiz-right {
    border-color: var(--liz);
    background: color-mix(in srgb, var(--liz) 20%, var(--panel));
    box-shadow: 0 0 16px color-mix(in srgb, var(--liz) 45%, transparent);
}
.quiz-wrong {
    border-color: var(--danger);
    background: color-mix(in srgb, var(--danger) 16%, var(--panel));
    animation: wrongshake 0.4s;
}
.quiz-result { text-align: center; display: grid; gap: 0.5rem; max-width: 22rem; }
.quiz-result-emoji { font-size: 4rem; }

/* ── Flight Plan ─────────────────────────────────────────────────────── */
.flight-roles {
    max-width: 26rem;
    margin: 0 auto 1rem;
    text-align: center;
    font-size: 0.85rem; font-weight: 500;
    color: var(--ink-soft);
    border: 2px dashed var(--panel-edge);
    border-radius: 14px;
    padding: 0.6rem 1rem;
}
.flight-list { list-style: none; display: grid; gap: 0.6rem; max-width: 28rem; margin: 0 auto; }
.flight-step {
    font-family: inherit; text-align: left;
    display: flex; align-items: center; gap: 0.8rem;
    width: 100%;
    color: var(--ink);
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: 16px;
    padding: 0.7rem 0.9rem;
    min-height: 60px;
    cursor: pointer;
}
.flight-step-done {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}
.flight-step-done .flight-text { opacity: 0.65; text-decoration: line-through; }
.flight-step-adult { border-style: dashed; }
.flight-check {
    flex: none;
    display: grid; place-items: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-weight: 600;
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
}
.flight-step-done .flight-check { border: none; font-size: 1.3rem; background: transparent; }
.flight-text { font-size: 1.05rem; font-weight: 500; line-height: 1.45; }

/* ── Mission screen + ladder ─────────────────────────────────────────── */
.season-chip {
    display: block;
    margin: 0.2rem auto 0.8rem;
    font-family: inherit; font-weight: 600; font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--ink);
    background: var(--panel);
    border: 2px solid var(--panel-edge);
    border-radius: 2rem;
    padding: 0.4rem 1.1rem;
    cursor: pointer;
}
.mission-screen {
    max-width: 30rem;
    text-align: center;
    border-color: var(--accent);
}
.ladder { display: grid; gap: 0.6rem; margin: 1rem 0 0.4rem; text-align: left; }
.ladder-step {
    font-family: inherit;
    display: flex; align-items: center; gap: 0.8rem;
    width: 100%;
    color: var(--ink);
    background: var(--space-2);
    border: 3px solid var(--panel-edge);
    border-radius: 16px;
    padding: 0.7rem 0.9rem;
    min-height: 62px;
    cursor: pointer;
    text-align: left;
}
.ladder-done { opacity: 0.72; }
.ladder-cta {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, var(--space-2));
    box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 40%, transparent);
}
.ladder-cta-glow { box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 55%, transparent); }
.ladder-num {
    flex: none;
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-weight: 600;
    background: var(--panel);
    border: 2px solid var(--panel-edge);
}
.ladder-done .ladder-num { border: none; font-size: 1.2rem; background: transparent; }
.ladder-body { display: grid; gap: 0.05rem; }
.ladder-label { font-weight: 600; font-size: 1rem; }
.ladder-hint { font-size: 0.8rem; color: var(--ink-soft); }
.workshop-section { margin-bottom: 2.2rem; }

/* ── Crew missions + follow-along ────────────────────────────────────── */
.crew-banner {
    max-width: 28rem;
    margin: 0 auto 0.8rem;
    text-align: center;
    font-size: 0.85rem; font-weight: 600;
    color: var(--ink);
    background: color-mix(in srgb, var(--accent) 14%, var(--panel));
    border: 2px solid var(--accent);
    border-radius: 14px;
    padding: 0.6rem 1rem;
}
/* The read-along cursor: the ONE step the crew is on right now. */
.flight-step.flight-current {
    border-color: var(--star);
    background: color-mix(in srgb, var(--star) 12%, var(--panel));
    box-shadow: 0 0 18px color-mix(in srgb, var(--star) 55%, transparent);
    animation: cursor-breathe 1.8s ease-in-out infinite;
}
@keyframes cursor-breathe {
    0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--star) 35%, transparent); }
    50% { box-shadow: 0 0 24px color-mix(in srgb, var(--star) 70%, transparent); }
}

/* ── Mise en Place (gear check) ──────────────────────────────────────── */
.prep-card {
    max-width: 28rem;
    border-color: var(--star);
    display: grid; gap: 0.5rem;
}
.prep-ready { border-color: var(--accent); }
.prep-title { font-weight: 600; font-size: 1rem; letter-spacing: 0.04em; }
.prep-sub { display: block; font-size: 0.75rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.prep-count { font-size: 0.85rem; font-weight: 600; color: var(--star); }
.prep-ready .prep-count { color: var(--accent); }
.flight-gated { opacity: 0.4; pointer-events: none; filter: grayscale(0.5); }
.flight-step:disabled { cursor: not-allowed; }

/* ── The Long Arc ────────────────────────────────────────────────────── */
.arc-link-wrap { text-align: center; max-width: 22rem; margin: 0 auto; }
.arc-line { display: grid; gap: 1rem; max-width: 26rem; margin: 0 auto; position: relative; }
.arc-era {
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: 20px;
    padding: 1.2rem 1.4rem;
    display: grid; gap: 0.3rem;
}
.arc-live {
    border-color: var(--accent);
    box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 30%, transparent);
}
.arc-future { opacity: 0.85; }
.arc-secret { border-style: dashed; }
.arc-when { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; color: var(--star); }
.arc-emoji { font-size: 2.2rem; }
.arc-title { font-size: 1.25rem; font-weight: 600; }
.arc-desc { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; }
.arc-progress { display: grid; gap: 0.2rem; margin-top: 0.4rem; }
.arc-progress-label { font-size: 0.78rem; color: var(--ink-soft); }

/* ── Ambient critters ────────────────────────────────────────────────── */
.critter {
    position: fixed; left: 0; z-index: 40;
    background: none; border: none; padding: 0.4rem;
    cursor: pointer; line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
    animation: critter-cross var(--critter-ms, 8000ms) linear forwards,
               critter-waddle 0.45s ease-in-out infinite alternate;
}
@keyframes critter-cross {
    from { left: -12vw; }
    to   { left: 108vw; }
}
@keyframes critter-waddle {
    from { margin-top: 0;    rotate: -4deg; }
    to   { margin-top: 8px;  rotate: 4deg; }
}
.critter-caught {
    animation: critter-pop 0.5s ease-out forwards;
}
@keyframes critter-pop {
    30% { transform: scale(1.5) rotate(20deg); opacity: 1; }
    100% { transform: scale(0) rotate(180deg); opacity: 0; }
}

/* ── Trail avatar (you are here) ─────────────────────────────────────── */
.trail-avatar {
    position: absolute; top: -44px; left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
    animation: avatar-bob 1.4s ease-in-out infinite;
    pointer-events: none;
}
.trail-avatar .mascot { width: 52px; height: 52px; }
@keyframes avatar-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-7px); }
}

/* ── Simulator hint glow + boot ──────────────────────────────────────── */
.sim-hint {
    animation: hint-glow 1s ease-in-out infinite;
}
@keyframes hint-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); }
    50% { box-shadow: 0 0 22px 6px rgba(255, 210, 63, 0.8); }
}
.watch-screen { animation: screen-boot 0.7s ease-out; }
@keyframes screen-boot {
    0% { filter: brightness(0); transform: translateY(-8px) scaleY(0.05); }
    45% { filter: brightness(2.2); transform: translateY(-8px) scaleY(1.02); }
    100% { filter: brightness(1); transform: translateY(-8px) scaleY(1); }
}

/* ── Rank-unlocked habitat backgrounds (Engineer 🔧 and up) ──────────── */
body.theme-liz.habitat main {
    background-image: radial-gradient(circle at 50% 0, rgba(63, 206, 94, 0.09) 24%, transparent 25%);
    background-size: 44px 26px;
    background-position: 0 0, 22px 13px;
}
body.theme-hen.habitat main {
    background-image: radial-gradient(ellipse 14px 22px at 50% 100%, rgba(255, 140, 26, 0.08) 60%, transparent 61%);
    background-size: 40px 34px;
}

/* ── Word Decoder (tap a hard word) ──────────────────────────────────── */
.decoder-word {
    font: inherit; color: inherit;
    background: none; border: none; padding: 0;
    border-bottom: 2px dotted var(--star);
    cursor: pointer;
    border-radius: 0;
}
.decoder-pop {
    position: fixed; left: 50%; bottom: 7.5rem; z-index: 95;
    transform: translateX(-50%);
    width: min(92vw, 24rem);
    background: var(--space-2);
    border: 3px solid var(--star);
    border-radius: 18px;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: pop 0.3s cubic-bezier(0.22, 1.6, 0.36, 1);
    cursor: pointer;
}
.decoder-pop-word { font-weight: 600; color: var(--star); font-size: 1.05rem; }
.decoder-pop-def { font-size: 0.95rem; line-height: 1.5; }

/* ── Sim mascot coach ────────────────────────────────────────────────── */
.sim-say { display: flex; align-items: center; gap: 0.6rem; text-align: left; }
.sim-mascot { flex: none; display: block; }
.sim-mascot .mascot { width: 54px; height: 54px; }
.sim-mascot-hop { animation: mascot-hop 0.45s ease-out; }
@keyframes mascot-hop {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px) rotate(-6deg); }
}
.sim-mascot-wobble { animation: mascot-wobble 0.5s ease-in-out; }
@keyframes mascot-wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-14deg); }
    75% { transform: rotate(14deg); }
}

/* Guard animal at locked missions */
.guard {
    position: absolute; top: -14px; left: 50%;
    transform: translateX(-50%);
    font-size: 1.9rem; line-height: 1;
    pointer-events: none;
    z-index: -1;
}
.guard-hen { animation: guard-pop 1.8s ease-in-out forwards; }
.guard-liz { animation: guard-rise 1.8s ease-in-out forwards; }
@keyframes guard-pop {
    0% { top: 20px; opacity: 0; }
    20%, 75% { top: -22px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}
@keyframes guard-rise {
    0% { top: 24px; opacity: 0; }
    40%, 70% { top: -8px; opacity: 1; }
    100% { top: 24px; opacity: 0; }
}

/* Strap stickers (earned per completed mission) */
.watch-strap { display: flex; align-items: center; justify-content: center; gap: 2px; }
.strap-sticker { font-size: 0.8rem; line-height: 1; }
.strap-sticker:nth-child(odd) { transform: rotate(-12deg); }
.strap-sticker:nth-child(even) { transform: rotate(9deg); }

/* Daily Spark card */
.spark-card { border-color: var(--star); max-width: 26rem; }
.spark-kicker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; color: var(--star); margin-bottom: 0.5rem; }
.spark-q { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.8rem; }
.spark-answers { display: grid; gap: 0.5rem; }
.spark-answer { min-height: 54px; font-size: 0.95rem; }
.spark-result { font-weight: 600; font-size: 1.05rem; }
.spark-why { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.4rem; }

/* LOGGED reflection stamp */
.logged {
    margin: 0.7rem auto 0.3rem;
    max-width: 24rem;
    font-size: 0.92rem; font-weight: 500;
    text-align: left;
    color: var(--ink);
    background: color-mix(in srgb, var(--star) 10%, var(--panel));
    border: 2px dashed color-mix(in srgb, var(--star) 55%, transparent);
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
}

/* Quiz why-line */
.quiz-why {
    max-width: 24rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.95rem;
    animation: pop 0.3s;
}

/* Toast (easter eggs, records) */
.toast {
    position: fixed; left: 50%; top: 14vh; z-index: 96;
    transform: translateX(-50%);
    max-width: min(92vw, 24rem);
    text-align: center;
    font-weight: 600;
    background: var(--space-2);
    border: 3px solid var(--star);
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: pop 0.35s cubic-bezier(0.22, 1.6, 0.36, 1);
    cursor: pointer;
}

/* Invisible color (rarest ever caught) */
.color-invisible {
    background:
        repeating-conic-gradient(#3a3f66 0% 25%, #232849 0% 50%) 0 0 / 16px 16px;
}

/* Satellite orbit easter egg */
.home-kicker { cursor: pointer; }
.home-sat { display: inline-block; }
.home-sat.orbiting { animation: orbit 2.5s ease-in-out; }
@keyframes orbit {
    0% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(9vw, 7vh) rotate(90deg); }
    50% { transform: translate(0, 14vh) rotate(180deg); }
    75% { transform: translate(-9vw, 7vh) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ── Season Shelf + parent folds ─────────────────────────────────────── */
.shelf {
    max-width: 30rem;
    margin: 0.5rem auto 1.2rem;
    display: grid; gap: 0.6rem;
}
.shelf-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; color: var(--star); text-align: center; }
.plaque {
    display: grid; justify-items: center; gap: 0.15rem;
    text-align: center;
    padding: 1rem;
    border-radius: 18px;
    border: 3px solid var(--star);
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--star) 26%, transparent), transparent 70%),
        var(--panel);
    box-shadow: 0 0 26px color-mix(in srgb, var(--star) 35%, transparent);
}
.plaque-emoji { font-size: 2.4rem; }
.plaque-name { font-weight: 600; font-size: 1.15rem; }
.plaque-sub { font-size: 0.82rem; color: var(--ink-soft); }
.pp-fold-title {
    cursor: pointer;
    font-weight: 600; font-size: 1.05rem;
    min-height: 48px;
    display: flex; align-items: center;
}
.pp-inner { margin-top: 0.5rem; }
.arc-future { cursor: pointer; }

/* ── Predict / Boost / Flight Log / Rescue (learning-depth pass) ─────── */
.predict-card, .flightlog-card, .boost-card {
    text-align: left;
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    margin: 0.7rem 0;
    display: grid; gap: 0.5rem;
}
.predict-card { border-color: color-mix(in srgb, #b565f2 60%, transparent); }
.predict-kicker, .flightlog-kicker, .boost-kicker, .rescue-summary {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
    color: var(--ink-soft);
}
.predict-kicker { color: #c99af5; }
.predict-q { font-weight: 600; font-size: 1rem; }
.predict-line { font-size: 0.95rem; line-height: 1.5; }
.predict-revealed { border-style: dashed; }
.boost-card { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.boost-kicker { color: var(--accent); }
.boost-text { font-size: 0.95rem; }
.flightlog-kicker { color: var(--star); }
.flightlog-line { font-size: 0.95rem; }
.flashback-chip {
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
    color: var(--space);
    background: var(--star);
    border-radius: 2rem;
    padding: 0.3rem 0.9rem;
    animation: pop 0.35s;
}
.rescue-card {
    max-width: 28rem;
    width: 100%;
    margin: 1rem auto 0;
    background: var(--panel);
    border: 2px dashed color-mix(in srgb, var(--danger) 55%, transparent);
    border-radius: 14px;
    padding: 0.7rem 1rem;
}
.rescue-summary { cursor: pointer; color: var(--danger); font-size: 0.85rem; min-height: 44px; display: flex; align-items: center; }
.rescue-tip { font-size: 0.92rem; line-height: 1.5; padding: 0.4rem 0; border-top: 1px solid var(--panel-edge); }
.rescue-motto { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; margin-top: 0.4rem; }

/* ── The Arcade ──────────────────────────────────────────────────────── */
.arcade-entry {
    font-family: inherit;
    display: grid; justify-items: center; gap: 0.1rem;
    width: 100%;
    color: var(--ink);
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), var(--panel));
    border: 3px solid var(--accent);
    border-bottom-width: 7px;
    border-radius: 20px;
    padding: 0.9rem;
    margin-bottom: 0.8rem;
    cursor: pointer;
}
.arcade-entry:active { transform: translateY(3px); border-bottom-width: 4px; }
.arcade-entry-emoji { font-size: 2.2rem; line-height: 1; }
.arcade-entry-label { font-weight: 600; font-size: 1.1rem; letter-spacing: 0.14em; }
.arcade-entry-sub { font-size: 0.8rem; color: var(--ink-soft); }
.arcade-grid { display: grid; gap: 0.9rem; max-width: 26rem; margin: 0 auto; }
.arcade-card {
    font-family: inherit; text-align: left;
    display: grid; grid-template-columns: auto 1fr; column-gap: 0.9rem; align-items: center;
    color: var(--ink);
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-bottom-width: 6px;
    border-radius: 20px;
    padding: 1rem 1.1rem;
    cursor: pointer;
}
.arcade-card:active { transform: translateY(2px); border-bottom-width: 4px; }
.arcade-emoji { grid-row: span 3; font-size: 2.4rem; }
.arcade-name { font-weight: 600; font-size: 1.15rem; }
.arcade-line { font-size: 0.9rem; color: var(--ink-soft); }
.arcade-best { font-size: 0.8rem; font-weight: 600; color: var(--star); }
.arcade-best-line { font-weight: 600; color: var(--ink-soft); }

/* Pixel Painter */
.paint-wrap { display: flex; gap: 1.2rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.paint-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    width: min(78vw, 300px);
    background: var(--space-2);
    border: 3px solid var(--panel-edge);
    border-radius: 12px;
    padding: 6px;
}
.paint-cell {
    aspect-ratio: 1;
    border: 1px solid var(--panel-edge);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    padding: 0;
}
.watch-screen-paint { display: grid; place-items: center; }
.paint-preview {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    width: 104px; height: 104px;
    gap: 1px;
    background: #000;
}
.paint-px { background: #10131c; }
.paint-palette { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.paint-chip {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 3px solid var(--panel-edge);
    cursor: pointer;
}
.paint-chip-on { border-color: var(--ink); transform: scale(1.15); }
.paint-save { max-width: 22rem; }
.paint-gallery { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.paint-mini {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    width: 58px; height: 58px;
    gap: 0;
    background: #000;
    border: 2px solid var(--panel-edge);
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
}

/* Chameleon Mix */
.mix-stage { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.mix-col { display: grid; justify-items: center; gap: 0.3rem; }
.mix-tag { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; color: var(--ink-soft); }
.mix-swatch {
    width: clamp(84px, 22vw, 110px); height: clamp(84px, 22vw, 110px);
    border-radius: 20px;
    border: 4px solid var(--panel-edge);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.mix-meter {
    width: min(88vw, 24rem);
    height: 18px;
    border-radius: 9px;
    background: var(--space-2);
    border: 2px solid var(--panel-edge);
    overflow: hidden;
}
.mix-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent));
    transition: width 0.2s;
}
.mix-meter-label { font-weight: 600; font-size: 1.05rem; }
.mix-hint { min-height: 1.4em; font-weight: 600; color: var(--ink-soft); }
.mix-row {
    display: flex; align-items: center; gap: 0.8rem;
    width: min(88vw, 24rem);
}
.mix-ch { font-weight: 600; font-size: 0.8rem; letter-spacing: 0.08em; width: 3.6rem; }
.mix-slider {
    flex: 1;
    height: 40px;
    cursor: pointer;
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .trail-pulse { display: none; }
    .critter, .trail-avatar, .home-sat.orbiting { animation: none !important; }
    /* Hold-to-confirm still needs its timing cue — keep only that transition. */
    .hold-btn.holding .hold-fill { transition: transform var(--hold-ms, 1200ms) linear !important; }
    .xpbar-fill { transition: none !important; }
}

.arc-enter { font-weight: 700; margin-top: 0.5rem; display: block; }

/* ── 🎓 Browser School: drawn browser + DAP spotlight tour ─────────────
   The browser mockup is deliberately always light-chrome/dark-ink, like
   the real thing — same rule as the sim watch's always-dark screen. */
.bs-browser {
    max-width: 40rem; margin: 0 auto 1rem;
    background: #f1f3f6; color: #24292f;
    border: 2px solid #c9d1d9; border-radius: 14px;
    overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.bs-titlebar { display: flex; gap: 6px; padding: 8px 10px; background: #e3e7ec; }
.bs-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.bs-dot-r { background: #ff5f57; } .bs-dot-y { background: #febc2e; } .bs-dot-g { background: #28c840; }
.bs-tabs { display: flex; align-items: flex-end; gap: 4px; padding: 4px 8px 0; background: #e3e7ec; }
.bs-tab {
    font-family: inherit; font-size: 0.82rem; color: #24292f;
    background: #cfd6dd; border: 1px solid #c9d1d9; border-bottom: none;
    border-radius: 8px 8px 0 0; padding: 0.35rem 0.8rem; cursor: pointer;
}
.bs-tab-on { background: #ffffff; font-weight: 700; }
.bs-newtab {
    font-family: inherit; font-size: 1rem; font-weight: 700; color: #57606a;
    background: none; border: none; padding: 0.2rem 0.5rem; cursor: pointer;
}
.bs-toolbar {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 0.6rem; background: #ffffff; border-bottom: 1px solid #e3e7ec;
}
.bs-navs { display: flex; gap: 0.15rem; }
.bs-nav {
    font-family: inherit; font-size: 0.95rem; color: #24292f;
    background: none; border: none; border-radius: 8px;
    padding: 0.25rem 0.45rem; cursor: pointer;
}
.bs-nav:hover { background: #eef1f4; }
.bs-nav-dim { opacity: 0.35; }
.bs-spin { animation: bs-spin 0.7s linear; display: inline-block; }
@keyframes bs-spin { to { transform: rotate(360deg); } }
.bs-address {
    flex: 1; display: flex; align-items: center; gap: 0.4rem;
    background: #eef1f4; border: 1px solid #d7dde3; border-radius: 2rem;
    padding: 0.3rem 0.7rem; min-width: 0;
}
.bs-url { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-star { font-family: inherit; font-size: 1rem; background: none; border: none; cursor: pointer; margin-left: auto; }
.bs-page { background: #ffffff; min-height: 11rem; padding: 1rem; }
.bs-content-title { font-weight: 700; margin-bottom: 0.7rem; }
.bs-blocks { display: grid; gap: 0.4rem; justify-items: start; }
.bs-block { border-radius: 8px; padding: 0.35rem 0.7rem; font-size: 0.8rem; color: #fff; }
.bs-block-a { background: #e8a33d; } .bs-block-b { background: #4f8ff0; } .bs-block-c { background: #4dbd6f; margin-left: 1.2rem; }
.bs-lines { display: grid; gap: 0.55rem; }
.bs-line { height: 0.65rem; border-radius: 4px; background: #e3e7ec; }
.bs-hint-line { color: #8a939c; font-size: 0.9rem; }
/* Spotlight: dim the whole cockpit, glow the region under discussion. */
.bs-dimmed [data-region] { opacity: 0.35; transition: opacity 0.25s; }
.bs-dimmed [data-region] [data-region] { opacity: 1; } /* nested keep parent's dim */
.bs-dimmed .bs-spot, .bs-dimmed .bs-spot [data-region] { opacity: 1 !important; }
.bs-spot {
    position: relative; border-radius: 10px;
    box-shadow: 0 0 0 3px var(--star), 0 0 24px color-mix(in srgb, var(--star) 70%, transparent) !important;
    animation: bs-pulse 1.4s ease-in-out infinite;
}
@keyframes bs-pulse { 50% { box-shadow: 0 0 0 5px var(--star), 0 0 34px color-mix(in srgb, var(--star) 85%, transparent); } }
.bs-coach { display: flex; gap: 0.9rem; align-items: flex-start; max-width: 40rem; margin: 0 auto 1.5rem; padding: 1rem; }
.bs-mascot { width: 74px; flex: none; }
.bs-bubble { display: grid; gap: 0.5rem; justify-items: start; }
.bs-coach-title { font-weight: 700; letter-spacing: 0.08em; font-size: 0.9rem; color: var(--star); }
.bs-say { line-height: 1.5; }
.bs-next { justify-self: start; }
.bs-dots { display: flex; gap: 0.3rem; }
.bs-dot-step { width: 8px; height: 8px; border-radius: 50%; background: var(--panel-edge); }
.bs-dot-on { background: var(--star); }
/* Nested spotlight targets: un-dim the whole ancestor chain. */
.bs-dimmed .bs-spot-path { opacity: 1 !important; }
/* DAP beacon: a pulsing gold dot pinned to the EXACT element to tap. */
.bs-has-beacon { position: relative; }
.bs-beacon {
    position: absolute; top: -5px; right: -5px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--star); pointer-events: none; z-index: 4;
}
.bs-beacon::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--star); animation: bs-beacon-ring 1.2s ease-out infinite;
}
@keyframes bs-beacon-ring { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
/* "Look up — the real one!" pointer above the drawn browser */
.bs-lookup {
    text-align: center; font-weight: 700; margin: -0.4rem auto 0.7rem;
    animation: bs-lookup-bob 1.2s ease-in-out infinite;
}
@keyframes bs-lookup-bob { 50% { transform: translateY(-6px); } }
/* Keyboard: esc row + inverted-T arrows */
.kb-esc-row { justify-content: flex-start; }
.kb-arrow-col { display: grid; gap: 2px; justify-items: center; }
.kb-arrow-row { display: flex; gap: 2px; }
.kb-arrow { min-width: 1.7rem; padding: 0.28rem 0.2rem; font-size: 0.72rem; }

/* ── ⌨️ Keyboard School (shares coach/spotlight classes with Browser School;
   the drawn keyboard is always light-chrome/dark-ink like the real thing) */
.kb-rig { max-width: 40rem; margin: 0 auto 1rem; }
.kb-screen {
    background: #ffffff; color: #24292f;
    border: 2px solid #c9d1d9; border-radius: 12px 12px 0 0;
    min-height: 4.5rem; padding: 0.8rem 1rem; position: relative;
    font-size: 1.05rem; overflow-wrap: anywhere;
}
.kb-line { white-space: pre-wrap; }
.kb-cursor { color: #4f8ff0; animation: kb-blink 1s steps(1) infinite; }
@keyframes kb-blink { 50% { opacity: 0; } }
.kb-target { color: #57606a; font-size: 0.9rem; margin-bottom: 0.3rem; }
.kb-popup {
    position: absolute; inset: 0.5rem; display: flex; align-items: center;
    justify-content: center; gap: 0.8rem; text-align: center;
    background: #fff3f5; border: 2px dashed #ff5c8a; border-radius: 10px;
    font-weight: 700; color: #b3315f;
}
.kb-popup[hidden] { display: none; }
.kb-popup-x { border: 1px solid #b3315f; border-radius: 6px; padding: 0 0.3rem; }
.kb-board {
    background: #e3e7ec; border: 2px solid #c9d1d9; border-top: none;
    border-radius: 0 0 14px 14px; padding: 0.7rem;
    display: grid; gap: 0.35rem; box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.kb-letters { display: grid; gap: 0.35rem; }
.kb-row { display: flex; gap: 0.3rem; justify-content: center; }
.kb-key {
    font-family: inherit; font-size: clamp(0.75rem, 2.4vw, 0.95rem); font-weight: 600;
    color: #24292f; background: #ffffff;
    border: 1px solid #c9d1d9; border-bottom-width: 3px; border-radius: 7px;
    min-width: clamp(1.6rem, 6.5vw, 2.4rem); padding: 0.45rem 0.2rem;
    cursor: pointer; touch-action: manipulation;
}
.kb-key:active, .kb-key-hit { background: #ffd23f; transform: translateY(1px); }
.kb-key-on { background: #ffd23f; }
.kb-wide { min-width: clamp(2.6rem, 10vw, 4rem); }
.kb-space { flex: 1; max-width: 14rem; }
.kb-bump { position: relative; }
.kb-bump::after {
    content: ''; position: absolute; left: 50%; bottom: 5px;
    width: 8px; height: 2.5px; border-radius: 2px;
    background: #c9d1d9; transform: translateX(-50%);
}
.kb-bump-glow {
    background: #ffd23f !important;
    box-shadow: 0 0 0 3px var(--star), 0 0 20px color-mix(in srgb, var(--star) 70%, transparent);
    animation: bs-pulse 1.4s ease-in-out infinite;
}
.kb-region { border-radius: 9px; }
.kb-bottom { align-items: stretch; }
.kb-space-wrap { flex: 1; display: flex; }
.kb-arrows { display: flex; gap: 0.3rem; }

/* Critter startle hop (tap 1 = bawk + hop; tap 2 = pop). The walk
   animation owns `transform`, so the hop rides the independent
   translate/rotate properties — it hops WHILE walking. */
.critter { transition: translate 0.15s, rotate 0.15s; }
.critter-startled { translate: 0 -14px; rotate: -8deg; }

/* ── 🌪️ Critter Storm (arcade) ─────────────────────────────────────────── */
.ws-storm-wrap { position: absolute; inset: 0; }
.ws-storm { position: absolute; inset: 0; overflow: hidden; }
.storm-critter {
    position: absolute; font-size: 1.6rem; line-height: 1;
    background: none; border: none; padding: 0.15rem; cursor: pointer;
    transition: none; user-select: none; touch-action: manipulation;
}
.herd-pen {
    position: absolute; right: 6px; bottom: 6px; width: 34%; height: 26%;
    display: grid; place-items: center; font-size: 1.5rem;
    border: 2px dashed #ffd23f; border-radius: 10px;
    background: rgba(255, 210, 63, 0.12);
    box-shadow: 0 0 14px rgba(255, 210, 63, 0.35);
    pointer-events: none;
}
.storm-hud {
    position: absolute; top: 4px; left: 0; right: 0; z-index: 2;
    display: flex; justify-content: space-between; padding: 0 8px;
    font-size: 0.75rem; font-weight: 700; color: #9fd0ff; pointer-events: none;
}

/* Keyboard-focus ring — an app that teaches keyboards must show focus. */
:focus-visible {
    outline: 3px solid var(--star);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Trail wayfinding line */
.trail-next {
    text-align: center; font-weight: 600; color: var(--ink-soft);
    margin: 0.2rem auto 0.4rem; max-width: 24rem;
}

/* Sleeping sim watch: show the way back */
.ws-wake-hint {
    position: absolute; left: 0; right: 0; bottom: 12px;
    text-align: center; font-size: 0.72rem; color: #9fd0ff;
    animation: bs-lookup-bob 1.4s ease-in-out infinite;
}

/* ── 🧑‍✈️ Mission Control (the Dad cockpit) ───────────────────────────────
   A scan-and-see dashboard: one row per metric, one column per kid.
   Grown-up screen — denser type, no whimsy, comparable at a glance. */
.ck-top {
    max-width: 46rem; margin: 0 auto 0.8rem;
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; gap: 0.5rem;
}
/* The base .big-btn/.ghost-btn is a full-width 64px kid target — this is
   a grown-up toolbar, so shrink it back to a normal button. */
.ck-top .ghost-btn {
    width: auto; min-height: 0; margin: 0;
    padding: 0.4rem 0.85rem; font-size: 0.92rem;
    border-width: 2px; border-radius: 12px; white-space: nowrap;
}
.ck-title { font-size: 1.1rem; margin: 0; text-align: center; white-space: nowrap; }
.ck-top-actions { display: flex; gap: 0.35rem; }

.ck-board {
    max-width: 46rem; margin: 0 auto 1rem;
    background: var(--panel); border: 2px solid var(--panel-edge);
    border-radius: 14px; overflow: hidden;
}
.ck-row {
    display: grid; grid-template-columns: 7.5rem 1fr 1fr;
    gap: 0.5rem; align-items: center;
    padding: 0.5rem 0.8rem;
    border-top: 1px solid color-mix(in srgb, var(--panel-edge) 60%, transparent);
}
.ck-row:nth-child(odd) { background: color-mix(in srgb, var(--panel-edge) 12%, transparent); }
.ck-head { border-top: none; padding: 0.7rem 0.8rem 0.5rem; background: none !important; }
.ck-row-label {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
    color: var(--ink-soft); text-transform: uppercase;
}
.ck-cell { min-width: 0; }
.ck-kidhead { display: flex; align-items: center; gap: 0.4rem; padding-bottom: 0.3rem; border-bottom: 3px solid var(--panel-edge); }
.ck-kidhead-hen { border-color: var(--hen); }
.ck-kidhead-liz { border-color: var(--liz); }
.ck-kid-emoji { font-size: 1.4rem; }
.ck-kid-name { font-weight: 700; }
.ck-big { font-weight: 700; font-size: 1.02rem; }
.ck-xp { font-variant-numeric: tabular-nums; }
.ck-row-next { background: color-mix(in srgb, var(--star) 12%, transparent) !important; }
.ck-next-cell { font-weight: 700; line-height: 1.3; }

.ck-bar-wrap { display: grid; gap: 0.2rem; }
.ck-bar-num { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.98rem; }
.ck-bar-of { font-weight: 400; color: var(--ink-soft); font-size: 0.82rem; }
.ck-bar { height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--ink-soft) 22%, transparent); overflow: hidden; }
.ck-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.ck-fill-hen { background: var(--hen); }
.ck-fill-liz { background: var(--liz); }
.ck-fill-gst { background: #ff6fae; }

.ck-panel {
    max-width: 46rem; margin: 0 auto 1rem; text-align: left;
    background: var(--panel); border: 2px solid var(--panel-edge);
    border-radius: 14px; padding: 0.9rem 1rem;
}
.ck-panel-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.ck-panel-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; color: var(--star); }
.ck-panel-title { font-weight: 700; font-size: 1.05rem; }
.ck-chip {
    font-size: 0.76rem; font-weight: 700; color: var(--ink-soft);
    border: 1px dashed var(--panel-edge); border-radius: 2rem; padding: 0.1rem 0.6rem;
}
.ck-sittings { display: grid; gap: 0.2rem; margin-bottom: 0.6rem; }
.ck-sitting { font-size: 0.86rem; color: var(--ink-soft); }
.ck-cols { display: grid; gap: 0.8rem; }
@media (min-width: 640px) { .ck-cols { grid-template-columns: repeat(3, 1fr); } }
.ck-col-head {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
    color: var(--ink-soft); margin-bottom: 0.3rem;
    border-bottom: 1px solid var(--panel-edge); padding-bottom: 0.2rem;
}
.ck-col-adult { color: var(--danger); }
.ck-col ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; }
.ck-col li { line-height: 1.35; font-size: 0.9rem; }
.ck-dim { color: var(--ink-soft); font-size: 0.85rem; }
.ck-pitch {
    margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px dashed var(--panel-edge);
    font-style: italic; line-height: 1.45;
}

.ck-action {
    display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
    padding: 0.4rem 0; line-height: 1.35;
    border-top: 1px solid color-mix(in srgb, var(--panel-edge) 55%, transparent);
}
.ck-action:first-of-type { border-top: none; }
.ck-action > span:nth-child(2) { flex: 1; min-width: 12rem; }
.ck-status { font-size: 1.05rem; }
.ck-trouble { border-top: 1px solid color-mix(in srgb, var(--panel-edge) 55%, transparent); padding: 0.45rem 0 0.2rem; }
.ck-trouble-q { font-weight: 600; cursor: pointer; }
.ck-trouble-a { margin-top: 0.35rem; line-height: 1.45; color: var(--ink-soft); font-size: 0.9rem; }

/* 🎯 The hero mission card + roadmap fold */
.hero-mission {
    position: relative; max-width: 24rem; margin: 1rem auto 0.4rem;
    padding: 1.4rem 1.2rem 1.2rem; text-align: center;
    display: grid; gap: 0.4rem; justify-items: center;
    border-color: var(--accent);
    box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 30%, transparent);
}
.hero-kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; color: var(--ink-soft); }
.hero-emoji { font-size: 3rem; line-height: 1; }
.hero-title { font-size: 1.25rem; margin: 0; }
.hero-go { margin-top: 0.4rem; }
.hero-avatar { position: absolute; top: -26px; right: 8px; width: 56px; }
.hero-avatar .mascot { width: 56px; height: auto; }
.hero-done { border-color: var(--star); }
.roadmap-toggle { display: block; margin: 0.8rem auto; }

/* Sitting plans + time chips */
.mission-time {
    display: inline-block; font-size: 0.82rem; font-weight: 700;
    color: var(--ink-soft); border: 1px dashed var(--panel-edge);
    border-radius: 2rem; padding: 0.2rem 0.8rem; margin: 0.2rem auto 0.4rem;
}
.sitting-plan {
    text-align: left; background: color-mix(in srgb, var(--star) 8%, transparent);
    border: 1px dashed color-mix(in srgb, var(--star) 45%, transparent);
    border-radius: 12px; padding: 0.7rem 0.9rem; margin: 0.5rem 0;
}
.sitting-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.4rem; }

/* Kid pack: chase hints, ghosts, rumors */
.arcade-chase { display: block; font-size: 0.72rem; font-weight: 700; color: var(--star); margin-top: 0.15rem; }
.storm-ghost, .herd-ghost { color: #ffd23f; }
.rumor-line {
    max-width: 26rem; margin: 0.8rem auto; text-align: center;
    font-size: 0.9rem; font-style: italic; color: var(--ink-soft);
}

/* ── 🤝 Crew goal + meter ──────────────────────────────────────────────── */
.crew-goal { max-width: 26rem; margin: 1.2rem auto 0.6rem; padding: 1rem 1.2rem; text-align: center; display: grid; gap: 0.5rem; }
.crew-goal-kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; color: var(--star); }
.crew-goal-title { font-weight: 700; font-size: 1.05rem; }
.crew-goal-text { line-height: 1.45; }
.crew-goal-done { opacity: 0.9; border-color: var(--star); }
.crew-goal-won { font-weight: 600; color: var(--ink-soft); }
.crew-meter { max-width: 24rem; margin: 0.6rem auto 0; display: grid; gap: 0.3rem; }
.crew-meter-track { height: 10px; }
.pl-week .pf-line { margin-left: 0.4rem; }

/* ── 🧩 The Block Wiki ──────────────────────────────────────────────────── */
.wk-list { display: grid; gap: 0.6rem; max-width: 40rem; margin: 0.8rem auto 1.5rem; }
.wk-entry {
    background: var(--panel); border: 2px solid var(--panel-edge);
    border-radius: 14px; padding: 0.7rem 0.9rem; text-align: left;
}
.wk-locked { opacity: 0.55; display: flex; gap: 0.7rem; align-items: center; }
.wk-summary { display: flex; gap: 0.7rem; align-items: center; cursor: pointer; }
.wk-emoji { font-size: 1.6rem; flex: none; }
.wk-name { font-weight: 700; flex: 1; }
.wk-intro {
    font-size: 0.72rem; font-weight: 700; color: var(--star);
    border: 1px dashed color-mix(in srgb, var(--star) 55%, transparent);
    border-radius: 2rem; padding: 0.1rem 0.55rem;
}
.wk-body { display: grid; gap: 0.45rem; margin-top: 0.6rem; }
.wk-row { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.5rem; }
.wk-key { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-soft); padding-top: 0.15rem; }
.wk-val { line-height: 1.45; }
.wk-link { display: block; margin: 0.7rem auto 0.2rem; }
.wk-entry-card { margin-bottom: 1.2rem; border-color: #4da3ff; }
.twopart-banner { border-color: var(--star); }

/* ── 🪐 Planet Tinkercad ───────────────────────────────────────────────── */
.tk-planet {
    font-size: 4.6rem; text-align: center; line-height: 1;
    margin: 0.4rem 0 0.2rem;
    filter: drop-shadow(0 8px 18px rgba(77, 163, 255, 0.35));
    animation: tk-drift 7s ease-in-out infinite;
}
@keyframes tk-drift { 50% { transform: translateY(-7px) rotate(4deg); } }
.tk-locked { opacity: 0.55; cursor: not-allowed; }
.tk-entry { border-color: #7a4dff; }

/* ── 👆 Trackpad School: a playground for real gestures ────────────────── */
.pd-playground {
    max-width: 40rem; min-height: 15rem; margin: 0 auto 1rem;
    background: var(--panel); border: 2px solid var(--panel-edge);
    border-radius: 14px; position: relative;
    display: grid; place-items: center; overflow: hidden;
    touch-action: none;
}
.pd-target { font-size: 3rem; background: none; border: none; cursor: pointer; }
.pd-star { animation: bs-pulse 1.4s ease-in-out infinite; border-radius: 50%; padding: 0.6rem; }
.pd-btn {
    font-family: inherit; font-size: 1.1rem; font-weight: 700;
    color: #1d2430; background: #ffd23f;
    border: 3px solid #1d2430; border-bottom-width: 6px; border-radius: 16px;
    padding: 0.8rem 1.8rem; animation: bs-pulse 1.4s ease-in-out infinite;
}
.pd-btn:active { transform: translateY(3px); border-bottom-width: 3px; }
.pd-chest, .pd-mystery { position: relative; animation: bs-pulse 1.4s ease-in-out infinite; border-radius: 16px; padding: 0.6rem; }
.pd-dragzone { position: relative; width: 100%; height: 15rem; }
.pd-crate {
    position: absolute; left: 12%; top: 40%; font-size: 3rem;
    cursor: grab; user-select: none; touch-action: none;
    animation: bs-pulse 1.4s ease-in-out infinite; border-radius: 16px; padding: 0.3rem;
}
.pd-dragging { cursor: grabbing; animation: none; z-index: 2; }
.pd-rocket { position: absolute; right: 12%; top: 38%; font-size: 3.4rem; }
.pd-porthole {
    width: min(14rem, 70%); height: 13rem; overflow: hidden;
    border: 6px solid var(--panel-edge); border-radius: 50% / 40%;
    background: #131a40;
}
.pd-strip { display: grid; place-items: center; transition: transform 0.1s; }
.pd-strip-item { height: 6.5rem; display: grid; place-items: center; font-size: 3rem; }
.pd-goal { font-size: 3.6rem; }
.pd-menu {
    position: absolute; left: 60%; top: 60%; z-index: 3;
    background: #fff; color: #24292f; text-align: left;
    border: 1px solid #c9d1d9; border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
    font-size: 0.9rem; min-width: 10rem; overflow: hidden;
}
.pd-menu-item { padding: 0.45rem 0.9rem; }
.pd-menu-item:hover { background: #eef1f4; }
.pd-grad { font-size: 3.4rem; }
.pd-empty { min-height: 8rem; }

/* Workshop briefing screens (quests + maker steps) */
.quest-tap { cursor: pointer; }
.quest-guide-steps { margin: 0.4rem 0 0.2rem; padding-left: 1.3rem; display: grid; gap: 0.45rem; text-align: left; }
.quest-guide-steps li { line-height: 1.45; }
.wd-stars { color: var(--star); font-weight: 700; letter-spacing: 0.1em; }
.wd-section { text-align: left; margin: 1rem 0 0; }
.wd-section-title {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em;
    color: var(--ink-soft); border-bottom: 1px solid var(--panel-edge);
    padding-bottom: 0.25rem; margin-bottom: 0.5rem;
}
.wd-gear { margin: 0.2rem 0; padding-left: 1.3rem; display: grid; gap: 0.35rem; }
.wd-gear li { line-height: 1.4; }
.wd-done { display: grid; gap: 0.5rem; justify-items: center; margin-top: 0.8rem; }

/* ── Crew Beam ──────────────────────────────────────────────────────────── */
.beam-btn { display: block; margin: 1.6rem auto 0.4rem; }
.beam-card { display: grid; gap: 0.8rem; justify-items: center; }
.beam-kicker { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.06em; }
.beam-summary { font-weight: 600; }
.beam-note { font-size: 0.92rem; opacity: 0.8; max-width: 24rem; }

/* ── My Season Book: paper on screen, keepsake on paper ─────────────────
   The portfolio deliberately ignores day/night theming — it previews the
   printed page, so it is always warm paper with dark ink. */
.pf-link { display: block; margin: 1.4rem auto 0.4rem; }
.pf-actions { text-align: center; margin: 0.4rem 0 1rem; }
.pf-print-btn {
    font-family: inherit; font-weight: 700; font-size: 1.05rem;
    color: #1d2430; background: #ffd23f;
    border: 3px solid #1d2430; border-bottom-width: 6px; border-radius: 16px;
    padding: 0.7rem 1.6rem; cursor: pointer;
}
.pf-print-btn:active { transform: translateY(3px); border-bottom-width: 3px; }
.portfolio {
    background: #fffcf2; color: #1d2430;
    border: 2px solid #d8cfb4; border-radius: 12px;
    max-width: 44rem; margin: 0 auto 2rem;
    padding: 2rem clamp(1rem, 5vw, 2.4rem);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.pf-cover {
    text-align: center; padding-bottom: 1.4rem; margin-bottom: 1.4rem;
    border-bottom: 3px double #d8cfb4;
}
.pf-mascot { width: 110px; height: auto; margin: 0 auto 0.4rem; }
.pf-title { font-size: 1.9rem; font-weight: 700; letter-spacing: 0.06em; }
.pf-season { font-size: 1.05rem; margin-top: 0.2rem; }
.pf-plaque { font-size: 1rem; margin-top: 0.3rem; font-weight: 600; }
.pf-kid { font-size: 1.3rem; font-weight: 700; margin-top: 0.7rem; }
.pf-rank { color: #5d6470; margin-top: 0.15rem; }
.pf-section { margin: 1.3rem 0; }
.pf-section-title {
    font-size: 0.85rem; font-weight: 700; letter-spacing: 0.16em;
    color: #8a6d1f; border-bottom: 1px solid #e5dcc0;
    padding-bottom: 0.25rem; margin-bottom: 0.6rem;
}
.pf-mission { margin-bottom: 0.9rem; }
.pf-mission-head {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 0.6rem; font-weight: 700;
}
.pf-date { color: #98917c; font-size: 0.8rem; font-weight: 400; white-space: nowrap; }
.pf-line { margin: 0.2rem 0 0 1.1rem; }
.pf-dim { color: #5d6470; font-size: 0.92rem; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; }
.pf-badge {
    border: 1px solid #d8cfb4; border-radius: 2rem;
    padding: 0.15rem 0.7rem; font-size: 0.92rem; background: #fff;
}
.pf-footer {
    margin-top: 1.6rem; padding-top: 0.9rem; text-align: center;
    border-top: 3px double #d8cfb4; font-weight: 600;
}

@media print {
    #topbar, #tabbar, #foot, .critter, .print-hide { display: none !important; }
    body, body.day, body.night { background: #fff !important; }
    body::before, body::after { display: none !important; }
    #view { padding: 0 !important; }
    .portfolio {
        box-shadow: none; border: none; border-radius: 0;
        max-width: none; margin: 0; padding: 0;
    }
    .pf-section, .pf-mission, .pf-cover { break-inside: avoid; }
}
