:root{color-scheme:dark;--bg:#10182b;--panel:#1b2941;--muted:#9db3c8;--accent:#f8d785;--line:#ffffff18}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at top,#233552,#10182b 70%);color:#f4f7fc;font-family:system-ui,-apple-system,sans-serif;min-height:100svh}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit;color:inherit;border:1px solid #ffffff25;border-radius:12px;background:#263850;padding:10px 15px;cursor:pointer;min-height:44px}button:hover{filter:brightness(1.15)}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #a4e9ff;outline-offset:3px}[hidden]{display:none!important}header,main{max-width:1180px;margin:auto}header{padding:16px 24px 12px}.game-tabs{display:flex;gap:6px;margin-bottom:16px}.game-tabs a{color:#a5bbd2;text-decoration:none;padding:8px 15px;border-radius:24px;font-size:13px;border:1px solid transparent}.game-tabs a[aria-current]{color:#ffdfa0;background:#f6c97c14;border-color:#f6c97c44}.brand{display:flex;align-items:center;justify-content:space-between;gap:15px}.eyebrow{color:#91adca;letter-spacing:3px;font-size:11px}.brand h1{margin:4px 0;font-size:28px;letter-spacing:2px}.brand h1 small{font-size:16px;letter-spacing:1px;color:#c8d9eb;font-weight:500}.brand p{font-size:11px;color:var(--muted);margin:6px 0}.brand button{font-size:12px}#home{padding:8px 24px 24px}.hero{height:450px;border-radius:24px;background:linear-gradient(90deg,#0b152ce8,#0b152c99 40%,transparent 75%),url('assets/worlds.png') center 48%/cover;box-shadow:0 25px 80px #0005;overflow:hidden;border:1px solid #fff2;display:flex;align-items:center}.hero-copy{padding:40px;max-width:560px}.pill{font-size:11px;letter-spacing:2px;color:#ffdf9c;border:1px solid #ffdf9c44;border-radius:30px;padding:7px 12px;background:#152035aa}.hero h2{font-size:42px;line-height:1.3;margin:22px 0 16px;letter-spacing:3px}.hero p{line-height:1.9;color:#d5e3ed;font-size:14px}.primary{background:var(--accent);color:#302b28;border-color:var(--accent);font-weight:750;padding:12px 24px;box-shadow:0 8px 30px #0002}.hero button{margin-top:12px}.hero #journey-count{display:block;margin-top:12px;color:#c5d6e6;font-size:12px}.world-section{padding-top:30px}.section-top{display:flex;align-items:baseline;justify-content:space-between;gap:20px}.section-top h2{font-size:20px}.section-top p,.home-note{color:var(--muted);font-size:12px}.home-note{text-align:center;margin:28px 0 0}#worlds{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.world-card{position:relative;overflow:hidden;padding:20px 15px;border-radius:18px;background:linear-gradient(160deg,var(--tint),#1b2941 85%);border:1px solid #ffffff18}.world-card .world-icon{font-size:30px;margin-bottom:18px;display:block}.world-card h3{font-size:16px;margin:0 0 5px}.world-card p{font-size:11px;color:#c4d3e5;line-height:1.6;min-height:36px;margin:6px 0 14px}.level-buttons{display:flex;gap:5px}.level-buttons button{flex:1;padding:7px 0;min-width:0;font-size:12px;background:#101a2d66}.level-buttons button.done{color:#ffe49c;border-color:#ffe49c55}#play{max-width:1120px;padding:6px 20px 20px}.game-bar,.status{display:flex;align-items:center;gap:12px;justify-content:space-between}.game-bar h2{font-size:16px;flex:1;margin:0}.game-bar button,.game-bar label,.game-bar select{font-size:12px}.game-bar select{padding:8px;min-height:38px}.status{padding:12px 0 8px;font-size:13px;flex-wrap:wrap}#hud{color:#ffe2a3;font-weight:650}#mission{color:#b7d0e3;font-size:12px}.status button{font-size:12px;padding:6px 12px;min-height:34px}#notice{font-size:13px;min-height:40px;line-height:1.5;color:#b9e9e5;text-align:center;display:grid;place-items:center;padding:2px 14px}.stage{position:relative;max-width:1000px;margin:auto;border:1px solid #fff2;border-radius:18px;overflow:hidden;background:#0f1c30;box-shadow:0 15px 60px #0004}canvas{display:block;width:100%;height:auto;touch-action:none;outline:none}#result{position:absolute;inset:0;display:grid;place-items:center;background:#071327a8;backdrop-filter:blur(5px)}.result-card{text-align:center;background:linear-gradient(145deg,#2e4563,#17243d);padding:28px 34px;border:1px solid #fff3;border-radius:22px;max-width:90%;box-shadow:0 20px 60px #0006}#result-icon{font-size:40px;color:#ffe4a5}.result-card h2{font-size:24px;margin:8px}.result-card p{color:#c6d9e9;font-size:13px;line-height:1.8}.result-card button{margin:5px;font-size:13px}.tool-row{display:flex;justify-content:center;gap:8px;margin:12px auto;max-width:850px}.tool-row button{display:flex;align-items:center;justify-content:center;gap:12px;flex:1;padding:9px 12px;font-size:13px;min-height:58px;background:#1b2b43}.tool-row button[aria-pressed=true]{border-color:#ffe4a5;background:#ffe4a511;box-shadow:inset 0 0 0 1px #ffe4a533}.tool-row small,.actions small{display:block;font-size:10px;color:#9fb5c9;margin-top:3px}.cube{display:inline-block;flex-shrink:0;width:22px;height:22px;border-radius:5px;transform:rotate(-8deg);border:2px solid #ffffff70;box-shadow:inset -5px -5px 0 #0002}.gold{background:#f7bd5c}.ice{background:#69dffa}.light{background:#b58af6}.seed{background:#8cdfa2}.controls{display:flex;align-items:center;justify-content:space-between;max-width:1000px;margin:auto;gap:20px;padding-bottom:env(safe-area-inset-bottom)}.dpad{display:grid;grid-template-columns:52px 52px;gap:6px}.dpad button{font-size:24px;padding:6px;touch-action:none;user-select:none;min-height:48px}.actions{display:flex;gap:8px;align-items:stretch}.actions button{min-width:70px;min-height:54px;touch-action:none;user-select:none;font-size:14px}#aim[aria-pressed=true]{color:#ffe49c;border-color:#ffe49c}.actions .fire{background:#f5cb7d;color:#352e29;border-color:#f5cb7d;font-weight:750}.actions .fire small{color:#766044}.guide{text-align:center;font-size:11px;color:#8ea6be;line-height:1.8;margin:10px 0 0}.held{filter:brightness(1.4);transform:translateY(1px)}@media(max-width:800px){#worlds{grid-template-columns:repeat(3,1fr)}.hero{height:390px}.hero h2{font-size:34px}.section-top{display:block}.brand h1 small{display:block;margin-top:4px}.game-bar{gap:7px}.game-bar h2{font-size:13px}.game-bar label{font-size:0}.game-bar select{font-size:12px}}@media(max-width:500px){header{padding:10px 14px}.game-tabs{margin-bottom:10px}.brand h1{font-size:24px}.brand h1 small{font-size:12px}.eyebrow{font-size:10px}.brand p{font-size:9px}.brand button{padding:8px 10px}.hero{height:360px;background-position:57% center}.hero-copy{padding:24px}.hero h2{font-size:30px}.hero p{font-size:12px}#home{padding:6px 14px 24px}#worlds{grid-template-columns:repeat(2,1fr)}.world-card:last-child{grid-column:span 2}.world-card:last-child .level-buttons{max-width:180px}#play{padding:4px 8px 12px}.game-bar button{padding:7px 9px;min-height:38px}.game-bar h2{font-size:12px}.game-bar #sound{font-size:0}.game-bar #sound:before{content:'♫';font-size:15px}.status{gap:6px;padding-top:8px}#hud{font-size:12px}#mission{order:3;flex-basis:100%;text-align:center;font-size:11px}#notice{font-size:11px;min-height:36px}.tool-row{gap:4px;margin:8px auto}.tool-row button{padding:6px 3px;gap:5px;font-size:11px;min-height:54px}.tool-row small{font-size:8px}.cube{width:17px;height:17px}.controls{gap:8px}.dpad{grid-template-columns:42px 42px;gap:4px}.dpad button{font-size:21px;min-height:44px}.actions{gap:4px}.actions button{min-width:48px;padding:7px 5px;font-size:11px;min-height:52px}.actions .fire{min-width:68px}.actions small{font-size:9px}.guide{font-size:10px}.stage{border-radius:12px}}@media(max-height:500px) and (min-width:600px){header{padding:5px 18px}.game-tabs{position:absolute;top:8px;left:18px;margin:0;z-index:4}.game-tabs a{padding:5px 10px;font-size:11px}.brand{justify-content:flex-end}.brand>div{display:none}.brand button{padding:5px 10px;min-height:32px}#play{padding:0 12px}.game-bar{height:36px}.status{padding:4px 0}.status button{min-height:28px;padding:3px 9px}#notice{min-height:23px;font-size:11px}.stage{max-width:650px;max-height:calc(100svh - 130px)}canvas{width:auto;max-width:100%;height:calc(100svh - 132px);margin:auto}.tool-row{position:fixed;left:8px;top:115px;flex-direction:column;gap:5px;max-width:78px;margin:0;z-index:3}.tool-row button{padding:7px 5px;font-size:10px;min-height:44px;gap:5px}.tool-row small{display:none}.cube{width:17px;height:17px}.controls{position:fixed;inset:auto 12px 8px;pointer-events:none;z-index:3}.dpad,.actions{pointer-events:auto}.dpad{grid-template-columns:44px 44px;gap:4px}.dpad button{min-height:42px;font-size:22px;background:#253955db}.actions{max-width:110px;flex-wrap:wrap;gap:4px}.actions button{min-height:44px;min-width:50px;padding:5px;font-size:11px;flex:1;background:#263b55e8}.actions .fire{background:#f5cb7dec;min-width:104px;order:-1}.actions small{display:none}.guide{display:none}.hero{height:330px}}

body.expanded header .game-tabs,body.expanded .brand>div{display:none}body.expanded header{padding:4px 12px}body.expanded .brand{justify-content:flex-end}body.expanded #play{padding-top:0}body.expanded #home{max-width:1400px}body.expanded .brand button{min-height:32px;padding:5px 12px}
@media(max-height:500px) and (min-width:600px){.tool-row{display:grid;grid-template-columns:46px 46px;max-width:96px;gap:4px;top:140px}.tool-row button{flex-direction:column;font-size:9px;gap:3px;padding:4px 1px;min-height:49px}.tool-row .cube{width:17px;height:17px}}@media(max-height:350px) and (min-width:600px){.tool-row{top:112px}.tool-row button{min-height:44px}.dpad button{min-height:36px}.dpad{gap:3px}}
@media(max-height:500px) and (min-width:600px){.stage{max-height:calc(100svh - 144px)}canvas{height:calc(100svh - 146px)}}
button{touch-action:manipulation}.dpad button,.actions button{touch-action:none}
