/* UI 2.0 "toy box" (Nov 16, 2026): design tokens + components for a premium, tactile kids' game look.
   Loaded LAST by index.html / hd-map.html (and the dev pages), after zoo.css, zoo-theme.css and first-run.css, so it only
   restyles: no layout logic, no DOM changes. Selectors start with ":root body" so they win over zoo-theme.css
   ("html body ...") without touching it. Cheap on old iPads: gradients + small layered shadows, no backdrop-filter,
   no images except the inline SVG mascot/logo.

   Principles: every tappable thing is a chunky candy piece (glossy top, darker lip below, presses down and springs back);
   every surface is warm paper with a white rim; colour carries meaning (green = go, gold = coins/rewards, coral = alert,
   sky = listen); Baloo 2 for anything a child reads, Nunito for grown-up text. */
:root{
 /* colour scale */
 --ui-forest-900:#0F3326;--ui-forest-800:#173F2E;--ui-forest-700:#1E5A45;--ui-forest-600:#2B7254;--ui-forest-500:#3A8A62;
 --ui-leaf-600:#3E9F48;--ui-leaf-500:#55B94F;--ui-leaf-400:#77CC5E;--ui-leaf-300:#A6E36A;--ui-leaf-lip:#2E7F3A;
 --ui-sun-600:#E59A12;--ui-sun-500:#FFB82E;--ui-sun-400:#FFC93F;--ui-sun-300:#FFE27A;--ui-sun-lip:#C97F0A;--ui-sun-ink:#5A3A00;
 --ui-coral-500:#F0644A;--ui-coral-400:#FF8466;--ui-coral-lip:#B23B27;--ui-coral-100:#FFE4DC;
 --ui-sky-500:#38A3D8;--ui-sky-300:#8FD3F2;--ui-sky-lip:#1F78A6;
 --ui-paper:#FFF8E7;--ui-paper-2:#FBEFD2;--ui-paper-3:#F3E2B8;--ui-paper-lip:#E2CC97;--ui-white:#FFFFFF;
 --ui-ink:#173F2E;--ui-ink-soft:#4B6B5A;
 /* gradients */
 --ui-grad-paper:radial-gradient(circle at 1px 1px,rgba(201,166,94,.16) 1px,transparent 1.6px) 0 0/14px 14px,linear-gradient(180deg,#FFFBF0,#FFF5DC);
 --ui-grad-board:linear-gradient(180deg,#2F7E58 0%,#1E5A45 100%);
 --ui-grad-gloss:linear-gradient(180deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,.12) 48%,rgba(255,255,255,0) 50%);
 /* shadows: contact + ambient, kept small for old iPads */
 --ui-shadow-1:0 1px 1px rgba(15,51,38,.18),0 3px 6px -2px rgba(15,51,38,.22);
 --ui-shadow-2:0 2px 2px rgba(15,51,38,.16),0 10px 18px -6px rgba(15,51,38,.34);
 --ui-shadow-3:0 3px 3px rgba(15,51,38,.16),0 22px 40px -12px rgba(15,51,38,.45);
 /* radii, strokes, spacing */
 --ui-r-xs:10px;--ui-r-sm:16px;--ui-r-md:22px;--ui-r-lg:30px;--ui-r-xl:38px;--ui-pill:999px;
 --ui-rim:3px;--ui-lip:5px;--ui-lip-sm:4px;--ui-icon-stroke:2.6;
 --ui-s1:4px;--ui-s2:8px;--ui-s3:12px;--ui-s4:16px;--ui-s5:24px;--ui-s6:32px;
 /* motion */
 --ui-spring:cubic-bezier(.34,1.56,.64,1);--ui-ease:cubic-bezier(.2,.8,.2,1);--ui-press:.94;--ui-t:.18s;
 /* type */
 --ui-display:'Baloo 2',Nunito,system-ui,sans-serif;--ui-body:Nunito,system-ui,-apple-system,'Segoe UI',sans-serif;
 --ui-fs-xs:clamp(13px,1.2vw + 8px,15px);--ui-fs-sm:clamp(15px,1.3vw + 10px,18px);--ui-fs-md:clamp(18px,1.6vw + 11px,22px);
 --ui-fs-lg:clamp(24px,2.4vw + 14px,32px);--ui-fs-xl:clamp(30px,3.6vw + 16px,44px);
 /* keep the older theme's names pointing at the new palette */
 --z-forest:var(--ui-forest-700);--z-forest-lip:var(--ui-forest-900);--z-deep:var(--ui-forest-800);--z-cream:var(--ui-paper);--z-cream-lip:var(--ui-paper-lip);
 --z-sand:var(--ui-paper-2);--z-sun:var(--ui-sun-400);--z-sun-lip:var(--ui-sun-lip);--z-leaf:var(--ui-leaf-500);--z-leaf-lip:var(--ui-leaf-lip);
 --z-coral:var(--ui-coral-500);--z-coral-lip:var(--ui-coral-lip);--z-sky:var(--ui-sky-500);--z-sky-lip:var(--ui-sky-lip)}

/* ---------- Icons: chunkier strokes and a real second tone (same markup, zoo-icons.js unchanged in shape) ---------- */
:root body .zi{stroke-width:var(--ui-icon-stroke)}
:root body .zi [fill-opacity=".22"]{fill:var(--zi-fill,currentColor);fill-opacity:var(--zi-fill-o,.22)}

/* ---------- Component: candy button ----------
   Any element with these custom properties gets the look: --c face, --c-hi top, --c-lip edge, --c-ink text. */
:root body :where(.ui-candy,.zoo-dock button[aria-pressed=true],#zoo-welcome #zoo-first,.ent-ask-grownup,#games-room .mg-big,#games-room .mg-round,#games-room .gr-back,.sound-button,#zoo-close,.zoom-group,#hd-fullscreen,.family-shortcut,.zoo-wallet,#zoo-panel .pr-action,.pr-welcome-voice,#petting-zoo .pz-back,.ent-ask-close,#zoo-list .pgate-key,#zoo-list .pgate-back,#fr-skip){--c:var(--ui-paper);--c-hi:#FFFFFF;--c-lip:var(--ui-paper-lip);--c-ink:var(--ui-forest-700)}
:root body :is(.ui-candy,.zoo-dock button[aria-pressed=true],#zoo-welcome #zoo-first,.ent-ask-grownup,#games-room .mg-big,#games-room .mg-round,#games-room .gr-back,.sound-button,#zoo-close,.zoom-group,#hd-fullscreen,.family-shortcut,.zoo-wallet,#zoo-panel .pr-action,.pr-welcome-voice,#petting-zoo .pz-back,.ent-ask-close,#zoo-list .pgate-key,#zoo-list .pgate-back,#fr-skip){
 border:0!important;color:var(--c-ink)!important;
 background:var(--ui-grad-gloss),linear-gradient(180deg,var(--c-hi),var(--c) 60%)!important;
 box-shadow:inset 0 -3px 0 rgba(0,0,0,.06),0 var(--ui-lip) 0 var(--c-lip),var(--ui-shadow-2)!important;
 transition:transform var(--ui-t) var(--ui-spring),box-shadow var(--ui-t) var(--ui-ease)!important}
:root body :where(.zoo-dock button[aria-pressed=true],#zoo-welcome #zoo-first,.ent-ask-grownup,#games-room .mg-big){--c:var(--ui-leaf-500);--c-hi:var(--ui-leaf-400);--c-lip:var(--ui-leaf-lip);--c-ink:#fff}
:root body .zoo-dock button[aria-pressed=true],:root body #zoo-open[aria-pressed=true]{--c:var(--ui-forest-600);--c-hi:var(--ui-forest-500);--c-lip:var(--ui-forest-900)}
:root body #games-room .mg-big.alt,:root body #games-room .mg-big[data-mg=menu]{--c:var(--ui-paper);--c-hi:#fff;--c-lip:var(--ui-paper-lip);--c-ink:var(--ui-forest-700)}
:root body #games-room .mg-big.sun{--c:var(--ui-sun-400);--c-hi:var(--ui-sun-300);--c-lip:var(--ui-sun-lip);--c-ink:var(--ui-sun-ink)}
:root body .sound-button.is-muted{--c:var(--ui-coral-100);--c-hi:#fff;--c-lip:#F2BFB2;--c-ink:var(--ui-coral-lip)}
:root body .uhoh-shortcut{--c:var(--ui-coral-500)!important;--c-hi:var(--ui-coral-400)!important;--c-lip:var(--ui-coral-lip)!important;--c-ink:#fff!important}
:root body .family-shortcut[aria-pressed=true]{--c:var(--ui-forest-600);--c-hi:var(--ui-forest-500);--c-lip:var(--ui-forest-900);--c-ink:#fff}
:root body #zoo-close,:root body .ent-ask-close{--c:var(--ui-paper-2);--c-hi:#FFF9EA}
/* Pressed: sinks onto its lip and shrinks a touch, then springs back (transition above). */
:root body :is(.ui-candy,.zoo-dock button,#zoo-welcome #zoo-first,.ent-ask-grownup,#games-room .mg-big,#games-room .mg-round,#games-room .gr-back,.sound-button,#zoo-close,.zoom-group button,#hd-fullscreen,.family-shortcut,.zoo-wallet,#zoo-panel .pr-action,.pr-welcome-voice,#petting-zoo .pz-back,.ent-ask-close,#zoo-list .pgate-key,#zoo-list .pgate-back,#fr-skip,#games-room .gr-tile,.habitat-grid button,.animal-grid button,.friend-actions button):active:not(:disabled){
 transform:translateY(3px) scale(var(--ui-press))!important;transition-duration:.06s!important}
:root body :is(.zoo-dock button[aria-pressed=true],#zoo-welcome #zoo-first,.ent-ask-grownup,#games-room .mg-big,#games-room .mg-round,#games-room .gr-back,.sound-button,#zoo-close,#hd-fullscreen,.family-shortcut,.zoo-wallet,#zoo-panel .pr-action,.pr-welcome-voice,#petting-zoo .pz-back,.ent-ask-close,#zoo-list .pgate-key,#zoo-list .pgate-back):active:not(:disabled){
 box-shadow:inset 0 -2px 0 rgba(0,0,0,.06),0 1px 0 var(--c-lip),var(--ui-shadow-1)!important}
/* Focus ring: thick, gold, visible on any background. */
:root body :is(button,[role=slider],select,a):focus-visible{outline:4px solid var(--ui-sun-400)!important;outline-offset:3px!important;box-shadow:0 0 0 7px rgba(23,63,46,.55)!important}

/* ---------- Component: paper surface (cards, panels, sheets) ---------- */
:root body :is(.ui-paper,#zoo-panel,#zoo-welcome,.ent-ask-card,#games-room .mg-card,#animal-card){
 background:var(--ui-grad-paper)!important;border:var(--ui-rim) solid #fff!important;
 box-shadow:0 6px 0 var(--ui-paper-lip),var(--ui-shadow-3)!important}

/* ---------- Component: pill badge + coin counter ---------- */
:root body :is(.ui-pill,#games-room .gr-coins,#games-room .mg-stars){display:inline-flex;align-items:center;gap:6px;border-radius:var(--ui-pill);
 background:linear-gradient(180deg,#fff,#FFF6DD)!important;border:2px solid #fff;color:var(--ui-sun-ink);font-family:var(--ui-display);font-weight:800;
 box-shadow:inset 0 -2px 0 rgba(201,140,20,.18),0 3px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important}
:root body .zoo-wallet strong{color:var(--ui-sun-ink)!important;font-variant-numeric:tabular-nums}
:root body .zoo-wallet>svg,:root body .gr-coins svg,:root body .mg-coins svg{filter:drop-shadow(0 2px 0 rgba(201,127,10,.55))}

/* ---------- Component: padlock badge ---------- */
:root body .ent-lock,:root body .pr-mode .pr-corner:has(.zi){--zi-fill:#fff;--zi-fill-o:.9}
:root body .ent-lock{width:40px!important;height:40px!important;left:8px!important;top:8px!important;border:3px solid #fff;color:var(--ui-sun-ink)!important;
 background:linear-gradient(180deg,var(--ui-sun-300),var(--ui-sun-400) 60%)!important;box-shadow:0 3px 0 var(--ui-sun-lip),var(--ui-shadow-1)!important}
:root body .ent-lock svg{width:22px!important;height:22px!important}

/* ---------- Component: sheet header (panel title band) ---------- */
:root body #zoo-panel>header{position:relative;background:var(--ui-grad-board);margin:0;border-bottom:4px solid var(--ui-forest-900);box-shadow:inset 0 2px 0 rgba(255,255,255,.18)}
:root body #zoo-panel>header::after{content:'';position:absolute;left:0;right:0;bottom:-12px;height:8px;background:radial-gradient(circle at 8px -2px,var(--ui-forest-900) 6px,transparent 6.5px) 0 0/16px 8px repeat-x;pointer-events:none;opacity:.0}
:root body #zoo-title{color:#FFF8E7!important;text-shadow:0 2px 0 var(--ui-forest-900),0 0 1px var(--ui-forest-900)}
:root body .panel-eyebrow{color:var(--ui-leaf-300)!important}
:root body #zoo-panel:before{position:relative;z-index:1;background:rgba(255,255,255,.55)!important;margin:8px 0 -12px!important}
:root body #zoo-panel{background:var(--ui-grad-paper)!important;padding-top:0}

/* ---------- Component: dock (tab bar) ---------- */
:root body .zoo-dock{background:var(--ui-grad-paper)!important;border:var(--ui-rim) solid #fff!important;box-shadow:0 6px 0 var(--ui-paper-lip),var(--ui-shadow-3)!important}
:root body .zoo-dock button{--zi-fill:var(--ui-sun-400);--zi-fill-o:1;color:var(--ui-forest-700)!important;transition:transform var(--ui-t) var(--ui-spring)}
:root body .zoo-dock button[aria-pressed=true]{--zi-fill:var(--ui-sun-300);transform:translateY(-6px)!important;color:#fff!important}
:root body .zoo-dock button[aria-pressed=true]:active{transform:translateY(-2px) scale(var(--ui-press))!important}
:root body .zoo-dock button[aria-pressed=true] svg{filter:drop-shadow(0 2px 0 rgba(15,51,38,.45))}

/* ---------- Component: tabs inside sheets (habitat / animal cards) ---------- */
:root body :is(.habitat-grid button,.animal-grid button){background:linear-gradient(180deg,#fff,#FFFCF3)!important;border:3px solid #fff!important;
 box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important;transition:transform var(--ui-t) var(--ui-spring)!important}
:root body :is(.habitat-grid,.animal-grid) img,:root body .pr-mode .pr-portrait{background:radial-gradient(ellipse 30% 7% at 50% 84%,rgba(120,90,30,.22),transparent 100%),radial-gradient(circle at 50% 30%,#FFFDF6,#F6E7C2 75%)!important;box-shadow:inset 0 -3px 0 rgba(201,166,94,.25)}
:root body :is(.habitat-grid,.animal-grid) strong{color:var(--ui-ink)!important}

/* ---------- Component: toast / pop-up ---------- */
:root body :is(#hd-care-note,.ui-toast){background:linear-gradient(180deg,#fff,var(--ui-paper))!important;border:3px solid #fff!important;border-radius:var(--ui-pill)!important;color:var(--ui-ink)!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}

@media (prefers-reduced-motion:reduce){
 :root body *{transition-duration:0s!important}
 :root body .zoo-dock button[aria-pressed=true]{transform:none!important}
}

/* =====================================================================================================
   AREA: map HUD, welcome card, first-run pointer
   ===================================================================================================== */
:root body .world-brand .zoo-logo{width:268px!important}
:root body .zoo-logo img{filter:drop-shadow(0 6px 10px rgba(8,30,22,.35))}
@media(max-width:700px){:root body .world-brand .zoo-logo{width:196px!important}}
:root body .world-header{background:linear-gradient(rgba(10,36,26,.55),rgba(10,36,26,.18) 55%,transparent)!important}
/* Coins: a gold-rimmed counter with a fat coin. */
:root body .zoo-wallet{border:3px solid #fff!important}
:root body .zoo-wallet>svg circle:first-child{fill:var(--ui-sun-400)}
/* Sound: a listen button is always sky blue. */
:root body .sound-button,:root body .pr-welcome-voice{--c:var(--ui-sky-500);--c-hi:var(--ui-sky-300);--c-lip:var(--ui-sky-lip);--c-ink:#fff;--zi-fill:#fff;--zi-fill-o:.9;border:3px solid #fff!important}
:root body .sound-button.is-muted{--zi-fill:var(--ui-coral-500)}
/* Zoom stack */
:root body .zoom-group{border:3px solid #fff!important;border-radius:var(--ui-r-md)!important}
:root body .zoom-group button{color:var(--ui-forest-700)!important}
:root body .zoom-group button+button{border-top:2px dashed var(--ui-paper-3)!important}
:root body .zoom-group button svg,:root body .zoom-group button .zi{stroke-width:3}
:root body .minimap{border:4px solid #fff!important;box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
:root body .minimap-caption{text-shadow:0 2px 0 var(--ui-forest-900);letter-spacing:.5px}
/* Our family / Uh-oh */
:root body .family-shortcut{border:3px solid #fff!important;--zi-fill:var(--ui-sun-400);--zi-fill-o:1}
:root body .uhoh-shortcut .uhoh-mark{box-shadow:inset 0 -3px 0 rgba(176,59,39,.2);color:var(--ui-coral-500)!important}
/* Habitat + Petting Zoo signs: little candy signs with a rim */
:root body .habitat-label{background:linear-gradient(180deg,#fff,var(--ui-paper) 60%)!important;border:3px solid #fff!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
:root body .habitat-label .pr-map-art{background:linear-gradient(180deg,var(--ui-forest-500),var(--ui-forest-700))!important;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2)}
:root body .habitat-label.petting-label{background:linear-gradient(180deg,#FFF3EE,var(--ui-coral-100) 60%)!important;color:var(--ui-coral-lip)!important;box-shadow:0 4px 0 #EFB4A4,var(--ui-shadow-2)!important}
:root body .habitat-label.petting-label>svg{background:linear-gradient(180deg,var(--ui-coral-400),var(--ui-coral-500))!important;box-shadow:inset 0 -2px 0 rgba(0,0,0,.15);--zi-fill:#fff;--zi-fill-o:1}
/* Care bubbles over animals */
:root body .animal-care:not([data-mode=eating]),:root body .exhibit-care{background:linear-gradient(180deg,#fff,var(--ui-paper))!important;border:3px solid #fff!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important;--zi-fill:var(--ui-coral-500);--zi-fill-o:1;color:var(--ui-coral-lip)!important}
/* Welcome card: Sunny the cub peeks over the top, everything centred, one big green button. */
:root body #zoo-welcome{top:calc(196px + env(safe-area-inset-top));overflow:visible;padding:78px 24px 24px!important;text-align:center;border-radius:var(--ui-r-xl)!important}
:root body #zoo-welcome .welcome-icon{position:absolute;left:50%;top:-64px;width:136px;height:136px;margin:0;transform:translateX(-50%);border-radius:0;background:url(assets/mascot.svg) center/contain no-repeat!important;filter:drop-shadow(0 6px 6px rgba(15,51,38,.22))}
:root body #zoo-welcome .welcome-icon>*{display:none}
:root body #zoo-welcome h2{padding:0!important;font-size:var(--ui-fs-lg)!important;color:var(--ui-ink)!important}
:root body #zoo-welcome p{font-size:var(--ui-fs-sm)!important;color:var(--ui-ink-soft)!important;margin:6px 0 18px!important;line-height:1.4!important}
:root body #zoo-welcome #zoo-first{min-height:68px!important;font-size:24px!important;border-radius:var(--ui-r-md)!important;--zi-fill:#fff;--zi-fill-o:1;text-shadow:0 2px 0 rgba(30,90,45,.45)}
:root body #zoo-welcome #zoo-first svg{width:30px;height:30px;filter:drop-shadow(0 2px 0 rgba(30,90,45,.45))}
:root body #zoo-welcome .pr-welcome-voice{top:10px!important;right:10px!important}
@media(max-width:650px){:root body #zoo-welcome{top:auto;padding:58px 20px 20px!important}:root body #zoo-welcome .welcome-icon{top:-50px;left:74px;width:108px;height:108px}}
/* First-run pointer: chunkier hand shadow, a double gold + white ring */
:root body .fr-hand{filter:drop-shadow(0 5px 3px rgba(15,51,38,.35))}
:root body .fr-glow{border:5px solid var(--ui-sun-400)!important;box-shadow:inset 0 0 0 3px rgba(255,255,255,.85),0 0 0 4px #fff,0 0 22px 8px rgba(255,201,63,.65)!important}
:root body #fr-skip{border:3px solid #fff!important}

/* =====================================================================================================
   AREA: zoo panel (Animals, animal page, Sticker Book, Keeper) and the tapped-animal card
   ===================================================================================================== */
:root body #zoo-list{padding-top:14px}
:root body #zoo-panel .pr-heading h3,:root body #zoo-panel .pr-intro h3{font-size:var(--ui-fs-md)!important;color:var(--ui-ink)!important}
:root body #zoo-panel .pr-intro{display:flex;align-items:center;gap:10px}
:root body #zoo-panel .pr-intro>svg,:root body #zoo-panel .pr-intro .pr-symbol{display:grid;place-items:center;width:44px;height:44px;padding:9px;box-sizing:border-box;border-radius:50%;color:var(--ui-sun-ink);
 background:linear-gradient(180deg,var(--ui-sun-300),var(--ui-sun-400))!important;box-shadow:0 3px 0 var(--ui-sun-lip);--zi-fill:#fff;--zi-fill-o:.85}
/* Round page buttons (back, more) */
:root body #zoo-panel .pr-action{border:3px solid #fff!important;--zi-fill:var(--ui-sun-400);--zi-fill-o:1}
:root body #zoo-panel .pr-action .pr-caption{font-family:var(--ui-display);font-weight:800;color:var(--ui-forest-700)}
/* Listen dots on cards: small sky candies */
:root body .pr-mode .pr-voice{width:34px!important;height:34px!important;border-radius:50%!important;color:#fff!important;background:linear-gradient(180deg,var(--ui-sky-300),var(--ui-sky-500) 60%)!important;border:2px solid #fff!important;box-shadow:0 2px 0 var(--ui-sky-lip)!important;--zi-fill:#fff;--zi-fill-o:.9}
:root body .pr-mode .pr-corner{border:2px solid #fff!important;box-shadow:0 2px 0 var(--ui-paper-lip)!important}
:root body .pr-mode .pr-corner{color:var(--ui-leaf-600)!important}
/* Animal page: hero on a little stage, food chip, gold Adopt button */
:root body .pr-detail .pr-hero{border:3px solid #fff!important;border-radius:var(--ui-r-lg)!important;background:radial-gradient(ellipse 34% 7% at 50% 86%,rgba(120,90,30,.25),transparent 100%),radial-gradient(circle at 50% 28%,#FFFFFF,#EAF4D6 60%,#CFE6B0)!important;box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
:root body .pr-detail h3{font-size:var(--ui-fs-lg)!important;color:var(--ui-ink)!important}
:root body #zoo-panel .pr-actions .pr-action[data-do=buy],:root body #zoo-panel .pr-actions .pr-action[data-do=adopt]{--c:var(--ui-sun-400);--c-hi:var(--ui-sun-300);--c-lip:var(--ui-sun-lip);--c-ink:var(--ui-sun-ink)}
:root body #zoo-panel .pr-actions .pr-action[data-do=buy] .pr-caption{color:var(--ui-sun-ink)}
:root body #zoo-panel .pr-actions .pr-action:disabled{filter:saturate(.4);opacity:.6}
:root body #zoo-panel .individuals,:root body #zoo-panel .pr-individuals{border-radius:var(--ui-r-md)!important}
/* Sticker Book: empty slots are dashed die-cut spaces; collected stickers sit on a white sticker edge, a bit tilted */
:root body .sticker-grid button{border:3px solid #fff!important;border-radius:var(--ui-r-md)!important;background:linear-gradient(180deg,#fff,#FFFBF0)!important;box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important;transition:transform var(--ui-t) var(--ui-spring)!important}
:root body .sticker-grid button.empty .sticker-picture{background:repeating-linear-gradient(45deg,#F6EFDC 0 10px,#F1E7CD 10px 20px)!important;border:3px dashed #D9C79A!important}
:root body .sticker-grid button:not(.empty) .sticker-picture{background:radial-gradient(circle at 50% 35%,#fff,#FFF1C9)!important;border:4px solid #fff!important;box-shadow:0 3px 0 rgba(201,166,94,.45),0 6px 10px -4px rgba(15,51,38,.3)!important;transform:rotate(-2deg)}
:root body .sticker-grid button:not(.empty):nth-child(2n) .sticker-picture{transform:rotate(2deg)}
:root body .sticker-grid strong{font-size:16px!important;color:var(--ui-ink)!important}
:root body .page-reward,:root body .keeper-sticker,:root body .pr-reward{border-radius:var(--ui-r-md)!important;border:3px dashed var(--ui-sun-400)!important;background:linear-gradient(180deg,#FFFBEA,#FFF2C4)!important}
/* Keeper: the visit banner becomes a gold ribbon; three moments are big candy tiles */
:root body #zoo-panel .keeper-banner .pr-action{--c:var(--ui-sun-400);--c-hi:var(--ui-sun-300);--c-lip:var(--ui-sun-lip);--c-ink:var(--ui-sun-ink);--zi-fill:#fff;--zi-fill-o:.9;border-radius:var(--ui-r-lg)!important}
:root body #zoo-panel .keeper-banner .pr-caption{color:var(--ui-sun-ink)!important;font-size:var(--ui-fs-md)!important}
:root body #zoo-panel .keeper-task{border:3px solid #fff!important;border-radius:var(--ui-r-lg)!important;background:linear-gradient(180deg,#fff,#FFFBF0)!important;box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important;transition:transform var(--ui-t) var(--ui-spring)!important}
:root body #zoo-panel .keeper-task.complete{background:linear-gradient(180deg,#F4FCEB,#E3F5CF)!important;box-shadow:0 5px 0 #BFD9A3,var(--ui-shadow-2)!important}
:root body #zoo-panel .keeper-task strong{font-family:var(--ui-display);font-size:18px!important;color:var(--ui-ink)!important}
:root body #zoo-panel .pr-moment-art{display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 50% 35%,#fff,#FFF0C8)!important;box-shadow:inset 0 -3px 0 rgba(201,166,94,.3)}
/* Tapped-animal card buttons: same candy as everywhere */
:root body .friend-actions button{border:3px solid #fff!important;--zi-fill:#fff;--zi-fill-o:.85;text-shadow:0 2px 0 rgba(0,0,0,.18);transition:transform var(--ui-t) var(--ui-spring)!important}
:root body .friend-actions [data-card=snack]{background:var(--ui-grad-gloss),linear-gradient(180deg,var(--ui-leaf-400),var(--ui-leaf-500) 60%)!important;box-shadow:0 5px 0 var(--ui-leaf-lip),var(--ui-shadow-2)!important}
:root body .friend-actions [data-card=hear]{background:var(--ui-grad-gloss),linear-gradient(180deg,var(--ui-sky-300),var(--ui-sky-500) 60%)!important;box-shadow:0 5px 0 var(--ui-sky-lip),var(--ui-shadow-2)!important}
:root body .friend-actions [data-card=learn]{background:var(--ui-grad-gloss),linear-gradient(180deg,var(--ui-sun-300),var(--ui-sun-400) 60%)!important;box-shadow:0 5px 0 var(--ui-sun-lip),var(--ui-shadow-2)!important;text-shadow:none}
:root body #animal-card .friend-head img{border:3px solid #fff;background:radial-gradient(circle at 50% 30%,#fff,#F6E7C2)!important;box-shadow:0 3px 0 var(--ui-paper-lip)}

/* =====================================================================================================
   AREA: Games room menu (game cards) + mini-game shell (top bar, back, stars, prompt, end card)
   ===================================================================================================== */
:root body #games-room{background:radial-gradient(circle at 1px 1px,rgba(201,166,94,.16) 1px,transparent 1.6px) 0 0/16px 16px,radial-gradient(ellipse at 50% -10%,#FFF1B8,transparent 60%),linear-gradient(180deg,#FFF8E2,#FDEFC9)!important}
/* Title ribbon */
:root body #games-room .gr-head h2{flex:0 1 auto;margin:0 auto;padding:4px 34px 8px;position:relative;color:#fff!important;font-size:clamp(30px,4vw + 14px,44px);line-height:1.1;
 background:linear-gradient(180deg,var(--ui-leaf-400),var(--ui-leaf-600));border-radius:14px;box-shadow:inset 0 3px 0 rgba(255,255,255,.35),0 5px 0 var(--ui-leaf-lip),var(--ui-shadow-2);text-shadow:0 2px 0 var(--ui-leaf-lip)}
:root body #games-room .gr-head{justify-content:space-between}
:root body #games-room .gr-back,:root body #games-room .mg-round{border:3px solid #fff!important}
:root body #games-room .gr-coins,:root body #games-room .mg-stars{font-size:22px}
/* Game cards: thick white frame, art inset with a shine, title on a green ribbon over the art's bottom edge */
:root body #games-room .gr-grid{gap:22px 18px}
:root body #games-room .gr-tile{position:relative;gap:0;padding:10px 10px 0;border:0;border-radius:var(--ui-r-lg);background:linear-gradient(180deg,#fff,#FFF9EC)!important;
 box-shadow:0 0 0 3px #fff,0 7px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important;transition:transform var(--ui-t) var(--ui-spring)!important}
:root body #games-room .gr-art{border-radius:calc(var(--ui-r-lg) - 8px);box-shadow:inset 0 0 0 3px rgba(23,63,46,.12)}
:root body #games-room .gr-art::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(160deg,rgba(255,255,255,.35) 0 18%,transparent 30%);box-shadow:inset 0 -10px 18px -10px rgba(15,51,38,.35)}
:root body #games-room .gr-tile strong{position:relative;z-index:3;margin:-18px auto 12px;padding:6px 16px 8px;max-width:92%;border-radius:12px;color:#fff;font-size:clamp(17px,1.4vw + 10px,21px);line-height:1.1;
 background:linear-gradient(180deg,var(--ui-forest-500),var(--ui-forest-700));box-shadow:inset 0 2px 0 rgba(255,255,255,.25),0 4px 0 var(--ui-forest-900);text-shadow:0 2px 0 var(--ui-forest-900)}
/* Locked game: art dims a little, a big gold padlock sits in the middle */
:root body #games-room .gr-tile.ent-locked .gr-art::before{content:'';position:absolute;inset:0;z-index:1;background:rgba(23,63,46,.22);border-radius:inherit}
:root body #games-room .gr-tile .ent-lock{left:50%!important;top:50%!important;width:68px!important;height:68px!important;transform:translate(-50%,-50%);border-width:4px}
:root body #games-room .gr-tile .ent-lock svg{width:36px!important;height:36px!important}
:root body #games-room .gr-tile.ent-locked strong{background:linear-gradient(180deg,#7E9488,#5D7468);box-shadow:inset 0 2px 0 rgba(255,255,255,.25),0 4px 0 #3F5348;text-shadow:0 2px 0 #3F5348}
/* Mini-game top bar */
:root body #games-room .mg-bar{background:linear-gradient(180deg,#FFFDF4,var(--ui-paper))!important;box-shadow:0 3px 0 var(--ui-paper-lip),0 8px 14px -8px rgba(15,51,38,.35)!important;padding-bottom:10px}
:root body #games-room .mg-bar h2{color:var(--ui-ink)!important;font-size:clamp(22px,1.8vw + 14px,28px)}
:root body #games-room .mg-stars{--zi-fill:var(--ui-sun-400);--zi-fill-o:1;color:var(--ui-sun-ink)}
:root body #games-room .mg-prompt{border:3px solid #fff;background:linear-gradient(180deg,#fff,var(--ui-paper))!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important;color:var(--ui-ink)}
/* End card: sunburst behind, the card pops, title on a gold ribbon, coins in a gold pill */
:root body #games-room .mg-celebrate{background:repeating-conic-gradient(from 0deg at 50% 45%,rgba(255,236,160,.22) 0 9deg,transparent 9deg 18deg),radial-gradient(circle at 50% 45%,rgba(255,214,90,.55),rgba(15,51,38,.55) 70%)!important}
:root body #games-room .mg-card{border-radius:var(--ui-r-xl)!important;padding:26px 22px 24px!important}
:root body #games-room .mg-card h3{display:inline-block;margin:10px 0 8px!important;padding:4px 26px 8px;border-radius:14px;color:#fff!important;font-size:clamp(26px,2.4vw + 16px,34px)!important;
 background:linear-gradient(180deg,var(--ui-sun-400),var(--ui-sun-600));box-shadow:inset 0 3px 0 rgba(255,255,255,.4),0 5px 0 var(--ui-sun-lip);text-shadow:0 2px 0 var(--ui-sun-lip)}
:root body #games-room .mg-card .mg-coins{border:3px solid #fff;background:linear-gradient(180deg,#FFFBEA,#FFEDB0)!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-1);color:var(--ui-sun-ink)!important}
:root body #games-room .mg-card>img,:root body #games-room .mg-card img{filter:drop-shadow(0 8px 6px rgba(15,51,38,.25))}
:root body #games-room .mg-big{border:3px solid #fff!important;--zi-fill:#fff;--zi-fill-o:.85}
:root body #games-room .mg-big svg{filter:drop-shadow(0 2px 0 rgba(0,0,0,.2))}

/* =====================================================================================================
   AREA: grown-up screens (parental gate, purchase, settings) + the child's "Ask a grown-up" card
   Calm and trustworthy: same paper and green, no ribbons or bounce, readable Nunito text, one clear main button.
   ===================================================================================================== */
:root body.grownup-view #zoo-panel>header{background:linear-gradient(180deg,#24654D,#1A4F3C)!important}
:root body.grownup-view #zoo-list{font-family:var(--ui-body)}
:root body #zoo-list .pgate-ask,:root body #zoo-list .pgate-note{font-size:17px!important;color:var(--ui-ink-soft)!important}
:root body #zoo-list .pgate-words{font:800 clamp(28px,2vw + 20px,36px)/1.2 var(--ui-body)!important;color:var(--ui-ink)!important}
:root body #zoo-list .pgate-slots span{width:20px!important;height:20px!important;border:3px solid #B8C9B2!important}
:root body #zoo-list .pgate-slots span.on{background:var(--ui-leaf-500)!important;border-color:var(--ui-leaf-lip)!important}
:root body #zoo-list .pgate-keys{grid-template-columns:repeat(3,clamp(76px,9vw + 40px,104px))!important;gap:14px!important}
:root body #zoo-list .pgate-key{width:auto!important;height:clamp(64px,4vw + 44px,80px)!important;border-radius:var(--ui-r-md)!important;font:800 30px/1 var(--ui-body)!important;border:3px solid #fff!important}
:root body #zoo-list .pgate-back{width:min(300px,100%)!important;min-height:60px!important;border-radius:var(--ui-r-md)!important;border:3px solid #fff!important;font:800 18px var(--ui-body)!important}
:root body #zoo-list .pgate-status{font-size:16px!important}
/* Purchase screen */
:root body #zoo-list .ent-shop{padding:22px!important;border:3px solid #fff!important;border-radius:var(--ui-r-lg)!important}
:root body #zoo-list .ent-shop h3{font-size:var(--ui-fs-lg)!important;color:var(--ui-ink)!important;margin:0 0 6px}
:root body #zoo-list .ent-shop p,:root body #zoo-list .ent-list li{font-size:16px;line-height:1.5;color:#2F5242}
:root body #zoo-list .ent-list svg{width:24px!important;height:24px!important;padding:3px;box-sizing:border-box;border-radius:50%;background:var(--ui-leaf-500);color:#fff!important;stroke-width:3.2}
:root body #zoo-list .ent-shop>button.ent-buy{min-height:68px!important;border:3px solid #fff!important;border-radius:var(--ui-r-md)!important;font:800 21px var(--ui-display)!important;color:#fff!important;
 background:var(--ui-grad-gloss),linear-gradient(180deg,var(--ui-leaf-400),var(--ui-leaf-500) 60%)!important;box-shadow:0 5px 0 var(--ui-leaf-lip),var(--ui-shadow-2)!important;text-shadow:0 2px 0 rgba(30,90,45,.45)}
:root body #zoo-list .ent-shop>button.ent-buy:active:not(:disabled){transform:translateY(3px)!important;box-shadow:0 2px 0 var(--ui-leaf-lip)!important}
:root body #zoo-list .ent-terms{text-align:center;font-weight:800;color:var(--ui-ink-soft)}
:root body #zoo-list :is(.ent-restore,.ent-back,.ent-settings>button,.ent-dev button,.zoo-guide>button,.parent-tools button,.grownup-tools button){min-height:56px;border:3px solid #fff!important;border-radius:var(--ui-r-md)!important;color:var(--ui-forest-700)!important;font:800 16px var(--ui-body)!important;
 background:linear-gradient(180deg,#fff,var(--ui-paper-2))!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important}
:root body #zoo-list .ent-privacy{border:2px solid #DDEBD3;background:linear-gradient(180deg,#F6FBF0,#EAF4E0)!important;border-radius:var(--ui-r-md)!important;font-size:15px!important;color:#2F5242}
:root body #zoo-list .ent-privacy h4{font-size:16px!important}
:root body #zoo-list .zoo-guide{border:3px solid #fff!important}
:root body #zoo-list .zoo-guide h3{color:var(--ui-ink)!important}
:root body #zoo-list .feature-note{font-size:15px;color:var(--ui-ink-soft)}
/* Ask a grown-up (child side): Sunny peeks in, the pictures sit in sticker frames */
:root body .ent-ask{background:radial-gradient(circle at 50% 45%,rgba(23,63,46,.35),rgba(10,36,26,.62))!important}
:root body .ent-ask-card{border-radius:var(--ui-r-xl)!important;padding-top:56px!important;overflow:visible}
:root body .ent-ask-card::before{content:'';position:absolute;left:50%;top:-58px;width:104px;height:104px;transform:translateX(-50%);background:url(assets/mascot.svg) center/contain no-repeat;filter:drop-shadow(0 5px 5px rgba(15,51,38,.25));pointer-events:none}
:root body .ent-ask-pics img{border-radius:var(--ui-r-md)!important;background:radial-gradient(circle at 50% 35%,#fff,#F6E7C2)!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important}
:root body .ent-ask-lock{border:4px solid #fff;background:linear-gradient(180deg,var(--ui-sun-300),var(--ui-sun-400) 60%)!important;box-shadow:0 4px 0 var(--ui-sun-lip),var(--ui-shadow-1)!important;color:var(--ui-sun-ink)!important;--zi-fill:#fff;--zi-fill-o:.9}
:root body .ent-ask-grownup{border:3px solid #fff!important;border-radius:var(--ui-r-lg)!important;--zi-fill:#fff;--zi-fill-o:.85;text-shadow:0 2px 0 rgba(30,90,45,.45)}
:root body .ent-celebrate-card{border:3px solid #fff;background:var(--ui-grad-paper)!important}

/* =====================================================================================================
   AREA: Petting Zoo chrome
   ===================================================================================================== */
:root body #petting-zoo .pz-back{border:3px solid #fff!important}
:root body #petting-zoo .pz-title{border:3px solid #fff!important;background:linear-gradient(180deg,#FFF3EE,var(--ui-coral-100) 60%)!important;box-shadow:0 4px 0 #EFB4A4,var(--ui-shadow-2)!important;color:var(--ui-coral-lip)!important}
:root body #petting-zoo .pz-title:before{background-color:var(--ui-coral-500)!important;box-shadow:inset 0 -3px 0 rgba(0,0,0,.15)}
:root body #petting-zoo .pz-hint{border:3px solid #fff!important;border-radius:var(--ui-pill)!important;background:linear-gradient(180deg,#fff,var(--ui-paper))!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
:root body #petting-zoo .pz-empty{border:3px solid #fff!important;background:var(--ui-grad-paper)!important;border-radius:var(--ui-r-xl)!important}
:root body #petting-zoo button:not(.pz-back):not(.pz-title){transition:transform var(--ui-t) var(--ui-spring)}
:root body #petting-zoo button:active{transform:translateY(3px) scale(var(--ui-press))}
:root body #petting-zoo :is(.pz-snack,.pz-swap){border:3px solid #fff!important;background:var(--ui-grad-gloss),linear-gradient(180deg,#fff,var(--ui-paper) 60%)!important;box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important;--zi-fill:var(--ui-sun-400);--zi-fill-o:1}
:root body #petting-zoo .pz-snack[aria-pressed=true]{box-shadow:0 0 0 5px var(--ui-coral-500),0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
:root body #petting-zoo .pz-kid{border-color:#fff!important;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
:root body #petting-zoo .pz-kid[aria-pressed=true]{border-color:var(--ui-sun-400)!important;box-shadow:0 0 0 3px #fff,0 4px 0 var(--ui-sun-lip),var(--ui-shadow-2)!important}
/* Grown-up corner: readable sizes, the zoo summary as a tidy table-like card */
:root body #zoo-list .zoo-guide>p,:root body #zoo-list .zoo-guide .feature-note{font-size:15px!important;line-height:1.5!important;color:var(--ui-ink-soft)!important}
:root body #zoo-list .parent-zoo-details{border:2px solid #E8DDBF;border-radius:var(--ui-r-md)!important;background:#FFFCF2!important;padding:10px 14px!important}
:root body #zoo-list .parent-zoo-details p{font-size:14px!important;line-height:1.45!important;margin:0!important;padding:5px 0!important;color:#2F5242!important;border-bottom:1px dashed #EADFC4}
:root body #zoo-list .parent-zoo-details p:last-child{border-bottom:0}
:root body #zoo-list .parent-zoo-details p:first-child{font-weight:800;color:var(--ui-ink)!important}
@media(min-width:701px) and (min-height:700px){:root body #zoo-welcome{width:300px}}

/* ---------- Polish pass 2 (weakest areas after review) ---------- */
/* Mini-game bar: taller, 60 px back button, title on a paper tab, gold star counter */
:root body #games-room .mg-bar{padding:calc(10px + env(safe-area-inset-top)) 14px 12px;gap:14px}
:root body #games-room .mg-round{width:60px!important;height:60px!important}
:root body #games-room .mg-round svg{width:32px!important;height:32px!important}
:root body #games-room .mg-bar h2{flex:0 1 auto;margin-right:auto;padding:2px 18px 4px;border-radius:var(--ui-pill);background:linear-gradient(180deg,#fff,#FFF6DD);box-shadow:inset 0 -2px 0 rgba(201,166,94,.25),0 3px 0 var(--ui-paper-lip)}
:root body #games-room .mg-stars{padding:6px 14px 6px 8px;font-size:24px}
:root body #games-room .mg-stars svg{width:30px;height:30px}
/* End card backdrop: warm light, not a grey wash */
:root body #games-room .mg-celebrate{background:repeating-conic-gradient(from 0deg at 50% 45%,rgba(255,255,255,.16) 0 9deg,transparent 9deg 18deg),radial-gradient(circle at 50% 45%,rgba(255,206,84,.62),rgba(229,154,18,.42) 40%,rgba(23,63,46,.62) 85%)!important}
/* Welcome on phones: keep the text clear of the cub */
@media(max-width:650px){:root body #zoo-welcome h2{margin-top:4px!important}}
/* Habitat/animal cards: bigger portraits so the animal reads at a glance */
:root body :is(.habitat-grid,.animal-grid) img{transform-origin:50% 80%}
:root body .pr-mode .pr-portrait img{transform:scale(1.18);transform-origin:50% 75%}

/* =====================================================================================================
   ROUND 2, AREA: animal art as the hero (habitat grid, animal grid, sticker book, animal pages)
   Per-habitat colour comes from data-hab on the grid/card (set in pre-reader-ui.js): --hab-a (light, top) and --hab-b (deep, bottom).
   The 512 px portraits are ~55% padding, so the img is scaled 1.55x inside an overflow-hidden frame (no new assets).
   Badges live in the top corners (listen left, status/padlock right) so the face is never covered; the name is a ribbon over the bottom edge.
   ===================================================================================================== */
:root body .pr-mode{--hab-a:#FFF1C6;--hab-b:#F0CD7A}
:root body .pr-mode [data-hab=savanna]{--hab-a:#F6EDA0;--hab-b:#D2B64F}
:root body .pr-mode [data-hab=rainforest]{--hab-a:#C4EFA6;--hab-b:#4FB36A}
:root body .pr-mode [data-hab=arctic]{--hab-a:#E9F7FF;--hab-b:#9CD0EE}
:root body .pr-mode [data-hab=forest]{--hab-a:#D4EBB8;--hab-b:#7FAE6B}
:root body .pr-mode [data-hab=outback]{--hab-a:#FFD9AE;--hab-b:#E58E5A}
:root body .pr-mode [data-hab=desert]{--hab-a:#FFE7B8;--hab-b:#EDB15B}
:root body .pr-mode [data-hab=wetlands]{--hab-a:#C9EEE4;--hab-b:#5DB3AE}
:root body .pr-mode [data-hab=coast]{--hab-a:#C7E8FF;--hab-b:#55A8DC}
:root body .pr-mode [data-hab=dinosaur]{--hab-a:#E5D5F7;--hab-b:#A685D3}
:root body .pr-mode [data-hab=aviary]{--hab-a:#FFD9CB;--hab-b:#F09A84}
:root body .pr-mode [data-hab=ocean]{--hab-a:#B3E2FA;--hab-b:#2F8CCB}
/* The frame: habitat sky above, a soft ground ellipse under the animal, light vignette at the edges */
:root body .pr-mode :is(.pr-portrait,.pr-hero,.sticker-picture,.big-sticker,.pr-area-friend){position:relative;display:block;overflow:hidden;padding:0;
 background:radial-gradient(ellipse 52% 9% at 50% 86%,rgba(40,30,10,.26),transparent 100%),radial-gradient(ellipse 80% 70% at 50% 42%,rgba(255,255,255,.62),transparent 72%),
  linear-gradient(180deg,var(--hab-a),var(--hab-b))!important;border:3px solid #fff!important;border-radius:var(--ui-r-md)!important;
 box-shadow:inset 0 0 0 2px rgba(23,63,46,.10),inset 0 -14px 20px -14px rgba(15,51,38,.35)!important;transform:none}
:root body .pr-mode :is(.pr-portrait,.sticker-picture){width:100%;height:auto!important;aspect-ratio:1/.9}
:root body .pr-mode :is(.pr-portrait,.pr-hero,.sticker-picture,.big-sticker,.pr-area-friend)>img{position:absolute;inset:0;width:100%;height:100%!important;padding:0!important;object-fit:contain;
 transform:scale(1.42);transform-origin:50% 53%;filter:drop-shadow(0 3px 2px rgba(15,51,38,.28));background:none!important;box-shadow:none;border-radius:0!important}
:root body .pr-mode img[src*="/beaver/"],:root body .pr-mode img[src*="/pterosaur/"]{transform:scale(1.25)}
:root body .pr-mode .big-sticker>svg{display:none}
/* Cards: art on top, ribbon over its bottom edge */
:root body .pr-mode :is(.pr-habitats,.pr-animals) button,:root body .pr-mode .animal-sticker{min-height:0!important;padding:8px 8px 10px!important;gap:0!important;justify-content:flex-start;border-radius:var(--ui-r-lg)!important}
:root body .pr-mode :is(.pr-habitats,.pr-animals) button strong,:root body .pr-mode .animal-sticker strong{position:relative;z-index:3;display:flex;align-items:center;justify-content:center;
 min-height:36px!important;margin:-16px auto 0;padding:3px 14px 5px;max-width:94%;box-sizing:border-box;border-radius:12px;color:#fff!important;font-family:var(--ui-display);font-size:clamp(15px,1vw + 11px,18px)!important;line-height:1.1;text-align:center;
 background:linear-gradient(180deg,var(--ui-forest-500),var(--ui-forest-700));box-shadow:inset 0 2px 0 rgba(255,255,255,.25),0 3px 0 var(--ui-forest-900);text-shadow:0 2px 0 var(--ui-forest-900)}
:root body .pr-mode .pr-area-price{margin-top:6px}
/* Badges: listen top-left, status top-right, padlock top-right too (the status dot is replaced by it) */
:root body .pr-mode :is(.pr-portrait,.sticker-picture)>.pr-voice{left:6px!important;top:6px!important;bottom:auto!important;right:auto!important;z-index:2;width:34px!important;height:34px!important}
:root body .pr-mode :is(.pr-portrait,.sticker-picture)>.pr-voice svg{width:20px;height:20px}
:root body .pr-mode :is(.pr-portrait,.sticker-picture)>:is(.pr-corner,.sticker-corner){left:auto!important;right:6px!important;top:6px!important;bottom:auto!important;z-index:2;width:34px!important;height:34px!important;display:grid;place-items:center;padding:0;
 border-radius:50%;background:linear-gradient(180deg,#fff,#FFF4D6)!important;border:2px solid #fff!important;box-shadow:0 2px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important;color:var(--ui-leaf-600)!important}
:root body .pr-mode :is(.pr-portrait,.sticker-picture)>:is(.pr-corner,.sticker-corner) svg{width:22px;height:22px}
:root body .pr-mode :is(.pr-portrait,.pr-hero)>.ent-lock{left:auto!important;right:6px!important;top:6px!important;width:36px!important;height:36px!important;z-index:3}
:root body .pr-mode :is(.pr-portrait,.pr-hero)>.ent-lock svg{width:20px!important;height:20px!important}
:root body .pr-mode .pr-hero>.pr-voice{left:8px;top:8px;bottom:auto;z-index:2;width:38px!important;height:38px!important}
/* A locked/unowned friend keeps its colour but a little lighter */
:root body .pr-mode button.ent-locked :is(.pr-portrait)>img{filter:saturate(.75) drop-shadow(0 3px 2px rgba(15,51,38,.28))}
/* Sticker book: unknown friends are a flat paper silhouette with a dashed die-cut edge; known friends are glossy stickers */
:root body .pr-mode .animal-sticker.empty .sticker-picture{background:repeating-linear-gradient(45deg,#F6EFDC 0 10px,#F1E7CD 10px 20px)!important;border:3px dashed #D9C79A!important;box-shadow:none!important}
:root body .pr-mode .animal-sticker.empty .sticker-picture>img{filter:grayscale(1) brightness(.4) contrast(1.4);opacity:.28}
:root body .pr-mode .animal-sticker.empty strong{background:linear-gradient(180deg,#A9B8AE,#8A9C90);box-shadow:inset 0 2px 0 rgba(255,255,255,.3),0 3px 0 #667A6E;text-shadow:0 2px 0 #667A6E}
:root body .pr-mode .animal-sticker .behavior-badge{position:absolute;right:8px;top:calc(8px + 4px);display:none}
:root body .pr-mode .animal-sticker{position:relative}
:root body .pr-mode .animal-sticker .behavior-badge{display:grid;place-items:center;width:30px;height:30px;padding:0;right:auto;left:14px;top:auto;bottom:52px;z-index:4;border-radius:50%;background:var(--ui-sun-400);color:var(--ui-sun-ink);border:2px solid #fff;box-shadow:0 2px 0 var(--ui-sun-lip)}
:root body .pr-mode .animal-sticker .behavior-badge svg{width:18px;height:18px}
/* Animal page: big hero portrait */
:root body .pr-mode .pr-detail .pr-hero,:root body .pr-mode .pr-detail .big-sticker{width:100%;max-width:380px;height:auto!important;aspect-ratio:1/.82;min-height:0;margin:0 auto}
:root body .pr-mode .pr-detail .pr-hero>img,:root body .pr-mode .pr-detail .big-sticker>img{transform:scale(1.3)}
:root body .pr-mode .pr-detail h3{display:table;margin:-18px auto 10px!important;position:relative;z-index:3;padding:3px 22px 6px;border-radius:14px;color:#fff!important;
 background:linear-gradient(180deg,var(--ui-forest-500),var(--ui-forest-700));box-shadow:inset 0 2px 0 rgba(255,255,255,.25),0 4px 0 var(--ui-forest-900);text-shadow:0 2px 0 var(--ui-forest-900)}
/* Friends who can live in a not-yet-open area */
:root body .pr-mode .pr-area-friend{height:auto;aspect-ratio:1/1}
@media(max-width:700px){:root body .pr-mode :is(.pr-habitats,.pr-animals) button strong,:root body .pr-mode .animal-sticker strong{font-size:15px!important}}

/* =====================================================================================================
   ROUND 2, AREA: mini-game inner screens (pickers, memory, fossil, hide, train, who am I, safari walk)
   All scoped to #games-room; the games' own injected <style> blocks stay as the base. No backdrop-filter, no animated shadows.
   ===================================================================================================== */
/* Picker screens (Bath, Who Am I, Safari Walk, Fossil/others using .mg-choose): ribbon title, chunky photo tiles on a habitat-coloured card */
:root body #games-room .mg-choose{background:radial-gradient(circle at 1px 1px,rgba(201,166,94,.14) 1px,transparent 1.6px) 0 0/16px 16px,radial-gradient(ellipse at 50% 0,#FFF3BF,transparent 65%)}
:root body #games-room .mg-choose>h3{padding:5px 28px 9px;border-radius:14px;color:#fff;font-size:clamp(24px,2vw + 14px,32px);text-shadow:0 2px 0 var(--ui-leaf-lip);
 background:linear-gradient(180deg,var(--ui-leaf-400),var(--ui-leaf-600));box-shadow:inset 0 3px 0 rgba(255,255,255,.35),0 5px 0 var(--ui-leaf-lip),var(--ui-shadow-1);text-align:center}
:root body #games-room .mg-pick{position:relative;min-height:84px;border:3px solid #fff!important;border-radius:var(--ui-r-lg)!important;padding:6px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;
 background:radial-gradient(ellipse 50% 9% at 50% 84%,rgba(40,30,10,.2),transparent 100%),radial-gradient(circle at 50% 38%,#fff,#FFF0C4 80%)!important;
 box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important;transition:transform var(--ui-t) var(--ui-spring)}
:root body #games-room .mg-pick:nth-child(3n+2){background:radial-gradient(ellipse 50% 9% at 50% 84%,rgba(20,50,30,.2),transparent 100%),radial-gradient(circle at 50% 38%,#fff,#D9F0C3 80%)!important}
:root body #games-room .mg-pick:nth-child(3n+3){background:radial-gradient(ellipse 50% 9% at 50% 84%,rgba(20,40,60,.2),transparent 100%),radial-gradient(circle at 50% 38%,#fff,#CDEBFA 80%)!important}
:root body #games-room .mg-pick img{filter:drop-shadow(0 3px 2px rgba(15,51,38,.25))}
:root body #games-room .mg-pick:active:not(:disabled){transform:translateY(3px) scale(var(--ui-press))!important;box-shadow:0 2px 0 var(--ui-paper-lip)!important}
:root body #games-room .mg-pick.done{background:linear-gradient(180deg,#F4FCEB,#D4EFB8)!important}
/* Safari Walk: tile text becomes a ribbon, backdrop is sky with soft ground */
:root body #games-room .sw-choose{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.35) 1px,transparent 1.6px) 0 0/16px 16px,linear-gradient(180deg,#CFEBF8,#A9DBF1)}
:root body #games-room .sw-choose .mg-pick{background:radial-gradient(ellipse 50% 9% at 50% 82%,rgba(20,40,60,.2),transparent 100%),radial-gradient(circle at 50% 36%,#fff,#E6F5D2 85%)!important}
:root body #games-room .sw-choose .mg-pick>span,:root body #games-room .sw-choose .mg-pick>small{display:block;margin-top:-6px;padding:2px 10px 4px;border-radius:10px;font-family:var(--ui-display);font-weight:800;font-size:15px;line-height:1.1;color:#fff;
 background:linear-gradient(180deg,var(--ui-forest-500),var(--ui-forest-700));box-shadow:0 3px 0 var(--ui-forest-900);text-shadow:0 2px 0 var(--ui-forest-900)}
:root body #games-room .sw-chip{background:linear-gradient(180deg,#fff,var(--ui-paper))!important;border:3px solid #fff;box-shadow:0 3px 0 var(--ui-paper-lip)!important}
:root body #games-room .sw-hint,:root body #games-room .sw-home{background:linear-gradient(180deg,#fff,var(--ui-paper))!important;border:3px solid #fff;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important}
/* Bath Time: tool buttons are candy tiles, progress bar a glossy pill */
:root body #games-room .bt-tools .mg-big,:root body #games-room .bt-tools .mg-round{width:64px;min-width:64px;height:64px;border-radius:var(--ui-r-md)}
:root body #games-room .bt-tools .mg-big[aria-pressed=true]{outline:4px solid var(--ui-sun-400);outline-offset:2px}
:root body #games-room .bt-hatbtn{--c:#fff;--c-hi:#fff;--c-lip:var(--ui-paper-lip)}
:root body #games-room .bt-bar>*{height:16px;border-radius:var(--ui-pill);border:3px solid #fff;background:linear-gradient(180deg,#E8EEF2,#fff);box-shadow:0 3px 0 var(--ui-paper-lip)}
:root body #games-room .bt-bar>.on,:root body #games-room .bt-bar>.full{background:linear-gradient(180deg,var(--ui-sky-300),var(--ui-sky-500))}
/* Memory Match: branded back = Sunny the cub on a diamond-patterned green card with a gold inner border; face = paper */
:root body #games-room .mm-back{background:url(assets/mascot.svg) center 54%/66% no-repeat,radial-gradient(circle at 50% 45%,rgba(255,255,255,.28),transparent 62%),
 linear-gradient(45deg,rgba(255,255,255,.07) 25%,transparent 25% 75%,rgba(255,255,255,.07) 75%) 0 0/22px 22px,linear-gradient(180deg,#3A9A70,#25694E)!important;
 border:3px solid #fff;border-radius:var(--ui-r-sm);box-shadow:inset 0 0 0 3px var(--ui-sun-400),0 5px 0 var(--ui-forest-900),var(--ui-shadow-1)!important}
:root body #games-room .mm-back svg{display:none}
:root body #games-room .mm-face{background:radial-gradient(circle at 50% 38%,#fff,#FFF0C4 85%)!important;border:3px solid #fff;border-radius:var(--ui-r-sm);box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important}
:root body #games-room .mm-card.done .mm-face{background:radial-gradient(circle at 50% 38%,#FFFBE0,#FFE27A 90%)!important;box-shadow:0 5px 0 var(--ui-sun-lip),0 0 0 4px var(--ui-sun-400) inset!important}
:root body #games-room .mm-dots span{border:2px solid #fff;box-shadow:0 2px 0 var(--ui-paper-lip)}
/* Fossil Dig: pills + sand frame + dashed gold slots */
:root body #games-room .fd-pill,:root body #games-room .tr-pill,:root body #games-room .tr-ticket{border:3px solid #fff;background:linear-gradient(180deg,#fff,var(--ui-paper))!important;color:var(--ui-sun-ink);box-shadow:0 3px 0 var(--ui-paper-lip),var(--ui-shadow-1)!important}
:root body #games-room .fd-box{border:4px solid #fff;box-shadow:0 7px 0 #A9824F,var(--ui-shadow-2)}
:root body #games-room .fd-museum{border:4px solid #fff;box-shadow:inset 0 -14px 0 #C9B48A,0 6px 0 var(--ui-paper-lip),var(--ui-shadow-2)}
:root body #games-room .fd-tool{filter:drop-shadow(0 4px 2px rgba(0,0,0,.3))}
:root body #games-room .fd-tray .slot,:root body #games-room .fd-tray>*{border-radius:var(--ui-r-sm)}
:root body #games-room .fd-tray .empty{border:3px dashed #D9B25A!important;background:rgba(255,248,225,.8)!important}
:root body #games-room .fd-sign{background:linear-gradient(180deg,var(--ui-forest-500),var(--ui-forest-700));box-shadow:0 3px 0 var(--ui-forest-900);color:#fff}
/* Hide & Seek: prompt gets a bigger picture, tray slots are dashed gold, search is a gold candy */
:root body #games-room .hs-prompt-pic{width:72px!important;height:64px!important;border-radius:var(--ui-r-sm);background:radial-gradient(circle at 50% 38%,#fff,#FFF0C4 85%)!important;border:3px solid #fff;box-shadow:0 2px 0 var(--ui-paper-lip)}
:root body #games-room .hs-tray>*{border-radius:var(--ui-r-sm)}
:root body #games-room .hs-tray .empty,:root body #games-room .hs-tray .slot{border:3px dashed #D9B25A!important;background:rgba(255,248,225,.75)!important}
:root body #games-room .hs-count{border:3px solid #fff;background:linear-gradient(180deg,#fff,var(--ui-paper))!important;box-shadow:0 3px 0 var(--ui-paper-lip)!important;border-radius:var(--ui-pill)}
/* Zoo Train: ticket row as paper pills, "Hop on" is a green candy, balloons keep their colour */
:root body #games-room .tr-hello button{border:3px solid #fff!important;border-radius:var(--ui-r-lg)!important;background:linear-gradient(180deg,#fff,var(--ui-paper))!important;box-shadow:0 5px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
:root body #games-room .tr-hello b{min-height:36px;border:2px solid #fff;background:var(--ui-grad-gloss),linear-gradient(180deg,var(--ui-leaf-400),var(--ui-leaf-500) 60%)!important;box-shadow:0 3px 0 var(--ui-leaf-lip)!important;text-shadow:0 2px 0 rgba(30,90,45,.45)}
:root body #games-room .tr-uhoh{border:3px solid #fff;box-shadow:0 4px 0 var(--ui-paper-lip),var(--ui-shadow-2)!important}
/* Who Am I: the silhouette sits on a glowing disc and the three answers are the same photo tiles */
:root body #games-room .mg-stage .mg-listen,:root body #games-room .mg-stage .wa-listen{border:3px solid #fff}

/* =====================================================================================================
   ROUND 2, AREA: header logo, first-run hand on phones, toast vs panel header
   ===================================================================================================== */
/* The compact logo has a full-width "Little Keeper's" line; same footprint as before but ~1.45x bigger letters */
:root body .world-brand .zoo-logo{width:268px!important}
:root body .world-brand .zoo-logo img{width:100%;height:auto}
@media(max-width:700px){:root body .world-brand .zoo-logo{width:208px!important}}
/* Phones: the pointing hand sat on the welcome text; the glowing ring on the button is enough there */
@media(max-width:650px){:root body:has(#zoo-welcome:not([hidden])) #fr-layer .fr-hand{display:none}}
/* Toasts ("Spotted!", "Thank you!") never sit over the open panel's header: they drop to just above the dock */
:root body:has(#zoo-panel:not([hidden])) #hd-care-note{top:auto!important;bottom:calc(112px + env(safe-area-inset-bottom));z-index:90}

/* Nov 17, 2026 playtest fix 1: in the trial, free games come first (locked tiles move to the end). */
#games-room .gr-full{max-width:900px;margin:28px auto 0;padding-top:18px;border-top:2px solid var(--z-line)}
#games-room .gr-full h3{margin:0 0 14px;color:var(--z-forest);font-size:1.2rem}
#games-room .gr-sample{color:var(--z-forest);font-weight:800;margin-top:5px}
.first-sticker-note,.giraffe-visit{margin:12px 0;padding:14px;border-radius:20px;background:#fff4cd;border:2px solid #edcf7b}
.first-sticker-earned{outline:3px solid #d99715;outline-offset:2px}
.giraffe-visit{display:grid;grid-template-columns:clamp(52px,15%,100px) 1fr;align-items:start;gap:12px}
.giraffe-visit img{width:100%;object-fit:contain}
.giraffe-visit h3,.giraffe-visit p{margin:0 0 8px}
.giraffe-visit-steps,.giraffe-visit-choices{display:flex;gap:6px;flex-wrap:wrap}
.giraffe-visit-steps{margin-bottom:10px}
.giraffe-visit-steps span{background:#eee9d4;border-radius:999px;padding:5px;opacity:.55}
.giraffe-visit-steps .earned{background:#ffe28a;opacity:1}
.giraffe-visit-choices .pr-action{min-width:57px}
.giraffe-visit-choices button:disabled{opacity:.45}

/* Nov 17, 2026 playtest fix 3: phones held sideways (short, wide screens). They are wider than 700 px, so they got the
   iPad layout: a floating panel that stopped 104 px above the bottom (an 80 px strip under the tab bar), a welcome card
   pushed into the tab bar and a gate keypad that did not fit. Here: slim header and tab bar, panels use the full
   height between them, the welcome card sits in the free space at the left, the gate puts its keypad beside the question. */
@media (max-height:500px) and (min-aspect-ratio:3/2){
 :root body .world-brand .zoo-logo{width:150px!important}
 :root body .world-header{padding:8px 18px 36px!important}
 :root body .zoo-dock{bottom:calc(6px + env(safe-area-inset-bottom))!important;padding:4px!important;border-radius:20px!important;gap:2px!important}
 :root body .zoo-dock button{min-height:46px!important;min-width:64px;padding:4px 10px!important;gap:2px!important;font-size:10px!important}
 :root body #zoo-panel{top:calc(6px + env(safe-area-inset-top))!important;bottom:calc(64px + env(safe-area-inset-bottom))!important;left:max(12px,env(safe-area-inset-left))!important;right:max(12px,env(safe-area-inset-right))!important;width:auto!important;max-width:none!important;border-radius:22px!important}
 :root body #zoo-panel:before{display:none}
 :root body #zoo-panel>header{padding:6px 14px!important;min-height:0!important}
 :root body #zoo-title{font-size:19px!important}
 :root body #zoo-list{padding-top:8px!important}
 :root body #zoo-welcome{top:calc(70px + env(safe-area-inset-top))!important;bottom:auto!important;left:max(16px,env(safe-area-inset-left))!important;right:auto!important;transform:none!important;width:250px!important;max-width:none!important;padding:12px 14px 14px 86px!important;text-align:left!important;animation:none}
 :root body #zoo-welcome .welcome-icon{display:block!important;left:6px!important;top:10px!important;width:76px!important;height:76px!important;transform:none!important}
 :root body #zoo-welcome h2{font-size:19px!important}
 :root body #zoo-welcome p{margin:2px 0 10px!important}
 :root body #zoo-welcome #zoo-first{min-height:52px!important;font-size:20px!important}
 :root body #zoo-welcome .pr-welcome-voice{top:auto!important;bottom:-14px!important;right:-10px!important}
 :root body #zoo-list .pgate{grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:22px;justify-items:center}
 :root body #zoo-list .pgate>*{grid-column:1}
 :root body #zoo-list .pgate .pgate-keys{grid-column:2;grid-row:1 / span 8;grid-template-columns:repeat(3,64px);gap:8px}
 :root body #zoo-list .pgate-key{width:64px!important;height:40px!important;font-size:21px!important}
 :root body #zoo-list .pgate .pgate-keys{gap:6px}
 :root body #zoo-save-status{display:none!important}
 :root body #animal-card{left:auto!important;right:max(12px,env(safe-area-inset-right))!important;top:calc(64px + env(safe-area-inset-top))!important;bottom:auto!important;transform:none!important;width:300px!important;max-width:300px!important}
 :root body #zoo-list .pr-habitats,:root body #zoo-list .pr-animals{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 :root body #zoo-list .pr-habitats .pr-portrait,:root body #zoo-list .pr-animals .pr-portrait{height:104px!important;aspect-ratio:auto!important}
 :root body #zoo-list .pr-habitats .pr-portrait img,:root body #zoo-list .pr-animals .pr-portrait img{height:100%!important;width:100%!important;object-fit:contain}
 :root body #zoo-list .pgate-words{font-size:24px!important}
 :root body #zoo-list .pgate-ask,:root body #zoo-list .pgate-note{font-size:15px!important}
}
/* Nov 17, 2026 playtest fix 6: Sticker Book pages (paper with sticker slots) and clearer Keeper jobs. */
#zoo-list .pr-book-intro{display:flex;align-items:center;gap:10px}#zoo-list .pr-book-intro .bp-total{margin-left:auto;display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;background:#ffe9a8;color:#5a3a00;font-weight:800;font-size:18px}
#zoo-list .bp-total svg,#zoo-list .bp-count svg{width:22px;height:22px}
#zoo-list .pr-book{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
#zoo-list .book-page{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:10px;min-height:150px;padding:14px 14px 12px 26px;border:0;border-radius:6px 18px 18px 6px;background:linear-gradient(90deg,#e9d7ab 0 10px,#fff8e6 10px);box-shadow:0 4px 0 #d8c08a,0 8px 16px rgba(60,40,10,.14);text-align:left;color:#3b2a10;font:inherit;cursor:pointer}
#zoo-list .book-page strong{font-family:var(--z-head,inherit);font-size:18px}
#zoo-list .book-page.page-complete{background:linear-gradient(90deg,#e8c25a 0 10px,#fff4c8 10px)}
#zoo-list .bp-stickers{display:flex;flex-wrap:wrap;gap:8px}
#zoo-list .bp-st{width:54px;height:54px;border-radius:50%;border:3px dashed #d6c193;display:grid;place-items:center;overflow:hidden;background:#fffdf6}
#zoo-list .bp-st img{width:88%;height:88%;object-fit:contain;filter:grayscale(1) brightness(.3);opacity:.22}
#zoo-list .bp-st.on{border:3px solid #fff;background:#fff;box-shadow:0 3px 6px rgba(0,0,0,.2);transform:rotate(-4deg)}#zoo-list .bp-st.on:nth-child(even){transform:rotate(5deg)}
#zoo-list .bp-st.on img{filter:none;opacity:1}
#zoo-list .bp-count{display:inline-flex;align-items:center;gap:4px;margin-top:auto;align-self:flex-end;font-weight:800;color:#7a5a20}
:root body #zoo-list .book-page .ent-lock{left:auto!important;right:8px!important;top:8px!important;width:34px!important;height:34px!important}
#zoo-list .pr-jobs{grid-template-columns:repeat(3,minmax(0,1fr))}
#zoo-list .pr-jobs .keeper-task{min-height:190px}
#zoo-list .pr-jobs .pr-moment-art{width:96px;height:96px}#zoo-list .pr-jobs .pr-moment-art>svg{width:64px;height:64px}
#zoo-list .pr-jobs .keeper-task strong{font-size:19px}
@media (max-width:560px){#zoo-list .pr-jobs{grid-template-columns:1fr}#zoo-list .pr-jobs .keeper-task{min-height:96px;flex-direction:row;justify-content:flex-start;gap:14px}#zoo-list .pr-jobs .pr-moment-art{width:72px;height:72px}#zoo-list .pr-book{grid-template-columns:1fr}}
@media (max-height:500px) and (min-aspect-ratio:3/2){#zoo-list .pr-jobs-head{padding:4px}#zoo-list .pr-jobs-head button{min-height:52px;padding:4px 12px}#zoo-list .pr-jobs .keeper-task{min-height:110px}#zoo-list .pr-jobs .pr-moment-art{width:64px;height:64px}#zoo-list .pr-book{grid-template-columns:repeat(3,minmax(0,1fr))}#zoo-list .book-page{min-height:120px}#zoo-list .bp-st{width:42px;height:42px}}
