:root{--night:#071a29;--navy:#0b2d3d;--teal:#28b686;--mint:#9cf0bc;--gold:#ffd458;--cream:#fff4d5;--danger:#ec6b68}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{width:100%;height:100%;margin:0;overflow:hidden;background:var(--night);font-family:Nunito,system-ui,sans-serif;color:#fff;user-select:none}
button,a{font:inherit}.maze-shell{position:relative;width:100%;height:100%;min-height:430px;overflow:hidden;isolation:isolate;background:radial-gradient(circle at 50% 45%,#16495a,#071a29 72%)}
[hidden]{display:none!important}#mazeCanvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}
.maze-topbar{position:absolute;z-index:10;top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:flex;align-items:center;gap:7px;pointer-events:none}
.maze-back,.maze-icon-btn{pointer-events:auto;width:44px;height:44px;border:2px solid #ffffff50;border-radius:15px;background:#08283de6;color:#fff;display:grid;place-items:center;text-decoration:none;font-size:26px;font-weight:900;box-shadow:0 8px 24px #00101d80;backdrop-filter:blur(10px)}
.maze-icon-btn{font-size:17px}.maze-brand{display:flex;flex-direction:column;line-height:.85;text-shadow:0 3px #00151f}.maze-brand small{font-size:8px;letter-spacing:.24em;color:#9cf0bc}.maze-brand b{font:900 20px/1.1 system-ui;color:#ffd458}
.maze-stat{min-width:70px;padding:5px 10px;border:1px solid #ffffff35;border-radius:14px;background:#0b2d3de8;text-align:center;box-shadow:0 8px 20px #00101d60;backdrop-filter:blur(9px)}.maze-stat small{display:block;font-size:8px;text-transform:uppercase;letter-spacing:.1em;color:#9ec7c5}.maze-stat b{font-size:15px;color:#fff4d5}
.maze-lives{margin-left:auto;padding:8px 11px;border-radius:13px;background:#0b2d3de8;color:#ff8c85;letter-spacing:2px;text-shadow:0 0 10px #ec6b68}
.maze-objective{position:absolute;z-index:8;left:max(14px,env(safe-area-inset-left));top:70px;width:min(285px,42vw);display:grid;grid-template-columns:42px 1fr;gap:8px;padding:8px 10px;border:1px solid #ffffff35;border-radius:18px;background:#08283de8;box-shadow:0 10px 28px #00101d70;backdrop-filter:blur(10px)}.maze-objective>span{grid-row:1/3;width:40px;height:40px;border-radius:14px;background:#ffffff12;display:grid;place-items:center;font-size:24px}.maze-objective small{display:block;font-size:8px;letter-spacing:.15em;color:#9cf0bc}.maze-objective b{display:block;font-size:13px;color:#fff4d5}.maze-progress{grid-column:2;height:6px;border-radius:8px;background:#ffffff16;overflow:hidden}.maze-progress i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2ac78e,#ffd458);transition:width .2s}
.maze-power{position:absolute;z-index:9;top:72px;right:max(14px,env(safe-area-inset-right));padding:7px 11px;border:2px solid #ffe179;border-radius:16px;background:#7f542ce8;color:#fff4c2;box-shadow:0 0 22px #ffd45855}.maze-power span{font-size:20px}.maze-power b{font-size:10px;margin:0 7px}.maze-power i{display:block;height:4px;margin-top:3px;border-radius:8px;background:#ffd458}
.maze-controls{position:absolute;z-index:11;left:50%;bottom:max(8px,env(safe-area-inset-bottom));transform:translateX(-50%);text-align:center;pointer-events:none}.maze-dpad{display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,42px);gap:4px;place-items:center;pointer-events:auto}.maze-dpad button{width:46px;height:42px;border:2px solid #ffffff50;border-bottom:5px solid #001925;border-radius:14px;background:#0c4055df;color:#fff;font-size:15px;font-weight:900;box-shadow:0 5px 15px #00101d70;touch-action:manipulation}.maze-dpad button:active,.maze-dpad button.active{transform:translateY(3px);border-bottom-width:2px;background:#2cae80}.maze-dpad button[data-dir=up]{grid-column:2}.maze-dpad button[data-dir=left]{grid-row:2;grid-column:1}.maze-dpad i{grid-row:2;grid-column:2;color:#ffd458;font-style:normal}.maze-dpad button[data-dir=right]{grid-row:2;grid-column:3}.maze-dpad button[data-dir=down]{grid-row:3;grid-column:2}.maze-controls p{margin:2px 0 0;font-size:9px;color:#b8d6d2;text-shadow:0 2px #00151f}
.maze-toast{position:absolute;z-index:30;left:50%;top:43%;transform:translate(-50%,-20%) scale(.9);max-width:min(400px,85vw);padding:10px 16px;border:2px solid #ffffff55;border-radius:16px;background:#071e2def;color:#fff;text-align:center;font-weight:800;opacity:0;pointer-events:none;transition:.2s}.maze-toast.show{opacity:1;transform:translate(-50%,-50%) scale(1)}
.maze-screen{position:absolute;z-index:40;inset:0;display:flex;align-items:center;justify-content:center;padding:max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom));background:radial-gradient(circle at 50% 25%,#176450e8,#061724f5);overflow:auto}
.maze-panel{position:relative;width:min(650px,100%);padding:28px;border:2px solid #ffffff75;border-radius:30px;background:linear-gradient(145deg,#fff9eaf5,#e6f3dff2);color:#153b37;text-align:center;box-shadow:0 28px 90px #00101da0,inset 0 1px #fff;overflow:hidden}.maze-panel:before{content:'✦';position:absolute;right:-16px;top:-43px;font-size:150px;color:#e6b744;opacity:.12}.maze-panel--small{max-width:470px}.maze-kicker{position:relative;font-size:10px;font-weight:900;letter-spacing:.19em;color:#28755d}.maze-panel h1,.maze-panel h2{position:relative;margin:5px 0 8px;font:900 clamp(38px,7vw,64px)/.9 system-ui;color:#123e38;letter-spacing:-.06em}.maze-panel h1 em{font-style:normal;color:#d68d22}.maze-panel h2{font-size:35px}.maze-panel p{position:relative;max-width:550px;margin:8px auto 14px;color:#55716a;font-size:14px;line-height:1.45}
.maze-how{position:relative;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 0}.maze-how span{padding:10px 6px;border:1px solid #d5d8bd;border-radius:16px;background:#fff9}.maze-how i,.maze-how b,.maze-how small{display:block}.maze-how i{font-style:normal;font-size:27px}.maze-how b{font-size:12px}.maze-how small{font-size:9px;color:#71867e}
.maze-modes{position:relative;display:flex;gap:7px;justify-content:center}.maze-modes button{flex:1;max-width:155px;padding:8px 6px;border:2px solid transparent;border-radius:14px;background:#dae8dd;color:#365c52}.maze-modes button.selected{border-color:#31956e;background:#ccebd6;box-shadow:0 0 0 3px #46a77a22}.maze-modes b,.maze-modes small{display:block}.maze-modes b{font-size:12px}.maze-modes small{font-size:8px}
.maze-primary,.maze-secondary{position:relative;display:block;width:min(330px,100%);margin:14px auto 7px;padding:13px 18px;border:0;border-radius:16px;font-weight:900;letter-spacing:.04em}.maze-primary{background:linear-gradient(135deg,#f3b83f,#df762e);color:#fff;box-shadow:0 6px 0 #984819}.maze-primary:active{transform:translateY(4px);box-shadow:0 2px 0 #984819}.maze-secondary{background:#d7e5db;color:#285b4c}.maze-best{color:#698078}.maze-result-icon{display:block;font-size:48px}.maze-recap{display:flex;justify-content:center;gap:8px}.maze-recap span{min-width:88px;padding:7px 10px;border-radius:13px;background:#fff}.maze-recap small,.maze-recap b{display:block}.maze-recap small{font-size:8px;text-transform:uppercase;color:#718279}
@media(max-width:720px){.maze-brand{display:none}.maze-topbar{gap:4px}.maze-stat{min-width:52px;padding:5px}.maze-stat small{font-size:7px}.maze-stat b{font-size:12px}.maze-lives{padding:7px 5px;font-size:12px}.maze-objective{top:64px;width:min(260px,62vw)}.maze-controls{left:auto;right:max(10px,env(safe-area-inset-right));transform:none}.maze-controls p{display:none}.maze-dpad{grid-template-columns:repeat(3,42px);grid-template-rows:repeat(3,38px)}.maze-dpad button{width:42px;height:38px}.maze-panel{padding:20px}.maze-panel h1{font-size:42px}}
@media(max-height:650px) and (orientation:landscape){.maze-objective{top:62px}.maze-controls{left:auto;right:10px;bottom:8px;transform:none}.maze-dpad{grid-template-columns:repeat(3,39px);grid-template-rows:repeat(3,35px)}.maze-dpad button{width:39px;height:35px}.maze-panel{max-width:700px;padding:15px 22px}.maze-panel h1{font-size:40px}.maze-how{margin:8px 0}.maze-how span{padding:5px}.maze-best{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
