/* Captain Luna & the Lost Star — styles. Loads after gamekit.css. */

:root {
    --night1: #141A3C;
    --night2: #2A2F6E;
    --peri: #5C6BC0;
    --lav: #B8A9E8;
    --cream: #FFF4D6;
    --gold: #FFD98E;
    --hot: #FFD700;
    --teal: #7FE3DC;
    --rose: #FFB3C6;
    --ink: #2B2350;
    --ls-font: 'Comic Sans MS', 'Chalkboard SE', 'Baloo 2', 'Segoe UI', Arial, sans-serif;
}

body { font-family: var(--ls-font); background: var(--night1); overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { position: fixed; inset: 0; overflow: hidden; }
#app > section { position: absolute; inset: 0; overflow: hidden; z-index: 5; }
.depth { position: absolute; inset: 0; pointer-events: none; }
.gk-hidden { display: none !important; }

/* ── persistent depth ─────────────────────────────────────── */
#sky { z-index: 0; }
#mid { z-index: 1; }
#fore { z-index: 2; }

.sky-grad { position: absolute; inset: 0; background:
    radial-gradient(120% 90% at 70% 0%, #2A2F6E 0%, #1B2050 45%, #141A3C 100%); }
.sky-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.tw { animation: ls-tw 3s ease-in-out infinite; transform-origin: center; }
@keyframes ls-tw { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

.mid-drift { position: absolute; inset: -3%; width: 106%; height: 106%; animation: ls-drift 120s linear infinite; }
@keyframes ls-drift { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

.mote {
    position: absolute; width: 6px; height: 6px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,244,214,0.9), rgba(255,244,214,0));
    animation: ls-mote 9s ease-in-out infinite;
}
@keyframes ls-mote { 0%, 100% { transform: translateY(0); opacity: 0.2; } 50% { transform: translateY(-22px); opacity: 0.8; } }
.firefly {
    position: absolute; width: 8px; height: 8px; border-radius: 50%;
    background: radial-gradient(circle, #FFF3B0, rgba(255,215,0,0));
    box-shadow: 0 0 10px 3px rgba(255,215,0,0.5);
    animation: ls-fly 8s ease-in-out infinite;
}
@keyframes ls-fly {
    0% { transform: translate(0,0); opacity: 0.3; }
    25% { transform: translate(30px,-20px); opacity: 0.9; }
    50% { transform: translate(60px,10px); opacity: 0.5; }
    75% { transform: translate(20px,30px); opacity: 0.9; }
    100% { transform: translate(0,0); opacity: 0.3; }
}

/* ══════════════════════════════════════════════════════════════
   COVER
   ══════════════════════════════════════════════════════════════ */
#screen-cover { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
#cover-title { margin-top: clamp(78px, 10vh, 96px); text-align: center; z-index: 6; pointer-events: none; max-width: 94vw; }
.cover-arch {
    font-size: clamp(2.1rem, 8vw, 4.6rem); font-weight: 800; color: var(--gold);
    text-shadow: 0 0 24px rgba(255,215,0,0.5), 0 4px 0 #C99A3C, 0 6px 14px rgba(0,0,0,0.4);
    letter-spacing: 1px; line-height: 1;
    animation: ls-title-bob 5s ease-in-out infinite;
}
.cover-sub { font-size: clamp(1.2rem, 4.5vw, 2.2rem); color: var(--lav); margin-top: 6px; font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
@keyframes ls-title-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }

#cover-cast { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
#cover-luna { position: absolute; left: 20%; bottom: 12%; width: clamp(120px, 20vw, 190px); }
#cover-comet { position: absolute; left: 34%; bottom: 8%; width: clamp(120px, 20vw, 190px); }
#cover-wish { position: absolute; right: 12%; top: 38%; width: clamp(96px, 15vw, 150px); }
#cover-luna .luna, #cover-comet .comet, #cover-wish .wish { width: 100%; height: auto; display: block; }

#cover-luna.hop-in { animation: ls-hop-in 2.4s cubic-bezier(0.3, 0.9, 0.4, 1) both; }
@keyframes ls-hop-in {
    0% { transform: translateX(-70vw); }
    30% { transform: translateX(-40vw) translateY(-30px); }
    45% { transform: translateX(-40vw) translateY(0); }
    65% { transform: translateX(-18vw) translateY(-24px); }
    78% { transform: translateX(-18vw) translateY(0); }
    90% { transform: translateX(0) translateY(-14px); }
    100% { transform: translateX(0) translateY(0); }
}
#cover-comet.trot-in { animation: ls-trot-in 1.6s ease-out both; }
@keyframes ls-trot-in { 0% { transform: translateX(-80vw); } 60% { transform: translateX(6px); } 100% { transform: translateX(0); } }
#cover-wish.drift-in { animation: ls-drift-in 1.7s cubic-bezier(0.3, 1.3, 0.5, 1) both; }
@keyframes ls-drift-in { 0% { transform: translateY(-70vh) rotate(-20deg); opacity: 0; } 70% { transform: translateY(14px) rotate(6deg); opacity: 1; } 100% { transform: translateY(0) rotate(0); } }

#start-btn {
    position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
    width: 170px; height: 170px; border: none; background: none; cursor: pointer; z-index: 8;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    animation: ls-start-pulse 1.8s ease-in-out infinite;
}
#start-star { width: 150px; height: 150px; display: block; filter: drop-shadow(0 0 24px rgba(255,215,0,0.75)); }
#start-star svg { width: 100%; height: 100%; }
.start-word { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -46%); font-size: 1.6rem; font-weight: 800; color: var(--ink); text-shadow: 0 1px 2px rgba(255,255,255,0.5); pointer-events: none; }
@keyframes ls-start-pulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.08); } }
#start-btn:active { transform: translateX(-50%) scale(0.94); }

