/* Zuki's Shape Rocket — game styles. Loads after shared/gamekit.css. */

:root {
    --navy: #2A3B6E;
    --navy-deep: #243363;
    --navy-light: #31437C;
    --zuki-gutter: 128px;
}

body {
    background: #1B1440;
    overflow: hidden;
}

/* ═══════════════════════════ layered scene ═══════════════════════════ */

#scene {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

#sky { position: absolute; inset: 0; }

body.lv1 #sky {
    background: linear-gradient(180deg,
        #1B1440 0%, #33265C 30%, #6A4A9E 55%, #B4649A 74%, #F2A97E 90%, #FFDCA8 100%);
}
body.lv2 #sky {
    background: linear-gradient(180deg,
        #1173A8 0%, #0D5E92 30%, #0B4A79 58%, #093A61 80%, #082C4C 100%);
}
body.lv3 #sky {
    background: linear-gradient(180deg,
        #6EC1E8 0%, #93D4EF 40%, #C8EBE2 68%, #FFF3D6 100%);
}

/* rays / glow layer: moon+horizon (lv1), god-rays (lv2), sun (lv3) */
#rays { position: absolute; inset: 0; }
body.lv1 #rays {
    background:
        radial-gradient(circle at 15% 14%, rgba(255, 250, 228, 0.95) 0 22px, rgba(255, 250, 228, 0.22) 40px, transparent 90px),
        radial-gradient(ellipse at 50% 84%, rgba(255, 188, 116, 0.38) 0%, transparent 62%);
}
body.lv2 #rays {
    background:
        repeating-linear-gradient(102deg,
            rgba(210, 245, 255, 0.10) 0 34px, transparent 34px 110px, rgba(210, 245, 255, 0.06) 110px 150px, transparent 150px 230px),
        radial-gradient(ellipse at 50% -10%, rgba(190, 240, 255, 0.35), transparent 55%);
}
body.lv3 #rays {
    background:
        radial-gradient(circle at 84% 12%, rgba(255, 243, 176, 0.95) 0 46px, rgba(255, 226, 130, 0.35) 90px, transparent 190px);
}

/* twinkling stars */
#stars { position: absolute; inset: 0; }
.tw {
    position: absolute;
    border-radius: 50%;
    background: #FFF6DC;
    box-shadow: 0 0 6px rgba(255, 246, 220, 0.9);
    animation: gk-twinkle 2.4s ease-in-out infinite;
}
body.lv2 #stars { opacity: 0.25; }
body.lv3 #stars { display: none; }

/* drifting clouds */
.cloud {
    position: absolute;
    left: -280px;
    width: 200px;
    height: 58px;
    border-radius: 60px;
    background: #6C5AA8;
    opacity: 0.55;
    animation: cloud-drift 80s linear infinite;
}
.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}
.cloud::before { width: 92px; height: 92px; top: -46px; left: 34px; }
.cloud::after  { width: 64px; height: 64px; top: -30px; right: 28px; }
#cloud-a { top: 11%; animation-delay: -12s; }
#cloud-b { top: 26%; --cs: 0.62; animation-duration: 105s; animation-delay: -52s; }
#cloud-c { top: 4%;  --cs: 0.82; animation-duration: 122s; animation-delay: -88s; }
@keyframes cloud-drift {
    from { transform: translateX(0) scale(var(--cs, 1)); }
    to   { transform: translateX(calc(100vw + 600px)) scale(var(--cs, 1)); }
}
body.lv2 .cloud { display: none; }
body.lv3 .cloud { background: #FFFFFF; opacity: 0.92; }

/* rising bubbles (undersea) */
#bubbles { position: absolute; inset: 0; display: none; }
body.lv2 #bubbles { display: block; }
.bubble {
    position: absolute;
    bottom: -40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.05));
    animation: bubble-rise 9s linear infinite;
}
@keyframes bubble-rise {
    from { transform: translateY(0); opacity: 0.9; }
    to   { transform: translateY(-112vh); opacity: 0.2; }
}

/* passing fish silhouette (undersea) */
#fish { display: none; }
body.lv2 #fish {
    display: block;
    position: absolute;
    bottom: 33%;
    left: 0;
    width: 110px;
    height: 50px;
    opacity: 0.5;
    animation: fish-swim 26s linear infinite;
}
#fish::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 78px;
    height: 34px;
    border-radius: 50%;
    background: #0A2E4E;
}
#fish::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 11px;
    border-right: 26px solid #0A2E4E;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}
@keyframes fish-swim {
    0%   { transform: translateX(-140px) translateY(0); }
    50%  { transform: translateX(calc(50vw)) translateY(-26px); }
    100% { transform: translateX(calc(100vw + 140px)) translateY(0); }
}

/* far silhouettes + ground strip */
#bg-far {
    position: absolute;
    left: 0; right: 0;
    bottom: 17%;
    height: 30%;
}
#bg-far svg { width: 100%; height: 100%; display: block; }
body.lv2 .kelp > rect {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: kelp-sway 4.4s ease-in-out infinite alternate;
}
body.lv2 .kelp > rect:nth-child(2) { animation-delay: -1.6s; }
body.lv2 .kelp > rect:nth-child(3) { animation-delay: -2.9s; }
@keyframes kelp-sway {
    from { transform: rotate(-4deg); }
    to   { transform: rotate(4deg); }
}

#ground {
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    height: 19%;
}
#ground svg { width: 100%; height: 100%; display: block; }

