/* ============================================================
   AWABAND Scanner — Biophotonic Medical HUD
   Aesthetic: holographic medical interface, year 2225
   Fonts: Chakra Petch (display) + IBM Plex Mono (data)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Deep void */
  --bg: #060910;
  --bg-glass: rgba(6, 9, 16, 0.82);
  --bg-surface: rgba(8, 14, 24, 0.92);

  /* Borders — holographic edge */
  --border: rgba(0, 255, 204, 0.08);
  --border-active: rgba(0, 255, 204, 0.25);

  /* Text */
  --text: #8ba4c4;
  --text-dim: #3a4a68;
  --text-bright: #d0e4ff;
  --text-hud: #00ffcc;

  /* 7 biofield colors — neon medical */
  --c1: #ff3366;
  --c2: #ff7a2e;
  --c3: #ffcc00;
  --c4: #00ff99;
  --c5: #00ccff;
  --c6: #6677ff;
  --c7: #bb44ff;

  /* Primary HUD accent */
  --accent: #00ffcc;
  --accent-glow: rgba(0, 255, 204, 0.3);
  --accent-dim: rgba(0, 255, 204, 0.06);

  /* Secondary accent */
  --accent2: #ff3366;

  /* Fonts */
  --font-display: "Chakra Petch", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
}

/* ==================== BASE ==================== */

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* ==================== BACKGROUND ==================== */

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(0, 255, 204, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 10%, rgba(0, 204, 255, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 15% 50%, rgba(255, 51, 102, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
  pointer-events: none;
}

/* Grid overlay — faint holographic grid */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 255, 204, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 204, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ==================== APP CONTAINER ==================== */

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==================== SCREENS ==================== */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==================== SPLASH SCREEN ==================== */

#splash {
  gap: 0;
  text-align: center;
}

/* Concentric sonar rings */
.splash-rings {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 40px;
}

.splash-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.splash-ring:nth-child(1) {
  width: 40px; height: 40px;
  border-color: rgba(0, 255, 204, 0.6);
  animation: ringPulse 3s ease-in-out infinite;
}
.splash-ring:nth-child(2) {
  width: 80px; height: 80px;
  border-color: rgba(0, 255, 204, 0.35);
  animation: ringPulse 3s ease-in-out 0.4s infinite;
}
.splash-ring:nth-child(3) {
  width: 120px; height: 120px;
  border-color: rgba(0, 255, 204, 0.18);
  animation: ringPulse 3s ease-in-out 0.8s infinite;
}
.splash-ring:nth-child(4) {
  width: 160px; height: 160px;
  border-color: rgba(0, 255, 204, 0.08);
  animation: ringPulse 3s ease-in-out 1.2s infinite;
}

/* Center dot */
.splash-rings::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--accent), 0 0 40px var(--accent-glow);
}

@keyframes ringPulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.08); }
}

/* Rotating scan line inside rings */
.splash-scanline {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform-origin: 0 0;
  animation: radarSweep 4s linear infinite;
  opacity: 0.5;
}

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.splash-brand {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.splash-brand span {
  font-weight: 300;
  color: var(--accent);
}

.splash-version {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 52px;
}

/* HUD-framed button */
.splash-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 40px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(0, 255, 204, 0.3);
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  clip-path: polygon(
    0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%,
    12px 100%, 0 calc(100% - 12px)
  );
}

.splash-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 204, 0.04);
  transition: background 0.3s;
}

.splash-btn:hover {
  border-color: rgba(0, 255, 204, 0.6);
  box-shadow: 0 0 30px rgba(0, 255, 204, 0.12), inset 0 0 30px rgba(0, 255, 204, 0.04);
}

.splash-btn:hover::before {
  background: rgba(0, 255, 204, 0.08);
}

.splash-btn:active {
  transform: scale(0.98);
}

.splash-btn-icon {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  animation: iconBlink 2s ease-in-out infinite;
}