#cover-moons { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); font-size: 1.6rem; z-index: 8; }
.lvl-moon { opacity: 0.28; margin: 0 3px; filter: grayscale(1); }
.lvl-moon.on { opacity: 1; filter: none; text-shadow: 0 0 10px rgba(255,217,142,0.8); }

#album-bookmark {
    position: absolute; left: 14px; top: 14px; width: 64px; height: 64px; border: none; border-radius: 20px;
    background: rgba(255,255,255,0.92); font-size: 2rem; cursor: pointer; z-index: 8;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3); transition: transform 0.15s;
}
#album-bookmark:active { transform: scale(0.92); }

#info-btn {
    position: absolute; right: 14px; bottom: 16px; z-index: 8;
    min-height: 48px; padding: 10px 18px; border: none; border-radius: 30px;
    background: rgba(255,255,255,0.16); color: #fff; font-size: 0.95rem; font-weight: 700;
    cursor: pointer; backdrop-filter: blur(4px);
}

/* ══════════════════════════════════════════════════════════════
   STORY STAGE
   ══════════════════════════════════════════════════════════════ */
#ground { z-index: 1; }
#cast { z-index: 3; pointer-events: none; }
#dust-wipe { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; }
#beat-layer { position: absolute; inset: 0; z-index: 8; }
#narration { z-index: 10; }
#next-arrow { z-index: 10; }

