* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: #02090d; color: #d9f4f7;
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }
.card { position: absolute; background: rgba(4, 22, 30, .78); border: 1px solid #16485a; border-radius: 12px; padding: 10px 12px; backdrop-filter: blur(4px); }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8fb6bf; margin-bottom: 4px; }
.row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.row img { width: 20px; height: 20px; vertical-align: -5px; }
#o2-card { top: 12px; left: 12px; width: 260px; }
#o2-text { font-size: 20px; font-variant-numeric: tabular-nums; }
#o2-bar { height: 14px; background: #02090d; border-radius: 7px; overflow: hidden; }
#o2-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #2ec4b6, #7df9ff); }
#o2-card.low { border-color: #ff6b6b; animation: alarm .6s ease-in-out infinite alternate; }
#o2-card.low #o2-fill { background: linear-gradient(90deg, #e63946, #ff9f43); }
@keyframes alarm { to { box-shadow: 0 0 18px #e63946; } }
#goal-card { top: 96px; left: 12px; width: 260px; }
#objective { font-weight: 600; margin-bottom: 8px; }
#inventory { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
#inventory li { width: 40px; height: 40px; border-radius: 9px; background: #02090d; display: grid; place-items: center; opacity: .35; }
#inventory li img { width: 28px; height: 28px; }
#inventory li.have { opacity: 1; outline: 2px solid #2ec4b6; }
#inventory li.used { opacity: .8; outline: 2px solid #ffd166; }
#map-card { top: 12px; right: 12px; }
#minimap { display: block; width: 250px; height: 125px; }
#where { color: #7df9ff; }
#toast { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); max-width: 44vw; text-align: center;
  background: rgba(4, 22, 30, .88); border: 1px solid #2ec4b6; border-radius: 999px; padding: 8px 18px; font-weight: 600;
  opacity: 0; transition: opacity .25s; }
#toast.show { opacity: 1; }
#toast.bad { border-color: #ff6b6b; color: #ffc9c9; }
#help { position: absolute; left: 12px; bottom: 12px; color: #a9cdd4; font-size: 12.5px; background: rgba(4, 22, 30, .7); padding: 6px 10px; border-radius: 9px; }
button { font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 9px; padding: 5px 12px; background: #16485a; color: #d9f4f7; pointer-events: auto; }
#overlay { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; background: rgba(2, 12, 18, .8); padding: 24px; }
#overlay[hidden] { display: none; }
#overlay img { width: 130px; height: 130px; }
#overlay h1 { margin: 0; font-size: 44px; color: #7df9ff; }
#overlay.won h1 { color: #ffd166; }
#overlay.lost h1 { color: #ff6b6b; }
#overlay p { margin: 0 0 8px; max-width: 520px; font-size: 16px; color: #cfeef2; }
#overlay button { background: #ffd166; color: #1b2a33; padding: 12px 30px; font-size: 16px; }
@media (max-width: 720px) { #map-card { display: none; } #toast { top: auto; bottom: 52px; max-width: 90vw; } }
