/* Bruno's Number Bakery — game styles (loads after gamekit.css) */

body {
    background: linear-gradient(180deg, #FFF3D6, #FDE7F3);
    overflow: hidden;
}

.screen {
    position: fixed;
    inset: 0;
    overflow: hidden;
}

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

#start-bg, #levels-bg, #play-bg { position: absolute; inset: 0; }

/* ── Scene loop animations (inside SVG) ── */
.spin-slow { animation: nb-spin 14s linear infinite; }
@keyframes nb-spin { to { transform: rotate(1turn); } }
.drift { animation: nb-drift 9s ease-in-out infinite alternate; }
@keyframes nb-drift { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
.sway-sign { animation: nb-sway 3.4s ease-in-out infinite alternate; }
@keyframes nb-sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* ── START ── */

.start-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 4vw, 60px);
    padding: 20px;
    flex-wrap: wrap;
    align-content: center;
}

#start-bruno {
    position: absolute;
    right: clamp(12px, 3vw, 40px);
    bottom: 1%;
    width: clamp(150px, 20vw, 230px);
    z-index: 3;
}
#start-bruno .bruno-svg { width: 100%; height: auto; animation: gk-bob 2.6s ease-in-out infinite; }

/* Bruno's 2.5s hello when the game opens: he hops in from the right, then waves. */
#start-bruno.bruno-hello { animation: nb-hello-in 1s cubic-bezier(0.3, 1.25, 0.5, 1) both; }
@keyframes nb-hello-in {
    0%   { transform: translateX(180%) translateY(0); opacity: 0; }
    35%  { opacity: 1; }
    55%  { transform: translateX(0) translateY(0); }
    70%  { transform: translateX(0) translateY(-28px); }
    84%  { transform: translateX(0) translateY(0); }
    92%  { transform: translateX(0) translateY(-8px); }
    100% { transform: translateX(0) translateY(0); }
}

.hello-bubble {
    position: absolute;
    right: clamp(150px, 21vw, 250px);
    bottom: clamp(120px, 20vh, 210px);
    z-index: 4;
    background: var(--gk-white);
    color: var(--gk-purple);
    font-size: clamp(0.95rem, 2.2vw, 1.25rem);
    font-weight: bold;
    padding: 12px 18px;
    border-radius: 20px 20px 4px 20px;
    box-shadow: var(--gk-shadow);
    max-width: 220px;
    text-align: center;
    animation: nb-bubble-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.9s both;
}
.hello-bubble::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: -12px;
    border-width: 12px 12px 0 0;
    border-style: solid;
    border-color: var(--gk-white) transparent transparent transparent;
    filter: drop-shadow(2px 3px 2px rgba(90, 60, 130, 0.12));
}
@keyframes nb-bubble-pop {
    from { opacity: 0; transform: scale(0.3) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.start-text {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    padding: 24px 34px;
    box-shadow: var(--gk-shadow);
}

.game-title {
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    line-height: 1.05;
    background: linear-gradient(90deg, #E63946, #F77F00, #FCBF49, #7CB518, #00B4D8, #B565D8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #B565D8;
    filter: drop-shadow(0 2px 0 rgba(255,255,255,0.9));
}

.tagline { font-size: clamp(1rem, 2.6vw, 1.3rem); }

.star-chip {
    background: #FFF3B0;
    border: 3px solid #FCBF49;
    border-radius: 40px;
    padding: 6px 22px;
    font-size: 1.25rem;
    font-weight: bold;
}

#btn-play { font-size: clamp(1.4rem, 4vw, 1.9rem); padding: 18px 56px; }

.info-btn {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 20;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 12px rgba(90, 60, 130, 0.25);
    font-size: 1.7rem;
    cursor: pointer;
    transition: transform 0.15s;
}
.info-btn:hover { transform: scale(1.1); }
.info-btn:active { transform: scale(0.9); }

/* ── LEVEL SELECT ── */

.levels-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vh, 26px);
    padding: 16px;
}

#levels-bruno { width: clamp(110px, 14vw, 170px); }
#levels-bruno .bruno-svg { width: 100%; height: auto; animation: gk-bob 2.6s ease-in-out infinite; }

.levels-heading {
    font-size: clamp(1.5rem, 4vw, 2.3rem);
    color: var(--gk-white);
    background: var(--gk-pink);
    padding: 8px 34px;
    border-radius: 40px;
    box-shadow: var(--gk-shadow);
}

#level-cards {
    display: flex;
    gap: clamp(10px, 2.5vw, 28px);
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 980px;
}