.scene-ground { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* characters */
.char-slot {
    position: absolute; transform: translate(-50%, -50%) scale(var(--s, 1));
    transform-origin: center bottom; will-change: transform;
}
.char-slot svg { width: 100%; height: auto; display: block; overflow: visible; }
.char-luna { width: clamp(120px, 17vw, 168px); animation: ls-bob 3.4s ease-in-out infinite; }
.char-wish { width: clamp(96px, 13vw, 130px); animation: ls-bob 2.8s ease-in-out infinite; }
.char-comet { width: clamp(130px, 18vw, 176px); animation: ls-bob 3.8s ease-in-out infinite; }
.char-moon { width: clamp(120px, 16vw, 158px); animation: ls-bob 5s ease-in-out infinite; }
.char-finn { width: clamp(120px, 16vw, 156px); animation: ls-bob 3.2s ease-in-out infinite; }
.char-slot.tappable { pointer-events: auto; cursor: pointer; }
.char-slot.tappable .wish-wrap { animation: ls-tap-invite 1.6s ease-in-out infinite; }
@keyframes ls-tap-invite { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes ls-bob { 0%, 100% { transform: translate(-50%, -50%) scale(var(--s, 1)); } 50% { transform: translate(-50%, calc(-50% - 8px)) scale(var(--s, 1)); } }

/* ── Luna rig ── */
.luna { transform-origin: 50% 92%; }
.lu-eyes { transform-origin: 80px 70px; animation: ls-blink 4.2s infinite; }
@keyframes ls-blink { 0%, 92%, 100% { transform: scaleY(1); } 95%, 97% { transform: scaleY(0.12); } }
.lu-flame { transform-origin: 50px 156px; animation: ls-flame 0.5s ease-in-out infinite alternate; }
@keyframes ls-flame { from { transform: scaleY(0.7) translateY(-2px); opacity: 0.7; } to { transform: scaleY(1.15); opacity: 1; } }
.lu-glint { animation: ls-glint 6s ease-in-out infinite; }
@keyframes ls-glint { 0%, 100% { transform: translateX(-6px); opacity: 0.4; } 50% { transform: translateX(10px); opacity: 0.9; } }
.lu-wave { transform-origin: 121px 118px; }
.luna.waving .lu-wave { animation: ls-wave 0.5s ease-in-out 4; }
@keyframes ls-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-28deg); } }
.luna.happy { animation: ls-happy 0.6s ease; }
@keyframes ls-happy { 0% { transform: translateY(0); } 30% { transform: translateY(-16px) scale(1.05); } 60% { transform: translateY(2px) scale(0.98); } 100% { transform: translateY(0); } }
.luna.listen { animation: ls-listen 0.8s ease; }
@keyframes ls-listen { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg) translateX(-4px); } }
.luna.breathing { animation: ls-lbreathe 3.5s ease-in-out; }
@keyframes ls-lbreathe { 0% { transform: scale(1); } 50% { transform: scale(1.06) translateY(-4px); } 100% { transform: scale(1); } }

/* ── Wish ── */
.wish-wrap { --glow: 1; position: relative; width: 100%; }
.wish-halo {
    position: absolute; left: 50%; top: 46%; width: 150%; height: 150%; transform: translate(-50%, -50%) scale(calc(0.5 + var(--glow) * 0.14));
    background: radial-gradient(circle, rgba(255,215,0,0.85) 0%, rgba(255,217,142,0.35) 40%, rgba(255,217,142,0) 70%);
    opacity: calc(0.12 + var(--glow) * 0.15); pointer-events: none; transition: transform 0.6s ease, opacity 0.6s ease;
    animation: ls-halo-pulse 3s ease-in-out infinite;
}
@keyframes ls-halo-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
.wish { position: relative; filter: drop-shadow(0 0 calc(2px + var(--glow) * 2px) rgba(255,215,0,0.85)); transition: filter 0.6s ease; }
.wish-eyes { transform-origin: 50px 48px; animation: ls-blink 5s infinite; }
.wish-tear { opacity: 0; }
.wish.sniffly .wish-tear { opacity: 1; animation: ls-tear 2.4s ease-in-out infinite; }
.wish.sniffly { animation: ls-shiver 3s ease-in-out infinite; }
.wish.sniffly .wish-mouth { d: path("M44 64 q6 -4 12 0"); }
@keyframes ls-tear { 0%, 100% { transform: translateY(0); opacity: 0.9; } 50% { transform: translateY(6px); opacity: 0.3; } }
@keyframes ls-shiver { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
.wish.comforted .wish-tear { opacity: 0; }
.wish.bloom { animation: ls-bloom 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes ls-bloom { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.wish.full { filter: drop-shadow(0 0 18px rgba(255,215,0,1)) drop-shadow(0 0 40px rgba(255,240,180,0.8)); }
.wish.yawn .wish-mouth { animation: ls-yawn 2.4s ease-in-out infinite; }
@keyframes ls-yawn { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(2.4) translateY(2px); } }

/* ── Comet ── */
.comet { transform-origin: 60% 90%; }
.cm-tail { animation: ls-tail 1.2s linear infinite; }
.cm-tail2 { animation: ls-tail 0.9s linear infinite reverse; }
@keyframes ls-tail { to { stroke-dashoffset: -28; } }
.cm-head { transform-origin: 58px 60px; animation: ls-purr 4s ease-in-out infinite; }
@keyframes ls-purr { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.cm-ear { transform-origin: 44px 44px; animation: ls-earflick 5s ease-in-out infinite; }
@keyframes ls-earflick { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(-14deg); } }

/* ── Mr Moon ── */
.mm-lid { animation: ls-mmlid 6s ease-in-out infinite; }
@keyframes ls-mmlid { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.55; } }
.mm-smile { animation: ls-mmsmile 7s ease-in-out infinite; transform-origin: 80px 96px; }
@keyframes ls-mmsmile { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(1.1); } }

