:root{font-family:'Trebuchet MS',system-ui,sans-serif;color:#233e33;background:#163f38}*{box-sizing:border-box}body{margin:0;min-height:100dvh;display:grid;place-items:center;padding:12px}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible{outline:4px solid #bd7328;outline-offset:3px}[hidden]{display:none!important}.game-shell{width:min(1120px,100%);height:min(860px,calc(100dvh - 24px));min-height:540px;position:relative;isolation:isolate;display:grid;grid-template-rows:56px 92px 48px minmax(140px,1fr) 216px 66px;padding:0 24px;background:#faf7ed;border-radius:22px;overflow:hidden;box-shadow:0 22px 70px #09241f88}header{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff9df;border-bottom:3px solid #e6cf83;margin:0 -24px;padding:0 24px;font-size:13px}header a{color:#385747;text-decoration:none}header strong{letter-spacing:1.5px}#round{color:#71816a;font-size:12px}.intro{display:flex;align-items:center;justify-content:space-between;gap:12px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:bold;color:#73815b;margin:5px 0}h1{font-size:clamp(24px,3vw,35px);letter-spacing:-1px;margin:5px 0}.steps{display:flex;gap:8px;flex-shrink:0}.steps span{padding:9px 15px;border-radius:22px;background:#ece8da;color:#7e8373;font-size:14px;font-weight:bold}.steps .active{background:#347654;color:white}#message{display:grid;place-items:center;text-align:center;font-weight:bold;font-size:15px;line-height:1.3;padding:3px 8px}.floor{position:relative;min-height:0;border:3px solid #ddcba3;border-radius:45% 45% 24px 24px / 18px 18px 24px 24px;background:repeating-linear-gradient(0deg,#f0e4c8 0 48px,#eaddbe 48px 50px);padding:25px 18px 8px;display:grid;place-items:center}.floor-label{position:absolute;top:8px;left:0;right:0;text-align:center;font-size:9px;letter-spacing:2px;color:#927b50;font-weight:bold}#pile{display:flex;justify-content:center;align-content:center;align-items:center;flex-wrap:wrap;gap:6px 14px;width:min(700px,100%);height:100%}.toy{width:58px;height:58px;border:0;border-radius:14px;background:#fff9ee;box-shadow:0 3px 0 #ba9d6950;font-size:39px;line-height:1;touch-action:none;user-select:none;transform:rotate(var(--tilt,0deg))}.toy.selected,.number.selected{outline:4px solid #337552;background:#fff0a5}.toy:hover{background:#fff3ca}#boxes{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;padding-top:20px}.box{min-width:0;position:relative;background:var(--tint);border:3px solid var(--edge);border-bottom-width:8px;border-radius:10px 10px 20px 20px;display:flex;flex-direction:column;padding:8px;cursor:pointer}.box-label{display:flex;align-items:center;justify-content:space-between;font-weight:bold;font-size:14px;padding:0 3px}.box-label .icon{font-size:29px}.contents{display:flex;gap:4px;justify-content:center;align-content:center;flex-wrap:wrap;flex:1;padding:4px 0}.stored{font-size:32px;line-height:1.1;width:37px;text-align:center}.answer{height:44px;min-width:56px;background:#fffaf0;border:2px dashed var(--edge);border-radius:10px;align-self:center;display:grid;place-items:center;font-size:25px;font-weight:bold;padding:0 12px}.box.waiting .answer{opacity:.4}.box.wrong{outline:4px solid #bd6444}.box.correct{outline:4px solid #347654}.box.nudge{animation:nudge .25s 2}#numberPanel{text-align:center}h2{font-size:22px;margin:4px 0}#numberPanel p{font-size:13px;margin:7px 0 12px}#numbers{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.number{width:56px;height:56px;background:#fffaf0;border:2px solid #cfb980;border-bottom-width:5px;border-radius:12px;font-size:29px;font-weight:bold;touch-action:none}footer{display:flex;align-items:center;justify-content:space-between;gap:14px}footer>span{font-size:12px;color:#6b7868}footer button,.welcome button{border:0;border-bottom:5px solid #245b3e;background:#347654;color:white;border-radius:13px;font-size:21px;font-weight:bold;padding:10px 30px;min-height:48px}#celebration{text-align:center}#celebration>span{font-size:42px}#celebration p{font-size:14px;margin:8px 0}.overlay{position:absolute;inset:0;background:#243e3388;backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px;z-index:10}.welcome{width:min(510px,100%);max-height:100%;overflow:auto;background:#fffaf0;border-radius:26px;text-align:center;padding:30px;box-shadow:0 25px 80px #20392f44}.welcome p{line-height:1.6}.mascot{font-size:55px}.drag-ghost{position:fixed;z-index:30;pointer-events:none;opacity:.9;transform:none}.toy:disabled{cursor:default}@keyframes nudge{50%{transform:translateX(4px)}}@media(min-width:701px) and (max-height:700px){.game-shell{grid-template-rows:48px 65px 40px minmax(120px,1fr) 190px 60px}.intro .eyebrow{display:none}.toy{width:48px;height:48px;font-size:33px}#pile{gap:6px 12px}.stored{font-size:28px;width:32px}.box-label .icon{font-size:25px}.contents{gap:2px}.floor{padding-top:22px}.welcome{padding:20px}.mascot{font-size:40px}}@media(max-width:700px){body{padding:8px}.game-shell{height:auto;min-height:calc(100dvh - 16px);grid-template-rows:54px 100px 60px minmax(210px,auto) auto 76px;padding:0 14px}header{margin:0 -14px;padding:0 14px;font-size:11px}header strong{letter-spacing:0}#round{font-size:10px}.intro{align-items:start;justify-content:center;flex-direction:column;gap:0;padding:8px 0}.intro h1{font-size:25px}.eyebrow{font-size:8px}.steps span{padding:5px 12px;font-size:12px}#message{font-size:13px}#boxes{grid-template-columns:repeat(2,1fr);gap:12px;padding-top:14px}.box{min-height:170px}#pile{gap:8px}.toy{width:48px;height:48px;font-size:33px}.floor{padding:27px 8px 12px}.number{width:44px;height:48px;font-size:25px}#numbers{gap:7px}h2{font-size:19px}footer>span{max-width:160px;font-size:11px}footer button{font-size:18px;padding:10px 18px}.welcome{padding:22px}.welcome h1{font-size:28px}.mascot{font-size:42px}}@media(prefers-reduced-motion:reduce){*{animation:none!important}}
/* Reoler med tre hylder og et antalskilt nederst. */
.game-shell{grid-template-rows:56px 82px 44px 264px minmax(190px,1fr) 66px}
#boxes{padding:4px 0 14px;gap:18px}
.box{border:6px solid #b88b55;border-bottom-width:9px;border-radius:8px 8px 4px 4px;padding:0;background:#ecdbba;box-shadow:inset 0 0 20px #94653520,0 4px 0 #876339}
.box-label{height:37px;flex-shrink:0;background:var(--tint);border-bottom:4px solid #b88b55;padding:1px 10px;justify-content:center;gap:12px}
.box-label .icon{font-size:25px}
.contents{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:0;padding:0;min-height:0}
.shelf-slot{display:flex;align-items:flex-end;justify-content:center;border-bottom:5px solid #bd925f;box-shadow:0 3px 3px #805d3120;min-height:0;padding-bottom:2px}
.stored{font-size:30px;line-height:1;display:block;width:auto;transform-origin:center bottom}
.answer{height:40px;min-height:40px;min-width:60px;margin:5px 0 0;border:2px solid #bc9d70;font-size:25px}
#pile{width:100%;gap:6px 10px}
.box.wrong .stored{animation:shelf-hop .55s ease-in-out 2;animation-delay:var(--hop-delay)}
@keyframes shelf-hop{0%,100%{transform:translateY(0)}45%{transform:translateY(-12px) rotate(-7deg)}65%{transform:translateY(-5px) rotate(5deg)}}
#celebration{position:relative;padding-left:145px;min-height:145px;display:flex;flex-direction:column;justify-content:center}
.shopkeeper{position:absolute;left:0;bottom:-5px;width:135px;height:160px;animation:keeper-enter 1.1s ease-out both}
.shopkeeper svg{width:100%;height:100%;overflow:visible}.thumb{transform-origin:150px 84px;animation:thumb-wave .7s 1.1s 2}
@keyframes keeper-enter{from{transform:translateX(-350px);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes thumb-wave{50%{transform:rotate(-12deg)}}
@media(min-width:701px) and (max-height:700px){.game-shell{grid-template-rows:48px 50px 32px 210px minmax(140px,1fr) 54px}#boxes{padding:3px 0 9px}.box-label{height:29px;font-size:12px}.box-label .icon{font-size:22px}.answer{height:34px;min-height:34px;font-size:23px;margin-top:3px}.stored{font-size:25px}.shelf-slot{border-bottom-width:4px;padding-bottom:1px}.floor{padding:24px 12px 6px}#pile{gap:5px 8px}.toy{width:46px;height:46px;font-size:32px}.number{width:48px;height:48px;font-size:26px}#numberPanel p{margin:4px 0 8px}#numberPanel h2{font-size:19px}}
@media(max-width:700px){.game-shell{grid-template-rows:54px 100px 60px auto minmax(210px,auto) 76px}#boxes{gap:12px;padding-top:4px}.box{height:235px}.stored{font-size:29px}#pile{gap:6px}.toy{width:46px;height:46px}.floor{min-height:230px}#celebration{padding:0 0 0 95px;min-height:160px}.shopkeeper{width:95px;height:130px;bottom:15px}#celebration h2{font-size:18px}#celebration p{font-size:12px}}
@media(prefers-reduced-motion:reduce){.box.wrong .stored,.shopkeeper,.thumb{animation:none}}
/* De samme legetøjsbrikker falder fra hyldepladsen til deres plads i bunken. */
.toy:disabled{position:relative;z-index:3;opacity:1;pointer-events:none}

.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:8;border-radius:inherit}.confetti i{position:absolute;top:0;display:block;will-change:transform,opacity}