.level-card {
    position: relative;
    flex: 1 1 220px;
    max-width: 300px;
    min-height: 190px;
    border: none;
    border-radius: 26px;
    background: var(--gk-white);
    box-shadow: var(--gk-shadow);
    cursor: pointer;
    padding: 16px 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
    font-family: inherit;
    color: var(--gk-text);
    border-bottom: 8px solid var(--gk-pink);
}
.level-card:nth-child(2) { border-bottom-color: var(--gk-blue); }
.level-card:nth-child(3) { border-bottom-color: var(--gk-purple); }
.level-card:hover:not(.locked)  { transform: translateY(-6px) scale(1.03); }
.level-card:active:not(.locked) { transform: scale(0.96); }

.level-card .card-art { width: clamp(72px, 9vw, 100px); height: clamp(72px, 9vw, 100px); position: relative; }
.level-card .card-art .treat-svg { width: 100%; height: 100%; }
.level-card .card-art .art-stack { position: absolute; inset: 0; }
.level-card .plus-badge {
    position: absolute;
    top: -6px;
    right: -14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gk-purple);
    color: #FFF;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 38px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.level-card .card-name { font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-weight: bold; }
.level-card .card-stars { font-size: 1.3rem; letter-spacing: 2px; }
.level-card .card-stars .dim { filter: grayscale(1) opacity(0.3); }

.level-card.locked { filter: saturate(0.4); }
.level-card.locked .card-art, .level-card.locked .card-name { opacity: 0.45; }
.level-card .lock-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.level-card .lock-svg { width: 56px; height: 66px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25)); }

.level-card.shake { animation: nb-shake 0.5s ease-in-out; }
@keyframes nb-shake {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-5deg); } 40% { transform: rotate(5deg); }
    60% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); }
}

.lock-pop { animation: nb-lock-pop 0.7s cubic-bezier(0.3, 1.2, 0.5, 1) forwards; }
@keyframes nb-lock-pop {
    30% { transform: translateY(-8px) rotate(-14deg) scale(1.15); opacity: 1; }
    100% { transform: translateY(-90px) rotate(38deg) scale(0.6); opacity: 0; }
}

.sparkle-burst {
    position: absolute;
    font-size: 1.6rem;
    pointer-events: none;
    animation: nb-burst 0.9s ease-out forwards;
}
@keyframes nb-burst {
    from { transform: translate(0, 0) scale(0.4); opacity: 1; }
    to   { transform: translate(var(--bx), var(--by)) scale(1.3); opacity: 0; }
}

/* ── PLAY ── */

#screen-play {
    display: grid;
    grid-template-rows: 1fr auto;
}

.scene { position: relative; overflow: hidden; }

#stamp-row {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 30px;
    padding: 7px 16px;
    box-shadow: 0 3px 10px rgba(90, 60, 130, 0.2);
}

.stamp {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px dashed #D8C7E8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    filter: grayscale(1) opacity(0.35);
    transition: filter 0.3s;
}
.stamp.done {
    border-style: solid;
    border-color: var(--gk-green);
    filter: none;
    animation: gk-star-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.stamp .cust-svg { width: 100%; height: 100%; }

.dance-row {
    position: absolute;
    bottom: 27%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(6px, 2vw, 30px);
    z-index: 6;
    pointer-events: none;
}
.dance-cust { width: clamp(84px, 11vw, 140px); }
.dance-cust .cust-svg { width: 100%; height: auto; }

#bunting {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(46px, 8vh, 70px);
    z-index: 3;
    pointer-events: none;
    display: none;
}
#bunting.show { display: block; animation: gk-fade-in 0.6s ease-out; }
.bunting-svg { width: 100%; height: 100%; }

#customer-spot {
    position: absolute;
    left: clamp(6px, 4vw, 70px);
    bottom: 6%;
    width: clamp(130px, 17vw, 200px);
    z-index: 4;
}
.cust-svg { width: 100%; height: auto; overflow: visible; }

