/* Nia's Coral Quest — styles. Loads after gamekit.css.
   Palette: undersea aurora — lagoon teal over deep violet water with pearl-pink
   bioluminescence. Distinct from every other game's :root (checked). */

:root {
    --cq-abyss: #1B0E47;
    --cq-deep: #2A1660;
    --cq-water: #3A2380;
    --cq-lagoon: #2FA7A0;
    --cq-aqua: #5FD9C8;
    --cq-glow: #8FF7DE;
    --cq-pink: #FF9BC8;
    --cq-rose: #F2699C;
    --cq-lilac: #BE8EE6;
    --cq-pearl: #FFF1F7;
    --cq-cream: #FFF6E6;
    --cq-gold: #FFD98E;
    --cq-ink: #241540;
    --cq-font: 'Comic Sans MS', 'Chalkboard SE', 'Baloo 2', 'Segoe UI', Arial, sans-serif;
}

body { font-family: var(--cq-font); background: var(--cq-abyss); 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 water depth ───────────────────────────────── */
#sea { z-index: 0; }
#drift { z-index: 1; }
#plankton { z-index: 2; }

.sea-grad { position: absolute; inset: 0; background:
    linear-gradient(180deg, #2FA7A0 -12%, #3A2380 36%, #2A1660 72%, #1B0E47 100%); }
.sea-spark, .drift-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.spk { animation: cq-spk 3.2s ease-in-out infinite; }
@keyframes cq-spk { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

.drift-svg { animation: cq-drift 90s linear infinite; }
@keyframes cq-drift { 0%, 100% { transform: translateX(-2%); } 50% { transform: translateX(2%); } }

.mote {
    position: absolute; width: 6px; height: 6px; border-radius: 50%;
    background: radial-gradient(circle, rgba(143,247,222,0.85), rgba(143,247,222,0));
    animation: cq-mote 9s ease-in-out infinite;
}
@keyframes cq-mote { 0%, 100% { transform: translateY(0); opacity: 0.15; } 50% { transform: translateY(-26px); opacity: 0.75; } }

/* backdrop life */
.scene-ground { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bbl { animation: cq-bbl 8s linear infinite; }
@keyframes cq-bbl { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.55; } 100% { transform: translateY(-46vh); opacity: 0; } }
.cq-kelp { animation: cq-sway 5s ease-in-out infinite; }
.cq-anem { animation: cq-sway 4s ease-in-out infinite; }
@keyframes cq-sway { 0%, 100% { transform: rotate(-2.4deg); } 50% { transform: rotate(2.4deg); } }
.cq-rays { animation: cq-raysh 7s ease-in-out infinite; }
@keyframes cq-raysh { 0%, 100% { opacity: 0.16; } 50% { opacity: 0.26; } }
.cq-aur { animation: cq-aur 8s ease-in-out infinite; }
@keyframes cq-aur { 0%, 100% { transform: translateX(0); opacity: 0.35; } 50% { transform: translateX(-12px); opacity: 0.55; } }
.cq-tideband { animation: cq-tide 4.4s ease-in-out infinite; }
@keyframes cq-tide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }
.cq-pearl-lit { animation: cq-pearlpulse 3s ease-in-out infinite; }
@keyframes cq-pearlpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }
.cq-hornbeam { animation: cq-beam 5s ease-in-out infinite; }
@keyframes cq-beam { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
.cq-poolmoon { animation: cq-poolm 6s ease-in-out infinite; }
@keyframes cq-poolm { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.ink-fw { animation: cq-inkfw 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes cq-inkfw { 0% { opacity: 0; transform: scale(0.5); } 30% { opacity: 1; transform: scale(1.06); } 70% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.2); } }
.cq-bob { animation: cq-bobk 3.4s ease-in-out infinite; }
@keyframes cq-bobk { 0%, 100% { transform: translate(var(--tx, 0), 0); } 50% { transform: translate(var(--tx, 0), -7px); } }
.clam-one { animation: cq-clam 2.4s ease-in-out infinite; transform-origin: center bottom; }
@keyframes cq-clam { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.cq-notes { animation: cq-notes 2s ease-in-out infinite; }
@keyframes cq-notes { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }

/* ══════════════════════════════════════════════════════════════
   TITLE
   ══════════════════════════════════════════════════════════════ */
#screen-title {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; justify-content: safe center;
    gap: clamp(8px, 1.6vh, 16px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 12px 74px;
}
@media (max-width: 719px) {
    #screen-title { padding-top: var(--gk-hud-clear-top); justify-content: flex-start; }
}

#title-head { text-align: center; pointer-events: none; z-index: 6; max-width: 94vw; flex: none; }
.game-title {
    font-size: clamp(2rem, 7.4vw, 4.2rem); font-weight: 800; line-height: 1.02;
    color: var(--cq-glow);
    text-shadow: 0 0 22px rgba(143, 247, 222, 0.55), 0 4px 0 #1E7E78, 0 7px 16px rgba(0, 0, 0, 0.45);
    letter-spacing: 1px;
    animation: cq-title-bob 5.5s ease-in-out infinite;
}
#screen-title.rainbow .game-title {
    background: linear-gradient(90deg, #FF8FA8, #FFD98E, #8FF7DE, #7FB2F2, #C89EF2);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}
@keyframes cq-title-bob { 0%, 100% { transform: translateY(0) rotate(-0.6deg); } 50% { transform: translateY(-6px) rotate(0.6deg); } }
.tagline { color: var(--cq-pearl); font-size: clamp(0.95rem, 3.4vw, 1.3rem); font-weight: 700; margin-top: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.tagline b { color: var(--cq-gold); }

#title-scene {
    width: min(88vw, 500px); height: clamp(150px, 30vh, 320px);
    border-radius: 26px; overflow: hidden; flex: none;
    border: 4px solid rgba(255, 241, 247, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(27, 14, 71, 0.4);
}
.title-svg { width: 100%; height: 100%; display: block; }

#start-btn {
    position: relative; flex: none;
    min-height: 74px; padding: 14px 34px 14px 66px;
    border: none; border-radius: 60px; cursor: pointer; z-index: 8;
    background: linear-gradient(135deg, var(--cq-rose), var(--cq-lilac));
    color: #fff; font-family: inherit; font-size: clamp(1.2rem, 4.6vw, 1.6rem); font-weight: 800;
    box-shadow: 0 8px 26px rgba(242, 105, 156, 0.5), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
    animation: cq-start-pulse 1.9s ease-in-out infinite;
}
.start-pearl {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: radial-gradient(circle at 36% 32%, #fff, #FFE3F0 45%, #F7C0DC 78%, #D9A0E8);
    box-shadow: 0 0 16px rgba(255, 227, 240, 0.9);
}
@keyframes cq-start-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
#start-btn:active { transform: scale(0.95); }

#title-stickers { display: flex; gap: 8px; z-index: 6; flex: none; }
.mini-stk { width: clamp(42px, 12vw, 56px); height: clamp(42px, 12vw, 56px); opacity: 0.85; }
.mini-stk .stk { width: 100%; height: 100%; }
.mini-stk.owned { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 217, 142, 0.55)); }

#tide-row { font-size: 1.15rem; z-index: 6; flex: none; letter-spacing: 4px; }
.tide-dot { opacity: 0.25; filter: grayscale(1); }
.tide-dot.on { opacity: 0.8; filter: none; }
.tide-dot.sel { opacity: 1; text-shadow: 0 0 10px rgba(95, 217, 200, 0.9); }

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

.info-btn {
    position: absolute; left: 14px; bottom: 14px; width: 52px; height: 52px;
    border: none; border-radius: 50%;
    background: rgba(255, 246, 230, 0.88); font-size: 1.4rem; cursor: pointer; z-index: 40;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.info-btn:active { transform: scale(0.92); }

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

#moon-clock {
    position: absolute; left: 10px; top: 10px; width: 62px; height: 62px; z-index: 4;
    background: rgba(27, 14, 71, 0.45); border-radius: 18px; pointer-events: none;
    box-shadow: inset 0 0 0 2px rgba(190, 142, 230, 0.35);
}
#moon-clock svg { 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;
    pointer-events: auto; cursor: pointer;
    width: clamp(110px, 16vw, 170px);
    animation: cq-char-in 0.6s ease-out backwards;
}
@keyframes cq-char-in { from { opacity: 0; transform: translate(-50%, -44%) scale(var(--s, 1)); } to { opacity: 1; transform: translate(-50%, -50%) scale(var(--s, 1)); } }
.char-slot svg, .char-slot .nia-wrap { width: 100%; height: auto; display: block; overflow: visible; }
.char-nia { width: clamp(140px, 21vw, 210px); }
.char-bub { width: clamp(100px, 15vw, 150px); }
.char-sun { width: clamp(130px, 19vw, 195px); }
.char-inka { width: clamp(110px, 16vw, 160px); }
.char-clams { width: clamp(120px, 18vw, 185px); }
.char-pearl { width: clamp(60px, 9vw, 92px); }
.char-specs { width: clamp(70px, 11vw, 105px); }
.char-slot.react { animation: cq-react 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes cq-react { 0% { transform: translate(-50%, -50%) scale(var(--s, 1)); } 40% { transform: translate(-50%, -54%) scale(calc(var(--s, 1) * 1.1)); } 100% { transform: translate(-50%, -50%) scale(var(--s, 1)); } }
.char-slot.tappable { animation: cq-invite 1.5s ease-in-out infinite; }
@keyframes cq-invite { 0%, 100% { transform: translate(-50%, -50%) scale(var(--s, 1)); } 50% { transform: translate(-50%, -50%) scale(calc(var(--s, 1) * 1.07)); } }

/* Nia rig: --glow 0..5 drives horn light */
.nia-wrap { --glow: 1; position: relative; }
.nia-halo {
    position: absolute; left: 18%; top: 2%; width: 46%; height: 46%;
    transform: translate(-50%, -50%) scale(calc(0.5 + var(--glow) * 0.22));
    background: radial-gradient(circle, rgba(143, 247, 222, 0.85) 0%, rgba(143, 247, 222, 0.3) 45%, rgba(143, 247, 222, 0) 72%);
    opacity: calc(0.1 + var(--glow) * 0.16);
    pointer-events: none; transition: transform 0.6s ease, opacity 0.6s ease;
    animation: cq-halo 3s ease-in-out infinite;
}
@keyframes cq-halo { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }
.nia { position: relative; }
.nia-horntip { filter: drop-shadow(0 0 calc(2px + var(--glow) * 2.4px) rgba(143, 247, 222, 0.95)); }
.nia-eyes { transform-origin: 95px 66px; animation: cq-blink 4.6s infinite; }
@keyframes cq-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5%, 97.5% { transform: scaleY(0.1); } }
.nia-tail { transform-origin: 160px 100px; animation: cq-tailwag 3.2s ease-in-out infinite; }
@keyframes cq-tailwag { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(6deg); } }
.nia-fin { transform-origin: 96px 98px; animation: cq-finwag 2.8s ease-in-out infinite; }
@keyframes cq-finwag { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg); } }
.nia.bloom { animation: cq-bloom 0.65s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes cq-bloom { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Bubbles rig */
.bub { transform-origin: 50% 60%; }
.bub-p1 { animation: cq-fret 2.2s ease-in-out infinite; }
.bub-p2 { animation: cq-fret 1.4s ease-in-out infinite; }
@keyframes cq-fret { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.bub-eyes { animation: cq-blink 3.8s infinite; transform-origin: center; }
.bub-finl { transform-origin: 40px 60px; animation: cq-finwag 1.6s ease-in-out infinite; }
.bub-sweat { animation: cq-sweat 1.8s ease-in-out infinite; }
@keyframes cq-sweat { 0%, 100% { opacity: 0.2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(4px); } }

/* Sunny rig */
.sun-head { transform-origin: 64px 70px; animation: cq-sunnod 6s ease-in-out infinite; }
@keyframes cq-sunnod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg); } }
.sun-flipf { transform-origin: 80px 108px; animation: cq-paddle 3.6s ease-in-out infinite; }
@keyframes cq-paddle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(9deg); } }
.sun-eyes { animation: cq-blink 6.4s infinite; transform-origin: center; }

