*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:var(--font)}main{max-width:1050px;margin:auto;padding:8px 12px 16px}header{display:flex;align-items:center;gap:8px;min-height:56px;margin-bottom:10px}h1{font-size:clamp(1.1rem,3.8vw,1.65rem);margin:0;flex:1;text-align:center}h2{font-size:1.1rem;margin:0}button,.back{font:700 1rem var(--font);color:var(--ink);border:1px solid var(--edge);border-bottom:3px solid var(--edge-dark);border-radius:14px;background:var(--grain),var(--paper);min-height:48px;min-width:48px;padding:8px 12px;cursor:pointer;touch-action:manipulation}.back{display:flex;align-items:center;text-decoration:none}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:4px solid var(--focus);outline-offset:2px}button:active:not(:disabled){transform:translateY(2px)}#show-help{font-size:.85rem}.workbench{display:grid;gap:12px}.journey,.planner{min-width:0}#board{position:relative;isolation:isolate;height:clamp(210px,32vh,365px);border:3px solid var(--forest);border-radius:30px;overflow:hidden;background:#77c9d0;box-shadow:0 5px 0 #35563e18}.stream-art,#stones{position:absolute;inset:0;width:100%;height:100%}.stone{position:absolute;display:grid;place-items:center;width:20%;height:33.333%}.stone::before{content:'';width:68%;height:44%;border:2px solid #7a8874;border-bottom:5px solid #617564;border-radius:48% 40% 45% 42%;background:#d4d1af;transform:translateY(30%);box-shadow:0 7px 0 #357b7b33}.stone.visited::before{background:#e8df9d;border-color:#657c43}.stone.next::before{outline:4px dashed #fff6c0;outline-offset:2px}.stone.rock::before{display:none}.stone.rock img{width:96%;height:95%;object-fit:contain}#frog{position:absolute;width:20%;height:33.333%;z-index:4;transition:left .35s ease,top .35s ease;pointer-events:none;display:grid;place-items:center}#frog img{width:110%;height:115%;max-height:140px;object-fit:contain;filter:drop-shadow(0 3px 1px #244e3e30);transform-origin:50% 80%;transition:transform .2s}#frog[data-look=left] img{transform:scaleX(-1)}#frog[data-look=up] img{transform:translateY(-4px) rotate(-5deg)}#frog[data-look=down] img{transform:translateY(3px) rotate(5deg)}#board[data-state=blocked] #frog img{transform:rotate(-10deg)}#board[data-state=arrived] #frog img{animation:cheer .55s ease 2}#flower{position:absolute;left:80%;top:33.333%;width:20%;height:33.333%;z-index:3;transform:translate(14%,-32%);pointer-events:none}#flower svg{width:100%;height:125%;overflow:visible}.petals{transform:scale(.15);transform-origin:50px 46px;opacity:0;transition:transform .5s,opacity .4s}.bud{transition:opacity .3s}#board[data-state=arrived] .petals{transform:scale(1);opacity:1}#board[data-state=arrived] .bud{opacity:0}#blocked-mark{display:none;position:absolute;z-index:5;background:var(--gold);border:3px solid #694a23;border-radius:50%;width:30px;height:30px;text-align:center;font-weight:900;font-size:22px;line-height:24px}#board[data-state=blocked] #blocked-mark{display:block}.actions{display:flex;gap:8px;margin-top:10px}.actions button{min-height:60px;display:flex;align-items:center;justify-content:center;gap:5px;flex:1;padding:4px 8px;font-size:1.1rem}.actions img{width:42px;height:46px;object-fit:contain}#go{background:var(--picked);border-color:var(--picked-edge)}#replay{font-size:.9rem}#status{font-size:1rem;font-weight:750;min-height:2.5em;line-height:1.25;margin:8px 0 0}.plan-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px}#count{font-size:.8rem;color:var(--muted)}#steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;list-style:none;margin:0;padding:0;min-height:105px}#steps li{min-width:0}#steps button,#steps .empty{position:relative;display:flex;align-items:center;justify-content:center;gap:2px;width:100%;height:50px;min-height:48px;min-width:0;border-radius:12px;padding:3px;font-size:1.6rem}#steps .empty{border:2px dashed #bda87970;color:#8a8f7499;font-size:.75rem}#steps small{position:absolute;left:5px;top:2px;font-size:.65rem}#steps button[aria-pressed=true]{background:var(--gold);border:3px solid #86622e}#steps button[aria-current=step]{outline:3px solid var(--forest);outline-offset:0;background:var(--picked)}#steps button[data-blocked=true]{border:3px dashed #86622e;background:var(--gold)}#steps button[data-blocked=true]::after{content:'!';position:absolute;right:2px;top:0;font-size:.85rem}#hint{margin:7px 0;font-size:.85rem;min-height:1.2em}#directions{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}#directions button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:64px;padding:4px;font-size:.75rem}#directions .arrow{font-size:1.9rem;line-height:1.05}.edit-actions{display:flex;gap:8px;margin-top:8px}.edit-actions button{flex:1;font-size:.85rem}#save{font-size:.8rem;margin:5px 0}#save:empty{display:none}.credit{color:var(--muted);font-size:.7rem;text-align:center;margin:16px 0 0}#demo{display:flex;gap:6px;align-items:center;flex-wrap:wrap;background:var(--gold);padding:7px;border-radius:12px;margin-bottom:8px;font-size:.8rem}#demo[hidden]{display:none}#demo strong{flex:1}#demo button{font-size:.8rem}body.demonstrating .workbench{pointer-events:none}body.demonstrating #show-help{background:var(--gold)}[data-demo-cue]{outline:4px solid var(--ink)!important;outline-offset:2px}[data-demo-cue]::after{content:'•';font-size:1rem;color:var(--ink)}@keyframes cheer{45%{transform:translateY(-14px) rotate(7deg)}}
@media(min-width:700px) and (min-height:700px){main{padding:16px 24px}#board{height:400px}.actions button{min-height:72px}.actions img{height:60px;width:56px}.planner{max-width:650px;width:100%;margin:auto}#steps{min-height:120px}#steps button,#steps .empty{height:57px}#directions button{min-height:72px}.workbench{gap:18px}}
@media(min-width:900px), (max-height:500px) and (min-width:600px){.workbench{grid-template-columns:1.4fr 1fr;gap:20px}#board{height:330px}.planner{align-self:center}#steps{grid-template-columns:repeat(4,minmax(0,1fr));min-height:160px}.credit{margin:8px 0}}
@media(max-width:359px){main{padding:4px 8px 10px}header{gap:4px;min-height:48px;margin-bottom:6px}.back{font-size:.8rem;padding:6px}#show-help{padding:5px;font-size:.75rem}h1{font-size:1rem}#board{height:154px;border-radius:22px}.actions{margin-top:6px;gap:5px}.actions button{min-height:56px;font-size:.95rem}.actions img{width:32px;height:38px}#replay{font-size:.8rem}#status{font-size:.85rem;min-height:2.4em;margin-top:5px}.workbench{gap:5px}h2{font-size:.95rem}#steps{min-height:101px;gap:2px}#steps button,#steps .empty{height:48px}#hint{font-size:.75rem;margin:5px 0}#directions button{min-height:56px}.edit-actions{margin-top:5px}.credit{margin:8px 0}}
@media(max-height:500px) and (min-width:600px){main{padding:4px 12px}header{height:48px;min-height:48px;margin-bottom:6px}h1{font-size:1.15rem}#board{height:202px;border-radius:22px}.actions{margin-top:6px}.actions button{min-height:56px}.actions img{width:35px;height:40px}#status{font-size:.85rem;margin-top:5px}.planner{align-self:start}#steps{min-height:154px;gap:4px}#steps button,#steps .empty{height:48px}#hint{font-size:.75rem;margin:5px 0}#directions button{min-height:56px}.edit-actions{margin-top:5px}.credit{display:none}#demo{position:fixed;right:8px;top:4px;z-index:20;max-width:55%;box-shadow:0 3px 10px #3453}#demo strong{display:none}}
@media(prefers-reduced-motion:reduce){#frog,#frog img,.petals,.bud{transition:none!important;animation:none!important}}
@media(max-width:359px){main{padding-bottom:0}#board{height:140px}.credit{display:none}}
main{position:relative}#demo{position:absolute;z-index:20;right:12px;top:4px;margin:0;box-shadow:0 3px 10px #3453}#demo strong{max-width:190px}@media(max-width:699px){#demo strong{display:none}#demo{padding:4px;gap:4px}}
#frog img{width:100%;height:110%}#flower{transition:transform .4s ease}#board[data-state=arrived] #flower{transform:translate(0,-83%)}@media(prefers-reduced-motion:reduce){#flower{transition:none}}
#go[data-paused=true]{flex-direction:column;gap:0;font-size:.85rem}#go[data-paused=true] img{width:24px;height:24px}

/* Keep the shared phone in a real header slot, outside the play and repair area. */
.frog-help-slot{flex:0 0 48px;width:48px;min-height:48px}
header .frog-help-slot>.nb-help-lane{min-height:48px;padding:0;background:transparent}
header .frog-help-slot .nb-help-trigger{width:48px;min-width:48px;min-height:48px;padding:0;font-size:0}
header .frog-help-slot .nb-help-trigger::before{content:'☎️';font:700 1.25rem var(--font)}
body.demonstrating .frog-help-slot{visibility:hidden}