.cust-in    { animation: nb-cust-in 0.7s cubic-bezier(0.3, 1.25, 0.5, 1); }
@keyframes nb-cust-in {
    0%   { transform: translateX(-180%) scaleY(1); }
    62%  { transform: translateX(4%)  scaleY(0.88) scaleX(1.08); }
    82%  { transform: translateX(0)   scaleY(1.06) scaleX(0.96); }
    100% { transform: translateX(0)   scaleY(1); }
}
.cust-out { animation: nb-cust-out 0.7s ease-in forwards; }
@keyframes nb-cust-out {
    0%   { transform: translateX(0); }
    100% { transform: translateX(70vw); opacity: 0.4; }
}
.cust-jump { animation: nb-jump 0.55s ease-in-out 2; }
@keyframes nb-jump {
    0%, 100% { transform: translateY(0) scaleY(1); }
    30%      { transform: translateY(-26px) scaleY(1.06); }
    55%      { transform: translateY(0) scaleY(0.92) scaleX(1.06); }
}
.cust-puzzled .cust-head-g { animation: nb-tilt 0.9s ease-in-out; transform-origin: 70px 120px; }
@keyframes nb-tilt {
    0%, 100% { transform: rotate(0); }
    35% { transform: rotate(-9deg); } 70% { transform: rotate(7deg); }
}
.q-bubble { animation: gk-pop-in 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
.cust-lids { animation: nb-blink 4.2s infinite; opacity: 0; }
@keyframes nb-blink { 0%, 94%, 100% { opacity: 0; } 96%, 98% { opacity: 1; } }
.cust-dance { animation: nb-dance 0.5s ease-in-out infinite alternate; }
@keyframes nb-dance { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-10px); } }

#bruno-spot {
    position: absolute;
    right: clamp(340px, 32vw, 420px);
    bottom: 6%;
    width: clamp(120px, 15vw, 185px);
    z-index: 4;
    pointer-events: none;
}
#bruno-spot .bruno-svg { width: 100%; height: auto; }
#bruno-spot .bruno-idle { animation: gk-bob 2.6s ease-in-out infinite; }
.bruno-point .bruno-point { transform-origin: 52px 132px; animation: nb-pointing 0.9s ease-in-out infinite alternate; }
@keyframes nb-pointing { from { transform: rotate(0); } to { transform: rotate(10deg); } }
.bruno-cheer .bruno-arm-l, .bruno-cheer .bruno-arm-r { transform-origin: 80px 130px; animation: nb-cheer-arms 0.45s ease-in-out infinite alternate; }
@keyframes nb-cheer-arms { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

/* ── Bruno personality: blink, ear fidget, wave, happy bounce ── */
.bruno-lids { opacity: 0; }
.bruno-svg .bruno-lids { animation: nb-bruno-blink 4.6s ease-in-out infinite; }
@keyframes nb-bruno-blink {
    0%, 90%, 100% { opacity: 0; }
    93%, 96% { opacity: 1; }
}
.bruno-ears { transform-origin: 80px 34px; animation: nb-bruno-ears 6s ease-in-out infinite; }
@keyframes nb-bruno-ears {
    0%, 82%, 100% { transform: rotate(0); }
    86% { transform: rotate(-4deg); }
    90% { transform: rotate(4deg); }
    94% { transform: rotate(-2deg); }
}
.bruno-wave { transform-origin: 108px 128px; animation: nb-bruno-wave 0.5s ease-in-out infinite; }
@keyframes nb-bruno-wave {
    0%, 100% { transform: rotate(-9deg); }
    50% { transform: rotate(15deg); }
}
/* happy bounce on a correct serve (arms already wave via nb-cheer-arms) */
#bruno-spot .bruno-cheer { animation: nb-bruno-bounce 0.5s ease-in-out 2; }
@keyframes nb-bruno-bounce {
    0%, 100% { transform: translateY(0) scaleY(1); }
    30% { transform: translateY(-18px) scaleY(1.05); }
    58% { transform: translateY(0) scaleY(0.92) scaleX(1.06); }
    80% { transform: translateY(-4px) scaleY(1.01); }
}

/* ── Order card ── */

#order-card {
    position: absolute;
    top: clamp(46px, 9vh, 80px);
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    z-index: 6;
    background: var(--gk-white);
    border-radius: 22px;
    border: 4px solid var(--gk-yellow);
    box-shadow: var(--gk-shadow);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(92vw, 640px);
    animation: gk-pop-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

#order-card .face-chip {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #FDE7F3;
    border: 3px solid var(--gk-pink);
    overflow: hidden;
    flex: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
#order-card .face-chip .cust-svg { width: 86%; margin-top: 4px; }

.order-group { display: flex; align-items: center; gap: 10px; }
.order-num {
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: bold;
    color: var(--gk-orange);
    text-shadow: 0 2px 0 #FFE8C2;
    min-width: 1.1em;
    text-align: center;
}
.order-icons { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; }
.order-icons .oicon {
    width: clamp(26px, 3.4vw, 36px);
    height: clamp(26px, 3.4vw, 36px);
    filter: grayscale(0.85) opacity(0.5);
    transition: filter 0.2s, transform 0.2s;
}
.order-icons .oicon.lit { filter: none; animation: nb-icon-pop 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes nb-icon-pop { from { transform: scale(0.4); } to { transform: scale(1); } }
.order-plus {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: bold;
    color: var(--gk-purple);
    padding: 0 2px;
}

/* ── Tray ── */

#tray-wrap {
    position: absolute;
    bottom: clamp(6px, 2vh, 22px);
    left: 50%;
    transform: translateX(-50%);
    width: min(500px, 68vw);
    height: clamp(136px, 21vh, 168px);
    z-index: 5;
}
#tray-art, .tray-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

#tray-slots, #tray-items {
    position: absolute;
    inset: 10px 14px 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 4px;
}
#tray-slots { pointer-events: none; }