.splash-btn-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

@keyframes iconBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.splash-how-link {
  margin-top: 16px;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 10px;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.splash-how-link:hover {
  color: var(--accent);
}

.splash-footer {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
}

.scan-sim-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 176, 87, 0.28);
  background: rgba(40, 22, 8, 0.72);
  color: #ffcf8a;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px);
  box-shadow: 0 0 0 1px rgba(255, 176, 87, 0.06), 0 14px 28px rgba(0, 0, 0, 0.18);
}

.splash-sim-badge {
  position: absolute;
  top: calc(50% + 112px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

/* ==================== SCANNING SCREEN ==================== */

#scanning {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

#scanning {
  display: none;
}

#scanning.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

/* Camera viewport — contained with HUD frame */
.scan-viewport {
  position: relative;
  flex: 1;
  margin: 12px 12px 0;
  border: 1px solid rgba(0, 255, 204, 0.12);
  overflow: hidden;
  clip-path: polygon(
    0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%,
    14px 100%, 0 calc(100% - 14px)
  );
}

/* Corner ticks on viewport */
.scan-viewport::before,
.scan-viewport::after {
  content: '';
  position: absolute;
  z-index: 13;
  pointer-events: none;
}

.scan-viewport::before {
  top: 14px; left: 0;
  width: 20px; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.scan-viewport::after {
  bottom: 14px; right: 0;
  width: 20px; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.scan-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.scan-aura-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* HUD Overlay — inside viewport */
.hud-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.hud-corner {
  position: absolute;
  width: 28px;
  height: 28px;
}

.hud-corner::before,
.hud-corner::after {
  content: '';
  position: absolute;
  background: rgba(0, 255, 204, 0.5);
}

/* Top-left */
.hud-corner--tl { top: 10px; left: 10px; }
.hud-corner--tl::before { top: 0; left: 0; width: 20px; height: 1px; }
.hud-corner--tl::after { top: 0; left: 0; width: 1px; height: 20px; }

/* Top-right */
.hud-corner--tr { top: 10px; right: 10px; }
.hud-corner--tr::before { top: 0; right: 0; width: 20px; height: 1px; }
.hud-corner--tr::after { top: 0; right: 0; width: 1px; height: 20px; }

/* Bottom-left */
.hud-corner--bl { bottom: 10px; left: 10px; }
.hud-corner--bl::before { bottom: 0; left: 0; width: 20px; height: 1px; }
.hud-corner--bl::after { bottom: 0; left: 0; width: 1px; height: 20px; }

/* Bottom-right */
.hud-corner--br { bottom: 10px; right: 10px; }
.hud-corner--br::before { bottom: 0; right: 0; width: 20px; height: 1px; }
.hud-corner--br::after { bottom: 0; right: 0; width: 1px; height: 20px; }

/* Horizontal scan line */
.hud-scanline {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(0, 255, 204, 0.15) 20%, rgba(0, 255, 204, 0.15) 80%, transparent 95%);
  animation: scanDown 4s linear infinite;
  z-index: 12;
  pointer-events: none;
}

@keyframes scanDown {
  0% { top: 5%; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 95%; opacity: 0; }
}

/* Reticle — center crosshair */
.hud-reticle {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  z-index: 12;
  pointer-events: none;
}

.hud-reticle::before,
.hud-reticle::after {
  content: '';
  position: absolute;
  background: rgba(0, 255, 204, 0.3);
}

.hud-reticle::before {
  top: 50%; left: 0;
  width: 100%; height: 1px;
  transform: translateY(-50%);
}

.hud-reticle::after {
  left: 50%; top: 0;
  width: 1px; height: 100%;
  transform: translateX(-50%);
}

.hud-reticle-ring {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(0, 255, 204, 0.2);
  border-radius: 50%;
  animation: reticleRotate 8s linear infinite;
}

.hud-reticle-ring::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--accent);
}