/* speed-line streaks — only while the rocket launches */
#streaks { position: absolute; inset: 0; display: none; }
body.lv1.payoff #streaks { display: block; }
.streak {
    position: absolute;
    top: -160px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85));
    animation: streak-fall 0.7s linear infinite;
}
@keyframes streak-fall {
    to { transform: translateY(130vh); }
}

/* screen shake at liftoff */
body.shake #screen-play,
body.shake #scene { animation: quake 0.32s linear; }
@keyframes quake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-5px, 4px); }
    40% { transform: translate(5px, -3px); }
    60% { transform: translate(-4px, -4px); }
    80% { transform: translate(4px, 3px); }
}

/* ═══════════════════════════ Zuki the Build-Bot ═══════════════════════════ */

.zuki { display: block; width: 100%; height: 100%; overflow: visible; }
.zuki .z-all,
.zuki .z-head,
.zuki .z-eye,
.zuki .z-arm,
.zuki .z-arm-l,
.zuki .z-star,
.zuki .z-wrench { transform-box: fill-box; }

.zuki-title .z-all, .zuki-mini .z-all { animation: gk-bob 3s ease-in-out infinite; }

.zuki .z-eye {
    transform-origin: center;
    animation: z-blink 4.6s infinite;
}
@keyframes z-blink {
    0%, 90%, 98%, 100% { transform: scaleY(1); }
    93%, 95%           { transform: scaleY(0.12); }
}

.zuki .z-arm {
    transform-origin: 8% 62%;
    animation: z-wave 3.6s ease-in-out infinite;
}
@keyframes z-wave {
    0%, 44%, 100% { transform: rotate(0deg); }
    8%  { transform: rotate(-16deg); }
    18% { transform: rotate(7deg); }
    28% { transform: rotate(-12deg); }
    38% { transform: rotate(0deg); }
}

.zuki .z-star {
    transform-origin: center;
    animation: z-star-tw 2.3s ease-in-out infinite;
}
@keyframes z-star-tw {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50%      { transform: scale(1.24) rotate(14deg); opacity: 0.82; }
}

.zuki.hop .z-all { animation: z-hop 0.85s cubic-bezier(0.3, 1.5, 0.4, 1); }
@keyframes z-hop {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-26px); }
    55%  { transform: translateY(0); }
    72%  { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.zuki.tilt .z-head { animation: z-tilt 0.9s ease; transform-origin: 50% 85%; }
@keyframes z-tilt {
    0%, 100% { transform: rotate(0deg); }
    25%, 65% { transform: rotate(-11deg); }
}

/* ═══════════════════════════ screens ═══════════════════════════ */

.screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
}

/* ── TITLE ── */

#screen-title {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#title-stage {
    display: flex;
    align-items: center;
    gap: clamp(8px, 4vw, 64px);
    max-width: 1100px;
}

#title-zuki { width: clamp(190px, 27vw, 330px); flex: none; }
#title-zuki .zuki { filter: drop-shadow(0 10px 22px rgba(20, 10, 50, 0.45)); }

#title-words {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(8px, 2vh, 18px);
}

#wordmark .wm-top {
    display: block;
    font-size: clamp(1.5rem, 3.6vw, 2.3rem);
    color: #FFDCA8;
    transform: rotate(-3deg);
    text-shadow: 0 2px 0 rgba(60, 30, 90, 0.45);
    letter-spacing: 1px;
}
#wordmark .wm-main {
    display: block;
    font-size: clamp(2.5rem, 7vw, 4.7rem);
    line-height: 1.05;
    color: #FFFFFF;
    letter-spacing: 2px;
    text-shadow:
        0 4px 0 var(--gk-purple),
        0 8px 0 rgba(90, 40, 130, 0.45),
        0 14px 34px rgba(10, 5, 40, 0.55);
}

#tagline {
    color: #FFEBD0;
    font-size: clamp(1rem, 2.6vw, 1.4rem);
    text-shadow: 0 2px 8px rgba(40, 20, 70, 0.6);
}
#tagline strong { color: #FFD166; }

#title-shapes { display: flex; gap: clamp(6px, 1.4vw, 14px); margin: 2px 0 6px; }
.tshape {
    display: block;
    width: clamp(34px, 4.4vw, 48px);
    height: clamp(34px, 4.4vw, 48px);
    filter: drop-shadow(0 5px 8px rgba(15, 8, 45, 0.5));
    animation: gk-bob 2.6s ease-in-out infinite;
}
.tshape svg { width: 100%; height: 100%; }

#btn-start {
    position: relative;
    min-height: 86px;
    padding: 18px 58px;
    font-size: clamp(1.5rem, 4vw, 2.05rem);
    letter-spacing: 1px;
}
#btn-start::after {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 60px;
    border: 4px solid rgba(255, 255, 255, 0.75);
    animation: ring-pulse 1.7s ease-out infinite;
    pointer-events: none;
}
#btn-start .btn-inner { display: inline-block; animation: btn-breathe 1.7s ease-in-out infinite; }
@keyframes ring-pulse {
    0%        { transform: scale(1); opacity: 0.85; }
    70%, 100% { transform: scale(1.22); opacity: 0; }
}
@keyframes btn-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

#title-stars { min-height: 34px; font-size: 1.5rem; letter-spacing: 3px; }
.ts-count { filter: drop-shadow(0 3px 5px rgba(20, 10, 50, 0.5)); }

/* ── BUILD PICKER ── */

#screen-picker {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3.4vh, 30px);
    padding: 78px 16px 24px;
}

#picker-head { display: flex; align-items: center; gap: 18px; }
#picker-zuki { width: clamp(72px, 10vw, 112px); flex: none; }
#picker-title {
    color: #FFFFFF;
    font-size: clamp(1.5rem, 4vw, 2.3rem);
    text-shadow: 0 3px 0 rgba(90, 50, 140, 0.5), 0 8px 22px rgba(10, 5, 40, 0.45);
}

#cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(14px, 3vw, 32px);
}

.build-card {
    position: relative;
    width: clamp(196px, 24vw, 244px);
    height: clamp(216px, 30vh, 266px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 14px 14px;
    border: none;
    border-radius: 28px;
    background: linear-gradient(180deg, #FFFDF6 0%, #FFF1D6 100%);
    box-shadow: var(--gk-shadow), inset 0 -7px 0 rgba(205, 165, 95, 0.28);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
}
.build-card:hover  { transform: translateY(-5px) scale(1.02); }
.build-card:active { transform: scale(0.97); }

.card-emoji { position: absolute; top: 12px; left: 14px; font-size: 1.6rem; }
.card-art {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini { max-width: 84%; max-height: 96%; filter: drop-shadow(0 5px 8px rgba(90, 60, 130, 0.28)); }
.card-stars { font-size: 1.3rem; letter-spacing: 3px; }
.cstar { filter: grayscale(1) opacity(0.28); }
.cstar.lit { filter: none; }

.build-card.locked { background: linear-gradient(180deg, #EFEAE2 0%, #DDD2C2 100%); }
.build-card.locked .mini { filter: grayscale(0.95) brightness(0.55) opacity(0.45); }
.card-q {
    position: absolute;
    font-size: 3.4rem;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 0 3px 0 rgba(90, 70, 40, 0.55), 0 8px 18px rgba(40, 25, 5, 0.35);
}
.card-lock { position: absolute; top: 12px; right: 14px; font-size: 1.5rem; }

.build-card.wiggling { animation: card-wiggle 0.55s ease; }
@keyframes card-wiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-5deg); }
    40% { transform: rotate(5deg); }
    60% { transform: rotate(-4deg); }
    80% { transform: rotate(3deg); }
}

.build-card.just-unlocked { animation: unlock-pop 1.1s cubic-bezier(0.2, 1.4, 0.4, 1) 0.15s backwards; }
.build-card.just-unlocked::after {
    content: '✨';
    position: absolute;
    top: -14px;
    right: -8px;
    font-size: 2.1rem;
    animation: gk-twinkle 1.4s ease-in-out infinite;
}
@keyframes unlock-pop {
    0%  { transform: scale(0.6) rotate(-6deg); }
    55% { transform: scale(1.1) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ── PLAY ── */

#screen-play { flex-direction: column; }

#stage {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 76px 18px 8px calc(18px + var(--zuki-gutter));
}

#panel-wrap { position: relative; }

/* blueprint easel — all panel chrome lives on #panel-skin so it can
   dissolve while the finished rocket climbs into open sky */
#blueprint { position: relative; }

#panel-skin {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(160deg, var(--navy-light) 0%, var(--navy-deep) 100%);
    border: 3px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 16px 38px rgba(8, 12, 40, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.14);
    transition: opacity 1.3s ease 1s;
}
#panel-skin::before { /* grid lines */
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 14px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    transition: opacity 0.9s;
    pointer-events: none;
}
#panel-skin::after { /* clipboard clip */
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 92px;
    height: 24px;
    background: linear-gradient(180deg, #A7B0D2 0%, #7D88B0 100%);
    border-radius: 12px 12px 7px 7px;
    box-shadow: inset 0 -3px 0 rgba(20, 25, 60, 0.3), 0 3px 8px rgba(8, 12, 40, 0.4);
}
#blueprint.develop #panel-skin::before { opacity: 0; }
#blueprint.develop #machine { filter: saturate(1.25) brightness(1.06); }
body.lv1.payoff #panel-skin,
body.lv2.payoff #panel-skin { opacity: 0; } /* rocket climbs into open sky; sub dives into open sea */

#machine {
    position: absolute;
    inset: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    overflow: visible;
    transition: filter 0.9s;
}

/* shine sweep on the developed blueprint */
#shine {
    position: absolute;
    inset: 0;
    border-radius: 19px;
    overflow: hidden;
    pointer-events: none;
}
#shine.sweep::before {
    content: '';
    position: absolute;
    top: -25%;
    bottom: -25%;
    left: -45%;
    width: 36%;
    background: linear-gradient(78deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: shine-sweep 0.9s ease-out forwards;
}
@keyframes shine-sweep {
    to { transform: translateX(500%); }
}

/* slot states */
.slot .halo { opacity: 0; }
.slot.active .halo { animation: halo-pulse 1.6s ease-in-out infinite; }
@keyframes halo-pulse {
    0%, 100% { opacity: 0.10; }
    50%      { opacity: 0.24; }
}

.slot .outline-shape { transition: opacity 0.3s; }
.slot.active .outline-shape {
    stroke: #FFFFFF;
    stroke-width: 4;
    filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.95));
    animation: dash-march 1s linear infinite;
}
@keyframes dash-march {
    to { stroke-dashoffset: -18; }
}

.slot .slot-fill { opacity: 0; pointer-events: none; }
.slot.filled .slot-fill {
    opacity: 1;
    transform-box: fill-box;
    transform-origin: center;
    animation: part-pop 0.42s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.slot.filled .slot-outline { opacity: 0; }
@keyframes part-pop {
    0%   { transform: scale(0.7); }
    60%  { transform: scale(1.07); }
    100% { transform: scale(1); }
}

.slot.renudge {
    transform-box: fill-box;
    transform-origin: center;
    animation: renudge 0.7s ease;
}
@keyframes renudge {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.07); }
    65% { transform: scale(0.98); }
}