.ghost-slot {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 3px dashed #F4A9C4;
    opacity: 0.8;
    flex: none;
}

.tray-treat {
    width: 66px;
    height: 66px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    flex: none;
    transition: transform 0.15s;
}
.tray-treat .treat-svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgba(90,60,20,0.3)); }
.tray-treat:active { transform: scale(0.88); }
.tray-treat.recount-pulse { animation: nb-recount 0.42s ease-in-out; }
@keyframes nb-recount {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.45); filter: drop-shadow(0 0 10px #FCBF49); }
}
.tray-treat.land { animation: nb-land 0.25s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes nb-land { from { transform: scale(1.35); } to { transform: scale(1); } }

#tray-wrap.full-wiggle { animation: nb-shake 0.5s ease-in-out; }

/* ── Rack band ── */

.rack-band {
    position: relative;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px clamp(8px, 2vw, 24px) 12px;
    background:
        repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 3px, transparent 3px 90px),
        linear-gradient(180deg, #A9744F, #8B5A3C 60%, #6E4229);
    border-top: 6px solid #C9915F;
    box-shadow: 0 -6px 18px rgba(90, 60, 20, 0.3);
}

#rack-shelf { display: none; }

#rack {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(4px, 1vw, 14px);
    min-height: 84px;
}

.treat-btn {
    width: clamp(72px, 8.5vw, 86px);
    height: clamp(72px, 8.5vw, 86px);
    border: none;
    background: radial-gradient(circle at 50% 62%, rgba(255,255,255,0.42) 0 46%, transparent 52%);
    border-radius: 18px;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.15s;
    flex: none;
}
.treat-btn .treat-svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 4px rgba(60,30,0,0.35)); }
.treat-btn:hover { transform: translateY(-4px) scale(1.06); }
.treat-btn:active { transform: scale(0.9); }
.treat-btn.wiggle { animation: nb-shake 0.45s ease-in-out; }
.treat-btn.squish { animation: nb-treat-squish 0.24s ease-out; }
@keyframes nb-treat-squish {
    0%   { transform: scale(0.82) translateY(3px); }
    55%  { transform: scale(1.12) translateY(-2px); }
    100% { transform: scale(1); }
}
.treat-btn.rack-pulse .treat-svg { animation: nb-pulse 1s ease-in-out infinite; }
@keyframes nb-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); filter: drop-shadow(0 0 12px #FFF3B0); }
}

#serve-bell {
    width: clamp(96px, 11vw, 120px);
    height: clamp(88px, 10vw, 108px);
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    flex: none;
    transition: transform 0.15s;
}
#serve-bell .bell-svg { width: 100%; height: 100%; }
#serve-bell:active:not(:disabled) { transform: scale(0.9); }
#serve-bell:disabled { opacity: 0.6; cursor: default; }
#serve-bell.bell-pulse .bell-svg { animation: nb-pulse 0.9s ease-in-out infinite; }
#serve-bell.ringing { animation: nb-ring 0.6s ease-in-out; }
#serve-bell.ringing .bell-ding { opacity: 1; }
@keyframes nb-ring {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(-12deg); } 35% { transform: rotate(10deg); }
    55% { transform: rotate(-7deg); } 75% { transform: rotate(5deg); }
}

/* ── Flying treats / hearts / count burst ── */

.fly-treat {
    position: fixed;
    z-index: 60;
    pointer-events: none;
    width: 66px;
    height: 66px;
}
.fly-treat .treat-svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 5px rgba(60,30,0,0.3)); }

.float-heart {
    position: fixed;
    z-index: 60;
    width: 34px;
    height: 34px;
    pointer-events: none;
    animation: nb-heart 1.3s ease-out both;
}
.heart-svg { width: 100%; height: 100%; }
@keyframes nb-heart {
    from { transform: translateY(0) scale(0.5); opacity: 1; }
    to   { transform: translateY(-110px) scale(1.15); opacity: 0; }
}