/* Inka rig */
.ink-arm { animation: cq-arm 3.4s ease-in-out infinite; }
@keyframes cq-arm { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg); } }
.inka-eyes { animation: cq-blink 3.4s infinite; transform-origin: center; }
.ink-cloud { transition: opacity 0.8s ease; }

/* fx moments */
#screen-stage.fx-spin .char-bub { animation: cq-spinaway 2.4s ease-in-out; }
@keyframes cq-spinaway {
    0% { transform: translate(-50%, -50%) scale(var(--s, 1)) rotate(0); }
    35% { transform: translate(-24%, -66%) scale(var(--s, 1)) rotate(200deg); }
    65% { transform: translate(-70%, -44%) scale(var(--s, 1)) rotate(420deg); }
    100% { transform: translate(-50%, -50%) scale(var(--s, 1)) rotate(720deg); }
}
#screen-stage.fx-breath .char-bub { animation: cq-settle 2.6s ease-out; }
@keyframes cq-settle { 0% { transform: translate(-50%, -62%) scale(calc(var(--s, 1) * 1.3)); } 60% { transform: translate(-50%, -48%) scale(calc(var(--s, 1) * 0.96)); } 100% { transform: translate(-50%, -50%) scale(var(--s, 1)); } }
#screen-stage.fx-ink #beat-layer::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 55% 55%, rgba(42, 22, 96, 0.95) 0%, rgba(42, 22, 96, 0.55) 42%, rgba(42, 22, 96, 0) 70%);
    animation: cq-inkflash 2.6s ease-out forwards;
}
@keyframes cq-inkflash { 0% { opacity: 0; transform: scale(0.3); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.4); } }
#screen-stage.fx-whoosh .char-slot { animation: cq-whooshby 2.2s ease-in-out; }
@keyframes cq-whooshby { 0% { transform: translate(-160%, -50%) scale(var(--s, 1)); } 70% { transform: translate(-42%, -52%) scale(var(--s, 1)); } 100% { transform: translate(-50%, -50%) scale(var(--s, 1)); } }
#screen-stage.fx-bounce .char-slot { animation: cq-parade 1.6s ease-in-out infinite; }
@keyframes cq-parade { 0%, 100% { transform: translate(-50%, -50%) scale(var(--s, 1)); } 50% { transform: translate(-50%, -58%) scale(var(--s, 1)); } }