@keyframes reticleRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* HUD data readouts — inside viewport */
.hud-data {
  position: absolute;
  z-index: 14;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(0, 255, 204, 0.6);
  letter-spacing: 0.08em;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}

.hud-data--tl {
  top: 14px;
  left: 40px;
}

.hud-data--tr {
  top: 14px;
  right: 40px;
  text-align: right;
}

/* Status + controls bar above viewport */
.scan-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px calc(4px + env(safe-area-inset-top));
  gap: 12px;
  position: relative;
  z-index: 15;
}

.scan-back-btn {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(0, 255, 204, 0.2);
  background: rgba(0, 255, 204, 0.04);
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.scan-back-btn:active {
  background: rgba(0, 255, 204, 0.12);
}

.scan-status {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--accent);
  background: rgba(0, 255, 204, 0.04);
  padding: 5px 20px;
  border: 1px solid rgba(0, 255, 204, 0.12);
  letter-spacing: 0.08em;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}

.scan-status.face-lost {
  color: var(--accent2);
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.06);
  animation: faceLostPulse 1.5s ease-in-out infinite;
}

.scan-sensor-strip {
  display: flex;
  gap: 8px;
  padding: 0 16px 10px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 15;
}

.scan-topbar .scan-sim-badge {
  flex-shrink: 0;
}

.scan-sensor-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 108px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 255, 204, 0.12);
  background: rgba(8, 14, 24, 0.72);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, calc(100% - 6px) 100%, 0 calc(100% - 6px), 0 0);
}

.scan-sensor-label {
  color: rgba(255, 255, 255, 0.5);
}

.scan-sensor-value {
  color: inherit;
}

.scan-sensor-chip.state-ready,
.scan-sensor-chip.state-tracking,
.scan-sensor-chip.state-active {
  color: var(--accent);
  border-color: rgba(0, 255, 204, 0.28);
}

.scan-sensor-chip.state-warming_up,
.scan-sensor-chip.state-acquiring,
.scan-sensor-chip.state-loading,
.scan-sensor-chip.state-searching,
.scan-sensor-chip.state-pending {
  color: #ffd06b;
  border-color: rgba(255, 208, 107, 0.28);
}

.scan-sensor-chip.state-weak,
.scan-sensor-chip.state-lost,
.scan-sensor-chip.state-denied,
.scan-sensor-chip.state-unavailable,
.scan-sensor-chip.state-error {
  color: var(--accent2);
  border-color: rgba(255, 51, 102, 0.28);
}

.scan-debug-panel {
  display: none;
  margin: 0 16px 10px;
  padding: 12px 14px;
  border: 1px solid rgba(90, 200, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(9, 17, 28, 0.92), rgba(5, 10, 18, 0.94));
  color: var(--text);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
  position: relative;
  z-index: 15;
}

.scan-debug-panel.open {
  display: block;
}

.scan-debug-title {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5ac8ff;
  margin-bottom: 8px;
}

.scan-debug-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  color: var(--text-dim);
}

@keyframes faceLostPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.scan-stop-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--accent2);
  background: rgba(255, 51, 102, 0.06);
  color: var(--accent2);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  transition: background 0.2s;
  flex-shrink: 0;
}

.scan-stop-btn:active {
  background: rgba(255, 51, 102, 0.2);
}