/* ── Finn ── */
.fn-tail { transform-origin: 104px 65px; animation: ls-fntail 2.2s ease-in-out infinite; }
@keyframes ls-fntail { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(10deg); } }

/* ground animated bits */
.ribbon { animation: ls-ribbon 6s ease-in-out infinite; }
@keyframes ls-ribbon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.river-shimmer { animation: ls-river 3s linear infinite; }
@keyframes ls-river { to { stroke-dashoffset: -32; } }
.streaks { animation: ls-streaks 0.7s linear infinite; }
@keyframes ls-streaks { 0% { opacity: 0.4; transform: translateY(0); } 100% { opacity: 0.9; transform: translateY(8px); } }
.stair-steps rect { animation: ls-steptw 3s ease-in-out infinite; }
@keyframes ls-steptw { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* dust wipe */
#dust-wipe.go { animation: ls-wipe 0.55s ease-out; }
#dust-wipe.go::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 40%, rgba(255,244,214,0.9), transparent 12%),
                radial-gradient(circle at 40% 60%, rgba(184,169,232,0.8), transparent 10%),
                radial-gradient(circle at 60% 30%, rgba(255,244,214,0.9), transparent 12%),
                radial-gradient(circle at 80% 70%, rgba(127,227,220,0.7), transparent 10%),
                linear-gradient(90deg, rgba(42,47,110,0.95), rgba(42,47,110,0));
    animation: ls-wipe-move 0.55s ease-out;
}
@keyframes ls-wipe { from { opacity: 1; } to { opacity: 0; } }
@keyframes ls-wipe-move { from { transform: translateX(-100%); } to { transform: translateX(120%); } }