.count-burst {
    position: fixed;
    z-index: 60;
    pointer-events: none;
    font-size: 2.3rem;
    font-weight: bold;
    color: var(--gk-orange);
    text-shadow: 0 2px 0 #FFF, 0 4px 8px rgba(0,0,0,0.18);
    animation: nb-count 0.8s ease-out forwards;
}
@keyframes nb-count {
    from { transform: translateY(6px) scale(0.5); opacity: 1; }
    60%  { transform: translateY(-30px) scale(1.2); opacity: 1; }
    to   { transform: translateY(-52px) scale(1.1); opacity: 0; }
}

/* ── Oven steam ── */

.oven-steam circle { opacity: 0; }
.oven-steam.steaming circle { animation: nb-steam 1.6s ease-out infinite; }
.oven-steam.steaming circle:nth-child(2) { animation-delay: 0.35s; }
.oven-steam.steaming circle:nth-child(3) { animation-delay: 0.7s; }
@keyframes nb-steam {
    0%   { opacity: 0; transform: translateY(10px) scale(0.6); }
    35%  { opacity: 0.9; }
    100% { opacity: 0; transform: translateY(-46px) scale(1.3); }
}
.oven-glow { transition: fill 0.5s; }
.oven-hot .oven-glow { fill: #FFD24A; filter: drop-shadow(0 0 14px #FFB25E); }

/* ── Ghost hand ── */

#ghost-hand {
    position: fixed;
    z-index: 70;
    width: 74px;
    height: 84px;
    pointer-events: none;
    transition: left 0.8s ease-in-out, top 0.8s ease-in-out;
}
.hand-svg { width: 100%; height: 100%; }
#ghost-hand.tapping { animation: nb-hand-tap 1.1s ease-in-out infinite; }
@keyframes nb-hand-tap {
    0%, 100% { transform: translateY(0) scale(1); }
    45% { transform: translateY(14px) scale(0.86); }
    60% { transform: translateY(14px) scale(0.86); }
}

/* ── Grown-ups popover ── */

#grownups {
    position: fixed;
    inset: 0;
    z-index: 930;
    background: rgba(74, 59, 92, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gk-fade-in 0.25s ease-out;
}

.grownups-card {
    position: relative;
    max-width: min(90vw, 540px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 26px 30px;
    animation: gk-pop-in 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.grownups-card h3 { font-size: 1.5rem; color: var(--gk-purple); margin-bottom: 10px; padding-right: 64px; }
.grownups-card p { font-size: 1.05rem; line-height: 1.5; margin-bottom: 10px; }
.tip-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #FDF3E3;
    border-radius: 16px;
    padding: 12px 14px;
}
.tip-icons { font-size: 2rem; line-height: 1.2; }
.tip-row p { margin: 0; font-size: 0.98rem; }

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    background: #FDE7F3;
    color: var(--gk-pink);
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s;
}
.close-btn:hover { transform: scale(1.1); }
.close-btn:active { transform: scale(0.9); }

/* ── Portrait tuning ── */

@media (max-aspect-ratio: 5/6) {
    #customer-spot { left: 4vw; bottom: 23%; width: clamp(120px, 26vw, 180px); }
    #bruno-spot { right: 3vw; bottom: 23%; width: clamp(105px, 22vw, 160px); }
    #order-card { top: clamp(56px, 8vh, 90px); flex-wrap: wrap; justify-content: center; }
    #tray-wrap { width: min(470px, 88vw); }
    .rack-band { flex-wrap: nowrap; }
    #rack { max-width: 440px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .spin-slow, .drift, .sway-sign, .cust-lids, .cust-dance,
    #serve-bell.bell-pulse, .treat-btn.rack-pulse .treat-svg,
    #serve-bell.bell-pulse .bell-svg,
    #ghost-hand.tapping, .bruno-point .bruno-point,
    .bruno-cheer .bruno-arm-l, .bruno-cheer .bruno-arm-r,
    #start-bruno .bruno-svg, #levels-bruno .bruno-svg,
    .bruno-svg .bruno-lids, .bruno-ears, .bruno-wave,
    #bruno-spot .bruno-cheer, #start-bruno.bruno-hello,
    .hello-bubble, .treat-btn.squish,
    .oven-steam.steaming circle { animation: none; }
    /* keep Bruno on-screen if his hop-in is suppressed */
    #start-bruno.bruno-hello { transform: none; opacity: 1; }
    .hello-bubble { opacity: 1; }
}