/* progress pips */
#pips {
    display: flex;
    justify-content: center;
    gap: 11px;
    margin-top: 12px;
    transition: opacity 0.4s;
}
body.payoff #pips { opacity: 0; }
.pip {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}
.pip.done {
    background: radial-gradient(circle at 40% 32%, #B9E86A, var(--gk-green) 70%);
    box-shadow: 0 0 8px rgba(163, 217, 90, 0.8);
    animation: pip-pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes pip-pop {
    from { transform: scale(0.3); }
    to   { transform: scale(1); }
}

/* Zuki beside the panel, scooting to the active slot */
#zuki-wrap {
    position: absolute;
    top: 0;
    right: calc(100% + 4px);
    width: var(--zuki-gutter);
    height: 100%;
    pointer-events: none;
}
#zuki-scoot {
    position: absolute;
    top: 0;
    right: 0;
    transition: transform 0.7s cubic-bezier(0.3, 1.25, 0.4, 1);
}
#play-zuki { width: 100%; height: 100%; }
#play-zuki .zuki { filter: drop-shadow(0 8px 14px rgba(15, 8, 45, 0.5)); }

/* ── parts tray ── */

#tray {
    position: relative;
    z-index: 15;
    flex: none;
    height: clamp(190px, 27vh, 252px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 12px 14px;
    background: linear-gradient(180deg, #FFF8EC 0%, #F3E3C0 100%);
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -10px 32px rgba(60, 35, 10, 0.28), inset 0 3px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.6s ease-in;
}
#tray.away { transform: translateY(130%); }

#tray-lip {
    position: absolute;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 10px;
    border-radius: 5px;
    background: #E2CB9C;
    box-shadow: inset 0 2px 2px rgba(120, 85, 30, 0.25);
}

#chips { display: flex; gap: clamp(16px, 3vw, 36px); }

.chip {
    width: clamp(106px, 13vw, 134px);
    height: clamp(106px, 13vw, 134px);
    padding: 10px;
    border: none;
    border-radius: 26px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FBF0DA 100%);
    box-shadow:
        0 9px 20px rgba(115, 75, 15, 0.28),
        inset 0 -6px 0 rgba(212, 175, 108, 0.42);
    cursor: pointer;
    transition: transform 0.15s, opacity 0.3s, box-shadow 0.15s;
}
.chip:hover { box-shadow: 0 12px 24px rgba(115, 75, 15, 0.34), inset 0 -6px 0 rgba(212, 175, 108, 0.42); }

.chip-art {
    display: block;
    width: 100%;
    height: 100%;
    animation: chip-bob 2.5s ease-in-out infinite;
}
.chip-art svg { width: 100%; height: 100%; }
@keyframes chip-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

.chip.lift { transform: translateY(-9px) scale(1.08); }

.chip.shake { animation: chip-shake 0.4s ease; }
@keyframes chip-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-11px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-7px); }
    80% { transform: translateX(5px); }
}

.chip.hint { animation: hint-glow 1.1s ease-in-out infinite; }
@keyframes hint-glow {
    0%, 100% {
        box-shadow: 0 9px 20px rgba(115, 75, 15, 0.28), 0 0 0 0 rgba(252, 191, 73, 0.9),
            inset 0 -6px 0 rgba(212, 175, 108, 0.42);
    }
    50% {
        box-shadow: 0 9px 20px rgba(115, 75, 15, 0.28), 0 0 0 12px rgba(252, 191, 73, 0),
            inset 0 -6px 0 rgba(212, 175, 108, 0.42);
    }
}

.chip.spent {
    opacity: 0;
    transform: scale(0.4);
    pointer-events: none;
}

/* ── giant GO button ── */

#btn-go {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 30;
    width: 178px;
    height: 148px;
    border: none;
    border-radius: 80px;
    background: radial-gradient(circle at 50% 32%, #B5E063 0%, var(--gk-green) 58%, #5E8C12 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 3.1rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 4px 0 rgba(55, 88, 8, 0.55);
    box-shadow:
        0 14px 34px rgba(50, 100, 10, 0.55),
        inset 0 5px 0 rgba(255, 255, 255, 0.4),
        inset 0 -8px 0 rgba(45, 75, 5, 0.35);
    cursor: pointer;
    transform: translate(-50%, 300%);
    transition: transform 0.55s cubic-bezier(0.2, 1.35, 0.4, 1);
}
#btn-go.up { transform: translate(-50%, 0); }
#btn-go.up::after {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 90px;
    border: 5px solid rgba(255, 255, 255, 0.8);
    animation: ring-pulse 1.4s ease-out infinite;
    pointer-events: none;
}
#btn-go .btn-inner { display: inline-block; animation: btn-breathe 1.4s ease-in-out infinite; }

/* ── countdown ── */

#countdown {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(18, 12, 48, 0) 32%, rgba(18, 12, 48, 0.4) 100%);
    pointer-events: none;
}
#count-num {
    font-size: clamp(9rem, 38vmin, 19rem);
    font-weight: bold;
    color: #FFFFFF;
    text-shadow:
        0 7px 0 var(--gk-purple),
        0 14px 0 rgba(90, 40, 130, 0.4),
        0 22px 50px rgba(0, 0, 0, 0.5);
}
#count-num.zoom { animation: num-zoom 0.72s cubic-bezier(0.2, 1, 0.4, 1); }
@keyframes num-zoom {
    0%   { transform: scale(2.6); opacity: 0; }
    35%  { opacity: 1; }
    100% { transform: scale(1); opacity: 0.95; }
}

/* ── fx layer: chip flights, snap rings, sparkles, coach arrow ── */

