:root{color-scheme:light;--paper:#f2f0e9;--card:#fffaf0;--ink:#302d26;--muted:#625e52;--teal:#245f57;--teal-dark:#19473f;--focus:#143c55;--border:#c7bfab}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;width:100%;overscroll-behavior:none}
body{background:var(--paper);color:var(--ink);font-family:Nunito,sans-serif;overflow:hidden}
button,a,summary{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:wait;opacity:.65}
button:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
button svg{width:23px;height:23px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wrap{width:min(100%,1540px);height:100svh;margin:auto;padding:8px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left));display:grid;grid-template-rows:54px minmax(0,1fr) 52px;gap:7px;container-type:inline-size}
.top{display:flex;align-items:center;gap:22px;min-width:0}
.brand{display:flex;align-items:center;gap:7px;color:#175a7a;text-decoration:none;flex:none;font-family:Fredoka,sans-serif;font-size:19px;font-weight:600;white-space:nowrap}
.brand img{width:41px;height:41px;object-fit:contain}
.brand.solo .back{display:none}
.brand .back{font-family:Nunito,sans-serif;font-size:30px;color:var(--ink)}
h1{margin:0;flex:1;min-width:0;font:600 clamp(18px,2.4cqw,30px)/1.1 Fredoka,Nunito,sans-serif;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.tools{display:flex;gap:8px;flex:none}
.btn{border:0;border-radius:9px;min-height:44px;padding:11px 17px;background:#e6e3d8;color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:800;line-height:1.15;transition:background-color .16s,transform .16s}
.btn:hover{background:#dcd7c9}
.btn:active{transform:translateY(2px)}
.btn.primary{background:var(--teal);color:#fffaf0;font-size:clamp(17px,2.1cqw,25px);padding:14px 22px}
.btn.primary:hover{background:var(--teal-dark)}
.primary svg{fill:currentColor;stroke:none;width:18px;height:18px}
.tool{padding:8px 11px;font-size:14px}
.stage-box{min-height:0;display:flex;align-items:center;justify-content:center}
.stage{position:relative;width:min(100%,calc((100svh - 136px)*16/9));aspect-ratio:16/9;max-height:100%;overflow:hidden;border-radius:16px;background:#e3e6da;isolation:isolate;container-type:inline-size;touch-action:none}
#game{display:block;width:100%;height:100%;outline-offset:-4px;touch-action:none;background:#e3e6da}
/* Picture bubbles over the canvas (main.js updateBubbles): a round painted bubble with its picture and word. */
.bubbles{position:absolute;inset:0;z-index:2;pointer-events:none}
/* Everything inside is sized from the bubble's diameter (--d): the picture and the words, as one group, stay centred
   in the circle at any size (a bubble grows from small as it floats out), and the words wrap within it. */
.bubble{--s:1;--d:calc(clamp(84px,13cqw,140px)*var(--s));position:absolute;width:var(--d);height:var(--d);transform:translate(-50%,-50%);pointer-events:auto;border:0;padding:0;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--d)*.03);background:radial-gradient(circle at 34% 28%,#fffffff2 0 9%,#fffdf6d9 10% 46%,#f3ead6c4 70%,#e9d9b6b0 100%);box-shadow:inset 0 0 0 3px #fffaf0cc,inset 0 -6px 12px #c9a96a3d,0 6px 16px #2f281d38;transition:transform .18s ease-out,opacity .3s,filter .3s;touch-action:none}
.bubble img{flex:none;width:calc(var(--d)*.48);height:calc(var(--d)*.36);object-fit:contain;filter:drop-shadow(0 2px 2px #3a2a1240);pointer-events:none}
.bubble span{flex:none;max-width:calc(var(--d)*.82);font:600 calc(var(--d)*.13)/1.04 Fredoka,Nunito,sans-serif;color:#3a3226;text-align:center;text-wrap:balance;pointer-events:none}
.bubble.lie{background:radial-gradient(circle at 34% 28%,#fffffff2 0 9%,#fff4f0d9 10% 46%,#f6dccfc4 70%,#eac1aeb0 100%);box-shadow:inset 0 0 0 3px #fff3eccc,inset 0 -6px 12px #c46a4a3d,0 6px 16px #2f281d38}
.bubble.chosen{transform:translate(-50%,-50%) scale(1.1);box-shadow:inset 0 0 0 3px #fffaf0,0 0 0 4px var(--teal),0 6px 16px #2f281d38}
.bubble.popped{transform:translate(-50%,-50%) scale(1.35);opacity:0!important;pointer-events:none}
.bubble.shy{filter:saturate(.7) brightness(1.05)}
/* Bubble kinds (state.bubbles[].kind): chalk (a thought as a small blackboard of chalk sums), think (the small empty
   thought puffs leading to it), note (a notebook page: ruled paper, pencil capitals). The words are the picture here,
   so they get more room. */
.bubble.chalk{--d:calc(clamp(120px,19cqw,210px)*var(--s));border-radius:14%;background:#2f4a3a;box-shadow:inset 0 0 0 5px #7a5a3a,inset 0 0 0 7px #4b3624,0 6px 16px #2f281d55}
.bubble.chalk span{max-width:calc(var(--d)*.86);font:500 calc(var(--d)*.12)/1.25 "Comic Sans MS",Fredoka,Nunito,sans-serif;color:#f4f1e6;text-shadow:0 0 1px #f4f1e6aa;white-space:pre-line}
.bubble.think{--d:calc(clamp(22px,3.4cqw,38px)*var(--s))}
.bubble.note{--d:calc(clamp(120px,19cqw,210px)*var(--s));border-radius:4%;transform:translate(-50%,-50%) rotate(-3deg);background:repeating-linear-gradient(#fbf8ef 0 calc(var(--d)*.115),#a9c3e0 calc(var(--d)*.115) calc(var(--d)*.12)),#fbf8ef;box-shadow:inset 3px 0 0 #e7a0a0,0 6px 16px #2f281d40}
.bubble.note span{max-width:calc(var(--d)*.84);font:700 calc(var(--d)*.115)/1.2 Fredoka,Nunito,sans-serif;color:#33302c;letter-spacing:.02em}
/* The arrow at the picture's edge toward something out of view (main.js updatePointer): a badge with its picture. */
.edge-pointer{--a:0rad;position:absolute;width:clamp(44px,6cqw,70px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:#fffaf0ee;box-shadow:0 3px 12px #2f281d40,inset 0 0 0 3px #d77a33;display:grid;place-items:center;pointer-events:none;animation:edge-nudge 1s ease-in-out infinite}
.edge-pointer img{width:62%;height:62%;object-fit:contain}
.edge-pointer svg{position:absolute;inset:-28%;width:156%;height:156%;transform:rotate(var(--a));fill:none;stroke:#d77a33;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
@keyframes edge-nudge{50%{scale:1.08}}
.overlay{position:absolute;inset:0;z-index:5;display:flex;align-items:center;padding:clamp(16px,3.5cqw,52px);pointer-events:auto}
.hidden{display:none!important}
.title-overlay,.end-overlay{justify-content:flex-start}
.card{width:43%;max-height:100%;overflow:auto;padding:clamp(20px,3.3cqw,46px);background:var(--card);border-radius:12px;box-shadow:0 12px 35px #2f281d24}
.card h2{font:600 clamp(27px,5.3cqw,65px)/.98 Fredoka,Nunito,sans-serif;letter-spacing:-.025em;margin:0 0 22px}
.card p{font-size:clamp(14px,1.9cqw,23px);line-height:1.4;margin:0 0 21px}
.card .invitation{font-weight:700}
.title-card .primary,.end-card .primary{width:100%;justify-content:space-between}
.card .small{font-size:clamp(12px,1.35cqw,16px);min-height:1.4em;margin:12px 0 5px;color:var(--muted)}
.pick{margin-top:15px}
.pick summary{font-size:clamp(13px,1.55cqw,19px);font-weight:800;cursor:pointer;list-style:none;min-height:34px;display:flex;align-items:center}
.pick summary::before{content:'+';font-family:Nunito,sans-serif;margin-right:8px}
.pick[open] summary::before{content:'−'}
.chapters{display:grid;gap:6px;padding:8px 0 2px}
.chapter-button{background:#eee9dc;border:0;border-radius:6px;color:var(--ink);text-align:left;min-height:44px;padding:10px 12px;font-size:14px;font-weight:800}
.chapter-button:hover{background:#ded9ca}
.presents{display:flex;align-items:center;gap:8px;margin-top:25px;font:500 clamp(11px,1.3cqw,16px)/1.2 Fredoka,sans-serif;color:#175a7a}
.presents img{width:28px;height:28px;object-fit:contain}
.source-note{position:absolute;bottom:14px;left:3.5%;max-width:89%;font-size:clamp(10px,1.05cqw,13px);line-height:1.3;background:#fffaf0e8;color:var(--ink);padding:5px 8px;border-radius:4px;margin:0}
/* TR | EN | FR on the title page, top right of the picture: the chosen language filled */
.lang-switch{position:absolute;top:clamp(12px,2cqw,26px);right:clamp(12px,2cqw,26px);display:flex;gap:4px;padding:4px;background:#fffaf0eb;border-radius:999px;box-shadow:0 6px 18px #2f281d24}
.lang-switch button{min-width:max(48px,5cqw);min-height:max(40px,3.8cqw);padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--ink);opacity:.62;font:600 clamp(15px,1.8cqw,21px)/1 Fredoka,sans-serif;transition:background-color .16s,opacity .16s}
.lang-switch button:hover{opacity:1}
.lang-switch button[aria-pressed="true"]{opacity:1;background:var(--teal);color:#fffaf0}
.lang-switch button:active{transform:scale(.94)}
.end-card h2{font-size:clamp(30px,4.4cqw,54px);line-height:1.05}
.end-card p{font-size:clamp(15px,1.8cqw,22px)}
.end-overlay{background:#28342824}
/* The end card's source and picture credits (story.json end.credits, end.ai): small print under the button. */
.card p.end-note{font-size:clamp(9px,1.1cqw,14px);line-height:1.25;color:var(--muted);margin:8px 0 0}
.subtitle{position:absolute;z-index:3;top:12px;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:1040px;background:#fffaf059;padding:8px 16px 11px;border-radius:10px;pointer-events:none}
.speaker-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:5px}
#speaker{display:inline-block;font:600 clamp(12px,1.55cqw,18px)/1.2 Fredoka,sans-serif;color:var(--ink);padding:4px 10px;border-radius:5px}
.subtitle p{font-size:clamp(14px,2.05cqw,23px);line-height:1.28;font-weight:800;margin:0;text-wrap:pretty}
.skip{pointer-events:auto;display:grid;place-items:center;border:0;background:none;color:var(--muted);width:44px;height:32px;min-height:32px;padding:3px;border-radius:5px}
.skip:hover{background:#e5dfd0}
.skip svg{width:20px;height:20px;stroke-width:2}
.game-guidance{position:absolute;top:16px;left:24%;right:23%;z-index:2;pointer-events:none;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px}
.game-guidance p{margin:0;padding:6px 11px;border-radius:6px;background:#fffaf059;font-size:clamp(12px,1.35cqw,17px);font-weight:800;line-height:1.25;text-wrap:balance}
.game-guidance p:empty{display:none}
#actionLabel{background:#245f57ed;color:#fffaf0;font-family:Fredoka,sans-serif;font-weight:500}
.star-hud{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);z-index:2;display:flex;align-items:center;gap:6px;padding:5px 12px 5px 9px;border-radius:999px;background:#fffaf0eb;color:#8a5a12;font:600 clamp(15px,1.9cqw,22px)/1 Fredoka,sans-serif;pointer-events:none;box-shadow:0 3px 10px #2f281d1f}
.star-hud svg{width:1.1em;height:1.1em;fill:#e7b44d;stroke:#b07a1c;stroke-width:1.2}
.star-hud.pop{animation:star-pop .28s ease-out}
@keyframes star-pop{0%{transform:translateX(-50%) scale(1)}40%{transform:translateX(-50%) scale(1.22)}100%{transform:translateX(-50%) scale(1)}}
.touch{position:absolute;inset:0;z-index:4;pointer-events:none;user-select:none;-webkit-user-select:none}
.touch.off{visibility:hidden;pointer-events:none}
.dpad{position:absolute;left:18px;bottom:18px;display:flex;gap:12px}
.tbtn{pointer-events:auto;display:grid;place-items:center;width:56px;height:56px;border:3px solid #5c503a;border-radius:16px;background:#fff6dfef;color:#453c2c;box-shadow:0 4px 0 #463e3438;touch-action:none;padding:11px;transition:transform .08s,background-color .08s}
.tbtn svg{width:29px;height:29px;stroke:none;fill:currentColor}
.tbtn.act svg{stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tbtn.held{transform:translateY(3px);background:#d9e4ce;box-shadow:none}
.tbtn.act{position:absolute;bottom:18px;right:91px}
.tbtn.act.ready{border-color:var(--teal);color:var(--teal)}
.tbtn.jump{position:absolute;bottom:18px;right:18px;width:62px;height:62px;border-radius:50%;background:var(--teal);color:#fffaf0;border-color:#173e37}
/* The walking arrows grow with the picture (a child's thumb on a small phone, a calm size on a tablet) and their
   arrows fill the middle: no padding, a rounded triangle drawn round its visual centre. */
.tbtn.arrow{--arrow:clamp(56px,8cqw,66px);width:var(--arrow);height:var(--arrow);padding:0;border-radius:calc(var(--arrow)*.28)}
.tbtn.arrow svg{width:60%;height:60%;stroke:currentColor;stroke-width:2.6;stroke-linejoin:round}
.touch .dpad{gap:clamp(8px,1.2cqw,12px)}
.touch.action-only .jump{display:none}
.touch.action-only .act{right:18px}
/* The hand does what its tag says (look, choose, smell...); it shows only when there is something to do with it. */
.tbtn.act{overflow:visible}
.act-tag{position:absolute;bottom:calc(100% + 7px);right:-4px;white-space:nowrap;font:700 13px/1.1 Nunito,sans-serif;color:#fffaf0;background:var(--teal);padding:5px 9px;border-radius:9px;box-shadow:0 2px 6px #2f281d33}
.act-tag:empty{display:none}
.touch.no-act .act,.touch.jump-only .act,.touch.jump-only .dpad{display:none}
/* "hold" (js/mechanics.js holdPhase): only the hand, labelled ("Denge"), a fill rising while it is held. */
.tbtn.act{isolation:isolate}
.tbtn.act .fill{position:absolute;inset:0;z-index:-1;border-radius:inherit;background:linear-gradient(to top,#9ccdb0 calc(var(--fill,0)*100%),#0000 0);pointer-events:none}
.touch.hold-only .dpad,.touch.hold-only .jump{display:none}
.touch.hold-only .act{right:18px;width:76px;height:76px;border-radius:22px}
.touch.hold-only .act svg{width:38px;height:38px}
.touch.hold-only .act-tag{font-size:15px}
.touch.right-only .a-left{display:none}
.touch.no-jump .jump{display:none}
.tbtn.act.holding{transform:translateY(3px) scale(.97);box-shadow:0 1px 0 #463e3438}
/* A storybook plate over the stage (main.js updatePlate): it comes and goes, and another plate replaces it, as hard cuts
   (rule 12: never two pictures of one figure at once, so no fades: a plate often paints the people standing behind it). Its
   cards and rings are placed in plate pixels by main.js. Above the canvas, below the bubbles, hint, subtitles and buttons. */
.plate{position:absolute;inset:0;z-index:1;overflow:hidden;background:#2b2418;opacity:0;visibility:hidden;pointer-events:none}
.plate.on{opacity:1;visibility:visible}
.plate .plate-img{position:absolute;max-width:none}
.plate-things{position:absolute;inset:0}
.plate-card{position:absolute;max-width:none;pointer-events:none;filter:drop-shadow(0 4px 5px #2f281d59)}
.plate-ring{position:absolute;pointer-events:none;color:#fff9e6;animation:plate-ring 1.6s ease-in-out infinite alternate}
.plate-ring svg{display:block;width:100%;height:100%;overflow:visible}
.plate-ring.tinted circle{stroke:currentColor}
@keyframes plate-ring{from{opacity:.62}to{opacity:.92}}
/* A phone call (main.js updateCall): the caller's side slides in from the right in a rounded frame (--out: 1 out, 0 in, set
   from game time so pausing and fast autoplay keep it in step). */
.call{position:absolute;z-index:2;right:3%;top:25%;width:34%;transform:translateX(calc(var(--out,1)*135%));pointer-events:none}
.call-frame{position:relative;aspect-ratio:16/10;border-radius:clamp(12px,2cqw,24px);overflow:hidden;border:4px solid #3a3226;background:#fffaf0;box-shadow:0 10px 26px #2f281d59}
.call-picture{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.call-caller{position:absolute;left:50%;bottom:0;height:90%;max-width:90%;transform:translateX(-50%);object-fit:contain;transform-origin:50% 100%}
.call.talking .call-caller{animation:call-talk .3s ease-in-out infinite alternate}
/* phoneCall `behind`: a second figure further back, smaller and a little to the right, waving (a friend behind the caller). */
.call-behind{position:absolute;left:72%;bottom:6%;height:62%;max-width:50%;transform:translateX(-50%);object-fit:contain;transform-origin:50% 100%;filter:saturate(.9) brightness(.96);animation:call-wave 1.1s ease-in-out infinite alternate}
@keyframes call-wave{from{transform:translateX(-50%) rotate(-2deg)}to{transform:translateX(-50%) rotate(2deg)}}
@keyframes call-talk{to{transform:translateX(-50%) translateY(-2.5%)}}
.call-name{position:absolute;left:50%;bottom:-12px;transform:translateX(-50%);white-space:nowrap;padding:4px 12px;border-radius:9px;border:3px solid #3a3226;background:var(--teal);color:#fffaf0;font:600 clamp(12px,1.6cqw,18px)/1.1 Fredoka,Nunito,sans-serif}
/* The mushrooms found (main.js updateMushrooms): five champignons in a row, the found ones in colour, the fourth blue. */
.mush-hud{position:absolute;z-index:2;bottom:14px;left:50%;transform:translateX(-50%);display:flex;gap:clamp(2px,.5cqw,6px);padding:4px 10px;border-radius:999px;background:#fffaf0eb;box-shadow:0 3px 10px #2f281d1f;pointer-events:none}
.mush{display:block;width:clamp(22px,3.1cqw,36px);aspect-ratio:1;opacity:.3;filter:grayscale(1)}
.mush svg{display:block;width:100%;height:100%}
.mush .cap{fill:#efe4cf;stroke:#7d6a4c;stroke-width:1.5}
.mush .stem{fill:#fbf6ea;stroke:#7d6a4c;stroke-width:1.5}
.mush.blue .cap{fill:#86acdc;stroke:#3d5f8f}
.mush.got{opacity:1;filter:none}
.mush.pop{animation:mush-pop .55s cubic-bezier(.3,1.6,.5,1)}
@keyframes mush-pop{0%{transform:scale(.2) translateY(30%)}100%{transform:none}}
/* DEV ONLY (?draft=1): a red badge while stand-ins for unpainted art are on screen. */
.draft-badge{position:absolute;z-index:6;right:10px;top:calc(clamp(44px,5.4cqw,56px) + 18px);padding:3px 9px;border-radius:6px;background:#c0392b;color:#fffaf0;font:800 clamp(11px,1.4cqw,16px)/1.2 Nunito,sans-serif;letter-spacing:.06em;pointer-events:none;opacity:.92}
/* The pause button in the picture's top-right corner; the subtitle box leaves room for it. */
.stage-pause{position:absolute;top:12px;right:12px;z-index:6;width:clamp(44px,5.4cqw,56px);aspect-ratio:1;border-radius:50%;border:3px solid #5c503a;background:#fff6dfef;color:#453c2c;display:grid;place-items:center;padding:0;box-shadow:0 4px 0 #463e3438;cursor:pointer;touch-action:manipulation}
.stage-pause svg{width:52%;height:52%;fill:none;stroke:currentColor;stroke-width:3.2;stroke-linecap:round}
.stage-pause:active{transform:translateY(2px);box-shadow:0 2px 0 #463e3438}
/* The story text and the play instruction sit on a see-through panel (35%), so the picture shows behind them; a
   soft cream glow round each letter keeps the words easy to read on any picture (the parent picked this for Max ile
   Moritz on 7 Nov 2026, and asked for it here the same day). */
.subtitle p,.game-guidance p{text-shadow:0 0 3px #fffaf0,0 0 6px #fffaf0,0 0 10px #fffaf0cc}
#speaker{text-shadow:none}
.subtitle,.game-guidance{margin-right:0}
.stage .subtitle{left:24px;right:calc(clamp(44px,5.4cqw,56px) + 26px);width:auto;max-width:none;transform:none}
/* A plate whose faces are painted high asks for the caption at the bottom (main.js updatePlate, showPlate { caption }). */
.stage .subtitle.at-bottom{top:auto;bottom:8px}
/* The hint and action texts go to the bottom with it, above the caption and the mushroom bar (main.js sets the bottoms). */
.game-guidance.at-bottom{top:auto;flex-direction:column-reverse}
.pause-overlay{z-index:7;justify-content:center;background:#f3eedebf}
.pause-card{width:auto;min-width:min(40%,360px);text-align:center}
.pause-card h2{margin-bottom:18px}
.error-overlay{background:#f2f0e9e8;justify-content:center;z-index:10}
.error-overlay .card{width:min(85%,650px)}
.error-overlay h2{font-size:32px;line-height:1.1}
.error-overlay p{font-size:16px;overflow-wrap:anywhere}
.bottom{min-width:0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-content:center;gap:2px 15px;color:var(--muted);font-size:11px;line-height:1.2}
.bottom p{margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#status{grid-column:1;font-size:11px}
#controlsHelp{grid-row:2;grid-column:2;text-align:right}
.chapter-progress{grid-column:1/-1;display:flex;gap:12px;align-items:center;color:var(--ink);font-weight:800;min-height:13px}
#progressDots{display:flex;gap:4px}
#progressDots span{display:block;width:7px;height:7px;border-radius:50%;background:#c9c5b8}
#progressDots .current{background:var(--teal);transform:scale(1.25)}
#progressDots .passed{background:#8da58c}
.rotate{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.stage:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;max-height:none;border-radius:0}
.stage:fullscreen .overlay{padding:4vh 4vw}
@media not all and (pointer:coarse){.game-guidance{left:20%;right:20%;top:16px}}
/* Without a touch screen (a laptop's mouse; headless QA Chrome has no pointer at all) the phase's controls show too,
   as on a phone (the voice says "press the jump button"), clickable, laptop-sized, each wearing its keyboard key:
   ← → on the arrows, E on the hand, Space under "Jump". */
.kcap,.jump-tag{display:none}
@media not all and (pointer:coarse){
 .tbtn{width:48px;height:48px;padding:9px;border-radius:13px;cursor:pointer}
 .tbtn svg{width:25px;height:25px}
 .tbtn.arrow{--arrow:48px}
 .tbtn.jump{width:54px;height:54px}
 .tbtn.act{right:84px}
 .kcap{display:block;position:absolute;right:-7px;bottom:-7px;min-width:20px;padding:1px 5px;border:1.5px solid #5c503a;border-radius:6px;background:#fffaf0;color:#453c2c;box-shadow:0 2px 0 #5c503a;font:800 11px/1.25 Nunito,sans-serif;text-align:center;white-space:nowrap;pointer-events:none}
 .tbtn.jump .kcap{right:50%;transform:translateX(50%);bottom:-9px}
 .jump-tag{display:block;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;font:700 13px/1.1 Nunito,sans-serif;color:#fffaf0;background:var(--teal);padding:4px 9px;border-radius:9px;box-shadow:0 2px 6px #2f281d33;pointer-events:none}
 .tbtn.arrow{position:relative}
 .tbtn.act{overflow:visible}
}
#keyHint{background:#fffaf0e6;color:#453c2c;border:1.5px solid #5c503a;font-weight:800}
@media(max-width:1000px),(max-height:650px){.wrap{grid-template-rows:44px minmax(0,1fr) 36px;padding:5px 10px;gap:4px}.top{gap:14px}.brand{font-size:16px}.brand img{width:34px;height:34px}.tool{font-size:12px;padding:6px 9px;min-height:40px}.tool svg{width:21px;height:21px}.stage{width:min(100%,calc((100svh - 98px)*16/9))}.bottom{font-size:10px;grid-template-rows:auto auto}.chapter-progress{font-size:10px}#status{font-size:10px}.card{padding:18px 22px}.card h2{margin-bottom:14px}.card p{margin-bottom:14px}.presents{margin-top:17px}.pick{margin-top:9px}.source-note{bottom:9px}.subtitle{top:8px;padding:6px 11px 8px}.stage .subtitle{left:12px;right:calc(clamp(44px,5.4cqw,56px) + 20px)}.stage-pause{top:8px;right:8px}.speaker-row{margin-bottom:3px}.skip{height:28px;min-height:28px}.game-guidance{top:12px;left:24%;right:23%}.game-guidance p{font-size:12px;padding:5px 8px}.tbtn{width:50px;height:50px;padding:10px;border-radius:14px}.tbtn.jump{width:56px;height:56px}.dpad{left:12px;bottom:12px;gap:10px}.tbtn.act{bottom:12px;right:80px}.tbtn.jump{bottom:12px;right:12px}.touch.action-only .act{right:12px}}
@media(max-width:720px){.brand span:not(.back){display:none}.tools{gap:5px}.tool span{display:none}.tool{width:40px;padding:8px}.top{gap:11px}.stage{border-radius:11px}.card{width:46%;padding:15px 18px}.card h2{font-size:clamp(25px,5.1cqw,40px)}.card .primary{font-size:16px;padding:12px 14px}.card .invitation{font-size:14px}.presents{font-size:10px;gap:5px}.presents img{width:22px;height:22px}.source-note{font-size:9px}.chapters{gap:4px}.chapter-button{font-size:12px;padding:8px;min-height:40px}#controlsHelp{display:none}.bottom{grid-template-columns:1fr}.game-guidance{left:26%;right:23%}.subtitle p{font-size:14px}}
@media(orientation:portrait) and (pointer:coarse) and (max-width:600px){
 .rotate{display:flex;position:fixed;inset:0;z-index:20;background:var(--paper);align-items:center;justify-content:center;flex-direction:column;gap:18px;padding:30px;text-align:center}
 .rotate p{font:500 29px/1.15 Fredoka,sans-serif;margin:0}
 .rot-icon{width:116px;height:116px;fill:none;stroke:var(--teal);stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
 body.turned .rotate{display:none}
 body.turned .wrap{position:fixed;left:50%;top:50%;width:100svh;height:100vw;max-width:none;margin:0;transform:translate(-50%,-50%) rotate(90deg);grid-template-rows:44px minmax(0,1fr) 32px;padding:4px 10px;gap:4px}
 body.turned .stage{width:min(100%,calc((100vw - 92px)*16/9));max-height:100%}
 body.turned h1{font-size:22px}
 body.turned .brand{font-size:15px}
 body.turned .brand span:not(.back){display:inline}
 body.turned .tool span{display:inline}
 body.turned .tool{width:auto;font-size:12px}
 body.turned #controlsHelp{display:none}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.card .small:empty{display:none}
.speaker-row{padding-right:44px}
.skip{position:absolute;right:6px;top:0;width:44px;height:44px;min-height:44px}
@media(pointer:coarse){.tool{min-width:44px;min-height:44px}.pick summary{min-height:44px}.chapter-button{min-height:44px}}
/* A small picture (a phone's page view, under 560 px wide): the title and end cards fit without scrolling, their
   button stays whole and on one line, the edition note moves right, clear of the card. With the chapter picker shown
   there is no room for the "Bir Ata7 Games masalı" line too; the Ata7 Games logo stays in the header. */
@container (max-width:560px){
 .title-card,.end-card{width:54%;padding:13px 16px}
 .title-card h2,.end-card h2{font-size:22px;margin-bottom:9px}
 .title-card .invitation,.end-card p{font-size:13px;margin-bottom:10px}
 .title-card .primary,.end-card .primary{font-size:15px;padding:10px 12px;min-height:42px;white-space:nowrap}
 .title-card .presents,.end-card .presents{margin-top:8px}
 .title-card:has(.pick:not(.hidden)) .presents,.end-card:has(.pick:not(.hidden)) .presents{display:none}
 .title-card .pick,.end-card .pick{margin-top:4px}
 /* the end card is wider: its last words, the button and the credits (end-note) fit unscrolled */
 .end-card{width:64%}
 .end-card p.end-note{font-size:10px;margin-top:6px}
 .title-overlay .source-note{left:auto;right:2%;bottom:22px;max-width:40%}
 .lang-switch button{min-width:44px;min-height:40px;font-size:15px;padding:0 10px}
}
/* On a phone a storybook plate's caption is compact, so a two-line narration takes at most about a quarter of the
   picture (the plate's faces stand high and low: no framing clears a tall caption); at the bottom it spans the picture's
   width (the pause button is at the top). main.js: .subtitle.on-plate. */
@media(max-width:1000px),(max-height:650px){.stage .subtitle:is(.on-plate,.compact){padding:3px 9px 4px}.stage .subtitle:is(.on-plate,.compact).at-bottom{left:8px;right:8px}.subtitle:is(.on-plate,.compact) p{font-size:12px;line-height:1.2}.subtitle:is(.on-plate,.compact) .speaker-row{margin-bottom:1px;padding-right:34px}.subtitle:is(.on-plate,.compact) #speaker{font-size:11px;padding:1px 7px}.subtitle:is(.on-plate,.compact) .skip{width:32px;height:28px;min-height:28px}}
/* A caption covering a face on both sides (main.js autoCaption): compact on a big screen too. */
.subtitle.compact p{font-size:clamp(12px,1.55cqw,18px)}.stage .subtitle.compact{padding:5px 12px 6px}
/* The end card's mushroom tally (main.js endMushrooms): the HUD's mushrooms in a row on the card, found lit, missed dim. */
.end-mush{display:flex;justify-content:center;gap:clamp(4px,.8cqw,10px);margin:2px 0 6px}
.end-mush .mush{width:clamp(26px,3.6cqw,42px)}
.end-mush-text{font-weight:800;margin-top:0}
/* On the cream card a found mushroom is filled warm (the bar's cream cap would read as an empty outline there). */
.end-mush .mush.got:not(.blue) .cap{fill:#d9a066;stroke:#6d4a26}.end-mush .mush.got .stem{fill:#fffdf6}.end-mush .mush:not(.got){opacity:.22}
/* On a phone the row and its line share one line, small, so the card keeps its button in the picture. */
@media(max-width:1000px),(max-height:650px){.end-card #endText{margin-bottom:6px}.end-mush{display:inline-flex;vertical-align:-3px;margin:0 6px 0 0;gap:2px}.end-mush .mush{width:16px}.end-mush-text{display:inline;font-size:12px;margin:0;white-space:nowrap}.end-mush-text+*{margin-top:8px}}
/* A phone's end card holds the tally and the credits whole: tighter spacing, a smaller button and credits (no scroll). */
@media(max-width:1000px),(max-height:650px){.end-overlay{padding-top:8px;padding-bottom:8px}.end-card{padding:9px 14px 5px}.end-card h2{font-size:20px;margin-bottom:4px}.end-card #endText{font-size:12px;line-height:1.3;margin-bottom:4px}.end-mush-text+*{margin-top:4px}.end-card .primary{min-height:32px;padding:5px 12px}.end-card .presents{margin-top:4px;font-size:9px}.end-card .pick{margin-top:2px}.end-card .pick summary{min-height:32px;font-size:13px}.end-card .presents img{width:16px;height:16px}}
@media(max-width:1000px),(max-height:650px){.end-card #endMushText{margin:0}.end-card #endNotes{font-size:8px;line-height:1.1;margin-top:8px}.end-card .pick:not(.hidden)+#endNotes{margin-top:2px}}
/* The mushroom bar shows only after a pick (main.js updateMushrooms .up): in over .3 s, out over .5 s. */
.mush-hud{opacity:0;visibility:hidden;transition:opacity .5s,visibility 0s .5s}
.mush-hud.up{opacity:1;visibility:visible;transition:opacity .3s,visibility 0s}
/* ===== The painted kit's own buttons (from Üç Küçük Domuzcuk) (Foundation, 10 Nov 2026; story.md "Buttons per phase") =====
   No jump button anywhere: the hand takes the jump's corner, on a phone (touch) and a computer (mouse, keys E ← →). */
.tbtn.jump,.jump-tag{display:none!important}
.tbtn.act,.touch.hold-only .act{right:18px}
@media not all and (pointer:coarse){.tbtn.act,.touch.hold-only .act{right:18px}.touch.hold-only .act{width:64px;height:64px;border-radius:18px}.touch.hold-only .act svg{width:32px;height:32px}}
@media(max-width:1000px),(max-height:650px){.tbtn.act,.touch.hold-only .act{right:12px;bottom:12px}}
/* The face tag (story.md "The child's role"): a ring or a hold with `who` puts that animal's face on the ✋'s tag
   (main.js sets data-who): assets/ui/face_<who>.webp over its colour (story.md swatches); the colour alone until painted. */
.tbtn.act{--who:#fffaf0;--face:none}
.tbtn.act[data-who=timun]{--who:#F4A72B}.tbtn.act[data-who=mbok]{--who:#2F3E73}
html.ui-face_timun .tbtn.act[data-who=timun]{--face:url("assets/ui/face_timun.webp")}
html.ui-face_mbok .tbtn.act[data-who=mbok]{--face:url("assets/ui/face_mbok.webp")}
.tbtn.act:is([data-who=timun],[data-who=mbok]) .act-tag{padding-left:42px;min-height:36px;display:flex;align-items:center}
.tbtn.act:is([data-who=timun],[data-who=mbok]) .act-tag:empty{display:none}
.tbtn.act:is([data-who=timun],[data-who=mbok]) .act-tag::before{content:"";position:absolute;left:3px;top:50%;width:34px;height:34px;transform:translateY(-50%);border-radius:50%;background:var(--face) center/cover no-repeat,var(--who);box-shadow:0 0 0 2px #fffaf0}
/* Painted buttons (ArtLead: assets/ui/left.webp, right.webp, act.webp, hold.webp; optional pause.webp, music.webp,
   fullscreen.webp). index.html's loader adds html.ui-<name> once a file loads; until then the drawn buttons above stay.
   The painting fills the button (same sizes on phone and computer); the drawn icon and frame step aside; the key cap,
   the tag and the hold's rising fill stay on top. */
html.ui-left .tbtn.a-left{--art:url("assets/ui/left.webp")}
html.ui-right .tbtn.a-right{--art:url("assets/ui/right.webp")}
html.ui-act .tbtn.act{--art:url("assets/ui/act.webp")}
html.ui-hold .touch.hold-only .tbtn.act{--art:url("assets/ui/hold.webp")}
html.ui-left .tbtn.a-left,html.ui-right .tbtn.a-right,html.ui-act .tbtn.act,html.ui-hold .touch.hold-only .tbtn.act{border-color:transparent;background:var(--art) center/contain no-repeat;box-shadow:none}
html.ui-left .tbtn.a-left>svg,html.ui-right .tbtn.a-right>svg,html.ui-act .tbtn.act>svg,html.ui-hold .touch.hold-only .tbtn.act>svg{visibility:hidden}
html.ui-act .tbtn.act .fill,html.ui-hold .touch.hold-only .tbtn.act .fill{opacity:.55}
html.ui-left .tbtn.a-left.held,html.ui-right .tbtn.a-right.held{background:var(--art) center/contain no-repeat;filter:brightness(.92)}
html.ui-pause :is(#pauseBtn,#stagePause) svg{background:url("assets/ui/pause.webp") center/contain no-repeat}
html.ui-music #musicBtn svg{background:url("assets/ui/music.webp") center/contain no-repeat}
html.ui-fullscreen #fullBtn svg{background:url("assets/ui/fullscreen.webp") center/contain no-repeat}
html.ui-pause :is(#pauseBtn,#stagePause) svg>*,html.ui-music #musicBtn svg>*,html.ui-fullscreen #fullBtn svg>*{display:none}
/* The golden seed row (story.json collect: six, one per chapter, kit.seed) on the HUD and the end card. */
.mush .cap{fill:#f2c14e;stroke:#6a4a12;stroke-width:1.3}
.mush .stem,.mush .dot{fill:#2b2418;stroke:none}
.mush .line{fill:none;stroke:#2b2418;stroke-width:1.3}
.end-mush .mush.got .cap,.end-mush .mush.got:not(.blue) .cap{fill:#f2c14e;stroke:#6a4a12}.end-mush .mush.got .stem{fill:#2b2418}
.mush-hud .mush{width:clamp(20px,2.6cqw,32px)}
/* On a phone the six seeds sit smaller and closer, clear of the ◀ ▶ and ✋ corners (sweep --phone, 10 Nov 2026). */
@media(max-width:1000px),(max-height:650px){.mush-hud{gap:1px;padding:3px 8px}.mush-hud .mush{width:clamp(14px,2cqw,20px)}}
/* The wolf's notebook page (state.bubbles kind 'note', ChBricks): a cream paper card with a ruled line, not a bubble. */
.bubble.note{border-radius:6px;transform:translate(-50%,-50%) rotate(-3deg);background:repeating-linear-gradient(#fff4e0 0 calc(var(--d)*.16),#d9c9a8 calc(var(--d)*.16) calc(var(--d)*.165));box-shadow:inset 0 0 0 2px #e3d3b0,inset calc(var(--d)*.1) 0 0 -1px #f7d6d0,0 6px 14px #2f281d40}
.bubble.note.popped{transform:translate(-50%,-50%) rotate(-3deg) scale(1.35)}
/* A hold with its own painting (main.js data-hold from state.hold.art): 'door' → hold_door.webp ("Kapıyı tut"). */
html.ui-hold_door .touch.hold-only .tbtn.act[data-hold=door]{--art:url("assets/ui/hold_door.webp");border-color:transparent;background:var(--art) center/contain no-repeat;box-shadow:none}
html.ui-hold_door .touch.hold-only .tbtn.act[data-hold=door]>svg{visibility:hidden}
/* The wolf's breath counts (bricks.js puffs, kind 'puff'): a cloud with a big number a child reads at a glance. */
.bubble.puff span{font:800 calc(var(--d)*.42)/1 Fredoka,Nunito,sans-serif;color:#2f4a6a;max-width:none}
/* The hour over the whole picture (main.js data-hour from k.light): one multiplied colour, top a little deeper than the
   ground, so sky, hills, houses and figures share the light with no edge anywhere; warm, never grey (story.md). */
.hour-tint{display:none!important} /* the hour is now drawn in the WebGL picture (stage.js _hourOverlay) */
.hour-tint{position:absolute;inset:0;z-index:1;pointer-events:none;mix-blend-mode:multiply;opacity:0}
.hour-tint[data-hour=dawn]{opacity:1;background:linear-gradient(#ffd0d8,#fff0dc 60%)}
.hour-tint[data-hour=evening]{opacity:1;background:linear-gradient(#ffc08a,#ffd9a8 60%)}
.hour-tint[data-hour=dusk]{opacity:1;background:linear-gradient(#c79ad8,#f4b6a8 60%)}
.hour-tint[data-hour=night]{opacity:1;background:linear-gradient(#5a6cc4,#8291d8 60%)}
/* The held button's fill on the painted hold buttons (hold.webp, hold_door.webp): a warm gold rising inside the frame,
   over the painting, so the child sees the breath / the push grow (ChBricks, Reviewer item 26). */
html.ui-hold .touch.hold-only .tbtn.act .fill,html.ui-hold_door .touch.hold-only .tbtn.act[data-hold=door] .fill{z-index:1;opacity:1;inset:16%;border-radius:12%;background:linear-gradient(to top,#ffcf4dcc calc(var(--fill,0)*100%),#0000 0)}
/* A Unity part (js/unity.js: unity-build/<part>/ in an iframe) over the painted picture, under the captions, buttons and cards. */
.unity-part{position:absolute;inset:0;width:100%;height:100%;border:0;z-index:1;background:transparent}
/* A film cut (main.js updateFilm, kit.film): the clip over the painted picture, under captions, buttons and cards. */
.film-cut{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1;background:#2b2418;pointer-events:none}
#continueBtn{margin:0 10px 10px 0}

/* the build stamp (tools/build.mjs, version.json): which build this is, small in the title screen's bottom-right corner
   (white with a soft shadow, readable on any picture; on a phone the source note sits just above it) */
.build-stamp{position:absolute;right:10px;bottom:5px;font:600 10px/1.2 Nunito,sans-serif;color:#fff;opacity:.8;text-shadow:0 1px 2px #0009,0 0 6px #0006;white-space:nowrap;pointer-events:none;z-index:2}

/* Music button: ON = teal, filled note; OFF = grey, faded note crossed by a red slash, and the label says so */
#musicBtn .slash,#musicBtn .off-text{display:none}
#musicBtn[aria-pressed="true"]{background:var(--teal);color:#fffaf0}
#musicBtn[aria-pressed="true"] ellipse{fill:currentColor}
#musicBtn[aria-pressed="false"]{background:#d9d4c6;color:#6b655a}
#musicBtn[aria-pressed="false"] svg>*:not(.slash){opacity:.5}
#musicBtn[aria-pressed="false"] .slash{display:inline;stroke:#c0392b;stroke-width:2.8;opacity:1}
#musicBtn[aria-pressed="false"] .on-text{display:none}
#musicBtn[aria-pressed="false"] .off-text{display:inline}
@media(max-width:720px){#musicBtn .on-text,#musicBtn .off-text{display:none!important}}
body.turned #musicBtn .on-text,body.turned #musicBtn[aria-pressed="false"] .on-text{display:none!important}
body.turned #musicBtn[aria-pressed="true"] .off-text{display:none!important}

/* Waiting on Play (main.js showLoading; the parent, 13 Nov 2026: children can't read the waiting text and kept
   tapping): the button fills like a bar as the sounds arrive (--p, 0..1), a light runs across it, its ▶ becomes a
   turning ring; a tap meanwhile makes it bounce. It stays bright: a grey, "off" button looks broken to a child. */
#start .spin{display:none}
#start.loading{position:relative;overflow:hidden;cursor:progress;opacity:1}
#start.loading>span,#start.loading>.spin{position:relative;z-index:1}
#start.loading::before{content:"";position:absolute;inset:0 auto 0 0;width:calc(var(--p,0)*100%);background:rgba(255,255,255,.34);transition:width .3s ease-out}
#start.loading::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 38%,rgba(255,255,255,.5) 50%,transparent 62%) no-repeat;background-size:250% 100%;animation:startSweep 1.5s linear infinite}
#start.loading svg{display:none}
#start.loading .spin{display:block;flex:none;width:18px;height:18px;border:3px solid currentColor;border-right-color:transparent;border-radius:50%;animation:startSpin .8s linear infinite}
#start.loading.nudge{animation:startNudge .35s ease-out}
@keyframes startSweep{from{background-position:130% 0}to{background-position:-30% 0}}
@keyframes startSpin{to{transform:rotate(1turn)}}
@keyframes startNudge{30%{transform:scale(.94)}65%{transform:scale(1.04)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){#start.loading::after{animation:none}#start.loading .spin{animation-duration:2.4s}}

/* Topach parent settings (the kit sets these classes from localStorage "ata7Prefs"; nothing set = none of them) */
html.ata7-subs-off #subtitle{visibility:hidden}
html.ata7-subs-off #subtitle #skipSpeech{visibility:visible}
html.ata7-subs-big #subtitleText,html.ata7-subs-big #speaker{zoom:1.35}
html.ata7-font-easy #subtitleText,html.ata7-font-easy #speaker,html.ata7-font-easy #hintText,html.ata7-font-easy #actionLabel,html.ata7-font-easy .title-card h2,html.ata7-font-easy .title-card .invitation,html.ata7-font-easy .end-card h2,html.ata7-font-easy .end-card p{font-family:"Ata7 Easy",Nunito,sans-serif}
/* left-handed: the whole touch layer mirrored (move buttons right, action/jump left); the d-pad and the buttons' own
   pictures and words are turned back so arrows still point their way and text reads forwards */
html.ata7-left #touch{transform:scaleX(-1)}
html.ata7-left #touch .dpad,html.ata7-left #touch .act>*,html.ata7-left #touch .jump>*{transform:scaleX(-1)}
