/* Book Quest: the look for older readers. Dark ink glass over a pastel world, the book's own accent,
 * Rubik only, nothing heavier than 600 for body text, 44 px targets, no colour used as the only signal. */
:root{--accent:#ff5a36;--accent2:#ffc43d;--ink:#1b2236;--paper:#fff7ec;--next:#1f9d63;
  --glass:rgba(22,27,44,.72);--line:rgba(255,255,255,.14);--r:18px;--a11y-slot:64px}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:var(--ink);color:#fff;
  font-family:Rubik,"Noto Sans Hebrew",Arial,sans-serif;font-weight:400;touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select:none}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
#c{position:fixed;inset:0;width:100%;height:100%;display:block}
[hidden]{display:none !important}
.glass{background:var(--glass);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 8px 28px rgba(10,12,24,.25)}
.round{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;font-size:22px;border:1px solid var(--line)}
.tag{display:inline-block;padding:4px 12px;border-radius:99px;background:var(--accent);color:#fff;font-size:13px;font-weight:500;letter-spacing:.02em}
.go,.ghost{min-height:52px;padding:0 26px;border-radius:16px;font-size:18px;font-weight:500;border:none}
.go{background:var(--next);color:#fff;box-shadow:0 5px 0 rgba(0,0,0,.22)}
.go:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(0,0,0,.22)}
.ghost{background:transparent;border:1.5px solid rgba(255,255,255,.4)}

/* ---------- HUD ---------- */
#hud{position:fixed;inset:0;pointer-events:none;z-index:5}
#hud>*,.hud-top>*{pointer-events:auto}
.hud-top{position:absolute;top:max(10px,env(safe-area-inset-top));inset-inline:12px;display:flex;gap:10px;align-items:center;pointer-events:none}
#clues{display:flex;align-items:center;gap:6px;padding:6px 10px;margin-inline-start:auto}
.clue{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-size:19px;background:rgba(255,255,255,.08);border:1.5px dashed rgba(255,255,255,.3);color:rgba(255,255,255,.55);font-weight:500}
.clue.got{background:var(--paper);border:1.5px solid var(--accent2);animation:got .5s}
@keyframes got{0%{transform:scale(.4)}70%{transform:scale(1.25)}100%{transform:none}}
.clue-n{font-size:14px;font-weight:500;opacity:.85;padding-inline-start:4px}
#goal{position:absolute;top:calc(max(10px,env(safe-area-inset-top)) + 58px);inset-inline-end:12px;display:flex;align-items:center;gap:10px;padding:8px 14px;max-width:min(78vw,440px);font-size:15px;font-weight:500;pointer-events:none}
#goalArrow{display:inline-block;color:var(--accent2);font-size:20px;transition:transform .1s linear}
#goalDist{opacity:.75;font-size:13px;white-space:nowrap}
.act{position:absolute;bottom:calc(max(14px,env(safe-area-inset-bottom)) + 8px);left:50%;transform:translateX(-50%);min-height:56px;padding:0 24px 0 14px;
  border-radius:99px;border:none;background:var(--paper);color:var(--ink);font-size:18px;font-weight:500;display:flex;align-items:center;gap:10px;box-shadow:0 6px 0 rgba(0,0,0,.25),0 0 0 4px var(--accent);animation:actin .25s}
@keyframes actin{from{transform:translate(-50%,30px);opacity:0}}
.act-k{width:30px;height:30px;border-radius:8px;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:14px}
#stick{position:fixed;width:120px;height:120px;margin:-60px 0 0 -60px;border-radius:50%;border:2px solid rgba(255,255,255,.55);background:rgba(22,27,44,.22);opacity:0;pointer-events:none;transition:opacity .15s}
#stick.on{opacity:1}
#stick i{position:absolute;left:35px;top:35px;width:50px;height:50px;border-radius:50%;background:rgba(255,255,255,.9)}
#labels{position:fixed;inset:0;pointer-events:none;z-index:4;overflow:hidden}
.lbl{position:absolute;left:0;top:0;display:flex;align-items:center;gap:6px;padding:5px 12px;border-radius:12px;background:rgba(22,27,44,.66);color:#fff;font-size:14px;font-weight:500;white-space:nowrap;transform-origin:50% 100%}
.lbl b{font-weight:500}
.lbl .mk:empty{display:none}
.lbl .mk{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--accent);font-size:14px;font-weight:600}
.lbl.goal{background:var(--accent)}.lbl.goal .mk{background:#fff;color:var(--accent)}
.lbl.done{opacity:.7}.lbl.done .mk{background:var(--paper);color:var(--ink)}

/* ---------- the menu ---------- */
.panel{position:fixed;z-index:20;top:calc(max(10px,env(safe-area-inset-top)) + 56px);inset-inline-start:12px;width:min(320px,calc(100vw - 24px));max-height:calc(100dvh - 140px);overflow:auto;padding:10px}
.panel h3{margin:6px 8px 10px;font-size:17px;font-weight:500}
.row{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:0 12px;border-radius:12px;background:rgba(255,255,255,.06);border:none;margin-bottom:6px;font-size:15px;text-align:start}
.row i{width:40px;height:22px;border-radius:12px;background:rgba(255,255,255,.25);position:relative}
.row i:after{content:"";position:absolute;top:2px;inset-inline-start:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}
.row.on i{background:var(--next)}.row.on i:after{transform:translateX(-18px)}
html[dir=ltr] .row.on i:after{transform:translateX(18px)}
.log{background:transparent;border-bottom:1px solid var(--line);border-radius:0;min-height:40px;opacity:.75}
.log.done{opacity:1}

/* ---------- the cover ---------- */
#cover{position:fixed;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;gap:clamp(18px,4vw,56px);padding:20px;
  background:linear-gradient(90deg,rgba(22,27,44,.15),rgba(22,27,44,.6))}
.cv-book{position:relative;width:clamp(130px,20vw,230px);aspect-ratio:3/4.2;border-radius:6px 16px 16px 6px;background:linear-gradient(160deg,var(--accent),color-mix(in srgb,var(--accent) 70%,#000));
  box-shadow:0 24px 50px rgba(0,0,0,.35);display:flex;flex-direction:column;justify-content:flex-end;padding:18px;transform:rotate(-4deg);animation:bob 4s ease-in-out infinite;flex:none}
.cv-book b{font-size:clamp(20px,2.6vw,30px);font-weight:600;line-height:1.1}
.cv-book small{margin-top:6px;opacity:.85;font-size:14px}


@keyframes bob{50%{transform:rotate(-2deg) translateY(-8px)}}
.cv-card{max-width:520px;padding:clamp(18px,3vw,30px);border-radius:24px;background:var(--glass);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--line)}
.cv-card h1{margin:12px 0 4px;font-size:clamp(28px,4.4vw,46px);font-weight:600;line-height:1.05}
.cv-card .by{margin:0 0 12px;opacity:.75;font-size:14px}
#cvText{font-size:clamp(16px,1.9vw,19px);line-height:1.5;margin:0 0 18px}
.cv-go{display:flex;gap:10px;flex-wrap:wrap}
.keys{margin:14px 0 0;font-size:13px;opacity:.6}
@media (max-height:480px){ .cv-book{display:none} #cvText{margin-bottom:10px;font-size:15px} .cv-card h1{font-size:26px} .keys{display:none} }
@media (max-width:640px) and (orientation:portrait){ #cover{flex-direction:column} .cv-book{width:110px} }

/* ---------- talking ---------- */
.sheet{position:fixed;z-index:12;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(640px,calc(100vw - 24px));
  padding:18px 20px;border-radius:24px;background:var(--glass);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--line);animation:up .25s}
@keyframes up{from{transform:translate(-50%,40px);opacity:0}}
.tk-who{display:flex;align-items:center;gap:12px}
.tk-face,.gm-face{width:48px;height:48px;border-radius:50%;background:var(--c,#888);display:grid;place-items:center;border:3px solid var(--paper);flex:none;overflow:hidden}
.tk-face svg,.gm-face svg{width:34px;height:34px;margin-top:8px}
.tk-who b,.gm-who b{display:block;font-size:18px;font-weight:500}
.tk-who small,.gm-who small{opacity:.7;font-size:13px}
.tk-line{font-size:clamp(17px,2vw,20px);line-height:1.5;margin:12px 0 14px}
.tk-go{display:flex;gap:10px;flex-wrap:wrap}

/* ---------- the mini-games: a case file ---------- */
#game{position:fixed;inset:0;z-index:15;background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.07) 1px,transparent 1.4px) 0 0/22px 22px,linear-gradient(160deg,#232b45,var(--ink))}
.gm{position:absolute;inset:0;display:flex;flex-direction:column;padding:max(10px,env(safe-area-inset-top)) clamp(12px,3vw,40px) 0}
.gm-top{display:flex;align-items:center;gap:12px;min-height:56px}
.gm-who{display:flex;align-items:center;gap:10px}
.gm-steps{display:flex;gap:6px;margin-inline-start:auto}
.gm-steps i{width:12px;height:12px;border-radius:50%;border:2px solid rgba(255,255,255,.5)}
.gm-steps i.on{background:var(--accent2);border-color:var(--accent2)}
.gm-x{width:48px;height:48px;border-radius:50%;border:1px solid var(--line);background:rgba(255,255,255,.08);font-size:18px;margin-inline-start:8px}
.gm-steps:empty+.gm-x{margin-inline-start:auto}
.gm-body{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:clamp(10px,2.4vh,22px);min-height:0;overflow:auto;padding:6px 0}
.gm-prompt{margin:0;font-size:15px;opacity:.8;letter-spacing:.02em}
.gm-card{position:relative;width:min(760px,100%);min-height:clamp(90px,22vh,190px);display:flex;flex-direction:column;justify-content:center;background:var(--paper);color:var(--ink);border-radius:10px;padding:clamp(16px,3vh,30px) clamp(18px,3vw,34px);box-shadow:0 14px 30px rgba(0,0,0,.35);transform:rotate(-.6deg)}
.gm-q{margin:0;font-size:clamp(22px,3.4vw,38px);font-weight:500;line-height:1.3;text-align:center}
.gm-n{position:absolute;top:10px;inset-inline-start:14px;font-size:13px;opacity:.55}
.gm-msg{margin:8px 0 0;text-align:center;min-height:1.2em;color:#b3261e;font-weight:500}
.gm-msg:empty{display:none}
.gm-opts{display:grid;gap:10px;width:min(720px,100%);grid-template-columns:1fr}
.gm-opts.two{grid-template-columns:1fr 1fr}
.gm-opts.chips{display:flex;flex-wrap:wrap;justify-content:center}
@media (min-width:700px){ .gm-opts:not(.two):not(.chips){grid-template-columns:repeat(auto-fit,minmax(200px,1fr))} }
.gm-opt{position:relative;display:flex;align-items:center;gap:12px;min-height:56px;padding:10px 16px;border-radius:14px;border:2px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);font-size:clamp(16px,2vw,19px);text-align:start;transition:background .15s,border-color .15s}
.gm-opts.two .gm-opt{justify-content:center;font-size:20px;min-height:64px}
.gm-opts.chips .gm-opt{min-height:52px;padding:8px 18px}
.gm-opt:hover:not(:disabled){background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.4)}
.gm-k{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:rgba(255,255,255,.14);font-size:15px;flex:none}
.gm-t{flex:1}
.gm-opts.two .gm-t,.gm-opts.chips .gm-t{flex:none}
.gm-mark:empty{display:none}
.gm-opt.right{background:var(--paper);color:var(--ink);border-color:var(--accent2)}

.gm-opt.wrong{opacity:.45;text-decoration:line-through;text-decoration-thickness:2px}

.gm-opt:disabled{cursor:default}
.gm-opt.gone{visibility:hidden}
.shake{animation:shake .45s}
@keyframes shake{20%{transform:translateX(-9px)}40%{transform:translateX(8px)}60%{transform:translateX(-6px)}80%{transform:translateX(3px)}}
.gm-line{list-style:none;margin:0;padding:0;width:min(720px,100%);display:grid;gap:8px;position:relative}
.gm-slot{display:flex;align-items:center;gap:12px;min-height:46px;padding:6px 14px;border-radius:12px;border:2px dashed rgba(255,255,255,.25);font-size:17px}
.gm-slot.on{border:2px solid var(--accent2);background:var(--paper);color:var(--ink);animation:got .35s}
.gm-slot.on .gm-k{background:var(--accent2);color:var(--ink)}
.gm-prize{margin:0;align-self:center;font-size:15px;opacity:.8}
.gm-foot{display:flex;justify-content:center;padding:10px 0 calc(max(12px,env(safe-area-inset-bottom)) + 4px);min-height:76px}
.gm-next{min-height:56px;padding:0 34px;border-radius:16px;border:none;background:var(--next);color:#fff;font-size:19px;font-weight:500;box-shadow:0 5px 0 rgba(0,0,0,.25);animation:up2 .25s}
@keyframes up2{from{transform:translateY(20px);opacity:0}}
@media (max-height:480px){ .gm-top{min-height:48px} .gm-card{padding:12px 18px} .gm-opt{min-height:48px;padding:6px 14px} .gm-foot{min-height:64px;padding-top:6px} .gm-body{gap:8px} }
/* a chapter (riddle): the summary on a sheet of paper, then the riddle with a one-word answer typed in */
.gm-ch .gm-body{justify-content:flex-start}
.gm-ch .gm-body>:first-child{margin-top:auto}.gm-ch .gm-body>:last-child{margin-bottom:auto}
.gm-sum{transform:rotate(-.3deg);min-height:0;flex:none;line-height:1.6;font-size:clamp(16px,1.9vw,19px);text-align:start}
.gm-sum p{margin:0 0 .7em}.gm-sum p:last-child{margin:0}
.gm-chn{align-self:flex-start;display:inline-block;padding:3px 12px;border-radius:99px;background:var(--accent);color:#fff;font-size:14px;font-weight:500;margin-bottom:8px}
.gm-cht{margin:0 0 10px;font-size:clamp(20px,2.6vw,28px);font-weight:600;line-height:1.25}
.gm-rd .gm-chn{align-self:center}
.gm-msg.ok{color:var(--ink)}
.gm-ans{width:min(560px,100%);display:flex;flex-direction:column;gap:6px}
.gm-lab{font-size:15px;opacity:.8}
.gm-row{display:flex;gap:10px}
.gm-in{flex:1;min-width:0;min-height:56px;padding:0 16px;border-radius:14px;border:2px solid rgba(255,255,255,.35);background:var(--paper);color:var(--ink);font:inherit;font-size:22px;font-weight:500;-webkit-user-select:text;user-select:text;touch-action:manipulation}
.gm-in:focus{outline:3px solid var(--accent2);outline-offset:2px}
.gm-in.wrong{border-color:#b3261e;border-style:dashed}
.gm-in.right{border-color:var(--accent2);border-width:3px}
.gm-chk{min-height:56px;flex:none}
.gm-back{min-height:48px;font-size:16px}
.gm-tor{flex:none}
@media (max-height:480px){ .gm-in,.gm-chk{min-height:48px} .gm-in{font-size:19px} .gm-sum{font-size:15px;line-height:1.5} .gm-cht{font-size:19px;margin-bottom:6px} }

/* ---------- films ---------- */
#film{position:fixed;inset:0;z-index:16;background:rgba(10,12,22,.92);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px}
.fm-box{width:min(900px,100%,calc((100dvh - 120px) * 16 / 9));aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:#000}
.fm-box video{width:100%;height:100%;display:block}
.fm-ph{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:radial-gradient(circle at 70% 30%,var(--accent2),transparent 55%),linear-gradient(140deg,var(--accent),var(--ink))}
.fm-book{position:absolute;inset-inline-start:22px;bottom:16px;font-size:clamp(28px,6vw,64px);font-weight:600;opacity:.16}
.fm-play{width:76px;height:76px;border-radius:50%;background:rgba(255,255,255,.92);color:var(--accent);display:grid;place-items:center;font-size:30px;animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.1)}}
.fm-ph b{font-size:clamp(18px,2.6vw,26px);font-weight:500}
.fm-ph small{padding:2px 10px;border-radius:99px;background:rgba(0,0,0,.3);font-size:12px}

/* ---------- the reward ---------- */
#reward{position:fixed;z-index:18;left:50%;top:45%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:6px;padding:22px 34px;border-radius:24px;background:var(--paper);color:var(--ink);box-shadow:0 0 0 6px var(--accent2),0 20px 60px rgba(0,0,0,.4);pointer-events:none}
#reward.pop{animation:pop .45s cubic-bezier(.2,1.6,.4,1)}
#reward.fly{transition:transform .55s ease-in,opacity .55s ease-in;transform:translate(-50%,-50%) translate(-30vw,-40vh) scale(.2);opacity:0}
html[dir=rtl] #reward.fly{transform:translate(-50%,-50%) translate(-30vw,-40vh) scale(.2)}
@keyframes pop{from{transform:translate(-50%,-50%) scale(.3);opacity:0}}
.rw-icon{font-size:64px;line-height:1}
#reward small{font-size:14px;opacity:.7}
.rw-name{font-size:24px;font-weight:600}

/* ---------- the end, the refusal ---------- */
#win{position:fixed;inset:0;z-index:16;display:grid;place-items:center;padding:16px;background:radial-gradient(circle,color-mix(in srgb,var(--accent) 40%,transparent),rgba(10,12,22,.85))}
.wn-card{max-width:560px;padding:26px;border-radius:24px;background:var(--glass);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--line);text-align:center}
.wn-card h2{font-size:clamp(26px,4vw,40px);font-weight:600;margin:12px 0 6px}
.wn-card p{font-size:18px;line-height:1.5;margin:0 0 14px}
.wn-clues{display:flex;justify-content:center;gap:8px;font-size:30px;margin-bottom:16px}
.wn-card .cv-go{justify-content:center}
.wn-card{max-height:calc(100dvh - 32px);overflow:auto}
.wn-sol{margin:6px 0 16px;padding:16px 18px;border-radius:10px;background:var(--paper);color:var(--ink);text-align:start;transform:rotate(-.3deg)}
.wn-sol p{font-size:17px;line-height:1.6;margin:0 0 .6em}.wn-sol p:last-child{margin:0}
.wn-hook{font-size:19px !important;font-weight:500}
.wn-h{margin:4px 0 8px;font-size:20px;font-weight:600;color:var(--accent2)}
@media (max-height:480px){ .wn-card{padding:14px 16px} .wn-card h2{font-size:24px;margin-top:6px} .wn-sol p,.wn-card p{font-size:15px;margin-bottom:8px} .wn-hook{font-size:16px !important} .wn-clues{font-size:22px;margin-bottom:8px} .wn-h{margin:0 0 4px;font-size:17px} .wn-card .go,.wn-card .ghost{min-height:46px} }
#refuse{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:16px;background:var(--ink)}
.rf-card{max-width:560px;padding:24px;border-radius:20px;background:var(--paper);color:var(--ink)}
.rf-card b{font-size:22px;font-weight:600}
.rf-card ul{font-size:13px;line-height:1.5;padding-inline-start:18px;opacity:.8;font-family:Rubik,monospace}

/* ---------- accessibility menu (rw/js/a11y.js), in the quest's glass ---------- */
#a11ybtn{position:fixed;z-index:25;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 4px);right:12px;width:48px;height:48px;padding:10px;border-radius:50%;
  border:1px solid var(--line);background:var(--glass);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff}
#a11ybtn svg{width:100%;height:100%}
#a11ypanel{position:fixed;z-index:26;display:none;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--a11y-slot));right:12px;width:min(330px,calc(100vw - 24px));
  max-height:min(74vh,calc(100dvh - var(--a11y-slot) - 28px));overflow:auto;padding:0 10px 10px;border-radius:18px;background:#fff;color:#1b2236;box-shadow:0 18px 40px rgba(0,0,0,.35)}
#a11ypanel.open{display:block}
.a11y-head{position:sticky;top:0;z-index:2;background:#fff;padding:10px 4px;display:flex;justify-content:space-between;align-items:center;font-weight:500;font-size:17px}
.a11y-x{width:44px;height:44px;border-radius:50%;border:none;background:#f0f2f7;font-size:18px;color:#1b2236}
.a11y-row{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:6px 12px;margin-top:6px;border-radius:12px;border:1.5px solid #dfe3ec;background:#fff;color:#1b2236;font-size:15px;text-align:start}
.a11y-toggle i{flex:none;width:40px;height:22px;border-radius:12px;background:#c3cddd;position:relative}
.a11y-toggle i:after{content:"";position:absolute;top:2px;inset-inline-start:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}
.a11y-toggle.on{border-color:#1e63d0;background:#e8f0ff}
.a11y-toggle.on i{background:#1e63d0}
.a11y-toggle.on i:after{transform:translateX(-18px)}
html[dir=ltr] .a11y-toggle.on i:after{transform:translateX(18px)}
.a11y-steps{display:flex;align-items:center;gap:10px}
.a11y-steps button{width:44px;height:44px;border-radius:10px;border:1.5px solid #1b2236;background:#fff;color:#1b2236;font-size:16px}
.a11y-reset{justify-content:center;background:#fff2f2;border-color:#f2c8c8}
html.a11y-contrast body{filter:contrast(1.2) saturate(1.05)}
html.a11y-contrast .glass,html.a11y-contrast .sheet,html.a11y-contrast .cv-card{background:rgba(5,6,12,.94)}
html.a11y-highlight button{outline:3px solid #ffd34d !important;outline-offset:2px}
html.a11y-still *,html.a11y-still *:before,html.a11y-still *:after{animation:none !important;transition:none !important}
html.a11y-kbd :focus{outline:4px solid #ff7a00 !important;outline-offset:3px}
html.a11y-align .tk-line,html.a11y-align .gm-q,html.a11y-align #cvText{text-align:start !important}
html.a11y-space .tk-line,html.a11y-space .gm-q,html.a11y-space .gm-opt,html.a11y-space #cvText{line-height:1.9 !important;letter-spacing:.04em !important;word-spacing:.12em !important}
html.a11y-font body,html.a11y-font button{letter-spacing:.02em;word-spacing:.06em}
.sheet,.cv-card,.gm,.panel,.wn-card{zoom:var(--a11y-zoom,1)}

/* ---------- drawn assets (art.js): every icon is a picture, never a glyph ---------- */
.ic{display:inline-block;width:1.25em;height:1.25em;object-fit:contain;vertical-align:-0.28em;flex:none;pointer-events:none;-webkit-user-drag:none}
.ic-next{width:1.3em;height:1.3em;margin-inline-start:6px}
html[dir=ltr] .ic-next,html[dir=ltr] .ic-ui-arrow{transform:scaleX(-1)}
.round .ic,.gm-x .ic{width:26px;height:26px}
#goalArrow .ic{width:24px;height:24px;vertical-align:middle}
.clue{border:none;background:none;padding:0;width:38px;height:38px}
.clue img{width:100%;height:100%;object-fit:contain}
.clue:not(.got) img{opacity:.75}
.lbl .mk{background:none;width:24px;height:24px}
.lbl .mk img{width:24px;height:24px;object-fit:contain}
.lbl.goal .mk,.lbl.done .mk{background:none}
.log b .ic{width:22px;height:22px}
.log b .clue-img{width:24px;height:24px;object-fit:contain;vertical-align:middle}
.rw-icon img{width:96px;height:96px;object-fit:contain}
.wn-clues img{width:44px;height:44px;object-fit:contain}
.fm-play{background:none;width:96px;height:96px}.fm-play img{width:100%;height:100%;object-fit:contain}
.face-img{width:100%;height:100%;object-fit:cover;object-position:50% 12%;display:block}
.tk-face:has(.face-img),.gm-face:has(.face-img){background:var(--paper)}
.tk-face .face-img,.gm-face .face-img{margin:0}
.cv-book{background:none;box-shadow:none;border-radius:0;padding:0}
.cv-book>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 18px 24px rgba(0,0,0,.35))}
.cv-book>b,.cv-book>small{position:relative;z-index:1;color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.45);max-width:72%;text-align:center}

/* ---------- a game screen in its place: the chapter's scene, the paper beside it ---------- */
#game{background:var(--ink)}
.gm.has-scene{padding-inline:clamp(12px,2.4vw,36px)}
.gm-scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:28% 55%;z-index:0}
.gm-scrim{position:absolute;inset:0;z-index:0;pointer-events:none;
  background:linear-gradient(to bottom,rgba(16,20,34,.55),rgba(16,20,34,0) 22%),linear-gradient(to left,rgba(16,20,34,.45),rgba(16,20,34,0) 55%)}
html[dir=ltr] .gm-scrim{background:linear-gradient(to bottom,rgba(16,20,34,.55),rgba(16,20,34,0) 22%),linear-gradient(to right,rgba(16,20,34,.45),rgba(16,20,34,0) 55%)}
.gm>.gm-top,.gm>.gm-body,.gm>.gm-foot{position:relative;z-index:1}
.has-scene .gm-who{background:var(--glass);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid var(--line);border-radius:99px;padding:4px 16px 4px 4px}
html[dir=rtl] .has-scene .gm-who{padding:4px 4px 4px 16px}
.gm-whot{display:flex;flex-direction:column;min-width:0}
.gm-whot b,.gm-whot small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.has-scene .gm-x{background:var(--glass);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);display:grid;place-items:center}
.has-scene .gm-steps i{background:rgba(22,27,44,.5)}
.has-scene .gm-steps i.on{background:var(--accent2)}
.has-scene .gm-prompt{background:var(--glass);padding:4px 14px;border-radius:99px;opacity:1}
.has-scene:not(.gm-ch) .gm-body{align-items:flex-start}
.has-scene:not(.gm-ch) .gm-body>*{width:min(620px,58%)}
.has-scene .gm-opt{background:rgba(22,27,44,.78);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.has-scene .gm-foot{justify-content:flex-start}
.has-scene .gm-prize{background:var(--glass);padding:6px 14px;border-radius:99px;opacity:1;margin-inline-end:auto}
.gm-prize-img{width:28px;height:28px;object-fit:contain;vertical-align:middle}
.gm-foot{align-items:center;gap:12px}

/* the paper card of the questionnaire games: the tape is a picture, the verdict has its own row */
.gm-card{transform:none}
.gm-tape{position:absolute;top:-18px;left:50%;width:120px;height:auto;transform:translateX(-50%) rotate(-2deg);pointer-events:none}
.gm-st{margin:10px 0 0;min-height:2.4em;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:500;font-size:17px;line-height:1.3}
.gm-st:empty{visibility:hidden}
.gm-st.no{color:#9b2c1c}
.st-ic{width:34px;height:34px;object-fit:contain;flex:none}
.gm-mark{width:28px;height:28px;flex:none}
.gm-opt.right .gm-mark{background:url(assets/ui/ui-tick.webp) center/contain no-repeat}
.gm-opt.wrong .gm-mark{background:url(assets/ui/ui-cross.webp) center/contain no-repeat}
.gm-opt.wrong{text-decoration:line-through}
.gm-opts.two .gm-opt,.gm-opts.chips .gm-opt{gap:8px}
.shake{animation:none}

/* the chapter sheet: one piece of paper whose parts never move between the steps */
.gm-ch .gm-body{flex-direction:row;align-items:stretch;justify-content:flex-start;overflow:visible;padding:8px 0 calc(max(12px,env(safe-area-inset-bottom)) + 6px)}
.ch-panel{position:relative;display:flex;flex-direction:column;gap:clamp(8px,1.4vh,14px);width:clamp(340px,46vw,620px);max-height:100%;margin-block:auto;
  padding:clamp(18px,3vh,30px) clamp(18px,2.4vw,32px) clamp(14px,2.4vh,24px);border-radius:16px;color:var(--ink);
  background:var(--paper) url(assets/ui/ui-paper.webp) center/cover;box-shadow:0 18px 40px rgba(10,12,24,.42),0 2px 0 rgba(255,255,255,.6) inset}
.ch-tape{position:absolute;top:-20px;left:50%;width:132px;height:auto;transform:translateX(-50%) rotate(-2deg);pointer-events:none}
.ch-head{display:flex;align-items:center;gap:12px;min-height:40px}
.ch-tag{display:inline-grid;place-items:center;min-width:112px;height:40px;padding:0 26px;background:var(--rib) center/100% 100% no-repeat;color:#fff;font-weight:600;font-size:17px;white-space:nowrap;text-shadow:0 1px 2px rgba(80,20,10,.5)}
.ch-place{font-size:15px;font-weight:500;opacity:.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ch-main{flex:1 1 auto;min-height:0;overflow:auto;font-size:clamp(17px,1.8vw,20px);line-height:1.65;padding-inline-end:6px;
  scrollbar-width:thin;scrollbar-color:var(--accent) rgba(27,34,54,.08)}
.ch-main::-webkit-scrollbar{width:8px}.ch-main::-webkit-scrollbar-thumb{background:var(--accent);border-radius:8px}.ch-main::-webkit-scrollbar-track{background:rgba(27,34,54,.08);border-radius:8px}
.ch-main p{margin:0 0 .7em}.ch-main p:last-child{margin:0}
.ch-main .gm-q{text-align:start;font-size:clamp(22px,2.6vw,32px);line-height:1.3}
.ch-status{margin:0;min-height:3.1em;display:flex;align-items:center;gap:10px;font-size:16px;line-height:1.35;font-weight:500;flex:none}
.ch-status .st-t{display:flex;flex-wrap:wrap;column-gap:.5em;align-items:center}
.ch-status.no{color:#9b2c1c}
.st-prize{display:inline-flex;align-items:center;gap:6px;opacity:.85;font-weight:400;white-space:nowrap}
.st-clue{width:30px;height:30px;object-fit:contain}
.ch-status.ok .st-prize{opacity:1;font-weight:500}
.ch-ans{display:flex;flex-direction:column;gap:6px;flex:none}
.ch-lab{font-size:14px;opacity:.75}
.ch-row{display:flex;gap:10px}
.ch-row .gm-in{border-color:rgba(27,34,54,.25);background:#fff}
.gm-in.right{border-color:var(--accent2);border-width:3px}
.ch-foot{display:flex;gap:10px;flex-wrap:nowrap;flex:none;min-height:52px}
.ch-panel button{white-space:nowrap}
.ch-panel .ghost{color:var(--ink);border-color:rgba(27,34,54,.35)}
.ch-panel .go,.ch-panel .ghost{min-height:52px}
.gm-chk{min-width:110px}
.ch-panel[data-step=read] .ch-ans,.ch-panel[data-step=read] .gm-back,.ch-panel[data-step=read] .gm-next{display:none}
.ch-panel[data-step=ask] .gm-tor,.ch-panel[data-step=ask] .gm-next{display:none}
.ch-panel[data-step=solved] .gm-tor,.ch-panel[data-step=solved] .gm-back{display:none}
.ch-panel[data-step=solved] .gm-chk{visibility:hidden}
.ch-panel[data-step=ask] .ch-main,.ch-panel[data-step=solved] .ch-main{flex:0 1 auto}
/* the riddle's answers (Omri, 9 Nov 2026: no open questions): picked, as in choose; short ones side by side */
.ch-panel .gm-opts.ch-opts{display:grid;gap:8px;width:100%;grid-template-columns:1fr}
/* short answers in two columns, an odd last one centred under them (as in choose, Omri 9 Nov 2026) */
.ch-panel .gm-opts.ch-opts.short{grid-template-columns:repeat(2,minmax(0,1fr))}
.ch-panel .gm-opts.ch-opts.short:not(.pics) .gm-opt:last-child:nth-child(odd){grid-column:1/-1;justify-self:center;width:calc(50% - 4px)}
.gm-opts.ch-opts:not(.pics) .gm-opt{--bh:52px;font-size:clamp(16px,1.8vw,18px);padding-inline:2px}
.gm-opts.ch-opts.pics{grid-template-columns:repeat(var(--n),minmax(0,1fr)) !important}
.ch-opts.pics .gm-opt{min-height:44px;background:#fff;border:2px solid rgba(27,34,54,.2);color:var(--ink)}
.ch-opts.pics .gm-opt.right{border-color:var(--accent2);border-width:3px}
.ch-opts.pics .gm-pic{height:clamp(56px,14vh,110px)}
@media (max-width:520px) and (orientation:portrait){ .ch-panel .gm-opts.ch-opts.short:not(.pics){grid-template-columns:1fr} .ch-panel .gm-opts.ch-opts.short:not(.pics) .gm-opt:last-child:nth-child(odd){width:100%} }
@media (max-height:480px){
  .gm.has-scene{padding-top:max(6px,env(safe-area-inset-top))}
  .gm-ch .gm-top{min-height:44px}
  .gm-ch .gm-face{width:40px;height:40px}
  .ch-panel{width:clamp(320px,58vw,560px);gap:6px;padding:14px 16px 10px;border-radius:14px}
  .ch-tape{width:100px;top:-14px}
  .ch-head{min-height:32px}.ch-tag{height:32px;min-width:92px;font-size:15px;padding:0 20px}
  .ch-main{font-size:15px;line-height:1.5}.ch-main .gm-q{font-size:19px}
  .ch-status{min-height:2.8em;font-size:14px}.st-ic{width:26px;height:26px}.st-clue{width:24px;height:24px}
  .ch-lab{display:none}
  .gm-in,.gm-chk,.ch-panel .go,.ch-panel .ghost{min-height:44px}.ch-foot{min-height:44px}
  .gm-opts.ch-opts:not(.pics) .gm-opt{--bh:44px;font-size:15px}.ch-panel .gm-opts.ch-opts{gap:6px}.ch-opts.pics .gm-pic{height:clamp(40px,12vh,64px)}
  .ch-panel .go,.ch-panel .ghost{font-size:16px;padding:0 18px}
}
/* a narrow portrait screen: the scene on top, the sheet below it */
@media (max-width:700px) and (orientation:portrait){
  .gm-ch .gm-body{flex-direction:column;justify-content:flex-end}
  .ch-panel{width:100%;max-height:68%;margin-block:auto 0}
  .gm-scene{object-position:24% 30%;height:46%}
  .has-scene:not(.gm-ch) .gm-body>*{width:100%}
}

/* the ending at the gate: the gate's scene (or the solution's) behind the card, the card beside the people */
#win{background:linear-gradient(rgba(10,12,22,.2),rgba(10,12,22,.55)),var(--wnbg,none) 28% 55%/cover no-repeat,var(--ink);justify-items:start;padding-inline:clamp(16px,4vw,64px)}
@media (max-width:700px) and (orientation:portrait){ #win{justify-items:center;align-items:end} }
/* the scene slides toward the free side, so the townsperson and Yuli stay clear of the sheet at every screen ratio */
.ch-panel{width:clamp(330px,42vw,580px)}
@media (max-height:480px){ .ch-panel{width:clamp(320px,52vw,500px)} }

/* the sheet hangs from the top of the screen: a longer verdict only pushes the buttons under it down */
.ch-panel{margin-block:clamp(4px,4vh,48px) auto}
@media (max-height:480px){ .ch-panel{margin-block:2px auto} }
@media (max-width:700px) and (orientation:portrait){ .gm-ch .gm-body{justify-content:flex-start} .ch-panel{margin-block:28vh auto;max-height:calc(72vh - 70px)} }
/* the accessibility button steps to the scene's side while a sheet is open, so it never sits on the sheet's buttons */

/* ---------- the ending film and the end card ---------- */
.fm-real{width:min(100%,calc((100dvh - 96px) * 16 / 9));background:#000}
.fm-real video{width:100%;height:100%;object-fit:contain;background:#000}
#film:has(.fm-real){background:#000}
.fm-skip{position:absolute;top:max(12px,env(safe-area-inset-top));inset-inline-end:16px;color:#fff;background:rgba(0,0,0,.35);white-space:nowrap}
#endcard{position:fixed;inset:0;z-index:17;display:grid;place-items:center;background:#000;padding:16px}
#endcard.in .ec-card{animation:ecIn .45s ease-out both}
@keyframes ecIn{from{opacity:0;transform:scale(.94)}}
.ec-card{display:flex;flex-direction:column;align-items:center;gap:clamp(8px,2vh,18px);text-align:center}
.ec-logo{position:relative;width:min(56vh,420px,80vw)}
.ec-logo img{width:100%;height:auto;display:block}
.ec-name{position:absolute;left:50%;bottom:9.5%;transform:translateX(-50%);color:#fff;font-weight:700;font-size:clamp(20px,5.2vh,42px);white-space:nowrap;text-shadow:0 2px 3px rgba(90,20,10,.55)}
.ec-line{margin:0;color:#f3e9da;font-size:clamp(15px,2.6vh,22px);letter-spacing:.08em;font-weight:500}
.ec-next{white-space:nowrap}
@media (prefers-reduced-motion:reduce){#endcard.in .ec-card{animation:none}}

/* ---------- the opening book (book3d.js): its controls over the world ---------- */
.bk-ui{position:fixed;inset:0;z-index:12;pointer-events:none;opacity:0;transition:opacity .4s}
.bk-ui.on{opacity:1}
.bk-ui>*{pointer-events:auto}
.bk-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.bk-nav{position:absolute;top:50%;width:72px;height:72px;margin-top:-36px;border:none;background:none;padding:0;filter:drop-shadow(0 6px 10px rgba(0,0,0,.35))}
.bk-nav img{width:100%;height:100%;object-fit:contain}
.bk-next{left:max(12px,env(safe-area-inset-left))}
.bk-prev{right:max(12px,env(safe-area-inset-right))}.bk-prev img{transform:scaleX(-1)}
html[dir=ltr] .bk-next{left:auto;right:12px}html[dir=ltr] .bk-next img{transform:scaleX(-1)}html[dir=ltr] .bk-prev{right:auto;left:12px}html[dir=ltr] .bk-prev img{transform:none}
.bk-go{position:absolute;left:50%;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 6px);transform:translateX(-50%);min-width:280px;height:80px;padding:0 64px 6px 30px;border:none;
  background:center/100% 100% no-repeat;color:#fff;font-size:22px;font-weight:600;white-space:nowrap;text-shadow:0 2px 2px rgba(0,40,20,.45);filter:drop-shadow(0 8px 12px rgba(0,0,0,.35));animation:up2 .3s}
html[dir=rtl] .bk-go,html[dir=ltr] .bk-go{padding:0 72px 6px 30px}
.bk-skip{position:absolute;top:max(12px,env(safe-area-inset-top));inset-inline-end:16px;color:#fff;background:rgba(22,27,44,.55);white-space:nowrap;min-height:44px;font-size:15px}
@media (max-height:480px){ .bk-nav{width:56px;height:56px;margin-top:-28px} .bk-go{height:62px;font-size:18px;min-width:230px} }

/* the footer of a questionnaire game keeps its place for "next" from the start: nothing moves when it appears */
.gm-foot{flex-wrap:nowrap}.gm-foot .gm-prize{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gm-next{animation:none}
/* a narrow portrait screen: the page fills the width, so the arrows step below it, beside the button */
@media (max-aspect-ratio:1/1.15){ .bk-nav{top:auto;margin-top:0;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 8px);width:60px;height:60px} .bk-go{min-width:200px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 76px)} }

/* ---------- a chapter's game between reading and the riddle (playgames.js) ---------- */
.ch-play{display:none}
.ch-panel[data-step=play]{width:min(96vw,1040px)}
.ch-panel[data-step=play] .ch-main,.ch-panel[data-step=play] .ch-ans,.ch-panel[data-step=play] .gm-next,.ch-panel[data-step=play] .gm-top2{display:none}
.ch-panel[data-step=play] .ch-play{display:flex;flex:1 1 auto;min-height:0}
.ch-panel[data-step=play]:not(.played) .gm-tor{visibility:hidden}
.ch-panel[data-step=read] .gm-top2{display:inline-flex}
.ch-panel:has(.gm-top2)[data-step=read]:not(.played) .gm-tor{display:none}
.ch-panel[data-step=read].played .gm-top2{display:none}
.ch-panel[data-step=ask] .gm-top2,.ch-panel[data-step=solved] .gm-top2{display:none}
.gm-top2{white-space:nowrap}
.pg{display:flex;flex-direction:column;gap:clamp(6px,1.4vh,12px);height:100%}
.pg-how{margin:0;font-weight:600;font-size:clamp(15px,2.2vh,19px);color:#3b2a3a}
.pg-card{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;height:100%;padding:6px 6px 8px;border:2px solid #e7d8c0;border-radius:14px;
  background:#fffaf1;box-shadow:0 2px 0 #d9c6a6;font:inherit;font-size:clamp(12px,1.75vh,15px);line-height:1.25;color:#2b1d2a;cursor:grab;touch-action:none;
  transition:box-shadow .15s,border-color .15s,opacity .25s;min-height:44px;text-align:center}
.pg-card img{width:auto;height:clamp(34px,7vh,64px);object-fit:contain;pointer-events:none}
.pg-card span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.pg-card.picked{border-color:#f2a63b;box-shadow:0 0 0 3px #f2a63b}
.pg-card.drag{position:relative;z-index:5;cursor:grabbing;box-shadow:0 10px 18px rgba(40,20,30,.3);transition:none}
.pg-card.refused{border-color:#d9534f;border-style:dashed}
.pg-card:disabled{cursor:default}
/* the line */
.ln-row{display:grid;align-items:center;gap:4px}   /* columns: set by playgames.js (an end, the spots with a link between each two, an end) */
.ln-end{font-weight:700;font-size:clamp(12px,1.7vh,15px);color:#7a4a3a;writing-mode:horizontal-tb;white-space:nowrap;padding:4px 6px;border-radius:8px;background:#f6e6c8}
.ln-spot{position:relative;height:clamp(96px,19vh,150px);border:2px dashed #cdb48e;border-radius:14px;background:rgba(255,255,255,.55);padding:0;font:inherit;min-width:0}
.ln-spot>b{position:absolute;inset:0;display:grid;place-items:center;font-size:22px;color:#cdb48e}
.ln-spot.full{border-style:solid;border-color:transparent;background:none}
.ln-spot.full>b{visibility:hidden}
.ln-spot>.pg-card{position:absolute;inset:0}
.choosing .ln-spot,.choosing .ns-bin{outline:3px solid rgba(242,166,59,.55);outline-offset:2px}
.ln-spot.over,.ns-bin.over{outline:3px solid #f2a63b}
.ln-link{width:28px;height:28px;border-radius:50%;background:#e9dccb;display:grid;place-items:center}
.ln-link .ic{width:20px;height:20px;display:none}
.ln-link.ok{background:#fbe3a6}.ln-link.ok .ln-ok{display:block}
.ln-link.no{background:#f8d0c8}.ln-link.no .ln-no{display:block}
.ln-tray{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:8px;padding-inline:clamp(40px,5vw,64px)}
.ln-home{height:clamp(96px,19vh,150px);border-radius:14px;background:rgba(120,90,60,.07)}
/* the nest */
.ns-wrap{display:flex;gap:clamp(8px,1.6vw,18px);flex:1 1 auto;min-height:0}
.ns-floor{flex:1 1 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px;min-height:0}
.ns-home{min-height:0;border-radius:14px;background:rgba(120,90,60,.07)}
.ns-card.gone{opacity:0;visibility:hidden}
.ns-bins{flex:0 0 clamp(130px,19vw,200px);display:flex;flex-direction:column;gap:8px}
.ns-bin{position:relative;flex:1 1 0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:2px solid #e7d8c0;border-radius:16px;background:#fff6e6;font:inherit;padding:6px}
.ns-bin>img{height:clamp(44px,10vh,92px);width:auto;object-fit:contain}
.ns-lab{font-weight:700;font-size:clamp(12px,1.7vh,15px);color:#3b2a3a}
.ns-count{position:absolute;top:6px;inset-inline-start:8px;font-size:13px;font-weight:700;color:#7a4a3a}
.ns-in{position:absolute;inset:8px 18% auto;height:40%;pointer-events:none}
.ns-in img{position:absolute;width:30%;top:calc(var(--i) * 4%);left:calc(5% + var(--i) * 20%);animation:nsIn .35s ease-out both}
@keyframes nsIn{from{opacity:0;transform:scale(.6)}}
@media (max-height:480px){
  .ch-panel[data-step=play] .ch-head{display:none}
  .ln-spot,.ln-home{height:clamp(80px,24vh,110px)} .pg-card img{height:clamp(26px,8vh,44px)} .pg-card{font-size:12px;padding:4px}
}
@media (prefers-reduced-motion:reduce){ .ns-in img{animation:none} }
.ch-panel[data-step=play]{height:min(calc(100dvh - 120px),660px);max-height:none}
.pg-card{white-space:normal;overflow:hidden}
.pg-card span{width:100%;overflow-wrap:anywhere}
.ns-floor{grid-template-rows:repeat(2,minmax(0,1fr))}
@media (max-height:480px){ .ch-panel[data-step=play]{height:calc(100dvh - 64px)} }
.gm .pg-card,.gm .pg-card span{white-space:normal}
.gm .pg-card{font-size:clamp(13px,1.9vh,17px)}
.ln-spot,.ln-home{height:clamp(110px,24vh,190px)}
.pg-card img{height:clamp(40px,9vh,84px)}
@media (max-height:480px){ .ln-spot,.ln-home{height:clamp(84px,27vh,112px)} .pg-card img{height:clamp(26px,8vh,40px)} .gm .pg-card{font-size:12px} }
@media (max-height:480px){
  .ln-spot,.ln-home{height:clamp(66px,21vh,90px)} .pg-card img{height:clamp(22px,7vh,32px)} .gm .pg-card{font-size:11.5px;gap:2px;padding:3px}
  .pg{gap:4px} .pg-how{font-size:13px} .ln-tray{gap:6px}
}
.gm .pg-card span{-webkit-line-clamp:4}@media (max-height:480px){.gm .pg-card{line-height:1.15}}
@media (max-height:380px){ .ln-spot,.ln-home{height:24vh} .pg-card img{height:18px} .gm .pg-card{font-size:11px;line-height:1.12;padding:2px 3px} .pg-how{font-size:12px} }
.pg-how{white-space:normal}
@media (max-width:700px) and (orientation:portrait){
  .ch-panel[data-step=play]{margin-block:8px auto;height:calc(100dvh - 86px);max-height:none}
  .ln-row{--lk:18px;gap:2px}
  .ln-end{writing-mode:vertical-rl;padding:6px 2px;font-size:11px}
  .ln-link{width:18px;height:18px}.ln-link .ic{width:14px;height:14px}
  .ln-spot{height:168px}
  .ln-tray{grid-template-columns:repeat(2,minmax(0,1fr));padding-inline:0}
  .ln-home{height:120px}
  .gm .pg-card{font-size:12px;line-height:1.2;padding:4px}
  .pg-card img{height:40px}
  .ns-wrap{flex-direction:column}
  .ns-floor{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}
  .ns-bins{flex:0 0 112px;flex-direction:row}
  .ns-bin>img{height:52px}
}
@media (max-width:700px) and (orientation:portrait){
  .ch-panel[data-step=play]{height:calc(100dvh - 150px)}
  .ln-row{grid-template-columns:1fr !important;justify-items:stretch;gap:3px}
  .ln-end{writing-mode:horizontal-tb;justify-self:center;padding:2px 10px}
  .ln-link{justify-self:center}
  .ln-spot{height:62px}
  .ln-home{height:62px}
  .ln-row .pg-card,.ln-tray .pg-card{flex-direction:row;justify-content:flex-start;text-align:start;gap:8px;padding:4px 8px}
  .ln-row .pg-card img,.ln-tray .pg-card img{height:40px;flex:0 0 auto}
  .ln-row .pg-card span,.ln-tray .pg-card span{-webkit-line-clamp:3}
}
@media (max-width:700px) and (orientation:portrait){
  .ch-panel[data-step=play] .ch-head{display:none}
  .ln-spot,.ln-home{height:54px}
  .ln-row .pg-card img,.ln-tray .pg-card img{height:34px}
  .pg-how{font-size:15px}
}
.ch-play.pg{display:none}.ch-panel[data-step=play] .ch-play.pg{display:flex}
.ch-panel[data-step=play]{width:min(calc(100vw - 112px),1040px)} @media (max-width:700px) and (orientation:portrait){ .ch-panel[data-step=play]{width:auto} }
@media (max-width:700px) and (orientation:portrait){ .ch-panel[data-step=play]{height:calc(100dvh - 200px)} .ln-spot,.ln-home{height:50px} }
@media (max-width:700px) and (orientation:portrait){ .ns-floor .pg-card{flex-direction:row;justify-content:flex-start;text-align:start;gap:6px;padding:4px 6px} .ns-floor .pg-card img{height:30px;flex:0 0 auto} .ns-floor .pg-card span{-webkit-line-clamp:4} .ns-bins{flex-basis:96px} .ns-bin>img{height:44px} }
/* ===== Wanda's slot (NIC-1492) =====
   When this child's school has her on, wanda.js puts her head in the first visible .wanda-slot: in the HUD row next to
   the menu button, or in a game sheet's top row next to its close button. One more round icon button, the menu button's
   size, border and shadow, the row's own gap, mirrored by the page's direction. Empty otherwise, and then it takes no
   room: every screen is exactly as without her. */
.wanda-slot{flex:none;width:48px;height:48px;box-sizing:border-box;border-radius:50%;border:1px solid var(--line);overflow:hidden;box-shadow:0 8px 28px rgba(10,12,24,.25)}
.wanda-slot:empty{display:none}
.gm-steps:empty+.wanda-slot+.gm-x{margin-inline-start:auto}
.gm-steps:empty+.wanda-slot:not(:empty){margin-inline-start:auto}
.gm-top .wanda-slot:not(:empty)+.gm-x{margin-inline-start:0}
/* on a phone, with her in the HUD row, the clue tags take a smaller size so the row keeps its gap */
@media (max-width:440px){ .hud-top:has(.wanda-slot:not(:empty)) .clue{width:30px;height:30px} .hud-top:has(.wanda-slot:not(:empty)) #clues{gap:4px;padding:6px 8px} }


/* a choose question with a picture per option (def.pics): the pictures in one row, the words under each */
.gm-opts.pics{grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:8px}
.gm-opts.pics .gm-opt{flex-direction:column;justify-content:flex-start;align-items:stretch;gap:6px;padding:8px;min-height:0;text-align:center}
.gm-opts.pics .gm-pic{display:block;width:100%;height:clamp(64px,19vh,150px);object-fit:contain;background:#fff;border-radius:10px}
.gm-opts.pics .gm-t{font-size:16px;line-height:1.25}
.gm-opts.pics .gm-k{position:absolute;top:4px;inset-inline-start:4px;width:24px;height:24px;font-size:13px;background:rgba(22,27,44,.7);color:#fff}
.gm-opts.pics .gm-mark{position:absolute;top:4px;inset-inline-end:4px}
.gm-opts.pics .gm-opt.wrong{text-decoration:none}
.gm-opts.pics .gm-opt.wrong .gm-t{text-decoration:line-through}
@media (max-width:520px) and (orientation:portrait){ .gm-opts.pics{grid-template-columns:repeat(2,minmax(0,1fr)) !important} }
@media (max-height:480px){ .gm-opts.pics .gm-pic{height:clamp(56px,17vh,90px)} .gm-opts.pics .gm-t{font-size:14px} .gm-opts.pics .gm-opt{padding:6px} }
@media (max-height:480px){ .gm-qcard .gm-tape{display:none !important} }

/* ---------- the footer: the clue and "next" share one centred spot (Omri, 5 Nov 2026) ---------- */
.gm-foot{display:grid;justify-items:center;align-items:center}
.gm-foot>*{grid-area:1/1}
.has-scene .gm-prize{margin-inline-end:0}
.gm-q-story .gm-foot{display:none}

/* ---------- a place's after-game (games.js story, pack): paper confetti at the end ---------- */
.cf{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:4}
.cf i{position:absolute;top:-14px;left:var(--x);width:8px;height:13px;border-radius:2px;opacity:.85;transform:rotate(var(--r));animation:cf 2s var(--d) cubic-bezier(.3,.1,.6,1) forwards}
@keyframes cf{to{transform:translate(var(--dx),calc(100vh + 30px)) rotate(calc(var(--r) + 420deg))}}
.st-title{margin:0;font-size:clamp(20px,3.4vh,30px);font-weight:500;line-height:1.2}
.st-how{margin:4px 0 0;font-size:clamp(14px,2.2vh,17px);opacity:.8}

/* story: numbered spots on the paper, the shuffled parts below; a card is its line over its picture */
.st-card,.pk-card{width:min(900px,100%);text-align:center;min-height:0}
.gm-q-story,.gm-q-pack{--sth:clamp(112px,24vh,200px)}
.st-slots{list-style:none;margin:12px 0 0;padding:0;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:clamp(8px,1.4vw,14px)}
.st-slot{position:relative;height:var(--sth);border:2px dashed rgba(27,34,54,.28);border-radius:12px;background:rgba(27,34,54,.04);display:grid;place-items:center}
.st-slot.over{border-color:var(--accent);background:rgba(255,90,54,.08)}
.st-n{position:absolute;top:-11px;inset-inline-start:-9px;z-index:3;width:28px;height:28px;border-radius:50%;background:var(--ink);color:var(--paper);display:grid;place-items:center;font-size:15px;font-weight:500}
.st-slot>.st-it{position:absolute;inset:0}
.st-tray{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:clamp(8px,1.4vw,14px);width:min(900px,100%)}
.st-cell{position:relative;height:var(--sth);border:2px dashed rgba(255,255,255,.18);border-radius:12px}
.st-cell.over{border-color:var(--accent2)}
.st-it{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 8px 6px;border-radius:12px;background:#fff;color:var(--ink);border:2px solid rgba(27,34,54,.14);box-shadow:0 4px 0 rgba(0,0,0,.16);touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.st-s{font-size:clamp(14px,2.2vh,18px);font-weight:500;line-height:1.3}
.st-it img{flex:1;min-height:0;width:100%;object-fit:contain;pointer-events:none}
.st-it.picked,.pk-it.picked{outline:3px solid var(--accent2);outline-offset:2px}
.st-it.drag,.pk-it.drag{z-index:9;cursor:grabbing;box-shadow:0 12px 24px rgba(0,0,0,.3)}
.st-it:disabled{opacity:1}
.st-slot.lock .st-it{border-color:var(--accent2);animation:stLock .35s ease-out}
@keyframes stLock{40%{transform:scale(1.07)}100%{transform:none}}
.st-shake{animation:stShake .4s}
@keyframes stShake{20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
.st-av{gap:10px}
.st-face{width:36px;height:36px;border-width:2px}

/* pack: the bag in the middle, the things around it */
.pk-floor{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:clamp(8px,2vw,24px);margin-top:10px}
.pk-side{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:clamp(6px,1.2vw,14px)}
.pk-it{--s:clamp(72px,15vh,124px);width:var(--s);display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px;background:none;border:0;border-radius:12px;color:var(--ink);touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;
  transition:translate .35s ease,scale .45s ease-in,opacity .3s .2s}
.pk-it:nth-child(odd) img{rotate:-4deg}.pk-it:nth-child(even) img{rotate:3deg}
.pk-it.big{--s:clamp(96px,21vh,168px)}
.pk-it img{width:100%;aspect-ratio:1;object-fit:contain;mix-blend-mode:multiply;pointer-events:none}
.pk-it span{font-size:clamp(13px,2vh,16px);font-weight:500}
.pk-it.drag{transition:none}
.pk-it.in{scale:.2;opacity:0;pointer-events:none;transition:translate .45s ease-in,scale .45s ease-in,opacity .25s .25s}
.pk-it.nope{animation:pkNope .45s}
@keyframes pkNope{25%{transform:rotate(-7deg)}75%{transform:rotate(7deg)}}
.pk-bag{position:relative;width:clamp(124px,32vh,240px);aspect-ratio:1;display:grid;border-radius:50%}
.pk-bag img{grid-area:1/1;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply;transition:opacity .2s;pointer-events:none}
.pk-shut,.pk-bag.shut .pk-open{opacity:0}
.pk-bag.shut .pk-shut{opacity:1}
.pk-bag.over{outline:3px dashed var(--accent);outline-offset:4px}
.pk-bag.gulp{animation:pkGulp .3s}
.pk-bag.shut{animation:pkHop .6s ease-out}
@keyframes pkGulp{50%{transform:scale(1.06)}}
@keyframes pkHop{30%{transform:translateY(-16px) scale(1.04)}60%{transform:translateY(0) scale(.97)}80%{transform:translateY(-5px)}}
.pk-count{position:absolute;bottom:-6px;left:50%;translate:-50% 0;background:var(--ink);color:var(--paper);padding:2px 14px;border-radius:99px;font-size:16px;font-weight:500}
@media (max-height:480px){
  .gm-q-story,.gm-q-pack{--sth:92px}
  .st-card .gm-tape,.pk-card .gm-tape{display:none}
  .st-card,.pk-card{padding:8px 14px}
  .st-title{font-size:18px}.st-how{font-size:13px;margin-top:2px}
  .st-s{font-size:13px}.st-it{padding:5px 6px 4px;gap:2px}
  .st-slots{margin-top:8px}
  .gm-q-story .gm-st,.gm-q-pack .gm-st{margin-top:4px;min-height:1.8em;font-size:15px}
  .pk-floor{margin-top:4px}
  .pk-it{--s:clamp(70px,19vh,96px)}.pk-it.big{--s:clamp(88px,25vh,120px)}
  .pk-it span{font-size:13px;line-height:1.15}
  .pk-bag{width:clamp(100px,30vh,140px)}
}
@media (prefers-reduced-motion:reduce){ .st-shake,.pk-it.nope,.pk-bag.shut,.pk-bag.gulp,.st-slot.lock .st-it{animation:none} }

/* the question sits in the middle of its card: an empty row above it as tall as the verdict row below it (Omri, 5 Nov 2026) */
.gm-scard::before,.gm-qcard::before{content:"";display:block;flex:none;font-size:17px;min-height:calc(2.4em + 10px)}
.st-tray{padding-inline:clamp(18px,3vw,34px)}
@media (max-height:480px){ .st-tray{padding-inline:14px} }

/* every question centred in its card, on every screen, in every chapter and episode (Omri, 5 Nov 2026); the
 * accessibility menu's "align to the start" still wins (html.a11y-align) */
.gm-q,.ch-main .gm-q{text-align:center;margin-inline:auto;max-width:100%}
/* the clue at the bottom: its picture and its words one unit, centred on the whole screen's width */
.gm-foot{width:100%;justify-self:stretch}
.gm-foot .gm-prize{display:inline-flex;align-items:center;justify-content:center;gap:8px;max-width:100%;text-align:center}
.gm-foot .gm-prize .gm-prize-img{flex:none}

/* ---------- hide: a room from the kit's pictures (the sofa on the left, the box, the cabinet on the right) ---------- */
.hd-card,.pl-card{width:min(900px,100%);text-align:center;min-height:0}
.hd-do{margin:4px 0 0;font-size:clamp(14px,2.2vh,17px);font-weight:500}
.hd-room{position:relative;width:min(760px,100%,calc((100dvh - 330px) * 2.3));aspect-ratio:2.3/1;margin:10px auto 0;border-radius:12px;overflow:hidden;
  box-shadow:inset 0 0 0 2px rgba(27,34,54,.12)}
.hd-wall{position:absolute;inset:0 0 30% 0;background:repeating-linear-gradient(90deg,#fbe9d0 0 28px,#f7e0c2 28px 56px)}
.hd-floor{position:absolute;inset:70% 0 0 0;background:linear-gradient(#d9a46a,#c98f55);box-shadow:inset 0 3px 0 rgba(0,0,0,.08)}
.hd-room img{position:absolute;display:block;height:auto;pointer-events:none;user-select:none;-webkit-user-select:none}
.hd-frame{left:45%;top:7%;width:11%}
.hd-plant{right:1%;bottom:22%;width:11%}
.hd-bowl{left:31%;bottom:3%;width:9%;z-index:3}
.hd-books{right:20%;bottom:54%;width:9%;z-index:2}
.hd-spot{position:absolute;padding:0;border:0;background:none;cursor:pointer;z-index:2;border-radius:12px;min-width:44px;min-height:44px}
.hd-spot img,.hd-spot .hd-cabin{position:relative;width:100%;display:block}
.hd-spot:focus-visible{outline:3px solid var(--accent2);outline-offset:3px}
.hd-sofa{left:2%;bottom:13%;width:34%}
.hd-box{left:41%;bottom:11%;width:20%}
.hd-cab{right:14%;bottom:13%;width:23%}
.hd-spot:hover:not(:disabled){filter:brightness(1.05)}
.hd-sofa.look{animation:hdSquash .5s}
.hd-box.look{animation:hdHop .5s}
.hd-cab.look{animation:hdRattle .4s}
@keyframes hdSquash{30%{transform:scale(1.04,.95)}60%{transform:scale(.98,1.03)}}
@keyframes hdHop{35%{transform:translateY(-10%) rotate(-3deg)}70%{transform:translateY(0) rotate(2deg)}}
@keyframes hdRattle{20%,60%{transform:translateX(-2%)}40%,80%{transform:translateX(2%)}}
/* the wool: behind the sofa until the sofa is searched, then it rolls out onto the floor */
.hd-yarn{left:20%;bottom:13%;width:11%;z-index:1;opacity:0;transition:transform .8s cubic-bezier(.3,.8,.4,1),opacity .2s}
.got-yarn .hd-yarn{opacity:1;z-index:3;transform:translate(95%,55%) rotate(300deg)}
/* the cat: peeks out of the open cabinet, then jumps down in front of it, grumpy */
.hd-cat{right:2%;bottom:3%;width:16%;z-index:4;opacity:0;transform:translate(-62%,-60%) scale(.45);transition:transform .6s cubic-bezier(.3,1.4,.5,1),opacity .25s}
.found .hd-cat{opacity:1}
.out .hd-cat{transform:none;animation:hdHuff 1.6s .7s ease-in-out infinite}
@keyframes hdHuff{0%,100%{rotate:0deg}20%{rotate:-2.5deg}40%{rotate:2deg}55%{rotate:0deg}}

/* ---------- plaster: the arm on the table, the cat peeking over the far edge, the plasters below ---------- */
.pl-stage{position:relative;width:min(640px,100%,calc((100dvh - 340px) * 1.5));aspect-ratio:1.5/1;margin:8px auto 0}
.pl-table{position:absolute;left:0;right:0;top:27%;bottom:0;border-radius:18px;background:linear-gradient(#f0cf9f,#e2b57f);box-shadow:inset 0 4px 0 rgba(255,255,255,.35),0 6px 0 rgba(0,0,0,.12);z-index:1}
.pl-cat{position:absolute;left:8%;top:4%;width:34%;z-index:2}
.pl-catimg{position:relative;width:100%;display:block;z-index:2;pointer-events:none}
.pl-tail{position:absolute;left:-30%;top:-14%;width:34%;z-index:0;transform-origin:85% 95%;animation:plTail 2.8s ease-in-out infinite alternate;pointer-events:none}
.pl-cat{z-index:0}.pl-table{z-index:1}.pl-cat .pl-catimg{z-index:2}
@keyframes plTail{from{rotate:-9deg}to{rotate:9deg}}
.pl-arm{position:absolute;left:5%;width:90%;top:32%;z-index:3}
.pl-armimg{width:100%;display:block;pointer-events:none;user-select:none}
.pl-spot{display:none}
.pl-on{position:absolute;transform-origin:0 0;z-index:2;pointer-events:none;transition:transform .5s cubic-bezier(.2,.8,.3,1.12);filter:drop-shadow(0 2px 1px rgba(0,0,0,.18))}
.pl-count{bottom:auto;top:2%;left:auto;right:2%;translate:none;z-index:4}
.pl-tray{display:flex;justify-content:center;align-items:center;gap:clamp(12px,3vw,40px);width:min(900px,100%)}
.pl-cell{min-height:56px;display:grid;place-items:center}
.pl-it{padding:6px;min-height:48px;border:0;border-radius:14px;background:rgba(255,255,255,.08);touch-action:none;cursor:grab;transition:translate .35s ease}
.pl-it img{width:100%;display:block;margin-inline:auto;pointer-events:none;user-select:none}
.pl-it.drag{transition:none;z-index:9;position:relative}
.pl-it.picked{outline:3px solid var(--accent2);outline-offset:2px}
.pl-it.used{visibility:hidden}
.pl-it.nope{animation:pkNope .45s}
@media (max-height:480px){
  .hd-card .gm-tape,.pl-card .gm-tape{display:none}
  .hd-card,.pl-card{padding:8px 14px}
  .hd-do{font-size:13px;margin-top:2px}
  .hd-room{width:min(760px,100%,calc((100dvh - 236px) * 2.3));margin-top:6px}
  .pl-stage{width:min(640px,100%,calc((100dvh - 250px) * 1.5));margin-top:4px}
  .gm-q-hide .gm-st,.gm-q-plaster .gm-st{margin-top:4px;min-height:1.8em;font-size:15px}
}
@media (prefers-reduced-motion:reduce){ .pl-tail,.out .hd-cat,.hd-spot.look{animation:none} }

/* the after-games' title never under the tape (Omri, 5 Nov 2026): room above it for the tape */
.st-card,.pk-card,.hd-card,.pl-card{padding-top:clamp(30px,5vh,42px)}
.st-card .st-how,.pk-card .st-how,.hd-card .st-how,.pl-card .st-how{max-width:60ch;margin-inline:auto;line-height:1.45}
/* pack: the bag in the middle, the biggest thing; three things on each side, evenly spaced, never at the edge;
 * the counter under the bag */
.pk-floor{grid-template-columns:1fr auto 1fr;padding-inline:clamp(4px,2vw,24px)}
.pk-side{display:grid;grid-template-rows:repeat(3,auto);justify-items:center;gap:clamp(6px,1.6vh,16px)}
.pk-mid{display:flex;flex-direction:column;align-items:center;gap:8px}
.pk-count{position:static;translate:none}
.pk-bag{width:clamp(150px,36vh,300px)}
.pk-it{--s:clamp(64px,12vh,110px)}.pk-it.big{--s:clamp(64px,12vh,110px)}
.pk-it img{transform:none}
@media (max-height:600px){
  .pk-side{grid-template-rows:none;grid-template-columns:repeat(3,auto);gap:clamp(6px,1.4vw,14px)}
  .pk-bag{width:clamp(110px,34vh,180px)}
  .pk-it,.pk-it.big{--s:clamp(58px,17vh,84px)}
}
@media (max-height:480px){ .st-card,.pk-card,.hd-card,.pl-card{padding-top:10px} }

/* a tall card scrolls instead of losing its top */
.gm-body{justify-content:safe center}
.pl-stage{width:min(560px,100%,calc((100dvh - 430px) * 1.5))}
/* a phone held sideways: the words beside the scene, so the scene is as big as the screen allows */
@media (max-height:480px){
  .hd-card,.pl-card{display:grid;grid-template-columns:minmax(150px,1fr) auto;column-gap:14px;align-items:center;align-content:center;text-align:center}
  .hd-card>:not(.hd-room):not(.gm-tape),.pl-card>:not(.pl-stage):not(.gm-tape){grid-column:1}
  .hd-room{grid-column:2;grid-row:1/span 4;width:min(560px,calc((100dvh - 150px) * 2.3),calc(100vw - 260px));margin:0}
  .pl-stage{grid-column:2;grid-row:1/span 4;width:min(420px,calc((100dvh - 200px) * 1.5),calc(100vw - 260px));margin:0}
  .pl-tray{min-height:0}.pl-cell{min-height:44px}
  .pk-bag{width:clamp(96px,27vh,140px)}
  .pk-it,.pk-it.big{--s:clamp(54px,15vh,74px)}
  .pk-card .st-how{font-size:12.5px}
}

/* ---------- the accessibility button: the top-right corner, the farm's round blue icon (Omri, 5 Nov 2026) ---------- */
#a11ybtn{top:max(8px,env(safe-area-inset-top));bottom:auto;right:8px;width:60px;height:48px;padding:0;border:none;border-radius:0;
  background:url(assets/ui/a11y.png) center/contain no-repeat;-webkit-backdrop-filter:none;backdrop-filter:none;filter:drop-shadow(0 3px 4px rgba(0,0,0,.25))}
#a11ybtn svg{display:none}
#a11ybtn:active{transform:scale(.94)}
#a11ypanel{top:calc(max(8px,env(safe-area-inset-top)) + 56px);bottom:auto;right:12px;max-height:min(74vh,calc(100dvh - 80px))}
/* the menu and everything else on the top row keep clear of it */
.hud-top{padding-right:62px}
.gm-top{padding-right:62px}

/* the start card stands alone: no book picture beside it (Omri, 5 Nov 2026) */
#cover .cv-book{display:none}

/* ---------- the speed boost (powerups.js): a bolt and a gauge that drains as she runs ---------- */
#boost{position:absolute;top:calc(max(10px,env(safe-area-inset-top)) + 110px);inset-inline-end:12px;display:flex;align-items:center;gap:8px;padding:6px 12px;border-radius:99px;pointer-events:none}
#boost[hidden]{display:none}
#boost svg{width:24px;height:24px;flex:none}
#boost i{display:block;width:96px;height:10px;border-radius:99px;background:rgba(255,255,255,.18);overflow:hidden;position:relative}
#boost i::after{content:"";position:absolute;inset:0;transform-origin:right;transform:scaleX(var(--b,0));background:linear-gradient(90deg,#ffe27a,#ff9d00);border-radius:inherit}
#boost.got{animation:boostGot .5s ease-out}
@keyframes boostGot{0%{transform:scale(1.35)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){ #boost.got{animation:none} }

/* the cat's room laid out like a real room (Omri, 6 Nov 2026): one floor line (bottom 12%) for the sofa, the box and
 * the cabinet, each with a soft contact shadow; the picture hung over the sofa; the books and the plant standing on the
 * cabinet's top (its top edge is at 47% from the bottom); the bowl and the wool on the floor in front. The cabinet opens
 * by swapping to the open picture, matched to the closed one's height so the things on top do not move. */
.hd-room .hd-frame{left:11%;top:8%;width:14%;rotate:-1.5deg;filter:drop-shadow(2px 4px 3px rgba(80,45,15,.28))}
.hd-room .hd-sofa{left:2%;bottom:12%;width:33%}
.hd-room .hd-box{left:38%;bottom:10.4%;width:15%}
.hd-room .hd-cab{left:auto;right:7.5%;bottom:12%;width:20%;z-index:2}
.hd-spot::before{content:"";position:absolute;left:4%;right:4%;bottom:-3%;height:9%;border-radius:50%;background:radial-gradient(closest-side,rgba(70,35,10,.18),rgba(70,35,10,0));pointer-events:none}
.hd-box::before{bottom:2%}
.hd-room .hd-books{left:74%;right:auto;bottom:45.7%;width:8%;z-index:3;filter:drop-shadow(0 2px 1.5px rgba(70,35,10,.35))}
.hd-room .hd-plant{left:84.5%;right:auto;bottom:46.1%;width:5.6%;z-index:3;filter:drop-shadow(0 2px 1.5px rgba(70,35,10,.3))}
.hd-room .hd-bowl{left:74.5%;bottom:1.5%;width:7%;z-index:3;filter:drop-shadow(0 3px 2px rgba(70,35,10,.3))}
.hd-room .hd-yarn{left:20%;bottom:13%;width:9%}
.hd-room.got-yarn .hd-yarn{transform:translate(72%,62%) rotate(300deg)}
.hd-cabin{position:relative}
.hd-room .hd-cabopen{position:absolute;left:50%;bottom:0.7%;height:98.6%;width:auto;max-width:none;translate:-50% 0;opacity:0;transition:opacity .18s}
.found .hd-cabopen{opacity:1}
.found .hd-cabimg{opacity:0;transition:opacity .18s}
/* the cat: on the open cabinet's lower shelf, then down on the floor between the box and the cabinet's open door */
.hd-room .hd-cat{left:54%;right:auto;bottom:5%;width:12.5%;transform-origin:50% 100%;transform:translate(178%,-50%) scale(.31);filter:drop-shadow(0 3px 2px rgba(70,35,10,.3))}
.hd-room.out .hd-cat{transform:none}

/* the reading hint: a paper card in the middle of the game, an open book with a magnifier, one green button */
.gm-hint{position:absolute;inset:0;z-index:30;display:grid;place-items:center;padding:16px;background:rgba(14,18,32,.45);animation:gmHintIn .28s ease-out}
.gm-hint.off{opacity:0;transition:opacity .2s}
.gm-hcard{width:min(420px,100%);background:var(--paper);color:var(--ink);border-radius:16px;padding:22px 22px 20px;text-align:center;box-shadow:0 16px 36px rgba(0,0,0,.35);animation:gmHintUp .34s cubic-bezier(.3,1.3,.5,1)}
.gm-hic{width:112px;height:auto;display:block;margin:0 auto 6px;filter:drop-shadow(0 4px 4px rgba(60,30,10,.18))}
.gm-hcard h2{margin:0 0 8px;font-size:clamp(20px,3.2vh,26px)}
.gm-hcard p{margin:0 0 16px;font-size:clamp(15px,2.3vh,18px);line-height:1.5}
.gm-hgo{min-height:48px;padding:10px 24px;border-radius:999px;font-size:17px;font-weight:700}
@keyframes gmHintIn{from{opacity:0}}
@keyframes gmHintUp{from{transform:translateY(14px) scale(.96);opacity:0}}
@media (max-height:480px){ .gm-hcard{padding:14px 18px 14px} .gm-hic{width:72px;margin-bottom:2px} .gm-hcard p{margin-bottom:10px} }
@media (prefers-reduced-motion:reduce){ .gm-hint,.gm-hcard{animation:none} }

/* the four answers of a question in two columns of two (Omri, 6 Nov 2026) */
.gm-q-choose .gm-opts:not(.pics){grid-template-columns:repeat(2,minmax(0,1fr))}
/* the book's last button: its words in the middle of the plate; a small lift on hover like the other buttons */
html[dir=rtl] .bk-go,html[dir=ltr] .bk-go{padding:0 72px 6px}
.bk-go{transition:transform .18s ease,filter .18s ease}
.bk-go:hover{transform:translateX(-50%) translateY(-3px);filter:drop-shadow(0 11px 14px rgba(0,0,0,.38))}
.bk-go:active{transform:translateX(-50%) translateY(1px)}
/* the bag, when a thing is carried over it: a soft white glow along its outline instead of the dashed ring */
.pk-bag.over{outline:none}
.pk-bag{transition:transform .18s ease}
.pk-bag.over{transform:scale(1.04)}
.pk-bag.over img{filter:drop-shadow(0 0 3px #fff) drop-shadow(0 0 7px rgba(255,255,255,.95)) drop-shadow(0 0 12px rgba(255,255,255,.7))}
/* "what came first": the question in line with the numbers, clear of the tape; the tape never cut at the top */
.gm-q-order .gm-body,.gm-q-plaster .gm-body,.gm-q-pack .gm-body,.gm-q-hide .gm-body,.gm-q-story .gm-body{padding-top:24px}
.gm-ocard .gm-prompt{text-align:start;padding-inline-start:16px;margin:10px 0 8px}
/* Yuli's sleeve fades into the table instead of ending on a hard edge */
.pl-armimg{-webkit-mask-image:linear-gradient(to left,transparent 0,#000 7%);mask-image:linear-gradient(to left,transparent 0,#000 7%)}

.pk-bag img{mix-blend-mode:normal}

/* smooth and small (Omri, 6 Nov 2026): a placed event settles in gently; a dragged card moves on its own layer */
.gm-slot.on{animation:slotIn .26s ease-out}
@keyframes slotIn{from{transform:scale(.97);opacity:.55}}
@keyframes stLock{40%{transform:scale(1.03)}100%{transform:none}}
@keyframes pkGulp{0%{transform:scale(1.04)}45%{transform:scale(1.07)}100%{transform:none}}
.st-it.drag,.pk-it.drag,.pl-it.drag{will-change:translate;transition:none}
/* the book's last button: no square focus frame (Omri, 6 Nov 2026); a keyboard user sees it brighten instead */
.bk-go:focus{outline:none}
.bk-go:focus-visible{outline:none;filter:drop-shadow(0 8px 12px rgba(0,0,0,.35)) brightness(1.1)}

/* ---------- the end of an episode: the celebration, the folded note, the unfolding (quest.js party) ---------- */
#party{position:fixed;inset:0;z-index:60;overflow:hidden;background:radial-gradient(120% 90% at 50% 40%,rgba(14,18,32,.05),rgba(14,18,32,.55));animation:ptIn .4s ease-out}
@keyframes ptIn{from{opacity:0}}
.pt-fx{position:absolute;inset:0;pointer-events:none}
.pt-fx i{position:absolute;top:-24px;left:var(--x);width:10px;height:16px;background:var(--c);border-radius:2px;opacity:0;animation:ptFall 2.6s var(--d) cubic-bezier(.3,.6,.5,1) forwards}
.pt-fx .pt-star{width:18px;height:18px;border-radius:0;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
@keyframes ptFall{0%{opacity:1;transform:translate(0,0) rotate(0)}100%{opacity:0;transform:translate(var(--dx),105vh) rotate(calc(var(--r) + 540deg))}}
.pt-head{position:absolute;top:max(18px,env(safe-area-inset-top));left:50%;width:min(640px,calc(100% - 32px));translate:-50% 0;text-align:center;color:#fff;
  animation:ptPop .55s cubic-bezier(.3,1.4,.5,1);transition:opacity .4s}
.pt-head h2{margin:0;font-size:clamp(28px,6vh,48px);font-weight:800;text-shadow:0 3px 0 rgba(0,0,0,.25),0 0 22px rgba(255,214,90,.55)}
.pt-head p{margin:6px auto 0;max-width:46ch;font-size:clamp(15px,2.6vh,20px);line-height:1.45;text-shadow:0 2px 6px rgba(0,0,0,.45)}
@keyframes ptPop{from{opacity:0;transform:scale(.8) translateY(-10px)}}

/* ---------- the secret letter (letter.js): one grid, one centre line, one step's words at a time ---------- */
#party{display:block}
.pt-head{position:absolute;top:max(16px,env(safe-area-inset-top));left:50%;translate:-50% 0;margin:0;width:min(640px,calc(100% - 32px));z-index:2;transition:opacity .6s ease,translate .6s ease}
#party.calm .pt-head{opacity:0;translate:-50% -12px;pointer-events:none}
/* the world behind: dimmed and softly blurred once the letter comes, a little more while it is read */
.pt-dim{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .9s ease;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:rgba(14,18,32,.42)}
.pt-dim.more{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:rgba(14,18,32,.32)}
#party.calm .pt-dim.one{opacity:1}
#party[data-step=unfold] .pt-dim.more,#party[data-step=dust] .pt-dim.more,#party[data-step=twist] .pt-dim.more{opacity:1}
.sl{--ew:min(330px,64vw,calc((100dvh - 280px) / .96));--pw:calc(var(--ew) * 1.25);position:absolute;inset:0;display:grid;justify-items:center;align-content:center;
  grid-template-areas:"say" "stage" "foot";row-gap:clamp(10px,2.2vh,20px);padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}
.sl-say{grid-area:say;width:min(560px,100%);min-height:4.6em;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;text-align:center;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.55)}
.sl-say.swap{animation:slSwap .45s ease-out}
@keyframes slSwap{from{opacity:0;transform:translateY(8px)}}
.sl-t{margin:0;font-size:clamp(22px,3.8vh,30px);font-weight:800;line-height:1.25;text-wrap:balance}
.sl-p{margin:6px 0 0;max-width:36ch;font-size:clamp(17px,2.7vh,21px);font-weight:500;line-height:1.4;text-wrap:balance}
.sl-p:empty{display:none}
.sl-stage{grid-area:stage;position:relative;width:var(--ew);aspect-ratio:278/270}
.sl-foot{grid-area:foot;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}
/* the envelope: a fixed frame (the open envelope's shape, 278:270); every frame of Omri's envelope is drawn at the frame's
   full width and stands on its bottom edge, so the envelope never changes size or place between pictures */
.sl-env{position:absolute;inset:0;translate:0 75vh;opacity:0;transition:translate .9s cubic-bezier(.22,1,.36,1),opacity .4s ease}
.sl.in .sl-env{translate:0 0;opacity:1}
.sl[data-step=arrive] .sl-env,.sl[data-step=seal]:not(.holding):not(.settle) .sl-env{animation:slFloat 2.8s 1.1s ease-in-out infinite}
@keyframes slFloat{50%{transform:translateY(-6px) rotate(-.5deg)}}
.sl-env img{position:absolute;display:block;pointer-events:none;user-select:none;-webkit-user-select:none}
.sl-closed,.sl-frame,.sl-open{filter:drop-shadow(0 14px 16px rgba(60,35,10,.28)) drop-shadow(0 2px 3px rgba(60,35,10,.16))}
.sl-closed{position:absolute;left:0;right:0;bottom:0;aspect-ratio:337/216;transition:opacity .18s ease}
.sl-base,.sl-loose{left:0;top:0;width:100%;height:auto}
.sl-loose{opacity:0;transition:opacity .22s ease}
.sl.slack .sl-loose{opacity:1}
.sl.dropped .sl-loose{opacity:0}
.sl-rope{width:18%;height:auto;left:40.5%;transition:transform .45s cubic-bezier(.34,1.4,.5,1),opacity .2s ease}
.sl-rope.a{top:-8%}.sl-rope.b{top:60%;scale:1 -1}
.sl.slack .sl-rope{opacity:0}
.sl-fall{left:36%;top:62%;width:28%;height:auto;opacity:0;rotate:180deg}
.sl.dropped .sl-fall{opacity:0;animation:slDrop .55s ease-in forwards}
@keyframes slDrop{0%{opacity:1;transform:none}100%{opacity:0;transform:translateY(70px) rotate(14deg)}}
.sl.holding .sl-rope,.sl.holding .sl-seal{transition:none}
.sl-seal{position:absolute;left:28.5%;top:22.6%;width:43%;aspect-ratio:173/159;padding:0;border:0;background:none;cursor:grab;touch-action:none;z-index:3;border-radius:50%;
  transition:translate .42s cubic-bezier(.34,1.4,.5,1),rotate .42s ease,opacity .4s ease,scale .3s ease;filter:drop-shadow(0 4px 5px rgba(60,20,10,.3))}
.sl-seal img{position:absolute;left:0;top:0;width:100%;height:100%}
.sl-seal .sl-seal-s{top:auto;bottom:4%;height:auto;opacity:0}
.sl.holding .sl-seal{cursor:grabbing;scale:1.06;filter:drop-shadow(0 10px 10px rgba(60,20,10,.32))}
.sl.near .sl-seal{scale:1.1}
.sl[data-step=seal] .sl-seal:focus-visible{outline:3px solid #fff;outline-offset:4px}
.sl.freed .sl-seal{transition:translate .5s cubic-bezier(.2,.7,.3,1),rotate .5s ease,opacity .35s ease .15s,scale .5s ease;rotate:25deg;scale:.8;opacity:0}
.sl.freed .sl-seal-f{opacity:0;transition:opacity .15s}.sl.freed .sl-seal-s{opacity:1;transition:opacity .15s}
.sl-pop{opacity:0;pointer-events:none}
.sl-pop.a{left:20%;top:44%;width:13%;height:auto}.sl-pop.b{left:70%;top:48%;width:8%;height:auto}
.sl.freed .sl-pop{animation:slBurst .8s ease-out forwards}.sl.freed .sl-pop.b{animation-delay:.1s}
@keyframes slBurst{0%{opacity:0;transform:scale(.3) rotate(-20deg)}35%{opacity:1;transform:scale(1.15)}100%{opacity:0;transform:scale(.9) translateY(-14px)}}
/* the flap lifting: Omri's two in-between pictures, each one cross-fading into the next */
.sl-frame{left:0;bottom:0;width:100%;height:auto;opacity:0;transition:opacity .2s ease}
.sl.f1 .sl-closed{opacity:0}
.sl.f1 .f1{opacity:1}
.sl.f2 .f1{opacity:0}.sl.f2 .f2{opacity:1}
.sl.opening .f2{opacity:0}
.sl-rays{left:-12%;top:-26%;width:22%;height:auto;opacity:0}
.sl-arrow{opacity:0;transition:opacity .3s ease}
.sl-arrow-seal{left:76%;top:-12%;width:19%;height:auto}
.sl.hint[data-step=seal] .sl-arrow-seal,.sl.hint[data-step=seal] .sl-rays{opacity:1;animation:slPoke 1.3s ease-in-out infinite}
.sl.hint[data-step=seal] .sl-seal{animation:slWiggle 1.6s ease-in-out infinite}
@keyframes slPoke{50%{transform:translate(6px,-4px)}}
@keyframes slWiggle{0%,60%,100%{transform:none}70%{transform:translateX(7px) rotate(4deg)}85%{transform:translateX(-3px) rotate(-2deg)}}
/* open: the empty envelope, the folded paper in it, its front pocket in front (the same picture, cut along the pocket) */
.sl-open{position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity .2s ease}
.sl.opening .sl-open{opacity:1;pointer-events:auto}
.sl.f1 .sl-closed{pointer-events:none}
.sl-back,.sl-front{left:0;top:0;width:100%;height:100%}
.sl-front{clip-path:polygon(0 40%,5% 42%,33% 66%,40% 62%,50% 60.5%,60% 62%,66% 66%,95% 42%,100% 40%,100% 100%,0 100%);z-index:3}
.sl-letter{position:absolute;left:10%;top:33%;width:80%;aspect-ratio:259/171;padding:0;border:0;background:none;z-index:2;cursor:grab;touch-action:none;
  transition:translate .42s cubic-bezier(.34,1.3,.5,1)}
.sl-fold{position:absolute;inset:0;background-size:100% 200%;background-position:50% 0;background-repeat:no-repeat;filter:drop-shadow(0 2px 3px rgba(60,35,10,.22))}
.sl.holding .sl-letter{transition:none;cursor:grabbing}
.sl[data-step=letter] .sl-letter:focus-visible{outline:3px solid #fff;outline-offset:3px}
.sl-arrow-up{left:43%;top:2%;width:15%;height:auto;rotate:-62deg;z-index:4}
.sl.hint[data-step=letter] .sl-arrow-up{opacity:1;animation:slUp 1.2s ease-in-out infinite}
.sl.hint[data-step=letter] .sl-letter{animation:slTease 1.8s ease-in-out infinite}
@keyframes slUp{50%{transform:translateY(-8px)}}
@keyframes slTease{0%,55%,100%{transform:none}72%{transform:translateY(-12%)}}
.sl[data-step=unfold] .sl-env,.sl[data-step=dust] .sl-env,.sl[data-step=twist] .sl-env{display:none}
/* the paper in the middle: Omri's framed paper (264:340), folded across the middle with the plain paper outside; the
   message (HTML) inside the frame, the dust over the message only */
.sl{--ph:min(470px,calc(100dvh - 300px))}
.sl[data-step=unfold] .sl-stage,.sl[data-step=dust] .sl-stage,.sl[data-step=twist] .sl-stage{width:max(var(--ew),calc(var(--ph) * 264 / 340));aspect-ratio:auto;height:var(--ph)}
.sl-paper{position:absolute;left:50%;top:50%;height:var(--ph);aspect-ratio:264/340;translate:-50% -50%;display:none;perspective:1600px;transform-style:preserve-3d;
  transition:transform .65s cubic-bezier(.22,1,.36,1)}
.sl[data-step=unfold] .sl-paper,.sl[data-step=dust] .sl-paper,.sl[data-step=twist] .sl-paper{display:block}
.sl-half{position:absolute;left:0;right:0;height:50%}
.sl-low{bottom:0;background:url("assets/letter/paper.webp") 50% 100%/100% 200% no-repeat;filter:drop-shadow(0 14px 16px rgba(60,35,10,.26))}
.sl-top{top:0;height:calc(50% + 2px);transform-origin:50% 100%;transform:rotateX(-179deg);transform-style:preserve-3d;transition:transform .95s cubic-bezier(.45,.05,.25,1)}
.sl-face{position:absolute;inset:0;background-size:100% 200%;background-repeat:no-repeat;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.sl-face.fr{background-position:50% 0}
.sl-face.bk{background-position:50% 0;transform:rotateX(180deg)}
.sl.unfolded .sl-top{transform:rotateX(0)}
.sl-msg{position:absolute;inset:13% 14% 11%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(6px,1.4vh,12px);text-align:center;color:#4a321c;opacity:0;transition:opacity .4s ease}
.sl[data-step=dust] .sl-msg,.sl[data-step=twist] .sl-msg{opacity:1}
.sl-line{margin:0;font-size:clamp(16px,2.3vh,18px);line-height:1.45;text-wrap:pretty}
.sl-when{font-weight:800;font-size:clamp(18px,2.8vh,22px)}
.sl-q{font-weight:800;font-size:clamp(18px,2.8vh,22px);color:#b4532a}
.sl-dust{position:absolute;inset:11% 13% 9%;width:74%;height:80%;touch-action:none;opacity:0;transition:opacity .4s ease;
  cursor:url("assets/letter/broom-cursor.png") 22 40,pointer}
.sl[data-step=dust] .sl-dust{opacity:1}
.sl.revealed .sl-dust{opacity:0!important;transition:opacity .8s ease;pointer-events:none}
.sl-broom{position:absolute;width:56px;height:auto;margin:-46px 0 0 -26px;opacity:0;pointer-events:none;transition:opacity .15s;rotate:-8deg;z-index:3}
.sl-broom.on{opacity:1}
.sl-mote{position:absolute;width:5px;height:5px;margin:-2px;border-radius:50%;background:rgba(214,190,146,.95);pointer-events:none;animation:slMote .8s ease-out forwards}
@keyframes slMote{to{transform:translate(var(--dx),28px);opacity:0}}
.sl-rub{position:absolute;left:24%;top:40%;width:56px;height:auto;aspect-ratio:1;margin:-28px;opacity:0;pointer-events:none;
  background:url("assets/letter/broom.webp") center/contain no-repeat}
.sl.hint[data-step=dust] .sl-rub{opacity:.95;animation:slRub 2.2s ease-in-out infinite}
@keyframes slRub{0%{left:24%;top:40%}25%{left:44%;top:58%}50%{left:62%;top:38%}75%{left:78%;top:56%}100%{left:24%;top:40%}}
.sl-star{position:absolute;width:12%;height:auto;opacity:0;pointer-events:none}
.sl-star.a{left:-4%;top:-7%}.sl-star.b{right:3%;top:-5%;width:7%}.sl-star.c{right:-4%;bottom:6%;width:9%}
.sl.revealed .sl-star{animation:slStar .9s ease-out forwards}
.sl.revealed .sl-star.b{animation-delay:.15s}.sl.revealed .sl-star.c{animation-delay:.3s}
@keyframes slStar{0%{opacity:0;transform:scale(.3) rotate(-20deg)}45%{opacity:1;transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}
.sl-all{min-height:48px;font-size:17px;padding:0 22px;color:#fff;background:rgba(22,27,44,.6);visibility:hidden}
.sl[data-step=dust] .sl-all{visibility:visible;animation:slSwap .45s ease-out}
.sl-twist{display:none;text-align:center;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.55);max-width:min(520px,92vw)}
.sl[data-step=twist] .sl-all{display:none}
.sl[data-step=twist] .sl-twist{display:block}
.sl-twist h3{margin:0;font-size:clamp(22px,3.8vh,30px);font-weight:800;animation:slSwap .5s ease-out both}
.sl-twist p{margin:6px auto 14px;max-width:34ch;font-size:clamp(17px,2.7vh,21px);line-height:1.4;text-wrap:balance;animation:slSwap .5s .12s ease-out both}
.sl-twist .sl-go{animation:slSwap .5s .28s ease-out both}
.sl[data-step=twist] .sl-say{visibility:hidden}
/* a short screen (a phone held sideways): the words in one column, the stage in the other, from the first step */
@media (max-height:500px){
  .sl{--ew:min(300px,46vw,calc((100dvh - 48px) / .96 / 1.25 * 1.0));--pw:calc(var(--ew) * 1.25);grid-template-areas:"say stage" "foot stage";grid-template-columns:minmax(220px,40vw) auto;
    grid-template-rows:auto auto;column-gap:clamp(20px,4vw,48px);row-gap:12px;align-content:center;justify-content:center}
  .sl-say{min-height:0;justify-content:flex-end;align-self:end}
  .sl-foot{align-self:start}
  .sl-t{font-size:20px}.sl-p{font-size:16px}
  .sl-line{font-size:15px}.sl-when,.sl-q{font-size:17px}
  .sl-twist h3{font-size:21px}.sl-twist p{font-size:15px;margin-bottom:10px}
  .sl{--ph:calc(100dvh - 36px)}
  .sl-stage{width:calc(var(--ew) * 1.25);aspect-ratio:auto;height:calc(var(--ew) * .971)}
  .sl-env{left:50%;width:var(--ew);margin-left:calc(var(--ew) / -2);right:auto}
  .sl-say:has(.sl-t:empty){display:none}
}
.sl.still *,.sl.still{animation:none!important}
@media (prefers-reduced-motion:reduce){ .sl *,.sl{animation:none!important;transition-duration:.01s!important} .pt-fx{display:none} }

/* the message always inside the paper's drawn frame (it is 12%..88% across, 10%..90% down) */
.sl-msg{inset:15% 15% 13%;padding:0 6%;box-sizing:border-box;overflow:visible}
@media (max-height:500px){ .sl-msg{inset:16% 15% 14%;padding:0 7%;gap:3px} .sl-line{font-size:13px;line-height:1.35} .sl-when,.sl-q{font-size:15px} .sl{--ph:calc(100dvh - 28px)} }

/* ---------- asset buttons (Omri, 6 Nov 2026: "only assets, never emoji"): the clay plates of quest/assets/ui/btn-*.webp.
   The plate's round ends are its slices (border-image), only the flat middle stretches, so a button of any width keeps
   its shape; the label is centred on the plate's face (its rim is a little thicker at the bottom: 4% more room below). */
.go,.ghost,.gm-next,.bk-go,.act,.gm-opts:not(.pics) .gm-opt{--bh:56px;--plate:url("assets/ui/btn-green.webp");--down:url("assets/ui/btn-green-down.webp");
  height:var(--bh);min-height:var(--bh);padding:0 6px calc(var(--bh) * .05);border-style:solid;border-width:0 calc(var(--bh) * .5);border-radius:0;
  border-image:var(--plate) 0 103 fill / 0 calc(var(--bh) * .5) stretch;background:none;box-shadow:none;
  display:inline-flex;align-items:center;justify-content:center;text-align:center;font-family:Rubik,sans-serif;font-weight:700;font-size:19px;line-height:1;
  color:#fff;text-shadow:0 2px 0 rgba(40,80,10,.45);filter:drop-shadow(0 5px 6px rgba(40,25,10,.28));transition:transform .15s ease,filter .15s ease;cursor:pointer;white-space:nowrap}
.go:hover:not(:disabled),.ghost:hover:not(:disabled),.gm-next:hover,.act:hover,.gm-opts:not(.pics) .gm-opt:hover:not(:disabled){transform:translateY(-2px);filter:drop-shadow(0 8px 8px rgba(40,25,10,.3))}
.go:active,.ghost:active,.gm-next:active,.act:active,.gm-opts:not(.pics) .gm-opt:active:not(:disabled){transform:translateY(1px);border-image-source:var(--down);filter:drop-shadow(0 2px 3px rgba(40,25,10,.25))}
.ghost,.act,.gm-opts:not(.pics) .gm-opt{--plate:url("assets/ui/btn-cream.webp");--down:url("assets/ui/btn-cream-down.webp");color:#4a321c;text-shadow:0 1px 0 rgba(255,250,235,.7)}
.ghost{border-color:transparent}
.bk-go{--bh:76px;padding:0 10px calc(var(--bh) * .05);font-size:22px;background:none!important;transform:translateX(-50%)}
html[dir=rtl] .bk-go,html[dir=ltr] .bk-go{padding:0 10px calc(var(--bh) * .05)}
.bk-go:hover{transform:translateX(-50%) translateY(-3px)}.bk-go:active{transform:translateX(-50%) translateY(1px)}
.gm-next{--bh:58px;font-size:20px}
.act{--bh:56px;transform:translateX(-50%);font-size:18px}.act:hover{transform:translateX(-50%) translateY(-2px)}.act:active{transform:translateX(-50%) translateY(1px)}
.act .act-k{display:none}
/* answers: cream plates; the chosen right answer shows its seal (never colour alone), a wrong one fades */
.gm-opts:not(.pics) .gm-opt{--bh:60px;font-weight:600;font-size:clamp(16px,2vw,19px);white-space:normal;line-height:1.2;width:100%}
.gm-opts.chips .gm-opt{width:auto;--bh:54px}
.gm-opts:not(.pics) .gm-opt .gm-k{display:none}
.gm-opts:not(.pics) .gm-opt.right{color:#2f4a12}
.gm-opts:not(.pics) .gm-opt.wrong{opacity:.5}
.has-scene .gm-opts:not(.pics) .gm-opt{background:none;-webkit-backdrop-filter:none;backdrop-filter:none}
@media (max-height:480px){ .go,.ghost,.gm-opts:not(.pics) .gm-opt,.act{--bh:48px;font-size:16px} .gm-next{--bh:50px;font-size:17px} .bk-go{--bh:62px;font-size:18px} }
/* round buttons: the clay discs carry their own symbol */
.round,.gm-x{width:52px;height:52px;padding:0;border:none;background:none!important;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;filter:drop-shadow(0 4px 5px rgba(40,25,10,.3));transition:transform .15s ease}
.round .ic,.gm-x .ic{width:100%;height:100%;object-fit:contain}
.round:hover,.gm-x:hover{transform:translateY(-2px)}.round:active,.gm-x:active{transform:translateY(1px)}
.bk-nav{filter:drop-shadow(0 5px 7px rgba(40,25,10,.35))}.bk-prev img{transform:none}
.ic-next,.ic-ui-arrow{display:none}

/* ---------- design pass (Omri, 6 Nov 2026: "I need it better"): one material for every panel. The cover, the talk card,
   the end card, the menu and the HUD's chips are warm paper like the quiz cards and the letter, with dark warm ink;
   the focus ring follows the button's round shape. */
:root{--paperA:#fff8ea;--paperB:#f6e6c6;--inkW:#3d2a17;--rim:rgba(150,100,45,.28)}
.cv-card,.sheet,.wn-card,#menu.panel{background:linear-gradient(170deg,var(--paperA),var(--paperB));color:var(--inkW);border:none;
  -webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:0 18px 40px rgba(30,18,6,.38),inset 0 0 0 2px var(--rim),inset 0 -6px 0 rgba(150,100,45,.12)}
.cv-card .by,.cv-card .hint,.cv-card small,.sheet small,.wn-card small{color:rgba(61,42,23,.72);opacity:1}
.cv-card h1,.wn-card h2,.wn-h{color:#2e1f10}
.tk-face,.gm-face{border-color:#fff}
.tk-who small{color:rgba(61,42,23,.7);opacity:1}
.hud-top .glass:not(.round),#goal,#boost{background:linear-gradient(170deg,rgba(255,248,234,.94),rgba(246,230,198,.94));color:var(--inkW);border:none;
  box-shadow:0 6px 16px rgba(30,18,6,.28),inset 0 0 0 1.5px var(--rim)}
.clue{background:rgba(150,100,45,.1);border-color:rgba(150,100,45,.35);color:rgba(61,42,23,.55)}
#goalDist{color:rgba(61,42,23,.65)}
/* the menu's rows are cream plates too */
#menu .row{--bh:52px;height:var(--bh);min-height:var(--bh);margin-bottom:8px;padding:0 4px calc(var(--bh) * .05);border-style:solid;border-width:0 calc(var(--bh) * .5);border-radius:999px;
  border-image:url("assets/ui/btn-cream.webp") 0 103 fill / 0 calc(var(--bh) * .5) stretch;background:none;color:var(--inkW);font-weight:600;font-size:16px}
#menu .row:active{border-image-source:url("assets/ui/btn-cream-down.webp")}
#menu h3{color:#2e1f10}
/* the focus ring: round like the plates, only for the keyboard */
.go,.ghost,.gm-next,.bk-go,.act,.gm-opt,.round,.gm-x,#menu .row{border-radius:999px;outline-offset:3px}
.go:focus,.ghost:focus,.gm-next:focus,.bk-go:focus,.act:focus,.gm-opt:focus,.round:focus,.gm-x:focus,#menu .row:focus{outline:none}
.go:focus-visible,.ghost:focus-visible,.gm-next:focus-visible,.bk-go:focus-visible,.act:focus-visible,.gm-opt:focus-visible,.round:focus-visible,.gm-x:focus-visible,#menu .row:focus-visible{outline:3px solid #fff;box-shadow:0 0 0 6px rgba(255,196,61,.75)}
.tk-go,.cv-go{gap:12px;align-items:center}

/* ---------- the quiz screen, Omri's redesign (6 Nov 2026, his asset sheet quest/assets/ui/q-*.webp): a deep blue
   night with blue waves and an orange splash, the question on a slanted cream card with an orange rim (its splash
   corner and slant are the card's border slices, so only its flat middle stretches), yellow answer pills, the orange
   close, the speaker's face in a white ring, the clue to win in a little box */
#game{background:radial-gradient(120% 90% at 50% 35%,#163a8a 0%,#0d2464 55%,#081a4c 100%)}
#game .gm::before,#game .gm::after{content:"";position:absolute;pointer-events:none;z-index:0}
#game .gm::before{left:-6%;right:-6%;bottom:-1px;height:clamp(60px,14vh,120px);background:url("assets/ui/q-wave.webp") center bottom/100% 100% no-repeat;opacity:.9}
#game .gm::after{right:-38px;bottom:-34px;width:clamp(110px,15vw,190px);aspect-ratio:300/219;background:url("assets/ui/q-splash.webp") center/contain no-repeat}
#game .gm>*{position:relative;z-index:1}
#game .has-scene::before,#game .has-scene::after{display:none}
/* the question card */
.gm-qcard,.gm-scard{--k:.585;background:none!important;box-shadow:none!important;transform:none!important;border-radius:0;color:#1b2236;
  border-style:solid;border-width:calc(100px * var(--k)) calc(110px * var(--k)) calc(70px * var(--k)) calc(190px * var(--k));
  border-image:url("assets/ui/q-card.webp") 100 110 70 190 fill / calc(100px * var(--k)) calc(110px * var(--k)) calc(70px * var(--k)) calc(190px * var(--k)) stretch;
  padding:0 6px;min-height:58px;width:min(940px,100%);filter:drop-shadow(0 12px 18px rgba(0,8,30,.45))}
.gm-qcard .gm-tape,.gm-scard .gm-tape{display:none}
.gm-qcard .gm-q,.gm-scard .gm-q{font-weight:800;color:#141c33;text-align:center}
.gm-scard .gm-n{color:rgba(20,28,51,.55);top:4px;inset-inline-end:2px}
/* the answers: yellow pills, dark bold labels centred on the face */
.gm-opts:not(.pics) .gm-opt{--plate:url("assets/ui/q-pill.webp");--down:url("assets/ui/q-pill.webp");--bh:62px;
  border-image:var(--plate) 0 48 fill / 0 calc(var(--bh) * .5) stretch;color:#1b2236;font-weight:800;font-size:clamp(18px,2.4vw,24px);text-shadow:0 1px 0 rgba(255,240,180,.6);
  padding:0 6px calc(var(--bh) * .06);filter:drop-shadow(0 6px 8px rgba(0,8,30,.4))}
.gm-opts:not(.pics) .gm-opt:active:not(:disabled){filter:brightness(.95) drop-shadow(0 2px 3px rgba(0,8,30,.35))}
.gm-opts:not(.pics) .gm-opt.right{color:#1b2236;filter:drop-shadow(0 0 0 #fff) drop-shadow(0 0 10px rgba(255,255,255,.85))}
.gm-opts:not(.pics) .gm-opt.right .gm-mark,.gm-opts:not(.pics) .gm-opt.wrong .gm-mark{position:absolute;inset-inline-end:-6px}
.gm-opts{gap:14px 18px;width:min(900px,100%)}
/* the close: Omri's orange disc; the speaker's face in a white ring with a line beside the name */
.gm-x{width:56px;height:56px}
.gm-face{width:56px;height:56px;border:4px solid #fff;background:#f2efe9;box-shadow:0 4px 10px rgba(0,8,30,.4)}
.gm-who{gap:14px}
.gm-whot{padding-inline-end:14px;border-inline-end:2px solid rgba(255,255,255,.35)}
.gm-who b{font-size:20px;font-weight:800}
/* the clue to win: label | the clue in a little box | its name */
.gm-foot .gm-prize{gap:12px;font-size:17px;font-weight:700;opacity:1;color:#fff}
.gm-prize-box{display:grid;place-items:center;width:46px;aspect-ratio:140/120;background:url("assets/ui/q-hint.webp") center/contain no-repeat;flex:none}
.gm-prize-box .gm-prize-img{width:24px;height:24px}
.gm-prize-sep{width:2px;height:26px;background:rgba(255,255,255,.4);flex:none}
.gm-prize-n{font-weight:500}
@media (max-height:480px){ .gm-qcard,.gm-scard{--k:.45;min-height:40px} .gm-opts:not(.pics) .gm-opt{--bh:50px;font-size:17px} .gm-opts{gap:10px 14px} .gm-x,.gm-face{width:48px;height:48px} }

.gm-qcard .gm-q,.gm-scard .gm-q{font-size:clamp(22px,3.2vw,34px);line-height:1.25;margin:0}
.gm-qcard .gm-st:empty,.gm-scard .gm-st:empty{min-height:0}
@media (max-width:520px){ .gm-opts:not(.pics) .gm-opt{font-size:16px;white-space:nowrap} }
/* the verdict: Omri's matched pair, a green check or a red X, beside its word with room between them (6 Nov 2026) */
.gm-st{gap:12px}
.gm-st .st-ic{width:40px;height:40px;filter:drop-shadow(0 3px 4px rgba(0,8,30,.3))}
.gm-st .st-t{font-weight:700;font-size:19px}
.gm-st.ok{color:#2d7a12}.gm-st.no{color:#c2410c}
@media (max-height:480px){ .gm-st .st-ic{width:30px;height:30px} .gm-st .st-t{font-size:16px} }
.gm-opts:not(.pics) .gm-opt.right .gm-mark,.gm-opts:not(.pics) .gm-opt.wrong .gm-mark{display:block;position:absolute;inset-inline-end:calc(var(--bh) * -.32);top:50%;width:calc(var(--bh) * .62);height:calc(var(--bh) * .62);margin-top:calc(var(--bh) * -.34);
  background:url("assets/ui/mark-ok.webp") center/contain no-repeat;filter:drop-shadow(0 2px 3px rgba(0,8,30,.35))}
.gm-opts:not(.pics) .gm-opt.wrong .gm-mark{background-image:url("assets/ui/mark-no.webp")}
.gm-opts:not(.pics) .gm-opt.wrong{text-decoration:none}
/* the secondary buttons are Omri's yellow pill (6 Nov 2026: "use the yellow button i gave you"), dark bold labels */
.ghost,.act,#menu .row{--plate:url("assets/ui/q-pill.webp");--down:url("assets/ui/q-pill.webp");border-image:var(--plate) 0 48 fill / 0 calc(var(--bh) * .5) stretch;color:#1b2236;font-weight:800;text-shadow:0 1px 0 rgba(255,240,180,.6)}
#menu .row{border-image:url("assets/ui/q-pill.webp") 0 48 fill / 0 calc(var(--bh) * .5) stretch}
.ghost:active,.act:active,#menu .row:active{border-image-source:url("assets/ui/q-pill.webp");filter:brightness(.95)}

/* ---------- "what happened first" (order) fits one screen, 100dvh (Omri, 7 Nov 2026: "I don't understand what to do here"):
   the instruction in bold at the top of the card, the numbered lines inside it, compact answers below (two columns on a
   wide screen); on a phone held sideways the card and the answers side by side */
#game .gm{height:100dvh;box-sizing:border-box}
.gm-q-order .gm-body{justify-content:safe center;gap:12px;padding:6px 0 4px;overflow:hidden}
.gm-ocard{flex:none;width:min(760px,100%);min-height:0;padding:14px 16px 12px;transform:none}
.gm-ocard .gm-tape{display:none}
.gm-ocard .gm-prompt{order:-1;margin:0 0 10px;padding:0;background:none!important;text-align:center;color:#1b2236;opacity:1;font-size:clamp(17px,2.4vh,21px);font-weight:800;letter-spacing:0}
.gm-ocard .gm-line{gap:6px;width:100%}
.gm-ocard .gm-slot{min-height:38px;padding:4px 10px;gap:10px;border:2px dashed rgba(27,34,54,.22);border-radius:10px;color:#1b2236;font-size:15px;line-height:1.25}
.gm-ocard .gm-slot .gm-k{width:26px;height:26px;border-radius:50%;background:rgba(27,34,54,.08);color:#1b2236;font-weight:700;font-size:14px;flex:none}
.gm-ocard .gm-slot.on{border:2px solid #f59e0b;background:#fff4d6}
.gm-ocard .gm-slot.on .gm-k{background:#f59e0b;color:#fff}
.gm-ocard .gm-st:empty{display:none}
.gm-q-order .gm-opts.chips{display:grid;grid-template-columns:1fr;gap:8px;width:min(760px,100%)}
@media (min-width:700px){ .gm-q-order .gm-opts.chips{grid-template-columns:1fr 1fr} }
.gm-q-order .gm-opts.chips .gm-opt{--bh:48px;width:100%;font-size:15px;font-weight:700;white-space:normal;line-height:1.15}
.gm-q-order .gm-opts.chips .gm-opt.gone{visibility:hidden}
@media (max-height:500px){
  .gm-q-order .gm-body{flex-direction:row;align-items:center;justify-content:center;gap:14px}
  .gm-q-order .gm-ocard{width:48%;padding:10px 12px}
  .gm-q-order .gm-ocard .gm-prompt{font-size:15px;margin-bottom:6px}
  .gm-q-order .gm-ocard .gm-slot{min-height:28px;padding:2px 8px;font-size:12.5px}
  .gm-q-order .gm-ocard .gm-slot .gm-k{width:20px;height:20px;font-size:12px}
  .gm-q-order .gm-opts.chips{width:48%;grid-template-columns:1fr;gap:6px}
  .gm-q-order .gm-opts.chips .gm-opt{--bh:38px;font-size:13px}
}
.gm-ocard .gm-prompt{margin-bottom:2px}
.gm-ocard .gm-ohow{order:-1;margin:0 0 10px;text-align:center;color:rgba(27,34,54,.7);font-size:clamp(14px,2vh,16px);font-weight:500}
.gm-q-order .gm-opts.chips .gm-opt.gone{display:none}
@media (max-height:500px){ .gm-ocard .gm-ohow{font-size:12.5px;margin-bottom:6px} }

/* the HUD's round buttons during play: Omri's blue discs */
#menuBtn .ic{content:url("assets/ui/hud-menu.webp")}
#exitBtn .ic{content:url("assets/ui/hud-close.webp")}

/* ---------- the GPS (Omri's navigator sheet, 9 Nov 2026): a cream pill with the blue wave, the world dial with its
   glowing ring at the start, the orange arrow turning on it, the orange pin by the metres ---------- */
#goal{--gh:clamp(76px,9vw,96px);height:var(--gh);gap:12px;padding:0 calc(var(--gh) * .42) 0 0;max-width:min(82vw,470px);align-items:center;
  background:none!important;box-shadow:none!important;border:0 solid transparent;border-radius:0;
  border-image:url("assets/ui/gps/pill.webp") 0 135 fill / 0 calc(var(--gh) * .5) / 0 stretch;
  filter:drop-shadow(0 5px 8px rgba(0,10,40,.32));margin-inline-end:calc(var(--gh) * .22)}
html[dir=rtl] #goal{padding:0 0 0 calc(var(--gh) * .42)}
.gps{position:relative;width:calc(var(--gh) * 1.12);aspect-ratio:1;flex:none;margin-inline-start:calc(var(--gh) * -.22);margin-block:calc(var(--gh) * -.06)}
.gps img{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.gps-arr{inset:26%!important;width:48%!important;height:48%!important;object-fit:contain;transition:transform .1s linear;filter:drop-shadow(0 2px 2px rgba(0,0,0,.35))}
.gps-glow{inset:-16%!important;width:132%!important;height:132%!important;opacity:0}
.gps-txt{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:4px;padding-bottom:calc(var(--gh) * .08)}
#goalText{font-size:clamp(15px,1.9vw,19px);font-weight:700;color:#1d2b4f;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gps-d{display:flex;align-items:center;gap:4px}
.gps-pin{width:calc(var(--gh) * .3);height:auto;flex:none}
#goalDist{font-size:clamp(24px,3.2vw,32px);font-weight:800;color:#ea580c;line-height:1;font-variant-numeric:tabular-nums}
#goal.near #goalDist{color:#16a34a}
#goal.near .gps-glow{animation:gpsGlow 1.2s ease-in-out infinite}
#goal.near .gps{animation:gpsHere 1s ease-in-out infinite}
@keyframes gpsGlow{0%,100%{opacity:.25;transform:scale(.92)}50%{opacity:.95;transform:scale(1.04)}}
@keyframes gpsHere{50%{transform:scale(1.06)}}
@media (max-height:500px){ #goal{--gh:60px} #goalText{font-size:13px} #goalDist{font-size:20px} }
@media (orientation:portrait) and (max-width:600px){ #goal{--gh:76px;max-width:calc(100vw - 24px)} }
@media (prefers-reduced-motion:reduce){ #goal.near .gps-glow,#goal.near .gps{animation:none} }

/* the reading hint: a horizontal strip over the bottom of the quiz, no dark box behind it (Omri, 7 Nov 2026) */
#game .gm>.gm-hint{position:absolute;inset:auto 0 max(14px,env(safe-area-inset-bottom)) 0;display:flex;justify-content:center;background:none;padding:0 14px;z-index:30;pointer-events:none}
.gm-hcard{pointer-events:auto;width:min(760px,100%);display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto auto;column-gap:16px;align-items:center;text-align:start;padding:12px 18px;border-radius:18px;
  box-shadow:0 12px 30px rgba(0,8,30,.45),inset 0 0 0 2px rgba(240,138,28,.6)}
.gm-hcard .gm-hic{grid-row:1/3;width:84px;margin:0}
.gm-hcard h2{grid-column:2;margin:0;font-size:clamp(18px,2.4vh,22px)}
.gm-hcard p{grid-column:2;margin:2px 0 0;font-size:clamp(14px,2vh,17px);line-height:1.4}
.gm-hcard .gm-hgo{grid-column:3;grid-row:1/3;white-space:nowrap}
@media (max-width:560px){ .gm-hcard{grid-template-columns:auto 1fr;row-gap:8px} .gm-hcard .gm-hic{width:56px;grid-row:1/3} .gm-hcard .gm-hgo{grid-column:1/3;grid-row:3;justify-self:center} }
@media (max-height:480px){ .gm-hcard{padding:8px 14px} .gm-hcard .gm-hic{width:56px} }
/* the place picture and its scrim stay behind the quiz, never in the flow (the gate questions, the who quiz) */
#game .gm>.gm-scene,#game .gm>.gm-scrim{position:absolute;inset:0;z-index:0}
/* the question card never shrinks below its words; its border stays clear until the picture arrives */
.gm-qcard,.gm-scard{flex:none;border-color:transparent}
@media (max-height:500px){ .has-scene .gm-qcard .gm-q{font-size:clamp(15px,2.4vw,20px)} }
/* picture answers keep their card shape (the round focus ring is for the plates only) */
.gm-opts.pics .gm-opt{border-radius:14px}
/* the talk card on a phone (Omri, 7 Nov 2026): its buttons side by side on one row, so the card is shorter; no shadow under them */
.tk-go{flex-wrap:nowrap}
.tk-go>button{flex:1 1 0;min-width:0;padding-inline:4px;white-space:nowrap;filter:none}
.tk-go>button:hover,.tk-go>button:active{filter:none}
@media (max-width:420px){ .tk-go>button{font-size:16px;--bh:50px} }
@media (max-height:500px){
  .has-scene .gm-qcard{--k:.34;min-height:0}
  .has-scene .gm-qcard .gm-q{font-size:15px;line-height:1.2}
  .has-scene .gm-body{gap:6px;padding-top:2px}
  .gm-opts.pics .gm-pic{height:clamp(44px,13vh,64px)}
  .gm-opts.pics .gm-opt{padding:4px;gap:3px}
  .gm-opts.pics .gm-t{font-size:12px;line-height:1.15}
}
/* the question centred in its card: the splash side's slice is wider, so the other side gets the difference as padding */
.gm-qcard,.gm-scard{padding-right:calc(80px * var(--k) + 6px)}
@media (max-width:600px){
  .gm-qcard,.gm-scard{--k:.4;width:100%}
  .gm-qcard .gm-q,.gm-scard .gm-q{font-size:clamp(19px,5.4vw,24px);line-height:1.3;text-wrap:balance}
  /* the answers two by two, as wide as the card, centred */
  .gm-opts.chips,.gm-opts.two{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:10px 12px;justify-items:stretch}
  .gm-opts.chips .gm-opt,.gm-opts.two .gm-opt{width:100%}
  .gm-opts.chips .gm-opt:last-child:nth-child(odd){grid-column:1/-1;justify-self:center;width:calc(50% - 6px)}
  .gm-q-order .gm-opts.chips{grid-template-columns:1fr}
  .gm-q-order .gm-opts.chips .gm-opt:last-child:nth-child(odd){grid-column:auto;width:100%}
}
/* the check or X sits small on the answer's top edge, never over its words; no shadow under the verdict icon (Omri, 7 Nov 2026) */
.gm-opts:not(.pics) .gm-opt.right .gm-mark,.gm-opts:not(.pics) .gm-opt.wrong .gm-mark{top:0;margin-top:calc(var(--bh) * -.2);inset-inline-end:calc(var(--bh) * .1);width:calc(var(--bh) * .44);height:calc(var(--bh) * .44);filter:none}
.gm-opt{overflow:visible}
.gm-st .st-ic{filter:none}
.gm-x{flex:none}
/* answers that are whole sentences: one per row, the words wrap inside a taller pill */
.gm-opts.long{grid-template-columns:1fr!important}
.gm-opts.long .gm-opt{height:auto;min-height:var(--bh);white-space:normal!important;padding-block:8px calc(var(--bh) * .1);line-height:1.25;font-size:clamp(15px,2vw,18px)}
@media (min-width:700px){ .gm-opts.long{grid-template-columns:1fr 1fr!important} }
@media (max-width:440px){
  .gm-top{gap:8px;min-width:0}
  .gm-x{width:44px;height:44px}
  .gm-steps{gap:4px;min-width:0;overflow:hidden}
  .gm-steps i{width:9px;height:9px}
  .gm-face{width:48px;height:48px}
  .gm-whot{padding-inline-end:10px}
  .gm-who b{font-size:17px}
}
/* the check or X centred on the answer's top edge (Omri, 7 Nov 2026) */
.gm-opts:not(.pics) .gm-opt.right .gm-mark,.gm-opts:not(.pics) .gm-opt.wrong .gm-mark{inset-inline-end:auto;left:50%;translate:-50% 0}
/* the bag game on a narrow portrait screen (Omri, 7 Nov 2026): the bag on top, the six things in two rows under it, all
   on screen; no tape over the title */
.pk-card .gm-tape{display:none}
@media (max-width:600px) and (orientation:portrait){
  .pk-card{padding:14px 12px}
  .pk-floor{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:auto auto auto;gap:10px 8px;padding-inline:0;justify-items:center}
  .pk-floor>.pk-side{display:contents}
  .pk-mid{grid-column:1/-1;grid-row:1}
  .pk-bag{width:clamp(130px,38vw,190px)}
  .pk-it,.pk-it.big{--s:clamp(64px,22vw,96px)}
}
/* a narrow portrait phone (Omri, 7 Nov 2026: "the whole task doesn't fit"): the prize row moves up into the top bar,
   between the X and the speaker, and the order game shrinks a little so all five events fit on one screen; the progress
   dots give way (the card shows its own count) */
@media (max-width:600px) and (orientation:portrait){
  #game .gm{position:relative}
  #game .gm-q-order .gm-foot{min-height:0;padding-top:6px}
  #game .gm-q-order .gm-foot .gm-prize{position:absolute;top:max(14px,env(safe-area-inset-top));left:64px;right:auto;z-index:3;height:44px;gap:6px;font-size:13px;max-width:calc(100vw - 260px)}
  #game .gm-q-order .gm-foot .gm-prize .gm-prize-l{display:none}
  #game .gm-q-order .gm-prize-box{width:38px}
  #game .gm-q-order .gm-prize-sep{display:none}
  #game .gm-q-order .gm-prize-n{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #game .gm-q-order .gm-steps{display:none}
  .gm-q-order .gm-body{gap:8px}
  .gm-ocard{padding:10px 12px 8px}
  .gm-ocard .gm-prompt{font-size:17px}
  .gm-ocard .gm-ohow{margin-bottom:6px;font-size:13px}
  .gm-ocard .gm-line{gap:4px}
  .gm-ocard .gm-slot{min-height:32px;padding:2px 8px;font-size:13.5px}
  .gm-ocard .gm-slot .gm-k{width:22px;height:22px;font-size:12px}
  .gm-q-order .gm-opts.chips{gap:7px}
  .gm-q-order .gm-opts.chips .gm-opt{--bh:44px;font-size:14px}
  #game .gm::before{height:70px}
}
/* the plaster game's last line on one row beside its check (Omri, 7 Nov 2026) */
@media (max-width:600px){ .gm-q-plaster .gm-st .st-t,.gm-q-hide .gm-st .st-t,.gm-q-pack .gm-st .st-t{font-size:clamp(13px,3.6vw,16px);white-space:nowrap} .gm-q-plaster .gm-st,.gm-q-hide .gm-st,.gm-q-pack .gm-st{gap:8px} .gm-q-plaster .gm-st .st-ic{width:30px;height:30px} }
@media (max-width:600px) and (orientation:portrait){
  #game .gm>.gm-foot{position:static}
  #game .gm-top .gm-x{margin-inline-start:auto}
}
/* the gate on a portrait phone (Omri, 7 Nov 2026): the place picture fills the whole screen (no blue band under it), and
   the four picture answers two by two, all in view */
@media (max-width:600px) and (orientation:portrait){
  #game .gm>.gm-scene{width:100%!important;max-width:none!important;left:0!important;right:0!important;height:100%!important;object-fit:cover;object-position:30% 50%}
  .has-scene .gm-body{justify-content:flex-start;padding-top:4px;gap:10px}
  .gm-opts.pics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px;width:100%}
  .gm-opts.pics .gm-pic{height:clamp(70px,15vh,120px)}
  .gm-opts.pics .gm-t{font-size:15px}
}
.go,.ghost,.gm-next,.bk-go,.act,.gm-opts:not(.pics) .gm-opt,.ep-title,#menu .row{border-color:transparent}
/* the cover card's buttons (and every card's button row) side by side on one row on a phone (Omri, 7 Nov 2026) */
.cv-go{display:flex;flex-wrap:nowrap;gap:10px;align-items:center}
.cv-go>button:not([hidden]){flex:1 1 0;min-width:0;white-space:nowrap;padding-inline:4px;background-color:transparent;box-shadow:none}
@media (max-width:600px){ .cv-go>button{--bh:50px;font-size:16px} }
@media (max-width:380px){ .cv-go>button{--bh:46px;font-size:14.5px} }
/* Aviv's story cards on a phone (Omri, 7 Nov 2026): the words fill the card, the picture sits under it, half out of its
   edge, so the whole sentence and the picture both show; the slots take the same shape */
@media (max-width:600px){
  .st-card .gm-tape{display:none}
  .st-it{overflow:visible;justify-content:flex-start;padding:8px 6px 22px}
  .st-it img{position:absolute;left:50%;bottom:-26px;translate:-50% 0;flex:none;width:58%;height:auto;max-height:52px;object-fit:contain;filter:drop-shadow(0 3px 3px rgba(0,8,30,.3))}
  .st-it .st-s{font-size:14px;line-height:1.25}
  .st-tray{padding-bottom:30px;row-gap:34px}
  .st-slots{margin-bottom:28px}
}
/* the after-games on a phone (Omri, 7 Nov 2026): the card holds its title and its last line; long verdicts wrap to two
   lines inside the card (only the plaster game keeps one line) */
@media (max-width:600px){
  .gm-q-hide .gm-st .st-t,.gm-q-pack .gm-st .st-t,.gm-q-story .gm-st .st-t{white-space:normal;text-wrap:balance;text-align:center}
  .gm-q-hide .gm-st,.gm-q-pack .gm-st,.gm-q-story .gm-st{padding-inline:8px;min-height:2.8em}
  .gm-q-pack .gm-body,.gm-q-hide .gm-body,.gm-q-story .gm-body{justify-content:flex-start;padding-top:8px;overflow-y:auto}
  .pk-card,.hd-card,.st-card{padding-top:16px;overflow:visible}
  .pk-card .st-title{margin-top:0}
}
@media (max-width:600px) and (orientation:portrait){
  .pk-bag{width:clamp(110px,30vw,160px)}
  .pk-it,.pk-it.big{--s:clamp(56px,18vw,84px)}
  .pk-floor{gap:6px 8px}
}
/* the gate on a portrait phone: smaller picture cards so all four stay whole after the answer; the right one keeps its
   word readable; the continue button centred */
@media (max-width:600px) and (orientation:portrait){
  .has-scene .gm-qcard{--k:.4}
  .has-scene .gm-qcard .gm-q{font-size:19px}
  .has-scene .gm-qcard .gm-st{margin-top:2px;min-height:0}
  .gm-opts.pics .gm-pic{height:clamp(60px,11vh,96px)}
  .gm-opts.pics .gm-opt{gap:4px;padding:6px}
  .gm-opts.pics .gm-opt.right{background:#fff7e0;color:#1b2236}
  .gm-opts.pics .gm-opt.right .gm-t{color:#1b2236;font-weight:700}
  .has-scene .gm-foot{justify-content:center}
  .has-scene .gm-foot>*{grid-area:auto}
  .has-scene .gm-foot .gm-next{margin-inline:auto}
}
/* the clue card: its words centred (Omri, 7 Nov 2026) */
#reward{text-align:center}
#reward .rw-name,#reward small,#reward b,#reward p{text-align:center;margin-inline:auto}
/* Aviv's story cards on a phone: the picture inside the card, under the words */
@media (max-width:600px){
  .st-it{padding:8px 6px 6px}
  .st-it img{position:relative;left:auto;bottom:auto;translate:none;width:62%;max-height:56px;margin-top:auto}
  .st-tray{padding-bottom:0;row-gap:10px}
  .st-slots{margin-bottom:0}
}
/* the cat room on a portrait phone (Omri, 7 Nov 2026): the card taller and in the middle of the screen, room between the
   tape and the title */
@media (max-width:600px) and (orientation:portrait){
  .gm-q-hide .gm-body{justify-content:center;padding-top:0}
  .hd-card{padding:44px 16px 22px;min-height:min(560px,calc(100dvh - 220px));display:flex;flex-direction:column;justify-content:center;gap:10px}
  .hd-card .gm-tape{display:block;top:-20px}
  .hd-card .st-title{margin-top:6px}
  .hd-room{width:100%;margin-top:8px}
}

/* ===============================================================================================================
/* NIC-1762 (Afik, 6 Nov 2026: "more visual, pictures of the characters, pictures and sound"): the "who" and
 * "truefalse" cards. A picture beside the sentence (the place's scene, the townsperson, or the detective's glass), a
 * speaker that reads the card aloud, and on a "who" card every person's face on their chip. No hard borders: white
 * paper, space and a soft shadow (rule 29d). */
/* the counter keeps to the start corner only (main sets both insets, so its box spanned the card top and sat under the speaker) */
.gm-scard .gm-n{inset-inline-end:auto}
.gm-crow{display:flex;align-items:center;justify-content:center;gap:clamp(12px,2.2vw,26px);min-width:0}
.gm-crow .gm-q{flex:1 1 auto;min-width:0}
.gm-cpic{flex:none;margin:0;width:clamp(84px,12vw,150px);padding:6px 6px 14px;background:#fff;border-radius:6px;box-shadow:0 6px 16px rgba(0,0,0,.22);transform:rotate(-3deg)}
html[dir=rtl] .gm-cpic{transform:rotate(3deg)}
.gm-cpic-img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:3px}
.gm-cpic-glass{object-fit:contain;padding:6px;background:#fff8ec}
.gm-cpic-face{display:grid;place-items:center;width:100%;aspect-ratio:1;border-radius:3px;background:color-mix(in srgb,var(--c) 30%,#fff8ec);overflow:hidden}
.gm-cpic-face .face-img{width:100%;height:100%;object-fit:cover;object-position:50% 20%}
.gm-cpic-face svg{width:60%;height:auto}
.gm-say{position:absolute;top:6px;inset-inline-end:8px;width:44px;height:44px;border-radius:50%;border:0;padding:0;display:grid;place-items:center;
  background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--ink);cursor:pointer;transition:background .15s ease-out,transform .15s ease-out}
.gm-say:hover{background:color-mix(in srgb,var(--accent) 28%,transparent)}
.gm-say:active{transform:scale(.94)}
.gm-say:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.gm-say .ic-spk{width:26px;height:26px}
.gm-say.on{background:var(--accent);color:#fff}
.gm-say.on .w1{animation:spkW 1s ease-in-out infinite}.gm-say.on .w2{animation:spkW 1s .18s ease-in-out infinite}
.gm-say.mute{opacity:.45}
@keyframes spkW{50%{opacity:.25}}
.gm-scard.in{animation:cardIn .42s cubic-bezier(.2,1.25,.4,1) both}
@keyframes cardIn{from{opacity:0;transform:translateY(18px) scale(.97)}}
/* on the clay plate of main's asset buttons: the face at the start of the plate, the name after it (the plate keeps its
 * shape at any width; only --bh grows so the face has room). Right and wrong marks are main's pictures. */
.gm-opts.chips.faces{gap:clamp(10px,1.6vw,16px)}
.gm-opts.chips.faces .gm-opt{--bh:72px;gap:10px;padding-inline:0 4px;white-space:nowrap}
.gm-opts.chips.faces .gm-t{font-size:clamp(17px,1.7vw,20px);line-height:1.1}
.gm-pf{display:grid;place-items:center;width:calc(var(--bh) * .74);margin-inline-start:calc(var(--bh) * -.3);aspect-ratio:1;border-radius:50%;overflow:hidden;flex:none;
  background:color-mix(in srgb,var(--c,#888) 35%,var(--paper));box-shadow:0 0 0 3px var(--paper),0 3px 8px rgba(0,0,0,.3)}
.gm-pf img{width:100%;height:100%;object-fit:cover}
.gm-pf-i{background:var(--c,#888)}
.gm-pf-i svg{width:70%;height:auto;margin-top:18%}
.gm-opt.right .gm-pf{animation:pfPop .6s cubic-bezier(.2,1.5,.4,1) both}
@keyframes pfPop{0%{transform:scale(1)}35%{transform:scale(1.28) translateY(-6px)}65%{transform:scale(.94)}100%{transform:scale(1.08)}}
@media (max-height:480px){
  .gm-cpic{width:clamp(64px,10vw,96px);padding:4px 4px 9px}
  .gm-say{width:44px;height:44px;top:2px}
  .gm-opts.chips.faces .gm-opt{--bh:56px;gap:6px}
  .gm-opts.chips.faces .gm-t{font-size:15px}
}
/* a narrow phone: the picture above the sentence, small, so the sentence keeps the card's whole width */
@media (max-width:520px) and (orientation:portrait){ .gm-crow{flex-direction:column;gap:8px} .gm-crow .gm-q{flex:none;width:100%} .gm-cpic{width:84px;padding:4px 4px 9px} .gm-opts.chips.faces .gm-opt{--bh:60px} }
@media (prefers-reduced-motion:reduce){ .gm-scard.in,.gm-opt.right .gm-pf,.gm-say.on .w1,.gm-say.on .w2{animation:none} }

/* ---------- one continuous game (8 Nov 2026): a chapter that goes on opens behind the fade the last one closed on ---------- */
#fade{position:fixed;inset:0;z-index:200;background:#1b2236;opacity:0;pointer-events:none;transition:opacity .6s ease}
#fade.on,html.fading #fade{opacity:1}
html.fading #fade{transition:opacity .7s ease}
@media (prefers-reduced-motion:reduce){ #fade,html.fading #fade{transition:none} }
#goal[hidden]{display:none}
/* two lines said together in the talk card */
.tk-line .tk-p{display:block}
.tk-line .tk-p+.tk-p{margin-top:.45em}

/* ---------- quiz: the true-or-false card with a question and its answers in the kit's order ---------- */
.gm-q-quiz .gm-opts.two.long .gm-opt{font-size:clamp(15px,1.9vw,18px);line-height:1.25}
.gm-q-quiz .gm-opts.long{grid-template-columns:1fr 1fr!important}
.gm-q-quiz .gm-opts.longer{grid-template-columns:1fr!important;max-width:760px;margin-inline:auto}
.gm-q-quiz .gm-opts.longer .gm-opt{height:auto;min-height:56px;white-space:normal}
.gm-q-quiz .gm-opts.longer .gm-t{white-space:normal;overflow:visible;text-overflow:clip}
@media (max-height:480px){ .gm-q-quiz .gm-opts.longer{grid-template-columns:1fr 1fr!important;max-width:none;gap:8px} .gm-q-quiz .gm-opts.longer .gm-opt{min-height:44px;padding-block:4px;font-size:13px;line-height:1.2} .gm-q-quiz .gm-opts.longer .gm-opt:last-child:nth-child(odd){grid-column:1/-1} }
@media (max-height:480px){ .gm-q-quiz .gm-zcard::before{min-height:0} .gm-q-quiz .gm-opts.two.long .gm-opt{font-size:14px} }

/* ---------- collar: the cat's collar put together (games.js collar) ---------- */
.cl-card{width:min(900px,100%);text-align:center;min-height:0;flex:none;padding-top:clamp(30px,5vh,42px)}
.cl-card .st-how{max-width:60ch;margin-inline:auto;line-height:1.45;min-height:2.9em;display:flex;align-items:center;justify-content:center}
.gm-q-collar .gm-body{padding-top:24px}
.cl-stage{display:grid;place-items:center;margin:8px auto 0}
.cl-zone{--zw:min(480px,72vw,calc((100dvh - 540px) * 1.45));position:relative;width:var(--zw);aspect-ratio:1.45/1;border-radius:24px;display:grid;place-items:center;color:rgba(27,34,54,.28);
  background:radial-gradient(closest-side,rgba(255,255,255,.55),rgba(255,255,255,0));transition:transform .18s ease,color .18s ease;animation:clZone .5s ease-out backwards}
@keyframes clZone{from{opacity:0;transform:scale(.94)}}
.cl-zone.over{transform:scale(1.04);color:var(--accent)}
.cl-zone.over .cl-ghost{filter:drop-shadow(0 0 6px rgba(255,255,255,.95))}
.cl-zone:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.cl-ghost{position:absolute;inset:6% 4%;width:92%;height:88%;transition:opacity .25s}
.cl-zone.has .cl-ghost{opacity:0}
.cl-built{position:absolute;inset:0;pointer-events:none}
.cl-colimg{position:absolute;left:5%;top:2%;width:90%;height:auto;opacity:0;transition:transform .45s cubic-bezier(.3,1.35,.5,1);filter:drop-shadow(0 8px 8px rgba(60,30,10,.25))}
.cl-zone.has .cl-colimg{opacity:1}
/* a tag hangs from the collar's ring, the second beside the first */
.cl-hang{position:absolute;top:67%;width:23%;aspect-ratio:9/8;transform-origin:50% 4%;transition:transform .5s cubic-bezier(.3,1.35,.5,1);filter:drop-shadow(0 4px 4px rgba(60,30,10,.25))}
.cl-hang[data-n="0"]{left:58%;rotate:-4deg}.cl-hang[data-n="1"]{left:20%;rotate:5deg}
.cl-hang img,.cl-pic img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-select:none}
/* the shelf: three things, each in a cell of the same size at every step, so nothing moves when a step changes */
.cl-tray{display:flex;justify-content:center;align-items:flex-end;gap:clamp(14px,4vw,48px);width:min(900px,100%);min-height:calc(var(--cs) + 26px);--cs:clamp(84px,13vh,112px)}
.cl-tray.gone{visibility:hidden}
.cl-cell{width:calc(var(--cs) * 1.5);display:grid;place-items:end center}
.cl-it{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px;border:0;border-radius:14px;background:none;color:var(--ink,#1b2236);touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;min-width:44px;min-height:44px;
  transition:translate .35s ease,scale .15s ease,filter .15s ease;animation:clIn .45s calc(var(--i) * 90ms) ease-out backwards}
@keyframes clIn{from{opacity:0;transform:translateY(16px) scale(.9)}}
.cl-pic{position:relative;display:block;width:calc(var(--cs) * 1.45);aspect-ratio:1.69/1}
.cl-tag .cl-pic{width:calc(var(--cs) * 1.1);aspect-ratio:9/8}
.cl-cap{font-size:clamp(13px,2vh,16px);font-weight:600;color:#3d2a17;background:rgba(255,250,235,.85);border-radius:99px;padding:1px 10px}
.cl-it:hover:not(:disabled) .cl-pic{translate:0 -3px;transition:translate .15s}
.cl-it.drag{transition:scale .15s ease,filter .15s ease;scale:1.08;z-index:9;cursor:grabbing;filter:drop-shadow(0 16px 14px rgba(40,20,5,.3))}
.st-it.drag,.pk-it.drag,.pl-it.drag,.cl-it.drag{will-change:translate}
.cl-it.picked{outline:3px solid var(--accent2);outline-offset:2px}
.cl-it:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.cl-it.used{visibility:hidden}
.cl-it.nope{animation:pkNope .45s}
.cl-tray.in .cl-it{animation-name:clIn}
/* the word on a tag: live text, on the tag's face below its ring */
.cl-word{position:absolute;left:10%;right:10%;top:65%;translate:0 -50%;font-size:calc(var(--tw,100px) * .19);font-weight:800;color:#4a3210;line-height:1;text-align:center;text-shadow:0 1px 0 rgba(255,255,255,.5);pointer-events:none}
.cl-pic .cl-word{--tw:calc(var(--cs) * 1.1)}
.cl-word.cl-dig{top:85%;font-size:calc(var(--tw,100px) * .085);font-weight:700;color:#1b2236;letter-spacing:.02em}
.cl-hang .cl-word.cl-dig{font-size:10cqw}
.cl-hang{container-type:inline-size}
.cl-hang .cl-word{font-size:19cqw}
.cl-svg{position:absolute;left:29%;top:39%;width:42%;height:auto;pointer-events:none}
/* all done: the collar lifts, turns gently and shines */
.cl-zone.won .cl-built{animation:clWon 2.6s .1s ease-in-out both}
@keyframes clWon{0%{transform:none}25%{transform:translateY(-12px) rotate(-3deg) scale(1.04)}55%{transform:translateY(-12px) rotate(3deg) scale(1.04)}80%,100%{transform:translateY(-8px) rotate(0) scale(1.03)}}
.cl-stars{position:absolute;inset:-6%;pointer-events:none}
.cl-stars i{position:absolute;width:24px;height:24px;opacity:0}
.cl-stars i svg{width:100%;height:100%;display:block}
.cl-zone.won .cl-stars i{animation:clStar 1.6s calc(.3s + var(--k) * .16s) ease-out both}
@keyframes clStar{0%{opacity:0;transform:scale(.3) rotate(0)}40%{opacity:1;transform:scale(1.1) rotate(40deg)}100%{opacity:0;transform:scale(.6) rotate(90deg) translateY(-12px)}}
@media (max-height:480px){
  .cl-card .gm-tape{display:none}
  .cl-card{display:grid;grid-template-columns:minmax(150px,1fr) auto;column-gap:14px;align-items:center;align-content:center;padding:8px 14px}
  .cl-card>:not(.cl-stage):not(.gm-tape){grid-column:1}
  .cl-stage{grid-column:2;grid-row:1/span 3;margin:0}
  .cl-zone{--zw:min(300px,calc((100dvh - 262px) * 1.45),calc(100vw - 300px))}
  .cl-card .st-title{font-size:17px}.cl-card .st-how{font-size:13px;margin-top:4px}
  .gm-q-collar .gm-st{margin-top:4px;min-height:1.8em;font-size:14px}
  .cl-tray{--cs:clamp(56px,15vh,74px);min-height:calc(var(--cs) + 22px)}
  .cl-cap{font-size:12px}
}
@media (prefers-reduced-motion:reduce){ .cl-zone,.cl-it,.cl-zone.won .cl-built,.cl-zone.won .cl-stars i,.cl-it.nope{animation:none} .cl-colimg,.cl-hang,.cl-it{transition:none} }

/* ---------- chapter 2, stations 2 to 5 (games.js fix, hush, sequence, catch, feed) ---------- */
.gm-pf2{display:inline-flex;flex:none}.gm-pf2 .gm-pf+.gm-pf{margin-inline-start:-12px}
.fx-card,.hs-card,.sq-card,.ct-card,.fd-card{width:min(900px,100%);text-align:center;min-height:0;flex:none;padding-top:clamp(30px,5vh,42px)}
.fx-card .st-how,.hs-card .st-how,.sq-card .st-how,.ct-card .st-how,.fd-card .st-how{max-width:60ch;margin-inline:auto;line-height:1.45}
.gm-q-fix .gm-body,.gm-q-hush .gm-body,.gm-q-sequence .gm-body,.gm-q-catch .gm-body,.gm-q-feed .gm-body{padding-top:24px}
/* fix: the yard's picture, the spray, the guard's hand */
.fx-scene{--fw:min(560px,80vw,calc((100dvh - 525px) * 1.78));position:relative;width:var(--fw);aspect-ratio:1672/941;margin:10px auto 0;border-radius:16px;overflow:hidden;box-shadow:0 6px 16px rgba(40,20,5,.22);transition:transform .18s ease}
.fx-scene img:not(.fx-fly){position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;user-select:none}
.fx-fixed{opacity:0;transition:opacity .8s ease}.fx-scene.fixed .fx-fixed{opacity:1}
.fx-scene.over{transform:scale(1.03)}.fx-scene.over .fx-hand{opacity:1;transform:translate(-50%,-50%) scale(1.15)}
.fx-scene:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.fx-hand{position:absolute;width:24%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);border:3px dashed rgba(255,255,255,.9);box-shadow:0 0 0 3px rgba(255,90,54,.35);opacity:0;transition:opacity .2s,transform .2s;pointer-events:none}
.fx-tray .fx-it .fx-pic{width:calc(var(--cs) * .9);aspect-ratio:1}
.fx-pic img{object-fit:contain}
.fx-spray{position:absolute;left:66%;top:44%;width:16%;height:40%;pointer-events:none;transition:opacity .6s}
.fx-scene.fixed .fx-spray{opacity:0}
.fx-spray i{position:absolute;left:50%;top:0;width:9px;height:12px;border-radius:50%;background:rgba(220,240,255,.85);box-shadow:0 0 4px rgba(255,255,255,.8);animation:fxDrop 1.1s calc(var(--i) * .12s) linear infinite}
@keyframes fxDrop{0%{transform:translate(0,0) scale(.6);opacity:0}15%{opacity:1}100%{transform:translate(calc(-30px - var(--i) * 7px),calc(60px + var(--i) * 6px)) scale(1);opacity:0}}
.fx-fly{position:absolute;z-index:3;height:auto;transition:transform .5s cubic-bezier(.3,1.2,.5,1);filter:drop-shadow(0 6px 6px rgba(0,0,0,.3));transform-origin:50% 50%}
.fx-fly.turn{animation:fxTurn .7s ease-in-out}
@keyframes fxTurn{25%{rotate:-25deg}50%{rotate:5deg}75%{rotate:-25deg}100%{rotate:0deg}}
.fx-scene.won .fx-fly{opacity:0;transition:opacity .4s}
.fx-scene.won .cl-stars i,.hs-card.won .cl-stars i,.ct-card.won .cl-stars i,.fd-worm.won .cl-stars i{animation:clStar 1.6s calc(.2s + var(--k) * .16s) ease-out both}
/* hush: the three hiding places, then the quiet meter and the hold button */
.hs-say{display:inline-block;margin:8px auto 0;padding:8px 16px;max-width:52ch;border-radius:18px;background:#fff;color:#2b2140;font-weight:600;font-size:clamp(15px,2.2vh,18px);line-height:1.4;box-shadow:0 2px 0 rgba(27,34,54,.12)}
.hs-stage{--hp:clamp(110px,24vh,200px);margin-top:10px;min-height:calc(var(--hp) + 34px);display:grid;place-items:center;position:relative}
.hs-places{display:flex;justify-content:center;align-items:flex-end;gap:clamp(12px,4vw,44px)}
.hs-places[hidden]{display:none}
.hs-pl{display:flex;flex-direction:column;align-items:center;gap:6px;padding:4px;border:0;background:none;border-radius:14px;cursor:pointer;animation:clIn .45s calc(var(--i) * 90ms) ease-out backwards}
.hs-pic{display:block;height:var(--hp);width:calc(var(--hp) * 1.3)}
.hs-pic img{display:block;width:100%;height:100%;object-fit:contain;object-position:50% 100%;pointer-events:none;user-select:none;filter:drop-shadow(0 4px 4px rgba(40,20,5,.18))}
.hs-pl:hover:not(:disabled) .hs-pic img{translate:0 -3px}
.hs-pl:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.hs-pl.nope{animation:pkNope .45s}
.hs-pl.yes .hs-pic img{transform:scale(1.1);transition:transform .45s cubic-bezier(.3,1.4,.5,1)}
.hs-pl:disabled{cursor:default;opacity:1}
.hs-quiet[hidden]{display:none}
.hs-quiet{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;align-items:center;justify-items:center;gap:10px 18px}
.hs-shh{grid-row:1/span 2;width:calc(var(--hp) * .6);height:auto;pointer-events:none}
.hs-meter{position:relative;width:min(340px,50vw);aspect-ratio:676/116;background:var(--empty) center/100% 100% no-repeat}
.hs-meter i{position:absolute;inset:0;background:var(--full) center/100% 100% no-repeat;clip-path:inset(0 calc(100% - var(--p,0) * 100%) 0 0);transform:scaleX(-1)}   /* mirrored: it fills from the right, as Hebrew reads */
.hs-hold{width:calc(var(--hp) * .95);min-height:44px;padding:0;border:0;background:none;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transition:transform .12s ease}
.hs-hold img{width:100%;display:block;pointer-events:none;-webkit-touch-callout:none}
.hs-hold.down{transform:scale(.94);filter:brightness(1.06)}
.hs-hold:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:40px}
/* sequence: the events in a numbered column, each with its up and down arrows */
.sq-list{list-style:none;margin:12px auto 0;padding:0;display:grid;gap:8px;width:min(680px,100%)}
.sq-it{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:6px 8px 6px 6px;border-radius:12px;background:#fff;border:2px solid rgba(27,34,54,.12);box-shadow:0 3px 0 rgba(0,0,0,.1);text-align:start;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;transition:transform .22s ease,border-color .2s}
.sq-it.drag{z-index:5;cursor:grabbing;box-shadow:0 12px 22px rgba(0,0,0,.25);transition:none}
.sq-n{width:30px;height:30px;border-radius:50%;background:var(--ink);color:var(--paper);display:grid;place-items:center;font-size:15px;font-weight:600}
.sq-t{font-size:clamp(14px,2vh,17px);font-weight:500;line-height:1.3;color:#1b2236}
.sq-mv{display:flex;gap:4px}
.sq-mv button{width:44px;height:44px;border:0;border-radius:10px;background:rgba(27,34,54,.07);color:#1b2236;display:grid;place-items:center;cursor:pointer}
.sq-mv button svg{width:22px;height:22px}
.sq-mv button:disabled{opacity:.3;cursor:default}
.sq-mv button:focus-visible{outline:3px solid var(--accent)}
.sq-it.lock{border-color:var(--accent2);animation:stLock .35s ease-out}
.sq-go{margin-top:8px;display:flex;justify-content:center}
.sq-card.done .sq-go{visibility:hidden}
/* catch: the counter, the falling things */
.ct-bar{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:6px}
.ct-count{font-size:clamp(15px,2.2vh,18px);font-weight:700;color:#1b2236}
.ct-stars{display:flex;gap:4px}
.ct-stars i{width:30px;height:30px;background:var(--s) calc(var(--k) * 50%) 50%/300% 100% no-repeat;filter:grayscale(1) opacity(.35);transition:filter .3s,transform .3s}
.ct-stars i.on{filter:none;transform:scale(1.15)}
.ct-area{position:relative;margin:8px auto 0;width:min(760px,100%);height:clamp(200px,calc(100dvh - 420px),460px);border-radius:16px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;
  background:linear-gradient(#d6efff,#f3fbff 70%,#e8f6e0);box-shadow:inset 0 0 0 2px rgba(27,34,54,.1)}
.ct-start{position:absolute;inset:0;display:grid;place-items:center}
.ct-ob{position:absolute;left:0;top:0;padding:6px;border:0;background:none;cursor:pointer;touch-action:none;will-change:transform}
.ct-ob img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 4px rgba(0,0,0,.18))}
.ct-ob.ct-no img{animation:pkNope .4s}
.ct-ob.ct-pop img{animation:ctPop .45s ease-out forwards}
@keyframes ctPop{40%{transform:scale(1.25)}100%{transform:scale(.2);opacity:0}}
.ct-spark{position:absolute;width:64px;height:64px;transform:translate(-50%,-50%);pointer-events:none;animation:ctSpark .6s ease-out forwards}
.ct-spark img{width:100%;height:100%;object-fit:contain}
@keyframes ctSpark{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}40%{opacity:1}100%{opacity:0;transform:translate(-50%,-70%) scale(1.2)}}
.ct-won{position:absolute;left:50%;top:50%;width:min(320px,60%);transform:translate(-50%,-50%);animation:ptPop .55s cubic-bezier(.3,1.4,.5,1)}
/* feed: the worm in the middle, the notes on both sides, the stars above */
.fd-prog{display:block;margin:6px auto 0;height:clamp(34px,6vh,52px);width:auto}
.fd-floor{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:clamp(8px,2vw,24px);margin-top:6px}
.fd-side{display:flex;flex-wrap:wrap;justify-content:center;gap:clamp(6px,1.4vh,14px)}
.fd-it{--s:clamp(64px,11vh,100px);width:var(--s);aspect-ratio:1;padding:2px;border:0;background:none;border-radius:12px;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;transition:translate .35s ease,scale .45s ease-in,opacity .3s .2s}
.fd-it img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 3px rgba(40,20,5,.2))}
.fd-it:nth-child(odd) img{rotate:-4deg}.fd-it:nth-child(even) img{rotate:4deg}
.fd-it.drag{transition:none;z-index:9;scale:1.08;cursor:grabbing}
.fd-it.picked{outline:3px solid var(--accent2);outline-offset:2px}
.fd-it.nope{animation:pkNope .45s}
.fd-it.in{scale:.15;opacity:0;pointer-events:none;visibility:hidden;transition:translate .45s ease-in,scale .45s ease-in,opacity .25s .25s,visibility 0s .45s}
.fd-worm{position:relative;width:clamp(170px,min(34vh,30vw),300px);aspect-ratio:338/362}
.fd-img{width:100%;height:100%;display:block;pointer-events:none;user-select:none}
.fd-worm[data-state=eating] .fd-img{animation:fdChew .5s ease-in-out 2}
.fd-worm[data-state=refuse] .fd-img{animation:pkNope .45s}
.fd-worm.won .fd-img{animation:pkHop .6s ease-out}
@keyframes fdChew{50%{transform:scale(1.03,.97)}}
.fd-mouth{position:absolute;width:34%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;cursor:pointer}
.fd-worm.aim .fd-mouth{box-shadow:0 0 0 3px rgba(255,255,255,.9),0 0 0 6px rgba(255,90,54,.45);animation:fdAim 1s ease-in-out infinite}
.fd-mouth.over{box-shadow:0 0 0 4px #fff,0 0 0 8px var(--accent)}
.fd-mouth:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
@keyframes fdAim{50%{transform:translate(-50%,-50%) scale(1.08)}}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
/* the end of a chapter still being made (quest.js chapterEnd): the celebration, its title, one button */
#party .pt-end{position:absolute;left:50%;bottom:max(24px,env(safe-area-inset-bottom));translate:-50% 0;z-index:3}
@media (max-height:480px){
  .fx-card,.hs-card,.sq-card,.ct-card,.fd-card{padding:8px 14px}
  .fx-card .gm-tape,.hs-card .gm-tape,.sq-card .gm-tape,.ct-card .gm-tape,.fd-card .gm-tape{display:none}
  .fx-card .st-title,.hs-card .st-title,.sq-card .st-title,.ct-card .st-title,.fd-card .st-title{font-size:17px}
  .fx-card .st-how,.hs-card .st-how,.sq-card .st-how,.ct-card .st-how,.fd-card .st-how{font-size:13px;margin-top:2px}
  .fx-card{display:grid;grid-template-columns:minmax(150px,1fr) auto;column-gap:14px;align-items:center;align-content:center}
  .fx-card>:not(.fx-scene):not(.gm-tape){grid-column:1}
  .fx-scene{grid-column:2;grid-row:1/span 3;margin:0;--fw:min(240px,calc((100dvh - 280px) * 1.78),calc(100vw - 320px))}
  .fx-tray{--cs:clamp(48px,13vh,56px)}
  .sq-card{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}
  .sq-card>.st-title{display:none}.sq-card>.st-how{grid-column:1;grid-row:1;margin:0}.sq-card>.sq-list,.sq-card>.gm-st{grid-column:1/-1}
  .sq-go{grid-column:2;grid-row:1;margin:0}
  .sq-list{width:100%;grid-template-columns:1fr 1fr;grid-auto-flow:column;grid-template-rows:repeat(3,auto);column-gap:10px}
  .sq-t{font-size:12px;line-height:1.22}.sq-it{padding:0 2px;border-width:1px;gap:6px}.sq-list{row-gap:3px}
  /* chapter 2's own cards (in the story's order, or two columns of answers): no empty row above the question on a short screen */
  .gm-short::before{min-height:0!important}
  .gm-q-truefalse .gm-body:has(.gm-short)>.gm-prompt{display:none}
  .gm-q-fix .gm-body,.gm-q-hush .gm-body,.gm-q-sequence .gm-body,.gm-q-catch .gm-body,.gm-q-feed .gm-body{padding-top:4px}
  .sq-it{grid-template-columns:1fr auto;padding-inline-start:18px}.sq-n{position:absolute;top:-5px;inset-inline-start:-5px;width:20px;height:20px;font-size:11px;z-index:1}.gm-short .gm-q{font-size:clamp(15px,2.4vw,19px)!important}
  .gm-q-choose .gm-opts.long.two-col{grid-template-columns:1fr 1fr!important}
  .hs-say{font-size:13px;padding:4px 12px;margin-top:4px}
  .hs-stage{--hp:clamp(70px,20vh,90px);margin-top:4px}
  .sq-list{gap:4px;margin-top:6px}.sq-it{padding:2px 6px 2px 4px}.sq-t{font-size:13px}.sq-n{width:24px;height:24px;font-size:13px}
  .ct-card{display:grid;grid-template-columns:minmax(150px,1fr) auto;column-gap:14px;align-items:center;align-content:center}
  .ct-card>:not(.ct-area):not(.gm-tape){grid-column:1}
  .ct-bar{flex-direction:column;gap:4px}
  .ct-area{grid-column:2;grid-row:1/span 4;margin:0;width:min(520px,calc(100vw - 290px));height:calc(100dvh - 170px)}
  .fd-it{--s:clamp(48px,13vh,60px)}.fd-worm{width:clamp(110px,32vh,140px)}.fd-prog{height:28px;margin-top:2px}
  .gm-q-fix .gm-st,.gm-q-hush .gm-st,.gm-q-sequence .gm-st,.gm-q-catch .gm-st,.gm-q-feed .gm-st{margin-top:2px;min-height:1.6em;font-size:14px}
}
@media (prefers-reduced-motion:reduce){ .fx-spray i,.fx-fly.turn,.hs-pl,.hs-pl.nope,.sq-it.lock,.ct-ob.ct-no img,.ct-spark,.ct-won,.fd-worm *,.fd-it.nope{animation:none} .fx-spray i{opacity:.6} .sq-it,.fd-it,.fx-fly{transition:none} }

/* ---------- chapter 3's after-games (games.js heart, mitt, veggie, lens, mask; 8 Nov 2026) ---------- */
.ht-card,.mt-card,.vg-card,.ln-card,.mk-card{width:min(900px,100%);text-align:center;min-height:0;flex:none;padding-top:clamp(30px,5vh,42px)}
.ht-card .st-how,.mt-card .st-how,.vg-card .st-how,.ln-card .st-how,.mk-card .st-how{max-width:60ch;margin-inline:auto;line-height:1.45}
.gm-q-heart .gm-body,.gm-q-mitt .gm-body,.gm-q-veggie .gm-body,.gm-q-lens .gm-body,.gm-q-mask .gm-body{padding-top:24px}
.gm-bub{display:inline-flex;align-items:center;gap:10px;text-align:start}
.gm-bub .st-face{flex:none}
/* heart: one heart, a beat when it fills */
.ht-s{min-height:2.9em;display:flex;align-items:center;justify-content:center;font-size:clamp(16px,2.4vh,19px)!important;font-weight:600;opacity:1!important}
.ht-box{position:relative;width:clamp(120px,24vh,210px);aspect-ratio:402/358;margin:6px auto 0}
.ht-img{width:100%;height:100%;object-fit:contain;display:block}
.ht-box.beat .ht-img{animation:htBeat .3s ease-out}
@keyframes htBeat{40%{transform:scale(1.12)}100%{transform:none}}
.ht-box.won .cl-stars i{animation:clStar 1.6s calc(.2s + var(--k) * .16s) ease-out both}
.ht-opts{display:flex!important;flex-wrap:wrap;justify-content:center;gap:10px 14px;margin:10px auto 0}
.ht-opts.gone{visibility:hidden}
/* mitt: the mitt big in the middle, the ant out of its opening */
.mt-stage{position:relative;width:clamp(150px,34vh,300px);aspect-ratio:786/889;margin:8px auto 0}
.mt-mitt{position:absolute;inset:0;padding:0;border:0;background:none;cursor:pointer;border-radius:24px;transform-origin:50% 80%}
.mt-mitt img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none;filter:drop-shadow(0 8px 8px rgba(40,20,5,.22))}
.mt-mitt:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.mt-mitt.shake{animation:mtShake .65s ease-in-out}
@keyframes mtShake{15%{rotate:-14deg}35%{rotate:12deg}55%{rotate:-9deg}75%{rotate:6deg}100%{rotate:0deg}}
.mt-ant{position:absolute;left:var(--mx);top:var(--my);width:34%;height:auto;opacity:0;transform:translate(-50%,-50%) scale(.2);pointer-events:none}
.mt-stage.out .mt-ant{animation:mtAnt 1s cubic-bezier(.3,.9,.5,1) forwards}
@keyframes mtAnt{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}20%{opacity:1;transform:translate(-30%,-40%) scale(.6)}65%{opacity:1;transform:translate(10%,30%) scale(1)}80%{transform:translate(12%,18%) scale(1)}100%{opacity:1;transform:translate(14%,30%) scale(1)}}
.mt-count{display:block;min-height:1.4em;margin-top:6px;font-size:clamp(15px,2.2vh,18px);color:#1b2236}
/* veggie: the pot in the middle, the choices beside it (first half on its right, the rest on its left; 9 Nov 2026: under
   the pot they were cut by the footer), the plant's parts drawn over the pot, the tea on the pot's right. The stage is laid
   out left to right on purpose: the cup tips toward the pot and the pour runs from it. */
.vg-card{--pic:clamp(64px,12vh,104px);--sw:calc(var(--pic) + 14px);--pw:clamp(150px,28vh,240px);--tea:clamp(80px,15vh,130px)}
.vg-stage{direction:ltr;position:relative;display:grid;grid-template-columns:minmax(0,1fr) var(--sw) auto var(--sw) minmax(0,1fr);align-items:center;column-gap:clamp(10px,2.4vw,36px);margin:6px auto 0}
.vg-sl{grid-column:2;grid-row:1}.vg-plant{grid-column:3;grid-row:1}.vg-sr,.vg-tea{grid-column:4;grid-row:1}
.vg-plant{position:relative;width:var(--pw);aspect-ratio:3/4;transform-origin:50% 100%;transition:transform .5s cubic-bezier(.3,1.4,.5,1)}
.vg-plant img{position:absolute;height:auto;display:block}
.vg-pot{left:19%;bottom:0;width:62%;z-index:1}
.vg-leaves{z-index:2}.vg-body{z-index:3}.vg-face{z-index:4}
.vg-plant img.pop{animation:vgPop .4s cubic-bezier(.3,1.5,.5,1)}
@keyframes vgPop{0%{transform:scale(.6);opacity:.3}100%{transform:none;opacity:1}}
.vg-tea{position:relative;z-index:6;justify-self:start;width:var(--tea);padding:0;border:0;background:none;cursor:pointer;transform-origin:20% 70%;transition:transform .5s ease}
.vg-tea[hidden]{display:none}
.vg-tea img{width:100%;display:block;pointer-events:none}
.vg-card.pour .vg-tea{transform:rotate(-28deg) translate(-8px,-6px)}
.vg-pour{position:absolute;inset:0;grid-column:3/5;grid-row:1;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:7}
.vg-pour path{fill:none;stroke:#a7c84a;stroke-width:3;stroke-linecap:round;stroke-dasharray:140;stroke-dashoffset:140;opacity:0;vector-effect:non-scaling-stroke}
.vg-card.pour .vg-pour path{animation:vgPour 1.3s .25s ease-out forwards}
@keyframes vgPour{10%{opacity:.9}70%{stroke-dashoffset:0;opacity:.9}100%{stroke-dashoffset:0;opacity:0}}
.vg-card.grow .vg-plant{transform:scale(1.08);animation:vgShake .5s .1s ease-in-out 2}
@keyframes vgShake{25%{rotate:-3deg}75%{rotate:3deg}}
.vg-steam{position:absolute;left:30%;right:30%;bottom:72%;height:30%;pointer-events:none;opacity:0;transition:opacity .5s;z-index:5}
.vg-card.grow .vg-steam{opacity:1}
.vg-steam i{position:absolute;bottom:0;width:22%;aspect-ratio:1;border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.85),rgba(255,255,255,0));animation:vgSteam 1.6s ease-out infinite}
.vg-steam i:nth-child(1){left:5%}.vg-steam i:nth-child(2){left:40%;animation-delay:.5s}.vg-steam i:nth-child(3){left:72%;animation-delay:1s}
@keyframes vgSteam{0%{transform:translateY(0) scale(.6);opacity:0}30%{opacity:.9}100%{transform:translateY(-120%) scale(1.4);opacity:0}}
.vg-side{direction:rtl;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:clamp(6px,1.6vh,14px);min-width:0}
.vg-opts.gone{visibility:hidden}
.vg-opt{display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px;min-width:44px;min-height:44px;border:0;background:none;border-radius:14px;cursor:pointer;animation:clIn .4s calc(var(--i) * 80ms) ease-out backwards}
.vg-opt .cl-cap{line-height:1.2}
.vg-pic{display:block;width:var(--pic);height:var(--pic);overflow:hidden}
.vg-pic img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.vg-opt:hover:not(:disabled) .vg-pic{translate:0 -3px}
.vg-opt.picked{outline:3px solid var(--accent2);outline-offset:0}
.vg-opt:focus-visible,.vg-tea:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.vg-card .gm-st{margin-top:clamp(4px,1.2vh,10px)}
/* lens: the scene, a real magnifier over it */
.ln-scene{position:relative;width:min(760px,100%,calc((100dvh - 330px) * 1.777));aspect-ratio:1672/941;margin:8px auto 0;border-radius:14px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;cursor:none;box-shadow:0 6px 16px rgba(40,20,5,.22)}
.ln-pic{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.ln-lens{position:absolute;pointer-events:none;z-index:3}
.ln-zoom{position:absolute;inset:-3%;border-radius:50%;overflow:hidden;background:#f3ead8;isolation:isolate}
.ln-zin{position:absolute;left:2.8302%;top:2.8302%;transform-origin:0 0}   /* 3/106: the zoom bleeds 3% of the lens under the rim; its copy starts at the lens's own corner */
.ln-zin .ln-tag{transition:none}
.ln-zoom::after{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;background:radial-gradient(circle at 32% 26%,rgba(255,255,255,.45) 0 9%,rgba(255,255,255,.12) 22%,transparent 46%),linear-gradient(150deg,transparent 55%,rgba(255,255,255,.14) 70%,transparent 78%);box-shadow:inset 0 0 0 2px rgba(255,255,255,.35),inset 0 -6px 14px rgba(20,40,70,.22)}
.ln-glass{position:absolute;max-width:none;height:auto;pointer-events:none;filter:drop-shadow(0 6px 6px rgba(0,0,0,.3));-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.ln-tag{position:absolute;transform:translate(-50%,-50%) scale(.6);padding:4px 12px;border-radius:99px;background:#fff;color:#1b2236;font-weight:700;font-size:clamp(12px,1.8vh,16px);white-space:nowrap;box-shadow:0 0 0 3px var(--accent2),0 0 18px 6px rgba(255,214,90,.75);opacity:0;transition:opacity .3s,transform .35s cubic-bezier(.3,1.5,.5,1);z-index:2;pointer-events:none}
.ln-tag.on{opacity:1;transform:translate(-50%,-50%) scale(1)}
.ln-key{position:absolute;width:44px;height:44px;transform:translate(-50%,-50%);border:0;padding:0;background:none;opacity:0;z-index:4;pointer-events:none}
.ln-key:focus-visible{opacity:1;outline:3px solid var(--accent);border-radius:50%}
.ln-count{font-weight:700;color:#1b2236}
/* mask: the mask in the middle, the parts by kind */
.mk-floor{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:clamp(8px,2vw,24px);margin-top:8px}
.mk-side{display:flex;flex-direction:column;gap:10px;align-items:center}
.mk-group{display:flex;flex-direction:column;align-items:center;gap:4px}
.mk-gname{font-size:clamp(13px,1.9vh,15px);font-weight:700;color:#3d2a17}
.mk-row{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.mk-it{--s:clamp(54px,9vh,84px);width:calc(var(--s) * 1.3);height:var(--s);padding:4px;border:0;border-radius:12px;background:rgba(27,34,54,.05);touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;transition:translate .35s ease,scale .15s}
.mk-it img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.mk-it.drag{transition:none;z-index:9;scale:1.08;cursor:grabbing}
.mk-it.picked{outline:3px solid var(--accent2);outline-offset:2px}
.mk-it.on{background:rgba(255,196,61,.28);box-shadow:inset 0 0 0 2px var(--accent2)}
.mk-it:focus-visible{outline:3px solid var(--accent)}
.mk-face{position:relative;width:clamp(140px,26vh,260px);padding-top:30%;border-radius:20px;transition:transform .18s}
.mk-face.over{transform:scale(1.04)}
.mk-face:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.mk-in{position:relative;width:100%}
.mk-base{width:100%;display:block;filter:drop-shadow(0 8px 8px rgba(40,20,5,.22))}
.mk-on{position:absolute;height:auto;pointer-events:none}
.mk-on[hidden]{display:none}
.mk-on.snap{animation:mkSnap .35s cubic-bezier(.3,1.5,.5,1)}
@keyframes mkSnap{0%{transform:scale(1.25);opacity:.4}100%{transform:none;opacity:1}}
.mk-face.wobble .mk-in{animation:mkWob .9s ease-in-out}
@keyframes mkWob{20%{transform:rotate(-6deg) scale(1.05)}40%{transform:rotate(6deg) scale(1.05)}60%{transform:rotate(-4deg)}80%{transform:rotate(3deg)}}
.mk-done:disabled{opacity:.5;filter:grayscale(.6)}
@media (max-height:480px){
  .ht-card,.mt-card,.vg-card,.ln-card,.mk-card{padding:8px 14px}
  .ht-card .gm-tape,.mt-card .gm-tape,.vg-card .gm-tape,.ln-card .gm-tape,.mk-card .gm-tape{display:none}
  .ht-card .st-title,.mt-card .st-title,.vg-card .st-title,.ln-card .st-title,.mk-card .st-title{font-size:17px}
  .ht-card .st-how,.mt-card .st-how,.vg-card .st-how,.ln-card .st-how,.mk-card .st-how{font-size:13px;margin-top:2px}
  .gm-q-heart .gm-body,.gm-q-mitt .gm-body,.gm-q-veggie .gm-body,.gm-q-lens .gm-body,.gm-q-mask .gm-body{padding-top:4px}
  .gm-bub{font-size:12.5px;padding:3px 10px;margin-top:2px}.gm-bub .st-face{width:28px;height:28px}
  .ht-card{display:grid;grid-template-columns:1fr auto;column-gap:14px;align-items:center}
  .ht-card>:not(.ht-box):not(.gm-tape){grid-column:1}
  .ht-box{grid-column:2;grid-row:1/span 5;width:clamp(100px,30vh,140px);margin:0}
  .ht-s{min-height:2.4em;font-size:14px!important}
  .ht-opts{gap:6px 8px;margin-top:4px}
  .mt-card,.vg-card{display:grid;grid-template-columns:1fr auto;column-gap:14px;align-items:center}
  .mt-card>:not(.mt-stage):not(.gm-tape),.vg-card>:not(.vg-stage):not(.gm-tape){grid-column:1}
  .mt-stage{grid-column:2;grid-row:1/span 5;width:clamp(100px,calc((100dvh - 170px) * .88),190px);margin:0}
  .vg-stage{grid-column:2;grid-row:1/span 5;margin:0;column-gap:8px;grid-template-columns:0 var(--sw) auto var(--sw) 0}
  .vg-card{--pw:clamp(100px,calc((100dvh - 185px) * .75),170px);--pic:clamp(44px,calc((100dvh - 230px) / 2.4),60px);--tea:clamp(60px,15vh,80px)}
  .vg-side{gap:4px}
  .vg-opt{padding:2px}.vg-opt .cl-cap{font-size:12.5px}
  .ln-scene{width:min(560px,100%,calc((100dvh - 215px) * 1.777));margin-top:4px}
  .mk-card{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}
  .mk-card>.st-title{grid-column:1;grid-row:1}.mk-card>.sq-go{grid-column:2;grid-row:1;margin:0}
  .mk-card>.st-how,.mk-card>.mk-floor,.mk-card>.gm-st{grid-column:1/-1}
  .mk-floor{grid-template-columns:auto auto auto;gap:8px;margin-top:2px}
  .mk-it{--s:44px;width:56px}
  .mk-gname{font-size:12px}
  .mk-side{gap:2px}
  .mk-face{width:clamp(84px,calc((100dvh - 250px) * .62),130px)}
  .mk-side{gap:4px}
}
@media (prefers-reduced-motion:reduce){ .ht-box.beat .ht-img,.mt-mitt.shake,.vg-plant img.pop,.vg-card.grow .vg-plant,.vg-steam i,.mk-on.snap,.mk-face.wobble .mk-in,.vg-opt{animation:none} .mt-stage.out .mt-ant{animation:none;opacity:1;transform:translate(14%,30%)} .vg-plant,.vg-tea,.ln-tag{transition:none} }

/* ---------- tunnel: Yuli's imagined tunnel (games.js tunnel; chapter 4, mission 1) ---------- */
.tn-card{width:min(900px,100%);text-align:center;min-height:0;flex:none;padding-top:clamp(30px,5vh,42px)}
.tn-card .st-how{max-width:60ch;margin-inline:auto;line-height:1.45}
.gm-q-tunnel .gm-body{padding-top:24px}
/* the earth board (drawn here until Omri's board picture comes): three empty sockets, left to right; the pieces overlap
   a little at the joins, the middle one under its neighbours, so the corridor runs on without a gap or a step */
.tn-board{--pw:min(200px,24vw,calc((100dvh - 470px) * .98));position:relative;display:flex;justify-content:center;align-items:center;margin:10px auto 0;padding:14px 18px;width:max-content;max-width:100%;border-radius:22px;
  background:radial-gradient(circle at 20% 30%,rgba(255,255,255,.12) 0 6%,transparent 7%),radial-gradient(circle at 75% 70%,rgba(0,0,0,.08) 0 5%,transparent 6%),linear-gradient(#a8693a,#8a5229);box-shadow:inset 0 4px 0 rgba(255,255,255,.18),inset 0 -6px 0 rgba(0,0,0,.15),0 6px 14px rgba(40,20,5,.25);overflow:hidden}
.tn-socket{position:relative;width:var(--pw);aspect-ratio:590/601;border-radius:18%;border:3px dashed rgba(255,236,200,.55);background:rgba(50,25,8,.28);box-shadow:inset 0 6px 12px rgba(0,0,0,.25);transition:transform .18s,border-color .18s}
.tn-socket+.tn-socket{margin-left:calc(var(--pw) * -.075)}
.tn-socket[data-s="1"]{z-index:1}.tn-socket[data-s="0"],.tn-socket[data-s="2"]{z-index:2}
.tn-socket.over{border-color:#fff;transform:scale(1.03)}
.tn-board.has-pic{display:block;padding:0;width:min(100%,calc(var(--pw) * 2.6 + 60px));aspect-ratio:var(--br);background:none;box-shadow:none;border-radius:0;overflow:visible;filter:drop-shadow(0 6px 10px rgba(40,20,5,.25))}
.tn-bg{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.tn-board.has-pic .tn-socket{position:absolute;aspect-ratio:auto;margin:0;border:3px dashed rgba(255,236,200,.45);background:none;box-shadow:none;border-radius:16%}
.tn-board.has-pic .tn-socket.full{border-color:transparent}
.tn-board.has-pic .tn-in{inset:2%;width:96%;height:96%}
.tn-socket:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.tn-socket.full{border-color:transparent;background:none;box-shadow:none}
.tn-in{position:absolute;inset:-3px;width:calc(100% + 6px);height:calc(100% + 6px);object-fit:contain;pointer-events:none;transition:transform .4s cubic-bezier(.3,1.3,.5,1)}
.tn-light{position:absolute;left:0;top:38%;height:34%;width:22%;border-radius:50%;background:radial-gradient(closest-side,rgba(255,236,150,.95),rgba(255,200,80,.55) 45%,rgba(255,200,80,0));mix-blend-mode:screen;opacity:0;z-index:3;pointer-events:none}
.tn-board.lit .tn-light{animation:tnLight 1.4s ease-in-out forwards}
@keyframes tnLight{0%{opacity:0;transform:translateX(-30%)}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translateX(480%)}}
.tn-tray{--cs:clamp(70px,13vh,120px)}
.tn-cell{width:calc(var(--cs) * 1.2)}
.tn-it{width:var(--cs);aspect-ratio:590/601;padding:0;border:0;background:none;border-radius:16%;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;transition:translate .35s ease,scale .15s ease,filter .15s;filter:drop-shadow(0 4px 4px rgba(40,20,5,.25))}
.tn-it img{width:100%;height:100%;display:block;pointer-events:none}
.tn-it.drag{transition:scale .15s,filter .15s;scale:1.08;z-index:9;cursor:grabbing;filter:drop-shadow(0 14px 12px rgba(40,20,5,.3))}
.tn-it.picked{outline:3px solid var(--accent2);outline-offset:2px}
.tn-it:focus-visible{outline:3px solid var(--accent)}
.tn-it.used{visibility:hidden}
.tn-it.nope{animation:pkNope .45s}
@media (max-height:480px){
  .tn-card{padding:8px 14px}.tn-card .gm-tape{display:none}.tn-card .st-title{font-size:17px}.tn-card .st-how{font-size:13px;margin-top:2px}
  .gm-q-tunnel .gm-body{padding-top:4px}
  .tn-board{--pw:min(150px,calc((100dvh - 290px) * .98));padding:8px 10px;margin-top:4px}
  .tn-board.has-pic{width:200px;padding:0;margin-top:2px}
  .tn-card:has(.has-pic) .st-how{display:none}
  .tn-tray{--cs:clamp(48px,14vh,58px)}
}
@media (max-height:380px){
  .tn-board.has-pic{width:164px}
  .tn-board.has-pic .tn-socket::after{content:"";position:absolute;inset:-4px}
}
@media (prefers-reduced-motion:reduce){ .tn-board.lit .tn-light{animation:none;opacity:.8;left:40%} .tn-in,.tn-it{transition:none} .tn-it.nope{animation:none} }

/* ---------- chapter 4, missions 2 to 5 (games.js twirl, basket, sticks, pet; the order's marks) ---------- */
.tw-card,.bk-card,.sk-card,.pe-card{width:min(900px,100%);text-align:center;min-height:0;flex:none;padding-top:clamp(30px,5vh,42px)}
.tw-card .st-how,.bk-card .st-how,.sk-card .st-how,.pe-card .st-how{max-width:60ch;margin-inline:auto;line-height:1.45}
.gm-q-twirl .gm-body,.gm-q-basket .gm-body,.gm-q-sticks .gm-body,.gm-q-pet .gm-body{padding-top:24px}
.sq-it.at{border-color:#7cbf4a;box-shadow:0 3px 0 rgba(0,0,0,.1),inset 0 0 0 2px rgba(124,191,74,.5)}
.sq-it.at::after{content:"";position:absolute;inset-inline-end:-8px;top:-8px;width:22px;height:22px;background:url(assets/ui/mark-ok.webp) center/contain no-repeat}
.sq-it.off{border-color:rgba(232,140,60,.6);border-style:dashed}
/* twirl: the plate, the strands drawn in code, the fork turning on its own axis, the coil growing */
.tw-pc{font-weight:700;color:#1b2236;font-variant-numeric:tabular-nums}
.tw-stage{position:relative;width:clamp(200px,40vh,340px);aspect-ratio:1/1.05;margin:8px auto 0;touch-action:none}
.tw-dish{position:absolute;left:4%;right:4%;bottom:2%;height:44%;border-radius:50%;background:radial-gradient(ellipse at 50% 45%,#fff 0 54%,#f3e6dc 55% 72%,#e8d3c4 73%);box-shadow:0 6px 10px rgba(60,30,10,.18)}
.tw-plate{position:absolute;left:4%;width:92%;bottom:2%;height:auto;pointer-events:none;transition:opacity .2s}
.tw-pile{position:absolute;left:14%;width:72%;bottom:13%;height:auto;pointer-events:none;transform-origin:50% 90%;filter:drop-shadow(0 3px 3px rgba(120,50,10,.25))}
.tw-card.won .tw-pile{opacity:0;transition:opacity .6s}
.tw-strands{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.tw-s{fill:none;stroke:#f2a33a;stroke-width:2.2;stroke-linecap:round;vector-effect:non-scaling-stroke;filter:drop-shadow(0 1px 0 #c86a1d)}
.tw-fork{position:absolute;left:35%;width:30%;top:-4%;height:58%;padding:0;border:0;background:none;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.tw-spin{position:absolute;left:50%;top:50%;width:180%;transform-origin:50% 50%;translate:-50% -50%;pointer-events:none}
.tw-spin img{width:100%;display:block;filter:drop-shadow(0 4px 4px rgba(0,0,0,.2))}
.tw-coil{position:absolute;left:-20%;width:140%;bottom:-8%;height:70%;overflow:visible;pointer-events:none}
.tw-coil ellipse{fill:rgba(242,163,58,.55);stroke:#e88a2a;stroke-width:2.4;stroke-dasharray:10 5}
.tw-fork:focus-visible{outline:3px solid var(--accent);outline-offset:4px;border-radius:12px}
.tw-fork.down .tw-spin img{filter:drop-shadow(0 6px 8px rgba(0,0,0,.28))}
.tw-done{position:absolute;left:18%;width:64%;top:2%;height:auto;opacity:0;transform:scale(.92);transition:opacity .7s ease,transform .7s cubic-bezier(.3,1.4,.5,1);pointer-events:none}
.tw-card.won .tw-done{opacity:1;transform:none}
.tw-card.won .tw-fork,.tw-card.won .tw-strands{opacity:0;transition:opacity .6s}
.tw-card.won .tw-plate{opacity:.15}
/* basket: the play area, the apple, the basket and its front rim */
.bk-n{font-weight:700;color:#1b2236}
.bk-area{position:relative;margin:8px auto 0;width:min(720px,100%);height:clamp(220px,calc(100dvh - 420px),440px);border-radius:16px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;cursor:ew-resize;
  background:linear-gradient(#e9f4ff,#f7fbff 65%,#efe2d0);box-shadow:inset 0 0 0 2px rgba(27,34,54,.1)}
.bk-area:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.bk-apple{position:absolute;left:0;top:0;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 4px rgba(0,0,0,.18));will-change:transform;transition:opacity .25s}
.bk-apple.miss{opacity:.55}
.bk-basket{position:absolute;bottom:4px;width:clamp(90px,22%,170px);aspect-ratio:868/762;pointer-events:none}
.bk-basket img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.bk-front{clip-path:inset(var(--my) 0 0 0)}
.bk-in{position:absolute;left:12%;right:12%;top:30%;height:22%}
.bk-kept{position:absolute;top:0;width:34%;height:auto;translate:-50% 0}
.bk-basket.got{animation:pkGulp .35s}
.bk-card.won .cl-stars i{animation:clStar 1.6s calc(.2s + var(--k) * .16s) ease-out both}
/* sticks: the floor with the sticks, the gathering zone */
.sk-play{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;margin-top:8px}
.sk-floor{position:relative;overflow:hidden;height:clamp(180px,calc(100dvh - 470px),360px);border-radius:16px;background:linear-gradient(#f5e6cf,#ead3b2);box-shadow:inset 0 0 0 2px rgba(27,34,54,.08)}
.sk-it{position:absolute;width:42%;height:auto;min-height:44px;padding:8px 0;border:0;background:none;transform:rotate(var(--a));touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;transition:translate .35s ease,scale .15s}
.sk-it img{width:100%;display:block;pointer-events:none;filter:drop-shadow(0 3px 2px rgba(60,30,10,.25))}
.sk-it.drag{transition:none;scale:1.06;z-index:9;cursor:grabbing}
.sk-it.picked{outline:3px solid var(--accent2);outline-offset:2px;border-radius:12px}
.sk-it:focus-visible{outline:3px solid var(--accent);border-radius:12px}
.sk-it.used{visibility:hidden}
.sk-zone{position:relative;width:clamp(120px,22vw,200px);height:clamp(120px,22vh,190px);border-radius:18px;border:3px dashed rgba(27,34,54,.3);background:rgba(255,255,255,.55);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:8px;transition:transform .18s,border-color .18s}
.sk-zone.over{transform:scale(1.04);border-color:var(--accent)}
.sk-zone.got{animation:pkGulp .3s}
.sk-zone:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.sk-zname{font-weight:700;font-size:clamp(13px,1.9vh,15px);color:#3d2a17}
.sk-n{font-size:clamp(15px,2.2vh,18px);color:#1b2236}
.sk-pile{position:absolute;left:8%;right:8%;bottom:12%;height:40%}
.sk-in{position:absolute;left:0;width:100%;bottom:calc(var(--k) * 9%);rotate:calc(var(--k) * 4deg - 10deg);filter:drop-shadow(0 2px 2px rgba(60,30,10,.25))}
/* pet: the meter, the cat with its swaying tail, the hearts */
.pe-meter{position:relative;width:min(340px,60vw);aspect-ratio:810/131;margin:6px auto 0;background:var(--empty) center/100% 100% no-repeat}
.pe-meter i{position:absolute;inset:0;background:var(--full) center/100% 100% no-repeat;clip-path:inset(0 calc((1 - var(--p,0)) * 84%) 0 0)}
.pe-cat{position:relative;width:clamp(170px,36vh,300px);aspect-ratio:493/486;margin:6px auto 0;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
.pe-cat:focus-visible{outline:3px solid var(--accent);outline-offset:4px;border-radius:16px}
.pe-cat img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.pe-tail{animation:peTail 2.4s ease-in-out infinite alternate}
@keyframes peTail{from{rotate:-10deg}to{rotate:10deg}}
.pe-happy{opacity:0;transition:opacity .6s}
.pe-cat.happy .pe-happy{opacity:1}.pe-cat.happy .pe-body{opacity:0;transition:opacity .6s}
.pe-zone{position:absolute;border-radius:40%;pointer-events:none}
.pe-cat.stroke .pe-body{animation:peLean .5s ease-in-out infinite alternate}
@keyframes peLean{to{transform:translateY(1.5%) scaleY(.99)}}
.pe-hearts{position:absolute;inset:0;pointer-events:none}
.pe-hearts i{position:absolute;left:calc(15% + var(--k) * 13%);top:20%;width:16px;height:16px;background:#ff5a8a;rotate:45deg;opacity:0;border-radius:3px}
.pe-hearts i::before,.pe-hearts i::after{content:"";position:absolute;width:16px;height:16px;border-radius:50%;background:inherit}
.pe-hearts i::before{left:-8px;top:0}.pe-hearts i::after{left:0;top:-8px}
.pe-cat.happy .pe-hearts i{animation:peHeart 1.8s calc(var(--k) * .18s) ease-out infinite}
@keyframes peHeart{0%{opacity:0;transform:translateY(0) scale(.6)}30%{opacity:1}100%{opacity:0;transform:translateY(-70px) scale(1.1)}}
@media (max-height:480px){
  .tw-card,.bk-card,.sk-card,.pe-card{padding:8px 14px}
  .tw-card .gm-tape,.bk-card .gm-tape,.sk-card .gm-tape,.pe-card .gm-tape{display:none}
  .tw-card .st-title,.bk-card .st-title,.sk-card .st-title,.pe-card .st-title{font-size:17px}
  .tw-card .st-how,.bk-card .st-how,.sk-card .st-how,.pe-card .st-how{font-size:13px;margin-top:2px}
  .gm-q-twirl .gm-body,.gm-q-basket .gm-body,.gm-q-sticks .gm-body,.gm-q-pet .gm-body{padding-top:4px}
  .tw-card,.pe-card{display:grid;grid-template-columns:1fr auto;column-gap:14px;align-items:center}
  .tw-card>:not(.tw-stage):not(.gm-tape),.pe-card>:not(.pe-cat):not(.gm-tape){grid-column:1}
  .tw-stage{grid-column:2;grid-row:1/span 5;width:clamp(120px,calc((100dvh - 170px) * .95),190px);margin:0}
  .pe-cat{grid-column:2;grid-row:1/span 5;width:clamp(110px,calc((100dvh - 170px) * 1),190px);margin:0}
  .pe-meter{width:min(240px,40vw)}
  .bk-card{display:grid;grid-template-columns:minmax(150px,1fr) auto;column-gap:14px;align-items:center;align-content:center}
  .bk-card>:not(.bk-area):not(.gm-tape){grid-column:1}
  .bk-area{grid-column:2;grid-row:1/span 4;margin:0;width:min(480px,calc(100vw - 300px));height:calc(100dvh - 170px)}
  .sk-floor{height:calc(100dvh - 235px)}.sk-zone{height:calc(100dvh - 235px);width:120px}
}
@media (prefers-reduced-motion:reduce){ .pe-tail,.pe-cat.stroke .pe-body,.pe-hearts i,.bk-basket.got,.sk-zone.got{animation:none} .tw-done,.tw-plate,.sk-it{transition:none} }

/* ---------- patch: mend the socks (games.js patch; chapter 5, mission 1) ---------- */
.pa-card{width:min(900px,100%);text-align:center;min-height:0;flex:none;padding-top:clamp(30px,5vh,42px)}
.pa-card .st-how{max-width:60ch;margin-inline:auto;line-height:1.45}
.gm-q-patch .gm-body{padding-top:24px}
.pa-n{font-weight:700;color:#1b2236}
.pa-socks{display:flex;justify-content:center;gap:clamp(10px,3vw,40px);margin-top:8px}
.pa-sock{position:relative;height:clamp(150px,calc(100dvh - 600px),280px);aspect-ratio:604/986}
.pa-sock>img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none;filter:drop-shadow(0 6px 6px rgba(40,20,5,.2))}
.pa-hole{position:absolute;aspect-ratio:1;transform:translate(-50%,-50%) rotate(var(--r));border-radius:50%;transition:box-shadow .15s}
.pa-hole.over{box-shadow:0 0 0 4px rgba(255,255,255,.9),0 0 0 7px var(--accent)}
.pa-hole:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.pa-on{position:absolute;left:0;top:50%;width:100%;height:auto;translate:0 -50%;transition:transform .45s cubic-bezier(.3,1.3,.5,1);filter:drop-shadow(0 2px 2px rgba(60,30,10,.3))}
.pa-hole.full{animation:paStitch .6s .4s ease-out}
@keyframes paStitch{40%{box-shadow:0 0 0 3px rgba(255,255,255,.95),0 0 14px 6px rgba(255,214,90,.7)}100%{box-shadow:none}}
.pa-tray{--cs:clamp(64px,12vh,100px)}
.pa-cell{width:calc(var(--cs) * 1.3)}
.pa-it{width:var(--cs);height:var(--cs);padding:4px;border:0;background:none;border-radius:14px;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;transition:translate .35s ease,scale .15s}
.pa-it img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 3px rgba(40,20,5,.25))}
.pa-it.drag{transition:none;scale:1.08;z-index:9;cursor:grabbing}
.pa-it.picked{outline:3px solid var(--accent2);outline-offset:2px}
.pa-it:focus-visible{outline:3px solid var(--accent)}
.pa-it.used{visibility:hidden}
.pa-it.nope{animation:pkNope .45s}
@media (max-height:480px){
  .pa-card{padding:8px 14px;display:grid;grid-template-columns:1fr auto;column-gap:14px;align-items:center}.pa-card .gm-tape{display:none}
  .pa-card>:not(.pa-socks):not(.gm-tape){grid-column:1}
  .pa-socks{grid-column:2;grid-row:1/span 4;margin:0}
  .pa-card .st-title{font-size:17px}.pa-card .st-how{font-size:13px;margin-top:2px}
  .gm-q-patch .gm-body{padding-top:4px}
  .pa-sock{height:calc(100dvh - 265px)}
  .pa-tray{--cs:clamp(48px,13vh,58px)}
}
@media (prefers-reduced-motion:reduce){ .pa-hole.full,.pa-it.nope{animation:none} .pa-on,.pa-it{transition:none} }

/* ---------- chapter 5, missions 2 to 5: jump, gum, cats, memories (games.js) ---------- */
.jp-card,.gb-card,.kt-card,.mm-card{width:min(980px,100%);text-align:center;min-height:0;flex:none;padding-top:clamp(30px,5vh,42px)}
.jp-card .st-how,.gb-card .st-how,.kt-card .st-how,.mm-card .st-how{max-width:62ch;margin-inline:auto;line-height:1.45}
.gm-q-jump .gm-body,.gm-q-gum .gm-body,.gm-q-cats .gm-body,.gm-q-memories .gm-body{padding-top:24px}

/* jump */
.jp-top{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:8px;flex-wrap:wrap}
.jp-meter{position:relative;width:min(340px,70%);height:22px;border-radius:12px;background:#2b2a4a;box-shadow:inset 0 2px 4px rgba(0,0,0,.4),0 0 0 3px #a46be8;overflow:hidden}
.jp-meter b{position:absolute;inset:0 auto 0 0;width:0;background:linear-gradient(90deg,#7fd36a,#f2d53c 55%,#ff8a3d);border-radius:12px}
.jp-gold{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(135deg,rgba(255,214,90,.35) 0 6px,rgba(255,240,170,.55) 6px 12px);box-shadow:inset 0 0 0 2px #ffd34d;z-index:1}
.jp-meter[dir],.jp-meter{direction:ltr}
.jp-tries{font-weight:700;color:#1b2236;font-variant-numeric:tabular-nums}
.jp-stage{position:relative;width:min(100%,calc((100dvh - 420px) * 2.71),900px);aspect-ratio:1518/560;margin:10px auto 0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:pointer;border-radius:16px;background:linear-gradient(#cfe9ff,#eef7ff 60%,transparent 60%);outline:none}
.jp-stage:focus-visible{box-shadow:0 0 0 3px var(--accent)}
.jp-pit{position:absolute;left:0;bottom:0;width:100%;height:auto;pointer-events:none}
.jp-zone{position:absolute;bottom:9%;height:17%;border-radius:40%;background:radial-gradient(ellipse,rgba(255,226,92,.55),rgba(255,200,40,.25) 70%,transparent 72%);box-shadow:0 0 18px 4px rgba(255,214,90,.35);pointer-events:none;animation:jpGold 1.6s ease-in-out infinite alternate}
@keyframes jpGold{to{opacity:.6}}
.jp-dents{position:absolute;inset:0;pointer-events:none}
.jp-dent{position:absolute;bottom:13%;width:13%;translate:-50% 0;opacity:.85}
.jp-shoes{position:absolute;width:15.5%;aspect-ratio:235/215;pointer-events:none;transform-origin:50% 100%;transition:opacity .25s}
.jp-shoes.gone{opacity:0}
.jp-shoes img{position:absolute;left:50%;bottom:0;translate:-50% 0;height:auto;opacity:0;transition:opacity .12s;filter:drop-shadow(0 5px 4px rgba(0,0,0,.18))}
.jp-stand{width:100%}.jp-air{width:123%}.jp-land{width:174%;translate:-50% 14% !important}
.jp-shoes[data-pose=stand] .jp-stand,.jp-shoes[data-pose=air] .jp-air,.jp-shoes[data-pose=land] .jp-land{opacity:1}
.jp-stage.hold .jp-shoes{animation:jpCrouch .5s ease-in-out infinite alternate}
@keyframes jpCrouch{to{scale:1.03 .95}}
.jp-burst{position:absolute;bottom:20%;width:0;height:0;pointer-events:none}
.jp-burst i{position:absolute;width:9px;height:9px;border-radius:50%;background:#e2b46a;opacity:0}
.jp-burst.puff i{animation:jpSand .7s ease-out forwards}
@keyframes jpSand{0%{opacity:1;transform:rotate(var(--a)) translateX(0)}100%{opacity:0;transform:rotate(var(--a)) translateX(var(--d)) translateY(14px)}}
.jp-far{position:absolute;bottom:46%;translate:-50% 0;padding:4px 10px;border-radius:12px;background:#fff;color:#1b2236;font-weight:700;box-shadow:0 3px 8px rgba(0,0,0,.18);opacity:0;pointer-events:none;white-space:nowrap;direction:rtl}
.jp-far.on{animation:jpFar .35s cubic-bezier(.3,1.5,.5,1) forwards}
@keyframes jpFar{from{opacity:0;transform:translateY(8px) scale(.8)}to{opacity:1;transform:none}}

/* gum */
.gb-n{font-weight:700;color:#1b2236;font-variant-numeric:tabular-nums}
.gb-stage{display:flex;justify-content:center;margin-top:6px}
.gb-machine{position:relative;height:clamp(220px,calc(100dvh - 430px),470px);touch-action:none;user-select:none;-webkit-user-select:none}
.gb-body{width:100%;height:100%;display:block;pointer-events:none;filter:drop-shadow(0 8px 8px rgba(60,20,40,.22))}
.gb-grab{position:absolute;aspect-ratio:279/191;cursor:grab;border-radius:40%;touch-action:none}
.gb-grab img{width:100%;height:100%;display:block;pointer-events:none;filter:drop-shadow(0 3px 3px rgba(0,0,0,.25))}
.gb-grab.down{cursor:grabbing}
.gb-grab:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.gb-ball{position:absolute;width:19%;left:var(--mx);top:var(--my);translate:-50% -50%;opacity:0;pointer-events:none;filter:drop-shadow(0 4px 3px rgba(80,0,40,.3))}
.gb-card.won .gb-ball{animation:gbOut 1s cubic-bezier(.4,.1,.5,1) forwards}
@keyframes gbOut{0%{opacity:0;scale:.35;left:var(--mx);top:var(--my)}20%{opacity:1}55%{scale:1;left:var(--mx);top:var(--ty)}80%{left:var(--tx);top:var(--ty);rotate:200deg}90%{top:calc(var(--ty) - 1.5%)}100%{opacity:1;scale:1;left:var(--tx);top:var(--ty);rotate:260deg}}
.gb-machine.shake{animation:gbShake .38s ease-in-out}
@keyframes gbShake{20%{rotate:-2deg}45%{rotate:2deg}70%{rotate:-1deg}100%{rotate:0deg}}
.gb-bridge{margin:6px auto 0;max-width:52ch;font-weight:600;color:#5a3b7a;min-height:1.2em}

/* cats */
.kt-top{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:6px}
.kt-n{font-size:clamp(17px,2.4vh,22px);font-weight:800;color:#1b2236;font-variant-numeric:tabular-nums}
.kt-hint{min-height:44px;padding:6px 16px;font-size:15px}
.kt-box{display:flex;justify-content:center;margin-top:8px}
.kt-pic{position:relative;width:min(100%,calc((100dvh - 470px) * var(--ratio)));aspect-ratio:var(--ratio);border-radius:14px;overflow:hidden;box-shadow:0 6px 14px rgba(20,30,60,.25)}
.kt-pic>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.kt-cat{position:absolute;aspect-ratio:1;translate:-50% -50%;min-width:44px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent}
.kt-cat:focus-visible{outline:3px solid #fff;box-shadow:0 0 0 6px var(--accent)}
.kt-ok{position:absolute;left:78%;top:14%;width:clamp(22px,38%,36px);aspect-ratio:1;translate:-50% -50%;scale:0;opacity:0;pointer-events:none}
.kt-ok svg{width:100%;height:100%;display:block;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}
.kt-cat.found .kt-ok{animation:ktPop .45s cubic-bezier(.3,1.6,.5,1) forwards}
.kt-cat.found::after{content:"";position:absolute;inset:18%;border-radius:50%;box-shadow:0 0 0 3px rgba(130,240,140,.9);animation:ktRing .6s ease-out forwards;pointer-events:none}
@keyframes ktPop{from{scale:0;opacity:0}to{scale:1;opacity:1}}
@keyframes ktRing{from{opacity:1;transform:scale(.6)}to{opacity:0;transform:scale(1.5)}}
.kt-cat.glow{animation:ktGlow 1.3s ease-in-out 2}
@keyframes ktGlow{0%,100%{box-shadow:0 0 0 0 rgba(255,236,120,0)}50%{box-shadow:0 0 22px 18px rgba(255,236,120,.55)}}
.kt-cat.found{cursor:default}

/* memories */
.mm-box{display:flex;justify-content:center;margin-top:8px}
.mm-wall{position:relative;width:min(100%,calc((100dvh - 330px) * var(--ratio)));aspect-ratio:var(--ratio);border-radius:14px;overflow:hidden;box-shadow:0 6px 14px rgba(20,30,60,.25)}
.mm-pan{position:absolute;inset:0;transform-origin:0 0;transition:transform .45s cubic-bezier(.3,.9,.4,1)}
.mm-pick{display:none;position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in}
.mm-card.mm-small .mm-pick{display:block}
.mm-card.mm-small .mm-sq{pointer-events:none}
.mm-frame.open .mm-pick{display:none}
.mm-card.mm-zoom .mm-frame:not(.near) .mm-sq{pointer-events:none}
.mm-sq{display:block}
@media (prefers-reduced-motion:reduce){ .mm-pan{transition:none} }
.mm-bg{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.mm-frame{position:absolute;border-radius:10%/8.6%;overflow:hidden}
.mm-pic{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.mm-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(var(--c),1fr);grid-template-rows:repeat(var(--r),1fr)}
.mm-sq{margin:0;padding:0;border:0;border-radius:0;background:#0e0b14;box-shadow:0 0 0 .5px #0e0b14;cursor:pointer;transition:opacity .35s ease,transform .35s ease}
.mm-sq:hover{background:#1a1525}
.mm-sq:focus-visible{outline:2px solid #ffd34d;outline-offset:-3px;z-index:1}
.mm-sq.off{opacity:0;transform:scale(.6);pointer-events:none}
.mm-frame.open{box-shadow:0 0 0 2px rgba(255,236,170,.9),0 0 18px 4px rgba(255,200,90,.5);transition:box-shadow .6s}
.mm-end{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:radial-gradient(ellipse at 50% 45%,rgba(30,12,50,.6),rgba(30,12,50,.82));color:#fff;opacity:0;transition:opacity .6s;padding:8px}
.mm-card.won .mm-end{opacity:1}
.mm-glow{position:absolute;left:50%;top:38%;width:46%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;background:radial-gradient(circle,rgba(255,230,140,.6),transparent 65%);animation:mmGlow 2.4s ease-in-out infinite alternate;pointer-events:none}
@keyframes mmGlow{to{scale:1.15;opacity:.7}}
.mm-trophy{position:relative;height:42%;width:auto;filter:drop-shadow(0 8px 12px rgba(0,0,0,.4));animation:mmIn .8s cubic-bezier(.3,1.5,.5,1) both}
@keyframes mmIn{from{scale:.3;opacity:0}to{scale:1;opacity:1}}
.mm-title{position:relative;margin:4px 0 0;font-size:clamp(18px,2.9vw,34px);font-weight:800;text-shadow:0 2px 6px rgba(0,0,0,.5);display:flex;align-items:center;gap:8px}
.mm-party{width:1.1em;height:1.1em;flex:none}
.mm-sum{position:relative;margin:0;font-size:clamp(14px,1.9vw,22px);font-weight:700;color:#ffe08a}
.mm-text{position:relative;margin:0;font-size:clamp(14px,1.8vw,21px)}
.mm-stars{position:absolute;inset:0;pointer-events:none}
.mm-stars i{position:absolute;width:clamp(14px,2.2vw,26px);color:#ffe27a;animation:mmTw 1.4s ease-in-out calc(var(--k) * .17s) infinite alternate}
.mm-stars i svg{width:100%;height:auto}
@keyframes mmTw{from{opacity:.2;scale:.6}to{opacity:1;scale:1.1}}

@media (max-height:480px){
  .jp-card,.gb-card,.kt-card,.mm-card{padding:8px 14px}
  .jp-card .gm-tape,.gb-card .gm-tape,.kt-card .gm-tape,.mm-card .gm-tape{display:none}
  .jp-card .st-title,.gb-card .st-title,.kt-card .st-title,.mm-card .st-title{font-size:17px}
  .jp-card .st-how,.gb-card .st-how,.kt-card .st-how,.mm-card .st-how{font-size:13px;margin-top:2px}
  .gm-q-jump .gm-body,.gm-q-gum .gm-body,.gm-q-cats .gm-body,.gm-q-memories .gm-body{padding-top:4px}
  .jp-card .gm-bub,.gb-card .gm-bub{display:none}
  .jp-top{margin-top:2px}.jp-meter{height:16px}
  .jp-stage{width:min(100%,calc((100dvh - 262px) * 2.71));margin-top:4px}
  .gb-card{display:grid;grid-template-columns:1fr auto;column-gap:14px;align-items:center}
  .gb-card>:not(.gb-stage):not(.gm-tape){grid-column:1}
  .gb-stage{grid-column:2;grid-row:1/span 6;margin:0}
  .gb-machine{height:calc(100dvh - 190px)}
  .kt-top{margin-top:2px}.kt-hint{min-height:44px;padding:4px 12px;font-size:13px}
  .kt-card{display:grid;grid-template-columns:minmax(150px,1fr) auto;column-gap:12px;align-items:center}
  .kt-card>:not(.kt-box):not(.gm-tape){grid-column:1}
  .kt-box{grid-column:2;grid-row:1/span 4;margin:0}
  .kt-top{flex-direction:column;gap:6px}
  .kt-pic{width:min(calc(100vw - 230px),calc((100dvh - 150px) * var(--ratio)))}
  .mm-wall{width:min(100%,calc((100dvh - 190px) * var(--ratio)))}
  .mm-trophy{height:38%}.mm-title{font-size:16px}.mm-sum{font-size:13px}.mm-text{font-size:12px}
}
@media (prefers-reduced-motion:reduce){ .jp-zone,.jp-stage.hold .jp-shoes,.jp-burst.puff i,.gb-machine.shake,.kt-cat.glow,.mm-glow,.mm-stars i,.mm-trophy{animation:none} .gb-card.won .gb-ball{animation:none;opacity:1;left:var(--tx);top:var(--ty)} .kt-cat.found .kt-ok{animation:none;scale:1;opacity:1} .mm-sq{transition:none} }

/* ===============================================================================================================
   The portrait phone pass (Omri, 9 Nov 2026: he plays on an iPhone held upright, ~390x664 of page): every screen fits
   the play area, nothing under the top bar, nothing cut, no dead space, 44 px targets. Only portrait phones read
   these rules; desktop, tablets and landscape phones are as they were. */
@media (orientation:portrait) and (max-width:600px){
  /* the top bar: a long name or place shrinks with an ellipsis, the close stays on screen */
  .gm-top{gap:8px}
  .gm-who{min-width:0;flex:0 1 auto}
  .gm-whot{min-width:0;display:block}
  .gm-whot b,.gm-whot small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .gm-steps,.wanda-slot{flex:none}
  /* the bottom band: shorter */
  .gm-foot{min-height:64px;padding-top:6px}
  .gm-body{gap:12px;padding-block:4px}
  /* the question cards: thinner frame, a smaller picture, the speaker up in the frame's corner */
  .gm-qcard,.gm-scard{--k:.32}
  .gm-scard::before,.gm-qcard::before{min-height:calc(1.2em + 4px)}
  .gm-scard.has-pic::before{min-height:0}
  .gm-say{top:-24px}
  .gm-cpic{width:clamp(56px,16vw,72px)}
  .gm-crow{gap:6px}
  .gm-qcard .gm-q,.gm-scard .gm-q{font-size:clamp(18px,5vw,22px);line-height:1.25}
  /* answers: a long answer wraps inside a taller pill, never past its edge */
  .gm-opts:not(.pics) .gm-opt{--bh:54px;height:auto;white-space:normal;text-wrap:balance;line-height:1.15;padding-block:4px calc(var(--bh) * .08);font-size:17px}
  .gm-opts.long .gm-opt{font-size:15px}
  .gm-opts{gap:10px 12px}
  .gm-opts.chips.faces .gm-opt{--bh:54px;white-space:normal}
  .gm-opts.chips.faces .gm-t{font-size:15px;line-height:1.1}
  .gm-opts:not(.pics) .gm-t{white-space:normal;overflow:visible;text-overflow:clip;flex:0 1 auto;min-width:0}
  .gm-q-quiz .gm-opts.long{grid-template-columns:1fr!important}
  /* content taller than the play area starts at its top (never cut above, under the top bar); content that fits sits in
     the middle */
  #game .gm:not(.has-scene):not(.gm-ch) .gm-body{justify-content:safe center;padding-top:6px}
  /* the game cards: a lighter frame, the title and the how-to line a size smaller */
  #game .gm-body>.gm-card:not(.gm-qcard):not(.gm-scard):not(.gm-ocard):not(.hd-card){padding:14px 12px 10px;flex:none}
  #game .gm-body>.gm-card:not(.hd-card) .gm-tape{display:none}
  #game .gm-body>.gm-card .st-title{font-size:19px;line-height:1.2;margin-top:0}
  #game .gm-body>.gm-card .st-how{font-size:13.5px;line-height:1.35;margin-top:3px}
  #game .gm-body>.gm-card .gm-bub{font-size:13.5px;line-height:1.35;padding:5px 10px;margin-top:6px}
  #game .gm-body>.gm-card .gm-bub .st-face{width:34px;height:34px}
  #game .gm-body>.gm-card:not(.gm-qcard):not(.gm-scard) .gm-st{margin-top:6px;min-height:2.6em;font-size:14.5px}
  #game .gm-body>.gm-card:not(.gm-qcard):not(.gm-scard) .gm-st .st-t{white-space:normal;text-wrap:balance}
  #game .gm-body>.gm-card:not(.gm-qcard):not(.gm-scard) .gm-st .st-ic{width:30px;height:30px}
}
/* a short portrait phone (375x560 and the like) */
@media (orientation:portrait) and (max-width:600px) and (max-height:620px){
  .gm-cpic{width:52px;padding:3px 3px 7px}
  .gm-opts:not(.pics) .gm-opt{--bh:48px;font-size:16px}
  .gm-opts.chips.faces .gm-opt{--bh:50px}
  .gm-prompt{font-size:14px}
}
/* the portrait pass, game by game */
@media (orientation:portrait) and (max-width:600px){
  /* the bag game: the bag on top with its count on it, the six things two rows of three, sized by the screen's height */
  .pk-card .st-how{max-width:none}
  .pk-floor{margin-top:6px;gap:4px 6px}
  .pk-mid{position:relative}
  .pk-bag{width:clamp(80px,calc((100dvh - 344px) * .44),170px)}
  .pk-mid .pk-count{position:absolute;left:50%;bottom:-2px;translate:-50% 0;font-size:14px;padding:1px 12px}
  .pk-it,.pk-it.big{--s:clamp(50px,calc((100dvh - 344px) / 3.6),88px);width:100%;max-width:calc(var(--s) + 40px);padding:2px}
  .pk-it img{width:var(--s)}
  .pk-it span{font-size:13px;line-height:1.15}
  /* the hiding places: all three side by side, as wide as the card */
  .hs-places{width:100%;gap:6px;flex-wrap:nowrap}
  .hs-pl{flex:1 1 0;min-width:0}
  .hs-stage{--hp:clamp(70px,calc((100dvh - 420px) * .7),130px)}
  .hs-pic{width:100%;max-width:calc(var(--hp) * 1.3)}
  /* the story in order: the numbers small on the card's corner so the words get the width; on a short screen the check
     sits beside the how-to line, as on a landscape phone */
  .sq-list{gap:5px;margin-top:8px}
  .sq-it{grid-template-columns:1fr auto;padding:3px 6px 3px 4px;padding-inline-start:16px;gap:6px}
  .sq-n{position:absolute;top:-6px;inset-inline-start:-6px;width:22px;height:22px;font-size:12px;z-index:1}
  .sq-t{font-size:13.5px;line-height:1.25}
  .sq-mv{gap:2px}
  .sq-go{margin-top:6px}
  /* the worm: its food in two columns beside it, sized by the screen's height */
  .fd-floor{gap:6px;margin-top:4px}
  .fd-it{--s:clamp(48px,calc((100dvh - 360px) / 4.2),66px)}
  .fd-side{gap:4px}
  .fd-worm{width:clamp(130px,calc((100dvh - 330px) * .62),210px)}
  .fd-prog{height:30px;margin-top:4px}
  /* the plant: as tall as the screen allows and as wide as the choices beside it leave */
  .vg-card{--pic:clamp(52px,calc((100dvh - 330px) / 3.4),76px);--pw:clamp(110px,min(calc((100dvh - 330px) * .75),calc(100vw - 2 * var(--sw) - 76px)),220px);--tea:clamp(64px,calc(var(--sw) + 6px),96px)}
  .vg-stage{margin-top:2px;column-gap:6px}
  .vg-side{gap:6px}
  .vg-opt{padding:2px}
  /* the mask: the face on top, the three groups of parts as rows under it, the done button beside the title */
  .mk-card{display:grid;grid-template-columns:1fr auto;column-gap:10px;align-items:center}
  .mk-card>.st-title{grid-column:1;grid-row:1;text-align:start}.mk-card>.sq-go{grid-column:2;grid-row:1;margin:0}
  .mk-card>.st-how,.mk-card>.mk-floor,.mk-card>.gm-st{grid-column:1/-1}
  .mk-done{--bh:46px;font-size:16px;padding-inline:4px}
  .mk-floor{display:flex;flex-direction:column;align-items:stretch;gap:5px;margin-top:4px}
  .mk-side{display:contents}
  .mk-face{--fw:clamp(84px,calc((100dvh - 400px) * .6),180px);order:-1;align-self:center;width:var(--fw);padding-top:calc(var(--fw) * .3)}
  .mk-group{flex-direction:row;justify-content:center;gap:6px}
  .mk-gname{flex:none;width:3.6em;text-align:start;font-size:13px}
  .mk-row{flex-wrap:nowrap;gap:5px}
  .mk-it{--s:46px;width:calc(var(--s) * 1.25)}
  /* the spaghetti and the cat: sized by the screen's height */
  .tw-stage{width:clamp(150px,calc((100dvh - 330px) * .95),300px);margin-top:4px}
  .pe-cat{width:clamp(130px,calc((100dvh - 380px) * .95),280px);margin-top:4px}
  .pe-meter{margin-top:4px}
  /* the socks: shorter, so the patches under the card stay on screen */
  .pa-sock{height:clamp(96px,calc(100dvh - 440px),240px)}
  .pa-socks{margin-top:4px}
  /* the plaster: the arm as wide as the card */
  .pl-stage{width:min(100%,calc((100dvh - 350px) * 1.5));margin-top:4px}
  .pl-tray{gap:10px}
  /* Aviv's story has no bottom band: its cards stay clear of the wave at the bottom */
  #game .gm-q-story .gm-body{padding-bottom:clamp(44px,9dvh,64px)}
  .gm-q-story{--sth:clamp(110px,calc((100dvh - 330px) / 2),160px)}
  /* the riddle's head: the place goes under the ribbon when both do not fit on one row */
  .ch-head{flex-wrap:wrap;row-gap:2px}
  .ch-tag{max-width:100%;min-width:0;font-size:15px;padding:0 20px}
  /* a question over the place's picture (the gate): the thinner frame too, smaller picture answers, and the clue line
     and the continue button share the bottom band's one row (one shows while the other hides) */
  .has-scene .gm-qcard{--k:.32}
  .has-scene .gm-qcard .gm-q{font-size:clamp(17px,4.6vw,19px)}
  .gm-opts.pics .gm-pic{height:clamp(48px,calc((100dvh - 400px) / 3),96px)}
  .gm-opts.pics{gap:8px}
  .has-scene .gm-foot>*{grid-area:1/1}
  /* the riddle asked: its question never shrinks under the answer row */
  .ch-panel[data-step=ask] .ch-main,.ch-panel[data-step=solved] .ch-main{flex:none}
  /* "who" answers that are two people: one per row, so both faces and both names fit */
  .gm-opts.chips.faces:has(.gm-pf2){grid-template-columns:1fr}
  .gm-opts.chips.faces:has(.gm-pf2) .gm-opt{width:min(100%,300px);justify-self:center;white-space:nowrap}
  /* the heart's four answers two by two */
  .ht-opts{display:grid!important;grid-template-columns:1fr 1fr;gap:8px 10px;width:100%}
  .ht-opts .gm-opt{width:100%}
  /* the order game: the five events two by two, each wraps inside its pill */
  .gm-q-order .gm-opts.chips{grid-template-columns:1fr 1fr}
  .gm-q-order .gm-opts.chips .gm-opt{white-space:normal;line-height:1.15;height:auto;min-height:var(--bh);padding-block:3px calc(var(--bh) * .08)}
  .gm-q-order .gm-opts.chips .gm-opt:last-child:nth-child(odd){grid-column:1/-1;justify-self:center;width:calc(50% - 4px)}
}
@media (orientation:portrait) and (max-width:600px) and (max-height:620px){
  .sq-card{display:grid;grid-template-columns:1fr auto;column-gap:10px;align-items:center}
  .sq-card>.st-title{display:none}.sq-card>.st-how{grid-column:1;grid-row:1;margin:0;text-align:start}.sq-card>.sq-list,.sq-card>.gm-st{grid-column:1/-1}
  .sq-go{grid-column:2;grid-row:1;margin:0}
  .sq-check{--bh:46px;font-size:16px}
  .gm-ch .ch-panel{margin-block:auto;max-height:none}
  .gm-q-order .gm-ocard .gm-slot{min-height:28px}
  .gm-q-order .gm-opts.chips{gap:6px 8px}
  .gm-q-order .gm-opts.chips .gm-opt{font-size:13px;line-height:1.1}
  .sq-t{font-size:13px;line-height:1.2}
}
/* the menu open on a portrait phone: the route chip behind it steps aside, so no half chip peeks out beside the menu */
@media (orientation:portrait) and (max-width:600px){ body:has(#menu:not([hidden])) #goal{visibility:hidden} }
/* the order game's long sentences (chapters 2, 4, 5, Omri 9 Nov 2026): a sentence wraps inside its button, never past it */
.gm-q-order .gm-opts.chips .gm-opt .gm-t{flex:1 1 auto;min-width:0;white-space:normal;overflow-wrap:break-word;text-align:center}
.gm-q-order .gm-opts.chips .gm-opt{height:auto;min-height:var(--bh);padding-block:8px}
/* three answers in two columns (Omri, 9 Nov 2026): the odd one out (games.js marks it gm-odd) sits on its own row,
 * centred under the two above, as wide as one of them, on one line when it fits */
.gm-opts .gm-opt.gm-odd{grid-column:1/-1;justify-self:center;width:calc(50% - 6px);min-width:min(100%,max-content)}
.gm-opts .gm-opt.gm-odd .gm-t{white-space:nowrap}
@media (max-width:899px){ .gm-opts .gm-opt.gm-odd{width:calc(50% - 6px);min-width:0} .gm-opts .gm-opt.gm-odd .gm-t{white-space:normal} }
/* the shake count in the card's top right corner (Omri, 9 Nov 2026), where the ant that drops out never covers it */
.mt-card{position:relative}
.mt-card .mt-count{position:absolute;top:12px;right:14px;margin:0;min-height:0;padding:4px 12px;border-radius:99px;background:#fff4d6;border:2px solid #f59e0b;font-size:clamp(14px,2vh,17px);z-index:3}
.mt-card .mt-count:empty{display:none}
/* room under the mitt for the ant that drops out, so it lands above the words, not on them */
@media (min-height:501px){ .mt-card .mt-stage{margin-bottom:clamp(30px,7vh,62px)} }

/* the cat game fits: a smaller meter and cat, so the words under the cat are never cut (Omri, 9 Nov 2026) */
.pe-card .pe-meter{width:min(250px,46vw)}
.pe-card .pe-cat{width:clamp(150px,30vh,250px)}
/* the seven cats picture bigger and a little lower (Omri, 9 Nov 2026): it takes the empty room under it */
@media (min-height:501px){ .kt-box{margin-top:clamp(10px,2.4vh,24px)} .kt-pic{width:min(100%,calc((100dvh - 425px) * var(--ratio)))} }
/* the challenge version (challenges.js): a Nickflix game full screen over the world */
#chal{position:fixed;inset:0;z-index:2147483000;background:#0b1020}
#chal iframe{display:block;width:100%;height:100%;border:0}
/* the HUD's top (Omri, 12 Nov 2026): the five clue slots and their pill a little smaller; the menu disc the size of the
   accessibility disc beside it (a11y.png's disc is 46px tall in its 60x48 box), never squeezed by a full row, with no
   shadow at all; the GPS card at the screen's left edge with nothing behind it (the .glass blur drew a pale box) */
#clues{gap:4px;padding:5px 9px}
.clue{width:33px;height:33px}
.clue-n{font-size:13px}
#menuBtn{width:46px;height:46px;flex:none;filter:none}
#goal{left:max(12px,env(safe-area-inset-left));right:auto;margin-inline-end:0;-webkit-backdrop-filter:none;backdrop-filter:none}
/* with Wanda's head in the row on a narrow phone the slots give the room, not the menu */
@media (max-width:440px){ .hud-top:has(.wanda-slot:not(:empty)){gap:8px} .hud-top:has(.wanda-slot:not(:empty)) .clue{width:24px;height:24px} .hud-top:has(.wanda-slot:not(:empty)) #clues{gap:3px;padding:5px 8px} }
/* the question card's speaker (Omri, 12 Nov 2026): in the question's own row, after the text (on its left in Hebrew)
   with a gap, centred on the text's height, and the two centred together in the card (it sat up in the frame's top) */
.gm-scard .gm-crow{flex-direction:row;align-items:center;justify-content:center;gap:12px}
.gm-scard .gm-crow .gm-q{flex:0 1 auto;width:auto;min-width:0}
.gm-scard .gm-say{position:static;flex:none;top:auto}
@media (max-width:520px) and (orientation:portrait){ .gm-scard.has-pic .gm-crow{flex-direction:column;gap:8px} .gm-scard .gm-crow{gap:8px} }
/* the question in the middle of the card as the eye sees it (Omri, 12 Nov 2026): the card's left slice carries more
   rim and splash than its right (cream from 64px of 190 on the left, 20px of 110 on the right), so the content box
   moves right by half the difference */
.gm-qcard,.gm-scard{padding-left:calc(44px * var(--k) + 6px)}
/* every clue found: the count gives way to "all the clues are yours" in two short lines, the slots a little smaller */
#clues.all .clue{width:28px;height:28px}
#clues.all{gap:3px}
.clue-all{font-size:11.5px;font-weight:700;line-height:1.1;white-space:nowrap;text-align:center;opacity:1}
/* the question card (Omri, 12 Nov 2026): the speaker in the card's top-left corner, just inside the rim, mirroring the
   counter at the top right (the cream starts 66px down and 68px in on q-card.webp, 12px more for its round corner;
   the box's padding edge is 100px down and 190px in, all times --k); the question alone in the middle, in a narrower column on a wide screen */
@media (min-width:900px){ .gm-scard .gm-crow .gm-q{max-width:72%;text-wrap:balance} }
.gm-scard .gm-say{position:absolute;top:calc(6px - 22px * var(--k));left:calc(8px - 110px * var(--k));right:auto;margin:0;z-index:2}

/* the end of the book (party, last chapter): the celebration stays, with play again and the map under it */
.pt-head .pt-done{margin-top:10px;font-weight:800;font-size:clamp(17px,3vh,22px)}
.pt-end-row{position:absolute;left:50%;bottom:max(28px,env(safe-area-inset-bottom));translate:-50% 0;z-index:3;display:flex;gap:12px;flex-wrap:wrap;justify-content:center;width:min(560px,calc(100% - 32px));animation:ptRowIn .5s ease both}
.pt-end-row button{min-height:52px;min-width:180px;font-size:18px}
@keyframes ptRowIn{from{opacity:0;translate:-50% 14px}to{opacity:1;translate:-50% 0}}

/* the speed boost sits under the compass pill, never on it (Omri, 12 Nov 2026): the goal's top + its height (--gh) + a gap */
#boost{--gh:clamp(76px,9vw,96px);top:calc(max(10px,env(safe-area-inset-top)) + 58px + var(--gh) + 26px)}
@media (max-height:500px){ #boost{--gh:60px} }
@media (orientation:portrait) and (max-width:600px){ #boost{--gh:76px} }
/* the question card's speaker keeps clear of the rim (Omri, 12 Nov 2026) */
.gm-scard .gm-say{top:calc(18px - 22px * var(--k));left:calc(24px - 110px * var(--k))}

/* ---------- the chapter map, Omri's reference (19 Nov 2026, quest/docs/omri-ref/chapter-map-reference.webp; both
   versions of the book): the orange glossy frame with its honey drop (frame.webp, border-sliced so its corners never
   stretch), a sunny meadow inside it (meadow.webp) with a bench, rocks, flowers, bushes and the sleeping cat, the book's
   name on a cream pill on the frame's top, the title between yellow sparkle marks, a sand road with white dashes from
   chapter 1 on the right, orange ring medallions with a cream card under each, grey padlocks, green check badges, rays
   and a soft glow on the chapter to play next (it bobs gently, never with reduced motion). Pictures: assets/ui/chapter-map/.
   --k is the frame's scale (frame.webp px to screen px); the card is a size container, so the meadow's things and the
   medallions are sized from its height (cqh) and width (cqw). ---------- */
#epmap{position:fixed;inset:0;z-index:17;display:grid;place-items:center;padding:12px;background:radial-gradient(120% 90% at 50% 40%,rgba(10,22,60,.32),rgba(6,12,32,.72));-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.ep-card{--k:.92;--pill:58px;position:relative;isolation:isolate;container-type:size;display:flex;flex-direction:column;align-items:center;text-align:center;color:#3b1f0b;
  width:min(calc(100vw - 24px),1120px,calc((100dvh - 24px) * 1.34));height:min(calc(100dvh - 24px),860px);
  padding:calc(87px * var(--k) + var(--pill) / 2 + 2px) calc(46px * var(--k)) calc(34px * var(--k)) calc(66px * var(--k));zoom:var(--a11y-zoom,1)}
.cm-frame{position:absolute;inset:0;z-index:2;pointer-events:none;border-style:solid;border-color:transparent;
  border-width:calc(180px * var(--k)) calc(90px * var(--k)) calc(90px * var(--k)) calc(200px * var(--k));border-image:url("assets/ui/chapter-map/frame.webp") 180 90 90 200 stretch;
  filter:drop-shadow(0 16px 24px rgba(0,8,30,.45))}
.cm-scene{position:absolute;z-index:0;left:calc(40px * var(--k));top:calc(87px * var(--k));right:calc(17px * var(--k));bottom:calc(17px * var(--k));border-radius:calc(56px * var(--k));overflow:hidden;
  background:url("assets/ui/chapter-map/meadow.webp") 50% 100%/cover no-repeat,linear-gradient(#3aa2ec,#8fd6f5 30%,#8ccf52 52%,#5fae2e)}
.cm-d{position:absolute;height:auto;pointer-events:none;user-select:none;filter:drop-shadow(0 3px 2px rgba(40,60,10,.25))}
.cm-bush-b{left:-3%;bottom:-4%;width:24cqh}
.cm-rock-grey{left:-2%;bottom:-2%;width:19cqh}
.cm-bench{left:3%;bottom:9%;width:21cqh}
.cm-flower-big{left:13%;top:60%;width:6.5cqh}
.cm-grass-a{left:20%;bottom:-3%;width:15cqh}
.cm-flower-small{left:51%;bottom:16%;width:5.2cqh}
.cm-rock-pink{left:1%;bottom:33%;width:11cqh}
.cm-grass-b{right:19%;bottom:-3%;width:12cqh}
.cm-bush-a{right:-4%;bottom:-4%;width:26cqh}
.cm-cat{right:6%;bottom:12%;width:17cqh;filter:drop-shadow(0 5px 3px rgba(40,60,10,.3))}
.cm-flower-big.cm-f2{left:auto;top:auto;right:2%;bottom:21%;width:6cqh}
.ep-head,.ep-road,.ep-status,.ep-go{position:relative;z-index:3}
.ep-head{flex:none;width:100%}
.ep-title{position:absolute;left:50%;top:calc(-1 * var(--pill) / 2 - 2px);translate:-50% -50%;z-index:4;display:inline-flex;align-items:center;justify-content:center;max-width:calc(100% - 40px);height:var(--pill);padding:0 clamp(18px,3cqw,38px);
  border-radius:999px;background:linear-gradient(#fffaf0,#fde9c4);border:3px solid #f39a1e;box-shadow:inset 0 2px 0 #fff,0 0 0 3px #ffd36b,0 5px 0 #c96a0a,0 8px 14px rgba(80,30,0,.3);
  color:#3b1f0b;font-weight:800;font-size:clamp(16px,2.6cqw,27px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-head h2{display:flex;align-items:center;justify-content:center;gap:clamp(6px,1.4cqw,16px);margin:clamp(2px,1.4cqh,12px) 0 0;font-size:clamp(26px,min(8cqh,6cqw),62px);font-weight:800;line-height:1.05;color:#4a230c;
  text-shadow:0 0 1px #fff,2px 2px 0 #fff,-2px 2px 0 #fff,2px -2px 0 #fff,-2px -2px 0 #fff,0 3px 0 #fff,0 6px 8px rgba(60,30,0,.35)}
.cm-spark{flex:none;width:clamp(26px,7.5cqh,60px);height:auto}
.ep-head h2 .cm-spark:last-child{transform:scaleX(-1)}   /* the rays point away from the title on both sides */
.ep-sub{margin:clamp(2px,.8cqh,8px) auto 0;max-width:46ch;font-size:clamp(13px,2.4cqh,19px);font-weight:600;color:#2b1a0c;text-shadow:0 0 6px rgba(255,255,255,.95),0 0 2px #fff;text-wrap:balance}
.ep-road{flex:1 1 auto;width:100%;min-height:0;margin:0}
.ep-path{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.ep-path.tall{display:none}
.ep-path path{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.ep-path .cm-edge{--rw:clamp(18px,5.4cqh,40px);stroke:#c47f3e;stroke-width:var(--rw)}
.ep-path .cm-sand{stroke:#f6d29a;stroke-width:calc(var(--rw,clamp(18px,5.4cqh,40px)) - 8px)}
.ep-path .ep-trail{opacity:.55}
.ep-path .cm-dash{stroke:#fff;stroke-width:3.5;stroke-dasharray:10 12;opacity:.95}
.ep-stop{--dw:clamp(48px,min(15cqh,calc(64cqw / var(--n,5))),118px);position:absolute;left:var(--x);top:var(--y);translate:-50% calc(var(--dw) * -.5);display:flex;flex-direction:column;align-items:center;gap:clamp(2px,.8cqh,8px);
  background:none;border:0;padding:0;cursor:pointer;font:inherit;color:inherit;min-width:44px;min-height:44px;-webkit-tap-highlight-color:transparent}
.ep-dot{position:relative;display:grid;place-items:center;flex:none;width:var(--dw);aspect-ratio:174/178;background:url("assets/ui/chapter-map/ring-a.webp") center/contain no-repeat;
  color:#3d1f0b;font-weight:800;font-size:calc(var(--dw) * .44);filter:drop-shadow(0 5px 5px rgba(60,30,0,.3));transition:transform .15s}
.ep-dot b{position:relative;z-index:2;line-height:1;font-variant-numeric:lining-nums;translate:0 -2%}
.ep-stop.locked .ep-dot{background-image:url("assets/ui/chapter-map/lock.webp");aspect-ratio:164/167}
.ep-stop.locked{cursor:default}
.ep-dot .ep-won{position:absolute;z-index:3;width:46%;height:auto;right:-10%;bottom:-6%;filter:drop-shadow(0 2px 2px rgba(0,0,0,.25))}
.ep-stop.now .ep-dot{filter:drop-shadow(0 0 calc(var(--dw) * .16) rgba(255,214,60,.95)) drop-shadow(0 5px 5px rgba(60,30,0,.3));animation:cmBob 2.4s ease-in-out infinite}
.ep-stop.now .ep-dot::before{content:"";position:absolute;z-index:1;left:-18.8%;top:-38.2%;width:136.4%;aspect-ratio:225/238;background:url("assets/ui/chapter-map/ring-rays.webp") center/contain no-repeat;animation:cmRays 1.8s ease-in-out infinite}
.ep-stop.now .ep-dot::after{content:"";position:absolute;z-index:3;right:-4%;top:6%;width:22%;aspect-ratio:1;background:#fff;clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%);animation:cmTwinkle 2.4s ease-in-out infinite}
@keyframes cmBob{50%{transform:translateY(calc(var(--dw) * -.06))}}
@keyframes cmRays{50%{transform:scale(1.04);opacity:.85}}
@keyframes cmTwinkle{0%,60%,100%{opacity:0;transform:scale(.4)}75%{opacity:1;transform:scale(1) rotate(45deg)}}
.ep-stop:hover .ep-dot{transform:translateY(-3px)}
.ep-stop:focus{outline:none}
.ep-stop:focus-visible .ep-dot{filter:drop-shadow(0 0 0 #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px rgba(255,170,40,.95))}
.ep-name{display:flex;flex-direction:column;align-items:center;justify-content:center;width:max-content;max-width:clamp(92px,calc(76cqw / var(--n,5)),186px);padding:clamp(3px,.8cqh,8px) clamp(8px,1.4cqw,16px);
  border-radius:clamp(12px,2.4cqh,22px);background:linear-gradient(#fffcf4,#fdebc9);border:2px solid #f2c27e;box-shadow:inset 0 2px 0 #fff,0 4px 0 rgba(170,100,30,.28),0 6px 10px rgba(60,30,0,.18);
  color:#3b1f0b;font-weight:800;font-size:clamp(12px,2.7cqh,21px);line-height:1.18;text-wrap:balance}
.ep-name small{display:block;font-size:inherit;font-weight:800}
.ep-stop.locked .ep-name{color:#5a4632}
.ep-stop.shake{animation:epShake .4s}
@keyframes epShake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.ep-status{flex:none;margin:clamp(2px,.8cqh,8px) 0 clamp(4px,1.2cqh,12px);padding:clamp(3px,.7cqh,7px) clamp(14px,2.4cqw,26px);border-radius:999px;background:linear-gradient(#fffcf4,#fdebc9);border:2px solid #f2c27e;box-shadow:0 3px 0 rgba(170,100,30,.25);
  color:#3b1f0b;font-size:clamp(13px,2.5cqh,20px);font-weight:700;max-width:100%}
.ep-status:empty{visibility:hidden;padding-block:0;min-height:clamp(14px,3cqh,26px);border:0;box-shadow:none;background:none}
.ep-go{flex:none;justify-content:center;width:100%;flex-wrap:nowrap;margin-bottom:calc(14px * var(--k))}
.ep-go>button:not([hidden]){flex:0 1 auto;padding-inline:clamp(22px,4cqw,48px)}
.ep-go .go,.ep-go .ghost{--bh:clamp(46px,9.6cqh,74px);white-space:nowrap;font-size:clamp(16px,3.6cqh,28px);font-weight:800}
.ep-go .ep-on{display:inline-flex;align-items:center;justify-content:center;gap:.5em;min-width:min(56cqw,620px);max-width:min(100%,78cqw)}
.ep-go .ep-on span{overflow:hidden;text-overflow:ellipsis}
.cm-chev{flex:none;width:1.1em;height:1.1em}
html[dir=ltr] .cm-chev{transform:scaleX(-1)}
.ep-go .ep-again{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:min(40cqw,420px)}
.ep-again-i{flex:none;width:34px;height:34px;padding:5px;border-radius:50%;background:#fff;color:#4c8d12;box-shadow:0 2px 0 rgba(0,0,0,.18);transition:transform .35s ease}
@media (hover:hover){ .ep-again:hover .ep-again-i{transform:rotate(200deg)} }
/* between two chapters (Omri, 9 Nov 2026): the chapter just won gets its tick, the road draws on to the next stop, and
   the next stop's padlock gives way to its number (episodes.js fresh) */
.ep-piece{transition:stroke-dashoffset 1.2s ease-in-out .45s}
.ep-stop.fresh .ep-won{animation:epTick .6s cubic-bezier(.3,1.6,.5,1) .1s both}
@keyframes epTick{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}
.ep-road.advance:not(.arrived) .ep-stop.opening .ep-dot{background-image:url("assets/ui/chapter-map/lock.webp");animation:none;filter:drop-shadow(0 5px 5px rgba(60,30,0,.3))}
.ep-road.advance:not(.arrived) .ep-stop.opening .ep-dot::before,.ep-road.advance:not(.arrived) .ep-stop.opening .ep-dot::after{display:none}
.ep-road.advance:not(.arrived) .ep-stop.opening .ep-dot b{opacity:0}
.ep-road.arrived .ep-stop.opening .ep-dot{animation:epOpen .55s cubic-bezier(.3,1.6,.5,1),cmBob 2.4s ease-in-out .55s infinite}
.ep-road.arrived .ep-stop.opening .ep-dot b{animation:epTick .45s ease-out both}
@keyframes epOpen{0%{transform:scale(.8)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){
  .ep-stop.now .ep-dot,.ep-stop.now .ep-dot::before,.ep-stop.shake,.ep-stop.fresh .ep-won,.ep-road.arrived .ep-stop.opening .ep-dot,.ep-road.arrived .ep-stop.opening .ep-dot b{animation:none}
  .ep-stop.now .ep-dot::after{display:none} .ep-piece,.ep-again-i,.ep-dot{transition:none}
}
/* a smaller screen: the frame thinner */
@media (max-width:1100px),(max-height:760px){ .ep-card{--k:.72;--pill:50px} }
/* a sideways phone: the frame thin, no subtitle, the road takes what is left */
@media (max-height:500px){
  .ep-card{--k:.48;--pill:36px;height:calc(100dvh - 16px);width:min(calc(100vw - 16px),calc((100dvh - 16px) * 2.3));padding-inline:calc(60px * var(--k)) calc(46px * var(--k))}
  #epmap{padding:8px}
  .ep-sub{display:none}
  .ep-head h2{font-size:clamp(20px,8.5cqh,30px);margin-top:0}
  .ep-stop{--dw:clamp(44px,15cqh,64px)}
  .ep-name{font-size:13px;padding:2px 8px;border-radius:10px;max-width:clamp(92px,calc(80cqw / var(--n,5)),150px)}
  .ep-status{font-size:13px;margin:2px 0 4px;padding:1px 12px}
  .ep-status:empty{min-height:8px}
  .ep-go .go,.ep-go .ghost{--bh:44px;min-height:44px;font-size:15px}
  .ep-again-i{width:30px;height:30px;padding:4px}
  .cm-bench{width:24cqh;bottom:6%}.cm-cat{width:20cqh;bottom:6%;right:4%}.cm-rock-pink,.cm-flower-small{display:none}
}
/* an upright phone (Omri, 9 Nov 2026): the stops top to bottom on a winding road down the start side, each name beside
   its medallion, the road as tall as the screen allows */
@media (orientation:portrait) and (max-width:600px){
  #epmap{padding:62px 10px 10px}
  .ep-card{--k:.5;--pill:42px;width:100%;height:calc(100dvh - 72px);max-height:none;padding:calc(87px * var(--k) + var(--pill) / 2 + 2px) calc(44px * var(--k)) calc(30px * var(--k)) calc(66px * var(--k))}
  .ep-title{font-size:15px;padding:0 14px}
  .ep-head h2{font-size:28px}
  .cm-spark{width:24px}
  .ep-sub{font-size:14px;line-height:1.35;max-width:30ch}
  .ep-road{margin:6px 0 clamp(16px,3dvh,30px)}
  .ep-go{margin-bottom:10px}
  .ep-path{display:none}.ep-path.tall{display:block}
  .ep-path .cm-edge{--rw:22px}
  .ep-stop{--dw:clamp(50px,min(8.5cqh,calc(60cqh / var(--n,5))),66px);left:var(--px);top:var(--py);flex-direction:row;gap:8px;translate:calc(-100% + var(--dw) / 2) -50%;text-align:start}
  html[dir=ltr] .ep-stop{flex-direction:row-reverse}
  .ep-name{max-width:calc(var(--px) * 3);width:max-content;align-items:flex-start;font-size:14px;padding:4px 10px;border-radius:12px}
  .ep-status{font-size:14px;margin:2px 0 6px}
  .ep-status:empty{display:none}
  .ep-go .go,.ep-go .ghost{--bh:52px;font-size:17px}
  .ep-go .ep-on{min-width:0;width:100%;max-width:100%}
  .ep-go>button:not([hidden]){flex:1 1 auto}
  .cm-scene{background-position:62% 100%}
  .cm-bench,.cm-flower-small{display:none}.cm-cat{width:10.5cqh;left:3%;right:auto;bottom:14%}.cm-bush-a{width:16cqh}.cm-bush-b{width:15cqh}.cm-rock-grey{width:11cqh}
  .cm-grass-a,.cm-grass-b{width:9cqh}.cm-flower-big{left:5%;top:auto;bottom:47%;width:4.5cqh}.cm-rock-pink{right:auto;left:3%;top:auto;bottom:31%;width:8cqh}
  .cm-flower-big.cm-f2{right:6%;bottom:42%;left:auto}
}
@media (orientation:portrait) and (max-width:600px) and (max-height:620px){ .ep-sub{display:none} .ep-head h2{font-size:24px} }

/* the English book (left to right; Omri, 1 Dec 2026): the Hebrew layout mirrored, the same order with the sides swapped:
   the accessibility button and the menu on the left, the clues and the compass on the right */
html[dir=ltr] #a11ybtn{right:auto;left:8px}
html[dir=ltr] #a11ypanel{right:auto;left:12px}
html[dir=ltr] .hud-top,html[dir=ltr] .gm-top{padding-right:0;padding-left:62px}
html[dir=ltr] #goal{left:auto;right:max(12px,env(safe-area-inset-right))}
html[dir=ltr] .bk-prev img{transform:scaleX(-1)}   /* the English book's back arrow, on the left, points left */
/* the English statement card (Omri, 1 Dec 2026): English runs longer than Hebrew, so the sentence takes a wider column;
   "True or false?" much bigger; the counter at the top right, as in Hebrew, away from the speaker at the top left */
/* the frame's rim (border-image) and padding keep the text 260px in from the card's edges; English reaches out over the
   cream that the rim's inner part draws */
html[dir=ltr] .gm-scard .gm-crow{width:auto;align-self:stretch;margin-inline:-70px -40px}
@media (min-width:900px){ html[dir=ltr] .gm-scard .gm-crow .gm-q{max-width:96%;text-wrap:pretty} }
html[dir=ltr] .gm-prompt{font-size:clamp(24px,4.6vh,36px);font-weight:800;opacity:1;letter-spacing:0}
html[dir=ltr] .gm-scard .gm-n{inset-inline-start:auto;inset-inline-end:14px}
/* a quiz question with four answers (Omri, 2 Dec 2026: the before/after questions that replace the order games) keeps
   them two by two, as the first question showed them, also when one answer is long: it wraps inside its button */
.gm-q-quiz .gm-opts.two.four{grid-template-columns:1fr 1fr!important;max-width:none}
.gm-q-quiz .gm-opts.four .gm-opt{height:auto;min-height:var(--bh,56px);white-space:normal}
.gm-q-quiz .gm-opts.four .gm-t{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}
