
:root{color-scheme:dark;--glass:rgba(10,20,39,.82);--line:rgba(182,213,253,.19);--cyan:#7de8ed;--gold:#ffc86f;--violet:#a7a8ff;--text:#edf5ff;--muted:#a3b3cc;--red:#ff8e97}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#060b16;color:var(--text);font:500 14px/1.36 system-ui,-apple-system,Segoe UI,sans-serif}button{font:inherit;cursor:pointer}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #c9f5ff;outline-offset:3px}button:disabled{opacity:.42;cursor:not-allowed}
#scene{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}#sky{position:absolute;inset:0;pointer-events:none;overflow:hidden;background:radial-gradient(ellipse at 78% 4%,rgba(51,69,110,.2),transparent 38%);z-index:1}#hud{position:absolute;inset:0;pointer-events:none;z-index:3}#hud>*{pointer-events:auto}
.panel{background:var(--glass);border:1px solid var(--line);border-radius:17px;box-shadow:0 12px 36px rgba(0,0,0,.23);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px)}
#top{position:absolute;left:18px;top:17px;right:18px;display:flex;gap:12px;align-items:flex-start;justify-content:space-between}#brand{padding:12px 17px;min-width:290px}#brand .eyebrow{font-size:10px;letter-spacing:.22em;font-weight:800;color:#87cadc}#brand h1{font-size:24px;font-weight:900;line-height:1.05;letter-spacing:.025em;margin:3px 0 5px}#levelName{font-size:12px;color:#bfcee0}#topRight{display:flex;gap:10px;align-items:flex-start}
#lives{padding:10px 14px;min-height:62px}#lives .lbl{color:var(--muted);text-transform:uppercase;letter-spacing:.12em;font-size:10px}#lifeIcons{font-size:18px;letter-spacing:3px;color:#ff9b9f;line-height:23px;white-space:nowrap}#starsTop{font-size:12px;color:var(--gold)}
.iconBtn{background:rgba(19,37,60,.9);border:1px solid var(--line);color:#ecf7ff;min-height:45px;min-width:45px;border-radius:13px;font-size:20px;transition:background .2s,transform .2s}.iconBtn:hover{background:rgba(42,75,100,.95);transform:translateY(-1px)}
#stats{position:absolute;top:106px;left:18px;width:278px;padding:13px 14px 9px}#statsHead{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}#statsHead span:first-child{font-size:11px;font-weight:800;letter-spacing:.1em;color:#c5d9ee;text-transform:uppercase}#statsHead span:last-child{font-size:10px;color:#94b4cf}
.stat{display:flex;align-items:center;gap:9px;width:100%;padding:7px 5px;border:0;border-radius:9px;text-align:left;background:transparent;color:inherit}.stat:hover{background:#ffffff0c}.statIcon{width:27px;font-size:19px;text-align:center}.statMain{flex:1;min-width:0}.statRow{display:flex;justify-content:space-between;font-size:12px;gap:5px}.statRow small{font-size:11px;color:#c8d4e7}.meter{margin-top:4px;height:6px;border-radius:12px;background:#26374f;overflow:hidden}.meter>span{display:block;height:100%;border-radius:12px;transition:width .22s ease;background:#78dadd}.stat.warning .meter>span{background:#ffc35c}.stat.critical .meter>span{background:#ff7489}.stat.warning .statRow small{color:#ffd08b}.stat.critical .statRow small{color:#ffb3bc}
#warning{display:none;position:absolute;top:415px;left:18px;width:278px;padding:10px 13px;border:1px solid #e5a94777;background:#42301eeb;color:#ffdfad;border-radius:12px;font-size:12px;box-shadow:0 12px 26px #0006}
#quests{position:absolute;left:18px;top:465px;width:278px;padding:13px 14px}.sectiontitle{font-weight:850;letter-spacing:.08em;font-size:11px;color:#b7dafa;text-transform:uppercase;display:flex;justify-content:space-between;align-items:center}.quest{display:flex;align-items:center;gap:9px;color:#cedbed;font-size:12px;margin-top:10px}.quest .check{height:19px;width:19px;border-radius:6px;display:flex;align-items:center;justify-content:center;background:#2a3b55;border:1px solid #607392;font-size:12px;flex:none}.quest.done .check{background:#174a4c;border-color:#56d5b9;color:#82f3d5}.quest.done{color:#8fcebc}#progress{margin-top:12px;font-size:10px;color:#a5b9d1}
#guide{position:absolute;left:50%;transform:translateX(-50%);bottom:17px;width:min(600px,calc(100% - 320px));min-height:74px;display:flex;align-items:center;gap:12px;padding:12px 15px}.guideAvatar{height:47px;min-width:47px;border-radius:14px;background:linear-gradient(150deg,#e4f7ff,#93bdd6);display:flex;align-items:center;justify-content:center;font-size:28px;border:2px solid #bce6f4}.guidecopy strong{display:block;color:#b4f6ef;font-size:11px;letter-spacing:.07em}.guidecopy div{font-size:13px;color:#e8f1ff;margin-top:2px}#guideVoice{margin-left:auto;font-size:18px;border-radius:10px;padding:8px;color:#d9e7ff;background:#32445e;border:1px solid #55708b}
#actions{position:absolute;right:18px;bottom:18px;width:190px;display:grid;gap:8px}#actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:47px;border:1px solid rgba(183,221,255,.3);border-radius:14px;background:linear-gradient(180deg,#25415b,#1a2e48);font-weight:800;color:#eef8ff;box-shadow:0 9px 21px #0004}#actions button:hover{background:linear-gradient(180deg,#396786,#254460)}#actions .primary{background:linear-gradient(125deg,#54d9ce,#2e8cb6);color:#061e31;border-color:#85fff4}#actions .primary:hover{background:linear-gradient(125deg,#94fff2,#4fc2db)}#actions .key{font-size:10px;padding:3px 5px;border:1px solid #b7d6e288;border-radius:5px;color:#cfe0e9;margin-left:auto}
#mapWrap{position:absolute;right:18px;top:101px;width:198px;padding:9px;cursor:pointer}#mapWrap .sectiontitle{margin:0 2px 8px}#miniMap{width:178px;height:178px;border-radius:10px;display:block;background:#091425}#mapLabel{font-size:10px;color:var(--muted);text-align:center;margin-top:5px}
#joystick{position:absolute;left:39px;bottom:26px;width:142px;height:142px;border-radius:50%;border:3px solid #9cb8d45f;background:radial-gradient(circle,#3c567658,#162d4d7e);box-shadow:inset 0 0 25px #93ccea19,0 5px 20px #0004;touch-action:none;display:flex;align-items:center;justify-content:center;user-select:none}#joystick:before{content:"";position:absolute;inset:19px;border:1px dashed #a6c3da44;border-radius:50%}#stick{height:64px;width:64px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#d0f7ff,#4d8fb3 73%,#286080);border:3px solid #b8efff;box-shadow:0 6px 19px #0006;display:flex;align-items:center;justify-content:center;color:#173d56;font-size:23px;pointer-events:none;transition:transform .02s}#moveHint{position:absolute;left:37px;bottom:177px;font-size:11px;color:#bbcee5;text-shadow:0 2px 5px #000}
#tip{position:absolute;bottom:198px;right:18px;background:#10243bc7;border:1px solid var(--line);padding:8px 11px;border-radius:10px;font-size:11px;color:#bad6ec}#notice{position:absolute;left:50%;top:17%;transform:translateX(-50%);padding:12px 20px;background:#152d42ed;border:1px solid #8bedee77;border-radius:13px;font-weight:800;color:#d3ffff;font-size:15px;opacity:0;pointer-events:none;transition:opacity .25s;max-width:min(590px,80%);text-align:center}#notice.show{opacity:1}
#modals{position:absolute;inset:0;z-index:6;display:none;align-items:center;justify-content:center;background:#040b19ba;backdrop-filter:blur(8px);padding:16px}#modals.open{display:flex}.dialog{width:min(760px,100%);max-height:min(90vh,760px);overflow:auto;border:1px solid #a6def85a;border-radius:24px;background:linear-gradient(160deg,#1b3049,#0d1728 66%);box-shadow:0 25px 110px #000a;padding:24px;position:relative}.dialog h2{font-size:27px;margin:4px 0 9px;line-height:1.15}.dialog p{color:#c2d3e6;font-size:14px}.close{position:absolute;right:14px;top:13px;background:#203853;border:1px solid #ffffff20;color:white;border-radius:11px;height:37px;width:37px;font-size:21px}.btn{border:1px solid #8fe9ed55;background:#244b66;color:#f1feff;border-radius:12px;padding:12px 18px;font-weight:850;min-height:45px}.btn:hover{filter:brightness(1.2)}.btn.primary{background:linear-gradient(120deg,#72f0d9,#6bb8ec);color:#072238;border:0}.btn.ghost{background:#203147}.btn.danger{background:#6b3440}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.tile{background:#14283c;border:1px solid #ffffff18;border-radius:14px;padding:13px}.statChip{display:inline-flex;gap:6px;align-items:center;padding:7px 9px;border-radius:8px;background:#1b3a50;border:1px solid #ffffff15;font-size:12px}
#craftGrid{display:grid;grid-template-columns:1fr 85px 1fr;gap:14px;align-items:center;margin:14px 0}#ingredientBank,#craftSlot{min-height:155px;border:2px dashed #7fa8ca66;border-radius:15px;padding:13px;background:#09203c55}#craftSlot.ready{border-color:#74dfbc;background:#123e394a}.ingredient{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 12px;border-radius:10px;border:1px solid #7dbeeb55;background:#224361;color:white;font-weight:700;margin:4px;min-height:42px;touch-action:manipulation}.ingredient:hover{background:#345e7e}.recipeArrow{text-align:center;font-size:40px;color:#8cf2e8}.craftReaction{height:87px;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;background:radial-gradient(ellipse,#27718455,transparent 70%);border-radius:15px;margin-top:12px}.core{font-size:47px;animation:float 2s ease-in-out infinite}.spark{position:absolute;color:#96eefe;animation:orbit 2s linear infinite}.spark:nth-child(2){animation-delay:-.65s}.spark:nth-child(3){animation-delay:-1.3s}@keyframes orbit{from{transform:rotate(0deg) translateX(70px) rotate(0deg)}to{transform:rotate(360deg) translateX(70px) rotate(-360deg)}}@keyframes float{50%{transform:translateY(-7px)}}
#landing{position:absolute;inset:0;z-index:8;display:none;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,#203954,#070f1f);text-align:center;pointer-events:none}#landing.play{display:flex;animation:landingFade 3s ease both}#lander{font-size:90px;animation:descend 2.4s cubic-bezier(.15,.68,.26,1.01) both;filter:drop-shadow(0 10px 25px #70deff77)}#landingCaption{font-size:24px;font-weight:900;margin-top:15px;letter-spacing:.1em}#landingSub{color:#bcdef4;margin-top:7px}@keyframes descend{0%{transform:translateY(-190px) scale(.45);opacity:0}65%{transform:translateY(5px) scale(1);opacity:1}100%{transform:translateY(0) scale(1)}}@keyframes landingFade{0%{opacity:0}10%,85%{opacity:1}100%{opacity:0}}
#screenMessage{display:none}#bigMap{height:auto;aspect-ratio:780/530;width:100%;background:#071522;border-radius:16px;border:1px solid #638ba6;display:block}
.footer{font-size:11px;color:#9cb0c6;margin-top:13px}#soundToggle,#motionToggle{font-size:12px;white-space:nowrap}
@media(max-width:1000px){#stats{width:237px}#quests{width:237px}#warning{width:237px}#mapWrap{width:160px}#miniMap{width:140px;height:140px}#guide{width:min(520px,calc(100% - 260px))}#actions{width:162px}#brand{min-width:220px}}
@media(max-width:690px){#top{left:8px;right:8px;top:8px;gap:5px}#brand{min-width:0;flex:1;padding:9px 10px}#brand h1{font-size:18px}#brand .eyebrow{font-size:8px}#levelName{font-size:10px}#topRight{gap:5px}#lives{padding:7px;min-height:0}#lifeIcons{font-size:13px;letter-spacing:0}#lives .lbl{font-size:8px}#starsTop{font-size:9px}#topRight .iconBtn{min-width:35px;min-height:38px;font-size:17px}#stats{top:86px;left:8px;width:194px;padding:7px 8px}#statsHead{margin-bottom:3px}.stat{padding:4px 2px;gap:5px}.statIcon{font-size:14px;width:19px}.statRow{font-size:10px}.statRow small{font-size:9px}.meter{margin-top:3px;height:5px}#mapWrap{top:86px;right:8px;width:117px;padding:6px}#miniMap{height:103px;width:103px}#mapLabel{display:none}#mapWrap .sectiontitle{font-size:9px;margin-bottom:3px}#quests{left:8px;top:310px;width:194px;padding:8px}#quests .sectiontitle{font-size:10px}.quest{font-size:10px;margin-top:6px}.quest .check{height:15px;width:15px}#progress{font-size:9px;margin-top:8px}#warning{top:270px;left:8px;width:194px;padding:6px;font-size:10px}#joystick{left:15px;bottom:12px;width:112px;height:112px}#stick{height:52px;width:52px}#moveHint{left:13px;bottom:130px;font-size:10px}#actions{right:8px;bottom:14px;width:125px;gap:6px}#actions button{font-size:11px;min-height:42px;padding:3px 5px}#actions .key{display:none}#guide{left:50%;bottom:9px;width:calc(100% - 16px);left:8px;transform:none;bottom:157px;padding:9px;min-height:64px;gap:8px}.guideAvatar{display:none}.guidecopy strong{font-size:9px}.guidecopy div{font-size:10px}#guideVoice{padding:5px;font-size:13px}#tip{display:none}.dialog{padding:17px}.dialog h2{font-size:22px}#craftGrid{grid-template-columns:1fr;gap:5px}#ingredientBank,#craftSlot{min-height:70px}.recipeArrow{transform:rotate(90deg);font-size:22px}#notice{font-size:11px;top:22%}}
@media(max-height:620px){#quests{display:none}#stats{top:86px}#guide{bottom:9px;min-height:56px}#joystick{bottom:9px}#actions{bottom:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition-duration:.001ms!important}}

