:root{color-scheme:dark;--bg:#09120e;--surface:#111e17;--text:#eef3e9;--muted:#94a496;--line:rgba(203,227,200,.13);--accent:#c0ee88;--accent-dark:#1a3018;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;font-size:16px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;border:0;background:none;-webkit-touch-callout:none}button:disabled{cursor:default}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button,input{-webkit-tap-highlight-color:transparent}button{touch-action:manipulation}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}img{max-width:100%;display:block}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.app-shell{max-width:1440px;margin:auto;padding:0 52px}.topbar{height:104px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:12px;text-align:left;font-size:19px;font-weight:800;letter-spacing:2px;padding:0}.brand-icon{width:42px;height:48px;display:grid;place-items:center;color:var(--accent)}.brand-icon svg{width:38px;height:38px;stroke-width:1.8}.brand-light{font-weight:350;margin-left:5px}.brand small{display:block;font-size:9px;letter-spacing:3px;color:var(--muted);margin-top:7px}.desktop-nav{display:flex;gap:38px;align-items:center;height:100%}.nav-link{color:var(--muted);font-size:14px;padding:14px 0;position:relative}.nav-link:hover,.nav-link.active{color:var(--text)}.nav-link.active:after{content:"";position:absolute;bottom:1px;width:18px;height:2px;background:var(--accent);left:calc(50% - 9px)}.header-actions{display:flex;gap:24px;align-items:center}.header-best{display:flex;align-items:center;gap:9px;color:#d5c191;font-size:14px}.header-best svg{width:18px}.icon-button{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:rgba(20,33,24,.55)}.icon-button:hover{background:#203423}.hero{min-height:550px;height:min(560px,54vw);position:relative;isolation:isolate;border-radius:16px;overflow:hidden;border:1px solid rgba(211,238,194,.12)}.hero-image{width:100%;height:100%;position:absolute;object-fit:cover;object-position:center 52%;z-index:-3;animation:hero-breathe 24s ease-in-out infinite alternate}.hero-shade{position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,rgba(3,13,7,.91) 0,rgba(3,13,7,.68) 26%,rgba(3,13,7,.12) 64%),linear-gradient(0deg,rgba(3,13,7,.9),transparent 26%)}.hero-copy{padding:66px 52px 80px;max-width:600px}.eyebrow{font-size:11px;letter-spacing:2.2px;color:var(--accent);font-weight:600;display:flex;align-items:center;gap:12px;line-height:1.5}.line{height:1px;width:25px;background:var(--accent)}h1{font-size:clamp(38px,4.4vw,66px);line-height:1.07;letter-spacing:-2.8px;font-weight:500;margin:24px 0}h1 em{font-family:Georgia,"Times New Roman",serif;color:var(--accent);font-weight:400;letter-spacing:-2px}p{line-height:1.65;color:var(--muted)}.hero-copy p{font-size:16px;line-height:1.65;color:#c1cbbd;margin:0 0 28px}.hero-buttons{display:flex;gap:18px;align-items:center}.primary-button{display:flex;align-items:center;justify-content:center;gap:10px;background:var(--accent);color:#172713;padding:17px 24px;border-radius:8px;font-size:15px;min-height:52px;font-weight:700;box-shadow:0 5px 24px #a9df5720;transition:background .2s,transform .2s}.primary-button:hover{background:#d4ffa6;transform:translateY(-1px)}.primary-button svg{width:18px;fill:currentColor;stroke-width:0}.text-button{font-size:14px;display:flex;gap:8px;align-items:center;color:#c6cfbe;padding:12px 0;white-space:nowrap}.text-button svg{width:17px}.continue-note{color:#91a38c;font-size:9px;letter-spacing:1.4px;margin-top:17px}.hero-location{position:absolute;right:38px;bottom:91px;display:flex;gap:13px;align-items:center}.hero-location small{display:block;color:#b8c9b1;font-size:9px;letter-spacing:1.5px;margin-bottom:6px}.hero-location strong{font-family:Georgia,serif;font-weight:400;font-size:22px}.hero-location svg{width:34px;height:34px;color:#b4d496;margin-left:5px}.location-line{height:38px;width:1px;background:#99ba70}.hero-bottom{position:absolute;bottom:0;left:38px;right:38px;height:58px;border-top:1px solid #b3cc9e30;display:flex;justify-content:space-between;align-items:center;font-size:9px;letter-spacing:1.8px;color:#a2b39b}.hero-chapter{color:var(--accent);font-size:16px}.hero-chapter span{font-size:9px;color:#b0beaa}.hero-motes{position:absolute;inset:0;pointer-events:none;z-index:-1}.hero-motes i{position:absolute;width:3px;height:3px;box-shadow:0 0 14px 3px #d5f97870;background:#e3ffa2;border-radius:50%;left:60%;top:43%;animation:drift 8s ease-in-out infinite alternate}.hero-motes i:nth-child(2){left:75%;top:18%;animation-delay:-2s}.hero-motes i:nth-child(3){left:48%;top:69%;animation-delay:-4s}.hero-motes i:nth-child(4){left:92%;top:61%;animation-delay:-6s}.hero-motes i:nth-child(5){left:81%;top:80%;animation-delay:-8s}.hero-motes i:nth-child(6){left:31%;top:22%;animation-delay:-1s}.hero-motes i:nth-child(7){left:54%;top:14%;animation-delay:-3s}.journey-strip{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;align-items:center;gap:24px;padding:30px 20px;border-bottom:1px solid var(--line)}.journey-strip>div:not(:first-child){border-left:1px solid var(--line);padding-left:35px}.journey-strip strong{display:block;font-size:27px;font-weight:500;letter-spacing:-.7px}.journey-strip strong span{font-size:15px;letter-spacing:0;color:#758b77;margin-left:5px}.journey-strip small{display:block;font-size:9px;letter-spacing:1.5px;margin-top:9px;color:#99a796}.strip-intro{display:flex;align-items:center;gap:14px}.strip-intro svg{width:36px;height:36px;color:#a8bf96}.strip-intro span{font-size:12px;color:#95a28d}.strip-intro strong{font-family:Georgia,serif;font-size:20px;color:var(--text);margin-top:5px;letter-spacing:0}.worlds-section{padding:40px 0 24px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:23px}.section-heading .eyebrow{font-size:9px;color:#8a9f81;letter-spacing:1.5px}h2{font-family:Georgia,serif;font-size:30px;font-weight:400;letter-spacing:-.5px;margin:10px 0 0}.subtle-button{border:1px solid var(--line);border-radius:7px;min-height:42px;padding:11px 16px;display:flex;gap:12px;align-items:center;justify-content:center;color:#c6d0c1;font-size:13px;white-space:nowrap;background:#ffffff03}.subtle-button:hover{background:#d4f6b511}.subtle-button svg{width:16px;height:16px}.world-cards{display:grid;grid-template-columns:repeat(6,1fr);gap:13px}.world-card{padding:0;text-align:left;position:relative;height:172px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#19261b;isolation:isolate;transition:transform .25s,border-color .25s}.world-card:hover{transform:translateY(-4px);border-color:#b5dd8b80}.world-card img{position:absolute;width:100%;height:100%;object-fit:cover;z-index:-2;transition:transform .6s;opacity:.72}.world-card:hover img{transform:scale(1.08)}.world-card:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#031009eb,transparent 100%);z-index:-1}.world-card.locked img{opacity:.4}.world-number{position:absolute;left:13px;top:13px;font-size:11px;color:#dae7d4;letter-spacing:1px}.world-lock{position:absolute;right:12px;top:12px;width:16px;height:16px;color:#b2beac}.world-card-copy{position:absolute;left:13px;right:10px;bottom:17px}.world-card-copy strong{font-family:Georgia,serif;display:block;font-weight:400;font-size:19px}.world-card-copy small{display:block;font-size:10px;margin-top:7px;letter-spacing:.4px;color:#a3b09c}.world-card.active{border-color:#b9e47c87}.world-card.active .world-card-copy small{color:var(--accent)}.endless-banner{display:flex;gap:18px;align-items:center;border:1px solid var(--line);padding:22px;border-radius:10px;margin:10px 0 24px;background:linear-gradient(100deg,#1c2b1b55,#0c1710)}.endless-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;border:1px solid #b5d39925;color:#b9d7a1}.endless-icon svg{width:27px}.endless-banner strong{font-size:15px;font-weight:500}.endless-banner p{font-size:13px;margin:5px 0 0}.endless-banner .subtle-button{margin-left:auto}footer{display:flex;align-items:center;justify-content:space-between;color:#6f826c;font-size:10px;gap:20px;padding:10px 0 34px}footer button{font-size:12px;color:#b8c4ad}.footer-note{letter-spacing:1.2px;font-size:9px}.mobile-nav{display:none}
.panel{width:min(590px,calc(100% - 32px));padding:24px 28px 28px;border:1px solid #b4cb9c30;border-radius:20px;background:#101d16;color:var(--text);box-shadow:0 35px 150px #000a;max-height:88dvh;overflow-y:auto;overscroll-behavior:contain}.panel::backdrop{background:#020b07bc;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}.panel-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}.panel-top .eyebrow{font-size:10px;color:#9fb091}.panel .icon-button{width:36px;height:36px}.panel h2{font-size:33px;margin:4px 0 15px}.panel p{font-size:15px}.panel .primary-button{width:100%;margin-top:20px}.world-tabs{display:flex;gap:7px;overflow-x:auto;padding:4px 0 14px;scrollbar-width:none}.world-tab{min-width:64px;height:58px;border-radius:8px;border:1px solid #ffffff26;background-size:cover;position:relative;font-size:12px;text-shadow:0 1px 5px #000;color:white}.world-tab.selected{outline:2px solid var(--accent);outline-offset:1px}.map-preview{height:110px;background-size:cover;background-position:center 65%;border-radius:10px;margin:0 0 20px;padding:18px;display:flex;flex-direction:column;justify-content:end;border:1px solid var(--line)}.map-preview small{font-size:11px;letter-spacing:1px;color:#c6d8c0}.map-preview h3{font-family:Georgia,serif;font-size:25px;font-weight:400;margin:6px 0}.level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:20px}.level-button{height:79px;background:#1b2b20;border:1px solid var(--line);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;font-size:20px}.level-button[disabled]{color:#647563;background:#122118}.level-button.current{border-color:var(--accent);background:#253d24;color:var(--accent)}.level-button small{font-size:11px;letter-spacing:2px;color:#bce07d}.level-button svg{width:15px;height:15px;color:#768772}.map-info{padding:16px 0 0;display:flex;align-items:center;justify-content:space-between;color:#a3b49b;font-size:12px}.score-overview{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;padding:18px 0 26px}.score-overview div{background:#192b1c;border-radius:10px;padding:15px 10px;text-align:center}.score-overview strong{display:block;font-size:25px;font-weight:500;color:var(--accent)}.score-overview small{font-size:11px;color:#a0b395;display:block;margin-top:5px}.score-list{display:grid;gap:8px}.score-row{display:flex;align-items:center;gap:13px;border-bottom:1px solid var(--line);padding:13px 0}.score-row>span{width:25px;color:#869d7b;font-size:13px}.score-row div{flex:1}.score-row strong{font-size:14px;font-weight:500}.score-row small{display:block;color:#8c9e84;margin-top:4px;font-size:12px}.score-row b{font-size:20px;font-weight:500;color:#d7e9c5}.empty-state{border:1px dashed #99b78d40;border-radius:12px;text-align:center;padding:30px 20px}.empty-state svg{color:var(--accent);width:35px;height:35px;margin-bottom:7px}.toggle-row{display:flex;justify-content:space-between;align-items:center;padding:18px 0;border-bottom:1px solid var(--line);gap:20px}.toggle-row strong{font-size:16px;font-weight:500;display:block}.toggle-row small{display:block;font-size:12px;color:#90a487;margin-top:5px}.toggle{width:48px;min-width:48px;height:28px;border-radius:20px;background:#344236;position:relative}.toggle:after{content:"";width:20px;height:20px;background:#eff7e9;border-radius:50%;position:absolute;top:4px;left:4px;transition:transform .2s}.toggle[aria-checked="true"]{background:#89b75b}.toggle[aria-checked="true"]:after{transform:translateX(20px)}.settings-bottom{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}.help-step{display:flex;gap:14px;padding:14px 0}.help-step>span{color:var(--accent);border:1px solid var(--line);width:34px;height:34px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;font-family:Georgia,serif}.help-step strong{font-size:16px;font-weight:500}.help-step p{font-size:14px;margin:4px 0}.bonus-guide{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.bonus-guide>div{border:1px solid var(--line);padding:13px;border-radius:8px;font-size:13px;line-height:1.6;color:#b5c3ac}.bonus-guide strong{display:block;color:#e0ecd5}.fine-print{font-size:12px!important;color:#8a9b81!important;margin-top:18px}.result{text-align:center}.result-icon{width:70px;height:70px;display:grid;place-items:center;border:1px solid #b7d98f50;border-radius:50%;margin:5px auto 23px;background:#b0dc7412;color:var(--accent)}.result-icon svg{width:32px;height:32px}.result-stars{color:var(--accent);font-size:30px;letter-spacing:7px;margin:15px 0}.result-score{font-size:56px;font-weight:400;letter-spacing:-2px;margin:15px 0 0}.result-caption{font-size:11px;letter-spacing:2px;color:#96ac8c;margin:4px 0 23px}.result-details{display:flex;justify-content:center;gap:30px;border-top:1px solid var(--line);padding:20px 0 5px;font-size:13px;color:#a6ba9c}.result .subtle-button{width:100%;margin-top:10px}.global-toast{position:fixed;z-index:20;bottom:calc(25px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#243922;border:1px solid #92c27366;padding:14px 20px;border-radius:10px;max-width:calc(100% - 40px);width:max-content;font-size:14px;transition:.25s}.global-toast.visible{opacity:1;transform:translate(-50%,0)}
.playing .topbar,.playing .mobile-nav{display:none}.playing .app-shell{padding:0 16px}.game-screen{width:min(100%,470px);margin:0 auto;height:100dvh;padding:calc(12px + env(safe-area-inset-top)) 0 calc(8px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:stretch;user-select:none;-webkit-user-select:none;touch-action:none;overscroll-behavior:none}.game-topline{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.game-level{text-align:center}.game-level small{font-size:10px;color:#a3b992;letter-spacing:1.8px;display:block}.game-level strong{display:block;font-family:Georgia,serif;font-weight:400;font-size:24px;margin-top:3px}.game-topline .icon-button{width:40px;height:40px}.game-hud{display:flex;align-items:center;justify-content:space-between;padding:14px 7px 11px;flex-shrink:0}.game-hud small{font-size:9px;letter-spacing:1.4px;color:#8ca67e;display:block}.game-hud strong{font-size:26px;font-weight:500;margin-top:2px;display:block}.food-target{display:flex;gap:9px;align-items:center;background:#24332087;border-radius:50px;padding:7px 14px}.food-target img{object-fit:contain;width:23px;height:23px}.food-target strong{font-size:15px;margin:0}.hud-right{text-align:right}.hud-right strong{color:#d8dfa2}.progress-track{height:3px;background:#2e3c29;margin:0 4px 10px;border-radius:5px;overflow:hidden;flex-shrink:0}.progress-track span{display:block;background:var(--accent);height:100%;width:0;transition:width .2s}.board-wrap{position:relative;margin:0 auto;min-height:0;flex:1;max-height:650px;aspect-ratio:18/22;max-width:100%;border:1px solid #bbd49a4d;border-radius:13px;overflow:hidden;box-shadow:0 12px 70px #0007;background:#132416;isolation:isolate}#gameCanvas{display:block;width:100%;height:100%;touch-action:none;outline:none}.game-status{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#99af8b;padding:10px 2px;min-height:32px;flex-shrink:0}#comboStatus{color:var(--accent);font-weight:700;white-space:nowrap}.game-controls{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:108px}.control-hint{width:120px;text-align:center;line-height:1.5}.control-hint strong{font-size:11px;font-weight:500;display:block;color:#b8c7ac}.control-hint small{font-size:10px;color:#788e6c;display:block}.gesture-icon{font-size:32px;color:#c1d9ad;display:block;line-height:1}.dpad{display:grid;grid-template-columns:44px 44px 44px;grid-template-rows:36px 36px 36px;gap:3px}.dpad button{border:1px solid #a5c08d29;border-radius:9px;background:linear-gradient(#293d24,#1a2b17);display:grid;place-items:center;color:#c9dfb4}.dpad button:active{background:#56723c}.dpad-up{grid-column:2}.dpad-up svg{transform:rotate(-90deg)}.dpad-left{grid-column:1;grid-row:2}.dpad-left svg{transform:rotate(180deg)}.dpad-center{grid-column:2;grid-row:2;align-self:center;justify-self:center;width:5px;height:5px;background:#6b845a;border-radius:50%}.dpad-right{grid-column:3;grid-row:2}.dpad-down{grid-column:2;grid-row:3}.dpad-down svg{transform:rotate(90deg)}.game-toast{position:absolute;top:22%;left:10%;right:10%;text-align:center;padding:12px 8px;color:#e3ffd3;font-size:19px;font-weight:600;text-shadow:0 2px 8px black;opacity:0;transition:.2s;pointer-events:none}.game-toast.visible{opacity:1;transform:translateY(-5px)}.countdown{position:absolute;inset:0;display:grid;place-items:center;background:#00170855;color:#eaffcc;font-family:Georgia,serif;font-size:100px;text-shadow:0 0 30px #9cee6c66;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
@keyframes drift{from{transform:translate(0,12px);opacity:.15}50%{opacity:.9}to{transform:translate(25px,-25px);opacity:.3}}@keyframes hero-breathe{from{transform:scale(1)}to{transform:scale(1.045)}}
.reduced-motion *, .reduced-motion *:before,.reduced-motion *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important;transition:none!important}}
@media(min-width:1500px){.app-shell{padding:0 64px}.hero{height:590px;max-height:none}}
@media(max-width:1050px){.app-shell{padding:0 28px}.hero-copy{padding:60px 32px}.hero{height:535px;min-height:535px}.hero-buttons{flex-direction:column;align-items:start;gap:6px}.hero-location{right:25px;bottom:85px}.world-cards{grid-template-columns:repeat(3,1fr)}.world-card{height:150px}.journey-strip{gap:15px;padding:24px 10px}.journey-strip>div:not(:first-child){padding-left:24px}.journey-strip strong{font-size:24px}.strip-intro strong{font-size:18px}}
@media(max-width:650px){.app-shell{padding:0 18px}.topbar{height:calc(82px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);gap:12px}.brand{font-size:16px;letter-spacing:1.6px;gap:6px}.brand-icon{width:32px}.brand-icon svg{width:29px;height:29px}.brand small{font-size:7px;letter-spacing:2.4px;margin-top:5px}.desktop-nav{display:none}.header-actions{gap:12px}.header-best{font-size:12px;gap:6px}.header-best svg{width:16px}.header-actions .icon-button{width:36px;height:36px}.hero{height:610px;min-height:0;border-radius:13px}.hero-image{object-position:66% center;object-fit:cover}.hero-shade{background:linear-gradient(180deg,#031009cc 0,#03100975 27%,#03100900 48%,#03100928 60%,#031009f5 88%)}.hero-copy{padding:30px 24px;max-width:none}.eyebrow{font-size:9px;letter-spacing:1.6px;gap:8px}.line{width:18px}h1{font-size:43px;letter-spacing:-2px;line-height:1.1;margin:18px 0 15px}h1 em{letter-spacing:-1.5px}.hero-copy p{font-size:14px;line-height:1.6;color:#c7d1c2;margin:0}.hero-buttons{position:absolute;bottom:80px;left:24px;right:24px;align-items:center;gap:8px;flex-direction:row}.hero-buttons .primary-button{width:100%;font-size:14px;padding:15px 16px}.hero-buttons .text-button{position:absolute;bottom:-43px;font-size:12px;justify-content:center;width:100%;padding:8px}.hero-buttons .text-button svg{width:15px}.continue-note{position:absolute;left:24px;right:24px;bottom:141px;text-align:center;font-size:8px;letter-spacing:1.1px;margin:0}.hero-location{display:none}.hero-bottom{left:24px;right:24px;height:29px;font-size:7px;letter-spacing:1px;border-top:0;bottom:0;color:#788d70}.hero-chapter{font-size:12px}.hero-chapter span{font-size:7px}.hero-motes i{width:2px;height:2px}.journey-strip{grid-template-columns:repeat(3,1fr);gap:0;padding:24px 0}.journey-strip .strip-intro{display:none}.journey-strip>div:not(:first-child){padding:0 9px;text-align:center;border:0}.journey-strip>div:nth-child(n+3){border-left:1px solid var(--line)}.journey-strip strong{font-size:24px}.journey-strip strong span{font-size:12px;margin-left:2px}.journey-strip small{font-size:7px;letter-spacing:.9px;margin-top:7px}.worlds-section{padding-top:27px}.section-heading{align-items:center;gap:10px;margin-bottom:17px}.section-heading h2{font-size:24px;letter-spacing:-.5px}.section-heading .eyebrow{font-size:7px;letter-spacing:.9px}.section-heading .subtle-button{font-size:10px;white-space:normal;width:75px;padding:9px;gap:6px}.section-heading .subtle-button svg{display:none}.world-cards{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -18px;padding:2px 18px 8px;scrollbar-width:none}.world-card{flex:0 0 145px;height:164px;scroll-snap-align:start}.world-card-copy strong{font-size:19px}.world-card-copy small{font-size:10px}.endless-banner{padding:16px;gap:12px;flex-wrap:wrap;margin-top:0}.endless-icon{width:34px;height:34px;flex-shrink:0}.endless-icon svg{width:22px}.endless-banner>div{flex:1}.endless-banner strong{font-size:14px}.endless-banner p{font-size:12px;margin-top:4px}.endless-banner .subtle-button{width:100%;margin-top:4px}footer{padding:3px 0 calc(100px + env(safe-area-inset-bottom));font-size:9px}.footer-note{display:none}footer button{font-size:11px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:4;justify-content:space-around;background:#0b160ff5;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-top:1px solid #a1c48425;padding:10px 12px calc(9px + env(safe-area-inset-bottom))}.mobile-nav button{display:flex;flex-direction:column;align-items:center;gap:5px;color:#829779;width:30%;padding:0;min-height:43px}.mobile-nav button.active{color:var(--accent)}.mobile-nav svg{width:22px;height:22px}.mobile-nav span{font-size:10px}.panel{padding:20px;width:calc(100% - 24px);border-radius:18px;max-height:calc(94dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.panel h2{font-size:29px}.level-grid{gap:7px}.level-button{height:69px;font-size:19px}.world-tab{min-width:58px}.global-toast{bottom:calc(86px + env(safe-area-inset-bottom))}.playing .global-toast{bottom:calc(20px + env(safe-area-inset-bottom))}.playing .app-shell{padding:0 13px}.game-screen{padding-top:calc(8px + env(safe-area-inset-top))}.game-controls{min-height:112px}.control-hint{width:100px}.keyboard-hint{width:82px}.game-hud{padding-top:10px}.game-hud strong{font-size:24px}.food-target strong{font-size:15px}.board-wrap{border-radius:10px}.game-status{font-size:10px}.game-topline .icon-button{width:37px;height:37px}}
@media(max-height:740px){.game-controls{min-height:90px}.dpad{grid-template-rows:28px 28px 28px;grid-template-columns:42px 42px 42px;gap:2px}.game-hud{padding:6px 7px}.game-status{padding:5px 2px;min-height:25px}.game-level strong{font-size:21px}.game-hud strong{font-size:21px}.food-target strong{font-size:14px}}
@media(max-height:500px) and (orientation:landscape){.game-screen{width:100%;max-width:760px;display:grid;grid-template-columns:135px minmax(0,1fr) 145px;grid-template-rows:auto auto auto;gap:8px;height:100dvh;padding:8px 0}.game-topline{grid-column:1;grid-row:1;flex-wrap:wrap;justify-content:center;gap:10px}.game-level{order:-1;width:100%}.game-hud{grid-column:1;grid-row:2;flex-direction:column;gap:8px}.game-hud>div{text-align:center}.progress-track{grid-column:1;grid-row:3}.board-wrap{grid-column:2;grid-row:1/4;height:100%;width:auto;max-width:100%;aspect-ratio:18/22}.game-status{grid-column:3;grid-row:1;flex-direction:column;text-align:center;justify-content:center}.game-controls{grid-column:3;grid-row:2/4;flex-direction:column;justify-content:center}.keyboard-hint{display:none}.control-hint{margin-bottom:10px}.game-hud strong{font-size:20px}}
/* Readable mobile controls and comfortable touch targets. */
.game-level small,.game-hud small{font-size:12px;letter-spacing:1px}
.game-status{font-size:12px;line-height:1.4}
.control-hint strong,.control-hint small{font-size:12px}
.dpad{grid-template-columns:44px 44px 44px;grid-template-rows:44px 44px 44px}
.game-controls{min-height:138px}
.game-topline .icon-button,.header-actions .icon-button,.panel .icon-button{width:44px;height:44px}
.panel p{font-size:16px}.help-step p{font-size:16px}.fine-print{font-size:13px!important}
.subtle-button,.text-button{font-size:14px}.world-tab{font-size:14px}.toggle-row small{font-size:14px}
.game-screen .board-wrap{flex:0 1 auto;width:min(100%,calc((100dvh - 320px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 18 / 22));height:auto;aspect-ratio:18/22}
@media(max-width:650px){
  .hero-copy p{font-size:16px}.hero-buttons .text-button{font-size:14px}
  .continue-note{font-size:10px;letter-spacing:.5px}.hero .eyebrow{font-size:11px}
  .journey-strip small{font-size:10px;letter-spacing:.3px}.world-card-copy small{font-size:12px}
  .section-heading .eyebrow{font-size:10px;letter-spacing:.4px}
  .section-heading .subtle-button{font-size:13px;width:88px}
  .mobile-nav span{font-size:12px}.endless-banner p{font-size:14px}
  footer,footer button{font-size:12px}
  .control-hint{width:90px}.keyboard-hint{display:none}.game-controls{justify-content:space-around}
  .game-status{flex-wrap:wrap}.game-level small{font-size:11px}
}
@media(max-height:500px) and (orientation:landscape){.game-screen .board-wrap{width:auto;height:100%;max-height:100%}.game-controls{min-height:0}.dpad{grid-template-columns:44px 44px 44px;grid-template-rows:44px 44px 44px}}
@media(max-width:650px){.hero-image{object-position:88% center}}
@media(max-width:360px){.hero{height:545px}.hero-copy{padding:25px 20px}.hero-copy h1{font-size:38px}.hero-copy p{font-size:15px}.hero-buttons{left:20px;right:20px}.continue-note{left:14px;right:14px;font-size:9px}}

/* Wild Snake 1.1: immersive, swipe-only play on phones. */
@media (max-width:650px) and (orientation:portrait){
  body.playing{overflow:hidden}
  .playing .app-shell{padding:0 6px;max-width:none}
  .playing .game-screen{
    width:100%;max-width:none;height:100dvh;min-height:0;
    padding:calc(env(safe-area-inset-top) + 4px) 0 calc(env(safe-area-inset-bottom) + 4px);
    display:flex;flex-direction:column;gap:0
  }
  .playing .game-topline{flex:0 0 auto;min-height:44px;padding:0 6px}
  .playing .game-hud{flex:0 0 auto;padding:5px 10px}
  .playing .progress-track{flex:0 0 auto}
  .playing .game-screen .board-wrap{
    flex:1 1 auto;width:100%;height:auto;min-height:0;max-height:none;
    aspect-ratio:auto;margin:4px auto 0;border-radius:9px
  }
  .playing .game-status{flex:0 0 auto;min-height:22px;padding:3px 8px;font-size:10px}
  .playing .game-controls{display:none!important}
}
@media (min-width:651px){.game-controls{display:none!important}}

/* 1.1.1: CSS Grid guarantees the playfield consumes remaining viewport height on iOS. */
@media (max-width:650px) and (orientation:portrait){
  body.playing .game-screen{
    display:grid!important;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto auto minmax(0,1fr) auto;
    align-content:stretch;
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  body.playing .game-topline{grid-column:1;grid-row:1}
  body.playing .game-hud{grid-column:1;grid-row:2}
  body.playing .progress-track{grid-column:1;grid-row:3}
  body.playing .game-screen .board-wrap{
    grid-column:1;grid-row:4;
    display:block;
    position:relative;
    min-height:0!important;
    height:100%!important;
    max-height:none!important;
    width:100%!important;
    max-width:none!important;
    margin:4px 0 0!important;
    flex:none!important;
    aspect-ratio:auto!important;
  }
  body.playing #gameCanvas{
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
  }
  body.playing .game-status{grid-column:1;grid-row:5}
}

/* Wild Snake 1.2 — immersive gameplay fills iPhone and iPad, in both orientations.
   Menus retain their responsive maximum widths; ONLY the active game is full-bleed. */
body.playing{
  width:100%;height:100vh;height:100dvh;
  margin:0;overflow:hidden;overscroll-behavior:none;
}
body.playing .app-shell{
  width:100%;max-width:none;height:100vh;height:100dvh;
  margin:0;padding:0!important;
}
body.playing .game-screen{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto 3px minmax(0,1fr)!important;
  align-content:stretch;align-items:stretch;gap:0;
  width:100%;max-width:none;min-width:0;
  height:100vh;height:100dvh;min-height:0;
  margin:0;padding:env(safe-area-inset-top) 0 0;
  overflow:hidden;box-sizing:border-box;
}
body.playing .game-topline{
  grid-column:1;grid-row:1;
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;
  gap:8px;min-height:44px;
  padding:3px clamp(10px,2.2vw,28px);
}
body.playing .game-level{order:0;width:auto;text-align:center}
body.playing .game-hud{
  grid-column:1;grid-row:2;
  display:flex;flex-direction:row;align-items:center;justify-content:space-between;
  gap:8px;padding:4px clamp(10px,2.2vw,28px) 8px;
}
body.playing .game-hud>div:first-child{text-align:left}
body.playing .game-hud .hud-right{text-align:right}
body.playing .progress-track{
  grid-column:1;grid-row:3;
  width:100%;height:3px;margin:0;border-radius:0;
}
body.playing .game-screen .board-wrap{
  grid-column:1;grid-row:4;
  position:relative;display:block;
  width:100%!important;height:100%!important;
  min-width:0;min-height:0!important;
  max-width:none!important;max-height:none!important;
  margin:0!important;flex:none!important;
  aspect-ratio:auto!important;
  border:0;border-radius:0;box-shadow:none;
  overflow:hidden;touch-action:none;
}
body.playing #gameCanvas{
  position:absolute;inset:0;display:block;
  width:100%;height:100%;touch-action:none;
}
body.playing .game-status,
body.playing .game-controls{display:none!important}
@media (orientation:landscape){
  body.playing .game-topline{min-height:40px;padding-top:1px;padding-bottom:1px}
  body.playing .game-hud{padding-top:2px;padding-bottom:5px}
  body.playing .game-level small{font-size:10px}
  body.playing .game-level strong{font-size:20px;margin-top:0}
}

/* Wild Snake 1.2.1: iOS safe-area clearance and crisp top HUD.
   Keep the full-width canvas and swipe controls untouched. */
body.playing .game-screen{
  padding-top:calc(env(safe-area-inset-top, 0px) + 14px);
}
body.playing .game-topline{
  min-height:48px;
  padding-top:6px;
  padding-bottom:5px;
  background:#09120e;
  isolation:isolate;
}
body.playing .game-hud{
  padding-top:7px;
  padding-bottom:10px;
  background:#09120e;
}
body.playing .game-level small{
  color:#c9ddba;
  font-size:11px;
  font-weight:700;
  letter-spacing:1.25px;
  opacity:1;
  filter:none;
  text-shadow:none;
  -webkit-font-smoothing:antialiased;
}
body.playing .game-level strong{
  color:#f3f8ed;
  font-weight:500;
  line-height:1.2;
  text-shadow:none;
}
body.playing .game-hud small{
  color:#bdd4ad;
  opacity:1;
  text-shadow:none;
}
@media (orientation:landscape){
  body.playing .game-screen{
    padding-top:calc(env(safe-area-inset-top, 0px) + 8px);
  }
  body.playing .game-topline{min-height:44px;padding-top:3px;padding-bottom:3px}
  body.playing .game-hud{padding-top:4px;padding-bottom:7px}
}

/* Wild Snake cinematic intro: visible on launch and while each world loads.
   Portrait art stays uncropped; the same scene blurs across empty side space on iPad. */
.splash-screen{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;background:#07150d;overflow:hidden;isolation:isolate;opacity:1;visibility:visible;transition:opacity .35s ease,visibility .35s ease}
.splash-screen::before{content:"";position:absolute;inset:-36px;z-index:-2;background:#07150d url("./assets/loading.avif") center/cover no-repeat;filter:blur(28px) brightness(.55);transform:scale(1.08)}
.splash-screen::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#07130a60,transparent 18%,transparent 82%,#07130a60)}
.splash-image{display:block;position:relative;z-index:1;width:100%;height:100%;object-fit:contain;object-position:center;filter:none;animation:splash-arrive .8s ease-out both}
.splash-screen.is-hiding{opacity:0;visibility:hidden;pointer-events:none}
@keyframes splash-arrive{from{opacity:.45}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.splash-image{animation:none}.splash-screen{transition:none}}

/* iPadOS safe status area: no blur or overlap with the playing HUD. */
@media (min-width:651px){
  html.ipad-device body.playing .game-screen{padding-top:max(44px,calc(env(safe-area-inset-top,0px) + 24px))!important}
  html.ipad-device body.playing .game-topline,html.ipad-device body.playing .game-hud{background:#09120e!important;filter:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;opacity:1!important;text-shadow:none!important}
}
@media (min-width:651px) and (orientation:landscape){
  html.ipad-device body.playing .game-screen{padding-top:max(30px,calc(env(safe-area-inset-top,0px) + 14px))!important}
}
body.playing .game-screen .board-wrap .shield-badge{position:absolute;z-index:3;left:12px;top:14px;display:inline-flex;align-items:center;gap:5px;border:1px solid #dcaaff8c;border-radius:999px;padding:7px 10px;background:#21112edb;color:#f1d9ff;font-size:12px;font-weight:800;letter-spacing:1px;box-shadow:0 2px 14px #5c268f45;pointer-events:none}
body.playing .game-screen .board-wrap .shield-badge[hidden]{display:none!important}
