*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#67cfff}
body{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;overscroll-behavior:none}
button,img{user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
button{font:inherit;border:0;cursor:pointer;color:inherit}
#app{position:fixed;inset:0;width:100%;height:100%;overflow:hidden}

.screen{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;opacity:0;visibility:hidden;transform:scale(.97);transition:opacity .4s ease,transform .4s cubic-bezier(.2,.8,.2,1),visibility .4s}
.screen.active{opacity:1;visibility:visible;transform:scale(1)}

.boot-screen{display:flex;align-items:center;justify-content:center;flex-direction:column;background:linear-gradient(180deg,#55c7ff 0%,#8cddff 55%,#d9f6ff 100%);overflow:hidden}
.boot-screen:before{content:"";position:absolute;width:180%;height:55%;left:-40%;bottom:-25%;background:#f8fdff;border-radius:50% 50% 0 0;box-shadow:0 -20px 80px #fff9}
.boot-logo{position:relative;z-index:2;width:105px;height:105px;border-radius:34px;display:grid;place-items:center;font-size:55px;font-weight:1000;color:#fff;background:linear-gradient(145deg,#ffcf45,#ff8b45);border:6px solid #fff;box-shadow:0 14px 0 #e06e32,0 24px 45px #1678aa55;animation:logoBounce 1.7s ease-in-out infinite}
.boot-title{position:relative;z-index:2;font-size:31px;font-weight:1000;letter-spacing:.08em;margin-top:27px;text-shadow:0 4px 0 #318fc0}
.boot-subtitle{position:relative;z-index:2;font-size:14px;font-weight:700;color:#2879a1;margin-top:8px}
.loader{position:relative;z-index:2;width:210px;height:12px;border-radius:99px;background:#ffffffaa;border:3px solid #fff;overflow:hidden;margin-top:28px;box-shadow:0 8px 20px #2389b833}
.loader-bar{height:100%;width:35%;border-radius:99px;background:linear-gradient(90deg,#ff76b8,#ffcf3d);animation:loader 1.2s infinite}
.boot-status{position:relative;z-index:2;font-size:10px;font-weight:800;color:#397d9d;margin-top:11px}
.boot-stars{position:relative;z-index:2;margin-top:15px;color:#ffb62e;font-size:18px;animation:starFloat 2s ease-in-out infinite}
.boot-sun{position:absolute;right:8%;top:8%;font-size:70px;opacity:.3;animation:sunSpin 18s linear infinite}
.cloud{position:absolute;width:150px;height:45px;background:#fff;border-radius:999px;opacity:.8;box-shadow:0 10px 30px #2684ac18}
.cloud:before,.cloud:after{content:"";position:absolute;background:#fff;border-radius:50%}
.cloud:before{width:65px;height:65px;left:25px;bottom:8px}
.cloud:after{width:82px;height:82px;right:25px;bottom:4px}
.cloud-one{left:8%;top:16%;animation:cloudFloat 7s ease-in-out infinite}
.cloud-two{right:9%;bottom:18%;transform:scale(.75);animation:cloudFloat 9s ease-in-out infinite reverse}

.sky{position:absolute;pointer-events:none}
.sky-one{width:500px;height:500px;right:-220px;top:-230px;border-radius:50%;background:#fff4a633;filter:blur(2px)}
.sky-two{width:420px;height:420px;left:-250px;bottom:-240px;border-radius:50%;background:#ffb6dc35;filter:blur(2px)}

.topbar{height:76px;position:relative;z-index:10;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,env(safe-area-inset-left)) 0 max(24px,env(safe-area-inset-right));padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right));background:#ffffff35;border-bottom:3px solid #ffffffaa;backdrop-filter:blur(16px);box-shadow:0 5px 25px #247fa526}
.brand{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:1000;letter-spacing:.08em;color:#fff;text-shadow:0 3px 0 #318db5}
.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,#ffce43,#ff8b52);border:3px solid #fff;box-shadow:0 5px 0 #df7139,0 9px 20px #13769e33;font-size:19px}

.icon-button,.back-button,.game-header-button{width:44px;height:44px;border-radius:15px;background:#fff;color:#3984a9;border:3px solid #fff;display:grid;place-items:center;font-weight:1000;box-shadow:0 5px 0 #b4dbe9,0 8px 18px #237fa52a;transition:transform .18s,box-shadow .18s,filter .18s}
.icon-button:hover,.back-button:hover,.game-header-button:hover{transform:translateY(-3px) rotate(-2deg);filter:brightness(1.04);box-shadow:0 8px 0 #b4dbe9,0 13px 22px #237fa53a}
.icon-button:active,.back-button:active,.game-header-button:active{transform:translateY(3px);box-shadow:0 2px 0 #b4dbe9}

.menu-content{position:relative;z-index:3;width:min(1100px,calc(100% - 48px));height:calc(100% - 76px);margin:auto;display:flex;align-items:center;justify-content:center;gap:75px}
.hero{width:45%;min-width:300px}
.hero-badge{display:inline-flex;align-items:center;padding:9px 14px;border-radius:999px;background:#fff;color:#ee7a3f;font-size:10px;font-weight:1000;box-shadow:0 5px 0 #d6edf4,0 10px 22px #2c8aab22;animation:badgeWiggle 3s ease-in-out infinite}
.hero h1{font-size:clamp(52px,7vw,90px);line-height:.86;letter-spacing:-.07em;margin:22px 0 22px;font-weight:1000;color:#fff;text-shadow:0 6px 0 #318eb7,0 13px 25px #277ca34a}
.hero h1 span{color:#ffbf3f;text-shadow:0 5px 0 #df7c32}
.hero p{font-size:15px;line-height:1.65;color:#256f94;max-width:450px;margin:0;font-weight:650}
.hero-decoration{display:flex;gap:13px;margin-top:22px;align-items:center}
.hero-decoration span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;font-size:16px;color:#fff;box-shadow:0 5px 0 #00000018}
.hero-decoration span:nth-child(1){background:#ff7eb9;animation:decorBounce 1.7s infinite}
.hero-decoration span:nth-child(2){background:#ffbf3f;animation:decorBounce 2s .2s infinite}
.hero-decoration span:nth-child(3){background:#6fceff;animation:decorBounce 1.8s .4s infinite}

.difficulty-grid{width:43%;display:flex;flex-direction:column;gap:15px}
.difficulty-card{position:relative;display:flex;align-items:center;text-align:left;width:100%;min-height:116px;padding:18px 19px;border-radius:27px;background:#fff;border:4px solid #fff;box-shadow:0 8px 0 #b5dce9,0 17px 35px #267fa633;overflow:hidden;transition:transform .22s,box-shadow .22s,filter .22s}
.difficulty-card:before{content:"";position:absolute;width:140px;height:140px;right:-50px;bottom:-80px;border-radius:50%;background:#ffdc7138;transition:.3s}
.difficulty-card:after{content:"";position:absolute;width:15px;height:15px;border-radius:50%;left:20px;top:16px;background:#ffffff88;box-shadow:40px 10px 0 #fff6,75px -4px 0 #fff5;pointer-events:none}
.difficulty-card:hover{transform:translateY(-6px) rotate(-.5deg);box-shadow:0 13px 0 #a5d4e4,0 25px 40px #267fa640;filter:brightness(1.02)}
.difficulty-card:active{transform:translateY(5px);box-shadow:0 3px 0 #a5d4e4,0 8px 15px #267fa630}
.difficulty-icon{position:relative;z-index:2;width:63px;height:63px;display:grid;place-items:center;border-radius:21px;font-size:29px;margin-right:17px;border:3px solid #fff;box-shadow:inset 0 -5px #00000012,0 5px 0 #00000012}
.easy .difficulty-icon{background:linear-gradient(145deg,#79e8a6,#43c878)}
.medium .difficulty-icon{background:linear-gradient(145deg,#70d9ff,#4c9eff)}
.hard .difficulty-icon{background:linear-gradient(145deg,#ff9bc9,#bd79f3)}
.difficulty-info{position:relative;z-index:2;display:flex;flex-direction:column;gap:3px}
.difficulty-info strong{font-size:19px;font-weight:1000;color:#236a8e}
.difficulty-info span{font-size:12px;font-weight:850;color:#5892ad}
.difficulty-info small{font-size:10px;color:#8eacba;font-weight:700}
.difficulty-arrow{position:relative;z-index:2;margin-left:auto;font-size:25px;color:#4c9cbb;font-weight:1000;transition:.25s}
.difficulty-card:hover .difficulty-arrow{transform:translateX(6px) scale(1.1)}
.card-sparkle{position:absolute;right:13px;top:8px;color:#ffd04d;font-size:15px;animation:sparkle 1.7s infinite}

.floating-balloon{position:absolute;border-radius:50%;width:35px;height:45px;display:grid;place-items:center;color:#ffffff;font-size:0;z-index:1;opacity:.75;animation:balloonFloat 5s ease-in-out infinite}
.floating-balloon:after{content:"";position:absolute;width:1px;height:35px;background:#ffffff99;top:42px}
.balloon-pink{background:#ff82b9;right:7%;top:26%;animation-delay:.5s}
.balloon-yellow{background:#ffc847;left:5%;bottom:19%;animation-delay:1.4s}
.balloon-blue{background:#67cfff;right:15%;bottom:8%;animation-delay:2s}

.screen-title{font-size:17px;font-weight:1000;color:#fff;text-shadow:0 3px 0 #328bb2}
.level-counter{font-size:12px;font-weight:900;color:#367b9d;background:#fff;padding:7px 10px;border-radius:999px;box-shadow:0 4px 0 #b5dce9}

.levels-content{position:relative;z-index:3;width:min(1050px,calc(100% - 40px));height:calc(100% - 76px);margin:auto;display:flex;flex-direction:column;justify-content:center}
.levels-heading{text-align:center;margin-bottom:20px}
.levels-difficulty{display:inline-flex;padding:6px 12px;border-radius:999px;background:#fff;color:#ef8046;font-size:9px;font-weight:1000;box-shadow:0 4px 0 #b8dce8}
.levels-heading h2{font-size:32px;letter-spacing:-.045em;margin:9px 0 5px;color:#fff;font-weight:1000;text-shadow:0 4px 0 #318db5}
.levels-heading p{margin:0;color:#367d9e;font-size:11px;font-weight:700}

.levels-grid{width:100%;display:grid;grid-template-columns:repeat(5,1fr);gap:13px}
.level-card{position:relative;aspect-ratio:1.42;border-radius:19px;overflow:hidden;border:4px solid #fff;background:#e4f7ff;box-shadow:0 7px 0 #a8d5e5,0 13px 25px #267fa62b;transition:transform .22s,box-shadow .22s}
.level-card:hover{transform:translateY(-6px) rotate(1deg);box-shadow:0 12px 0 #9acddd,0 20px 30px #267fa638}
.level-thumb{position:absolute;inset:0;background-size:cover;background-position:center;transition:transform .35s}
.level-card:hover .level-thumb{transform:scale(1.08)}
.level-card:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#0000 45%,#07507299)}
.level-number{position:absolute;z-index:2;left:10px;bottom:8px;font-size:12px;font-weight:1000;color:#fff;text-shadow:0 2px 3px #000}
.level-lock{position:absolute;z-index:2;right:8px;top:8px;width:27px;height:27px;border-radius:10px;background:#ffffffdd;color:#4386a1;display:grid;place-items:center;font-size:11px;box-shadow:0 3px 0 #b5dce9}
.level-card.completed{border-color:#fff}
.level-card.completed .level-lock{background:#72dc9a;color:#fff}
.level-card.locked{filter:grayscale(.4);opacity:.5}
.level-card.current{border-color:#ffd24f;box-shadow:0 0 0 3px #fff8,0 8px 0 #e6ad38,0 18px 30px #267fa640;animation:currentCard 1.5s ease-in-out infinite}

.level-cloud{position:absolute;bottom:-40px;left:0;width:100%;height:100px;background:#fff;border-radius:50% 50% 0 0;opacity:.55}

.game-bg{position:absolute;inset:0;background:linear-gradient(180deg,#6ed3ff 0%,#b5ebff 55%,#e9faff 100%)}
.game-bg:before,.game-bg:after{content:"";position:absolute;border-radius:50%;background:#fff8}
.game-bg:before{width:300px;height:100px;left:-80px;top:12%;box-shadow:70px 15px 0 20px #fff7,160px 0 0 5px #fff7}
.game-bg:after{width:350px;height:110px;right:-100px;bottom:12%;box-shadow:-90px 12px 0 15px #fff7,-190px 0 0 0 #fff7}
.game-sky-shine{position:absolute;width:320px;height:320px;right:-150px;top:-150px;border-radius:50%;background:#fff59c66;filter:blur(10px)}
.game-grid{position:absolute;inset:0;opacity:.12;background-image:radial-gradient(#fff 1px,transparent 1px);background-size:24px 24px}

.game-header{height:70px;position:relative;z-index:5;display:flex;align-items:center;gap:14px;padding:0 18px;background:#ffffff55;border-bottom:3px solid #ffffffaa;backdrop-filter:blur(15px);box-shadow:0 6px 20px #2581a522}
.game-progress{flex:1;min-width:0}
.game-level-label{margin-bottom:7px;color:#27779b;font-weight:1000;text-shadow:none}
.game-progress-track{height:8px;border-radius:99px;background:#ffffffaa;border:2px solid #fff;overflow:hidden}
.game-progress-fill{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#ff80b9,#ffca3f);transition:width .5s}
.game-actions{display:flex;gap:8px}
.game-header-button{flex:none;width:40px;height:40px}
.compact{font-size:15px}

.game-content{position:relative;z-index:2;height:calc(100% - 70px);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 18px 18px;gap:12px}
.game-info{width:min(760px,94vw);display:flex;justify-content:space-between}
.stat{display:flex;flex-direction:column;gap:3px;background:#ffffffc9;padding:7px 12px;border-radius:13px;box-shadow:0 4px 0 #b4dbe8}
.stat span{font-size:8px;letter-spacing:.12em;color:#4785a0;font-weight:1000}
.stat strong{font-size:13px;color:#267294;font-weight:1000}

.puzzle-wrap{display:flex;align-items:center;justify-content:center;width:min(76vh,82vw,760px);height:min(76vh,82vw,760px);max-width:calc(100vh - 180px);max-height:calc(100vh - 180px)}
.puzzle-board{width:100%;height:100%;display:grid;gap:5px;padding:7px;border-radius:25px;background:#ffffffc7;border:4px solid #fff;box-shadow:0 13px 0 #9bcfe1,0 25px 50px #237fa633,inset 0 0 0 2px #fff8}

.puzzle-piece{position:relative;border-radius:10px;overflow:hidden;background-color:#bdeeff;background-repeat:no-repeat;cursor:pointer;border:2px solid #ffffffaa;box-shadow:inset 0 2px #fff8,0 2px 0 #00000012;transition:transform .16s,filter .16s,box-shadow .16s,border-color .16s}
.puzzle-piece:after{content:"";position:absolute;inset:0;background:linear-gradient(135deg,#ffffff22,transparent 40%,#00000010);pointer-events:none}
.puzzle-piece:hover{filter:brightness(1.07);transform:scale(.97) rotate(-1deg)}
.puzzle-piece.selected{z-index:3;transform:scale(.92) rotate(2deg);border-color:#ffbd3e;box-shadow:0 0 0 4px #fff,0 0 25px #ffb52e88,0 5px 0 #e29327}
.puzzle-piece.swap-anim{animation:swapPiece .28s cubic-bezier(.2,1.4,.4,1)}
.puzzle-piece.hint-piece{z-index:4;animation:hintPiece .9s ease-in-out 3}
.puzzle-piece.hint-piece:before{content:"";position:absolute;inset:0;border:4px solid #ffca3e;box-shadow:inset 0 0 25px #ffdb6644,0 0 25px #ffb62e88;border-radius:9px;z-index:2}
.hint-target{z-index:3;animation:hintTarget .9s ease-in-out 3}
.hint-target:before{content:"";position:absolute;inset:3px;border:4px dashed #ff72ae;border-radius:8px;box-shadow:0 0 25px #ff72ae77;z-index:5}

.game-hint{font-size:10px;color:#367b98;display:flex;align-items:center;gap:7px;font-weight:800;background:#ffffffaa;padding:6px 11px;border-radius:999px}
.hint-dot{width:7px;height:7px;border-radius:50%;background:#ff9b43;box-shadow:0 0 10px #ff9b43}

.game-controls{display:flex;gap:10px;width:min(760px,94vw)}
.action-button{flex:1;min-height:50px;border-radius:17px;border:3px solid #fff;background:#fff;display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr 1fr;column-gap:10px;align-items:center;text-align:left;padding:7px 14px;box-shadow:0 6px 0 #acd8e6,0 12px 24px #277fa62b;transition:transform .18s,box-shadow .18s}
.action-button span{grid-row:1/3;font-size:21px}
.action-button b{font-size:11px;align-self:end;color:#287292;font-weight:1000}
.action-button small{font-size:8px;color:#72a0b3;align-self:start;font-weight:700}
.action-button:hover{transform:translateY(-4px) rotate(-.5deg);box-shadow:0 10px 0 #9ccfdf,0 18px 28px #277fa633}
.action-button:active{transform:translateY(4px);box-shadow:0 2px 0 #9ccfdf}
.hint-button span{color:#ffb52f}
.original-button span{color:#62bff1}

.game-decor{position:absolute;z-index:1;pointer-events:none;font-size:30px}
.decor-star-one{left:5%;top:28%;color:#ffbf3e;animation:decorFloat 3s infinite}
.decor-star-two{right:5%;top:43%;color:#ff7db7;animation:decorFloat 3.7s .5s infinite}
.decor-star-three{left:8%;bottom:17%;color:#6bd1ff;animation:decorFloat 4s 1s infinite}

.modal{position:absolute;z-index:20;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:#1a7390a8;backdrop-filter:blur(12px);opacity:0;visibility:hidden;transition:.25s}
.modal.active{opacity:1;visibility:visible}
.modal-card{position:relative;width:min(430px,94vw);padding:34px;border-radius:30px;background:linear-gradient(180deg,#ffffff,#f1fbff);border:5px solid #fff;box-shadow:0 12px 0 #8ecbdd,0 30px 80px #12617e55;text-align:center;color:#287294;transform:translateY(20px) scale(.92) rotate(-1deg);transition:.3s cubic-bezier(.2,1.25,.4,1)}
.modal.active .modal-card{transform:none}
.small-card{width:min(350px,92vw)}
.modal-icon,.result-icon{width:68px;height:68px;border-radius:23px;display:grid;place-items:center;margin:0 auto 17px;background:linear-gradient(145deg,#ffe174,#ff9f59);border:4px solid #fff;font-size:28px;color:#fff;box-shadow:0 6px 0 #e18537,0 10px 25px #e89a3a44}
.modal-card h2{margin:0;font-size:28px;letter-spacing:-.04em;color:#26708f;font-weight:1000}
.modal-card p{margin:8px 0 25px;color:#6796a8;font-size:12px;font-weight:700}
.modal-buttons{display:flex;flex-direction:column;gap:10px}
.primary-button,.secondary-button{width:100%;height:50px;border-radius:15px;font-size:12px;font-weight:1000;transition:.18s}
.primary-button{background:linear-gradient(145deg,#ffce45,#ff9856);color:#fff;border:3px solid #fff;box-shadow:0 6px 0 #dd7838,0 10px 20px #dc87392e}
.secondary-button{background:#e9f8ff;border:3px solid #fff;color:#43809a;box-shadow:0 5px 0 #b5dbe7}
.primary-button:hover,.secondary-button:hover{transform:translateY(-3px)}
.primary-button:active,.secondary-button:active{transform:translateY(3px);box-shadow:0 2px 0 #b5dbe7}

.modal-close{position:absolute;right:12px;top:12px;width:35px;height:35px;border-radius:12px;background:#eaf8ff;color:#5b95aa;font-size:23px;font-weight:900;box-shadow:0 4px 0 #c0e0ea}

.source-card{position:relative;width:min(720px,92vw);height:min(82vh,720px);display:flex;align-items:center;justify-content:center;padding:15px;border-radius:27px;background:#f3fcff;border:5px solid #fff;box-shadow:0 12px 0 #9dcedd,0 30px 90px #12617e55}
.source-card img{display:block;max-width:100%;max-height:100%;object-fit:contain;border-radius:16px;border:4px solid #fff}
.source-label{position:absolute;left:24px;top:23px;z-index:2;background:#ffbf42;color:#fff;padding:8px 11px;border-radius:10px;font-size:9px;font-weight:1000;box-shadow:0 4px 0 #dd8535}

.result-glow{position:absolute;width:210px;height:210px;top:-100px;left:50%;transform:translateX(-50%);background:radial-gradient(circle,#ffe06d88,transparent 70%);pointer-events:none}
.result-icon{color:#fff;background:linear-gradient(145deg,#73df9c,#43c979);box-shadow:0 6px 0 #2ea765,0 12px 30px #45c67a55}
.result-card h2{font-size:32px;color:#24708e}
.result-label{color:#ee8b3e;font-size:9px;font-weight:1000}
.result-stats{display:grid;grid-template-columns:1fr 1fr;margin:22px 0;gap:10px}
.result-stats div{display:flex;flex-direction:column;gap:5px;padding:10px;border-radius:14px;background:#eaf8ff}
.result-stats span{font-size:9px;color:#7198a8;font-weight:800}
.result-stats strong{font-size:20px;color:#287391}

.profile-card{text-align:left}
.profile-avatar{width:70px;height:70px;border-radius:23px;display:grid;place-items:center;font-size:28px;font-weight:1000;color:#fff;background:linear-gradient(145deg,#ffcf45,#ff8b53);border:4px solid #fff;box-shadow:0 6px 0 #db7739;margin-bottom:12px}
.profile-name{font-size:22px;font-weight:1000;color:#28718e}
.profile-status{font-size:10px;color:#77a0b0;margin-top:4px;font-weight:700}
.profile-progress{margin-top:24px}
.profile-progress-head{display:flex;justify-content:space-between;font-size:10px;color:#56869b;margin-bottom:8px;font-weight:800}
.profile-progress-track{height:9px;border-radius:99px;background:#dff3fa;overflow:hidden;border:2px solid #fff}
.profile-progress-fill{height:100%;width:0;background:linear-gradient(90deg,#73dca0,#ffd04c,#ff8caf);border-radius:99px}
.auth-block{margin-top:20px;padding:14px;border-radius:17px;background:#effaff;border:3px solid #fff;box-shadow:0 4px 0 #c2e1ea}
.auth-block .primary-button{height:42px}
.auth-block p{font-size:9px;margin:8px 0 0;line-height:1.5;color:#739aaa}
.achievements-title{font-size:11px;font-weight:1000;margin-top:22px;margin-bottom:10px;color:#347993}
.achievements{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.achievement{padding:10px 6px;text-align:center;border-radius:14px;background:#edfaff;border:3px solid #fff;box-shadow:0 3px 0 #c3e2ea;opacity:.38}
.achievement.unlocked{opacity:1;border-color:#fff;background:#fff9e8}
.achievement-icon{font-size:18px;margin-bottom:4px}
.achievement-name{font-size:7px;color:#648e9f;line-height:1.2;font-weight:800}

.hint-toast{position:absolute;z-index:40;left:50%;bottom:max(25px,env(safe-area-inset-bottom));transform:translate(-50%,20px);padding:12px 17px;border-radius:999px;background:#fff;border:3px solid #fff;box-shadow:0 6px 0 #a9d5e3,0 12px 25px #167a9d44;color:#327b98;font-size:10px;font-weight:900;opacity:0;visibility:hidden;transition:.25s;white-space:nowrap}
.hint-toast.active{opacity:1;visibility:visible;transform:translate(-50%,0)}

.confetti{position:absolute;width:13px;height:24px;z-index:25;animation:confettiFall 2.4s ease-in-out infinite}
.confetti-a{background:#ff7db5;left:14%;top:8%;transform:rotate(25deg)}
.confetti-b{background:#ffd04c;right:17%;top:12%;transform:rotate(-30deg);animation-delay:.4s}
.confetti-c{background:#65d4ff;left:22%;bottom:13%;transform:rotate(45deg);animation-delay:.8s}
.confetti-d{background:#77dc9d;right:24%;bottom:16%;transform:rotate(-20deg);animation-delay:1.2s}

@keyframes logoBounce{
0%,100%{transform:translateY(0) rotate(-2deg)}
50%{transform:translateY(-12px) rotate(2deg)}
}
@keyframes loader{
0%{transform:translateX(-170%)}
100%{transform:translateX(500%)}
}
@keyframes cloudFloat{
0%,100%{transform:translateX(0)}
50%{transform:translateX(35px)}
}
@keyframes sunSpin{
to{transform:rotate(360deg)}
}
@keyframes starFloat{
0%,100%{transform:translateY(0)}
50%{transform:translateY(-6px)}
}
@keyframes badgeWiggle{
0%,90%,100%{transform:rotate(0)}
94%{transform:rotate(-3deg)}
97%{transform:rotate(3deg)}
}
@keyframes decorBounce{
0%,100%{transform:translateY(0)}
50%{transform:translateY(-8px)}
}
@keyframes sparkle{
0%,100%{transform:scale(1) rotate(0);opacity:.5}
50%{transform:scale(1.35) rotate(20deg);opacity:1}
}
@keyframes balloonFloat{
0%,100%{transform:translateY(0) rotate(-3deg)}
50%{transform:translateY(-20px) rotate(4deg)}
}
@keyframes currentCard{
0%,100%{transform:translateY(0)}
50%{transform:translateY(-3px)}
}
@keyframes decorFloat{
0%,100%{transform:translateY(0) rotate(0)}
50%{transform:translateY(-12px) rotate(12deg)}
}
@keyframes swapPiece{
0%{transform:scale(1)}
45%{transform:scale(.88) rotate(5deg)}
100%{transform:scale(1)}
}
@keyframes hintPiece{
0%,100%{transform:scale(1)}
50%{transform:scale(.91) rotate(-2deg);filter:brightness(1.25)}
}
@keyframes hintTarget{
0%,100%{transform:scale(1)}
50%{transform:scale(.94) rotate(2deg);filter:brightness(1.15)}
}
@keyframes confettiFall{
0%,100%{transform:translateY(-10px) rotate(0)}
50%{transform:translateY(20px) rotate(180deg)}
}

@media(max-width:1000px){
.menu-content{gap:45px}
.hero h1{font-size:clamp(45px,7vw,74px)}
}

@media(max-width:800px){
.topbar{height:66px}
.menu-content{width:min(620px,calc(100% - 28px));height:calc(100% - 66px);flex-direction:column;gap:20px;justify-content:center}
.hero{width:100%;min-width:0;text-align:center}
.hero h1{font-size:clamp(42px,12vw,63px);margin:13px 0}
.hero p{margin:auto;font-size:11px;line-height:1.55}
.hero-decoration{justify-content:center;margin-top:13px}
.difficulty-grid{width:100%;gap:9px}
.difficulty-card{min-height:79px;padding:10px 12px;border-radius:20px}
.difficulty-icon{width:45px;height:45px;border-radius:15px;font-size:21px;margin-right:12px}
.difficulty-info strong{font-size:15px}
.difficulty-info span{font-size:10px}
.difficulty-info small{font-size:8px}
.difficulty-arrow{font-size:19px}
.levels-content{width:calc(100% - 22px);height:calc(100% - 66px)}
.levels-heading{margin-bottom:11px}
.levels-heading h2{font-size:24px}
.levels-grid{gap:6px}
.level-card{border-radius:11px;border-width:3px}
.level-number{font-size:9px;left:6px;bottom:5px}
.level-lock{width:19px;height:19px;right:5px;top:5px;font-size:8px;border-radius:6px}
.game-header{height:60px;padding:0 9px;gap:7px}
.game-content{height:calc(100% - 60px);padding:7px 9px 10px;gap:8px}
.puzzle-wrap{width:min(84vw,75vh);height:min(84vw,75vh);max-width:calc(100vh - 153px);max-height:calc(100vh - 153px)}
.puzzle-board{gap:3px;padding:4px;border-radius:19px}
.game-hint{font-size:8px}
.action-button{min-height:43px;padding:5px 9px}
.action-button b{font-size:9px}
.action-button small{font-size:7px}
.stat{padding:5px 9px}
.stat span{font-size:7px}
.stat strong{font-size:11px}
.floating-balloon{display:none}
}

@media(max-width:520px){
.topbar{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
.brand{font-size:10px;letter-spacing:.06em}
.brand-mark{width:32px;height:32px;border-radius:11px;font-size:15px}
.icon-button,.back-button{width:38px;height:38px;border-radius:12px}
.menu-content{width:calc(100% - 20px)}
.hero-badge{font-size:7px;padding:7px 10px}
.hero h1{font-size:41px}
.hero p{font-size:10px;max-width:330px}
.hero-decoration{display:none}
.difficulty-card{min-height:69px;padding:8px 10px;border-width:3px}
.difficulty-icon{width:38px;height:38px;border-radius:12px;font-size:18px;margin-right:10px}
.difficulty-info strong{font-size:13px}
.difficulty-info span{font-size:9px}
.difficulty-info small{font-size:7px}
.difficulty-arrow{font-size:16px}
.card-sparkle{font-size:11px}
.levels-heading h2{font-size:21px}
.levels-heading p{font-size:8px}
.levels-difficulty{font-size:7px;padding:5px 9px}
.game-info{width:96vw}
.game-controls{width:96vw;gap:7px}
.action-button{border-width:2px;border-radius:13px}
.action-button span{font-size:17px}
.action-button b{font-size:8px}
.action-button small{font-size:6px}
}

@media(max-width:390px){
.menu-content{gap:11px}
.hero h1{font-size:36px;margin:8px 0}
.hero p{display:none}
.difficulty-card{min-height:62px;padding:7px 9px}
.difficulty-icon{width:34px;height:34px;font-size:16px}
.difficulty-info strong{font-size:12px}
.difficulty-info span{font-size:8px}
.difficulty-info small{font-size:6px}
.levels-grid{gap:4px}
.level-card{border-width:2px}
.level-number{font-size:8px}
.level-lock{width:17px;height:17px;font-size:7px}
.game-header-button{width:34px;height:34px}
.game-header{height:56px}
.game-content{height:calc(100% - 56px);gap:5px;padding:5px 6px 7px}
.puzzle-wrap{width:min(82vw,67vh);height:min(82vw,67vh)}
.game-hint{display:none}
.action-button{min-height:37px;padding:4px 7px}
.action-button b{font-size:7px}
.action-button small{font-size:5.5px}
}

@media(max-height:700px) and (orientation:portrait){
.topbar{height:56px}
.menu-content{height:calc(100% - 56px);gap:9px}
.hero h1{font-size:37px;margin:7px 0}
.hero p{display:none}
.hero-decoration{display:none}
.hero-badge{padding:5px 9px}
.difficulty-card{min-height:57px}
.difficulty-icon{width:34px;height:34px}
.levels-content{height:calc(100% - 56px)}
.levels-heading{margin-bottom:5px}
.levels-heading h2{font-size:19px;margin:3px 0}
.levels-heading p{font-size:7px}
.game-header{height:53px}
.game-content{height:calc(100% - 53px);gap:4px}
.puzzle-wrap{width:min(78vw,65vh);height:min(78vw,65vh)}
.game-hint{display:none}
.action-button{min-height:35px}
}

@media(orientation:landscape) and (max-height:650px){
.topbar{height:52px}
.menu-content{height:calc(100% - 52px);gap:25px}
.hero h1{font-size:40px;margin:8px 0}
.hero p{font-size:9px;line-height:1.35}
.hero-decoration{display:none}
.difficulty-card{min-height:63px;padding:7px 10px}
.difficulty-icon{width:38px;height:38px}
.difficulty-info strong{font-size:12px}
.difficulty-info span{font-size:9px}
.difficulty-info small{font-size:7px}
.levels-content{height:calc(100% - 52px)}
.levels-heading{margin-bottom:7px}
.levels-heading h2{font-size:21px;margin:4px 0}
.game-header{height:48px;padding:0 8px}
.game-content{height:calc(100% - 48px);padding:3px 8px;gap:3px}
.puzzle-wrap{width:min(69vh,61vw);height:min(69vh,61vw)}
.game-hint{display:none}
.game-info{width:min(700px,91vw)}
.stat{padding:4px 8px}
.action-button{min-height:31px;padding:3px 7px}
.action-button b{font-size:7px}
.action-button small{font-size:5px}
}

@media(orientation:landscape) and (max-height:480px){
.topbar{height:46px}
.menu-content{height:calc(100% - 46px);gap:15px}
.hero h1{font-size:31px}
.hero p{display:none}
.hero-badge{font-size:7px;padding:5px 8px}
.difficulty-grid{gap:5px}
.difficulty-card{min-height:48px;padding:5px 7px;border-width:2px}
.difficulty-icon{width:29px;height:29px;font-size:13px;margin-right:7px}
.difficulty-info strong{font-size:10px}
.difficulty-info span{font-size:7px}
.difficulty-info small{display:none}
.game-header{height:44px}
.game-content{height:calc(100% - 44px);padding:3px 6px;gap:2px}
.puzzle-wrap{width:min(61vh,58vw);height:min(61vh,58vw)}
.game-info{width:min(650px,88vw)}
.stat{padding:3px 7px}
.stat span{font-size:6px}
.stat strong{font-size:9px}
.action-button{min-height:27px}
.action-button span{font-size:13px}
.action-button b{font-size:6px}
.action-button small{font-size:4.5px}
}

@media(min-width:1600px){
.menu-content{width:min(1200px,calc(100% - 80px))}
.hero h1{font-size:94px}
.difficulty-card{min-height:125px}
.levels-content{width:min(1200px,calc(100% - 80px))}
.puzzle-wrap{width:min(76vh,800px);height:min(76vh,800px)}
}

@media(min-width:2200px){
.menu-content{width:1380px}
.levels-content{width:1380px}
.puzzle-wrap{width:min(78vh,850px);height:min(78vh,850px)}
}

@media(prefers-reduced-motion:reduce){
*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
}