*{box-sizing:border-box}html{background:#101b34;color:#fff;font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif}body{margin:0;min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 5%,#283a59,transparent 70%),#101b34}button{font:inherit;border:0;cursor:pointer;touch-action:manipulation;color:inherit}button:disabled{opacity:.6;cursor:wait}button:focus-visible,canvas:focus-visible{outline:3px solid #ffdd70;outline-offset:3px}button:hover{filter:brightness(1.1)}button:active{transform:translateY(2px)}.game-shell{width:min(1280px,100%);padding:22px 30px}header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.brand{font-size:25px;font-weight:900;letter-spacing:-1px}.brand>span{color:#ffdc72}.brand small{display:block;font-size:11px;letter-spacing:3px;color:#8babc2;margin-top:4px}nav{display:flex;gap:7px}nav button{background:#ffffff09;border:1px solid #ffffff13;border-radius:12px;padding:10px 13px;min-height:42px;font-size:19px}nav button span{font-size:14px;margin-left:6px}#stage{position:relative;border-radius:22px;overflow:hidden;aspect-ratio:16/9;box-shadow:0 24px 65px #0005;border:1px solid #ffffff20;background:#254a66}canvas{display:block;width:100%;height:100%;outline:0}.hud{position:absolute;top:17px;left:20px;right:20px;display:flex;justify-content:space-between;pointer-events:none;gap:10px;text-shadow:0 2px 8px #0005}.hud-left,.hud-right{display:flex;align-items:center;gap:13px;background:#0d213ab8;border:1px solid #ffffff30;border-radius:12px;padding:9px 13px;font-weight:800;font-size:16px;backdrop-filter:blur(10px)}.world-label{font-size:14px}.health{color:#ff9aae;letter-spacing:3px}.hud-right #gems{letter-spacing:3px;color:#9ce9ff}.hud-right #score{color:#ffdf81;border-left:1px solid #ffffff30;padding-left:13px}.progress-track{position:absolute;top:0;left:0;right:0;height:3px;background:#ffffff20}.progress-track div{height:100%;background:#ffe07b;width:0;transition:width .2s linear}.overlay{position:absolute;inset:0;background:#07172b55;display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(3px)}#menu{justify-content:flex-start;padding:30px 50px;background:linear-gradient(90deg,#0a2039f5,#0a2039ae 48%,#0a203916 100%);backdrop-filter:none}.intro{position:relative;z-index:2;width:330px}.kicker{font-size:12px;letter-spacing:2px;color:#ffdf81;font-weight:800}h1{font-size:clamp(40px,5vw,72px);line-height:.95;letter-spacing:-2px;margin:16px 0}h1 em{font-style:normal;color:#ffdf81}p{font-size:16px;line-height:1.5;color:#d7e5f6;margin:14px 0}.characters{display:flex;gap:12px;margin:20px 0 12px}.characters button{background:#ffffff0c;border:2px solid #ffffff25;border-radius:14px;display:flex;align-items:center;gap:12px;padding:8px 16px;flex:1;font-weight:800}.characters button.selected{border-color:#ffdf81;background:#ffdf8118}.characters img{height:58px;width:36px;object-fit:contain}.assist{display:flex;align-items:center;gap:9px;font-size:14px;color:#d7e5f6;margin:14px 0}.assist input{accent-color:#ffdf81;width:20px;height:20px}.primary{background:#ffdf81;color:#1c2f45;padding:14px 24px;min-height:48px;border-radius:13px;font-weight:900;font-size:18px;width:100%;box-shadow:0 4px 0 #b88c38}.secondary{display:block;background:transparent;color:#d7e5f6;text-align:center;padding:13px;min-height:44px;font-size:14px;width:100%}.hero-characters{position:absolute;right:4%;bottom:5%;width:47%;height:80%;display:flex;align-items:flex-end;justify-content:center;filter:drop-shadow(0 15px 20px #0928416b);pointer-events:none}.hero-characters img{height:100%;width:53%;object-fit:contain;object-position:bottom;animation:float 4s ease-in-out infinite}.hero-characters img+img{height:80%;margin-left:-5%;animation-delay:-2s}@keyframes float{50%{transform:translateY(-8px)}}.panel{width:min(430px,100%);text-align:center;background:linear-gradient(145deg,#162e4af5,#11253ff5);padding:28px;border-radius:22px;border:1px solid #ffffff25;box-shadow:0 20px 70px #0005}.panel h2{font-size:32px;margin:10px 0;line-height:1.1;letter-spacing:-1px}.wide{width:760px}.wide h2{font-size:28px}#world-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0 5px}.world-card{text-align:left;border-radius:12px;overflow:hidden;background:#ffffff0b;padding:0;border:1px solid #ffffff25}.world-card img{display:block;aspect-ratio:16/9;width:100%;object-fit:cover}.world-card div{padding:10px 12px;font-weight:800;font-size:14px}.world-card small{display:block;font-weight:400;font-size:12px;color:#a9c1d9;margin-top:4px}.message-icon{font-size:52px;color:#ffdf81}.result{display:flex;gap:12px;justify-content:center;color:#ffdf81;font-size:22px;font-weight:900;margin:16px 0}.hidden{display:none!important}#toast{position:absolute;left:50%;bottom:24px;transform:translate(-50%,12px);opacity:0;background:#122c47ee;color:#fff;padding:12px 20px;border:1px solid #ffffff30;border-radius:15px;font-size:15px;font-weight:800;text-align:center;pointer-events:none;transition:.2s;width:max-content;max-width:80%}#toast.visible{transform:translate(-50%,0);opacity:1}footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:18px}.instructions{display:flex;flex-direction:column;gap:7px;font-size:14px;color:#9ab3cc}.instructions strong{color:#d6e8f6;font-size:15px}.touch-controls,.arrows{display:flex;gap:9px}.touch-controls button{border:1px solid #ffffff20;border-radius:16px;width:62px;height:62px;background:#283e5b;box-shadow:0 4px 0 #08152b;font-size:25px;touch-action:none;user-select:none;-webkit-user-select:none;display:flex;align-items:center;justify-content:center;flex-direction:column}.touch-controls small{font-size:10px;letter-spacing:1px;margin-top:3px}.touch-controls .magic{background:#a992ef;color:#152541;margin-left:12px}.touch-controls .jump{background:#ffdf81;color:#152541;width:82px}.game-shell:fullscreen{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;background:#101b34;padding:12px}.game-shell:fullscreen #stage{flex:1;aspect-ratio:auto}.game-shell:fullscreen header{margin-bottom:8px}.game-shell:fullscreen footer{margin-top:10px}@media(max-width:760px){.game-shell{padding:12px}header{margin-bottom:10px}.brand{font-size:20px}.brand small{font-size:9px;letter-spacing:2px}nav{gap:4px}nav button{padding:7px 10px}nav button span{display:none}#stage{aspect-ratio:4/3;min-height:540px;border-radius:16px}#menu{padding:22px;background:linear-gradient(90deg,#0a2039ed,#0a2039aa)}.intro{width:280px;max-width:100%}h1{font-size:40px;margin:10px 0}p{font-size:14px;margin:8px 0}.hero-characters{right:-16%;opacity:.35;width:70%;height:65%;bottom:15%}.characters{margin:14px 0 8px}.characters img{height:45px}.characters button{padding:8px 10px}.hud{top:10px;left:10px;right:10px;gap:6px}.hud-left,.hud-right{padding:8px;gap:7px;font-size:14px}.world-label{font-size:12px;max-width:125px}.health{letter-spacing:0;font-size:14px}.hud-right #gems{letter-spacing:0}.hud-right #score{padding-left:7px}.overlay{padding:14px}.panel{padding:20px}.wide h2{font-size:25px}#world-grid{grid-template-columns:repeat(2,1fr);gap:8px;margin:10px 0}.world-card img{aspect-ratio:2.3}.world-card div{font-size:12px;padding:8px}.world-card small{font-size:11px}footer{gap:10px}.instructions{max-width:140px;font-size:12px}.instructions strong{font-size:13px}.touch-controls,.arrows{gap:6px}.touch-controls button{width:48px;height:60px}.touch-controls .jump{width:58px}.touch-controls .magic{margin-left:4px}}@media(max-height:560px) and (orientation:landscape){body{display:block}.game-shell{padding:8px 12px;height:100dvh;display:flex;flex-direction:column}.game-shell header{margin-bottom:6px}#stage{min-height:0;aspect-ratio:auto;flex:1}.brand small{display:none}footer{margin-top:8px}.touch-controls button{height:44px;width:60px}.touch-controls small{font-size:9px}.instructions{flex-direction:row;gap:16px;max-width:none}#menu{padding:16px 28px}.intro{width:330px}h1{font-size:38px;display:inline-block;line-height:1;margin:4px 0}h1 br{display:none}.intro>.kicker{display:none}.intro p{margin:4px 0;font-size:14px}.characters{margin:8px 0;gap:8px}.characters img{height:32px}.assist{margin:6px 0}.primary{padding:8px;min-height:38px;font-size:16px}.secondary{padding:5px;min-height:28px}.panel{padding:16px}.panel h2{font-size:24px}.panel p{font-size:14px;margin:8px}.message-icon{font-size:30px}.result{margin:8px}#world-grid{grid-template-columns:repeat(3,1fr);margin:8px 0;gap:8px}.world-card img{aspect-ratio:3}.world-card div{font-size:12px;padding:6px}.world-card small{display:none}.hero-characters{height:90%;opacity:1;right:0;width:45%;bottom:0}}@media(prefers-reduced-motion:reduce){.hero-characters img{animation:none}*{transition:none!important}}

.touch-controls .cooldown{background:#706d98;color:#e9e4fb}.touch-controls .pressed{transform:translateY(3px);box-shadow:0 1px 0 #08152b}

footer{position:relative;min-height:66px}.touch-controls{width:100%;justify-content:space-between;align-items:center}.actions{display:flex;gap:10px;align-items:center}.instructions{position:absolute;left:50%;transform:translateX(-50%);text-align:center;pointer-events:none;width:max-content}.touch-controls .magic{margin-left:0}.arrows{gap:10px}.touch-controls button{width:72px;height:66px}.touch-controls .jump{width:88px}@media(max-width:760px){.instructions{display:none}.touch-controls button{width:58px;height:64px}.touch-controls .jump{width:68px}.actions,.arrows{gap:9px}footer{margin-top:14px}}@media(max-height:560px) and (orientation:landscape){footer{min-height:46px;margin-top:8px}.touch-controls button{height:44px;width:64px}.touch-controls .jump{width:76px}.instructions{display:flex;flex-direction:column;gap:3px;font-size:12px}.instructions strong{font-size:12px}}

@media(max-height:560px) and (orientation:landscape){.wide .kicker{display:none}.wide h2{margin:4px 0}.world-card img{aspect-ratio:auto;height:42px}.intro p{display:none}.intro .characters{margin:5px 0}.intro .assist{margin:5px 0}.intro .secondary{padding:5px}}

/* Ten-world expansion */
#worlds{overflow-y:auto;align-items:flex-start}.wide{margin:auto;width:min(940px,100%);max-height:100%;overflow-y:auto}#world-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.atlas-thumb{display:block;background-image:url('new-worlds-v5.png');background-size:200% 200%;aspect-ratio:16/9;width:100%}.world-card.completed{border-color:#e3cd80;box-shadow:0 0 0 1px #e3cd8030}#world-counter{font-size:12px;color:#bedde7;margin:5px 0 12px}.difficulty-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;margin:12px 0;color:#d7e5f6}.difficulty-label select{background:#263b54;border:1px solid #ffffff35;border-radius:9px;padding:7px 10px;color:white;font:inherit;min-width:150px}.touch-controls{-webkit-touch-callout:none;touch-action:none}.overlay .intro{flex-shrink:0}#menu{overflow-y:auto}.world-card .atlas-thumb{min-height:50px}@media(max-width:760px){#world-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wide{max-height:100%}.atlas-thumb{aspect-ratio:2.3}.difficulty-label{margin:8px 0}}@media(max-height:560px) and (orientation:landscape){#world-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.world-card .atlas-thumb,.world-card img{height:43px;min-height:0;aspect-ratio:auto}.difficulty-label{margin:4px 0;font-size:12px}.difficulty-label select{padding:4px 8px}#menu{align-items:flex-start}.wide{padding:12px}}

.touch-controls .duck{background:#7ed4d3;color:#173347}.actions{display:flex;gap:8px}.touch-controls .duck,.touch-controls .magic{width:58px}.touch-controls .magic{margin-left:0}@media(max-width:760px){.touch-controls button{width:43px}.touch-controls .duck,.touch-controls .magic{width:43px}.touch-controls .jump{width:49px}.actions,.touch-controls,.arrows{gap:5px}.instructions{max-width:85px;font-size:10px}.instructions strong{font-size:11px}}

.classic-thumb{display:block;background-image:url('classic-worlds-v6.png');background-size:200% 300%;aspect-ratio:16/9;width:100%}#magic-level{color:#d9bfff;border-left:1px solid #ffffff30;padding-left:9px;font-size:13px;white-space:nowrap}@media(max-width:760px){.classic-thumb{aspect-ratio:2.3}.hud-right{gap:5px;padding:7px 6px}.hud-right #score{font-size:12px;padding-left:5px}#magic-level{font-size:11px;padding-left:5px}.world-label{max-width:105px}}@media(max-height:560px) and (orientation:landscape){.world-card .classic-thumb{height:43px;aspect-ratio:auto}}
