*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:#0a1a3a;font-family:"Trebuchet MS",system-ui,sans-serif;color:#123;touch-action:none;user-select:none;-webkit-user-select:none;overscroll-behavior:none}
canvas{display:block;width:100vw;height:100vh;height:100dvh}
.hide{display:none!important}
#hud{position:fixed;top:max(8px,env(safe-area-inset-top));left:52px;right:8px;display:flex;gap:8px;align-items:flex-start;justify-content:space-between;pointer-events:none;z-index:4}
#hud .left,#hud .right{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#hud .mid{display:flex;flex-direction:column;gap:4px;min-width:140px;flex:1;max-width:280px}
.pill{background:rgba(255,255,255,.92);border-radius:999px;padding:6px 12px;font-weight:900;font-size:20px;box-shadow:0 3px 0 rgba(0,0,0,.2)}
#hTime.low{background:#ff5d5d;color:#fff}
.pill.tip{font-size:14px;background:#fff1c9}
.btn{pointer-events:auto;border:0;cursor:pointer}
.barwrap{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.85);border-radius:999px;padding:4px 8px;box-shadow:0 2px 0 rgba(0,0,0,.15)}
.blabel{font-size:16px;font-weight:900;min-width:1.4em;text-align:center}
.bar{flex:1;height:14px;background:#ddd;border-radius:999px;overflow:hidden;border:2px solid #333}
.bar i{display:block;height:100%;width:100%;transform-origin:left center;transition:transform .08s linear}
.bar.heart i{background:linear-gradient(90deg,#ff6b8a,#ff2d55)}
.bar.fuel i{background:linear-gradient(90deg,#ffd23f,#ff9f1c)}
.tb{position:fixed;top:max(8px,env(safe-area-inset-top));left:8px;z-index:5;font-size:20px;background:#0008;color:#fff;border:2px solid #fff;border-radius:10px;padding:4px 10px;text-decoration:none}
.ov{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(5,20,50,.5);padding:12px;overflow:auto;z-index:6}
.card{background:#fffdf3;border-radius:22px;padding:18px 20px;max-width:540px;width:100%;text-align:center;box-shadow:0 8px 0 rgba(0,0,0,.25);max-height:100%;overflow:auto}
.hero{font-size:48px;line-height:1;margin-bottom:4px}
h1{margin:0;font-size:40px;color:#ff6b2c;text-shadow:3px 3px 0 #ffd23f;letter-spacing:1px}
h2{margin:0;color:#ff6b2c;font-size:30px}
.by{font-weight:800;color:#2a7bd4;margin-bottom:6px}
.how{margin:8px 0;font-size:14px;line-height:1.35}
.story{margin:6px 0;padding:8px 10px;background:#ffe8f0;border-radius:12px;font-size:14px;font-weight:700;color:#a01848;line-height:1.35}
.modes{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:10px}
.big{border:0;border-radius:14px;padding:12px 18px;font-size:18px;font-weight:900;background:#ff6b2c;color:#fff;cursor:pointer;box-shadow:0 4px 0 #b84413;font-family:inherit}
.big.alt{background:#2a7bd4;box-shadow:0 4px 0 #1a4f8a}
.back{display:block;color:#2a7bd4;margin:10px 0 4px;font-weight:800;text-decoration:none}
.final{font-size:52px;font-weight:900;color:#123}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0}
.acard{border:3px solid #2a7bd4;border-radius:16px;background:#eef7ff;padding:10px 6px;cursor:pointer;font-family:inherit;display:flex;flex-direction:column;gap:3px;align-items:center;font-size:12px;box-shadow:0 4px 0 #1a4f8a}
.acard.lock{opacity:.4;cursor:default;filter:grayscale(.6)}
.acard .ai{font-size:30px}.acard b{font-size:14px}.acard small{color:#555;font-weight:800}
small{display:block;opacity:.7;font-size:11px;margin-top:4px}
@media (max-width:420px){.cards{grid-template-columns:1fr}.acard{flex-direction:row;flex-wrap:wrap;justify-content:center}.pill{font-size:16px;padding:5px 10px}h1{font-size:32px}#hud .mid{min-width:110px}}
@media (max-height:500px){h1{font-size:28px}.how{font-size:12px}.card{padding:10px 14px}.final{font-size:36px}.hero{font-size:36px}}

#hTime{min-width:2.4em;text-align:center}
