:root { --ink:#11264B; --muted:#585e7a; --bg:#f4f5fb; --card:#fff; --line:#d9dcec; --brand:#0F2D5C; --accent:#ffb703; --ok:#1d7a46; --warn:#8a5a00; --c:#232a5c; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:17px/1.45 ui-rounded,"SF Pro Rounded","Nunito","Segoe UI",system-ui,sans-serif; }
#app { max-width:920px; margin:0 auto; min-height:100dvh; }
main { padding:12px 16px 40px; }
h1 { font-size:1.55rem; line-height:1.25; margin:.4rem 0; } h1:focus { outline:none; } h2 { font-size:1.15rem; }
a { color:inherit; }
button,.button { font:inherit; font-weight:700; min-height:48px; padding:10px 18px; border-radius:16px; border:2px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer; text-decoration:none; text-align:center; display:inline-block; }
button:disabled { opacity:.45; cursor:default; }
:focus-visible { outline:3px solid #1c7ed6; outline-offset:2px; }
.primary { background:var(--brand); border-color:var(--brand); color:#fff; }
.link { background:none; border:0; text-decoration:underline; min-height:44px; padding:10px 4px; font-weight:600; display:inline-block; }
.danger { border-color:#c92a2a; color:#c92a2a; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.skip { position:absolute; left:-999px; } .skip:focus { left:8px; top:8px; background:#fff; padding:8px; z-index:9; }
.small { font-size:.88rem; color:var(--muted); } .center { text-align:center; }
.bar { display:flex; align-items:center; gap:10px; padding:10px 16px; position:sticky; top:0; background:var(--bg); z-index:2; }
.brand { font-weight:900; font-size:1.2rem; margin-right:auto; }
.round { width:48px; height:48px; min-height:48px; padding:0; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:1.2rem; border:2px solid var(--line); background:var(--card); text-decoration:none; flex:none; }
.ghost { visibility:hidden; }
.buddy svg { width:48px; height:48px; display:block; }
.pill { background:var(--accent); border-radius:999px; padding:6px 14px; font-weight:800; white-space:nowrap; }
.classes { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; max-width:480px; margin:0 auto; }
.class-pick { font-size:1.7rem; padding:8px 0; line-height:1.1; } .class-pick small { display:block; font-size:.7rem; color:var(--muted); }
.scene svg { width:100%; aspect-ratio:16/10; display:block; }
footer { text-align:center; margin-top:18px; }
.stars { color:#d98e00; letter-spacing:2px; } .stars .dim { color:#c9ccdb; }
.dots { flex:1; display:flex; gap:6px; justify-content:center; } .dots i { width:100%; max-width:36px; height:10px; border-radius:9px; background:var(--line); }
.dots .now { background:var(--accent); } .dots .yes { background:var(--ok); } .dots .no { background:#8d93a8; }
.play { max-width:640px; margin:0 auto; text-align:center; padding-bottom:110px; }
.tag { display:inline-block; margin:0; padding:3px 12px; border-radius:999px; background:var(--c); color:#fff; font-size:.8rem; font-weight:700; }
.prompt { font-size:clamp(1.2rem,4.4vw,1.6rem); text-wrap:balance; }
.art { display:flex; justify-content:center; margin:8px 0; color:var(--ink); } .art > svg { width:100%; max-height:34dvh; }
.matrix { display:flex; flex-direction:column; gap:4px; width:100%; align-items:center; } .matrix svg { width:216px; }
.choices { display:grid; grid-template-columns:1fr; gap:10px; margin-top:12px; }
@media (min-width:560px) { .choices { grid-template-columns:1fr 1fr; } }
.choices.pictures { grid-template-columns:repeat(4,1fr); } .choices.pictures svg { width:100%; max-width:64px; } .choices.pictures .choice { padding:10px 4px; }
.choice { min-height:58px; font-size:1.1rem; }
.choice[aria-pressed=true] { border-color:var(--brand); background:#e7e9fb; box-shadow:0 0 0 2px var(--brand); }
.choice.correct { border-color:var(--ok); background:#dff4e7; opacity:1; box-shadow:0 0 0 2px var(--ok); } .choice.correct::after { content:" ✓"; }
.choice.wrong { text-decoration:line-through; }
output.typed { display:block; margin:10px auto; min-width:180px; max-width:260px; min-height:52px; font-size:1.8rem; font-weight:900; border-bottom:4px solid var(--brand); }
.keypad { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; max-width:300px; margin:0 auto; } .keypad button { font-size:1.35rem; }
.pads { display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:280px; margin:12px auto; }
.pad { aspect-ratio:1; padding:22px; opacity:1; } .pad:disabled { opacity:1; } .pad svg { width:100%; height:100%; opacity:.45; }
.pad.lit { background:#fff3bf; border-color:var(--accent); transform:scale(1.05); } .pad.lit svg { opacity:1; }
.feedback { margin-top:12px; scroll-margin-bottom:100px; } .feedback:not(:empty) { padding:12px 16px; border-radius:16px; border:2px solid; text-align:left; }
.feedback.right { background:#dff4e7; border-color:var(--ok); } .feedback.retry,.feedback.hint { background:#fff3d6; border-color:var(--warn); } .feedback.shown { background:#e7e9fb; border-color:var(--brand); }
.actions { position:fixed; left:0; right:0; bottom:0; display:flex; gap:10px; justify-content:center; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); background:var(--bg); border-top:1px solid var(--line); }
.actions .primary { flex:1; max-width:420px; }
.result { text-align:center; padding-top:36px; } .big { font-size:3rem; margin:0; } .big-buddy svg { width:110px; height:110px; }
.stack { display:flex; flex-direction:column; gap:10px; max-width:320px; margin:20px auto; }
.confetti i { position:fixed; top:-12px; left:calc(var(--x) * 1%); width:9px; height:14px; background:hsl(var(--h) 80% 55%); animation:fall 2.2s var(--d) ease-in forwards; pointer-events:none; }
@keyframes fall { to { transform:translateY(105vh) rotate(540deg); } }
.sheet { max-width:640px; margin:0 auto; } .sheet input { font:inherit; font-size:1.2rem; padding:10px; width:120px; margin:0 8px; border:2px solid var(--line); border-radius:12px; }
table { width:100%; border-collapse:collapse; background:var(--card); font-size:.92rem; } th,td { text-align:left; padding:8px; border-bottom:1px solid var(--line); }
@media (prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; } .confetti { display:none; } .pad.lit { transform:none; } }
.num { display:inline-block; min-width:1.6em; margin-right:6px; border-radius:99px; background:var(--brand); color:#fff; font-size:.85rem; }
.match { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; } .match > div { display:flex; flex-direction:column; gap:8px; }
.choice svg { max-width:64px; vertical-align:middle; }
.sort { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.sort-row { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:6px; align-items:center; text-align:left; font-weight:800; } .sort-row .choice { font-size:.88rem; min-height:48px; padding:6px; }
.tiles { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; } .tiles button { min-width:52px; font-size:1.35rem; padding:8px; }
.grid { display:grid; gap:6px; max-width:360px; margin:12px auto; } .cell { padding:4px; min-height:52px; aspect-ratio:1; } .cell svg { width:100%; height:100%; max-width:none; }
.worldmap{display:block;width:100%;height:auto;border-radius:12px}
.map-box{cursor:crosshair;touch-action:manipulation;border-radius:12px}
.art .worldmap{max-width:640px;margin:0 auto}
.map-card{display:grid;gap:.6rem;justify-items:stretch;margin:0 0 1.2rem}
/* Playful layer for young children: sky, hills, colour and gentle motion. Text stays dark on light. */
:root { --muted:#454b6b; }
html { background:#cdeeff; }
body { background:linear-gradient(180deg,#bfe7ff 0%,#e8f7ff 42%,#fff6d9 100%) fixed; min-height:100dvh; position:relative; isolation:isolate; overflow-x:hidden; }
body::before { content:""; position:fixed; top:90px; left:-120px; right:-120px; height:240px; z-index:-1; pointer-events:none; animation:drift 26s ease-in-out infinite alternate;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 240'%3E%3Cg fill='%23fff'%3E%3Cpath d='M40 70a22 22 0 0 1 40-12 28 28 0 0 1 52 6 18 18 0 0 1-2 36H48a15 15 0 0 1-8-30z'/%3E%3Cpath d='M300 150a18 18 0 0 1 33-9 22 22 0 0 1 42 5 14 14 0 0 1-2 28h-67a12 12 0 0 1-6-24z' opacity='.8'/%3E%3C/g%3E%3Cpath fill='%23ffd43b' d='M220 40l5 11 12 1-9 8 3 12-11-6-11 6 3-12-9-8 12-1z'/%3E%3Ccircle cx='420' cy='60' r='7' fill='%23ffd43b'/%3E%3Ccircle cx='180' cy='180' r='6' fill='%23ff8fab'/%3E%3C/svg%3E") repeat-x 0 0/480px 240px; }
body::after { content:""; position:fixed; left:0; right:0; bottom:0; height:130px; z-index:-1; pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 130'%3E%3Cpath d='M0 70Q100 10 200 62T400 70V130H0Z' fill='%23b2e59b'/%3E%3Cpath d='M0 104Q90 62 190 100T400 104V130H0Z' fill='%238fd67c'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='52' cy='108' r='4'/%3E%3Ccircle cx='260' cy='114' r='4'/%3E%3C/g%3E%3Cg fill='%23ff6b8a'%3E%3Ccircle cx='120' cy='112' r='3.5'/%3E%3Ccircle cx='315' cy='118' r='3.5'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom left/400px 130px; }
@keyframes drift { to { transform:translateX(100px); } }
.bar { background:rgba(255,255,255,.85); border-radius:0 0 24px 24px; box-shadow:0 4px 14px rgba(35,42,92,.10); }
.brand { color:#5f2bb8; }
button,.button,.round { box-shadow:0 4px 0 rgba(35,42,92,.16); transition:transform .12s; }
button:not(:disabled):active,.button:active,.round:active { transform:translateY(3px); box-shadow:0 1px 0 rgba(35,42,92,.16); }
.link { box-shadow:none; }
.primary { background:linear-gradient(135deg,#6741d9,#1c53b5); border-color:#3b3aa8; }
.pill { box-shadow:0 3px 0 #d98e00; }
.classes { grid-template-columns:repeat(5,1fr); }
.class-pick:where(:nth-child(5n)) { background:#ead9ff; }
.class-pick:where(:nth-child(5n+1)) { background:#ffd8d8; } .class-pick:where(:nth-child(5n+2)) { background:#ffe8a3; }
.class-pick:where(:nth-child(5n+3)) { background:#c7f0c2; } .class-pick:where(:nth-child(5n+4)) { background:#c5e3ff; }
.class-pick small { color:var(--ink); }
@keyframes bob { 50% { transform:translateY(-7px); } }
main[style] { background:linear-gradient(180deg,color-mix(in srgb,var(--c) 15%,#fff),rgba(255,255,255,0) 70%); border-radius:24px; }
footer,.small.center { background:rgba(255,255,255,.82); border-radius:14px; padding:6px 10px; }
.play .prompt { background:#fff; border:3px solid var(--c); border-radius:22px; padding:14px 16px; box-shadow:0 5px 0 color-mix(in srgb,var(--c) 35%,transparent); }
.play .art > svg:not(.worldmap) { background:#fff; border-radius:18px; padding:6px; }
.choice,.keypad button,.tiles button,.cell,.pad { background:#fff; }
.choice:where(:nth-child(4n+1)),.keypad button:where(:nth-child(4n+1)),.tiles button:where(:nth-child(4n+1)){ background:#ffe3e3; border-color:#f08c8c; }
.choice:where(:nth-child(4n+2)),.keypad button:where(:nth-child(4n+2)),.tiles button:where(:nth-child(4n+2)){ background:#fff0b3; border-color:#e8b407; }
.choice:where(:nth-child(4n+3)),.keypad button:where(:nth-child(4n+3)),.tiles button:where(:nth-child(4n+3)){ background:#d8f5d0; border-color:#69bd5c; }
.choice:where(:nth-child(4n)),.keypad button:where(:nth-child(4n)),.tiles button:where(:nth-child(4n)){ background:#d6ebff; border-color:#6bb0ea; }
.choice[aria-pressed=true] { border-color:var(--brand); background:#fff; box-shadow:0 0 0 4px var(--brand); transform:scale(1.03); }
:where(.match,.grid) .choice { background:#fff; border-color:var(--line); }
.choice.correct { background:#b2f2bb; border-color:var(--ok); box-shadow:0 0 0 4px var(--ok); animation:pop .45s; }
.choice.wrong { background:#eceef4; }
.sort-row { background:#fff; border-radius:16px; padding:6px 8px; }
.play .small { background:rgba(255,255,255,.88); border-radius:10px; width:fit-content; margin-left:auto; margin-right:auto; padding:3px 10px; }
output.typed { background:#fff; border-radius:14px 14px 0 0; }
.feedback.right { animation:pop .45s; }
.actions { background:rgba(255,255,255,.94); }
@keyframes pop { 40% { transform:scale(1.05); } }
.result { background:repeating-conic-gradient(from 0deg at 50% 120px,rgba(255,212,59,.35) 0 10deg,transparent 10deg 20deg); border-radius:24px; min-height:100dvh; }
.result h1,.result > p { background:rgba(255,255,255,.9); border-radius:14px; width:fit-content; margin-left:auto; margin-right:auto; padding:4px 14px; }
.big-buddy svg { animation:bob 1.4s ease-in-out infinite; }
.sheet { background:#fff; border-radius:22px; margin-top:8px; }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; } .choice[aria-pressed=true] { transform:none; } }
.passage{margin:10px 0;padding:14px 16px;text-align:left;background:#fff;border-radius:18px;border-left:6px solid var(--c);line-height:1.6}
/* Picture games */
.scene-art { background:#fff; border-radius:16px; }
.art .scene-art { max-height:46dvh; }
.art [data-part][role=button] { cursor:pointer; }
.art [data-part].picked, .art [data-part]:focus-visible { filter:drop-shadow(0 0 3px #232a5c) drop-shadow(0 0 5px #232a5c); outline:none; }
.art [data-part].right-part { filter:drop-shadow(0 0 4px #2b8a3e) drop-shadow(0 0 8px #2b8a3e); animation:pop .45s; }
.reveal { position:relative; max-width:360px; margin:8px auto; } .reveal > svg { display:block; width:100%; }
.cover { position:absolute; inset:0; display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); }
.cover i { background:#4c6ef5; border:2px solid #fff; border-radius:10px; color:#fff; font:900 1.6rem/1 inherit; display:flex; align-items:center; justify-content:center; transition:opacity .4s, transform .4s; }
.cover i.gone { opacity:0; transform:scale(.4); }
.clues { max-width:420px; margin:8px auto; font-weight:700; }
.slots, .tray { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:10px 0; }
.slot, .piece { width:104px; min-height:112px; padding:6px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font-size:.82rem; line-height:1.2; }
.slot svg, .piece svg { width:56px; height:56px; }
.slot { border-style:dashed; background:#fff; } .slot.full { border-style:solid; border-color:var(--brand); } .slot:disabled { opacity:1; }
.tray { background:#e7e9fb; border-radius:16px; padding:10px; } .piece:disabled { opacity:.25; }
.clues { list-style-position:inside; padding:0; text-align:center; }
.reveal { max-width:min(360px, 40dvh); }
@media (max-width:520px) { .slot, .piece { width:76px; min-height:92px; font-size:.72rem; padding:4px; } .slot svg, .piece svg { width:44px; height:44px; } .slots, .tray { gap:6px; } }
/* Keep the last answers clear of the fixed Hint and Check bar. */
.play [data-board] { padding-bottom:40px; }
.chip, .card { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:4px 6px; font-size:.75rem; line-height:1.1; min-height:56px; min-width:58px; border-radius:12px; background:#fff; }
.chip b { font-size:1.6rem; } .card b { font-size:2rem; }
.chip.held, .card[aria-pressed=true] { border-color:var(--brand); box-shadow:0 0 0 4px var(--brand); }
.chip:disabled { opacity:1; }
.venn { display:grid; grid-template-columns:1fr 1fr 1fr; gap:4px; }
.zone { border:3px solid #74c0fc; background:#e7f5ff; border-radius:28px 8px 8px 28px; padding:6px 3px; display:flex; flex-direction:column; align-items:center; gap:4px; min-height:130px; min-width:0; }
.zone > div { display:flex; flex-wrap:wrap; justify-content:center; gap:4px; }
.zone.z1 { border-color:#9775fa; background:#f3f0ff; border-radius:8px; }
.zone.z2 { border-color:#faa2c1; background:#fff0f6; border-radius:8px 28px 28px 8px; }
.zone.z3 { grid-column:1 / -1; border-color:var(--line); background:#fff; border-radius:16px; min-height:80px; }
.zone-name { width:100%; font-size:.76rem; line-height:1.15; padding:4px 2px; min-height:48px; }
.zone-name:disabled { opacity:1; }
.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); gap:6px; }
.card.out { opacity:.28; text-decoration:line-through; }
.card.correct { border-color:var(--ok); box-shadow:0 0 0 4px var(--ok); opacity:1; }
.asks { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; } .asks button { font-size:.88rem; padding:8px 12px; }
/* Ways to play */
.surprise { font-size:1.1rem; }
/* Progress journey */
/* Passes and gifts */
.shop { max-width:720px; margin:0 auto; } .shop h1 { text-align:center; }
.plans { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; margin:12px 0; }
.plan { background:#fff; border:3px solid var(--line); border-radius:20px; padding:10px; text-align:center; } .plan.pick { border-color:var(--accent); }
.plan h2 { margin:4px 0; } .price { font-size:2rem; font-weight:900; margin:4px 0; }
.giftform { display:grid; gap:8px; max-width:420px; margin:10px auto; } .giftform label { display:grid; gap:2px; font-weight:700; font-size:.9rem; }
.giftform input { font:inherit; padding:10px; border-radius:12px; border:2px solid var(--line); }
.giftcard { max-width:420px; margin:12px auto; padding:18px; border-radius:24px; text-align:center; color:#fff; background:var(--g); border:6px dashed #fff; box-shadow:0 8px 20px #0003; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.gift-icon { font-size:3.4rem; } .gift-title { font-size:1.4rem; font-weight:900; margin:6px 0; overflow-wrap:anywhere; } .gift-brand { font-weight:800; margin:12px 0 0; }
.code { display:inline-block; background:#fff; color:var(--ink); border-radius:12px; padding:8px 14px; font:900 1.25rem/1.3 ui-monospace,monospace; letter-spacing:.06em; }
.shop > .code { display:block; max-width:300px; margin:10px auto; text-align:center; }
@media print { .bar, .noprint { display:none !important; } }
/* Treasure hunt */
.hunt { max-width:560px; margin:0 auto; } .hunter { position:relative; text-align:center; } .hunter svg { width:84px; height:84px; } .hunter .hat { position:absolute; top:-14px; left:50%; translate:-50% 0; font-size:2rem; }
.keys { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; } .keys span { font-size:.76rem; font-weight:700; padding:4px 8px; border-radius:999px; background:#eceef4; } .keys span.got { background:#fff; border:2px solid var(--c); }
.islands { list-style:none; padding:0; } .islands li { display:flex; gap:12px; align-items:center; background:#e9ecf5; border:3px dashed #b8bfd8; border-radius:22px; padding:10px 14px; margin:0 0 18px; width:86%; position:relative; }
.islands li:nth-child(even) { margin-left:14%; } .islands li:not(:last-child)::after { content:"· · ·"; position:absolute; left:45%; bottom:-19px; font-weight:900; color:#8a5a00; rotate:20deg; }
.islands li.open { background:#fff7d6; border:3px solid #e8a317; } .islands li.next { box-shadow:0 0 0 4px #ffe8a3; } .islands b { font-size:2.2rem; } .islands small, .islands .button, .islands button { display:block; margin-top:4px; }
.certificate { display:none; text-align:center; border:10px double #b8860b; padding:40px; font-size:1.3rem; } .certificate p:first-child { font-size:4rem; margin:0; }
.found { background:#fff7d6; border:3px solid #e8a317; border-radius:18px; padding:8px 14px; animation:pop .5s; }
@media print {  .hunt > *:not(.certificate) { display:none !important; } .certificate { display:block; } }
/* First page */
.logo-mark { display:block; width:72px; height:72px; margin:0 auto; } .logo-mark.big { width:112px; height:112px; animation:bob 3s ease-in-out infinite; filter:drop-shadow(0 8px 10px #0003); }
.tagline { font-weight:800; margin:4px auto 0; max-width:34ch; }
@keyframes bob { 50% { transform:translateY(-10px) rotate(6deg); } }
@media (prefers-reduced-motion:reduce) {  .logo-mark.big { animation:none; } }
.giftform select { font:inherit; padding:10px; border-radius:12px; border:2px solid var(--line); background:#fff; }
.giftform label.tick { display:flex; align-items:flex-start; gap:10px; font-weight:600; } .tick input { width:22px; height:22px; flex:none; }
.profile { max-width:420px; margin:10px auto; background:#fff; border-radius:16px; padding:12px 16px; } .profile dt { font-weight:800; } .profile dd { margin:0 0 8px; }
/* Bottom menu, Games hub and arcade */
.hub { max-width:640px; margin:0 auto; }
.howto { text-align:center; background:#fff; border:3px solid var(--c); border-radius:24px; padding:12px; } .howto > b { font-size:3.2rem; } .howto h1 { margin:0; } .howto ol { display:inline-block; text-align:left; font-weight:700; margin:6px 0 10px; }
.levelgrid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-top:14px; } .levelgrid > * { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:62px; border-radius:16px; background:#fff; border:2px solid var(--c); text-decoration:none; font-weight:900; font-size:1.1rem; } .levelgrid > span { border-color:var(--line); opacity:.55; } .levelgrid .stars { font-size:.72rem; }
.arena { max-width:520px; margin:0 auto; text-align:center; } .status { font-weight:800; min-height:2.9em; }
.pipes { display:grid; gap:3px; max-width:min(460px,62dvh); margin:0 auto; background:#8d6e53; padding:6px; border-radius:18px; }
.pipes button { padding:0; min-height:0; aspect-ratio:1; border:0; border-radius:8px; background:#d9f2c4; overflow:hidden; } .pipes svg { width:100%; height:100%; display:block; } .pipes .mark { box-shadow:inset 0 0 0 5px #f08c00; animation:pop .6s 3; }
.field { display:grid; gap:4px; max-width:min(400px,44dvh); margin:0 auto; background:#364fc7; padding:6px; border-radius:18px; container-type:inline-size; }
.field i { aspect-ratio:1; border-radius:8px; background:#edf2ff; display:flex; align-items:center; justify-content:center; font-style:normal; font-size:clamp(1.2rem,9cqi,2.4rem); } .field i.wall { background:#ced4da; }
.program { list-style:none; display:flex; flex-wrap:wrap; justify-content:center; gap:4px; padding:8px; margin:8px 0; min-height:52px; background:#fff; border:2px dashed var(--line); border-radius:14px; } .program li { font-size:1.4rem; } .program .empty { font-size:.9rem; color:var(--muted); align-self:center; }
.arrows, .tools, .takes { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:10px 0; } .arrows button { min-width:56px; font-size:1.4rem; } .arrows .primary { font-size:1.05rem; }
.pile { display:flex; flex-wrap:wrap; justify-content:center; align-content:center; gap:10px; min-height:220px; max-width:360px; margin:0 auto; background:#e9d8c0; border-radius:50% / 40%; padding:34px; }
.pile i { width:42px; height:34px; border-radius:50% 46% 52% 44%; background:radial-gradient(circle at 35% 30%,#dee2e6,#868e96 60%,#495057); transform:rotate(calc(var(--r) * 1deg)); box-shadow:0 4px 4px #0004; animation:pop .4s; }
.win { position:relative; overflow:hidden; background:#fff; border:3px solid var(--accent); border-radius:24px; padding:10px; animation:pop .5s; } .win .stars { font-size:2.6rem; }
.burst i { position:absolute; top:-10px; left:calc(var(--x) * 1%); width:9px; height:14px; background:hsl(var(--h) 85% 55%); animation:fall 1.6s var(--d) ease-in forwards; } @keyframes fall { to { translate:0 260px; rotate:360deg; opacity:0; } }
@media (prefers-reduced-motion:reduce) {  .burst i, .pile i, .pipes .mark { animation:none; } .burst { display:none; } }
.code-grid { display:grid; gap:3px; max-width:min(420px,56dvh); margin:0 auto; }
.code-grid button { padding:0; min-height:0; aspect-ratio:1; border-radius:6px; background:#fff; border:2px solid #adb5bd; font-size:1.1rem; color:#868e96; } .code-grid button.on { background:var(--c); border-color:var(--c); animation:pop .3s; } .code-grid button:disabled { opacity:1; }
.clue { display:flex; align-items:center; justify-content:center; gap:3px; font-size:.85rem; min-width:1.4em; } .clue.col { flex-direction:column; justify-content:flex-end; gap:0; } .clue.row { justify-content:flex-end; padding-right:4px; white-space:nowrap; }
.arrows button[aria-pressed=true], .blocks button[aria-pressed=true] { border-color:var(--brand); box-shadow:0 0 0 4px var(--brand); }
.bubblefield { display:grid; gap:6px; max-width:min(360px,48dvh); margin:0 auto; background:#d0ebff; padding:8px; border-radius:20px; }
.bubblefield button { padding:0; min-height:0; aspect-ratio:1; border-radius:50%; border:3px solid #fff; font-size:1.3rem; font-weight:900; background:radial-gradient(circle at 32% 28%,#fff,hsl(var(--h) 80% 76%) 45%,hsl(var(--h) 65% 60%)); animation:pop .35s; }
.bubblefield .picked { box-shadow:0 0 0 5px #232a5c; transform:scale(.92); } .bubblefield .mark { box-shadow:0 0 0 5px #f08c00; }
.shapeboard { display:grid; gap:2px; max-width:min(340px,42dvh); margin:0 auto; background:#6f4e37; padding:6px; border-radius:14px; }
.shapeboard button { padding:0; min-height:0; aspect-ratio:1; border:0; border-radius:5px; background:#f1e3d3; color:#1f2340; font-weight:900; }
.blocks { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:10px 0; } .blocks button { display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 10px; min-width:56px; }
@media (prefers-reduced-motion:reduce) { .bubblefield button, .code-grid button.on { animation:none; } }
/* Hands-on games */
[data-drag], .pathgrid button { touch-action:none; user-select:none; -webkit-user-select:none; }
.ghost-drag { position:fixed; z-index:50; translate:-50% -50%; scale:1.12; pointer-events:none; opacity:.92; box-shadow:0 10px 20px #0005; }
.held { box-shadow:0 0 0 4px var(--brand) !important; transform:translateY(-4px); }
.shake { animation:shake .4s; } @keyframes shake { 25% { translate:-7px 0; } 75% { translate:7px 0; } }
.trayrow { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; min-height:60px; padding:8px; }
.chip2 { min-height:48px; padding:6px 12px; cursor:grab; background:#fff; }
.bins { display:grid; grid-template-columns:1fr 1fr; gap:8px; } .bin { border:3px dashed var(--c); border-radius:20px; background:#fff; min-height:190px; padding:6px; display:flex; flex-direction:column; gap:6px; } .bin.b1 { background:#fff4e6; } .bin.mark { box-shadow:0 0 0 5px #f08c00; }
.binname { width:100%; font-size:.85rem; line-height:1.15; } .bin > div { flex:1; display:flex; flex-wrap:wrap; align-content:flex-start; justify-content:center; gap:4px; } .bin .chip2 { font-size:.82rem; min-height:36px; opacity:1; }
.target { font-size:1.3rem; } .target strong { font-size:2rem; }
.numline { max-width:480px; margin:26px auto; padding:0 14px; } .scale { position:relative; height:24px; margin:0 14px; font-weight:800; font-size:.85rem; } .scale span { position:absolute; translate:-50% 0; }
.numline input { width:100%; height:48px; accent-color:var(--c); }
.beam { display:flex; justify-content:space-between; align-items:flex-end; border-bottom:10px solid #8d5524; border-radius:6px; max-width:420px; margin:30px auto 0; transform:rotate(var(--tilt)); transition:transform .45s; min-height:90px; }
.pan { width:44%; min-height:64px; display:flex; flex-wrap:wrap-reverse; justify-content:center; align-content:flex-start; gap:4px; padding:4px; border-radius:12px 12px 0 0; background:#e9ecef; } .pan.right { border:2px dashed var(--c); }
.weight { display:inline-flex; align-items:center; justify-content:center; min-width:46px; min-height:46px; padding:4px; border-radius:10px 10px 6px 6px; background:#495057; color:#fff; border:2px solid #212529; font-weight:900; font-size:1.05rem; } .weight.fixed { background:var(--c); }
.fulcrum { width:0; height:0; margin:0 auto; border:26px solid transparent; border-top:0; border-bottom:44px solid #8d5524; }
.pathgrid { display:grid; gap:2px; max-width:min(420px,60dvh); margin:0 auto; background:#343a40; padding:5px; border-radius:14px; }
.pathgrid button { padding:0; min-height:0; aspect-ratio:1; border:0; border-radius:6px; background:#f1f3f5; display:flex; align-items:center; justify-content:center; } .pathgrid .on { background:var(--p); } .pathgrid .tip { box-shadow:inset 0 0 0 5px #fff; }
.pathgrid i { width:68%; aspect-ratio:1; border-radius:50%; background:var(--p); border:3px solid #fff; color:#fff; font:900 1rem/1 inherit; font-style:normal; display:flex; align-items:center; justify-content:center; text-shadow:0 1px 2px #000a; }
.cross { display:grid; gap:2px; max-width:440px; margin:0 auto; } .cross button { position:relative; padding:0; min-height:0; min-width:0; aspect-ratio:1; border-radius:4px; background:#fff; border:2px solid #868e96; font-weight:900; font-size:clamp(.8rem,3.6vw,1.2rem); } .cross small { position:absolute; left:1px; top:0; font-size:.55rem; color:var(--muted); }
.cross .lit { background:#fff3bf; } .cross .good { background:#b2f2bb; } .cross .tip { box-shadow:0 0 0 3px var(--brand); }
.keys2 { display:flex; flex-wrap:wrap; justify-content:center; gap:5px; margin:10px 0; } .keys2 button { min-width:44px; min-height:44px; padding:4px 8px; background:#fff; }
.clues2 { list-style:none; padding:0; text-align:left; display:grid; gap:4px; } .clues2 button { width:100%; text-align:left; font-weight:600; font-size:.88rem; } .clues2 .good { background:#b2f2bb; }
.tubes { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; margin:20px 0; }
.tube { display:flex; flex-direction:column-reverse; gap:2px; width:56px; padding:5px; border-radius:8px 8px 28px 28px; background:#fff; border:3px solid #495057; } .tube.mark { box-shadow:0 0 0 5px #f08c00; }
.tube i { display:flex; align-items:center; justify-content:center; height:34px; border-radius:6px; font-style:normal; color:#fff; font-size:1rem; } .tube i:first-child { border-radius:6px 6px 20px 20px; }
.tube .c0 { background:#e03131; } .tube .c1 { background:#f59f00; } .tube .c2 { background:#2f9e44; } .tube .c3 { background:#1c7ed6; } .tube .c4 { background:#9c36b5; }
.strip { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:24px 0; } .stripcard { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:84px; min-height:92px; background:#fff; border:3px solid var(--c); font-size:1.15rem; cursor:grab; } .stripcard small { font-size:.7rem; color:var(--muted); } .stripcard.good { background:#b2f2bb; }
.hub h2 { margin:14px 0 8px; }
@media (prefers-reduced-motion:reduce) { .shake { animation:none; } .beam { transition:none; } }
/* Treasure map */
.treasuremap { display:block; width:100%; max-width:420px; margin:0 auto; border:5px solid #c9a227; border-radius:26px; box-shadow:0 10px 24px #0004; }
.isle { cursor:pointer; } .isle:focus { outline:none; } .isle:focus-visible ellipse:first-child, .isle:hover ellipse:first-child { stroke:#232a5c; stroke-width:4; }
.fog { animation:drift 5s ease-in-out infinite; opacity:.92; } @keyframes drift { 50% { transform:translateX(7px); } }
.walker { transform:translate(var(--x), var(--y)); animation:walk 1.1s ease-out; } @keyframes walk { from { transform:translate(var(--x), calc(var(--y) + 90px)); opacity:0; } }
.hop { animation:hop 1.4s ease-in-out infinite; } @keyframes hop { 50% { transform:translateY(-9px); } }
.boat { animation:sail 6s ease-in-out infinite; } @keyframes sail { 50% { transform:translate(-26px,-6px); } }
.islecard { max-width:420px; margin:12px auto; text-align:center; background:#fff; border:3px solid var(--line); border-radius:24px; padding:10px; animation:pop .4s; } .islecard.open { border-color:#e8a317; background:#fff7d6; }
.chest { position:relative; width:96px; height:78px; margin:8px auto; } .chest i { position:absolute; left:0; width:96px; border:3px solid #5c2e0f; } .chest .box { bottom:0; height:44px; background:#a0522d; border-radius:4px 4px 10px 10px; } .chest .lid { bottom:42px; height:28px; background:#c0702f; border-radius:40px 40px 4px 4px; transform-origin:left bottom; } .chest b { position:absolute; left:34px; bottom:26px; font-size:1.4rem; }
.islecard.open .lid { transform:rotate(-34deg); } .islecard.fresh .lid { animation:lid .7s ease-out; } @keyframes lid { from { transform:rotate(0); } 60% { transform:rotate(-50deg); } }
.chest .glow { left:18px; width:60px; height:30px; bottom:34px; border:0; border-radius:50%; background:radial-gradient(#fff3a0,#ffd43b88 55%,transparent 70%); animation:glow 1.6s ease-in-out infinite; } @keyframes glow { 50% { transform:scale(1.35); } }
/* Livelier play */
main { animation:enter .28s ease-out; } @keyframes enter { from { opacity:0; transform:translateY(10px); } }
button:not(:disabled):active, a.button:active{ scale:.95; }
.landing i { display:inline-block; font-style:normal; font-size:3rem; color:#d9dcec; margin:0 3px; } .landing i.on { color:#ffb703; animation:land .5s calc(.65s + var(--n) * .28s) backwards; text-shadow:0 3px 0 #b97f00; }
@keyframes land { from { transform:translateY(-70px) scale(2.4) rotate(-90deg); opacity:0; } 70% { transform:scale(.85); } }
.cheer svg { width:72px; height:72px; animation:cheer .7s ease-in-out 4; } @keyframes cheer { 30% { transform:translateY(-16px) rotate(-9deg); } 70% { transform:translateY(-6px) rotate(9deg); } }
[data-board].solved { animation:solved .6s; } @keyframes solved { 40% { transform:scale(1.04) rotate(-1deg); } 70% { transform:scale(.98) rotate(1deg); } }
@media (prefers-reduced-motion:reduce) { main, .fog, .walker, .hop, .boat, .islecard, .islecard .lid, .chest .glow, .landing i, .cheer svg, [data-board].solved{ animation:none !important; } }
.plan.wide { max-width:480px; margin:0 auto; } .plan.wide .tick { display:flex; gap:10px; text-align:left; font-weight:700; margin:8px 0; }
.rates { margin:10px auto; border-collapse:collapse; background:#fff; } .rates th, .rates td { border:2px solid var(--line); padding:6px 14px; }
.quote { max-width:480px; margin:10px auto; background:#fff; border:2px solid var(--line); border-radius:16px; padding:8px 16px; text-align:center; }
@media print { .shop > :not(.quote):not(.code):not(.giftcard):not(h1):not(.rates) { display:none; } }
/* The way in: one question or one group of choices on a screen. */
.top { display:flex; align-items:center; gap:8px; padding:10px 14px; }
.top .gap { flex:1; }
.btnchip { display:inline-flex; align-items:center; gap:4px; min-height:48px; padding:8px 14px; border-radius:999px; border:2px solid var(--line); background:#fff; color:var(--ink); font-weight:800; font-size:.95rem; text-decoration:none; white-space:nowrap; }
.btnchip.hear { background:#fff3c4; border-color:var(--accent); }
.btnchip.sel { background:var(--brand); border-color:var(--brand); color:#fff; }
.me { display:flex; align-items:center; gap:6px; text-decoration:none; } .me svg { width:44px; height:44px; flex:none; }
.entry { max-width:520px; margin:0 auto; text-align:center; }
.ask { font-size:1.55rem; margin:.5rem 0 .8rem; }
.classes { grid-template-columns:repeat(2,1fr); }
.class-pick { font-size:1.6rem; padding:10px 0; } .class-pick small { display:inline; font-size:1rem; margin-right:6px; }
.class-pick[aria-pressed=true] { box-shadow:0 0 0 4px var(--brand); }
.nick { width:100%; margin-bottom:14px; padding:16px; border:3px solid var(--line); border-radius:16px; font:inherit; font-size:1.3rem; text-align:center; }
.door > b svg { display:block; width:100%; height:auto; }
.friends { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.friend { padding:16px 8px; } .friend svg { display:block; width:60%; max-width:120px; margin:0 auto 8px; height:auto; }
.door { display:flex; width:100%; align-items:center; gap:14px; margin-bottom:14px; padding:18px; border:0; border-radius:26px; background:var(--c,var(--brand)); color:#fff; text-align:left; text-decoration:none; box-shadow:0 5px 0 rgba(35,42,92,.18); }
.door > b { flex:none; width:60px; text-align:center; font-size:2.7rem; line-height:1; }
.door > span { flex:1; min-width:0; display:flex; flex-direction:column; }
.door strong { font-size:1.45rem; line-height:1.15; } .door small { font-size:.95rem; font-weight:600; }
.door > i { flex:none; display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:var(--accent); color:var(--ink); font-style:normal; }
.door.first { background:linear-gradient(120deg,#5f3dc4,#c2255c); padding-top:28px; padding-bottom:28px; }
.door.light { background:#fff; color:var(--ink); border:3px solid var(--line); }
.subjects,.opts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.subject { background:#fff; border:3px solid var(--c); border-radius:22px; overflow:hidden; text-decoration:none; font-weight:900; font-size:1.1rem; }
.subject > span:last-child { display:block; padding:8px 4px; }
.banner { max-width:300px; margin:0 auto; border-radius:20px; overflow:hidden; border:3px solid var(--c); } .banner svg { display:block; width:100%; aspect-ratio:16/9; }
.stones { list-style:none; display:grid; grid-template-columns:repeat(6,1fr); gap:6px; padding:0; margin:12px 0 18px; }
.stones li > * { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; max-width:56px; aspect-ratio:1; margin:0 auto; border-radius:50%; background:#fff; border:3px solid var(--line); text-decoration:none; line-height:1; }
.stones small { color:#a86b00; font-size:.6rem; min-height:.6rem; }
.stones li > span { opacity:.55; } .stones li > span.won { opacity:1; border-color:var(--accent); }
.stones .next { background:var(--c); border-color:var(--c); color:#fff; transform:scale(1.1); } .stones .next small { color:#fff; }
.stones .done { border-color:var(--c); }
.opt { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:112px; padding:12px 6px; border-radius:22px; background:var(--c); color:#fff; font-weight:900; line-height:1.2; text-decoration:none; text-align:center; overflow-wrap:anywhere; box-shadow:0 4px 0 rgba(35,42,92,.18); }
.opt b { font-size:2.6rem; line-height:1.2; }
.more { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:16px 0 0; }
.parents h2 { text-align:left; }
.parts { list-style:none; padding:0; margin:0 0 14px; text-align:left; }
.parts li { display:flex; gap:12px; align-items:center; background:#fff; border:2px solid var(--line); border-radius:18px; padding:12px; margin-bottom:10px; }
.parts b { font-size:1.8rem; } .parts small { display:block; color:var(--muted); }
.full { display:block; width:100%; margin-bottom:10px; }
.aim { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; margin:0 0 8px; font-weight:700; }
.bar .brand { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:359px) { .top { gap:4px; padding:8px; } .btnchip { padding:6px 8px; font-size:.82rem; } .door { padding:14px 10px; gap:8px; } .door > b { width:44px; font-size:2rem; } .door strong { font-size:1.2rem; } .me svg { width:34px; height:34px; } }
/* The next prize stays in view while the map scrolls to the buddy. */
.hunt > .door { position:sticky; top:76px; z-index:1; max-width:520px; margin-inline:auto; padding:10px 16px; }
.entry .more + .opts { margin-top:12px; }
.giftform { text-align:left; } .giftform input, .giftform select { font-size:1.05rem; min-height:48px; } .giftform .tick input { min-height:0; }
.giftform summary { min-height:44px; padding:10px 0; font-weight:700; cursor:pointer; } .giftform details label { margin-bottom:8px; }
/* Brand logos: scaled to their place, never stretched. */
.logo { display:block; height:auto; max-width:100%; margin:0 auto; }
.logo-full { width:min(440px,100%); } .logo-horizontal { width:min(320px,90%); } .logo-compact { width:min(230px,66%); }
.logo-wordmark { display:inline-block; width:130px; vertical-align:middle; } .logo-icon { width:64px; }
.splash { display:block; width:min(440px,90%); height:auto; margin:38vh auto 0; }
.certificate .logo { margin-bottom:12px; }
.entry > .logo-full, .gift-brand .logo-wordmark { box-sizing:border-box; background:#fff; border-radius:16px; padding:10px 12px; box-shadow:0 4px 0 rgba(35,42,92,.10); }
.gift-brand .logo-wordmark { width:170px; }
/* Small phones: grid and matching puzzles shrink to the screen instead of scrolling sideways. */
.grid { width:100%; gap:4px; } .grid .cell { min-width:0; min-height:0; padding:2px; overflow:hidden; }
.match { grid-template-columns:repeat(2,minmax(0,1fr)); } .match .choice { min-width:0; overflow-wrap:anywhere; }
.me { position:relative; } .me .hat { position:absolute; left:10px; top:-8px; font-style:normal; font-size:1.1rem; }
.mycodes { list-style:none; padding:0; max-width:420px; margin:0 auto; } .mycodes li { display:flex; flex-direction:column; align-items:center; background:#fff; border:2px solid var(--line); border-radius:14px; padding:8px; margin-bottom:8px; }
.cert-name { font-size:1.4rem; font-weight:900; }
