:root{color-scheme:dark}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#121331;color:#fff6ff;font:14px system-ui,sans-serif}#sky,.shade{position:fixed;inset:0;width:100%;height:100%}.shade{pointer-events:none;box-shadow:inset 0 0 140px #0e143870}button{font:inherit;color:#f3edff;background:#211e46cd;border:1px solid #e6d9ff40;border-radius:12px;padding:11px 15px;cursor:pointer;touch-action:manipulation}button:hover{background:#453c6a}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #ffe1a2;outline-offset:3px}a{color:#fff1dd;text-decoration:none}header{position:fixed;inset:0 0 auto;display:flex;justify-content:space-between;align-items:center;padding:23px 30px;gap:12px;background:linear-gradient(#121532ab,transparent)}header a{font-size:12px;letter-spacing:3px}header a b{color:#ffe09a;font-size:25px}header>div{font:400 25px/1.2 Georgia,serif;letter-spacing:5px}header strong{font-weight:400;color:#c4fcff}header small{display:block;text-align:center;font:7px system-ui;letter-spacing:4px;color:#e3d4f0;margin-top:9px}.hud{position:fixed;top:104px;left:30px;right:30px;display:flex;gap:34px;align-items:start;pointer-events:none}.hud small{font-size:7px;letter-spacing:2px;color:#d1c6e3}.hud b{font-weight:400;display:block;font-size:23px;margin-top:4px;color:#fff0cb}.palette{display:flex;gap:9px;margin-left:auto}.palette div{width:31px;text-align:center;font-size:8px}.palette i{display:block;width:18px;height:18px;border-radius:50%;margin:0 auto 6px;border:1px solid #fff8}.palette span{color:#e9e6fa}aside{position:fixed;top:190px;left:30px;width:270px;border-left:2px solid #eec4ff80;padding:8px 16px;background:linear-gradient(90deg,#19173f99,transparent);pointer-events:none}aside>span{font-size:7px;letter-spacing:2px;color:#e2c7fc}aside h2{font:400 23px/1.2 Georgia,serif}aside p{font-size:11px;line-height:1.6;color:#d8d1ec}.audio{position:fixed;left:30px;bottom:205px;max-width:290px;display:flex;align-items:center;flex-wrap:wrap;gap:10px}.audio button{font-size:11px;padding:8px 12px}.audio input{width:75px;accent-color:#e9b9fb}.audio small{width:100%;font-size:6px;letter-spacing:1.4px;color:#d4c9ef}.bottom{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);display:flex;gap:4px;border:1px solid #e6d2ff38;background:#191936d9;border-radius:16px;padding:6px;backdrop-filter:blur(12px)}.bottom button{background:transparent;border-color:transparent;white-space:nowrap;font-size:11px}.touch{position:fixed;left:30px;right:30px;bottom:95px;display:flex;justify-content:space-between;pointer-events:none}.pad,.powers{pointer-events:auto}.pad{display:grid;grid-template-columns:38px 38px 38px;grid-template-rows:34px 34px 34px;gap:3px}.pad button{padding:0;touch-action:none;user-select:none}.pad button[data-dir=up]{grid-column:2}.pad button[data-dir=left]{grid-column:1;grid-row:2}.pad span{grid-column:2;grid-row:2;display:grid;place-items:center;font-size:7px;letter-spacing:2px}.pad button[data-dir=right]{grid-column:3;grid-row:2}.pad button[data-dir=down]{grid-column:2;grid-row:3}.powers{display:flex;align-items:center;gap:9px}.powers button{width:74px;height:74px;border-radius:50%;font-size:25px;background:linear-gradient(130deg,#9363a05c,#243c6bcc);box-shadow:0 0 28px #e8b8ff21;user-select:none}.powers span{display:block;font-size:8px;letter-spacing:2px;margin-top:3px}#boost{font-size:8px;color:#ffe2b1;touch-action:none}#boost span{font-size:10px}#overlay{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:20px;background:#10133190;backdrop-filter:blur(10px)}#overlay.hidden{display:none}#panel{width:min(760px,100%);max-height:94dvh;overflow:auto;background:radial-gradient(ellipse at 100% 0%,#82659e40,transparent 55%),linear-gradient(135deg,#252442f7,#151c3af9);padding:34px;border:1px solid #e5d6fc55;border-radius:24px;box-shadow:0 30px 140px #06051970}#panel .kicker{font-size:9px;letter-spacing:3px;color:#f5dcae}#panel h1{font:400 clamp(36px,5vw,56px)/1.05 Georgia,serif;margin:20px 0;letter-spacing:-1px}#panel em{font-style:normal;background:linear-gradient(90deg,#ffbdd8,#fff0b5,#b5f7e9,#b7dcff);color:transparent;background-clip:text}#panel h2{font:400 32px/1.2 Georgia,serif;margin:15px 0}#panel p{font-size:12px;line-height:1.8;color:#d0cbe1}#panel b{color:#f1f7ff}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:22px 0}.card{border:1px solid #e0d3ff28;border-radius:12px;padding:15px;background:#151b365c}.card b{display:block;font-size:13px;margin-bottom:9px}.card small{font-size:10px;line-height:1.6;color:#c6c5df}.actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}.actions button{flex:1;min-width:145px;font-size:12px}.primary{background:linear-gradient(110deg,#ffc8e5,#e8d2ff 45%,#b5f4f1);border:0;color:#212844;font-weight:750}details{margin-top:20px;padding-top:17px;border-top:1px solid #d5ceff2b}summary{font-size:12px;cursor:pointer;color:#e5ddfa}.muted{font-size:10px!important;color:#aaaac8!important}.close{float:right;padding:7px 10px}.drawing{background:radial-gradient(ellipse at 50% 50%,#414269,#1b2447);border:1px solid #ccdbff40;border-radius:14px;overflow:hidden;position:relative}.drawing canvas{display:block;width:100%;height:210px;touch-action:none;cursor:crosshair}.drawtools{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}.drawtools button{padding:8px 12px;font-size:11px}.swatches{display:flex;gap:8px;margin:13px 0}.swatches button{width:28px;height:28px;border-radius:50%;padding:0;border:2px solid #fff5}.swatches button.selected{outline:2px solid #ffefc3;outline-offset:3px}.drawstats{display:flex;gap:18px;font-size:11px;color:#d4d9f1;flex-wrap:wrap}.notice{color:#ffdeb3!important}.results{display:flex;gap:30px;margin:25px 0}.results b{display:block;font:34px Georgia,serif}.results small{font-size:8px;letter-spacing:2px;color:#d3c9ee}
@media(max-width:650px){header{padding:16px 15px}header a{font-size:8px;letter-spacing:1px}header a b{font-size:19px}header>div{font-size:18px;letter-spacing:2px}header small{font-size:5px;letter-spacing:2px}header button{padding:8px;font-size:10px}.hud{top:83px;left:15px;right:15px;gap:16px;flex-wrap:wrap}.hud small{font-size:6px;letter-spacing:1px}.hud b{font-size:19px}.palette{gap:7px;position:absolute;top:58px;right:0}.palette div{width:24px;font-size:6px}.palette i{width:12px;height:12px;margin-bottom:4px}aside{top:194px;left:15px;max-width:200px;padding:6px 10px}aside h2{font-size:17px;margin:9px 0}aside p{font-size:9px}.audio{left:15px;bottom:188px;max-width:230px}.audio small{font-size:5px}.audio button{font-size:10px}.audio input{width:60px}.touch{left:15px;right:15px;bottom:76px}.pad{grid-template-columns:33px 33px 33px;grid-template-rows:31px 31px 31px}.powers button{width:61px;height:61px;padding:6px;font-size:22px}.bottom{bottom:12px;width:calc(100% - 20px);justify-content:space-around;gap:0;padding:4px}.bottom button{font-size:9px;padding:10px 6px}#panel{padding:26px 20px}.cards{gap:6px}.card{padding:11px}.card b{font-size:11px}.card small{font-size:9px}#overlay{padding:12px}.drawing canvas{height:180px}.actions button{min-width:130px;font-size:11px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Endless skies: more room for scenery and comfortable mobile controls. */
#sky{touch-action:none}.journey{position:fixed;top:170px;left:30px;display:flex;flex-direction:column;gap:5px;pointer-events:none;text-shadow:0 2px 10px #14132a}.journey>span{font-size:8px;letter-spacing:3px;color:#fce6bc}.journey strong{font:24px/1.2 Georgia,serif;color:#fff4df}.journey small{font-size:10px;letter-spacing:1px;color:#dedaf2}aside{top:265px;max-width:230px}aside h2{font-size:18px;margin:8px 0}aside>span{display:none}button:disabled{opacity:.65;cursor:default}.pad{grid-template-columns:44px 44px 44px;grid-template-rows:44px 44px 44px;gap:3px}.audio{bottom:255px}.touch{bottom:100px}.bottom button{min-height:44px}#explore[aria-pressed=true]{color:#ffe7ab;background:#89709d45}.powers button{min-width:68px;min-height:68px}.bottom{max-width:calc(100% - 24px)}
@media(max-width:650px){
header{padding:12px}.hud{top:80px;gap:18px}.hud small{font-size:8px}.hud b{font-size:20px}.palette{top:53px;gap:8px}.palette div{font-size:8px}.palette i{width:14px;height:14px}.journey{top:176px;left:16px;gap:3px}.journey>span{font-size:7px;letter-spacing:2px}.journey strong{font-size:22px}.journey small{font-size:9px}aside{top:auto;bottom:255px;left:16px;max-width:280px;width:calc(100% - 32px);padding:5px 9px}aside h2{font-size:14px;margin:3px 0}aside p{font-size:10px;margin:3px 0;line-height:1.4}.audio{bottom:211px;left:16px;gap:8px}.audio button{min-height:36px;font-size:11px}.audio input{width:82px}.audio small{display:none}.touch{left:16px;right:16px;bottom:64px}.pad{grid-template-columns:42px 42px 42px;grid-template-rows:42px 42px 42px;gap:3px}.pad button{font-size:17px}.powers{gap:10px}.powers button{width:68px;height:68px}.powers span{font-size:9px}.bottom{bottom:calc(8px + env(safe-area-inset-bottom));border-radius:14px;width:calc(100% - 16px);padding:2px}.bottom button{font-size:9px;padding:8px 4px;white-space:normal;flex:1;line-height:1.3}.bottom button#draw{max-width:72px}header .cai-game-return a{padding:7px!important;min-height:40px!important;font-size:11px!important}header .cai-game-return a:last-child{font-size:10px!important}header>div small{letter-spacing:1px;font-size:5px}header #guide{min-height:40px}#panel p{font-size:13px}.shade{box-shadow:inset 0 0 100px #0e143830}
}
@media(max-height:650px){aside{display:none}.journey{top:155px}.audio{bottom:195px}.touch{bottom:57px}.pad{grid-template-columns:38px 38px 38px;grid-template-rows:38px 38px 38px}}
@media(orientation:landscape) and (max-height:600px){.hud{top:63px;gap:20px}.hud b{font-size:16px}.palette{top:0}.journey{top:118px}.journey strong{font-size:18px}.audio{bottom:160px}.touch{bottom:61px}header{padding:10px 16px}.bottom{bottom:5px}.journey small{font-size:8px}}