#fx-layer {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
}

.fly {
    position: absolute;
    will-change: transform;
    filter: drop-shadow(0 9px 13px rgba(15, 8, 45, 0.4));
}
.fly svg { width: 100%; height: 100%; overflow: visible; }
.fly.ghost { opacity: 0.4; filter: none; }

.flash-ring {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    border: 5px solid #FFFFFF;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
    animation: ring-out 0.55s ease-out forwards;
}
@keyframes ring-out {
    0%   { transform: scale(0.4); opacity: 1; }
    100% { transform: scale(4.8); opacity: 0; }
}

.sparkle-bit {
    position: absolute;
    margin: -11px 0 0 -11px;
    color: #FFF3B0;
    font-size: 22px;
    text-shadow: 0 0 9px #FCBF49;
    animation: spark-fly 0.72s ease-out forwards;
}
@keyframes spark-fly {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(1.25); opacity: 0; }
}

#howto-arrow {
    position: fixed;
    z-index: 65;
    height: 9px;
    border-radius: 5px;
    transform-origin: 0 50%;
    background: repeating-linear-gradient(90deg, #FFF3B0 0 15px, transparent 15px 27px);
    filter: drop-shadow(0 0 6px rgba(252, 191, 73, 0.9));
    pointer-events: none;
    animation: arrow-dash 0.6s linear infinite;
}
#howto-arrow::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    margin-top: -12px;
    border-left: 19px solid #FFF3B0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}
@keyframes arrow-dash {
    to { background-position: 27px 0; }
}

/* ═════════════════════ launch payoffs (per level) ═════════════════════ */

.pay-hide { opacity: 0; transition: opacity 0.3s; }
#machine.payoff .pay-hide { opacity: 1; }

/* level 1 — rocket blasts off */
body.lv1 #machine.payoff #g-machine {
    animation: rocket-up 3.6s cubic-bezier(0.6, 0, 0.85, 0.4) 0.25s forwards;
}
@keyframes rocket-up {
    0%   { transform: translateY(0); }
    14%  { transform: translateY(7px); }
    100% { transform: translateY(-620px); }
}
#machine.payoff #g-flame polygon {
    transform-box: fill-box;
    transform-origin: 50% 0;
    animation: flame-flick 0.16s ease-in-out infinite alternate;
}
@keyframes flame-flick {
    from { transform: scaleY(1) scaleX(1); }
    to   { transform: scaleY(1.3) scaleX(0.88); }
}
#machine.payoff .smoke {
    transform-box: fill-box;
    transform-origin: center;
    animation: smoke-puff 1.5s ease-out infinite;
}
.smoke.sm2 { animation-delay: 0.22s; }
.smoke.sm3 { animation-delay: 0.4s; }
.smoke.sm4 { animation-delay: 0.62s; }
.smoke.sm5 { animation-delay: 0.83s; }
@keyframes smoke-puff {
    0%   { transform: translate(0, 0) scale(0.35); opacity: 0.95; }
    100% { transform: translate(0, -16px) scale(1.9); opacity: 0; }
}

/* level 2 — submarine dives */
body.lv2 #machine.payoff #g-machine {
    animation: sub-dive 3.8s ease-in-out 0.2s forwards;
}
@keyframes sub-dive {
    0%   { transform: translate(0, 0) rotate(0deg); }
    30%  { transform: translate(-18px, 30px) rotate(3deg); }
    100% { transform: translate(-52px, 172px) rotate(6deg); }
}
#g-prop {
    transform-box: fill-box;
    transform-origin: center;
    animation: prop-spin 2.4s linear infinite;
}
#machine.payoff #g-prop { animation-duration: 0.32s; }
@keyframes prop-spin {
    to { transform: rotate(360deg); }
}
#machine.payoff .bub {
    transform-box: fill-box;
    transform-origin: center;
    animation: bub-up 1.5s ease-in infinite;
}
.bub.b2 { animation-delay: 0.3s; }
.bub.b3 { animation-delay: 0.55s; }
.bub.b4 { animation-delay: 0.8s; }
.bub.b5 { animation-delay: 1.05s; }
@keyframes bub-up {
    0%   { transform: translateY(0) scale(0.5); opacity: 0.9; }
    100% { transform: translateY(-85px) scale(1.25); opacity: 0; }
}

/* level 3 — castle party: flags flutter, drawbridge drops, fireworks */
#machine.payoff .flag polygon {
    transform-box: fill-box;
    transform-origin: 0 50%;
    animation: flag-flutter 0.55s ease-in-out infinite alternate;
}
.flag.fl2 polygon { animation-delay: 0.25s; }
@keyframes flag-flutter {
    from { transform: skewY(0deg) scaleX(1); }
    to   { transform: skewY(7deg) scaleX(0.9); }
}
#machine.payoff #g-bridge {
    transform-box: fill-box;
    transform-origin: 50% 0;
    animation: bridge-drop 0.85s cubic-bezier(0.3, 1.3, 0.5, 1) 0.35s backwards;
}
@keyframes bridge-drop {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}
/* the outer .fw group keeps its translate(...) position attribute; only the
   inner .fw-anim group animates, so the bursts stay above the towers */