.scan-guide-btn,
.scan-debug-btn,
.scan-export-btn {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(0, 255, 204, 0.25);
  background: rgba(0, 255, 204, 0.04);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.scan-guide-btn:active,
.scan-debug-btn:active,
.scan-export-btn:active,
.scan-debug-btn.active {
  background: rgba(0, 255, 204, 0.12);
}

.scan-debug-btn {
  font-size: 9px;
  letter-spacing: 0.08em;
}

.scan-export-btn {
  width: auto;
  min-width: 48px;
  padding: 0 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* Focus mode button */
.scan-hd-btn {
  width: auto;
  min-width: 62px;
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid rgba(0, 255, 204, 0.25);
  background: rgba(0, 255, 204, 0.04);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: all 0.3s;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.scan-hd-btn:active {
  background: rgba(0, 255, 204, 0.12);
}

.scan-hd-btn.active {
  background: rgba(0, 255, 204, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.3);
}

.scan-hd-btn.loading {
  border-color: rgba(0, 255, 204, 0.4);
  animation: hdSpin 1s linear infinite;
  position: relative;
}

.scan-hd-btn.loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: hdSpin 0.8s linear infinite;
}

@keyframes hdSpin {
  to { transform: rotate(360deg); }
}

/* Toast notification */
.scan-toast {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 8px 20px;
  background: rgba(6, 9, 16, 0.95);
  border: 1px solid rgba(255, 51, 102, 0.3);
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  white-space: nowrap;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, calc(100% - 6px) 100%, 0 calc(100% - 6px), 0 0);
}

.scan-toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Heart rate pulse indicator — bottom of viewport */
.pulse-warmup {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 15;
  pointer-events: none;
  background: rgba(0, 255, 204, 0.08);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pulse-warmup.active {
  opacity: 1;
}

.pulse-warmup-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(0, 255, 204, 0.25), var(--accent2));
  box-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
  transition: width 0.2s ease;
}

.pulse-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 14;
  pointer-events: none;
  overflow: hidden;
}

.pulse-indicator-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent2), var(--accent2), transparent);
  opacity: 0;
  animation: none;
}

.pulse-indicator-bar.beating {
  animation: heartPulse var(--beat-duration, 1s) ease-out infinite;
}

@keyframes heartPulse {
  0% { opacity: 0.8; transform: scaleX(0.3); }
  30% { opacity: 0.4; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}

/* ==================== RESULT SCREEN ==================== */

#result {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: 0;
}

#result.active {
  display: flex;
}

.result-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.result-canvas {
  max-width: 100%;
  max-height: 100%;
}

.result-actions {
  display: flex;
  gap: 12px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  justify-content: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: var(--bg);
}

.result-btn {
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(0, 255, 204, 0.15);
  background: rgba(8, 14, 24, 0.9);
  color: var(--text);
  letter-spacing: 0.06em;
  transition: all 0.2s;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, calc(100% - 6px) 100%, 0 calc(100% - 6px), 0 0);
}

.result-btn:active {
  background: rgba(14, 22, 36, 0.95);
}

.result-btn-primary {
  background: rgba(0, 255, 204, 0.08);
  border-color: rgba(0, 255, 204, 0.3);
  color: var(--accent);
}

.result-diagnostics {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 255, 204, 0.12);
  background: rgba(8, 14, 24, 0.78);
  color: var(--text);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
}

.result-diagnostics.partial {
  border-color: rgba(255, 208, 107, 0.32);
}

.result-diagnostics-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.result-diagnostics-summary,
.result-diagnostics-details {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-dim);
}

.result-diagnostics-details {
  margin-top: 6px;
}

/* ==================== AWABAND Panel — Vertical Equalizer ==================== */

.awaband-panel {
  flex-shrink: 0;
  padding: 10px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(6, 9, 16, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(0, 255, 204, 0.06);
  z-index: 20;
  margin: 0 12px 12px;
  clip-path: polygon(
    14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%,
    0 100%, 0 14px
  );
  border: 1px solid rgba(0, 255, 204, 0.08);
}

.luminosity {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.5s ease;
}

.awaband-status {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
  color: var(--text-dim);
  margin: 0 4px 10px;
}

.awaband-status.partial {
  color: #ffd06b;
}

/* Equalizer-style vertical bars */
.param-grid {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
  padding: 0 8px;
}

.param-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 44px;
  height: 100%;
  cursor: pointer;
  position: relative;
}

.param-col:active .param-stick-fill {
  filter: brightness(1.4);
}