/* ── narration bar ── */
#narration {
    position: absolute; left: 50%; bottom: clamp(14px, 4vh, 40px); transform: translateX(-50%);
    width: min(88vw, 720px); background: linear-gradient(180deg, #FFFDF6, #FDF1D8);
    border: 3px solid var(--ink); border-radius: 26px; padding: 16px 22px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35); display: flex; align-items: center; gap: 12px;
    animation: ls-narr-in 0.4s cubic-bezier(0.2, 1.3, 0.4, 1);
}
@keyframes ls-narr-in { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
#narr-text { font-size: clamp(1.05rem, 3vw, 1.4rem); color: var(--ink); font-weight: 700; line-height: 1.4; flex: 1; }
.wg { transition: color 0.2s, transform 0.2s; display: inline-block; margin-right: 0.34em; transform-origin: center bottom; }
.wg.on { color: #E8892B; transform: scale(1.06); }
#ear-btn {
    flex: none; width: 58px; height: 58px; border: none; border-radius: 50%;
    background: var(--teal); font-size: 1.7rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    animation: ls-ear 2.4s ease-in-out infinite;
}
@keyframes ls-ear { 0%, 100% { transform: scale(1) rotate(-4deg); } 50% { transform: scale(1.08) rotate(4deg); } }

/* ── next arrow ── */
#next-arrow {
    position: absolute; right: clamp(16px, 4vw, 42px); bottom: clamp(16px, 5vh, 44px);
    width: 88px; height: 88px; border: none; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #FFE9A8, var(--gold)); cursor: pointer;
    box-shadow: 0 8px 20px rgba(255,215,0,0.5); border: 3px solid var(--ink);
    animation: ls-arrow-pulse 1.2s ease-in-out infinite; display: flex; align-items: center; justify-content: center;
}
#next-arrow svg { width: 60%; height: 60%; }
@keyframes ls-arrow-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(255,215,0,0.5); } 50% { transform: scale(1.12); box-shadow: 0 8px 30px rgba(255,215,0,0.8); } }
#next-arrow:active { transform: scale(0.92); }

/* ── choice banner + cards ── */
.choose-banner {
    position: absolute; left: 50%; top: clamp(10px, 4vh, 40px); transform: translateX(-50%);
    background: linear-gradient(180deg, #FFE07A, #FCC44A); color: var(--ink);
    font-size: clamp(1.3rem, 4.5vw, 2rem); font-weight: 800; padding: 12px 34px;
    border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    animation: ls-boing 0.6s cubic-bezier(0.2, 1.7, 0.4, 1); white-space: nowrap;
}
.choose-banner.soft { background: linear-gradient(180deg, #CFC3F2, #B8A9E8); }
@keyframes ls-boing { 0% { transform: translateX(-50%) translateY(-80px) scale(0.6); } 60% { transform: translateX(-50%) translateY(8px) scale(1.1); } 100% { transform: translateX(-50%) translateY(0) scale(1); } }

.choice-row {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%);
    display: flex; gap: clamp(18px, 5vw, 48px); align-items: center; justify-content: center; flex-wrap: wrap;
}
.choice-card {
    width: clamp(140px, 22vw, 184px); min-height: clamp(150px, 24vw, 190px);
    background: linear-gradient(180deg, #FFFDF6, #F1E6FF); border: 4px solid var(--ink); border-radius: 28px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,0.3); transition: transform 0.3s, opacity 0.4s;
    padding: 12px;
}
.cc-icon { font-size: clamp(3.4rem, 9vw, 5rem); line-height: 1; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.25)); }
.cc-face { width: clamp(74px, 14vw, 96px); }
.cc-face svg { width: 100%; height: auto; }
.cc-word { font-size: clamp(1rem, 3vw, 1.35rem); font-weight: 800; color: var(--ink); }
.choice-card.wiggle { animation: ls-cardwig 0.6s ease-in-out; }
@keyframes ls-cardwig { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) scale(1.04); } 75% { transform: rotate(4deg) scale(1.04); } }
.choice-card.faded { opacity: 0.15; transform: scale(0.85); pointer-events: none; }
.choice-card.picked { animation: ls-picked 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; box-shadow: 0 12px 30px rgba(255,215,0,0.6); border-color: var(--hot); }
@keyframes ls-picked { to { transform: scale(1.15); } }
.choice-card:active { transform: scale(0.96); }

