:root{color-scheme:light;--bg:#edf3e6;--surface:#fffdf6;--paper:#fff9e8;--ink:#203b35;--muted:#4b625a;--line:#c7d7bd;--accent:#166b5e;--accentText:#fff;--tile:#fff;--gold:#e5a83b;--shadow:#263c2820;--good:#17664b;--bad:#9b3b24;font:16px/1.5 system-ui,sans-serif}body[data-theme=dark]{color-scheme:dark;--bg:#172c29;--surface:#243b35;--paper:#30473d;--ink:#f4f4e3;--muted:#d0dfc9;--line:#607e70;--accent:#a9dfbf;--accentText:#142f26;--tile:#3e564d;--shadow:#0005;--good:#b5edb8;--bad:#ffbd9f}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--bg);color:var(--ink);padding:clamp(8px,2.4vw,25px)}main{max-width:920px;margin:auto}header{display:flex;flex-wrap:wrap;align-items:center;gap:12px;justify-content:space-between;margin-bottom:16px}header h1{font-size:clamp(28px,5vw,44px);margin:0;line-height:1.12;letter-spacing:-.04em}header p{margin:6px 0;color:var(--muted)}.eyebrow{font-size:.77rem;text-transform:uppercase;letter-spacing:.11em;font-weight:800;color:var(--accent)}button,select{font:inherit;font-weight:700;color:var(--ink);background:var(--tile);border:1px solid var(--line);border-radius:11px;padding:8px 13px;min-height:44px;min-width:44px;max-width:100%;touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.tools,.actions,.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.workshop,details{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:clamp(10px,2.5vw,24px);box-shadow:0 6px 22px var(--shadow)}.toolbar label{font-weight:750}.toolbar select{flex:1;min-width:0}.stats{display:flex;justify-content:space-between;flex-wrap:wrap;gap:5px 12px;font-size:.88rem;font-weight:700;margin:14px 0 6px}.progress{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-bottom:14px}.progress span{height:8px;border-radius:20px;background:var(--line)}.progress .done{background:var(--accent)}.progress .star{background:var(--gold)}.book{display:grid;grid-template-columns: minmax(0,1fr) minmax(0,1.3fr);border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--paper);box-shadow:0 6px 0 var(--line),0 10px 24px var(--shadow)}.picture-page,.letter-page{padding:clamp(10px,2.6vw,24px);min-width:0}.picture-page{background:linear-gradient(145deg,#d9e8c633,transparent);border-right:1px solid var(--line);text-align:center}.page-label{text-transform:uppercase;letter-spacing:.1em;font-size:.72rem;font-weight:800;color:var(--muted)}.art{height:clamp(100px,23vw,210px);display:flex;align-items:center;justify-content:center;margin:4px auto}.art img{width:100%;height:100%;object-fit:contain;max-width:230px;filter:drop-shadow(0 6px 3px #1c33211f)}#clue{font-size:.92rem;margin:5px 0;color:var(--muted)}.letter-page{display:flex;flex-direction:column;justify-content:center;gap:14px}.prompt{margin:0;font-weight:800;font-size:clamp(16px,2.6vw,22px)}.word{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.slot{display:grid;place-items:center;min-width:0;width:clamp(26px,5.5vw,49px);height:clamp(37px,7vw,60px);border:1px solid var(--line);border-radius:8px;font-size:clamp(19px,4.7vw,31px);font-weight:900;background:var(--surface);color:var(--ink)}.slot.blank{border:2px dashed var(--line);background:transparent;color:var(--muted)}.slot.current{border:2px solid var(--accent);box-shadow:0 0 0 2px var(--line)}.slot.filled{background:var(--accent);color:var(--accentText)}.choices{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}.choices button{font-size:clamp(22px,5vw,30px);width:clamp(44px,9vw,66px);height:clamp(48px,10vw,70px);padding:2px;border-bottom-width:4px}.choices button.wrong{border-color:var(--bad);color:var(--bad)}.answer{margin:0;color:var(--good);text-align:center;font-weight:800;overflow-wrap:anywhere}.status{min-height:3em;font-weight:700;margin:16px 0 8px;color:var(--muted)}.primary{background:var(--accent);color:var(--accentText);border-color:var(--accent)}.panel{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:18px;margin-top:12px}.panel h2{margin:0 0 7px;font-size:1.35rem}details{margin-top:16px;color:var(--muted)}summary{font-weight:800;color:var(--ink);cursor:pointer}details p{margin:8px 0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(max-width:560px){.book{grid-template-columns:1fr}.picture-page{border-right:0;border-bottom:1px solid var(--line);padding:9px}.art{height:120px}.letter-page{padding:13px 7px;gap:10px}.toolbar label{width:100%}.toolbar select{flex:1 1 100%}.slot{width:clamp(27px,9vw,45px)}.actions button{flex:1 1 auto}}@media(prefers-reduced-motion:no-preference){.choices button:active{transform:translateY(2px)}}

/* P6.2b: layered picture-book paper and letterpress tiles. */
.book{position:relative;border:4px solid #8a653d;border-radius:13px 18px 18px 13px;box-shadow:0 4px 0 #d9c6a4,0 8px 0 #88613c,0 13px 24px var(--shadow)}.picture-page{background:radial-gradient(ellipse at 50% 40%,#ffebbb40 0 38%,transparent 70%),repeating-linear-gradient(0deg,transparent 0 26px,#a18a5720 27px 28px),var(--paper);border-right:4px double var(--line)}.page-label{display:inline-block;background:var(--surface);padding:3px 12px;border:1px solid var(--line);border-radius:30px}.art{background:radial-gradient(ellipse,#c3deb94d 0 51%,transparent 52%),radial-gradient(ellipse at 50% 90%,#8eae8938 0 35%,transparent 36%);border-radius:15px}.art img{filter:drop-shadow(0 6px 3px #1c332136)}.letter-page{background:linear-gradient(90deg,#7a5a3320,transparent 13%),var(--paper)}.word{padding:8px 3px;border-radius:12px;background:var(--surface);border:1px solid var(--line)}.slot{border-bottom:3px solid var(--line);box-shadow:0 2px 0 var(--shadow)}.slot.blank{box-shadow:none;border:2px dashed var(--line)}.slot.current{border:2px solid var(--accent);box-shadow:0 0 0 2px var(--line);background:var(--tile)}.slot.filled{border-color:var(--accent)}.choices button{background:linear-gradient(145deg,#fff1,transparent),var(--tile);box-shadow:0 3px 0 var(--shadow);border-bottom-color:var(--line)}.choices button.wrong{border-color:var(--bad)}body[data-theme=dark] .book{border-color:#876e4d;box-shadow:0 4px 0 #625941,0 8px 0 #483f32,0 13px 24px var(--shadow)}@media(max-width:560px){.book{border-width:3px}.picture-page{border-right:0;border-bottom:3px double var(--line)}.word{padding:6px 2px}.letter-page{background:linear-gradient(180deg,#7a5a3315,transparent 12%),var(--paper)}}
