:root{color-scheme:light;--paper:#f5e8d1;--ink:#25362e;--fern:#315951;--dark:#172e2b;--amber:#efd088;--muted:#79684e;--line:#d8c4a1;font-family:system-ui,-apple-system,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:#ecddc2;color:var(--ink)}
button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}
button:focus-visible,a:focus-visible{outline:3px solid #b46a2e;outline-offset:3px}
button:disabled{cursor:default}
[hidden]{display:none!important}
.mast{height:64px;padding:0 max(24px,calc((100vw - 1050px)/2));display:flex;justify-content:space-between;align-items:center;background:var(--dark);color:#f9e7bf;font-size:.85rem;letter-spacing:.04em;white-space:nowrap}
.wordmark{font-weight:800;letter-spacing:.16em}.wordmark span{color:var(--amber);font-size:1.15em;margin-right:.4em}
#progress{border:1px solid #708476;border-radius:2em;padding:.42rem .8rem}
main{max-width:1098px;margin:auto;padding:0 24px}
.intro{display:flex;align-items:end;justify-content:space-between;gap:2rem;padding:27px 0 23px;border-bottom:1px solid #cdbb96;margin-bottom:22px}
.eyebrow{font:800 .68rem system-ui;letter-spacing:.18em;text-transform:uppercase;color:#795735;margin:0 0 .34rem}
h1,h2{font-family:Georgia,'Times New Roman',serif;font-weight:normal;margin:0}
h1{font-size:clamp(3rem,7vw,6rem);letter-spacing:-.065em;line-height:.83;color:#19392f}
.intro>p{font-size:.94rem;line-height:1.5;margin:0;max-width:265px;color:#4a5142}
.work{background:var(--paper);display:grid;grid-template-columns:minmax(0,1.68fr) minmax(275px,1fr);border:1px solid #cdbb96;border-radius:17px;box-shadow:0 16px 40px #412b181c;overflow:hidden}
.story{min-width:0;padding:17px}
.chapter{display:flex;justify-content:space-between;align-items:end;gap:.5rem;margin:0 0 13px}
h2{font-size:clamp(1.5rem,3vw,2.35rem);line-height:1.03;letter-spacing:-.045em}
.edits{font-size:.73rem;font-weight:750;white-space:nowrap;color:#475b46;border:1px solid var(--line);border-radius:20px;padding:6px 9px}
.edits.over{color:#8a3c32;border-color:#a65148}
.board{position:relative;isolation:isolate;overflow:hidden;width:100%;aspect-ratio:640/420;background:radial-gradient(ellipse at 58% 48%,#31574a,#132b27 76%);border-radius:10px;color:#f3e4bc}
.board::before{content:"";position:absolute;inset:7px;border:1px solid #81988650;border-radius:6px;pointer-events:none}
.board.bound::before{border-color:#e0bd6f}
canvas,#scenes{position:absolute;inset:0;width:100%;height:100%}
#scenes{pointer-events:none}
.scene{pointer-events:auto;position:absolute;transform:translate(-50%,-50%);width:16.25%;height:21.8%;border:1px solid #c19e67;border-radius:8px;padding:0;background:#223c34;overflow:hidden;color:#ffefd0;font-weight:750;box-shadow:0 4px 10px #121e19cc}
.scene-art{display:block;position:absolute;inset:0;background-image:url('./wood-racers.webp');background-size:300% 200%;filter:saturate(.98)}
.scene:hover,.scene:focus-visible{border-color:#fff0be;box-shadow:0 0 0 2px #f4cd74}
.legend{position:absolute;top:4%;font-size:clamp(.43rem,1.3vw,.68rem);letter-spacing:.13em;color:#dbc68f;font-weight:800;pointer-events:none}
.begin{left:4%}.end{right:4%}
.caption{display:flex;align-items:center;min-height:48px;margin:8px 0 0;color:#57634f;font:italic .96rem/1.3 Georgia,serif}
.desk{border-left:1px solid var(--line);padding:17px;background:#f7eedc;min-width:0}
.goals{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.goal{min-width:0;border:1px solid var(--line);background:#efe1c5;border-radius:8px;padding:9px 11px;display:flex;flex-direction:column;gap:.18rem}
.goal span{font-size:.72rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.goal strong{font:1.54rem Georgia,serif;font-variant-numeric:tabular-nums}
.goal.met{border-color:#729276;background:#e1ebd6;color:#244e3c}
.brief,.rule{font-size:.82rem;line-height:1.42;margin:10px 0;color:#535849}
h3{font-size:.9rem;margin:13px 0 0}
.rule{margin:3px 0 8px;color:#646855}
.routes{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.routes button,.tools button{border:1px solid #c6b395;background:#fbf2df;text-align:left;font-size:.79rem;border-radius:6px;padding:7px 8px;min-height:36px}
.routes button:hover:not(:disabled),.tools button:hover:not(:disabled){background:#f1dfb9}
.routes .stitched{color:#55695d;background:#e9ead8;border-style:dotted}
.route[aria-pressed="true"]{background:#eadad2;color:#793b33;text-decoration:line-through}
.route.suggested{outline:2px solid #97602e}
.tools{display:flex;gap:6px;margin-top:10px}
.tools button{text-align:center;min-height:34px;padding:5px 11px}
.tools button:disabled{opacity:.55}
.feedback{min-height:20px;font-size:.82rem;color:#594438;font-weight:650;margin:8px 0}
.primary{border:1px solid #284c40;width:100%;min-height:42px;background:#dce4cd;color:#244136;border-radius:7px;text-align:left;padding:6px 12px;font-weight:750}
.primary.ready,.primary:hover{background:#285448;color:#fff0cc}.primary span{float:right}
footer{font-size:.72rem;color:#66563f;margin:14px 0 24px}footer a{color:inherit}
@media(max-width:740px){.intro{align-items:start;gap:1rem}.intro>p{max-width:200px}.work{grid-template-columns:1fr}.desk{border-top:1px solid var(--line);border-left:0}.routes button,.tools button{min-height:44px}}
@media(max-width:460px){main{padding:0 12px}.mast{height:54px;padding:0 13px}.intro{display:block;padding:18px 0 13px;margin-bottom:12px}.intro>p{max-width:350px;margin-top:10px}.story,.desk{padding:11px}.chapter{margin-bottom:8px}.caption{min-height:35px;margin-top:5px}.scene{border-radius:5px}.legend{top:5%}.board::before{inset:4px}}
.scene-name{position:absolute;bottom:0;left:0;right:0;text-align:center;padding:2px 0 3px;font-size:clamp(.6rem,1.3vw,.9rem);background:linear-gradient(transparent,#111f1bf5 45%)}
.scene>span.number{position:absolute;display:grid;place-items:center;top:3px;left:3px;bottom:auto;right:auto;min-width:1.35em;aspect-ratio:1;padding:0;border-radius:50%;font-size:clamp(.58rem,1.25vw,.86rem);color:#17382e;background:#fae2a1;border:1px solid #d4ac69}
.order{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.order button{width:100%;min-height:36px;font-size:.78rem;font-weight:700;text-align:left;border:1px solid #c6b395;background:#fbf2df;border-radius:6px;padding:6px 8px}
.order button:hover:not(:disabled),.routes button.pinned{background:#e8d6af}
.routes button.broken{background:#eadad2;color:#793b33;text-decoration:line-through}
.order button[aria-pressed="true"],.scene[aria-pressed="true"]{outline:3px solid #a86b2e;outline-offset:2px}
.order button.suggested,.scene.suggested{outline:2px dashed #a86b2e;outline-offset:2px}
@media(max-width:740px){.order button{min-height:44px}}