/* bubble page-wipe */
#wipe.go { animation: cq-wipe 0.55s ease-out; }
#wipe.go::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 15% 30%, rgba(143, 247, 222, 0.85), transparent 11%),
                radial-gradient(circle at 35% 65%, rgba(255, 155, 200, 0.75), transparent 10%),
                radial-gradient(circle at 55% 25%, rgba(255, 241, 247, 0.9), transparent 12%),
                radial-gradient(circle at 75% 60%, rgba(95, 217, 200, 0.75), transparent 10%),
                radial-gradient(circle at 90% 35%, rgba(190, 142, 230, 0.8), transparent 11%),
                linear-gradient(90deg, rgba(42, 22, 96, 0.96), rgba(42, 22, 96, 0));
    animation: cq-wipe-move 0.55s ease-out;
}
@keyframes cq-wipe { from { opacity: 1; } to { opacity: 0; } }
@keyframes cq-wipe-move { from { transform: translateX(-100%); } to { transform: translateX(120%); } }

/* ── narration bar ── */
#narration {
    position: absolute; left: 50%; bottom: clamp(12px, 3.6vh, 36px); transform: translateX(-50%);
    width: min(88vw, 700px); background: linear-gradient(180deg, #FFFDF8, #FBE9F2);
    border: 3px solid var(--cq-ink); border-radius: 24px; padding: 14px 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); display: flex; align-items: center; gap: 12px;
    animation: cq-narr-in 0.4s cubic-bezier(0.2, 1.3, 0.4, 1);
}
@keyframes cq-narr-in { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
#narr-text { font-size: clamp(1.02rem, 2.9vw, 1.35rem); color: var(--cq-ink); font-weight: 700; line-height: 1.42; flex: 1; }
.wg { transition: color 0.2s, transform 0.2s; display: inline-block; margin-right: 0.34em; transform-origin: center bottom; }
.wg.on { color: #C13D78; transform: scale(1.06); }
#ear-btn {
    flex: none; width: 56px; height: 56px; border: none; border-radius: 50%;
    background: var(--cq-aqua); font-size: 1.6rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: cq-ear 2.4s ease-in-out infinite;
}
@keyframes cq-ear { 0%, 100% { transform: scale(1) rotate(-4deg); } 50% { transform: scale(1.08) rotate(4deg); } }

/* ── next arrow ── */
#next-arrow {
    position: absolute; right: clamp(14px, 4vw, 40px); bottom: clamp(150px, 26vh, 210px);
    width: 88px; height: 88px; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #C4FFF0, var(--cq-aqua));
    cursor: pointer; border: 3px solid var(--cq-ink);
    box-shadow: 0 8px 22px rgba(95, 217, 200, 0.55);
    animation: cq-arrow-pulse 1.3s ease-in-out infinite;
    display: flex; align-items: center; justify-content: center;
}
#next-arrow svg { width: 60%; height: 60%; }
@keyframes cq-arrow-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 8px 22px rgba(95, 217, 200, 0.55); } 50% { transform: scale(1.1); box-shadow: 0 8px 30px rgba(143, 247, 222, 0.85); } }
#next-arrow:active { transform: scale(0.92); }

