/* Materials, after the reference board (Adam, 3 November 2026): maple discs and tags with engraved marks, a
   recessed linen bar, paper tape. The pegboard, painted blocks, trays and felt are painted in materials.js. */
:root{--board:#e4d7c5;--wood-ink:#654b31;--engrave:drop-shadow(0 1px 0 rgba(255,246,226,.8));
  --maple:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .2' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .33 0 0 0 0 .15 1.3 0 0 0 -.55'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23f)'/%3E%3C/svg%3E"),radial-gradient(120% 120% at 35% 25%,#ebd2b5,#dbbb99 60%,#cda581);
  --linen:repeating-linear-gradient(0deg,rgba(255,255,255,.17) 0 1px,rgba(0,0,0,0) 1px 3px),repeating-linear-gradient(90deg,rgba(130,100,60,.07) 0 1px,rgba(0,0,0,0) 1px 3px),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 .9 0 0 0 -.3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),#dccfbe;
  --paper:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 .9 0 0 0 -.3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),#f8f2e4;
  --disc:inset 0 1px 0 rgba(255,249,234,.8),inset 0 -2px 3px rgba(120,82,40,.22),0 2px 0 #b8916b,1px 3px 4px rgba(58,34,8,.38),3px 8px 14px -2px rgba(58,34,8,.34);
  --pressed:inset 0 2px 4px rgba(96,64,30,.38),inset 0 0 0 1px rgba(120,82,40,.18);
  --recess:inset 2px 3px 5px rgba(70,48,22,.32),inset 0 0 0 1px rgba(130,100,64,.16),0 1.5px 0 rgba(255,248,236,.85)}
