:root{font-family:ui-rounded,"Arial Rounded MT Bold","Trebuchet MS",sans-serif;color:#34324f;background:#fff9ef;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default}a{color:inherit}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:4px solid #8a7cbd;outline-offset:4px}svg{display:block}
.tidy-game{height:100svh;height:100dvh;min-height:300px;display:flex;flex-direction:column;overflow:hidden;padding:max(18px,env(safe-area-inset-top)) max(26px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(26px,env(safe-area-inset-left))}
header{display:flex;gap:12px;align-items:center;flex-shrink:0}.brand{font-size:21px;font-weight:800;letter-spacing:-.8px}.tools{margin-left:auto;display:flex;gap:8px}.icon-button{border:1px solid #e9e3db;background:#fffdf8;border-radius:50%;width:44px;height:44px;display:grid;place-items:center;color:#77728a;text-decoration:none;padding:10px}.icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}.icon-button:hover{background:#f0ebdf}
main{flex:1;min-height:0;width:min(1050px,100%);margin:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:14px 0 8px;position:relative}.heading{text-align:center;flex-shrink:0}h1{margin:0 0 9px;font-size:clamp(28px,4vw,43px);letter-spacing:-1.5px;line-height:1.12}.heading p{margin:0;font-size:16px;line-height:1.4;color:#817c8d}
.baskets{display:grid;grid-template-columns:repeat(var(--basket-count,2),minmax(0,1fr));gap:22px;width:100%;max-width:850px;flex:0 1 240px;min-height:150px}.basket{border:2px solid #e1cba5;border-radius:26px;background:#f7e5c8;position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;box-shadow:0 7px 0 #dfc59b55;padding:16px 10px 25px;color:#625445;transition:background .2s,transform .2s}.basket:after{content:"";position:absolute;left:10px;right:10px;bottom:9px;height:10px;border-top:2px solid #dec29b;border-bottom:2px solid #dec29b;border-radius:4px;pointer-events:none}.basket-picture{background:#fffdf5;border-radius:22px;display:grid;place-items:center;width:100px;height:90px}.basket-picture svg{width:78px;height:78px}.basket-picture.small svg{width:34px;height:34px}.basket-label{font-size:18px;font-weight:800}.basket.hovered{background:#efe4f7;border-color:#a99acb;transform:scale(1.025)}.basket.matched{animation:basket-bounce .45s ease}.basket.hint{animation:pulse 1.1s ease-in-out 3}.basket:disabled{opacity:1}
.message{margin:0;min-height:25px;flex-shrink:0;font-size:16px;font-weight:700;color:#726989;text-align:center;line-height:1.4}.tray{position:relative;--tray-padding:15px;width:100%;max-width:900px;min-height:120px;flex:0 1 265px;border:2px solid #ede4d7;background:#fffdfa;border-radius:28px;padding:15px;box-shadow:0 6px 0 #e7dfd12b;display:grid;place-items:center}.toys{position:absolute;inset:var(--tray-padding);margin:auto;display:grid;grid-template-columns:repeat(var(--toy-columns,4),minmax(0,1fr));grid-template-rows:repeat(var(--toy-rows,1),minmax(0,1fr));gap:12px;width:auto;height:auto;max-width:800px;align-items:center;justify-items:center}.toy{border:3px solid transparent;border-radius:22px;background:transparent;display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;padding:5px;touch-action:none;user-select:none;-webkit-user-select:none;position:relative}.toy svg{width:100%;height:100%;max-width:110px;max-height:110px;pointer-events:none}.toy.small svg{width:40%;height:40%;max-width:45px;max-height:45px}.toy.selected{background:#eee9f6;border-color:#a99acb}.toy:focus-visible{outline-offset:0}.toy.dragging{opacity:.3}.toy.returned{animation:toy-return .35s ease}.toy.sorted{visibility:hidden}.toy:disabled{opacity:1}
.large-button,.soft-button{border:0;border-radius:18px;padding:16px 24px;min-height:58px;color:#514768;font-weight:800;font-size:18px;background:#eee9f6}.large-button{background:#f3c16b;color:#55442f;box-shadow:0 4px 0 #dfae5438}.large-button:hover{background:#edb85b}.soft-button:hover{background:#e3ddee}footer{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:14px;font-size:12px;color:#8b8594;min-height:21px}.level-progress{display:flex;align-items:center;gap:9px;background:#f0ebdf;border-radius:24px;padding:7px 11px;font-weight:700}.progress-dots{display:flex;gap:5px}.progress-dots i{width:7px;height:7px;border-radius:50%;background:#dfd5c5}.progress-dots i.done{background:#8bb99b}
dialog{border:0;border-radius:28px;background:#fffdf7;color:#34324f;width:min(440px,92vw);max-height:90dvh;overflow:auto;padding:28px;text-align:center;box-shadow:0 24px 100px #34324f26}dialog::backdrop{background:#34324f55;backdrop-filter:blur(4px)}dialog h2{font-size:29px;letter-spacing:-1px;margin:8px 0 12px}dialog p{line-height:1.5;color:#817c8d;margin:10px 0 18px}.celebration-art{font-size:31px;letter-spacing:8px;color:#edbc59}.celebration-art span{color:#ef8c7e}.dialog-actions{display:flex;flex-direction:column;gap:12px}.dialog-actions button{min-width:0;width:100%}.setting-label{display:block;text-align:left;font-weight:800;font-size:15px;margin:20px 0 8px}select{font:inherit;width:100%;border:2px solid #e5ddd1;border-radius:13px;background:#fffefa;padding:12px;font-size:15px;color:#514768}.check-setting{display:flex;gap:10px;align-items:center;text-align:left;font-weight:700;margin-top:22px;font-size:15px}input[type=checkbox]{width:23px;height:23px;accent-color:#8a7cbd}.parent-note{text-align:left;font-size:13px}.settings-actions{display:flex;gap:10px;margin-top:20px}.settings-actions button{font-size:15px;padding:12px;flex:1}.reset-confirm{padding-top:12px;margin-top:15px;border-top:1px solid #e5ddd1}.reset-confirm button{font-size:13px;padding:12px;margin:3px;min-height:44px}
#flight-layer,#confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:10}.flying-toy{position:fixed;display:grid;place-items:center;pointer-events:none;transform-origin:center}.flying-toy svg{width:100%;height:100%}.confetti-piece{position:absolute;top:45%;left:50%;width:9px;height:14px;border-radius:3px;background:var(--c);animation:confetti 1.1s ease-out forwards}
@keyframes pulse{50%{box-shadow:0 0 0 8px #a99acb44;transform:scale(1.025)}}@keyframes basket-bounce{50%{transform:scale(1.045)}}@keyframes toy-return{50%{transform:translateY(-5px)}}@keyframes confetti{to{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}}
@media(max-width:600px){.tidy-game{padding:12px 12px 8px}header{gap:8px}.brand{font-size:18px}.tools{gap:5px}.icon-button{width:40px;height:40px;padding:9px}main{gap:12px;padding:12px 0 8px}h1{font-size:30px}.heading p{font-size:14px}.baskets{gap:10px;flex-basis:190px;min-height:145px}.basket{border-radius:22px;padding:12px 4px 24px;gap:8px}.basket-picture{width:76px;height:76px;border-radius:17px}.basket-picture svg{width:65px;height:65px}.basket-picture.small svg{width:29px;height:29px}.basket-label{font-size:15px}.message{font-size:14px;min-height:22px}.tray{--tray-padding:8px;padding:8px;border-radius:23px;flex-basis:245px;min-height:120px}.toys{gap:7px}.toy{border-radius:16px;padding:4px}.toy svg{max-width:96px;max-height:96px}.large-button{padding:14px 24px;min-height:52px;font-size:17px}}
@media(max-width:360px){.brand{font-size:16px}.icon-button{width:36px;height:36px;padding:8px}.tools{gap:4px}.basket-picture{width:68px;height:68px}.basket-picture svg{width:58px;height:58px}.basket-picture.small svg{width:25px;height:25px}h1{font-size:27px}}
@media(max-height:660px){main{gap:9px;padding-top:10px}.baskets{flex-basis:155px;min-height:125px}.basket{gap:5px;padding:8px 4px 23px}.basket-picture{width:70px;height:66px;border-radius:15px}.basket-picture svg{width:58px;height:58px}.basket-picture.small svg{width:25px;height:25px}.basket-label{font-size:14px}.tray{flex-basis:175px;min-height:95px}.heading p{font-size:13px}h1{font-size:28px}.message{font-size:13px;min-height:20px}.large-button{min-height:48px;padding:12px 20px}footer{font-size:11px}}
@media(max-height:450px) and (orientation:landscape){.tidy-game{padding:7px 16px}header{height:34px}.icon-button{width:34px;height:34px;padding:7px}.brand{font-size:18px}main{gap:6px;padding:5px 0}h1{font-size:25px;margin-bottom:3px}.heading p{font-size:12px}.baskets{width:min(750px,100%);flex:0 1 107px;min-height:100px;gap:12px}.basket{padding:5px 4px 18px;gap:3px}.basket:after{bottom:5px;height:7px}.basket-picture{width:66px;height:57px;border-radius:13px}.basket-picture svg{width:52px;height:52px}.basket-picture.small svg{width:23px;height:23px}.basket-label{font-size:13px}.message{font-size:12px;min-height:17px}.tray{--tray-padding:5px;width:min(900px,100%);flex:1 1 100px;min-height:80px;padding:5px}.toys{gap:6px}.toy{padding:2px}.toy svg{max-width:84px;max-height:84px}footer{min-height:17px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.confetti-piece{display:none}}

@media(max-width:360px){footer{gap:7px;font-size:10px}.level-progress{padding:6px 8px;gap:6px}}