/* ── how-to ghost hand ── */
#howto-hand {
    position: fixed; font-size: 2.6rem; pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    animation: cq-hand 1.2s ease-in-out infinite;
}
@keyframes cq-hand { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6px, -12px) scale(1.12); } }

/* ── choices ── */
.choice-wrap {
    position: absolute; left: 0; right: 0;
    top: var(--gk-hud-clear-top); bottom: clamp(120px, 23vh, 168px);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; justify-content: safe center;
    gap: clamp(8px, 1.6vh, 14px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 4px 10px;
}
.choose-banner {
    flex: none;
    background: linear-gradient(180deg, #FFE9F4, #F7C0DC); color: var(--cq-ink);
    font-size: clamp(1.15rem, 4.2vw, 1.7rem); font-weight: 800; padding: 10px 26px;
    border: 3px solid var(--cq-ink); border-radius: 22px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    animation: cq-boing 0.6s cubic-bezier(0.2, 1.7, 0.4, 1); white-space: nowrap;
}
.choose-banner.soft { background: linear-gradient(180deg, #D8F7EF, #A8E8DB); }
@keyframes cq-boing { 0% { transform: translateY(-60px) scale(0.6); } 60% { transform: translateY(6px) scale(1.08); } 100% { transform: translateY(0) scale(1); } }

.choice-col { display: flex; flex-direction: column; gap: clamp(8px, 1.4vh, 12px); width: min(92vw, 540px); align-items: stretch; }
.choice-col.duo { flex-direction: row; justify-content: center; }
.choice-col.duo .choice-card { flex: 1 1 0; min-width: 0; flex-direction: column; min-height: clamp(120px, 20vh, 170px); padding: 10px 8px; }

.choice-card {
    display: flex; align-items: center; gap: 14px;
    min-height: 92px; padding: 10px 18px;
    background: linear-gradient(180deg, #FFFDF8, #F0E2FA);
    border: 4px solid var(--cq-ink); border-radius: 26px;
    cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s, opacity 0.4s;
    animation: cq-card-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
    font-family: inherit; text-align: left;
}
@keyframes cq-card-in { from { opacity: 0; transform: translateY(24px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
.cc-vig { flex: none; width: clamp(56px, 9vw, 72px); height: clamp(56px, 9vw, 72px); }
.cc-vig svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.2)); }
.cc-word { font-size: clamp(1.15rem, 4vw, 1.5rem); font-weight: 800; color: var(--cq-ink); }
.choice-card.golden {
    background: linear-gradient(180deg, #FFF6DC, #FFE2A8);
    border-color: #C98F2E;
    box-shadow: 0 10px 26px rgba(255, 217, 142, 0.55);
}
.choice-card.wiggle { animation: cq-cardwig 0.6s ease-in-out; }
@keyframes cq-cardwig { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg) scale(1.03); } 75% { transform: rotate(2deg) scale(1.03); } }
.choice-card.faded { opacity: 0.15; transform: scale(0.9); pointer-events: none; }
.choice-card.picked { animation: cq-picked 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; border-color: var(--cq-gold); box-shadow: 0 12px 30px rgba(255, 217, 142, 0.6); }
@keyframes cq-picked { to { transform: scale(1.06); } }
.choice-card:active { transform: scale(0.96); }
.choice-card.nudge { animation: cq-cardwig 0.5s ease; }
.choice-card.halo { border-color: var(--cq-gold); animation: cq-cardhalo 1.1s ease-in-out infinite; }
@keyframes cq-cardhalo { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 217, 142, 0.4); } 50% { box-shadow: 0 0 0 10px rgba(255, 217, 142, 0.15); } }

/* ── find objects ── */
.find-obj {
    position: absolute; transform: translate(-50%, -50%);
    width: clamp(74px, 12vw, 100px); height: clamp(74px, 12vw, 100px);
    border: none; background: none; cursor: pointer; padding: 0;
    animation: cq-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.4)); }
