:root{color-scheme:light;--terra:#b94f32;--ink:#48212f;--cream:#fff0d9;--violet:#6b277f;--edge:#efbc91;font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;background:#793b32;color:var(--cream)}
*{box-sizing:border-box}body{margin:0;overscroll-behavior-y:none;background:radial-gradient(ellipse at top,#cc6747,#793b32 80%)}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{cursor:pointer;color:inherit;border:0}button:disabled{cursor:default;opacity:.65}button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #fff9ee;outline-offset:3px}button:active{transform:translateY(2px)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.game-shell{position:relative;width:min(100%,460px);height:100vh;height:100svh;height:100dvh;max-height:1000px;margin:0 auto;display:grid;grid-template-rows:auto 87px 28px minmax(180px,1fr) 82px 48px 22px;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);overflow:hidden;background:#b94f32 url('../assets/play/stitchsling/felt.webp') center top/100% auto;box-shadow:0 0 65px #32172088;isolation:isolate}
.brand{position:relative;line-height:0}.brand img{width:100%;height:auto;display:block;pointer-events:none}.course-card{text-align:center;position:relative;padding:5px 16px 18px;background:linear-gradient(#a53a1e00,#a53a1e44)}.course-name{height:46px;width:87%;margin:auto;display:flex;align-items:center;justify-content:center;gap:12px;background:url('../assets/play/stitchsling/plaque.webp') center/100% 100% no-repeat;color:#542836;filter:drop-shadow(0 3px 2px #59201b44)}.course-name strong{font-size:19px}.course-name>span{font-size:12px;font-weight:900;letter-spacing:1px}.course-card p{font-size:12px;margin:5px 0;line-height:1.3;font-weight:700;text-shadow:0 1px 3px #5e251a}.course-tabs{display:flex;gap:7px;justify-content:center;position:absolute;bottom:0;left:0;right:0}.course-tabs span{height:19px;width:28px;font-size:12px;font-weight:900;background:#a23e2a;border:1px dashed #f6cba1;border-radius:0 0 9px 9px;box-shadow:0 2px 3px #54202155}.course-tabs .current{background:#6b277f}.course-tabs .complete{background:#fff0d9;color:#6b277f}.score-row{display:flex;justify-content:space-between;align-items:center;padding:2px 18px;font-size:12px;font-weight:800;background:#8f341b45;text-shadow:0 1px 1px #5a2218}
.stage-wrap{position:relative;min-height:0;margin:0 5px;border-left:2px dashed #f2b389a3;border-right:2px dashed #f2b389a3;touch-action:none;overscroll-behavior:contain;overflow:hidden}canvas{width:100%;height:100%;display:block;touch-action:none;user-select:none;-webkit-user-select:none}.stage-note{position:absolute;top:12px;left:15px;right:15px;text-align:center;font-size:13px;line-height:1.4;font-weight:800;pointer-events:none;text-shadow:0 1px 4px #722a1d}.stage-note em{font-style:normal;color:white}.controls{display:grid;grid-template-columns:68px minmax(0,1fr) 68px;align-items:center;gap:12px;padding:5px 17px 0;background:url('../assets/play/stitchsling/shelf.webp') center top/100% 22px no-repeat;z-index:2}.fabric-button{min-height:64px;background:transparent url('../assets/play/stitchsling/button.webp') center/100% 100% no-repeat;color:#fff4e4;font-weight:900;font-size:21px;filter:drop-shadow(0 4px 2px #60201855);padding:10px 20px;text-shadow:0 2px 1px #4b1c5a}.primary{display:flex;align-items:center;justify-content:center;gap:12px;height:72px;line-height:1.1}.play-icon{font-size:22px}.icon-button{height:64px;width:64px;background-color:transparent;background-size:100% 100%;background-position:center;background-repeat:no-repeat;filter:drop-shadow(0 3px 2px #62231d55)}.pause-button{background-image:url('../assets/play/stitchsling/pause.webp')}.restart-button{background-image:url('../assets/play/stitchsling/restart.webp')}.utility{display:flex;align-items:stretch;justify-content:space-evenly;padding:0 8px;gap:2px}.utility button,.utility a{background:transparent;color:#fff1df;font-size:12px;min-height:44px;padding:0 8px;display:flex;align-items:center;text-decoration:none;font-weight:800}.utility button:hover,.utility a:hover{background:#6b277f55;border-radius:9px}.save-strip{text-align:center;font-size:11px;line-height:18px;color:#ffdfba;background:#84331f55;overflow:hidden;white-space:nowrap}
.small-button{min-height:48px;padding:8px 16px;background:#6b277f;border:1px dashed #efceef;border-radius:12px;font-size:14px;font-weight:800;color:#fff3e8;box-shadow:0 3px 0 #42174e33}.cancel-hold{position:absolute;bottom:10px;right:12px;z-index:5}.result{position:absolute;top:39px;left:18px;right:18px;padding:16px 18px 14px;text-align:center;color:#512639;background:#fff0dcf5;border:2px dashed #b34e32;border-radius:22px;box-shadow:0 7px 22px #6b231a44;pointer-events:none}.eyebrow{font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:2px}.result h2{font-size:25px;margin:4px 0 6px}.result p{font-size:14px;margin:0;line-height:1.4}.restart-banner{position:absolute;top:18px;left:10px;right:10px;z-index:8;background:#fff0df;color:#542836;border:2px dashed #9d462d;padding:12px;border-radius:15px;display:flex;justify-content:space-between;align-items:center;gap:10px;box-shadow:0 6px 18px #62251955}.restart-banner strong{font-size:17px}.modal-panel{position:absolute;inset:12px 10px;z-index:10;background:#fff0df;color:#542836;border:2px dashed #b34e32;border-radius:22px;box-shadow:0 8px 25px #62251c77;padding:18px;overflow:hidden;overscroll-behavior:contain;touch-action:none}.pause-panel{inset:60px 24px auto;text-align:center;padding:24px 18px}.modal-panel h2{font-size:23px;margin:4px 0 12px}.modal-panel p{font-size:13px;line-height:1.4}.pause-panel .fabric-button{width:100%;margin-top:12px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:4px}.panel-heading h2{font-size:20px;margin:0}.panel-heading .small-button{padding:8px 12px}.sandbox-panel label{display:grid;gap:5px;font-size:13px;font-weight:bold;margin:10px 0}.sandbox-panel select{min-height:44px;max-width:100%;width:100%;background:white;color:#512639;border:1px solid #a96955;border-radius:8px;padding:8px;font-size:14px}.sandbox-actions{display:flex;gap:8px}.sandbox-actions button{flex:1}#save-status{font-size:12px;min-height:17px}
.instructions{max-width:800px;margin:0 auto;padding:36px 25px 60px;background:#fff0df;color:#512639;line-height:1.7;font-size:16px}.instructions h1{font-size:28px;line-height:1.2}.instructions h2{font-size:22px;margin-top:30px}.instructions a{color:#6b277f}.help-heading{display:flex;align-items:flex-start;gap:18px}.help-heading h1{margin-top:0}.help-heading button{flex-shrink:0}.game-shell.help-open{height:100svh}
@media(min-width:900px){.game-shell{border-left:1px solid #d57857;border-right:1px solid #d57857}.instructions{margin-top:30px;border-radius:24px 24px 0 0}}
@media(max-height:750px){.game-shell{grid-template-rows:auto 78px 25px minmax(180px,1fr) 74px 44px 18px}.brand img{height:76px;object-fit:cover}.course-name{height:39px}.course-card p{font-size:11px;margin:4px 0}.controls{padding-top:4px;gap:8px}.primary{height:64px;font-size:19px}.stage-note{font-size:12px;top:8px}.utility button,.utility a{font-size:11px;padding:0 6px}.result{top:35px;padding:12px}.result h2{font-size:22px}.save-strip{line-height:16px}.modal-panel{padding:12px;inset:5px}.sandbox-panel p{margin:7px 0}.sandbox-panel label{margin:7px 0}.sandbox-panel select{min-height:44px}}
@media(prefers-reduced-motion:reduce){button:active{transform:none}*{scroll-behavior:auto!important}}

/* Keep the complete preset shelf inside the game, including short phones. */
.sandbox-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;align-content:start}.sandbox-panel .panel-heading,.sandbox-panel>p,.sandbox-actions{grid-column:1/-1}.sandbox-panel>p{margin:0}.sandbox-panel label{margin:0;align-self:end}.sandbox-panel #load-selected{align-self:end;padding:7px}.sandbox-panel .panel-heading{margin-bottom:2px}
@media(max-height:750px){.sandbox-panel{gap:6px}.sandbox-panel>p:first-of-type{display:none}.sandbox-panel h2{font-size:18px}.sandbox-panel label{font-size:11px}.sandbox-panel select{font-size:12px}}
