/* Warm timber scene: game artwork carries the detail, controls stay compact and touch-friendly. */
*{box-sizing:border-box}html{color-scheme:dark}body{--ink:#fff2cf;--gold:#f4c574;--edge:#6f3e1e;margin:0;color:var(--ink);font:16px/1.5 system-ui,Tahoma,sans-serif;min-height:100svh;background-color:#342014;background-image:radial-gradient(ellipse at 48% 28%,#eab26424,transparent 62%),repeating-linear-gradient(90deg,#ffffff04 0 2px,transparent 2px 94px,#120c0880 95px 98px,#d4a46520 99px 100px),linear-gradient(105deg,#25180f,#53321d 48%,#281b12)}body:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:-1;background-image:var(--wood-grain);opacity:.6}header,main{width:min(990px,94%);margin:auto}header{display:flex;align-items:center;justify-content:space-between;gap:10px;height:66px;font-size:13px;border-bottom:1px solid #edc79425}header span{display:flex;align-items:center;gap:14px}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}.brand{font:bold 19px/1 Georgia,serif;letter-spacing:.1em;direction:ltr;display:flex;align-items:center;gap:9px;text-shadow:0 2px 1px #0e0b08}.brand i{font:29px Georgia;color:#f5c678}.coin{border:1px solid #f0ce8959;background:linear-gradient(#77502d,#432816);border-radius:22px;padding:7px 15px;color:#ffe7a4;box-shadow:inset 0 1px #fff0ba22,0 3px 0 #1e120b}main{display:grid;grid-template-columns:minmax(340px,510px) minmax(230px,290px);justify-content:center;align-items:center;gap:42px;padding:25px 0 35px}.bench{width:100%;padding:12px 14px 14px;border-radius:26px;background:linear-gradient(100deg,#92542a,#b67b3e 48%,#77401f);border:2px solid #ce985c;box-shadow:0 14px 0 #21150ed1,0 25px 45px #110c0a80,inset 0 2px 1px #ffdf9a,inset 0 -4px #5b321c}.bench-head{display:flex;justify-content:center;align-items:center;gap:22px;min-height:68px;margin-top:-22px;position:relative}.level-badge{display:flex;align-items:center;justify-content:center;gap:10px;min-width:158px;padding:9px 28px;border:2px solid #ffdc87;border-radius:12px 12px 27px 27px;background:linear-gradient(#ffe4a0,#edb657 60%,#cf8c30);color:#593317;text-shadow:0 1px #fff0b7;box-shadow:inset 0 3px #fff4c9,0 5px 0 #713d1b,0 8px 11px #4e291a5c;transform:rotate(-1deg)}.level-badge small{font-size:16px;font-weight:800}.level-badge b{font-size:27px;line-height:1;font-variant-numeric:tabular-nums}.rivet{width:12px;height:12px;border-radius:50%;background:linear-gradient(130deg,#ffedab,#b88a43 65%,#62421c);border:1px solid #6a401c;box-shadow:0 2px 2px #3c210e80}.objective{text-align:center;font-weight:800;font-size:15px;margin:4px 0 10px;color:#fff0c8;text-shadow:0 2px #693c21}.board{position:relative;isolation:isolate;overflow:hidden;border:3px solid #e8bc72;border-radius:11px;background:#eac477;box-shadow:0 4px 0 #5f371a,inset 0 0 0 2px #976b35,0 0 0 1px #69421f}.board:after{content:'';position:absolute;inset:0;border-radius:8px;box-shadow:inset 0 0 12px #75491655,inset 0 2px 2px #fff3ba;pointer-events:none}.frame{display:none}canvas{position:relative;display:block;width:100%;height:auto;aspect-ratio:400/428;touch-action:manipulation;cursor:pointer}.chute{position:absolute;bottom:0;inset-inline:0;text-align:center;color:#f7d996;background:linear-gradient(#6e431c00,#815327aa);font-size:9px;font-weight:700;letter-spacing:.08em;padding:6px;pointer-events:none}.chute span{padding:0 14px}.meters{display:flex;justify-content:center;gap:26px;text-align:center;margin:11px 0 0;color:#ffedbc}.meters div{display:flex;align-items:center;gap:7px}.meters b{font-size:17px;font-weight:800;direction:ltr;unicode-bidi:isolate;line-height:1}.meters small{font-size:11px;color:#f4dcb6}.console{padding:22px 0}.identity{display:flex;align-items:center;gap:10px;color:#f4c580;font-weight:700}.rule{height:2px;width:27px;background:#dda657}h1{font-size:clamp(36px,4vw,54px);line-height:1.2;margin:13px 0;color:#ffedc7;text-shadow:0 4px 0 #26180c}#intro{font-size:15px;color:#e2c7a1;margin:0 0 24px;line-height:1.7}button{font:700 15px/1.4 system-ui,Tahoma,sans-serif;cursor:pointer;min-height:45px;padding:10px 14px;border:1px solid #d7a367;border-radius:10px;color:#ffedce;background:linear-gradient(#976135,#744623);box-shadow:inset 0 2px #eac28e55,0 3px 0 #3c2212;text-shadow:0 1px #603c22;transition:transform .12s,filter .12s}button:hover{filter:brightness(1.12)}button:active{transform:translateY(2px)}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #fff1b3;outline-offset:3px}button:disabled{opacity:.45;filter:saturate(.5);cursor:default}button.primary{background:linear-gradient(#c0e777,#75b238 75%,#639b2e);border-color:#d6ee9c;color:#fffceb;text-shadow:0 2px #467b1e;box-shadow:inset 0 2px #edffae,0 4px 0 #35551c;font-size:19px}.primary b{font-size:12px;margin-inline-start:8px}.plain{background:none;border:0;box-shadow:none;color:#e4c69c}.twins{display:flex;gap:8px}.twins>*{flex:1;min-width:0}#menu{display:grid;gap:10px}#tools{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-top:10px}#tools .twins{display:contents}#tools button{min-height:77px;padding:7px 2px 6px;font-size:11px;border-radius:10px;background:linear-gradient(#ffdc89,#e5a94b 70%,#cf8b36);border:1px solid #ffe7a7;color:#4d3019;text-shadow:0 1px #ffeab3;box-shadow:inset 0 2px #fff0c0,0 4px 0 #60391c;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px}#tools button::before{content:'';display:block;width:31px;height:31px;background-image:var(--tool-icon);background-size:contain;background-position:center;background-repeat:no-repeat;filter:drop-shadow(0 2px 0 #fff0a899)}#tools #hint{background:linear-gradient(#cee995,#93bd4e);border-color:#dfefab;box-shadow:inset 0 2px #f1ffd1,0 4px 0 #48572a}.track{grid-column:1/-1;height:7px;border:1px solid #5c391f;border-radius:5px;background:#754824;box-shadow:inset 0 2px 3px #3e260f99;overflow:hidden;margin:0 0 4px}.track i{display:block;height:100%;width:0;background:linear-gradient(#d9f395,#9cc952);border-radius:5px;transition:width .25s}#sound[data-muted=true]::before{opacity:.45}#status{min-height:1.5em;font-size:13px;color:#ffe0a2;margin:17px 0}footer{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #bb966548;padding-top:15px;font-size:12px}.stars{color:#f9ce78;direction:ltr}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-head h2{font-size:24px;line-height:1.2;color:#5f371d}.dialog-head button{font-size:25px;padding:0;min-width:40px;background:#bd6b3c;color:#fff0d4}.dialog-head+div>p{color:#6f472d}dialog{color:#593b24;background:linear-gradient(110deg,#fff1d2,#e9cd98);border:6px solid #a87338;border-radius:19px;padding:18px;max-height:85svh;width:min(460px,94vw);box-shadow:inset 0 0 0 2px #ffecb5,0 15px 0 #3d2515,0 25px 70px #140c09a6}dialog::backdrop{background:#1d120dc2;backdrop-filter:blur(3px)}#dialog-content{display:grid;gap:10px}#dialog-content a{text-align:center;text-decoration:underline;color:#76501f}#dialog-content p{line-height:1.7}.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.grid button{padding:7px 4px;font-size:15px}.grid small{display:block;color:#ffe09b}.selected{outline:3px solid #b3da6f}.star-result{color:#c68b22;text-shadow:0 2px #fff5be;font-size:40px;text-align:center;letter-spacing:8px}[hidden]{display:none!important}
@media(max-width:700px){header{width:94%;height:49px;font-size:11px}.brand{font-size:13px;gap:5px}.brand i{font-size:21px}header span{gap:8px}.coin{padding:5px 10px}main{width:min(96%,470px);display:flex;flex-direction:column;gap:17px;padding:22px 0 20px}.bench{padding:9px 9px 12px;border-radius:19px;box-shadow:0 8px 0 #21150ed1,0 15px 27px #110c0a80,inset 0 2px #ffdf9a,inset 0 -3px #5b321c}.bench-head{min-height:56px;margin-top:-23px}.level-badge{padding:8px 24px;min-width:140px}.level-badge small{font-size:14px}.level-badge b{font-size:23px}.objective{font-size:13px;margin:3px 0 8px}.meters{gap:15px;margin-top:9px}.meters b{font-size:15px}.meters small{font-size:10px}#tools{gap:6px;margin-top:8px}#tools button{font-size:10px;min-height:69px}#tools button::before{width:28px;height:28px}.track{margin-bottom:1px}.console{width:100%;padding:4px 9px}.console h1{font-size:35px}.identity{font-size:12px}body.playing .identity{display:none}body.playing h1{font-size:21px;margin:0 0 4px}body.playing #intro{font-size:12px;line-height:1.5;margin:0 0 6px}body.playing #status{font-size:12px;margin:6px 0;min-height:0}body.playing footer{padding-top:9px}.board{border-width:2px}footer{padding-bottom:8px}}
@media(prefers-reduced-motion:reduce){button,.track i{transition:none}}

#hint{--tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2034%2034%22%3E%3Cg%20stroke%3D%22%23624525%22%20stroke-width%3D%221.6%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M12%2022c0-5-5-5-5-11a9%209%200%200118%200c0%206-5%206-5%2011z%22%20fill%3D%22%23fffbd0%22/%3E%3Cpath%20d%3D%22M12%2026h8m-7%204h6M16%207v5m-4%203%204%204%204-4%22/%3E%3C/g%3E%3C/svg%3E")}

#undo{--tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2034%2034%22%3E%3Cg%20stroke%3D%22%23624525%22%20stroke-width%3D%221.6%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M12%206%203%2014l9%207v-6h6c7%200%2010%205%208%2012%206-7%203-17-7-17h-7z%22%20fill%3D%22%2383b9d5%22/%3E%3C/g%3E%3C/svg%3E")}

#restart{--tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2034%2034%22%3E%3Cg%20stroke%3D%22%23624525%22%20stroke-width%3D%221.6%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M25%2010a12%2012%200%2010%202%2014%22%20fill%3D%22none%22%20stroke%3D%22%23628d39%22%20stroke-width%3D%225%22/%3E%3Cpath%20d%3D%22m20%2011%2010%202-1-10z%22%20fill%3D%22%239bc45e%22/%3E%3C/g%3E%3C/svg%3E")}

#pause{--tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2034%2034%22%3E%3Cg%20stroke%3D%22%23624525%22%20stroke-width%3D%221.6%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20x%3D%227%22%20y%3D%225%22%20width%3D%226%22%20height%3D%2224%22%20rx%3D%222%22%20fill%3D%22%23c9823d%22/%3E%3Crect%20x%3D%2221%22%20y%3D%225%22%20width%3D%226%22%20height%3D%2224%22%20rx%3D%222%22%20fill%3D%22%23c9823d%22/%3E%3C/g%3E%3C/svg%3E")}

#sound{--tool-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2034%2034%22%3E%3Cg%20stroke%3D%22%23624525%22%20stroke-width%3D%221.6%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M3%2013h6l8-7v22l-8-7H3z%22%20fill%3D%22%23bd81a0%22/%3E%3Cpath%20d%3D%22M22%2011q8%206%200%2012m4-16q13%2010%200%2020%22%20fill%3D%22none%22%20stroke%3D%22%23885573%22%20stroke-width%3D%222.5%22/%3E%3C/g%3E%3C/svg%3E")}

body{--wood-grain:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22240%22%20height%3D%22600%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23140b06%22%20opacity%3D%22.12%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M0%20-20%20C-12%20100%2015%20170%200%20280%20S-9%20440%202%20600%22/%3E%3Cpath%20d%3D%22M8%20-20%20C-4%20100%2023%20170%208%20280%20S-1%20440%2010%20600%22/%3E%3Cpath%20d%3D%22M16%20-20%20C4%20100%2031%20170%2016%20280%20S7%20440%2018%20600%22/%3E%3Cpath%20d%3D%22M24%20-20%20C12%20100%2039%20170%2024%20280%20S15%20440%2026%20600%22/%3E%3Cpath%20d%3D%22M32%20-20%20C20%20100%2047%20170%2032%20280%20S23%20440%2034%20600%22/%3E%3Cpath%20d%3D%22M40%20-20%20C28%20100%2055%20170%2040%20280%20S31%20440%2042%20600%22/%3E%3Cpath%20d%3D%22M48%20-20%20C36%20100%2063%20170%2048%20280%20S39%20440%2050%20600%22/%3E%3Cpath%20d%3D%22M56%20-20%20C44%20100%2071%20170%2056%20280%20S47%20440%2058%20600%22/%3E%3Cpath%20d%3D%22M64%20-20%20C52%20100%2079%20170%2064%20280%20S55%20440%2066%20600%22/%3E%3Cpath%20d%3D%22M72%20-20%20C60%20100%2087%20170%2072%20280%20S63%20440%2074%20600%22/%3E%3Cpath%20d%3D%22M80%20-20%20C68%20100%2095%20170%2080%20280%20S71%20440%2082%20600%22/%3E%3Cpath%20d%3D%22M88%20-20%20C76%20100%20103%20170%2088%20280%20S79%20440%2090%20600%22/%3E%3Cpath%20d%3D%22M96%20-20%20C84%20100%20111%20170%2096%20280%20S87%20440%2098%20600%22/%3E%3Cpath%20d%3D%22M104%20-20%20C92%20100%20119%20170%20104%20280%20S95%20440%20106%20600%22/%3E%3Cpath%20d%3D%22M112%20-20%20C100%20100%20127%20170%20112%20280%20S103%20440%20114%20600%22/%3E%3Cpath%20d%3D%22M120%20-20%20C108%20100%20135%20170%20120%20280%20S111%20440%20122%20600%22/%3E%3Cpath%20d%3D%22M128%20-20%20C116%20100%20143%20170%20128%20280%20S119%20440%20130%20600%22/%3E%3Cpath%20d%3D%22M136%20-20%20C124%20100%20151%20170%20136%20280%20S127%20440%20138%20600%22/%3E%3Cpath%20d%3D%22M144%20-20%20C132%20100%20159%20170%20144%20280%20S135%20440%20146%20600%22/%3E%3Cpath%20d%3D%22M152%20-20%20C140%20100%20167%20170%20152%20280%20S143%20440%20154%20600%22/%3E%3Cpath%20d%3D%22M160%20-20%20C148%20100%20175%20170%20160%20280%20S151%20440%20162%20600%22/%3E%3Cpath%20d%3D%22M168%20-20%20C156%20100%20183%20170%20168%20280%20S159%20440%20170%20600%22/%3E%3Cpath%20d%3D%22M176%20-20%20C164%20100%20191%20170%20176%20280%20S167%20440%20178%20600%22/%3E%3Cpath%20d%3D%22M184%20-20%20C172%20100%20199%20170%20184%20280%20S175%20440%20186%20600%22/%3E%3Cpath%20d%3D%22M192%20-20%20C180%20100%20207%20170%20192%20280%20S183%20440%20194%20600%22/%3E%3Cpath%20d%3D%22M200%20-20%20C188%20100%20215%20170%20200%20280%20S191%20440%20202%20600%22/%3E%3Cpath%20d%3D%22M208%20-20%20C196%20100%20223%20170%20208%20280%20S199%20440%20210%20600%22/%3E%3Cpath%20d%3D%22M216%20-20%20C204%20100%20231%20170%20216%20280%20S207%20440%20218%20600%22/%3E%3Cpath%20d%3D%22M224%20-20%20C212%20100%20239%20170%20224%20280%20S215%20440%20226%20600%22/%3E%3Cpath%20d%3D%22M232%20-20%20C220%20100%20247%20170%20232%20280%20S223%20440%20234%20600%22/%3E%3C/g%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23d09b5f%22%20opacity%3D%22.1%22%3E%3Cellipse%20cx%3D%2263%22%20cy%3D%22196%22%20rx%3D%228%22%20ry%3D%2245%22/%3E%3Cellipse%20cx%3D%2263%22%20cy%3D%22196%22%20rx%3D%2213%22%20ry%3D%2260%22/%3E%3Cellipse%20cx%3D%22170%22%20cy%3D%22450%22%20rx%3D%2211%22%20ry%3D%2255%22/%3E%3C/g%3E%3C/svg%3E")}

.bench{background-image:var(--wood-grain),linear-gradient(100deg,#92542a,#b67b3e 48%,#77401f)}
@keyframes reward-pop{from{transform:scale(.55) rotate(-8deg);opacity:0}to{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:no-preference){.star-result{animation:reward-pop .45s cubic-bezier(.2,.8,.3,1.3)}}

.boost-tools{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:4px}#tools .boost-tools button{min-height:45px;font-size:11px;flex-direction:row;padding:6px;gap:5px;background:linear-gradient(#f8d79b,#d4a465)}#tools .boost-tools button::before{content:"+";width:22px;height:25px;font-size:23px;line-height:25px;font-weight:900;color:#765026}#tools .boost-tools #magnet::before{content:"∩";color:#a33f42;transform:rotate(180deg)}#tools .boost-tools button[data-owned=true]{background:linear-gradient(#d1e8a3,#9bbb6c)}