#machine.payoff .fw-anim {
    transform-box: fill-box;
    transform-origin: center;
    animation: fw-pop 1.7s ease-out infinite;
    opacity: 0;
}
#machine.payoff .fw2 .fw-anim { animation-delay: 0.55s; }
#machine.payoff .fw3 .fw-anim { animation-delay: 1.1s; }
@keyframes fw-pop {
    0%   { transform: scale(0.12); opacity: 0; }
    12%  { opacity: 1; }
    55%  { transform: scale(1.12); opacity: 0.95; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ═══════════════════════════ grown-ups note ═══════════════════════════ */

#info-btn {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 40;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 12px rgba(90, 60, 130, 0.3);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s;
}
#info-btn:hover  { transform: scale(1.1); }
#info-btn:active { transform: scale(0.92); }
body.scr-play #info-btn { display: none; }

#info-overlay {
    position: fixed;
    inset: 0;
    z-index: 920;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(74, 59, 92, 0.55);
    animation: gk-fade-in 0.25s ease-out;
}
#info-card {
    max-width: 560px;
    max-height: 86vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: gk-pop-in 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
#info-card h2 { color: var(--gk-orange); font-size: 1.5rem; }
#info-card p { line-height: 1.55; font-size: 1.02rem; }
#info-card .info-tip { font-size: 0.9rem; opacity: 0.75; }
#info-close { align-self: center; min-height: 64px; }

/* ═══════════════════════════ responsive ═══════════════════════════ */

@media (max-width: 900px) {
    #title-stage { flex-direction: column; gap: 4px; }
    #title-zuki { width: clamp(150px, 26vh, 230px); }
    #stage { --zuki-gutter: 118px; padding-right: 12px; }
}

@media (max-height: 800px) {
    #screen-picker { padding-top: 72px; }
    .build-card { height: clamp(200px, 34vh, 250px); }
}

/* ═══════════════════════════ launch trail + parallax planets ═══════════════════════════ */

.trail-bit {
    position: absolute;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    opacity: 0.95;
    will-change: transform, opacity;
    animation: trail-fade 0.72s ease-out forwards;
}
@keyframes trail-fade {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.95; }
    100% { transform: translate(var(--tx, 0), var(--ty, 60px)) scale(0.25); opacity: 0; }
}

#planets { position: absolute; inset: 0; display: none; }
body.lv1.payoff #planets { display: block; }
.planet { position: absolute; opacity: 0; }
.planet svg { width: 100%; height: 100%; display: block; }
.planet.p1 { top: -16%; left: 11%;  width: 120px; height: 120px; animation: planet-rush 3.4s ease-in 0.3s forwards; }
.planet.p2 { top: -12%; right: 15%; width: 78px;  height: 78px;  animation: planet-rush 3s   ease-in 0.9s forwards; }
@keyframes planet-rush {
    0%   { transform: translateY(-30px) scale(0.7); opacity: 0; }
    18%  { opacity: 0.9; }
    100% { transform: translateY(122vh) scale(1.12); opacity: 0; }
}

/* ═══════════════════════════ Zuki big-joy cheer + proud build wiggle ═══════════════════════════ */

.zuki.cheer .z-all, .zuki-cheer .z-all { animation: z-cheer 0.9s ease-in-out infinite; }
@keyframes z-cheer {
    0%, 100% { transform: translateY(0); }
    30%      { transform: translateY(-18px); }
    60%      { transform: translateY(0); }
}
.zuki.cheer .z-arm, .zuki-cheer .z-arm {
    transform-origin: 8% 62%;
    animation: z-arm-up 0.9s ease-in-out infinite;
}
@keyframes z-arm-up { 0%, 100% { transform: rotate(-40deg); } 50% { transform: rotate(-60deg); } }
.zuki.cheer .z-arm-l, .zuki-cheer .z-arm-l {
    transform-origin: 92% 62%;
    animation: z-arm-up-l 0.9s ease-in-out infinite;
}
@keyframes z-arm-up-l { 0%, 100% { transform: rotate(40deg); } 50% { transform: rotate(60deg); } }

#m-parts.wiggle {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: parts-wiggle 1.7s ease-in-out infinite;
}
@keyframes parts-wiggle {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25%      { transform: rotate(-1.7deg); }
    50%      { transform: rotate(0deg) translateY(-4px); }
    75%      { transform: rotate(1.7deg); }
}
#machine.payoff #m-parts.wiggle { animation: none; }   /* stop wiggling once it launches */

/* ═══════════════════════════ arrival cinema ═══════════════════════════ */

#arrival {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}
#arrival.show { opacity: 1; }
#arrival.arr-rocket { background: radial-gradient(circle at 50% 22%, #2A2358 0%, #140B33 55%, #080418 100%); }
#arrival.arr-sub    { background: linear-gradient(180deg, #0E6699 0%, #094A79 55%, #05263F 100%); }
#arrival.arr-castle { background: linear-gradient(180deg, #8FD3F0 0%, #C8EBE2 55%, #FFF3D6 100%); }