.find-obj.is-correct svg { filter: drop-shadow(0 0 12px rgba(255, 227, 240, 0.95)); }
@keyframes cq-shimmer { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -52%) scale(1.05); } }
.find-obj.nudge { animation: cq-objnudge 0.5s ease; }
@keyframes cq-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: cq-objfound 1s ease forwards; z-index: 3; }
@keyframes cq-objfound { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.4); } 100% { transform: translate(0, -240%) scale(0.25); opacity: 0; } }
.find-obj.fade { animation: cq-objfade 0.5s ease forwards; }
@keyframes cq-objfade { to { opacity: 0.12; transform: translate(-50%, -50%) scale(0.8); } }
.find-obj.halo::after {
    content: ''; position: absolute; inset: -16%; border-radius: 50%;
    border: 4px solid rgba(255, 217, 142, 0.9); animation: cq-findhalo 1.1s ease-in-out infinite;
}
@keyframes cq-findhalo { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.2); opacity: 1; } }

/* ══════════════════════════════════════════════════════════════
   STICKER BOOK
   ══════════════════════════════════════════════════════════════ */
#screen-book { display: flex; align-items: center; justify-content: center; }
#book-card {
    position: relative;
    width: min(92vw, 680px); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
    background: linear-gradient(180deg, #35216E, #241456);
    border: 5px solid #6A4FB2; border-radius: 30px; padding: clamp(16px, 3vw, 26px); text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
#book-title { color: var(--cq-gold); font-size: clamp(1.3rem, 4.6vw, 1.9rem); margin-bottom: 4px; text-shadow: 0 0 14px rgba(255, 217, 142, 0.4); }
#book-count { color: var(--cq-pearl); font-weight: 700; margin-bottom: 10px; font-size: clamp(0.9rem, 3vw, 1.05rem); }
#book-rainbow {
    margin: 0 auto 12px; padding: 8px 16px; border-radius: 18px; font-weight: 800; width: fit-content;
    color: var(--cq-ink); background: linear-gradient(90deg, #FF8FA8, #FFD98E, #8FF7DE, #7FB2F2, #C89EF2);
}
#book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: clamp(10px, 2.4vw, 16px); margin-bottom: 16px; }
.book-slot { background: rgba(27, 14, 71, 0.7); border: 3px solid #4A3492; border-radius: 22px; padding: 10px; }
.book-slot.found { border-color: var(--cq-gold); box-shadow: inset 0 0 22px rgba(255, 217, 142, 0.22); }
.slot-art { width: 100%; max-width: 130px; margin: 0 auto; }
.slot-art .stk { width: 100%; height: auto; }
.book-slot.found .slot-art { animation: cq-spk 3s ease-in-out infinite; }
.slot-name { margin-top: 6px; color: var(--cq-cream); font-weight: 700; font-size: clamp(0.85rem, 2.5vw, 1.05rem); }
.book-slot.stamp { animation: cq-stamp 0.7s cubic-bezier(0.2, 1.8, 0.4, 1); }
@keyframes cq-stamp { 0% { transform: scale(2.1) 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); } }
#book-again { margin: 0 auto; }
#book-close {
    position: absolute; right: 12px; top: 12px; width: 52px; height: 52px; border: none; border-radius: 50%;
    background: rgba(255, 246, 230, 0.9); font-size: 1.2rem; cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════
   GROWN-UPS
   ══════════════════════════════════════════════════════════════ */
#info-overlay { position: fixed; inset: 0; z-index: 930; background: rgba(20, 10, 44, 0.65); 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: #6A4FB2; margin-bottom: 8px; }
#info-card p { color: var(--cq-ink); line-height: 1.5; margin-bottom: 6px; }
.info-block { margin-top: 14px; padding-top: 12px; border-top: 2px dashed #E8D9F2; }
.info-block h3 { color: #C13D78; 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: 76px; padding: 8px; border: 3px solid #D8C9F0; border-radius: 18px; background: #F6EEFF; color: var(--cq-ink); font-family: inherit; font-size: 0.85rem; cursor: pointer; line-height: 1.35; }
.lvl-btn.sel { border-color: #6A4FB2; background: #E6DBFB; box-shadow: 0 4px 12px rgba(106, 79, 178, 0.3); }
.lvl-btn.locked { opacity: 0.6; }
#info-close { position: absolute; right: 12px; top: 12px; width: 52px; height: 52px; border: none; border-radius: 50%; background: #F0E6FA; font-size: 1.2rem; cursor: pointer; }

/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION — everything settles to its rest pose, no strobe
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
    }
}

/* short screens: keep the choice stack + narration comfortable */
@media (max-height: 620px) {
    #narration { bottom: 8px; padding: 10px 14px; }
    #next-arrow { bottom: 132px; width: 80px; height: 80px; }
}
