/* Stitched Keepsakes: presentation only. Gameplay and save keys live in game.js. */
:root{--bg:#eee6d7;--bg1:#faf6ec;--bg2:#e7dcc9;--surface:#fcf8ee;--surface2:#f1e9da;--line:#cbbd9f;--accent:#24545a;--accent2:#766487;--text:#203f43;--muted:#696757;--gold:#b37a20;--good:#536f49;--bad:#a14342;--g-teal:#377e80;--g-purple:#89749e;--g-blue:#3e6688;--g-rose:#c77360;--g-amber:#d5a143;--g-green:#7c8f60;--shadow:0 6px 20px #66503420;--pbp-chrome:350px}
body{background-color:#b3a895;background-image:repeating-linear-gradient(0deg,#ffffff04 0 1px,transparent 1px 10px),repeating-linear-gradient(90deg,#4c433603 0 1px,transparent 1px 10px),radial-gradient(ellipse at top,#c0b5a3,transparent 85%);color:var(--text);font-family:Georgia,'Times New Roman',serif}
#app{max-width:540px;padding:12px 12px max(12px,env(safe-area-inset-bottom));gap:10px;min-height:100dvh}
header.top{min-height:65px}.brand{height:auto;min-height:65px;padding:0 45px;flex-direction:column;gap:3px}.stitched-title{font-size:clamp(29px,7vw,39px);font-weight:400;line-height:1.06;letter-spacing:-1.3px;margin:0;color:#204d54;text-shadow:0 1px #fff}.theme-caption{font:11px/1.3 system-ui,sans-serif;letter-spacing:.13em;color:#6c7059;text-transform:uppercase}.theme-caption:before,.theme-caption:after{content:'❧';color:#7c8b62;padding:0 8px}
.settings-cog{background:#f8f1e2;border:1px dashed #bca984;border-radius:13px;color:var(--accent);top:7px;width:39px;height:39px;box-shadow:0 2px 4px #7a63431a}.settings-cog:focus-visible{outline-color:var(--accent)}
.dashboard,.board-wrap,.card,.boost,.support-link button{background-color:#f9f3e7;background-image:repeating-linear-gradient(90deg,#b6a07b0a 0 1px,transparent 1px 3px);border:1px solid #cbbb9e;box-shadow:0 2px 6px #69533818,inset 0 0 0 3px #fff8e9}
.dashboard{padding:8px;gap:7px;border-radius:16px}.lvl-pill{min-height:24px;background:transparent;border:0;color:var(--text);font:14px Georgia,serif;padding:0 8px;gap:9px}.lvl-pill b{font-size:17px}.lvl-pill .ty{font:9px system-ui,sans-serif;color:#65644f;letter-spacing:.1em}
.tts-home{top:8px;left:9px;background:#f9f5e9;border:1px dashed #bdad8d;color:var(--accent);font-family:system-ui,sans-serif;height:25px}.tts-home svg{width:16px}.status{min-height:48px;background:#fffaf080;border:0;border-top:1px dashed #c6b99d;border-radius:0;padding:6px 5px 0;gap:8px}.goal-label,.score .l,.moves .l{font:9px system-ui,sans-serif;letter-spacing:.09em;color:var(--muted)}.goal-chip{font:15px Georgia,serif}.goal-chip .swatch{width:25px;height:25px}.moves{background:#eee6d6;border:1px dashed #bcaa86;border-radius:9px;flex-basis:70px;height:44px}.moves .n{font:700 24px/1 Georgia,serif;color:var(--accent)}
.scorebar{background:transparent;border:0;border-top:1px dashed #c6b99d;border-radius:0;height:61px;min-height:61px;padding:1px 5px 0;color:var(--text);grid-template-rows:31px 26px}.score .n{font:21px Georgia,serif}.score.target .n{font-size:16px;color:var(--text)}.glowbar{color:var(--text);border-top:1px solid #c8b99b80;gap:9px}.glow-title{font:10px Georgia,serif}.glow-next{color:var(--muted);font:9px system-ui,sans-serif}.glow-orb{background:#f4ecdd;width:14px;height:14px}.glow-mark.g1{color:#548384}.glow-mark.g2{color:#8a729e}.glow-mark.g3,.result-glows .glow-mark.g3{color:#946a22}.glow-track:before{background:#bcad9160}.glow-fill{background:linear-gradient(90deg,#548384,#8a729e,#b3812d);box-shadow:none}
.board-wrap{border-radius:19px;padding:10px;border:1px solid #b9a582;outline:1px dashed #9c8e6c;outline-offset:-6px;width:min(100%,max(210px,calc(100dvh - var(--pbp-chrome))));box-shadow:0 4px 13px #6b543225,inset 0 0 0 3px #fffaee}
#stage{border-radius:10px;background-color:#ddd0b8;background-image:linear-gradient(to right,#a5947248 1px,transparent 1px),linear-gradient(to bottom,#a5947248 1px,transparent 1px),repeating-linear-gradient(0deg,#ffffed1a 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,#a0875910 0 1px,transparent 1px 3px);background-size:var(--cell) var(--cell),var(--cell) var(--cell),3px 3px,3px 3px;box-shadow:inset 0 2px 6px #6d57352a}
.gem svg{width:99%;height:99%;filter:drop-shadow(0 2px 1px #493a2929)}.gem.sel svg{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #285d62)}.gem:focus-visible{outline:2px solid #24545a;outline-offset:-2px;border-radius:8px}
body{--haze-line:#7a4f58;--haze-fill:#c4a6b080;--haze-dense:#a77f8cb8}.jcell.j1{border:4px dashed var(--haze-line);background:var(--haze-fill);box-shadow:inset 0 0 8px #b45e7444;border-radius:7px}.jcell.j1:before,.jcell.j1:after{display:none}.jcell.j2{border:5px double var(--haze-line);background:var(--haze-dense);box-shadow:inset 0 0 0 3px #d2a1a8,inset 0 0 12px #9279a6;border-radius:7px}.wall{background:#988b742e;box-shadow:inset 0 2px 4px #57472f40}
.tangle{border:3px dashed #a46c42;box-shadow:0 0 0 1px #f8edce;inset:8%}.tangle:before{border:2px dashed #8b749c}.tangle:after{border:2px dashed #6a8561}.tangle-count{background:#a2534d;font-family:system-ui,sans-serif}
.boosters{gap:9px;padding:2px 3px}.boost{max-width:none;border:1px dashed #baa583;border-radius:12px;padding:7px 3px 6px;gap:3px}.boost svg{width:29px;height:29px}.boost .bl{font:13px Georgia,serif;color:var(--text)}.boost .bc{font:12px Georgia,serif;background:#667652;border:1px solid #fbf4e4;min-width:22px;height:22px;border-radius:50%;right:-5px;top:-6px}.boost.armed{border-color:var(--accent);outline:2px solid #4c7973;box-shadow:0 0 0 4px #fff8df}.boost.empty{opacity:.46}.boost-hint{font:12px/1.4 system-ui,sans-serif;color:var(--text);margin:0}
.support-link{padding:3px 3px 0;margin-top:auto;width:auto;max-width:100%;align-self:center}.support-link button{color:var(--text);font:600 12px system-ui,sans-serif;border:1px dashed #bba583;border-radius:12px;padding:7px 15px;gap:8px}.support-link svg{width:28px;height:28px;flex:none}.support-link button:focus-visible{outline-color:var(--accent)}
.overlay{background:#2e382e88;backdrop-filter:blur(4px)}.card{max-width:420px;border-radius:19px;padding:23px;color:var(--text);font-family:system-ui,sans-serif;outline:1px dashed #b4a17e;outline-offset:-6px}.card h2{font:29px/1.15 Georgia,serif;margin-bottom:10px}.card .sub{font-size:14px;color:#606655}.btn{font:600 15px system-ui,sans-serif;background:#386967;border:1px dashed #f7efca70;box-shadow:0 3px 7px #284b3e20;border-radius:11px}.btn.ghost{background:#f5eddd;border:1px dashed #c2af8e;color:var(--text)}.mini{background:#faf3e7;border:1px dashed #bdad8b;color:var(--text)}.name-input{background:#fffaf1;border:1px solid #baaa8e;color:var(--text)}.lesson-icon,.lesson-icons .ic,.legrow .ic,.legrow .ic.beacon-ic,.lesson-icon.beacon-icon,.legrow .ic.combo-ic{background:#eee5d4;border-color:#ccbb9a;box-shadow:none}.profile-row,.badge,.lvbtn{background:#f4eddf;border:1px dashed #c9b897;color:var(--text)}.profile-row b,.legrow .tx b,.badge b,.badge-section,.lvbtn{font-family:Georgia,serif}.badge.locked{background:#ece7dd}.positive-card{background:#eaf0df;border:1px dashed #9baa82;box-shadow:none}.positive-card .positive-for{color:#66734f}.positive-card .positive-message{font:18px/1.4 Georgia,serif;color:var(--text)}.toast,.toast.surge,.toast.harmony{background:#365e5b;border:1px dashed #f3d594;color:#fff9e8;font:700 19px Georgia,serif;box-shadow:0 3px 10px #35483b40;text-shadow:none}.skip-bonus{background:#d9b363;color:#253d3b;border:2px dashed #fff3cd;box-shadow:0 0 0 2px #b38b4550;animation:none}.skip-title{font:700 15px Georgia,serif}.skip-remaining{font-size:9px}.version{background:#496a60}.settings-version{letter-spacing:.04em}.aura-ribbon,.harmony-link,.beacon-trail{filter:saturate(.5)}
@media(max-height:740px){:root{--pbp-chrome:319px}#app{gap:7px;padding-top:5px;max-width:470px}header.top,.brand{min-height:53px}.stitched-title{font-size:30px}.theme-caption{font-size:9px}.dashboard{padding:5px;gap:4px}.status{min-height:43px}.moves{height:39px;min-height:39px}.scorebar{height:56px;min-height:56px;grid-template-rows:28px 24px}.boost{padding:4px 3px}.boost svg{width:25px;height:25px}.support-link button{padding:5px 12px}.support-link svg{width:23px;height:23px}}
@media(max-width:360px){#app{padding-left:8px;padding-right:8px}.theme-caption{letter-spacing:.08em}.glow-next{font-size:8px}.glowbar{gap:5px}.boost .bl{font-size:12px}.support-link button{font-size:11px}.stitched-title{font-size:27px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}

.gem.aura-source svg,.gem.harmony-source svg{filter:drop-shadow(0 0 5px #d9bd78) drop-shadow(0 0 8px #96b6a0)}.gem.bonus-created svg{filter:drop-shadow(0 0 5px #f4dfaa)}.harmony-link{background:linear-gradient(90deg,#91b8a3,#f1dfac,#a28aae);box-shadow:0 0 6px #cfb98a}.harmony-wash{background:radial-gradient(circle,#f1dfac66,#91b8a333 40%,transparent 80%)}.harmony-wave{border-color:#e1c58c;box-shadow:0 0 7px #b2b793}.beacon-trail{background:linear-gradient(90deg,transparent,#eed9a0,#a5ba9a);box-shadow:0 0 5px #d8c28d}.harmony-guide .harmony-ribbon{background:linear-gradient(90deg,#91b8a3,#f1dfac,#a28aae);box-shadow:none}.lesson-icon.beacon-icon svg{width:50px;height:50px}
