
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#0b211e;color:#f4f3d9;font-family:ui-sans-serif,system-ui,sans-serif}canvas{width:100%;height:100%;display:block}#overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:linear-gradient(90deg,#081c1eee,#12382acf);padding:24px;text-align:center}.eyebrow{font-size:11px;letter-spacing:5px;color:#afc8a4}h1{font-size:clamp(45px,7vw,90px);line-height:.9;letter-spacing:-4px;margin:23px 0 12px;font-weight:950}h1 em{font-style:normal;color:#d9ef86;letter-spacing:8px}.subtitle{color:#b4c7b9;font-size:14px}.cards{display:flex;gap:16px;margin:22px 0 12px;width:min(730px,95vw)}article{background:#163931c9;border:1px solid #63847555;text-align:left;border-radius:12px;padding:20px;flex:1}h2{font-size:21px;margin:12px 0 5px}article p{font-size:13px;color:#aac0b0}.badge{font-size:10px;letter-spacing:2px;font-weight:800}.storm{color:#8ee1ff}.life{color:#c4f284}.status{font-size:11px;color:#edca88;margin:15px 0 10px}small{font-size:11px;line-height:1.9;color:#b3cbbb}.controller{font-size:12px;line-height:2;color:#aac0b0}button{border:0;border-radius:7px;background:#d6ed91;color:#142e27;padding:18px 26px;font-size:12px;font-weight:900;letter-spacing:2px;cursor:pointer}button:hover{background:#eeffc2}button span{margin-left:40px}.foot{font-size:10px;color:#8aa393;letter-spacing:1px}#hud{position:absolute;inset:20px 25px auto;pointer-events:none;display:flex;justify-content:space-between;gap:20px}.panel{background:#0a241fdf;border:1px solid #78957650;border-radius:9px;padding:12px 16px;min-width:205px}.panel b{font-size:11px;letter-spacing:2px}.hearts{font-size:21px;color:#f3bf8d;letter-spacing:3px}.hint{font-size:10px;color:#b6c9b3;margin-top:6px}.objective{text-align:center;color:#d9efad;font-size:12px;letter-spacing:1px;max-width:400px}.objective strong{display:block;font-size:16px;margin-bottom:7px}#toast{position:absolute;bottom:38px;left:50%;transform:translateX(-50%);background:#102c25eb;border:1px solid #b6d48480;border-radius:7px;padding:13px 24px;text-align:center;font-size:13px;max-width:80%;pointer-events:none;opacity:0;transition:opacity .2s}#toast.show{opacity:1}@media(max-height:720px){h1{font-size:48px;margin:12px}.cards{margin:10px}article{padding:12px}.controller{margin:6px}.foot{margin:8px}.subtitle{margin:5px}}
/* v0.2: information occupies reserved screen bands, never the playfield. */
#hud{inset:0 0 auto;height:78px;padding:9px 18px;align-items:center;justify-content:flex-start;background:#0b211e;border-bottom:1px solid #74936a44;gap:24px}
.panel{min-width:0;padding:0;border:0;background:none;border-radius:0;white-space:nowrap}
.panel b{font-size:11px;letter-spacing:1.5px}.hearts{margin-left:15px;font-size:22px;letter-spacing:2px}.hint{font-size:9px;margin-top:5px}.session-hint{margin-left:auto;text-align:right;font-size:10px;line-height:1.8;color:#a8c3ad}
#objective{position:absolute;bottom:0;left:0;right:0;height:78px;padding:15px 18px;background:#0b211e;pointer-events:none;border-top:1px solid #74936a44;text-align:center;display:flex;flex-direction:column;justify-content:center;gap:7px}
#objective:empty,#hud:empty{display:none}#objective strong{font-size:11px;letter-spacing:2px;color:#d9edab}#objective span{font-size:12px;color:#b9ccb0}#toast{display:none}
.mode-picker{display:flex;gap:8px;margin:10px 0 0}.mode-picker button{padding:12px 25px;background:#24483b;color:#aac3b0;border:1px solid #72926d55;font-size:11px}.mode-picker button[aria-pressed=true]{background:#d6ed91;color:#142e27;border-color:#d6ed91}#modehelp{font-size:12px;color:#c4d7b9;margin:10px 0 0}.cards{margin-top:14px}.secondary{background:transparent;border:1px solid #76937c;color:#cfdbbe;margin-top:15px;font-size:10px}#overlay{overflow:auto}.foot{line-height:1.5}
@media(max-width:760px){#hud{gap:12px;padding:8px 12px}.session-hint{font-size:8px}.panel b{font-size:9px}.hearts{font-size:18px;margin-left:8px}.hint{font-size:8px}#objective span{font-size:11px}}

.chapter-links{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.chapter-links button{padding:12px 18px;margin-top:10px}#overlay{justify-content:flex-start}#overlay>:first-child{margin-top:auto}#overlay>:last-child{margin-bottom:auto}#overlay>*{flex-shrink:0}

.story-title{font-size:clamp(32px,5vw,64px);line-height:1.05;max-width:800px}.chapter-links{max-width:760px}.chapter-links button{font-size:9px;letter-spacing:1px;padding:10px 12px}#overlay>p{max-width:760px;line-height:1.6}

/* Inventory fits inside the reserved HUD band, including co-op. */
.panel{flex:1;max-width:43%}.hint{white-space:normal;line-height:1.3;max-width:360px}.session-hint{flex-shrink:0;max-width:24%}@media(max-width:760px){.session-hint{max-width:19%;font-size:7px}.hint{font-size:8px}}

/* Shared native-button focus for controllers, keyboard and mouse. */
button.menu-focus,button:focus-visible{outline:4px solid #fff6bb;outline-offset:4px;box-shadow:0 0 0 8px #071f21;background:#e8ffb4;color:#142e27}
button:disabled{opacity:.55;cursor:default;background:#163931;color:#c4d6bd}
.menu-prompts{color:#e4edba;font-size:14px;line-height:1.8}
#level-summary{font-size:16px;font-weight:700;color:#e9f5c2;max-width:750px;margin:16px 0}
#start{min-width:min(540px,90vw);font-size:16px;letter-spacing:1px}
.chapter-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(850px,94vw);max-width:850px;gap:14px;margin-top:22px}
.chapter-links .level-card{display:flex;align-items:flex-start;gap:10px;text-align:left;background:#1c4538;color:#e9f2d1;border:2px solid #72926d;padding:14px;margin:0;font-size:13px;letter-spacing:0;line-height:1.4}
.chapter-links .level-card[aria-pressed=true]{border-color:#d6ed91;background:#345b3b}
.chapter-links .level-card.menu-focus{background:#e8ffb4;color:#142e27}
.level-card span{margin:0}.level-number{display:grid;place-items:center;border:2px solid currentColor;border-radius:50%;font-size:22px;min-width:36px;height:36px}
.level-copy{display:flex;flex-direction:column;gap:6px}.level-copy small{font-size:10px;line-height:1.3;color:inherit;letter-spacing:1px}.level-copy strong{font-size:17px;line-height:1.2}.level-description{font-size:12px;font-weight:500}.level-state{font-size:11px;letter-spacing:1px;color:inherit}
.lock-help{font-size:12px;color:#c4d6bd}.cards{margin:14px 0 0}.cards article{padding:12px}.cards article h2{font-size:18px;margin:6px 0}.cards article p{margin:5px 0}.cards .status{margin:8px 0}.controller{font-size:13px}
@media(max-width:700px){.chapter-links{grid-template-columns:repeat(2,minmax(0,1fr))}#overlay{padding:22px 16px}.chapter-links .level-card{padding:10px;gap:8px}.level-number{min-width:28px;height:28px;font-size:18px}.level-copy strong{font-size:15px}#start{font-size:14px}}
@media(max-width:400px){.chapter-links{grid-template-columns:1fr}.cards{flex-direction:column}}
#overlay>h1{font-size:clamp(36px,5vw,58px);margin:16px 0 8px}
.chapter-links .level-card:disabled{background:#142e29;border-color:#536c5a;color:#b8c9b5;opacity:.8}
