/* Say It! Words — "Toy Box Bright" */
@font-face{font-family:"Fredoka";src:url("../fonts/fredoka.woff") format("woff");font-weight:400 700;font-display:swap}

:root{
  --bg:#26215E; --bg2:#332C78; --tile:#3D3685; --tile-d:#1C1847; --ink:#1A1640; --lilac:#B9B3F0; --white:#fff;
  --pink:#FF4D8D; --pink-d:#C22A66;
  --mint:#3DDC97; --mint-d:#20A86E;
  --yellow:#FFD23F; --yellow-d:#D4A800;
  --sky:#4CC9F0; --sky-d:#1F95BC;
  --purple:#9B5DE5; --purple-d:#6A35AE;
  --orange:#FF8A3D; --orange-d:#C9611A;
  --font:"Fredoka","Rubik","Arial Rounded MT Bold",system-ui,sans-serif;
  color-scheme:dark;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--white);font-family:var(--font);overscroll-behavior:none}
body{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;overflow:hidden}
button,a{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:pointer;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible{outline:4px solid var(--yellow);outline-offset:3px}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

#app{position:fixed;inset:0;display:flex;flex-direction:column;
  padding:calc(env(safe-area-inset-top,0px) + 14px) max(14px,env(safe-area-inset-right,0px)) calc(env(safe-area-inset-bottom,0px) + 18px) max(14px,env(safe-area-inset-left,0px))}
