:root {
  --fg: #eaf6f3;
  --muted: #a9c4be;
  --accent: #8eea7d;
  --danger: #ff6b70;
  --panel: rgba(8, 13, 20, 0.72);
  --border: rgba(255, 255, 255, 0.12);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #04080d; color: var(--fg);
  font-family: "Segoe UI", Inter, Tahoma, sans-serif;
  overflow: hidden;
}
#scene { position: fixed; inset: 0; }
#hud {
  position: fixed; top: 14px; left: 14px;
  width: 340px; max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 14px 16px 16px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  z-index: 10;
}
h1 { margin: 0 0 4px; font-size: 22px; font-weight: 600; }
.muted { color: var(--muted); }
.tiny  { font-size: 11px; }
button {
  margin: 8px 0 10px;
  padding: 9px 14px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: #001815;
  font-weight: 700; cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
.status { margin: 4px 0 12px; color: #cbe7e0; font-size: 13px; }
.metric {
  display: grid; gap: 2px; margin-bottom: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.metric span { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.metric strong { font-size: 44px; line-height: 1; letter-spacing: -1.5px; }
.metric.small strong { font-size: 22px; letter-spacing: 0; }
.metric small { font-size: 11px; color: var(--muted); margin-left: 4px; }
.preview {
  position: relative; margin-top: 4px;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
video, #overlay { width: 100%; display: block; }
#overlay { position: absolute; inset: 0; pointer-events: none; }
.ecg {
  margin-top: 10px;
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(0,0,0,0.35); padding: 4px;
}
#ecg { width: 100%; height: 80px; display: block; }