.param-stick-track {
  flex: 1;
  width: 100%;
  max-width: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.param-stick-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 1px 1px 0 0;
}

/* Confidence: low — semi-transparent, no glow */
.param-stick-fill.low-confidence {
  opacity: 0.25;
  filter: saturate(0.3);
}
.param-stick-fill.low-confidence::after {
  display: none;
}

/* Confidence: uncertain — diagonal stripes overlay */
.param-stick-fill.uncertain {
  opacity: 0.7;
}
.param-stick-fill.uncertain::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.3) 3px,
    rgba(0, 0, 0, 0.3) 5px
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* Glowing top edge */
.param-stick-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  right: -2px;
  height: 3px;
  background: inherit;
  filter: brightness(1.8) saturate(1.3);
  border-radius: 2px;
  box-shadow: 0 0 10px currentColor, 0 -2px 20px currentColor;
}

/* Subtle segments inside bar */
.param-stick-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to top,
    transparent 0px,
    transparent 8px,
    rgba(6, 9, 16, 0.4) 8px,
    rgba(6, 9, 16, 0.4) 9px
  );
  z-index: 1;
  pointer-events: none;
}

.param-label {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--text-dim);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-align: center;
  transition: color 0.3s;
}

.param-col:active .param-label {
  color: var(--text);
}

.param-val {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-bright);
  margin-top: 2px;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

/* ==================== Parameter Tooltip ==================== */

.param-tooltip {
  position: fixed;
  bottom: 130px;
  left: 12px;
  right: 12px;
  padding: 14px 16px;
  background: rgba(6, 9, 16, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 255, 204, 0.12);
  z-index: 30;
  animation: hudSlideUp 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

@keyframes hudSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tooltip-color {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.tooltip-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-bright);
  letter-spacing: 0.04em;
}

.tooltip-freq {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-left: auto;
  opacity: 0.7;
}

.tooltip-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.tooltip-desc {
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}

.tooltip-source {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid rgba(0, 255, 204, 0.06);
  letter-spacing: 0.02em;
}

.tooltip-tip {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-left: 2px solid rgba(0, 255, 153, 0.5);
  border-radius: 0 4px 4px 0;
  font-size: 0.82em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

/* ==================== GUIDE OVERLAY (inside scanning) ==================== */

.guide-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.guide-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.6);
}

.guide-panel {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 9, 16, 0.97);
  border-top: 1px solid rgba(0, 255, 204, 0.1);
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.guide-overlay.open .guide-panel {
  transform: translateY(0);
}

.guide-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 20px 20px calc(32px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.guide-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: 0.04em;
}

.guide-close {
  width: 32px; height: 32px;
  border: 1px solid rgba(0, 255, 204, 0.15);
  background: none;
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.guide-close:active {
  background: rgba(0, 255, 204, 0.1);
}

.guide-intro {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 255, 204, 0.06);
}

.guide-section {
  margin-bottom: 22px;
}

.guide-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.guide-section-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.guide-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.12), transparent);
  margin: 24px 0 20px;
}

.guide-subtitle {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 16px;
}

.guide-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.guide-status-card {
  padding: 12px 14px;
  background: rgba(0, 255, 204, 0.03);
  border: 1px solid rgba(0, 255, 204, 0.08);
  border-radius: 14px;
}

.guide-status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.guide-status-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 204, 0.18);
  background: rgba(0, 255, 204, 0.06);
}

.guide-status-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
}

.guide-status-text {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
}

/* Parameter cards */
.guide-param {
  padding: 14px 16px;
  margin-bottom: 10px;
  background: rgba(0, 255, 204, 0.02);
  border: 1px solid rgba(0, 255, 204, 0.06);
  border-left: 3px solid transparent;
}

.guide-param-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.guide-param-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.guide-param-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: 0.02em;
}

.guide-param-freq {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
  letter-spacing: 0.04em;
}

.guide-param-row {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 5px;
}