/* ── find objects ── */
.find-obj {
    position: absolute; transform: translate(-50%, -50%); width: clamp(72px, 12vw, 100px); height: clamp(72px, 12vw, 100px);
    border: none; background: none; cursor: pointer; padding: 0;
    animation: ls-shimmer 2.4s ease-in-out infinite;
}
.find-obj svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35)); }
.find-obj.is-correct svg { filter: drop-shadow(0 0 12px rgba(255,215,0,0.9)); }
@keyframes ls-shimmer { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -52%) scale(1.05); } }
.find-obj.nudge { animation: ls-objnudge 0.5s ease; }
@keyframes ls-objnudge { 0%, 100% { transform: translate(-50%, -50%) rotate(0); } 25% { transform: translate(-52%, -50%) rotate(-8deg); } 75% { transform: translate(-48%, -50%) rotate(8deg); } }
.find-obj.found { animation: ls-objfound 1s ease forwards; z-index: 3; }
@keyframes ls-objfound { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.4); } 100% { transform: translate(0%, -260%) scale(0.2); opacity: 0; } }
.find-obj.fade { animation: ls-objfade 0.5s ease forwards; }
@keyframes ls-objfade { to { opacity: 0.12; transform: translate(-50%, -50%) scale(0.8); } }
.find-obj.halo::after {
    content: ''; position: absolute; inset: -18%; border-radius: 50%;
    border: 4px solid rgba(255,215,0,0.9); animation: ls-halo 1.1s ease-in-out infinite;
}
@keyframes ls-halo { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.2); opacity: 1; } }

/* ── breathing ── */
.breathe-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.breath-star { width: clamp(150px, 30vw, 240px); height: clamp(150px, 30vw, 240px); border: none; background: none; cursor: pointer; padding: 0; transition: transform 3.4s ease-in-out, filter 3.4s ease-in-out; }
.breath-star svg { width: 100%; height: 100%; filter: drop-shadow(0 0 16px rgba(255,215,0,0.6)); }
.breath-star.inhale { transform: scale(1.5); }
.breath-star.inhale svg { filter: drop-shadow(0 0 40px rgba(255,240,180,0.95)); }
.breath-star.exhale { transform: scale(1); transition: transform 3.6s ease-in-out, filter 3.6s ease-in-out; }
.bs-halo { animation: ls-bshalo 4s ease-in-out infinite; transform-origin: center; }
@keyframes ls-bshalo { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.5; } }
.breath-hint { font-size: 1.3rem; font-weight: 800; color: var(--cream); background: rgba(43,35,80,0.55); padding: 8px 20px; border-radius: 20px; animation: ls-bhint 1.6s ease-in-out infinite; }
@keyframes ls-bhint { 0%, 100% { transform: translateY(0); opacity: 0.85; } 50% { transform: translateY(-4px); opacity: 1; } }
.breath-count { font-size: 2rem; letter-spacing: 8px; color: var(--gold); }
.breath-count .bc { transition: transform 0.3s; }

