:root { --o: #FF8A00; --ink: #f4ede4; --bg: rgba(18, 14, 11, .62); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0a08; color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
video { display: none; }
.hidden { display: none !important; }

#hud { position: fixed; top: 16px; left: 16px; width: 270px; padding: 14px 16px; border-radius: 16px;
  background: var(--bg); backdrop-filter: blur(8px); font-size: 13px; }
.title { font-weight: 800; font-size: 18px; margin-bottom: 10px; }
.title span { font-weight: 400; opacity: .6; font-size: 12px; }
.gauge { display: grid; grid-template-columns: 82px 1fr 52px; align-items: center; gap: 8px; margin: 6px 0; }
.gauge label { opacity: .75; }
.gauge b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--o); transition: width .1s, background .3s; }
#gAir { background: #7fd7ff; }
#status { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.07); font-weight: 700; min-height: 36px; }
#status.warn { background: rgba(255, 70, 40, .35); }
#status.cold { background: rgba(120, 190, 255, .25); }
#palette { display: flex; gap: 6px; margin-top: 10px; }
#palette button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; }
#palette button.on { border-color: #fff; transform: scale(1.12); }

#cam { position: fixed; right: 16px; bottom: 16px; width: 240px; border-radius: 14px; overflow: hidden; background: var(--bg); }
#cam canvas { width: 100%; display: block; }
#camInfo { font-size: 12px; padding: 6px 10px; opacity: .8; }

#help { position: fixed; left: 16px; bottom: 16px; max-width: 640px; font-size: 12px; line-height: 1.6;
  padding: 10px 14px; border-radius: 12px; background: var(--bg); opacity: .85; }

#start { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(8,6,5,.55); }
.card { width: min(520px, 92vw); padding: 28px 30px; border-radius: 22px; background: rgba(24,18,14,.9); text-align: center; }
.card h1 { margin: 0 0 8px; font-size: 40px; color: var(--o); letter-spacing: .5px; }
.card p { line-height: 1.55; opacity: .9; }
.btns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
button { font: inherit; font-weight: 800; font-size: 16px; padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--o); color: #1a1006; }
button.alt { background: rgba(255,255,255,.14); color: var(--ink); }
#startMsg { font-size: 13px; color: #ffb38a; min-height: 1em; }