.guide-param-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-right: 6px;
  opacity: 0.7;
}

.guide-mapping-intro {
  margin-bottom: 16px;
  padding: 0 2px;
}

.guide-list {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  padding-left: 18px;
  margin: 8px 0 12px;
}

.guide-list li {
  margin-bottom: 5px;
}

.guide-list strong {
  color: var(--text-bright);
  font-weight: 500;
}

.guide-list em {
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
  opacity: 0.8;
}

.guide-ref {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(0, 255, 204, 0.02);
  border-left: 2px solid rgba(0, 255, 204, 0.1);
}

.guide-param-source {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  letter-spacing: 0.02em;
}

.guide-disclaimer {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-top: 24px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

/* Two-level guide: plain lead + collapsible details */
.guide-plain {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.guide-param-plain {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.guide-more {
  margin-top: 8px;
}

.guide-more > summary {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  padding: 4px 0;
  list-style: none;
  opacity: 0.75;
  user-select: none;
  transition: opacity 0.2s ease;
}
.guide-more > summary::-webkit-details-marker { display: none; }
.guide-more > summary::before { content: '＋ '; font-weight: 600; }
.guide-more[open] > summary::before { content: '－ '; }
.guide-more > summary:hover { opacity: 1; }
.guide-more[open] > summary { margin-bottom: 6px; }

/* How-it-works infographic */
.guide-how {
  padding: 16px;
  background: rgba(0, 255, 204, 0.03);
  border: 1px solid rgba(0, 255, 204, 0.1);
  border-radius: 14px;
}

.guide-how-flow {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 4px 0 14px;
}

.ghf-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.ghf-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 2px;
  text-align: center;
}

.ghf-node {
  width: 100%;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  color: var(--text);
  padding: 7px 6px;
  border-radius: 8px;
  background: rgba(0, 255, 204, 0.05);
  border: 1px solid rgba(0, 255, 204, 0.12);
}

.ghf-node--src {
  color: var(--text-bright);
  background: rgba(0, 255, 204, 0.08);
}

.ghf-arrow {
  align-self: center;
  flex: 0 0 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  animation: ghfFlow 1.6s linear infinite;
}

@keyframes ghfFlow {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}

@keyframes ghfFlowV {
  0% { background-position: 0 150%; }
  100% { background-position: 0 -50%; }
}

.ghf-dots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px;
  place-items: center;
}

.ghf-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--dot);
  box-shadow: 0 0 6px var(--dot);
  animation: ghfDot 3.5s ease-in-out infinite;
}
.ghf-dot:nth-child(1) { animation-delay: 0s; }
.ghf-dot:nth-child(2) { animation-delay: 0.4s; }
.ghf-dot:nth-child(3) { animation-delay: 0.8s; }
.ghf-dot:nth-child(4) { animation-delay: 1.2s; }
.ghf-dot:nth-child(5) { animation-delay: 1.6s; }
.ghf-dot:nth-child(6) { animation-delay: 2s; }
.ghf-dot:nth-child(7) { animation-delay: 2.4s; }

@keyframes ghfDot {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.ghf-aura {
  width: 100%;
  font-size: 11px;
  text-align: center;
  color: var(--text-bright);
  padding: 10px 6px;
  border-radius: 10px;
  background: radial-gradient(circle at center, rgba(0, 255, 204, 0.18), rgba(0, 255, 204, 0.03));
  border: 1px solid rgba(0, 255, 204, 0.2);
}

.guide-how-caption {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
}

.guide-read-order {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-dim);
  padding: 8px 12px;
  border-left: 2px solid var(--accent);
  background: rgba(0, 255, 204, 0.03);
}
.guide-read-order strong { color: var(--accent); font-weight: 500; }