/* ── ending: constellation ── */
.ending-const { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(70vw, 460px); }
.constellation { width: 100%; height: auto; overflow: visible; }
.cst-line { stroke-dasharray: 120; stroke-dashoffset: 120; opacity: 0.9; filter: drop-shadow(0 0 4px rgba(255,233,176,0.9)); }
.cst-line.drawn { stroke-dashoffset: 0; transition: stroke-dashoffset 0.5s ease; }
.cst-dot { opacity: 0; }
.cst-dot.drawn { opacity: 1; transition: opacity 0.3s ease; filter: drop-shadow(0 0 4px rgba(255,247,226,0.9)); }
.fam-twinkle { position: absolute; inset: 0; }
.fam-star { position: absolute; font-size: 1.2rem; animation: ls-famtw 1.8s ease-in-out infinite; }
@keyframes ls-famtw { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* ══════════════════════════════════════════════════════════════
   ALBUM
   ══════════════════════════════════════════════════════════════ */
#screen-album { display: flex; align-items: center; justify-content: center; }
#album-book {
    width: min(92vw, 720px); max-height: 94vh; overflow-y: auto; background: linear-gradient(180deg, #3A2E68, #241C4C);
    border: 5px solid #5a4d92; border-radius: 30px; padding: clamp(16px, 3vw, 26px); text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
#album-title { color: var(--gold); font-size: clamp(1.4rem, 5vw, 2rem); margin-bottom: 14px; text-shadow: 0 0 14px rgba(255,215,0,0.4); }
#album-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 2.4vw, 18px); margin-bottom: 18px; }
.album-slot { background: rgba(20,26,60,0.7); border: 3px solid #4a3f82; border-radius: 22px; padding: 10px; }
.album-slot.found { border-color: var(--gold); box-shadow: inset 0 0 22px rgba(255,215,0,0.25); }
.slot-const { width: 100%; height: clamp(96px, 20vh, 150px); }
.slot-const .constellation { width: 100%; height: 100%; }
.album-slot.empty .cst-line { stroke-dashoffset: 0; opacity: 0.22; stroke-dasharray: 2 4; filter: none; }
.album-slot.empty .cst-dot { opacity: 0.35; filter: none; }
.album-slot.found .cst-line { stroke-dashoffset: 0; animation: ls-famtw 3s ease-in-out infinite; }
.album-slot.found .cst-dot { animation: ls-famtw 2.4s ease-in-out infinite; }
.slot-name { margin-top: 8px; color: var(--cream); font-weight: 700; font-size: clamp(0.9rem, 2.6vw, 1.15rem); }
.album-slot.stamp { animation: ls-stamp 0.7s cubic-bezier(0.2, 1.8, 0.4, 1); }
@keyframes ls-stamp { 0% { transform: scale(2.2) rotate(-8deg); opacity: 0; } 55% { transform: scale(0.9) rotate(4deg); opacity: 1; } 75% { transform: scale(1.06) rotate(-2deg); } 100% { transform: scale(1) rotate(0); } }
#read-again { margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════
   GROWN-UPS
   ══════════════════════════════════════════════════════════════ */
#info-overlay { position: fixed; inset: 0; z-index: 930; background: rgba(20,16,40,0.6); display: flex; align-items: center; justify-content: center; animation: gk-fade-in 0.25s; }
#info-card { position: relative; width: min(92vw, 520px); max-height: 90vh; overflow-y: auto; text-align: left; background: #FFFDF7; }
#info-card h2 { color: var(--peri); margin-bottom: 8px; }
#info-card p { color: var(--ink); line-height: 1.5; margin-bottom: 6px; }
.info-block { margin-top: 14px; padding-top: 12px; border-top: 2px dashed #E4D9F2; }
.info-block h3 { color: #E8892B; font-size: 1.05rem; margin-bottom: 4px; }
.info-fine { font-size: 0.9rem; opacity: 0.8; margin-top: 8px; }
#level-picker { display: flex; gap: 10px; margin: 10px 0; }
.lvl-btn { flex: 1; min-height: 72px; padding: 8px; border: 3px solid #D8C9F0; border-radius: 18px; background: #F6EEFF; color: var(--ink); font-family: inherit; font-size: 0.85rem; cursor: pointer; line-height: 1.35; }
.lvl-btn.sel { border-color: var(--peri); background: #E6DBFB; box-shadow: 0 4px 12px rgba(92,107,192,0.3); }
#info-close { position: absolute; right: 12px; top: 12px; width: 50px; height: 50px; border: none; border-radius: 50%; background: #F0E6FA; font-size: 1.2rem; cursor: pointer; }

/* recall answers a touch bigger targets */
.recall-row .choice-card { min-height: clamp(110px, 20vw, 150px); width: clamp(110px, 18vw, 150px); }
.choice-card.nudge { animation: ls-cardwig 0.5s ease; }
.choice-card.halo { border-color: var(--hot); box-shadow: 0 0 0 4px rgba(255,215,0,0.5); animation: ls-cardhalo 1.1s ease-in-out infinite; }
@keyframes ls-cardhalo { 0%, 100% { box-shadow: 0 0 0 4px rgba(255,215,0,0.4); } 50% { box-shadow: 0 0 0 10px rgba(255,215,0,0.15); } }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001s !important; }
}

/* small screens: keep narration clear of characters */
@media (max-height: 620px) {
    .choice-row { transform: translate(-50%, -52%); }
    #narration { bottom: 8px; padding: 10px 16px; }
}
