:root{color-scheme:dark;--bg:#090a14;--panel:#101424;--line:#292d43;--white:#f5f5ff;--muted:#a7aec5;--gold:#ffe16a;--pink:#64ddab;--violet:#b36dff;--teal:#83f6c1}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--white)}
body{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;-webkit-font-smoothing:antialiased;overscroll-behavior:none}
body::before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% -20%,#2a1b3c 0%,transparent 62%);z-index:-1}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:focus-visible,canvas:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.app-shell{max-width:1000px;margin:auto;padding:15px 19px calc(18px + env(safe-area-inset-bottom))}
.topbar,.header-actions,.wordmark,.scorebar,.controls,.direction-buttons,.footer{display:flex;align-items:center;justify-content:space-between}
.topbar{gap:14px;margin-bottom:13px}.wordmark{display:flex;gap:12px;align-items:center}.brand-star{width:42px;height:42px;display:grid;place-items:center;border:2px solid var(--pink);border-radius:12px;background:#29172b;color:var(--gold);font-size:25px;box-shadow:4px 4px 0 #411d37}.wordmark strong{font-size:18px;font-weight:1000;letter-spacing:2px;display:block;line-height:1.15}.wordmark small{display:block;font-size:9px;letter-spacing:2.5px;color:var(--muted);margin-top:4px}.header-actions{gap:8px}.icon-btn{background:#141627;border:1px solid #37384b;border-radius:10px;min-width:45px;height:41px;padding:0 11px;font-weight:900;font-size:24px;line-height:1}.icon-btn:active{background:#31334a}.button-caption{font-size:9px;vertical-align:middle;color:var(--gold)}
.arcade{background:#0b0c18;border:2px solid #3a344a;border-radius:14px;overflow:hidden;box-shadow:0 12px 50px #0009,0 0 0 4px #131524}
.scorebar{padding:10px 17px;gap:6px;background:linear-gradient(#1e1b35,#141425);border-bottom:2px solid #4a2e50}.scorebar>div{display:flex;flex-direction:column;gap:3px}.scorebar span{color:#aaa6c4;font-size:10px;letter-spacing:1.5px;font-weight:800}.scorebar strong{color:var(--gold);font-size:17px;letter-spacing:1px;font-variant-numeric:tabular-nums}.scorebar #livesText{color:#ff618d;white-space:nowrap}.canvas-frame{width:100%;position:relative;aspect-ratio:8/5;background:#05050d;overflow:hidden;touch-action:none}.canvas-frame canvas{display:block;width:100%;height:100%;image-rendering:pixelated;image-rendering:crisp-edges;touch-action:none;outline:none}
.game-overlay{position:absolute;inset:0;display:grid;place-items:center;background:rgba(3,4,13,.67);padding:12px}.game-overlay[hidden]{display:none}.overlay-card{padding:22px 28px;max-width:440px;width:90%;text-align:center;border:2px solid #f7b44b;background:linear-gradient(140deg,rgba(30,20,54,.96),rgba(13,15,31,.97));box-shadow:6px 6px 0 #7c305e,0 12px 38px #000b}.eyebrow{font-size:10px;color:#a8f4d1;letter-spacing:1.5px;font-weight:900;margin:0 0 10px}.overlay-card h1{font-size:clamp(23px,5vw,38px);font-weight:1000;line-height:1.08;letter-spacing:2px;margin:0 0 12px;color:#ffe16a;text-shadow:3px 3px #ae3f63}.overlay-card h1 span{color:#ff71ba}.overlay-card p:not(.eyebrow){font-size:12px;line-height:1.5;color:#e9e7f6}.overlay-card .overlay-hint{font-size:10px!important;color:#adb3d2!important;margin:14px 0 0}.primary-btn{border:2px solid #fff1a3;background:#ea4d91;color:white;font-size:16px;font-weight:1000;letter-spacing:1.2px;padding:12px 22px;border-radius:8px;box-shadow:4px 4px 0 #812a60;margin-top:7px}.primary-btn:active{transform:translate(2px,2px);box-shadow:2px 2px 0 #812a60}.game-toast{position:absolute;top:22%;left:50%;transform:translateX(-50%);color:#ffe87c;font-size:23px;font-weight:1000;text-shadow:3px 3px #502448,1px 1px 0 #000;letter-spacing:3px;pointer-events:none;opacity:0;white-space:nowrap}.game-toast.show{opacity:1}
.controls{gap:14px;align-items:flex-end;margin-top:15px;padding:3px 8px 0}.control-group{display:flex;flex-direction:column;gap:8px}.control-label{color:#9da5c1;font-size:10px;letter-spacing:1.8px;text-align:center;font-weight:900}.direction-buttons{gap:12px}.touch-btn{border:2px solid #716e96;border-bottom:6px solid #433f65;box-shadow:0 6px 0 #0007;border-radius:17px;background:linear-gradient(165deg,#343855,#1c1f38);touch-action:none;user-select:none;-webkit-user-select:none;display:flex;align-items:center;justify-content:center;font-weight:1000;transition:background 80ms,border-color 80ms,transform 80ms}.touch-btn.pressed,.touch-btn:active{transform:translateY(4px);border-bottom-width:2px;background:linear-gradient(#504d74,#37314f);box-shadow:0 2px 0 #0007}.jump-btn{width:112px;height:91px;flex-direction:column;gap:1px;border-color:#fd9cae;border-bottom-color:#9d355a;color:white;background:linear-gradient(145deg,#f35a94,#a93673);font-size:13px;letter-spacing:1px}.jump-btn.pressed,.jump-btn:active{background:#a93673}.direction-btn{width:96px;height:91px;font-size:41px;color:#d8e4ff}.direction-btn.pressed,.direction-btn:active{color:white}.between-controls{align-self:center;display:flex;flex-direction:column;gap:10px;align-items:center;text-align:center;min-width:0}.between-controls #progressText{font-weight:900;font-size:11px;color:var(--gold);letter-spacing:.8px}.keys-hint{font-size:9px;line-height:1.3;color:#737b99;max-width:190px}.footer{margin-top:19px;font-size:10px;color:#646c8a;gap:8px;line-height:1.4}
@media(max-width:650px){.app-shell{padding:9px 8px calc(8px + env(safe-area-inset-bottom))}.topbar{margin:0 4px 8px}.wordmark{gap:8px}.brand-star{width:33px;height:33px;border-radius:8px;font-size:22px;box-shadow:2px 2px 0 #411d37}.wordmark strong{font-size:13px;letter-spacing:1.3px}.wordmark small{font-size:7px;letter-spacing:1.2px}.header-actions{gap:5px}.icon-btn{min-width:37px;height:34px;font-size:21px;padding:0 7px}.button-caption{font-size:8px}.arcade{border-width:1px;border-radius:9px}.scorebar{padding:7px 9px}.scorebar span{font-size:8px;letter-spacing:.6px}.scorebar strong{font-size:13px;letter-spacing:0}.scorebar .best{display:none}.controls{padding:5px 4px 0;margin-top:13px;gap:5px}.control-label{font-size:9px;letter-spacing:1px}.direction-buttons{gap:7px}.jump-btn{width:86px;height:84px}.jump-btn svg{width:30px;height:30px}.direction-btn{width:76px;height:84px;font-size:34px}.between-controls{max-width:95px}.between-controls #progressText{font-size:9px;line-height:1.35}.keys-hint{display:none}.footer{font-size:8px;text-align:center;display:block}.footer span:last-child{display:none}.overlay-card{padding:12px 14px;width:86%}.eyebrow{font-size:8px;margin-bottom:5px}.overlay-card h1{font-size:clamp(20px,6vw,28px);margin-bottom:6px}.overlay-card p:not(.eyebrow){font-size:10px;line-height:1.3;margin:5px 0}.overlay-card .overlay-hint{font-size:8px!important;margin:8px 0 0}.primary-btn{padding:8px 16px;font-size:12px;margin-top:4px}.game-toast{font-size:15px}}
@media(max-width:370px){.jump-btn{width:76px;height:75px}.direction-btn{width:66px;height:75px}.between-controls{max-width:70px}.control-label{font-size:8px}.overlay-card .overlay-hint{display:none}}
@media(max-height:530px) and (orientation:landscape){.app-shell{max-width:920px;padding:3px 8px calc(3px + env(safe-area-inset-bottom))}.topbar{margin-bottom:3px}.brand-star{width:26px;height:26px;font-size:16px}.wordmark strong{font-size:12px}.wordmark small{display:none}.icon-btn{height:26px;min-width:31px;font-size:17px}.scorebar{padding:4px 9px}.scorebar strong{font-size:11px}.canvas-frame{max-height:calc(100svh - 139px);margin:auto;width:auto;aspect-ratio:8/5}.controls{margin-top:4px;padding:0 4px}.control-label{font-size:8px}.jump-btn{width:91px;height:59px;flex-direction:row;font-size:11px}.jump-btn svg{width:23px;height:23px}.direction-btn{height:59px;width:71px;font-size:26px}.footer{display:none}}
@media(prefers-reduced-motion:reduce){.touch-btn{transition:none}}

/* Version 2: a fresh identity, varied worlds, and a clearer arcade HUD. */
.brand-star{border-color:#67e4af;color:#fbe78a;background:#173a3b;box-shadow:4px 4px 0 #27565b}
.overlay-card{border-color:#a5f0c3;box-shadow:6px 6px 0 #42776d,0 12px 38px #000b}
.overlay-card h1{text-shadow:3px 3px #176f69}
.primary-btn{background:#19a879;box-shadow:4px 4px 0 #135e5b}
.primary-btn:active{box-shadow:2px 2px 0 #135e5b}
.secondary-btn{display:block;margin:11px auto 0;background:transparent;border:1px solid #82b5b0;border-radius:7px;color:#bbf4df;padding:9px 14px;font-size:11px;font-weight:900;letter-spacing:.5px}
.secondary-btn[hidden]{display:none}
.world-strip{padding:5px 13px;display:flex;justify-content:space-between;gap:10px;background:#101c2c;color:#aeeccc;font-size:9px;letter-spacing:1.2px;font-weight:900}
.world-strip span:last-child{color:#788eaa;font-size:8px}
@media(max-width:650px){.world-strip{padding:4px 9px;font-size:8px}.world-strip span:last-child{font-size:7px}.secondary-btn{padding:6px 8px;font-size:9px;margin-top:6px}.brand-star{box-shadow:2px 2px 0 #27565b}}
@media(max-height:530px) and (orientation:landscape){.world-strip{display:none}}