.screen{flex:1;min-height:0;display:flex;flex-direction:column;gap:16px;width:100%;max-width:760px;margin:0 auto;animation:enter .28s ease-out}
@keyframes enter{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* starry backdrop */
.sky{position:fixed;inset:0;pointer-events:none;z-index:-1;
  background:
    radial-gradient(2px 2px at 12% 18%,#fff8 50%,transparent 51%),
    radial-gradient(2px 2px at 82% 26%,#fff6 50%,transparent 51%),
    radial-gradient(3px 3px at 48% 10%,#FFD23Fcc 50%,transparent 51%),
    radial-gradient(2px 2px at 88% 58%,#fff5 50%,transparent 51%),
    radial-gradient(2px 2px at 8% 64%,#fff6 50%,transparent 51%),
    radial-gradient(2px 2px at 52% 48%,#4CC9F0aa 50%,transparent 51%),
    radial-gradient(ellipse 90% 30% at 50% 108%,var(--bg2) 60%,transparent 61%),
    var(--bg)}

/* chunky 3D buttons */
.b3{--c:var(--tile);--d:var(--tile-d);background:var(--c);box-shadow:0 7px 0 var(--d);border-radius:22px;
  display:grid;place-items:center;transition:transform .08s,box-shadow .08s;position:relative;color:var(--ink)}
.b3:active,.b3.down{transform:translateY(5px);box-shadow:0 2px 0 var(--d)}
.b3[disabled]{opacity:.45;cursor:default}
.c-pink{--c:var(--pink);--d:var(--pink-d)} .c-mint{--c:var(--mint);--d:var(--mint-d)}
.c-yellow{--c:var(--yellow);--d:var(--yellow-d)} .c-sky{--c:var(--sky);--d:var(--sky-d)}
.c-purple{--c:var(--purple);--d:var(--purple-d)} .c-orange{--c:var(--orange);--d:var(--orange-d)}
.c-tile{--c:var(--tile);--d:var(--tile-d);color:var(--white)} .c-white{--c:#fff;--d:var(--lilac)}
.icon{width:56px;height:56px;border-radius:18px;flex:none}
.icon svg{width:28px;height:28px}
.pop{animation:pop .35s cubic-bezier(.3,1.6,.5,1)}
@keyframes pop{0%{transform:scale(1)}40%{transform:scale(1.12) rotate(-2deg)}100%{transform:scale(1)}}
.wiggle{animation:wiggle .45s}
@keyframes wiggle{0%,100%{transform:none}20%{transform:translateX(-10px) rotate(-3deg)}40%{transform:translateX(9px) rotate(3deg)}60%{transform:translateX(-6px)}80%{transform:translateX(4px)}}
.glow{animation:glow 1s ease-in-out infinite}
/* the ring covers the button and its 7px lip, so it's the same width on every side */
@keyframes glow{0%,100%{box-shadow:0 7px 0 var(--d),0 0 0 0 #FFD23F,0 7px 0 0 #FFD23F}50%{box-shadow:0 7px 0 var(--d),0 0 0 8px #FFD23F,0 7px 0 8px #FFD23F}}

/* top bar */
.top{display:flex;align-items:center;gap:10px;min-height:64px}
.top .grow{flex:1;min-width:0}
.avatar-btn{width:64px;height:64px;border-radius:20px;font-size:36px;flex:none}
.stars{height:56px;padding:0 16px;border-radius:18px;background:var(--yellow);color:var(--ink);box-shadow:0 6px 0 var(--yellow-d);
  display:flex;align-items:center;gap:8px;font-size:26px;font-weight:700;font-variant-numeric:tabular-nums}
.stars svg{width:30px;height:30px}
.stars.bump{animation:pop .4s}
.progress{display:flex;gap:6px;flex:1}
.progress span{flex:1;height:14px;border-radius:7px;background:var(--tile)}
.progress span.done{background:var(--mint)} .progress span.now{background:var(--yellow)}

/* who's playing */
.who-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:22px;align-content:center;flex:1}
.who-card{border-radius:32px;padding:22px 12px 18px;gap:8px;display:flex;flex-direction:column;align-items:center}
.who-card .face{font-size:84px;line-height:1.1}
.who-card .nm{font-size:28px;font-weight:700;color:var(--ink);overflow-wrap:anywhere;text-align:center}
.who-card .st{font-size:20px;font-weight:600;color:var(--ink);opacity:.85}

/* map: one long trail through the lands' photos */
.map{position:relative;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;border-radius:26px;background:#EAC79F;
  box-shadow:0 0 0 4px var(--tile-d)}
.map::-webkit-scrollbar{display:none}
.world{display:flex;flex-direction:column}
.layer{position:relative}
/* every photo starts and ends in sand; a soft band of the same sand hides the seams between them */
.land-panel:before,.land-panel:after{content:"";position:absolute;left:0;right:0;height:9%;pointer-events:none;z-index:1}
.spot,.sign,.sticker-w{z-index:2}
.land-panel:before{top:0;background:linear-gradient(#EAC79F,#EAC79F 15%,#EAC79F00)}
.land-panel:after{bottom:0;background:linear-gradient(#EAC79F00,#EAC79F 85%,#EAC79F)}
.land-panel{position:relative;width:100%;pointer-events:none}
.land-panel .spot,.land-panel .sign{pointer-events:auto}
.land-panel .bg{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.land-panel .bg.flip{transform:scaleX(-1)}
.spot{position:absolute;width:clamp(58px,16vw,84px);aspect-ratio:1;transform:translate(-50%,-62%);display:grid;place-items:center;
  filter:drop-shadow(0 5px 3px #3a2a1066)}
.spot img{pointer-events:none}
.spot .base,.spot .prop{position:absolute;inset:0;width:100%;height:100%}
.spot .pic{position:relative;top:-7%;font-size:clamp(26px,7.4vw,38px);line-height:1}
.spot .pic .wp{width:1.25em;height:1.25em}
.spot.locked .base{filter:grayscale(1) brightness(.92)}
.spot.locked .pic{opacity:.35;filter:grayscale(.8)}
.spot.locked .prop{filter:grayscale(.7) brightness(.9)}
.spot .lockp{position:absolute;right:-6%;bottom:2%;width:42%}
.spot .tick{position:absolute;right:-4%;top:-4%;width:38%}
.spot .tick svg{width:100%;height:100%;display:block}
.spot .bar{position:absolute;left:22%;right:22%;bottom:12%;height:7px;border-radius:4px;background:#0004;overflow:hidden}
.spot .bar i{display:block;height:100%;background:#fff}
.spot.chest,.spot.party{width:clamp(66px,18vw,92px)}
.spot.next{z-index:3;animation:hopstone 1.4s ease-in-out infinite}
.spot.next:before{content:"";position:absolute;inset:-10%;border-radius:50%;background:radial-gradient(circle,#FFE98Acc 30%,#FFD23F55 55%,transparent 70%);animation:shine 1.4s ease-in-out infinite;z-index:-1}
/* a locked stone shakes in place: its own keyframes keep the translate that centres it on the trail */
.spot.wiggle{animation:stonewiggle .4s ease-in-out}
@keyframes stonewiggle{0%,100%{transform:translate(-50%,-62%)}25%{transform:translate(calc(-50% - 4px),-62%) rotate(-4deg)}50%{transform:translate(calc(-50% + 4px),-62%) rotate(4deg)}75%{transform:translate(calc(-50% - 2px),-62%) rotate(-2deg)}}
@keyframes hopstone{0%,100%{transform:translate(-50%,-62%)}45%{transform:translate(-50%,-74%)}}
@keyframes shine{0%,100%{opacity:.6;transform:scale(.9)}50%{opacity:1;transform:scale(1.15)}}
.map-buddy{position:absolute;width:clamp(70px,19vw,100px);transform:translate(30%,-80%);pointer-events:none;z-index:4;display:flex;flex-direction:column;align-items:center;gap:2px}
.map-buddy.left{transform:translate(-130%,-80%)}
.sign{position:absolute;width:clamp(80px,22vw,112px);transform:translate(-50%,-100%);z-index:1}
.sign img{width:100%;display:block;filter:drop-shadow(0 4px 2px #3a2a1055)}
.sign span{position:absolute;left:8%;right:8%;top:13%;height:34%;display:grid;place-items:center;text-align:center;
  font-size:clamp(10px,2.7vw,14px);font-weight:700;line-height:1.1;color:#4A2C12;word-spacing:.1em}
.sticker-w{position:absolute;width:19%;transform:translate(-50%,-85%);pointer-events:none;filter:drop-shadow(0 4px 3px #3a2a1055);animation:enter .5s ease-out}
.find{position:sticky;float:right;bottom:12px;margin:-84px 12px 0 0;width:72px;height:72px;border-radius:24px;z-index:9;padding:6px}

.play{height:clamp(80px,11vh,96px);border-radius:28px;font-size:clamp(30px,8vw,40px);font-weight:700;display:flex;gap:14px;align-items:center;justify-content:center;flex:none}
.play svg{width:38px;height:38px}
.dock{display:flex;gap:12px;align-items:center;flex:none}
.dock .play{flex:1}
.dock .icon{width:72px;height:72px;border-radius:22px}
.dock .icon svg{width:36px;height:36px}

/* pictures */
.color-blob{display:inline-block;width:1em;height:1em;border-radius:42% 58% 55% 45%/50% 45% 55% 50%;box-shadow:inset -.06em -.08em 0 rgba(0,0,0,.15),0 0 0 .04em rgba(0,0,0,.25)}
.num{font-weight:700;color:var(--ink);background:#fff;border-radius:.25em;padding:0 .18em;line-height:1.05;font-size:.8em}
.duo{display:inline-flex;gap:.02em;font-size:.72em;white-space:nowrap}

/* round */
.stage{flex:1;min-height:0;display:flex;flex-direction:column;gap:16px}
.mascot-row{display:flex;align-items:center;justify-content:center;gap:12px;flex:none;min-height:110px}
.mascot-row .buddy{width:clamp(110px,30vw,150px)}
.hear{width:clamp(96px,24vw,120px);height:clamp(96px,24vw,120px);border-radius:36px}
.hear svg{width:52%;height:52%}
.slow{height:48px;padding:0 16px;border-radius:16px;font-weight:700;font-size:17px;display:flex;align-items:center;gap:6px;color:var(--white)}
.slow svg{width:30px;height:22px}
.cards{flex:1;min-height:0;display:grid;gap:16px}
.cards.n2{grid-template-rows:repeat(2,1fr)} .cards.n3{grid-template-rows:repeat(3,1fr)} .cards.n4{grid-template-rows:repeat(2,1fr);grid-template-columns:repeat(2,1fr)}
@media (min-width:640px){ .cards.n2{grid-template-rows:1fr;grid-template-columns:repeat(2,1fr)} .cards.n3{grid-template-rows:1fr;grid-template-columns:repeat(3,1fr)} .cards.n4{grid-template-rows:1fr;grid-template-columns:repeat(4,1fr)} }
.card{border-radius:30px;font-size:clamp(64px,min(24vw,15vh),200px);display:flex;align-items:center;justify-content:center;gap:16px;min-height:96px}
.card .say{font-size:clamp(32px,9vw,46px);font-weight:700;color:var(--ink)}
.card.dim{opacity:.45}
.card .tick{position:absolute;right:14px;top:12px;width:44px;height:44px;border-radius:22px;background:#fff;display:grid;place-items:center}
.card .tick svg{width:26px;height:26px}

.word-card{border-radius:32px;padding:18px 16px 20px;display:flex;flex-direction:column;align-items:center;position:relative;flex:none;color:#fff}
.word-card .big{font-size:clamp(96px,min(30vw,16vh),170px);line-height:1.1}
.word-card .en{font-size:clamp(44px,12vw,66px);font-weight:700;line-height:1;direction:ltr}
.word-card .he{font-size:22px;font-weight:500;margin-top:4px;direction:rtl;opacity:.92}
.word-card.secret .en,.word-card.secret .he{visibility:hidden;position:relative}
.word-card.secret .en::after{content:"?";visibility:visible;position:absolute;inset:0;text-align:center}
.word-card .corner{position:absolute;top:14px}
.word-card .corner.r{right:14px} .word-card .corner.l{left:14px}
.word-card .corner button{width:58px;height:58px;border-radius:18px;font-size:24px;font-weight:700}
.word-card .corner svg{width:28px;height:28px}

.mic{width:clamp(120px,32vw,148px);height:clamp(120px,32vw,148px);border-radius:42px;color:#fff}
.mic svg{width:46%;height:46%}
.mic.live{animation:breathe 1.2s ease-in-out infinite}
@keyframes breathe{0%,100%{box-shadow:0 9px 0 var(--d),0 0 0 0 #FF4D8D66}50%{box-shadow:0 9px 0 var(--d),0 0 0 22px #FF4D8D22}}
.say-row{display:flex;align-items:center;justify-content:center;gap:20px;flex:none}
.say-row .side{width:76px;height:76px;border-radius:24px}
.say-row .side svg{width:38px;height:38px}
.levels{display:flex;align-items:center;gap:6px;height:64px}
.levels i{width:10px;border-radius:5px;background:var(--pink);height:10px;transition:height .08s}
.echo{flex:1;height:76px;border-radius:24px;display:flex;align-items:center;gap:12px;padding:0 16px}
.echo .pl{width:44px;height:44px;border-radius:22px;background:var(--purple);display:grid;place-items:center;flex:none}
.echo .pl svg{width:20px;height:20px}

/* bubbles */
.pond{position:relative;flex:1;min-height:0;border-radius:32px;background:linear-gradient(#332C78,#2B2570);overflow:hidden}
.bub{position:absolute;width:clamp(96px,25vw,128px);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;font-size:clamp(48px,13vw,64px);
  background:radial-gradient(circle at 32% 28%,#ffffffcc 0 10%,#ffffff33 11% 40%,#4CC9F033 41% 70%,#4CC9F066 71%);box-shadow:inset 0 0 0 3px #ffffff88;animation:floatup var(--t,9s) linear forwards}
@keyframes floatup{from{transform:translateY(0)}to{transform:translateY(calc(-1 * var(--h,800px) - 160px))}}
.bub.burst{animation:burst .3s ease-out forwards}
@keyframes burst{to{transform:scale(1.6);opacity:0}}

/* memory */
.memo{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;gap:14px}
@media (max-width:420px){.memo{grid-template-columns:repeat(2,1fr)}}
.mcard{border-radius:24px;font-size:clamp(56px,18vw,110px)}
.mcard .back{color:var(--white)}
.mcard .back svg{width:40%;height:40%;opacity:.8}
.mcard.open{--c:#fff;--d:var(--lilac)}
.mcard.snd{--c:var(--sky);--d:var(--sky-d)}
.mcard.snd svg{width:44%;height:44%}
.mcard.gone{visibility:hidden}

/* well done */
.done{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center}
.done h1{margin:0;font-size:clamp(40px,11vw,60px);color:var(--yellow)}
.jar{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;max-width:360px}
.jar svg{width:40px;height:40px;animation:pop .5s backwards}
.sticker{width:150px;height:150px;border-radius:40px;background:#fff;display:grid;place-items:center;font-size:92px;box-shadow:0 9px 0 var(--lilac),0 0 0 8px var(--pink);transform:rotate(-6deg);animation:slap .6s cubic-bezier(.3,1.6,.5,1) .4s backwards}
@keyframes slap{from{transform:scale(2.2) rotate(20deg);opacity:0}}

/* sticker book */
.book{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:14px;overflow-y:auto;flex:1;align-content:start;padding:6px 4px 20px}
.slot{aspect-ratio:1;border-radius:24px;font-size:52px}
.slot.empty{--c:var(--bg2);--d:var(--tile-d);box-shadow:inset 0 0 0 3px #ffffff22}


/* mascot animation */
.buddy{display:block;overflow:visible}
.buddy .body{transform-box:fill-box;transform-origin:50% 90%}
.buddy.idle .body{animation:bob 2.6s ease-in-out infinite}
.buddy.happy .body{animation:hop .6s ease-in-out 2}
.buddy .lid{transform-box:fill-box;transform-origin:center;transform:scaleY(0);animation:blink 4.5s infinite}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes hop{0%,100%{transform:translateY(0)}40%{transform:translateY(-16px) rotate(-3deg)}}
@keyframes blink{0%,94%,100%{transform:scaleY(0)}96%{transform:scaleY(1)}}

/* modal + parent (Hebrew) */
.veil{position:fixed;inset:0;background:#0d0b2acc;display:grid;place-items:center;padding:20px;z-index:20;animation:enter .2s}
.sheet{color-scheme:light;background:#fff;color:var(--ink);border-radius:28px;padding:24px;max-width:460px;width:100%;display:flex;flex-direction:column;gap:14px;max-height:90vh;overflow:auto}
.sheet h2{margin:0;font-size:26px}
.sheet p{margin:0;font-size:18px;line-height:1.5}
.rtl{direction:rtl;text-align:right}
.en-ltr{direction:ltr;unicode-bidi:isolate;display:inline-block}
.pbtn{height:56px;border-radius:18px;font-size:20px;font-weight:700;padding:0 20px}

.gate{display:flex;flex-direction:column;align-items:center;gap:18px;text-align:center}

.parent{direction:rtl;text-align:right;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:16px;padding-bottom:20px}
.panel{color-scheme:light;background:#fff;color:var(--ink);border-radius:24px;padding:18px;display:flex;flex-direction:column;gap:12px}
.panel h2{margin:0;font-size:22px}
.panel h3{margin:0;font-size:18px}
.kid{display:flex;align-items:center;gap:12px}
.kid .face{font-size:44px}
.kid .nm{font-size:22px;font-weight:700;flex:1}
.facts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.fact{background:#F1EFFC;border-radius:16px;padding:10px;text-align:center}
.fact b{display:block;font-size:26px}
.fact span{font-size:14px;color:#4A4570}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{background:#F1EFFC;border-radius:12px;padding:4px 10px;font-size:16px;direction:ltr;display:inline-flex;gap:4px;align-items:center}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row label{font-size:17px;flex:1;min-width:140px}
.field{display:flex;flex-direction:column;gap:6px}
.field input[type=text]{background:#fff;color-scheme:light;height:52px;border-radius:14px;border:2px solid #D8D4F2;padding:0 14px;font:600 20px var(--font);color:var(--ink)}
.toggle{width:64px;height:36px;border-radius:18px;background:#D8D4F2;position:relative;flex:none}
.toggle:after{content:"";position:absolute;top:4px;right:4px;width:28px;height:28px;border-radius:14px;background:#fff;transition:right .15s}
.toggle[aria-checked=true]{background:var(--mint-d)}
.toggle[aria-checked=true]:after{right:32px}
.avs{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:6px}
.avs button{height:56px;border-radius:14px;font-size:30px;background:#F1EFFC}
.avs button[aria-pressed=true]{background:var(--yellow);box-shadow:0 0 0 3px var(--ink) inset}
.seg{display:flex;gap:6px}
.seg button{flex:1;height:48px;border-radius:14px;background:#F1EFFC;font-weight:700;font-size:17px}
.seg button[aria-pressed=true]{background:var(--ink);color:#fff}
.small{font-size:14px;color:#4A4570;line-height:1.5}
.small a{color:#4A2FB0;text-decoration:underline}
.danger{color:#B3123E}

@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* Parent gate: three numbers as Hebrew words + keypad */
.gate-words{margin:0;font-size:30px;font-weight:700;color:var(--yellow);min-height:40px}
.gate-dots{display:flex;gap:12px}
.gate-dots i{width:16px;height:16px;border-radius:50%;border:3px solid var(--lilac)}
.gate-dots i.on{background:var(--yellow);border-color:var(--yellow)}
.keypad{display:grid;grid-template-columns:repeat(3,76px);gap:14px}
.keypad button{height:68px;border-radius:20px;font-size:30px;font-weight:700}

/* Transfer code */
.xcode{font-size:44px;font-weight:700;letter-spacing:6px;text-align:center;background:#F1EFFC;border-radius:18px;padding:14px 8px;color:var(--ink);user-select:all}
.field input.code-in{font-size:30px;letter-spacing:4px;text-align:center;text-transform:uppercase}
.small.err{color:#B3123E}
.panel details summary{cursor:pointer}
.panel .pbtn:not([class*="c-"]){background:#F1EFFC}

/* Garden and star shop */
.garden{flex:none;height:clamp(170px,32vh,300px);border-radius:28px;background:linear-gradient(#8BE8BC,#3DDC97 70%);box-shadow:inset 0 -12px 0 #20A86E;
  display:flex;flex-wrap:wrap;align-content:flex-end;align-items:flex-end;justify-content:center;gap:2px 8px;padding:14px 12px 20px;overflow-y:auto}
.garden .me{width:clamp(96px,26vw,124px);flex:none}
.pet{font-size:clamp(40px,11vw,52px);line-height:1;padding:2px;animation:bob 2.4s ease-in-out infinite}
.pet.hop{animation:hop .5s}
.pet.new{animation:slap .5s}
.tabs{display:flex;gap:14px;justify-content:center;flex:none}
.tabs .b3{width:88px;height:60px;border-radius:20px;font-size:30px;display:grid;place-items:center}
.tabs .b3 svg{width:32px;height:32px}
/* the chosen ring wraps the whole button, its 3D lip included */
.tabs .b3[aria-pressed=true]:after,.item.on:after{content:"";position:absolute;inset:-6px -6px -13px;border:5px solid var(--yellow);border-radius:28px;pointer-events:none}
.b3.down.on:after,.b3.on:active:after,.tabs .b3[aria-pressed=true]:active:after{inset:-6px -6px -8px}
.shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:14px;overflow-y:auto;flex:1;min-height:0;padding:10px 10px 20px;align-content:start}
/* every tile the same size: a fixed slot for the picture and one for the price (empty when there's none) */
.item{border-radius:22px;display:grid;grid-template-rows:68px 34px;align-content:center;justify-items:center;row-gap:6px;padding:12px 6px 10px;color:var(--ink)}
.item .price{align-self:start}
.item:not(:has(.price)) .art{grid-row:1/3;align-self:center}
.item .art{font-size:44px;line-height:1;display:grid;place-items:center}
.item .art svg{width:66px;height:56px}
.item .art.onbuddy svg{width:76px;height:66px}
.item.shadow .art{filter:brightness(0) opacity(.3)}
.price{display:grid;grid-template-columns:repeat(5,auto);gap:1px;justify-content:center}
.price svg{width:14px;height:14px}
.price.big svg{width:17px;height:17px}
.sheet.buy .price.big svg{width:44px;height:44px}
.sheet.buy{align-items:center;text-align:center;max-width:340px}
.sheet.buy .big-art{min-height:150px;display:grid;place-items:center}
.sheet.buy .pet-big{font-size:110px;line-height:1}
.sheet.buy .price svg{width:30px;height:30px}
.sheet.buy .yes{width:120px;height:84px;border-radius:26px;display:grid;place-items:center}
.sheet.buy .yes svg{width:52px;height:52px}
.sheet.buy .icon{width:72px;height:72px}

/* word pictures (img/words/*.webp) sit where an emoji would, sized by the same font-size */
.wp{display:inline-block;width:1.2em;height:1.2em;object-fit:contain;vertical-align:middle;
  pointer-events:none;-webkit-user-drag:none;user-select:none;filter:drop-shadow(0 .03em .05em rgba(26,22,64,.25))}

/* No scroll bars. On a touch screen they only flash on top of the content (in the right-to-left
   parent area the bar sat over the left edge of the cards); a list shows it scrolls by being cut off. */
.book,.shelf,.parent,.garden,.sheet{scrollbar-width:none}
.book::-webkit-scrollbar,.shelf::-webkit-scrollbar,.parent::-webkit-scrollbar,.garden::-webkit-scrollbar,.sheet::-webkit-scrollbar{display:none}

/* Installing the game (parents): numbered steps, with the share button as iPhone and iPad draw it */
.install .steps{margin:0;padding:0;list-style:none;counter-reset:step;display:flex;flex-direction:column;gap:10px}
.install .steps li{counter-increment:step;display:flex;align-items:center;gap:10px;font-size:17px;font-weight:600;line-height:1.35}
.install .steps li:before{content:counter(step);flex:none;width:30px;height:30px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:16px}
.share-ic{flex:none;width:30px;height:30px;color:#0A7AFF}

/* The map on a wide screen held sideways (a tablet, or a phone on its side): the buttons stand in a
   column beside the map, so the map gets the whole height instead of a strip between two rows of
   buttons. Pipo fills the middle of the column when there's room. */
.side-buddy{display:none}
@media (orientation:landscape) and (min-width:700px){
  .map-screen{max-width:1120px;display:grid;grid-template-columns:minmax(0,1fr) clamp(310px,30vw,340px);grid-template-rows:auto minmax(0,1fr) auto;gap:14px 18px}
  .map-screen .map{grid-column:1;grid-row:1/-1}
  .map-screen .top{grid-column:2;grid-row:1;flex-wrap:wrap;justify-content:space-between}
  .map-screen .top .grow{display:none}
  .map-screen .side-buddy{grid-column:2;grid-row:2;min-height:0;display:flex;align-items:center;justify-content:center}
  .map-screen .side-buddy svg{width:min(72%,230px);height:auto;max-height:100%}
  .map-screen .dock{grid-column:2;grid-row:3;flex-wrap:wrap}
  .map-screen .dock .play{flex:1 0 100%;order:-1}
  .map-screen .dock .icon{flex:1;width:auto}
}
@media (orientation:landscape) and (min-width:700px) and (max-height:520px){.map-screen .side-buddy{visibility:hidden}}

/* ---- 2.14 ---- */
/* Rounds are played inside the land: its photo, blurred and darkened, lies behind the round
   (--round-bg is set by round.js, .in-round by main.js while the round screen is up). */
#app.in-round:before{content:"";position:absolute;inset:-40px;background:var(--round-bg) center/cover no-repeat;filter:blur(14px) brightness(.4) saturate(1.2);pointer-events:none}
#app.in-round>.screen{position:relative}

/* Pipo asleep (resting until tomorrow): slow breathing, floating z's; the Play button waits with a moon */
.buddy.sleep .body{animation:bob 4s ease-in-out infinite}
.buddy.sleep .zzz text{animation:zz 2.6s ease-in-out infinite}
.buddy.sleep .zzz text+text{animation-delay:.5s}
@keyframes zz{0%,100%{opacity:.25}50%{opacity:1}}
.play.rest svg{width:54px;height:54px}

/* the turtle (slow) button: big enough for a small finger */
.slow{height:60px;padding:0 20px;border-radius:20px}
.slow svg{width:42px;height:31px}

/* Feed Pipo */
.feed-top{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:16px}
.plates{display:flex;gap:14px;flex:none}
.plate{flex:1;aspect-ratio:1;max-height:34vh;border-radius:50%;display:grid;place-items:center;font-size:clamp(56px,19vw,120px);box-shadow:0 7px 0 var(--lilac),inset 0 0 0 10px #F1EFFC}
.plate .food{display:block;line-height:1;position:relative;z-index:5;will-change:transform}

/* the treasure chest at the end of a chest stone */
.chest-game{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.chest-btn{position:relative;width:min(70vw,44vh,340px);aspect-ratio:1}
.chest-btn img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 12px 10px #0006)}
.chest-btn.glow-soft{animation:chestwait 1.4s ease-in-out infinite}
.chest-btn.knock{animation:knock .35s ease-in-out}
@keyframes chestwait{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
@keyframes knock{0%,100%{transform:none}25%{transform:rotate(-7deg) scale(1.04)}60%{transform:rotate(6deg) scale(1.04)}}
.burst-stars{position:absolute;left:50%;top:34%;width:0;height:0}
.burst-stars svg{position:absolute;left:-26px;top:-26px;width:52px;height:52px;opacity:0}
.chest-btn.opened .burst-stars svg{animation:starfly 1s ease-out forwards}
@keyframes starfly{0%{opacity:0;transform:rotate(var(--a)) translateY(0) scale(.4)}20%{opacity:1}100%{opacity:1;transform:rotate(var(--a)) translateY(-38vw) scale(1.1)}}

/* the sticker album: a page per land */
.album{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:18px;padding:6px 4px 24px;scrollbar-width:none}
.album::-webkit-scrollbar{display:none}
.album-land{display:flex;flex-direction:column;gap:12px}
.album-head{position:relative;height:84px;border-radius:26px;display:flex;align-items:center;gap:16px;padding:0 20px;font-size:52px}
.album-head .bar{flex:1;height:16px;border-radius:8px;background:#0003;overflow:hidden}
.album-head .bar i{display:block;height:100%;background:#fff;border-radius:8px}
.album-head.locked .wp{filter:grayscale(1);opacity:.5}
.album-head .lk svg{width:34px;height:34px}
.album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:10px}
.album-grid .slot{display:grid;place-items:center;border-radius:20px;font-size:44px;background:#fff;box-shadow:0 5px 0 var(--lilac)}
.album-grid .slot.gold{box-shadow:0 5px 0 #D9A400,inset 0 0 0 4px var(--yellow)}
.album-grid .slot.shadow{background:var(--bg2);box-shadow:inset 0 0 0 3px #ffffff1c}
.album-grid .slot.shadow .wp,.album-grid .slot.shadow>*{filter:brightness(0) invert(1);opacity:.16}

/* the parent's weekly card */
.tips{background:#FFF6D6;border-radius:16px;padding:12px 14px;font-size:15px;line-height:1.5}
.tips ul{margin:6px 0 0;padding-inline-start:20px}
.tips li+li{margin-top:4px}

/* Lists that scroll fade out at their edges, so a row half under the edge reads as "more here"
   instead of being cut off flat (Sammy, 2.14.5) */
.shelf,.album,.book,.parent{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 16px,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 16px,#000 calc(100% - 16px),transparent 100%)}
.shelf{padding-top:16px}

/* Say it: the button whose sound is playing (the word, the child's own voice) lights up */
.b3.playing{animation:playing .7s ease-in-out infinite}
.say-row:has(#echo){padding:0 10px}
@keyframes playing{0%,100%{box-shadow:0 7px 0 var(--d),0 0 0 4px #FFD23F,0 7px 0 4px #FFD23F}50%{box-shadow:0 7px 0 var(--d),0 0 0 9px #FFD23F,0 7px 0 9px #FFD23F}}

/* Phones held sideways (short screens): nothing may sit out of reach.
   Any screen that still doesn't fit can be scrolled (no bar shown), and the busiest screens
   put their parts side by side instead of stacking them. */
.screen{overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
.screen::-webkit-scrollbar{display:none}
@media (orientation:landscape) and (max-height:540px){
  #app{padding-top:calc(env(safe-area-inset-top,0px) + 8px);padding-bottom:calc(env(safe-area-inset-bottom,0px) + 8px)}
  .screen{gap:10px;max-width:none}
  .top{min-height:56px}
  /* a round with a word card: the card on the left, Pipo and the buttons on the right */
  .stage:has(>.word-card){display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;gap:10px 16px}
  .stage>.word-card{grid-column:1;grid-row:1/span 3;justify-content:center;padding:12px}
  .stage:has(>.word-card)>:not(.word-card){grid-column:2;min-height:0}
  .stage:has(>.word-card)>div:not([class]){display:none}
  .stage:has(>.word-card) .say-row{flex-wrap:wrap;gap:12px}
  .word-card .big{font-size:clamp(64px,24vh,120px)}
  .word-card .en{font-size:clamp(36px,11vh,56px)}
  .word-card .he{font-size:18px}
  .word-card .corner button{width:52px;height:52px}
  .mic{width:110px;height:110px;border-radius:34px}
  .say-row .side{width:68px;height:68px}
  .say-row .buddy{max-width:110px}
  .mascot-row{min-height:0!important}
  /* Listen & tap, bubbles, memory: Pipo and the speaker in a column on the left, the game beside them */
  .stage:has(>.mascot-row){flex-direction:row;align-items:stretch}
  .stage>.mascot-row{flex-direction:column;justify-content:center;flex:none}
  .stage:has(>.mascot-row)>:not(.mascot-row){flex:1;min-width:0;min-height:0}
  .mascot-row .buddy{width:clamp(70px,20vh,110px)}
  .mascot-row .hear{width:72px!important;height:72px!important}
  .memo{grid-template-columns:repeat(6,1fr)}
  .mcard{font-size:clamp(40px,12vh,80px)}
  .plates{justify-content:center;padding-bottom:8px}
  .plate{flex:none;width:28vh;height:28vh;max-height:none;font-size:clamp(44px,15vh,90px)}
  .feed-top .buddy{max-width:30vh}
  .chest-btn{width:min(40vw,52vh,300px)}
  /* the end of a round: Pipo and the stars on the left, the new sticker on the right */
  .done{display:grid;grid-template-columns:auto auto auto;align-content:center;justify-content:center;column-gap:36px;row-gap:6px;min-height:0}
  .done>*{grid-column:1;justify-self:center}
  .done>#buddy{width:clamp(90px,26vh,130px)!important}
  .done h1{font-size:40px}
  .done .jar svg{width:30px;height:30px}
  .done>.sticker{grid-column:2;grid-row:1/span 3;width:120px;height:120px;font-size:72px}
  .done>.icon,.done>.b3:not(.sticker){grid-column:3;grid-row:1/span 3;align-self:center}
  /* the garden: the garden on the left, the tabs and what to buy on the right */
  .screen:has(>.garden){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);column-gap:16px;overflow:hidden}
  .screen>.top{grid-column:1/-1}
  .screen>.garden{grid-column:1;grid-row:2/span 2;height:auto;min-height:0}
  .screen:has(>.garden)>.tabs{grid-column:2;grid-row:2}
  .screen:has(>.garden)>.shelf{grid-column:2;grid-row:3;min-height:0}
  /* the parent gate: the numbers to tap on the right */
  .gate{display:grid;grid-template-columns:auto auto;column-gap:40px;row-gap:12px;align-content:center;justify-content:center}
  .gate>*{grid-column:1}
  .gate>div:first-child{display:none}
  .gate>.keypad{grid-column:2;grid-row:1/span 3}
  .keypad{grid-template-columns:repeat(3,68px);gap:10px}
  .keypad button{height:54px;font-size:26px}
}