html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none;background:var(--board);color:#4e6056;position:fixed;inset:0;width:100%;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:none}
#canvas{position:fixed;inset:0;width:100%;height:100%;display:block}
[hidden]{display:none!important}
.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--space-4);background:rgba(228,215,196,.9);text-align:center;z-index:10}
.card{max-width:400px;width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--space-3)}
.card p{margin:0;line-height:1.45}
h1,h2{margin:0;font-family:var(--font-body);font-weight:700;letter-spacing:-.02em;line-height:1;color:#3d4a46}
h1{font-size:46px}h2{font-size:30px}
.small{font-size:14px;color:#6b7a75}
.cta{min-height:56px;padding:0 40px;margin-top:var(--space-2);border:0;border-radius:99px;background:var(--maple);color:var(--wood-ink);font:700 19px var(--font-body);box-shadow:var(--disc);text-shadow:0 1px 0 rgba(255,246,226,.8)}
.cta:active{transform:translateY(1px);box-shadow:var(--pressed)}
.row{display:flex;gap:var(--space-2);justify-content:center}
.link{border:0;background:none;color:#8a958f;font:500 14px var(--font-body);text-decoration:underline;text-underline-offset:4px;padding:8px}
/* Button art: each picture in art/buttons is the whole button, its face, its symbol and its shadow (docs/art.md). The
   frame is twice the button's size, so the shadow has room. A button that is pressed, or stays pressed in, dims and
   shrinks its picture. */
:is(.goal .help,.goal .arrow,.action,.nav button){position:relative}
.art{position:absolute;left:-50%;top:-50%;width:200%;height:200%;max-width:none;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
:is(.round,.goal .help,.goal .arrow,.action,.multiply-handle,.nav button):active>.art,.round[aria-pressed=true]>.art,.goal .help[aria-expanded=true]>.art,.nav button[aria-pressed=true]>.art,.action.undo>.art{filter:brightness(.93);transform:scale(.96)}
/* A small, still illustration invites the child into the forest. */
.welcome-art{width:280px;height:160px;max-width:90%;margin-bottom:8px}
.kicker{font:600 11px var(--font-body);letter-spacing:.13em;text-transform:uppercase;color:#839275}
.tagline{max-width:260px;color:#728169;font-size:15px}
.ages{max-width:280px;color:#7d8c80;font-size:13px;line-height:1.4}
.credit{font-size:12px;color:#88907e;margin-top:8px!important}
#start .card{gap:14px}
#start .row{margin-top:8px;gap:10px;flex-wrap:wrap}
#start .cta{padding:0 25px;font-size:17px;border:1px solid transparent}
#start .cta.soft{border-color:#d6ddc8}
/* HUD: the menu, the mission line and settings in one row; nothing else on screen. */
.hud{position:fixed;top:0;left:0;right:0;display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-2);padding:max(var(--space-3),env(safe-area-inset-top)) max(var(--space-3),env(safe-area-inset-right)) 0 max(var(--space-3),env(safe-area-inset-left));pointer-events:none;z-index:5}
.hud>*{pointer-events:auto}
.round{position:relative;flex:none;width:46px;height:46px;padding:0;border-radius:50%;border:0;background:none;display:inline-flex;align-items:center;justify-content:center}
.round.fresh::after{content:attr(data-fresh);position:absolute;top:-3px;right:-3px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#c5a98d;color:#fffaf0;font:700 12px/20px var(--font-body)}
.goal{pointer-events:auto;margin:0;min-height:48px;flex:0 1 460px;min-width:0;display:flex;align-items:center;gap:8px;padding:5px;border-radius:24px;background:var(--linen);box-shadow:var(--recess);font:600 15px/1.25 var(--font-body);color:#5a5145;transition:background .4s,transform .4s}
.goal .gtext{flex:1;min-width:0;margin:0;}
.goal .count{flex:none;min-height:32px;padding:0 8px;border:0;border-radius:16px;background:var(--maple);box-shadow:var(--disc);font:700 12px var(--font-label);color:var(--wood-ink);letter-spacing:.02em}
.round-points{flex:none;color:var(--wood-ink);font:700 13px var(--font-label)}
.round-points:empty{position:absolute}
.goal .arrow{flex:none;width:38px;height:38px;border:0;border-radius:50%;background:none;display:inline-flex;align-items:center;justify-content:center;padding:0}
.goal .bulb{background:none;color:#c8a24a}.goal .bulb[aria-expanded=true]{background:#fff3cf}
/* A mission's hint, shown under the top row when asked for. */
/* Help, in the goal bar: a round question mark that opens the guide just below the bar. */
.goal .help{flex:none;width:36px;height:36px;border:0;border-radius:50%;background:none;display:inline-flex;align-items:center;justify-content:center;padding:0}
.goal .help[hidden]{display:none}
.goal{padding-left:14px}
/* The block tool, bottom left: a little 3D block. Pressed, the next tap or drag on empty grass grows blocks
   (it never pans); then it lets go. */
.block-tool{position:fixed;left:max(16px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));z-index:7;width:54px!important;height:54px!important;color:#6f8467;transition:background .2s,transform .2s}
.round.block-tool[aria-pressed=true]{box-shadow:0 0 0 3px #f3ead8,0 0 0 6px #b99a6c}
.block-tool[aria-pressed=true] .art{animation:tool-bob 1.1s ease-in-out infinite}
@keyframes tool-bob{50%{transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.block-tool[aria-pressed=true] .art{animation:none}}
.block-tool:active{transform:scale(.94)}
.block-tool.off{opacity:.45;filter:grayscale(1)}
.block-tool.off:active{transform:none}
.hint{position:fixed;top:calc(90px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:7;box-sizing:border-box;width:min(400px,calc(100% - 32px));max-height:calc(100dvh - 120px);overflow:auto;touch-action:pan-y;margin:0;padding:20px;border:1px solid #dfd2b9;border-radius:24px;background:var(--paper);color:#4d5a55;font:500 15px/1.45 var(--font-body);box-shadow:0 8px 32px #45524d14}
.hint p{margin:10px 0}.hint h2{font-size:23px;line-height:1.2;margin:6px 0 12px}
.hint .guide-kicker{margin:0;color:#728169;font-size:12px;font-weight:700}
.guide-rule{font-weight:700}.guide-skill{font-size:14px}.hint strong{font-weight:700}
.hint details{margin-top:14px;border-top:1px solid #e2e5d7;padding-top:12px;font-size:14px}
.hint summary{min-height:36px;cursor:pointer;font-weight:700}.hint .guide-optional{font-size:12px;color:#738077}
.guide-footer{position:sticky;bottom:-20px;margin:14px -20px -20px;padding:12px 20px 20px;background:var(--paper)}
.hint .cta{min-height:46px;width:100%;font-size:16px;margin:0}
.goal.sandbox .count{display:none}.goal.sandbox{padding-left:14px}
.cta.soft{background:var(--linen);color:#5a5145;box-shadow:var(--recess);text-shadow:none}
.row .cta{margin-top:0}
.modes{display:flex;gap:4px;padding:4px;border-radius:24px;background:var(--linen);box-shadow:var(--recess)}
.modes button{min-height:40px;padding:0 20px;border:0;border-radius:20px;background:none;color:#5d6b66;font:700 15px var(--font-body)}
.modes button[aria-pressed=true],.modes button[aria-selected=true]{background:var(--maple);box-shadow:var(--disc);color:var(--wood-ink)}
.panel{width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--space-3)}
.panel[hidden]{display:none}
.goal.done{background:repeating-linear-gradient(0deg,rgba(255,255,255,.17) 0 1px,rgba(0,0,0,0) 1px 3px),#dfe3cc}
.toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translate(-50%,12px);margin:0;padding:10px 18px;border-radius:20px;background:var(--paper);color:#5a5145;font:600 15px var(--font-body);box-shadow:0 2px 6px rgba(84,60,32,.18);opacity:0;transition:opacity .3s,transform .3s;pointer-events:none;z-index:6;max-width:calc(100% - 32px);text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
#overlay{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
/* The bin button, bottom right: clears the sandbox (drop a tower on it to put just that one away), or starts a
   practice round again. */
.erase{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:5;width:54px;height:54px;border:0;border-radius:50%;background:none;display:inline-flex;align-items:center;justify-content:center;transition:transform .2s}
.erase:active{transform:scale(.92)}
.erase.hot{transform:scale(1.15)}
/* In free play the bin is an alligator pond, big enough to aim at: its alligator peeks out, rises open-mouthed
   when a group is carried over, gulps what is dropped in, and leaves the pond while it is dragged out to chomp. */
.erase.pond{width:116px;height:96px;right:max(6px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));border-radius:0;background:none;box-shadow:none;transition:none;touch-action:none}
.erase.pond svg{width:100%;height:100%;overflow:visible}
.erase.pond:active,.erase.pond.hot{transform:none;background:none}
.g-top,.g-low{transform-box:view-box;transform-origin:98px 52px;transition:transform .15s}
.g-rise{transform:translateY(28px);transition:transform .35s cubic-bezier(.3,1.5,.5,1)}
.g-bob{animation:bob 2.8s ease-in-out infinite alternate}
.ripple{transform-box:fill-box;transform-origin:center;animation:ripple 2.8s ease-in-out infinite alternate;opacity:.8}
.erase.hot .g-rise{transform:translateY(2px)}
.erase.hot .g-top,.gator-fly.open .g-top{transform:rotate(24deg)}
.erase.hot .g-low,.gator-fly.open .g-low{transform:rotate(-14deg)}
.erase.out .g-rise{transform:translateY(66px)}
.erase.gulp .g-rise{animation:gulp .8s ease-out}
.erase.gulp .g-top{animation:gulp-top .8s}
.erase.gulp .g-low{animation:gulp-low .8s}
@keyframes bob{to{transform:translateY(-2.5px)}}
@keyframes ripple{to{transform:scale(1.08,1.2);opacity:.5}}
@keyframes gulp{0%{transform:translateY(20px)}25%{transform:translateY(0)}70%{transform:translateY(3px)}100%{transform:translateY(28px)}}
@keyframes gulp-top{0%,22%{transform:rotate(26deg)}36%{transform:rotate(0)}48%{transform:rotate(9deg)}60%,100%{transform:rotate(0)}}
@keyframes gulp-low{0%,22%{transform:rotate(-16deg)}36%{transform:rotate(0)}48%{transform:rotate(-6deg)}60%,100%{transform:rotate(0)}}
/* The alligator out of its pond, held by the neck with its jaws ahead of the finger. It swims over the blocks
   but under their labels, so each "5 − 1 = 4" stays readable. */
.gator-fly{position:fixed;left:0;top:0;z-index:1;width:120px;height:84px;pointer-events:none;transform-origin:100px 72px;filter:drop-shadow(0 7px 5px rgba(60,72,60,.25))}
.gator-fly[hidden]{display:none}
.gator-fly svg{width:100%;height:100%;overflow:visible}
.gator-fly.home{transition:transform .3s ease-in,opacity .3s ease-in;opacity:0}
.gator-fly.bite .g-top{animation:bite-top .28s}
.gator-fly.bite .g-low{animation:bite-low .28s}
@keyframes bite-top{0%{transform:rotate(30deg)}40%{transform:rotate(-1deg)}100%{transform:rotate(24deg)}}
@keyframes bite-low{0%{transform:rotate(-18deg)}40%{transform:rotate(1deg)}100%{transform:rotate(-14deg)}}
#undo{position:fixed;left:50%;bottom:max(22px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:7;min-height:46px;padding:0 26px;border:0;border-radius:23px;background:#5d6b66;color:#fff;font:700 16px var(--font-body);box-shadow:none}
.skip-round{position:fixed;right:calc(max(16px,env(safe-area-inset-right)) + 64px);bottom:max(23px,env(safe-area-inset-bottom));z-index:6;min-width:44px;min-height:44px;padding:0 8px;border:0;border-radius:22px;background:var(--paper);color:var(--wood-ink);font:700 14px var(--font-body);box-shadow:0 2px 6px rgba(84,60,32,.18)}
.skip-round:focus-visible{outline:3px solid #5a9c7c;outline-offset:2px}
.actions{position:fixed;z-index:5;display:flex;gap:8px;padding:6px;border:0;border-radius:32px;background:var(--linen);box-shadow:var(--recess),0 4px 12px rgba(84,60,32,.16);transform:translateX(-50%);touch-action:none}
.action{width:44px;height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:50%;background:none;touch-action:none}
.action:disabled{opacity:.35}
/* Right after a division, ÷ is pressed in: tapping it again puts the group back. */
.action:focus-visible,.multiply-handle:focus-visible{outline:3px solid #5a9c7c;outline-offset:3px}
.multiply-handle{position:fixed;z-index:5;width:44px;height:44px;display:grid;place-items:center;padding:0;transform:translate(-50%,-50%);border:0;border-radius:50%;background:none;touch-action:none}
.multiply-tip,.subtract-tip{position:fixed;z-index:6;margin:0;padding:7px 11px;border:0;border-radius:14px;background:var(--paper);box-shadow:0 2px 6px rgba(84,60,32,.18);color:#5a5145;font:600 13px var(--font-body);white-space:nowrap;transform:translate(-50%,-100%);pointer-events:none}
.subtract-tip{transform:translate(-50%,0)}
.multiply-handle:disabled{opacity:.35}

/* Zoom buttons, bottom left above the block button (or in its place when there is none), for small hands that
   find pinching hard. Four buttons pick set sizes (100%, 50%, 25%, 10%); the current one is pressed in, and a tap
   shows the size beside them for a moment. A switch on the start screen and
   in the menu hides them. */
.nav{position:fixed;left:calc(max(16px,env(safe-area-inset-left)) + 5px);bottom:calc(max(18px,env(safe-area-inset-bottom)) + 66px);z-index:5;display:flex;flex-direction:column;align-items:center;gap:8px;touch-action:none;user-select:none;-webkit-user-select:none}
body:not(.has-tool) .nav{bottom:calc(max(18px,env(safe-area-inset-bottom)) + 5px)}
.nav[hidden]{display:none}
.zoom-level{position:absolute;left:52px;top:50%;transform:translateY(-50%);padding:4px 10px;border-radius:999px;background:var(--paper);box-shadow:0 2px 5px rgba(84,60,32,.16);color:#5a5145;font:600 14px/1.2 var(--font-body);font-variant-numeric:tabular-nums;opacity:0;transition:opacity .25s;pointer-events:none;white-space:nowrap}
.zoom-level.on{opacity:1}
.nav button{width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;display:grid;place-items:center;touch-action:none;-webkit-touch-callout:none}
.nav button:focus-visible{outline:3px solid #5a9c7c;outline-offset:2px}
.switch{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:44px;font:600 14px var(--font-body);color:#5d6b66;cursor:pointer}
.switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.track{flex:none;position:relative;width:40px;height:24px;border-radius:12px;background:#d6ddd9;transition:background .2s}
.track::after{content:'';position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .2s}
.switch input:checked+.track{background:#9fbb95}
.switch input:checked+.track::after{transform:translateX(16px)}
.switch input:focus-visible+.track{outline:3px solid #5a9c7c;outline-offset:2px}
/* Settings, under the cog: sound, and Send feedback (DropComments) while the game is in alpha. */
.settings{position:fixed;top:calc(max(var(--space-3),env(safe-area-inset-top)) + 56px);right:max(var(--space-3),env(safe-area-inset-right));z-index:8;display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:200px;padding:8px 14px;border:1px solid #dfd2b9;border-radius:20px;background:var(--paper);box-shadow:0 8px 32px #45524d1f}
.settings .switch{justify-content:space-between;flex-direction:row-reverse;font-size:15px;color:#4d5a55}
.settings .feedback{display:flex;align-items:center;gap:10px;min-height:44px;margin:0 -6px;padding:0 6px;border:0;border-top:1px solid #e8dfcc;border-radius:0;background:none;color:#4d5a55;font:600 15px var(--font-body);text-align:left}
.settings .feedback .art{position:static;width:22px;height:22px;flex:none}
.settings .feedback:focus-visible{outline:3px solid #5a9c7c;outline-offset:2px;border-radius:10px}
/* Reset progress asks first, in the panel: Keep, or Reset (which clears the path, the board and the book, then starts afresh). */
.reset-ask{margin:0 -6px 6px;padding:10px 6px 0;border-top:1px solid #e8dfcc;max-width:230px}
.reset-ask p{margin:0 0 10px;font:500 14px/1.4 var(--font-body);color:#5a6560}
.reset-row{display:flex;gap:8px}
.reset-row button{flex:1;min-height:44px;border:0;border-radius:99px;font:700 15px var(--font-body)}
.reset-row .keep{background:var(--maple);box-shadow:var(--disc);color:var(--wood-ink)}
.reset-row .wipe{background:#c97f83;color:#fffaf6}
.reset-row button:focus-visible{outline:3px solid #5a9c7c;outline-offset:2px}
/* DropComments' feedback panel in the game's paper and sage (its --dc-* variables reach into its own element). */
:root{--dc-font:var(--font-body);--dc-surface:#f8f2e4;--dc-text:#3d4a46;--dc-muted:#6b7a75;--dc-line:#dfd2b9;--dc-soft:#efe7d5;--dc-placeholder:#9aa59f;
  --dc-accent:#9fbb95;--dc-on-accent:#2f4329;--dc-accent-text:#5f7f52;--dc-mark:#9fba92;--dc-pin:#6f8467;--dc-on-pin:#fffdf6;--dc-pin-on:#c97f83;--dc-error:#b4523f;
  --dc-radius:24px;--dc-button-radius:99px;--dc-shadow:0 8px 32px #45524d1f}
/* The menu scrolls on small screens: the Garden path, the chapters and the book. */
.book.scroll{max-height:calc(100vh - 32px);overflow:auto;touch-action:pan-y;padding:4px 2px 12px}
.practice-grid{display:flex;flex-direction:column;gap:6px;width:100%;padding:10px;background:rgba(255,255,255,.7);border-radius:18px}
.practice-grid button{min-height:44px;padding:6px 12px;border:1.5px solid #d6ddd9;border-radius:12px;background:#fff;color:#55635e;font:700 14px var(--font-body);text-align:left}
.practice-grid button.now,.practice-grid details.now{border-color:#5d6b66}
.practice-grid .path{min-height:56px;background:#e8efe2;border-color:#c3d4ba;font-size:16px}
.practice-grid .path small{display:block;font-size:12px;font-weight:600;color:#6f8566}
.chapters-title{margin:8px 2px 0;font:700 13px var(--font-body);color:#7d8c80;text-transform:uppercase;letter-spacing:.06em}
.chapter{border:1.5px solid #d6ddd9;border-radius:12px;background:#fff}
.chapter summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:6px 12px;cursor:pointer;list-style:none;font:700 14px var(--font-body);color:#55635e}
.chapter summary::-webkit-details-marker{display:none}
.dots{display:flex;gap:3px;flex:none}.dots i{width:7px;height:7px;border-radius:50%;background:#e1e6e2}.dots i.on{background:#8fb07f}
.chapter .step{display:flex;width:calc(100% - 16px);margin:0 8px 6px;border-color:#e6eae7;font-weight:600}
.chapter .step::before{content:'';flex:none;width:16px;height:16px;margin-right:8px;border-radius:50%;border:1.5px solid #cbd4ce;align-self:center}
.chapter .step.done::before{content:'✓';display:grid;place-items:center;background:#8fb07f;border-color:#8fb07f;color:#263e26;font-size:11px}
.chapter .step.next{border-color:#c3d4ba;background:#f4f8f1}
.chapter .step-marks{margin-left:auto;padding-left:8px;align-self:center;text-align:right;color:#526b52;font-size:11px}
.chapter .step-marks:empty{display:none}
.chapter .step.now{border-color:#5d6b66}
#progress-btn{background:#f4f8f1;border-color:#c3d4ba}
#progress{--progress-earlier:#6b7a75;position:fixed;inset:0;margin:0;width:100%;height:100%;max-width:none;max-height:none;border:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;background:var(--board);color:#3d4a46;font:15px/1.4 var(--font-body);padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
.progress-page{max-width:560px;margin:auto;display:grid;gap:12px}
.progress-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 4px}
#progress button,#progress select{min-height:44px;border:1px solid #c3d4ba;border-radius:10px;padding:4px 10px;background:#f4f8f1;color:inherit;font:700 14px var(--font-body)}
#progress :focus-visible{outline:3px solid #5a9c7c;outline-offset:2px}
.progress-card{position:relative;border-radius:18px;background:var(--paper);padding:12px 0}
.progress-inset,.progress-card-heading{padding-inline:14px}
.progress-card h3,.progress-card h4,.progress-card p{margin:0}
.progress-card h3{font-size:17px}
.progress-card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.progress-card-heading label{display:flex;align-items:center;gap:6px;font-size:13px}
.progress-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:6px 14px;margin:10px 8px 0;padding:0;list-style:none;font-size:12px;font-weight:600}
.progress-legend li{display:flex;align-items:center;gap:5px}
.progress-legend li::before{content:'';width:17px;border-top:2px solid var(--series)}
.progress-legend .well::before{border-top-style:dashed}
#progress-plot{position:relative;max-width:440px;margin:auto}
#progress svg{display:block;width:100%;height:auto}
.progress-gridline{fill:none;stroke:#cfc6b3;stroke-width:1}
.progress-scale{fill:#53645b;font:600 11px var(--font-body);text-anchor:middle}
#progress .far{--series:var(--progress-far)}
#progress .well{--series:var(--progress-well)}
#progress .earlier{--series:var(--progress-earlier)}
.progress-series path{fill:none;stroke:var(--series);stroke-width:2;stroke-linejoin:round}
.progress-series path.closed{fill:var(--series);fill-opacity:.09}
.progress-series.earlier path.closed{fill:none}
.progress-series.well path{stroke-dasharray:5 3}
.progress-series circle{fill:var(--series)}
#progress-plot button{position:absolute;transform:translate(-50%,-50%);padding:0 1px;border-color:transparent;background:transparent;font-size:12px;line-height:1.15;overflow-wrap:anywhere}
#progress-plot button[aria-expanded=true]{border-color:#c3d4ba;background:#e8efe2}
#progress-plot small{display:block;color:#53645b;font:500 10px/1.1 var(--font-body);margin-top:3px}
#progress-chapter{margin:0 12px;padding:10px 12px;border-radius:12px;background:#fffaf1}
#progress-chapter h4{margin-top:8px}
#progress-chapter ol{margin:2px 0 0;padding-left:22px;font-size:14px}
.progress-table{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#progress-weekly svg{max-width:440px;margin:auto}
.progress-inset>div{margin-top:8px}
#progress-help ol{list-style:none;margin:0;padding:0;display:grid;gap:8px}
#progress-help li{padding:10px 12px;border-radius:12px;background:#fffaf1;display:grid;gap:4px}
#progress-help button{justify-self:start;margin-top:4px}
/* The book. */
.book{max-width:460px}
/* The menu sits at the top so its tabs stay put as panels change height. */
#book{background:rgba(228,215,196,.97);align-items:flex-start;padding-top:max(var(--space-4),env(safe-area-inset-top))}
.book-grid{list-style:none;margin:0;padding:10px;display:grid;grid-template-columns:repeat(10,1fr);gap:5px;width:100%;background:rgba(255,255,255,.7);border-radius:18px}
.book-grid li{aspect-ratio:1;display:flex;align-items:center;justify-content:center;border-radius:8px;font:600 13px var(--font-body);color:#b9c2be;border:1.5px dashed #d6ddd9}
.book-grid li.has{color:#3d4a46;border:0;box-shadow:none}
.debug{position:fixed;left:8px;top:72px;margin:0;padding:6px 8px;background:rgba(0,0,0,.6);color:#fff;font:11px/1.35 ui-monospace,monospace;z-index:20;pointer-events:none;border-radius:6px}
@media(max-width:420px){.goal{font-size:14px;gap:4px}.goal .arrow{width:32px;height:32px}.goal .count{padding:0 6px}.round{width:42px;height:42px}}

@media(prefers-reduced-motion:reduce){.goal,.toast,.erase,.track,.track::after{transition:none}.goal.done,.erase.hot{transform:none}.g-bob,.ripple{animation:none}}

@media(max-width:380px){.hud{gap:6px;padding-left:10px;padding-right:10px}.round{width:38px;height:38px}.goal{font-size:13px;gap:3px}.goal .arrow{width:28px;height:32px}.goal .count{padding:0 4px;font-size:11px}}
/* The tutorial (Adam and Chris, 6 November 2026): on a first visit it is the first choice on the start card, on its own line;
   after that a quiet link below the two modes. */
#start .first-steps{flex-basis:100%}
.tour-link{margin:-2px 0 0;padding:8px 12px;border:0;background:none;color:#6f7f72;font:500 14px var(--font-body)}
.tour-link b{color:#4d6a57;font-weight:700;text-decoration:underline;text-decoration-color:#b9c9b2;text-underline-offset:3px}
.tour-link:focus-visible{outline:3px solid #5a9c7c;outline-offset:2px;border-radius:10px}
#tour{z-index:11;background:#e4d7c4}
#tour h2{font-size:27px}
#tour p{max-width:330px;color:#5a6560}
#tour .row{margin-top:6px;flex-wrap:wrap}
.guide-footer{display:flex;gap:8px}
.guide-footer .cta.soft{flex:0 0 auto;width:auto;padding:0 22px}
/* The hand that shows a move: its fingertip is the point it shows. */
.ghost{position:fixed;left:0;top:0;z-index:7;width:0;height:0;pointer-events:none;opacity:0;transition:opacity .35s ease}
.ghost.on{opacity:.92}
.ghost-hand{position:absolute;left:-27.5px;top:-3px;width:60px;height:72px;max-width:none;filter:drop-shadow(0 6px 10px #45524d38);transform-origin:27.5px 3px;transition:transform .16s ease}
.ghost.down .ghost-hand{transform:scale(.88) translateY(2px)}
.ghost-tip{position:absolute;left:0;top:78px;padding:7px 11px;border-radius:14px;background:var(--paper);box-shadow:0 2px 6px rgba(84,60,32,.18);color:#5a5145;font:600 13px var(--font-body);white-space:nowrap;transform:translate(calc(-50% + var(--dx,0px)),0)}
.ghost-ring{position:absolute;left:-26px;top:-26px;width:52px;height:52px;border-radius:50%;border:3px solid #fffaf1;box-shadow:0 0 0 2px #55635e55;opacity:0;transform:scale(.6);transition:opacity .16s ease,transform .16s ease}
.ghost.down .ghost-ring{opacity:.9;transform:scale(1)}
.ghost.holding .ghost-ring{background:conic-gradient(#fffaf1cc calc(var(--k,0)*360deg),transparent 0)}
@media (prefers-reduced-motion:reduce){.ghost,.ghost-hand,.ghost-ring{transition:none}}