.arr-veil { position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 50% 40%, transparent 45%, rgba(0, 0, 0, 0.28) 100%); }
#arrival.arr-rocket .arr-veil {
    background:
        radial-gradient(1.6px 1.6px at 18% 24%, #fff, transparent),
        radial-gradient(1.6px 1.6px at 68% 14%, #fff, transparent),
        radial-gradient(2px 2px   at 41% 33%, #fff, transparent),
        radial-gradient(1.6px 1.6px at 84% 40%, #fff, transparent),
        radial-gradient(1.6px 1.6px at 9%  56%, #fff, transparent),
        radial-gradient(2px 2px   at 60% 50%, #fff, transparent),
        radial-gradient(1.4px 1.4px at 32% 60%, #fff, transparent),
        radial-gradient(circle at 50% 38%, transparent 46%, rgba(0, 0, 0, 0.3) 100%);
}
#arrival.arr-castle .arr-veil { background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.18), transparent 62%); }

.arr-svg { position: relative; z-index: 1; width: min(94vw, 780px); height: min(82vh, 600px); max-width: 100%; }

.arr-banner { position: absolute; z-index: 3; top: clamp(10px, 6vh, 58px); left: 0; right: 0; text-align: center; pointer-events: none; padding: 0 12px; }
.arr-banner span {
    display: inline-block;
    max-width: 94%;
    padding: 10px 30px;
    background: linear-gradient(180deg, #FFFDF6, #FFE7B8);
    border-radius: 44px;
    font-size: clamp(1.3rem, 4.8vw, 2.5rem);
    font-weight: bold;
    color: #4A3B5C;
    box-shadow: 0 8px 24px rgba(20, 12, 50, 0.45), inset 0 3px 0 rgba(255, 255, 255, 0.7);
    animation: arr-banner-in 0.7s cubic-bezier(0.2, 1.5, 0.4, 1) 0.35s backwards;
}
@keyframes arr-banner-in { from { transform: translateY(-34px) scale(0.7); opacity: 0; } }

.arr-crew {
    position: absolute;
    z-index: 2;
    left: 0; right: 0;
    bottom: clamp(6px, 3vh, 42px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(4px, 4vw, 46px);
    padding: 0 12px;
    pointer-events: none;
}
.arr-zuki { width: clamp(122px, 22vw, 220px); }
.arr-zuki .zuki { width: 100%; height: auto; filter: drop-shadow(0 10px 16px rgba(8, 4, 30, 0.5)); }
.arr-friend { width: clamp(58px, 11vw, 116px); }
.fbot { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 12px rgba(8, 4, 30, 0.45)); }
.arr-friend.af1 { animation: friend-jump 0.7s ease-in-out infinite; }
.arr-friend.af2 { animation: friend-jump 0.7s ease-in-out infinite 0.35s; }
@keyframes friend-jump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.fbot .fb-arm-l { transform-box: fill-box; transform-origin: 100% 50%; animation: fb-wave 0.6s ease-in-out infinite alternate; }
.fbot .fb-arm-r { transform-box: fill-box; transform-origin: 0% 50%;   animation: fb-wave-r 0.6s ease-in-out infinite alternate; }
@keyframes fb-wave   { from { transform: rotate(12deg); }  to { transform: rotate(42deg); } }
@keyframes fb-wave-r { from { transform: rotate(-12deg); } to { transform: rotate(-42deg); } }

/* scene sub-animations (all clipped inside the SVG, never affect page flow) */
.arr-earth { transform-box: fill-box; transform-origin: center; animation: gk-bob 4s ease-in-out infinite; }
.arr-moon  { transform-box: fill-box; transform-origin: 50% 100%; animation: arr-rise 0.9s ease-out backwards; }
@keyframes arr-rise { from { transform: translateY(90px); opacity: 0; } }
.arr-rocket { transform-box: fill-box; transform-origin: 50% 100%; animation: arr-land 0.9s cubic-bezier(0.3, 1.3, 0.5, 1) 0.25s backwards; }
@keyframes arr-land { from { transform: translateY(-300px); } }
.arr-flag { transform-box: fill-box; transform-origin: 50% 100%; animation: arr-plant 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 1s backwards; }
@keyframes arr-plant { from { transform: scaleY(0); } }
.arr-flag-cloth { transform-box: fill-box; transform-origin: 0% 50%; animation: arr-flutter 0.5s ease-in-out infinite alternate 1.4s; }
@keyframes arr-flutter { from { transform: skewY(0deg) scaleX(1); } to { transform: skewY(6deg) scaleX(0.92); } }
.arr-spark { transform-box: fill-box; transform-origin: center; animation: arr-tw 1.4s ease-in-out infinite; }
.arr-spark.as2 { animation-delay: 0.5s; }
.arr-spark.as3 { animation-delay: 0.9s; }
@keyframes arr-tw { 0%, 100% { transform: scale(0.5); opacity: 0.3; } 50% { transform: scale(1.15); opacity: 1; } }

.arr-sub { transform-box: fill-box; transform-origin: center; animation: arr-bob 2.4s ease-in-out infinite; }
@keyframes arr-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.arr-lid { transform-box: fill-box; transform-origin: 50% 100%; animation: arr-open 0.8s cubic-bezier(0.3, 1.2, 0.5, 1) 0.6s both; }
@keyframes arr-open { from { transform: rotate(0deg); } to { transform: rotate(-24deg); } }
.arr-gold { transform-box: fill-box; transform-origin: 50% 100%; animation: arr-gold-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 1.1s backwards; }
@keyframes arr-gold-pop { from { transform: translateY(14px) scale(0.4); opacity: 0; } }
.arr-fish { transform-box: fill-box; transform-origin: center; }
.arr-fish.af-a { animation: arr-fishA 5s ease-in-out infinite; }
.arr-fish.af-b { animation: arr-fishB 6s ease-in-out infinite; }
@keyframes arr-fishA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -12px); } }
@keyframes arr-fishB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 12px); } }

.arr-castle { transform-box: fill-box; transform-origin: 50% 100%; animation: arr-pop 0.8s cubic-bezier(0.2, 1.5, 0.4, 1) 0.2s backwards; }
@keyframes arr-pop { from { transform: scale(0.4); opacity: 0; } }
.arr-sun { transform-box: fill-box; transform-origin: center; animation: arr-spin 22s linear infinite; }
@keyframes arr-spin { to { transform: rotate(360deg); } }
.arr-bunting { transform-box: fill-box; transform-origin: 50% 0; animation: arr-sway 2.6s ease-in-out infinite alternate; }
@keyframes arr-sway { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }

/* ═══════════════════════════ picker foot: destinations map + garage entry ═══════════════════════════ */

#picker-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 2px; }
#dest-map { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dest { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.14); }
.dest-ico { font-size: 1.5rem; filter: grayscale(0.7) opacity(0.55); }
.dest-name { font-size: 0.72rem; color: rgba(255, 255, 255, 0.72); }
.dest.reached { background: rgba(255, 243, 176, 0.22); }
.dest.reached .dest-ico { filter: none; }
.dest.reached .dest-name { color: #FFF3B0; font-weight: bold; }
.dest-link { width: 20px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
#btn-garage { min-height: 54px; padding: 12px 30px; font-size: 1.1rem; }
#btn-garage .btn-inner { display: inline-block; }

.build-card.recommended { box-shadow: var(--gk-shadow), inset 0 -7px 0 rgba(205, 165, 95, 0.28), 0 0 0 4px var(--gk-green); }
.card-continue {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--gk-green);
    color: #FFFFFF; font-weight: bold; font-size: 0.85rem;
    padding: 4px 14px; border-radius: 20px;
    box-shadow: 0 4px 10px rgba(50, 90, 10, 0.4);
    white-space: nowrap;
    animation: gk-bob 1.6s ease-in-out infinite;
}

/* ═══════════════════════════ rocket garage ═══════════════════════════ */

#garage-overlay {
    position: fixed;
    inset: 0;
    z-index: 920;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(30, 20, 60, 0.62);
    animation: gk-fade-in 0.25s ease-out;
}
#garage-card {
    width: min(680px, 96vw);
    max-height: 88vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: gk-pop-in 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
#garage-title { color: var(--gk-purple); font-size: clamp(1.4rem, 4vw, 1.9rem); text-align: center; }
.g-sub { text-align: center; font-size: 1rem; opacity: 0.85; }
.g-head { font-size: 1.12rem; color: var(--gk-orange); margin-top: 6px; }

.paint-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.paint {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    width: clamp(118px, 30%, 150px);
    min-height: 96px;
    padding: 10px 8px;
    border: 3px solid transparent;
    border-radius: 18px;
    background: #FFFDF6;
    box-shadow: 0 4px 12px rgba(90, 60, 130, 0.16);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, border-color 0.15s;
}
.paint:hover { transform: translateY(-3px); }
.paint:active { transform: scale(0.97); }
.paint-chip { width: 54px; height: 54px; border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.2); }
.paint-name { font-size: 0.9rem; font-weight: bold; color: #4A3B5C; text-align: center; line-height: 1.15; }
.paint-tag { font-size: 0.78rem; color: #7A6A8C; }
.paint.equipped { border-color: var(--gk-green); background: #F2FBE4; }
.paint.equipped .paint-tag { color: #5E8C12; font-weight: bold; }
.paint.locked { filter: grayscale(0.5) opacity(0.72); }
.paint.locked .paint-chip { filter: grayscale(0.8); }
.paint.locked .paint-tag { color: #A06A2E; }
.paint.nope { animation: card-wiggle 0.5s ease; }

.stamp-row, .badge-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.stamp, .badge {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    width: clamp(84px, 30%, 120px);
    padding: 8px;
    border-radius: 16px;
    background: #F6EFFC;
    text-align: center;
}
.stamp-ico, .badge-ico { font-size: 1.9rem; }
.stamp-name, .badge-name { font-size: 0.76rem; color: #6A5A7C; line-height: 1.1; }
.stamp.got, .badge.got { background: linear-gradient(180deg, #FFF7DE, #FFE7B0); }
.stamp:not(.got), .badge:not(.got) { filter: grayscale(0.6) opacity(0.7); }
.stamp.got .stamp-name, .badge.got .badge-name { color: #4A3B5C; font-weight: 600; }
#garage-close { align-self: center; min-height: 56px; margin-top: 6px; }

/* ═══════════════════════════ reduced motion ═══════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .cloud, .tw, .bubble, .streak, #fish,
    .chip-art, .tshape,
    .zuki .z-arm, .zuki .z-eye, .zuki .z-star,
    .zuki-title .z-all, .zuki-mini .z-all,
    #btn-start .btn-inner, #btn-start::after,
    #btn-go .btn-inner, #btn-go.up::after,
    #howto-arrow,
    .slot.active .outline-shape,
    body.lv2 .kelp > rect,
    #g-prop { animation: none !important; }

    body.lv1 #machine.payoff #g-machine { animation-duration: 1.4s; }
    body.lv2 #machine.payoff #g-machine { animation-duration: 1.4s; }
    #machine.payoff .fw-anim { animation: none; opacity: 0.9; }
    body.shake #screen-play, body.shake #scene { animation: none; }
    #tray, #btn-go, #zuki-scoot { transition-duration: 0.01s; }

    .trail-bit, .planet,
    .zuki.cheer .z-all, .zuki-cheer .z-all,
    .zuki.cheer .z-arm, .zuki-cheer .z-arm,
    .zuki.cheer .z-arm-l, .zuki-cheer .z-arm-l,
    #m-parts.wiggle, .card-continue,
    .arr-earth, .arr-moon, .arr-rocket, .arr-flag, .arr-flag-cloth, .arr-spark,
    .arr-sub, .arr-lid, .arr-gold, .arr-fish, .arr-castle, .arr-sun, .arr-bunting,
    .arr-banner span, .arr-friend, .fbot .fb-arm-l, .fbot .fb-arm-r { animation: none !important; }
    #arrival { transition: opacity 0.2s ease; }
    .arr-lid { transform: rotate(-24deg); }   /* keep the treasure chest open */
}