@media (max-width: 560px) {
  .guide-how-flow { flex-direction: column; align-items: stretch; }
  .ghf-arrow {
    width: 2px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0 auto;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    background-size: 100% 200%;
    animation-name: ghfFlowV;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ghf-arrow, .ghf-dot { animation: none; }
  .ghf-dot { opacity: 0.9; }
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 204, 0.15);
  border-radius: 10px;
}

/* ==================== SELECTION ==================== */

::selection {
  background: rgba(0, 255, 204, 0.2);
  color: var(--text-bright);
}

/* ── Body Scan Tab Bar ── */
.scan-tab-bar {
  display: flex;
  gap: 0;
  justify-content: center;
  padding: 4px 12px;
}

.scan-tab {
  flex: 1;
  padding: 8px 16px;
  background: rgba(10, 20, 30, 0.6);
  border: 1px solid rgba(0, 200, 255, 0.15);
  color: rgba(200, 220, 240, 0.5);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.scan-tab:first-child { border-radius: 4px 0 0 4px; }
.scan-tab:last-child { border-radius: 0 4px 4px 0; }

.scan-tab.active {
  background: rgba(0, 200, 255, 0.1);
  border-color: rgba(0, 200, 255, 0.4);
  color: rgba(0, 220, 255, 0.9);
}

/* ── Body Scan Panel ── */
.body-scan-container.hidden { display: none; }

.body-scan-panel {
  padding: 8px 12px;
}

.body-scan-disclaimer {
  background: rgba(255, 180, 0, 0.1);
  border: 1px solid rgba(255, 180, 0, 0.3);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
  text-align: center;
}

.body-scan-disclaimer p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: rgba(255, 200, 100, 0.8);
  margin: 0 0 8px;
}

.body-scan-disclaimer-btn {
  background: rgba(255, 180, 0, 0.2);
  border: 1px solid rgba(255, 180, 0, 0.4);
  border-radius: 4px;
  padding: 4px 16px;
  color: rgba(255, 200, 100, 0.9);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  cursor: pointer;
}

.body-scan-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 480px;
  margin: 0 auto;
}

.body-scan-canvas {
  flex-shrink: 0;
  width: 140px;
  height: 250px;
  border-radius: 8px;
  background: rgba(5, 10, 20, 0.5);
  border: 1px solid rgba(0, 200, 255, 0.08);
}

.body-scan-metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.body-scan-metric-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(10, 20, 35, 0.5);
  border: 1px solid rgba(0, 200, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.body-scan-metric-row:hover {
  border-color: rgba(0, 200, 255, 0.25);
}

.bsm-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: rgba(0, 200, 255, 0.6);
  letter-spacing: 1px;
  width: 40px;
}

.bsm-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: rgba(200, 220, 240, 0.9);
  flex: 1;
}

.bsm-unit {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: rgba(200, 220, 240, 0.3);
}

.body-scan-morph-badge {
  display: inline-block;
  padding: 3px 10px;
  margin: 8px 0;
  background: rgba(100, 80, 200, 0.15);
  border: 1px solid rgba(100, 80, 200, 0.3);
  border-radius: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(180, 160, 255, 0.8);
}

.body-scan-morph-badge.hidden { display: none; }

.body-scan-interpretation {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(5, 15, 25, 0.5);
  border: 1px solid rgba(0, 200, 255, 0.08);
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(200, 220, 240, 0.7);
}

.body-scan-tooltip {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 360px;
  background: rgba(8, 16, 28, 0.95);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: 8px;
  padding: 12px;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.bst-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 220, 255, 0.9);
  letter-spacing: 2px;
}

.bst-subtitle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: rgba(200, 220, 240, 0.6);
  margin-bottom: 6px;
}

.bst-norm {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: rgba(0, 255, 150, 0.7);
  margin-bottom: 4px;
}

.bst-range {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: rgba(200, 220, 240, 0.5);
  margin-bottom: 2px;
}

.bst-source {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: rgba(0, 200, 255, 0.4);
  margin-top: 6px;
}

#scan-panel.hidden { display: none; }
