@font-face{font-family:Fredoka;src:url('assets/fonts/fredoka.ttf')}*{box-sizing:border-box}body{margin:0;color:#3c5961;font-family:Fredoka,system-ui,sans-serif;background:#e8c28b}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:4px solid #f39c30;outline-offset:2px}[hidden]{display:none!important}#loader{position:fixed;inset:0;background:#2c9b98;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:10;gap:12px;color:white;text-align:center}#loader img{width:100px;animation:bob 1s ease-in-out infinite alternate}#loader b{font-size:clamp(28px,5vw,42px);line-height:1;color:#fff3c8;text-shadow:0 4px #247270}#loader div{height:13px;width:180px;background:#1e7776;border-radius:20px;overflow:hidden}#loader i{display:block;background:#ffd45c;height:100%;animation:load 5s linear forwards}@keyframes load{from{width:0}to{width:100%}}@keyframes bob{to{transform:translateY(-12px) rotate(10deg)}}#home{min-height:100dvh;display:flex;align-items:center;justify-content:space-between;padding:4% 5%;gap:25px;background:linear-gradient(90deg,#243a4960,#24374a75),url('assets/menu.png') center/cover}.hero{color:#fff1cc;text-shadow:0 4px #8c563c,0 7px 8px #48302680}.hero small{font-size:13px;font-weight:700;letter-spacing:3px;color:#ffe6a9}.hero h1{font-size:clamp(40px,6.4vw,90px);line-height:.9;letter-spacing:-2px;margin:15px 0}.hero h1 em{font-style:normal;color:#fbc94e}.hero p{font-size:clamp(16px,2vw,22px);font-weight:bold}.menu{width:min(390px,100%);flex:none;background:linear-gradient(140deg,#fff9e9,#ffe4b0);border:5px solid #fff8eb;border-radius:26px;box-shadow:0 8px #ab7048,0 16px 35px #2e272960;padding:20px;text-align:center}.menu small{font-size:10px;letter-spacing:1.6px;color:#be865c;font-weight:bold}.menu h2{font-size:23px;margin:5px 0 14px}.menu button,header button,.dialog button:not(#close),#hint{border:2px solid #ffedc6;border-radius:13px;background:#319e9b;box-shadow:0 4px #1e7677;color:white;font-weight:bold}.menu .main{width:100%;min-height:52px;background:#f5a33e;box-shadow:0 4px #b97430;font-size:18px}.menu button img,header img{width:24px;height:24px;object-fit:contain;vertical-align:middle;margin-right:5px}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}.menu-grid button{min-height:45px;font-size:12px}.menu p,#progress-home{font-size:11px;margin:10px 0 0;color:#9b7b5e}#game{height:100dvh;display:flex;flex-direction:column;background:url('assets/table.png') center/cover}header{display:flex;align-items:center;gap:12px;background:#248e8d;border-bottom:4px solid #f9cf86;color:white;padding:7px 14px;min-height:63px}header button{width:45px;height:45px;flex:none;padding:5px}header button img{margin:0}header>div:nth-child(2){display:flex;flex-direction:column;min-width:115px}header small{font-size:10px;letter-spacing:1px;color:#ffe4aa}header b{font-size:17px}.bar{margin-left:auto;width:min(230px,25vw)}.bar div{background:#176c6b;height:9px;border-radius:10px;overflow:hidden}.bar i{display:block;background:#ffd75a;height:100%}.play-layout{display:flex;flex:1;min-height:0;gap:14px;padding:12px 4%;width:100%;max-width:1600px;margin:auto}.play-panel{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:#fff5df;border:4px solid #fff8ea;border-radius:22px;box-shadow:0 5px #af7950;overflow:hidden}.prompt{padding:8px 16px;background:#ffedcc;display:flex;justify-content:space-between;align-items:center;gap:8px}.prompt>div:first-child{display:flex;flex-direction:column}.prompt small{font-size:10px;letter-spacing:1px;color:#c28258;font-weight:700}.prompt b{font-size:clamp(16px,1.8vw,22px)}.prompt span{font-size:12px;color:#958069}#mini-clue img{width:54px;height:54px;object-fit:contain;border-radius:12px;background:white}.board{flex:1;display:flex;gap:18px;align-items:center;justify-content:center;min-height:0;padding:12px;background:linear-gradient(#fff4da55,#fff4da55),url('assets/table.png') center/cover}.scene{height:100%;max-height:330px;width:min(48%,410px);background:white;border:5px solid white;border-radius:20px;overflow:hidden;box-shadow:0 4px 0 #d4a679,0 7px 18px #72523533;position:relative}.scene img{width:100%;height:100%;object-fit:contain}#scene-badge{position:absolute;top:8px;left:8px;background:#ffba43;color:white;border-radius:20px;padding:4px 10px;font-size:12px;box-shadow:0 3px #b8782c}.goal{width:min(45%,390px);background:#fff4dfee;border:4px solid #fff;border-radius:18px;padding:14px;box-shadow:0 4px #d5a981}.goal-head{display:flex;justify-content:space-between;font-size:12px;color:#b37a50}#slots{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;padding:10px 0;min-height:80px}.slot{width:clamp(50px,6vw,78px);height:clamp(50px,6vw,78px);border:3px dashed #e8c69c;background:#fffaf1;border-radius:14px;display:grid;place-items:center;color:#d7b18c;font-size:24px}.slot img{width:95%;height:95%;object-fit:contain;border-radius:10px}#feedback{font-size:13px;text-align:center;margin:0;color:#9f7554}.options-panel{background:#ffedcc;padding:7px 14px 12px}.options-heading{font-size:11px;color:#b5794e;display:flex;align-items:center;justify-content:space-between}#hint{padding:5px 13px;font-size:11px;background:#e89a4a;box-shadow:0 3px #ae6b37}#options{display:flex;justify-content:center;gap:8px;min-height:88px;padding:5px}#options button{width:min(100px,12%);height:clamp(65px,12vh,100px);background:#fff;border:3px solid #f5d3a7;border-radius:14px;padding:4px;box-shadow:0 4px #dbb082;touch-action:none}#options button img{width:100%;height:100%;object-fit:contain;border-radius:8px;pointer-events:none}#options button.used{visibility:hidden}#options button.flash{outline:4px solid #ffb728;animation:pop .55s alternate infinite}@keyframes pop{to{transform:scale(1.07)}}aside{width:210px;align-self:center;background:#fff0d1;border:4px solid white;border-radius:22px;padding:15px;box-shadow:0 6px #bc8657}aside small{font-size:9px;letter-spacing:1px;color:#c48757}aside h2{font-size:26px;line-height:1;margin:10px 0;color:#d6864f}aside em{font-style:normal;color:#329e98}aside p{font-size:12px}#badges{display:grid;grid-template-columns:repeat(5,1fr);gap:3px}#badges span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#f1c464;color:#fff;font-size:13px}#badges span.locked{background:#dfd5c3;color:#b7ac9e}.aside-note{background:#359f9a;color:white;text-align:center;padding:9px;border-radius:10px;font-size:10px}#overlay{position:fixed;inset:0;z-index:5;background:#263c48b8;display:grid;place-items:center;padding:10px}.dialog{position:relative;width:min(530px,100%);max-height:90dvh;overflow:auto;background:#fff3db;border:5px solid white;border-radius:24px;text-align:center;padding:20px;box-shadow:0 8px #aa7956}.dialog h2{font-size:28px;color:#d8854c;margin:0 0 8px}.dialog p{line-height:1.45}.dialog button:not(#close){min-height:42px;padding:8px 16px;margin:4px}.dialog button.primary{background:#f3a544;box-shadow:0 4px #bb762e}#close{position:absolute;right:8px;top:3px;font-size:30px;border:0;background:none;color:#aa8060}.muted{background:#ae9174!important;box-shadow:0 4px #8b6c52!important;font-size:11px}.level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;max-height:44dvh;overflow:auto}.level-grid button{margin:0!important;padding:4px!important}.level-grid button:disabled{opacity:.4}.free-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.free-grid button{font-size:12px;margin:0!important}.result-img{width:100px;height:100px;object-fit:contain;border-radius:15px}@media(max-width:700px){#home{flex-direction:column;justify-content:space-between;padding:18px 12px;gap:5px}.hero{text-align:center}.hero h1{font-size:clamp(36px,10vw,52px);margin:10px 0}.hero p{font-size:15px;margin:5px}.menu{padding:11px;max-width:370px}.menu h2{margin:3px 0 8px}.menu-grid{gap:6px;margin-top:8px}.menu-grid button{min-height:39px}.menu .main{min-height:45px}.play-layout{padding:5px;gap:0}aside{display:none}header{gap:5px;padding:5px;min-height:54px}header button{width:39px;height:39px}header>div:nth-child(2){min-width:88px}header b{font-size:13px}.bar{width:auto;flex:1}.prompt{padding:5px 10px}.prompt span{font-size:10px}.board{flex-direction:column;gap:6px;padding:6px}.scene{height:48%;width:min(95%,300px);max-height:220px}.goal{width:min(100%,340px);padding:6px}.slot{width:48px;height:48px}#slots{padding:5px 0;min-height:50px}#options{display:grid;grid-template-columns:repeat(4,minmax(0,67px));grid-auto-rows:59px;gap:5px;min-height:0;padding:4px}#options button{width:100%;height:100%;padding:2px}.options-panel{padding:4px 7px 8px}#mini-clue img{width:40px;height:40px}}@media(max-height:470px) and (orientation:landscape){#home{padding:8px 4%}.hero h1{font-size:42px}.menu{padding:8px;max-width:360px}.menu h2{margin:0;font-size:18px}.menu-grid{gap:4px;margin-top:4px}.menu-grid button{min-height:30px}.menu .main{min-height:36px}.play-layout{padding:4px}aside{display:none}.prompt{padding:2px 10px}.prompt span{display:none}.board{padding:4px}.scene{max-height:170px}.goal{padding:5px}.slot{width:45px;height:45px}#slots{min-height:45px;padding:3px}#options{min-height:0}#options button{height:65px}.options-panel{padding:2px 8px 5px}}
@media(max-width:700px) and (max-height:470px) and (orientation:landscape){.board{flex-direction:row;gap:7px}.scene{height:100%;width:45%;max-height:130px}.goal{width:45%;padding:3px}#slots{min-height:34px}.slot{width:35px;height:35px}#feedback{font-size:10px}#options{display:flex;min-height:0;padding:3px;gap:4px}#options button{height:55px;width:min(60px,12%)}.options-panel{padding:2px 8px 5px}.prompt b{font-size:14px}.prompt small{font-size:9px}#mini-clue img{width:32px;height:32px}}
