#sledRacing{position:absolute;inset:0;z-index:55;overflow:hidden;border-radius:inherit;color:#fff2d7;background:linear-gradient(#18392fcc,#17372eed),url('seasons/camp-winter.webp') center/cover;font:500 13px/1.35 system-ui,sans-serif;touch-action:none}#sledRacing[hidden]{display:none!important}#sledRacing button{color:#fff2d7;background:#315a3f;border:1.5px solid #e8c790;border-radius:10px;min-height:34px;padding:6px 9px;font:600 12px/1.2 system-ui,sans-serif;touch-action:manipulation}#sledRacing button[aria-pressed=true]{background:#778e45;color:#fff;box-shadow:inset 0 0 0 2px #f1d4a1}#sledRacing button:disabled{opacity:.45}#sledRacing p{margin:5px 0}#sledRacing small{font-size:10px;color:#ebd6b3}#sledRacing .sled-header{position:absolute;z-index:3;left:6%;right:6%;top:6%;display:flex;align-items:center;justify-content:space-between;min-height:35px;padding:5px 9px;border:1px solid #ddbd87;border-radius:12px 12px 0 0;background:#264b38f2}#sledRacing .sled-header strong{font:700 17px Georgia,serif}#sledRacing .sled-header button{font-size:21px;padding:0;width:34px;min-height:30px}#sledRacing .sled-sheet{position:absolute;left:6%;right:6%;top:calc(6% + 44px);bottom:5%;overflow-y:auto;overscroll-behavior:contain;background:#234635ee;border:1.5px solid #ddbd87;border-top:0;border-radius:0 0 14px 14px;padding:10px;display:flex;flex-direction:column;gap:7px}#sledRacing .sled-sheet footer{display:flex;flex-wrap:wrap;gap:5px;margin-top:auto;padding-top:6px;position:sticky;bottom:-10px;background:#234635e8}#sledRacing .sled-sheet footer button{flex:1}#sledRacing .sled-steps{display:flex;justify-content:space-between;gap:8px;color:#e9d09f;font-size:11px}#sledRacing .sled-body-options,#sledRacing .sled-course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}#sledRacing .sled-course-grid button{min-height:53px;text-align:left}#sledRacing .sled-course-grid small{display:block}#sledRacing .sled-row{display:flex;flex-wrap:wrap;gap:5px}#sledRacing .sled-row button{flex:1;min-width:60px;text-transform:capitalize}#sledRacing .sled-trace,#sledRacing .sled-preview{position:relative;margin:auto;width:min(100%,230px);height:105px;border:1px dashed #e3c591;border-radius:12px;background:#b9d7d344;display:flex;justify-content:center;align-items:center;overflow:hidden;touch-action:none}#sledRacing .sled-trace img,#sledRacing .sled-preview img{height:98%;max-width:95%;object-fit:contain;pointer-events:none}#sledRacing .sled-trace-progress{position:absolute;bottom:0;left:0;height:5px;background:#f5b057}#sledRacing .sled-preview .sled-mounts{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:space-around}#sledRacing .sled-mounts button{font-size:10px;min-height:28px}#sledRacing .sled-preview span{position:absolute;right:22%;bottom:30%;font-size:26px;color:#e2bd76;text-shadow:0 1px 4px #543}#sledRacing .sled-paint-green{background:#456e52aa}#sledRacing .sled-paint-red{background:#a34845aa}#sledRacing .sled-paint-natural{background:#ac875baa}#sledRacing .sled-test.tested img{animation:sledRamp .7s ease-in-out 2}@keyframes sledRamp{50%{transform:translate(24px,-13px) rotate(-8deg)}}#sledRacing .sled-stats{display:flex;justify-content:space-between;gap:4px}#sledRacing .sled-stats span{display:grid;text-align:center;flex:1;border:1px solid #cda97d;border-radius:8px;padding:5px 2px;font-size:10px}#sledRacing .sled-stats b{font-size:14px}#sledRacing .sled-name{display:grid;gap:4px}#sledRacing .sled-name input{font:14px system-ui;padding:6px;color:#244735;background:#f8ead2;border-radius:8px;border:1px solid #c39a65}#sledRacing .sled-garage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#sledRacing .sled-garage article{border:1px solid #cfad7e;border-radius:10px;padding:6px;display:grid;gap:3px}#sledRacing .sled-garage img{width:55px;height:45px;object-fit:contain;margin:auto}#sledRacing .sled-garage button{min-height:27px}#sledRacing .sled-race{position:absolute;inset:0}#sledRacing #sledCanvas{width:100%;height:100%;display:block;touch-action:none}#sledRacing .sled-hud{position:absolute;top:3%;left:3%;right:3%;display:flex;align-items:center;gap:4px;background:#1c402ebc;border:1px solid #f2d8a3;border-radius:12px;padding:4px 6px;font-size:11px;white-space:nowrap}#sledRacing .sled-hud b{max-width:26%;overflow:hidden;text-overflow:ellipsis}#sledRacing .sled-hud span{flex:1;text-align:center}#sledRacing .sled-hud button{min-height:25px;padding:0 5px}#sledRacing .sled-toast{position:absolute;left:9%;right:9%;top:15%;text-align:center;text-shadow:0 2px 5px #173c32;font-weight:700;pointer-events:none}#sledRacing .sled-controls{position:absolute;bottom:4%;left:4%;right:4%;display:flex;justify-content:space-between;gap:6px}#sledRacing .sled-controls button{flex:1;min-height:42px;background:#214e3cdd;font-size:14px}#sledRacing .sled-result .sled-rank{text-align:center;font:700 32px Georgia,serif;color:#f5d691}#sledRacing .sled-result ol{margin:0;padding-left:27px;display:grid;gap:3px}#sledRacing .sled-result p{font-size:12px}
@media(max-width:600px){#sledRacing .sled-header{top:3%;left:3%;right:3%}#sledRacing .sled-sheet{left:3%;right:3%;top:calc(3% + 44px);bottom:3%}#sledRacing .sled-header strong{font-size:15px}#sledRacing .sled-course-grid button{min-height:43px}#sledRacing .sled-controls{bottom:2%}}
body.cover-screen-active #sledRacing{font-size:10px}body.cover-screen-active #sledRacing .sled-header{top:2%;left:20%;right:2%;min-height:25px}body.cover-screen-active #sledRacing .sled-header strong{font-size:11px}body.cover-screen-active #sledRacing .sled-header button{min-height:23px;width:25px;font-size:15px}body.cover-screen-active #sledRacing .sled-sheet{left:20%;right:2%;top:calc(2% + 32px);bottom:2%;padding:4px;gap:3px}body.cover-screen-active #sledRacing button{min-height:24px;padding:2px 4px;font-size:9px}body.cover-screen-active #sledRacing .sled-body-options,body.cover-screen-active #sledRacing .sled-course-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}body.cover-screen-active #sledRacing .sled-preview,body.cover-screen-active #sledRacing .sled-trace{height:50px;width:120px}body.cover-screen-active #sledRacing .sled-steps,body.cover-screen-active #sledRacing small{font-size:8px}body.cover-screen-active #sledRacing .sled-hud{top:1%;left:18%;right:1%;font-size:8px;padding:2px}body.cover-screen-active #sledRacing .sled-controls{left:18%;right:1%;bottom:1%}body.cover-screen-active #sledRacing .sled-controls button{min-height:25px;font-size:9px}
/* The workbench shows the sled taking shape at each step. */
#sledRacing .sled-build-art{position:relative;width:100%;height:100%;min-height:92px;overflow:hidden;background:linear-gradient(170deg,#c6d8ce 0 53%,#eaf1e9 54%);pointer-events:none}
#sledRacing .sled-build-bench{position:absolute;left:6%;right:6%;bottom:6px;height:18px;border-radius:5px;background:repeating-linear-gradient(90deg,#80533b 0 31%,#aa7451 32% 34%);box-shadow:0 4px 0 #573b2f}
#sledRacing .sled-build-body{position:absolute;left:18%;right:18%;top:32%;height:36%;border:3px solid #68432e;border-radius:48% 48% 38% 38% / 42% 42% 53% 53%;background:repeating-linear-gradient(0deg,#b98556 0 10px,#a97449 11px 13px);box-shadow:inset 0 3px 6px #f7cf89,0 5px 5px #47392a77;transition:clip-path .25s,background .25s,transform .25s}
#sledRacing .sled-build-art.blank .sled-build-body{clip-path:inset(0 0 0 0 round 2px);border-radius:8px}
#sledRacing .sled-build-art.paint-orange .sled-build-body{background:repeating-linear-gradient(0deg,#d97737 0 10px,#a95632 11px 13px)}
#sledRacing .sled-build-art.paint-green .sled-build-body{background:repeating-linear-gradient(0deg,#426b4b 0 10px,#2d4d39 11px 13px)}
#sledRacing .sled-build-art.paint-red .sled-build-body{background:repeating-linear-gradient(0deg,#bb5047 0 10px,#853c38 11px 13px)}
#sledRacing .sled-build-art.body-alpine .sled-build-body,#sledRacing .sled-build-art.body-rocket .sled-build-body{left:27%;right:27%}
#sledRacing .sled-build-art.body-toboggan .sled-build-body{left:11%;right:11%}
#sledRacing .sled-build-runner{position:absolute;bottom:18px;width:22%;height:11px;border:4px solid #ad7e4f;border-top:0;border-radius:0 0 18px 18px;opacity:.25;transform:translateY(22px);transition:opacity .25s,transform .25s}
#sledRacing .sled-build-runner.runner-one{left:23%}#sledRacing .sled-build-runner.runner-two{right:23%}#sledRacing .sled-build-runner.installed{opacity:1;transform:translateY(0)}
#sledRacing .sled-build-decal{position:absolute;left:45%;top:34%;font-size:25px;color:#efcf90;text-shadow:0 1px 3px #45251d}
#sledRacing .sled-build-saw{position:absolute;top:18%;width:25px;height:18px;background:linear-gradient(145deg,#ddd,#89939c);clip-path:polygon(0 0,100% 0,88% 45%,100% 60%,80% 75%,0 60%);transform:rotate(-15deg)}
#sledRacing .sled-build-art.shaped .sled-build-saw{display:none}
#sledRacing .sled-test.tested .sled-build-art{animation:sledRamp .7s ease-in-out 2}
#sledRacing .sled-rival-key{position:absolute;top:22%;right:4%;display:grid;gap:2px;background:#173b31d9;border:1px solid #f0d3a3;border-radius:8px;padding:4px 6px;font-size:10px;pointer-events:none}
#sledRacing .sled-rival-key:empty{display:none}
#sledRacing .sled-build-art.blank .sled-build-body:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#e3bc89 0 var(--cut-progress),#774e35 var(--cut-progress) 100%);opacity:.5;transition:background .2s}
#sledRacing .sled-header{display:flex;left:3%;right:3%;top:3%;min-height:34px;border-radius:12px 12px 0 0;gap:8px}#sledRacing .sled-header strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#sledRacing .sled-sheet{left:3%;right:3%;top:calc(3% + 42px);bottom:3%;padding:8px;gap:5px}#sledRacing .sled-sheet footer{flex:none}#sledRacing .sled-trace,#sledRacing .sled-preview{flex:0 0 132px;width:min(100%,260px);height:132px;min-height:132px;overflow:visible}#sledRacing .sled-build-art{border-radius:10px;overflow:hidden}#sledRacing .sled-runner-target{position:absolute;bottom:22%;left:20%;right:20%;height:38%;border:2px dashed #f4d18d;border-radius:12px;display:grid;place-items:center;color:#fff4cf;background:#274a3988;font-size:11px;pointer-events:none}#sledRacing .sled-runner-tray{display:flex;justify-content:center;min-height:38px}#sledRacing .sled-runner-piece{position:relative;z-index:4;border:2px solid #dbad74;border-radius:18px;background:linear-gradient(#a7794c,#715038);padding:8px 18px;touch-action:none;user-select:none;box-shadow:0 5px 6px #0005;color:#fff7d9;font-weight:700}#sledRacing .sled-steps{flex:none}#sledRacing .sled-body-options{flex:none}#sledRacing .sled-sheet>p{flex:none}#sledRacing .sled-trace-progress{z-index:2}
/* Full screen activity, separate from the small world card. */
#sledRacing{position:fixed;inset:0;z-index:10000;border-radius:0;background:linear-gradient(#133529dd,#143528eb),url('seasons/camp-winter-wide.webp') center/cover;display:block;padding:0;box-sizing:border-box}
#sledRacing .sled-header{top:max(8px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));border-radius:14px;min-height:42px;display:flex;flex-direction:row;justify-content:space-between;padding:5px 10px}
#sledRacing .sled-header button{flex:none}
#sledRacing .sled-sheet{top:calc(max(8px,env(safe-area-inset-top)) + 52px);bottom:max(10px,env(safe-area-inset-bottom));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));border:1.5px solid #ddbd87;border-radius:14px;padding:clamp(10px,3vw,22px);gap:clamp(8px,1.6vh,15px)}
#sledRacing .sled-sheet footer{bottom:0;padding:8px 0;background:#234635}
#sledRacing .sled-trace,#sledRacing .sled-preview{flex:1 1 auto;width:min(100%,600px);height:auto;min-height:170px;max-height:42vh;overflow:hidden;margin:4px auto}
#sledRacing .sled-build-art{height:100%;min-height:170px;display:grid;place-items:center;background:linear-gradient(155deg,#789582,#c2d3c8 52%,#f5f2e5 53%)}
#sledRacing .sled-art-image{display:block;position:relative;z-index:1;width:90%;height:90%;max-width:none;object-fit:contain;filter:drop-shadow(0 12px 9px #213c3888);transition:filter .25s,transform .25s,opacity .25s}
#sledRacing .sled-build-art.blank .sled-art-image{clip-path:inset(0 calc(100% - var(--cut-progress)) 0 0);opacity:.9}
#sledRacing .sled-build-art.paint-green .sled-art-image{filter:hue-rotate(75deg) drop-shadow(0 12px 9px #213c3888)}
#sledRacing .sled-build-art.paint-red .sled-art-image{filter:hue-rotate(-25deg) saturate(1.25) drop-shadow(0 12px 9px #213c3888)}
#sledRacing .sled-build-art.paint-natural .sled-art-image{filter:saturate(.7) drop-shadow(0 12px 9px #213c3888)}
#sledRacing .sled-build-art.paint-orange .sled-art-image{filter:drop-shadow(0 12px 9px #213c3888)}
#sledRacing .sled-build-body,#sledRacing .sled-build-runner,#sledRacing .sled-build-decal,#sledRacing .sled-build-bench{display:none}
#sledRacing .sled-build-saw{z-index:2;top:18%;width:38px;height:35px;filter:drop-shadow(0 3px 3px #2238)}
#sledRacing .sled-runner-target{z-index:2;bottom:12%;height:25%;background:#234536aa}
#sledRacing .sled-runner-piece{min-width:130px;text-align:center}
#sledRacing .sled-test.tested .sled-art-image{animation:sledRamp .7s ease-in-out 2}
#sledRacing .sled-race{inset:0}
#sledRacing .sled-controls{bottom:max(12px,env(safe-area-inset-bottom));max-width:700px;margin:auto}
@media(max-height:620px){#sledRacing .sled-sheet{gap:4px}#sledRacing .sled-trace,#sledRacing .sled-preview{min-height:105px;max-height:30vh}#sledRacing .sled-build-art{min-height:105px}#sledRacing .sled-sheet p{margin:2px 0}}
#sledRacing .sled-build-art.shaped.runner-steel .sled-art-image{filter:contrast(1.08) saturate(.9) drop-shadow(0 12px 9px #213c3888)}
#sledRacing .sled-build-art.shaped.runner-wide .sled-art-image{transform:scaleX(1.07)}
#sledRacing .sled-build-art.shaped.runner-wood .sled-art-image{transform:scaleX(.98)}
#sledRacing .sled-art-image{max-width:90%;max-height:90%;object-position:center}
#sledRacing .sled-setup{overflow:auto;display:grid;grid-template-rows:minmax(125px,38vh) minmax(0,1fr) auto;gap:9px}
#sledRacing .sled-setup-preview{min-height:0;border:1px solid #d9bb8c;border-radius:12px;overflow:hidden}
#sledRacing .sled-setup-preview .sled-build-art{height:100%;min-height:0}
#sledRacing .sled-setup-fields{overflow-y:auto;display:grid;align-content:start;gap:8px;min-height:0;padding-right:3px}
#sledRacing .sled-setup-fields section{display:grid;gap:5px}
#sledRacing .sled-setup-fields strong,#sledRacing .sled-sheet>strong{color:#ffdfa8;font-size:13px}
#sledRacing .sled-setup .sled-body-options{grid-template-columns:repeat(2,minmax(0,1fr))}
#sledRacing .sled-setup .sled-body-options button{min-height:36px}
#sledRacing .sled-setup footer{margin:0;position:static}
#sledRacing .sled-setup .sled-art-image{width:85%;height:92%;max-width:85%;max-height:92%}
#sledRacing .sled-setup-preview .sled-build-art{position:relative}
#sledRacing .sled-setup-preview .sled-art-image{position:absolute;inset:0;margin:auto;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
#sledRacing .sled-course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#sledRacing .sled-sheet:not(.sled-setup)>strong{display:block}
#sledRacing .sled-victory{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px;border:1px solid #e4c58a;border-radius:12px;background:#54744866;animation:sledWin .85s ease-out both}
#sledRacing .sled-victory img{width:90px;height:56px;object-fit:contain;animation:sledBounce .8s ease-in-out 2}
#sledRacing .sled-victory strong{font:700 20px Georgia,serif;color:#ffe2a1}
#sledRacing .sled-trade{display:grid;gap:6px;padding:10px;border:1px solid #d9bd88;border-radius:12px;background:#294d3c}
@keyframes sledWin{from{opacity:0;transform:translateY(24px) scale(.9)}to{opacity:1;transform:none}}
@keyframes sledBounce{50%{transform:translateY(-9px) rotate(-3deg)}}
@media(max-height:620px){#sledRacing .sled-setup{grid-template-rows:minmax(85px,27vh) minmax(0,1fr) auto}#sledRacing .sled-setup .sled-body-options button{min-height:28px}}
#sledRacing .sled-winner-rig{position:relative;display:block;width:105px;height:78px;flex:none;animation:sledBounce .8s ease-in-out 2}
#sledRacing .sled-winner-sled{position:absolute;left:2px;bottom:0;width:100px;height:53px;object-fit:contain}
#sledRacing .sled-winner-rider{position:absolute;left:35px;bottom:20px;width:34px;height:45px;object-fit:contain;filter:drop-shadow(0 2px 1px #182b23)}
#sledRacing .sled-winner-kitty{position:absolute;left:37px;bottom:20px;font-size:31px}

#sledRacing .sled-race { background:#244b5c url('seasons/camp-winter-wide.webp') center/cover; }
#sledRacing .sled-race::before { content:''; position:absolute; inset:0; background:#213e4c9c; pointer-events:none; }
#sledRacing #sledCanvas {
  position:absolute; inset:0; margin:auto; width:min(100%,72dvh); height:auto;
  max-height:100%; aspect-ratio:18/25;
  box-shadow:0 0 40px #0e283377;
}
