:root {
  --bg-dark: #05080e;
  --bg-surface: rgba(11, 17, 28, 0.78);
  --bg-surface-elevated: rgba(18, 28, 44, 0.90);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 139, 253, 0.5);
  --accent-blue: #388bfd;
  --accent-cyan: #00d2ff;
  --accent-orange: #ff5722;
  --accent-green: #3fb950;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --glass-blur: 16px;
  --radius-pill: 9999px;
  --radius-card: 14px;
  --shadow-glass: 0 10px 36px 0 rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  display: block;
  touch-action: none;
  z-index: 1;
}

/* Glassmorphism Classes */
.glass-pill {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glass);
}

.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-glass);
}

/* Top Floating Header Pill */
#topPill {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
#topPill::-webkit-scrollbar {
  display: none;
}

#topPill.minimized {
  transform: translate(-50%, -85%);
  opacity: 0.85;
}
#topPill.minimized:hover {
  transform: translate(-50%, -40%);
  opacity: 1.0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-icon {
  font-size: 16px;
}

select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}
select option {
  background: #0d131d;
  color: #fff;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #9e6a03;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.pill-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pill-buttons button, .pill-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pill-buttons button:hover, .pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.pill-buttons button.on {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(56, 139, 253, 0.4);
}

.action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* Performance Mode Toggle Button */
.perf-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.35);
  color: var(--accent-cyan);
}
.perf-toggle-btn.mode-full {
  background: rgba(255, 87, 34, 0.15);
  border-color: rgba(255, 87, 34, 0.4);
  color: #ff9e80;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.minimize-btn {
  font-size: 10px;
  opacity: 0.8;
}
.close-btn {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

/* Floating Real-time Gesture Status Pill */
.gesture-status-pill {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: all 0.2s ease;
}
.gesture-pill-icon {
  font-size: 13px;
}
.gesture-pill-name {
  font-weight: 700;
  color: var(--accent-cyan);
}
.gesture-pill-divider {
  color: var(--text-muted);
}
.gesture-pill-action {
  color: var(--text-primary);
  font-weight: 500;
}
.gesture-status-pill.active {
  border-color: rgba(0, 210, 255, 0.5);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
}
.gesture-status-pill.pulsing {
  border-color: rgba(255, 87, 34, 0.6);
  box-shadow: 0 0 16px rgba(255, 87, 34, 0.4);
}

/* Floating Exit Zen Mode Button */
.exit-zen-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(18, 28, 44, 0.85);
  border: 1px solid rgba(0, 210, 255, 0.4);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}
.exit-zen-btn:hover {
  background: rgba(0, 210, 255, 0.25);
  border-color: #00d2ff;
}

/* Collapsible Research & Data Panel */
#hud {
  position: fixed;
  top: 64px;
  left: 14px;
  width: 330px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 190px);
  overflow-y: auto;
  z-index: 15;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
#hud.collapsed {
  transform: translateX(-370px);
  opacity: 0;
  pointer-events: none;
}
#hud.minimized .card-body {
  display: none;
}
#hud.minimized {
  padding-bottom: 8px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  color: var(--accent-cyan);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warn {
  color: #e3b341;
  font-size: 11px;
  line-height: 1.3;
  padding: 4px 6px;
  background: rgba(227, 179, 65, 0.1);
  border-left: 2px solid #e3b341;
  border-radius: 3px;
}

#chart {
  width: 100%;
  height: 120px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  display: block;
}

.scroll-note {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}
.scroll-note b {
  color: var(--text-primary);
}
.scroll-note i {
  color: var(--text-muted);
}

/* Stratum 3D Callout Card */
#stratumCard {
  position: fixed;
  bottom: 108px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  width: min(520px, calc(100vw - 28px));
  padding: 12px 16px;
  animation: slideUpFade 0.25s ease-out;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
#stratumCard.minimized .stratum-details {
  display: none;
}
#stratumCard.minimized {
  padding: 8px 14px;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.stratum-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tier-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--accent-cyan);
  color: #05080e;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}
.stratum-badge-group h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}

.stratum-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 6px 0 8px;
}

.stratum-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 6px;
}
.metric-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
}
.metric-name {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.metric-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Bottom Tactile Control Deck */
#controlDeck {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  width: min(580px, calc(100vw - 24px));
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
#controlDeck.minimized {
  transform: translate(-50%, calc(100% - 32px));
}
#controlDeck.minimized .deck-body {
  display: none;
}

.deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.deck-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.deck-icon {
  font-size: 13px;
}
.deck-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
}

.deck-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deck-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.row-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  min-width: 48px;
}

.strata-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.strata-tabs::-webkit-scrollbar {
  display: none;
}

.stratum-tab {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.stratum-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.stratum-tab.on {
  background: var(--accent-cyan);
  color: #05080e;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

/* Scrubber Row */
.scrubber-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scrubber-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.scrubber-track-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

input[type="range"]#explodeSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
  margin: 0;
}

input[type="range"]#explodeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
  cursor: pointer;
  transition: transform 0.1s;
}

input[type="range"]#explodeSlider::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: var(--accent-cyan);
}

input[type="range"]#explodeSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
  cursor: pointer;
}

.explode-toggle-btn {
  padding: 4px 10px;
  font-size: 11px;
}

/* Cam Card & Video Container */
#cam {
  position: fixed;
  right: 14px;
  bottom: 92px;
  width: 265px;
  z-index: 17;
  padding: 10px 12px;
  display: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
#cam.active {
  display: block;
}
#cam.minimized .cam-body {
  display: none;
}
#cam.minimized {
  padding-bottom: 8px;
}

/* Explicit With Camera / Without Camera Segmented Switcher */
.cam-mode-group {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 210, 255, 0.25);
}
.cam-mode-btn {
  font-size: 11px !important;
  padding: 4px 9px !important;
}
.cam-mode-btn.on {
  background: var(--accent-cyan) !important;
  color: #05080e !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.45) !important;
}

/* Voice Toggle Button in Header */
.voice-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.4);
  color: #56d364;
}
.voice-toggle-btn.listening {
  background: rgba(255, 87, 34, 0.22);
  border-color: #ff5722;
  color: #ffab91;
  box-shadow: 0 0 12px rgba(255, 87, 34, 0.5);
}

/* 2-Stage Hand & Gesture Detection Pipeline inside #cam */
.detection-pipeline {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pipeline-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
}
.step-tag {
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.pipeline-step.locked .step-tag {
  background: rgba(63, 185, 80, 0.25);
  color: #56d364;
}
.step-val {
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pipeline-step.locked .step-val {
  color: #f0f6fc;
}

/* 5-Finger Extension Matrix */
.finger-matrix {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.finger-pill {
  flex: 1;
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all 0.12s ease;
}
.finger-pill.ext {
  background: rgba(0, 210, 255, 0.25);
  color: #00ffff;
  border-color: rgba(0, 210, 255, 0.6);
  box-shadow: 0 0 6px rgba(0, 210, 255, 0.35);
}

.stability-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.stability-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00d2ff, #3fb950);
  transition: width 0.12s ease;
}

.cam-btn-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.cam-toggle-btn {
  flex: 1;
  background: rgba(0, 210, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.45);
  color: #00d2ff;
}
.mini-icon-btn {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

/* Voice Actions & Speech Assistant Drawer */
.voice-panel {
  position: fixed;
  top: 64px;
  right: 14px;
  width: 340px;
  max-width: calc(100vw - 28px);
  z-index: 19;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.voice-panel.minimized .voice-body {
  display: none;
}
.voice-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}
.voice-status-dot.listening {
  background: #ff5722;
  box-shadow: 0 0 8px #ff5722;
}
.voice-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.voice-transcript-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.voice-state-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 210, 255, 0.2);
  color: var(--accent-cyan);
  white-space: nowrap;
}
.voice-state-badge.listening {
  background: rgba(255, 87, 34, 0.3);
  color: #ffab91;
}
.voice-transcript-text {
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.3;
}
.voice-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-text-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
}
.voice-text-input:focus {
  border-color: var(--accent-cyan);
}
.voice-chips-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.voice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.voice-chip {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.voice-chip:hover {
  background: rgba(0, 210, 255, 0.18);
  color: #ffffff;
  border-color: rgba(0, 210, 255, 0.45);
}

.deck-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.guide-section-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0, 210, 255, 0.06);
  border-left: 2px solid var(--accent-cyan);
  border-radius: 4px;
}

.cam-header {
  margin-bottom: 6px;
}
.cam-title-group {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cam-icon {
  font-size: 13px;
}
.cam-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}
.cam-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mini-btn {
  font-size: 9.5px;
  padding: 3px 6px;
}

.video-container {
  position: relative;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 3;
}
#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: none;
}
#skeletonCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
  pointer-events: none;
}

#gesture {
  font-size: 11px;
  margin: 6px 0;
  color: var(--text-secondary);
}
small {
  font-size: 10px;
  color: var(--text-muted);
}

/* Visual Gesture Guide Modal */
.gesture-guide-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  width: min(640px, calc(100vw - 28px));
  max-height: calc(100dvh - 50px);
  overflow-y: auto;
  padding: 16px 20px;
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.0); }
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title-group h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.guide-icon {
  font-size: 18px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.gesture-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: background 0.15s ease;
}
.gesture-tile:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 210, 255, 0.3);
}

.gesture-visual {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 210, 255, 0.08);
  border-radius: 8px;
  flex-shrink: 0;
}

.gesture-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.gesture-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}
.gesture-trigger {
  font-size: 10.5px;
  color: var(--accent-cyan);
}
.gesture-action {
  font-size: 11px;
  color: var(--text-secondary);
}

.gesture-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* Zen View Mode (Clean full-screen visualization) */
body.zen-mode #topPill {
  transform: translate(-50%, -120px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.zen-mode #hud {
  transform: translateX(-400px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.zen-mode #stratumCard {
  transform: translate(-50%, 150px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.zen-mode #controlDeck {
  transform: translate(-50%, 150px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.zen-mode #cam {
  transform: translateY(220px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.zen-mode #voicePanel {
  transform: translateX(400px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.zen-mode #gestureGuideModal {
  display: none !important;
}
body.zen-mode #gestureStatusPill {
  top: 14px;
  background: rgba(11, 17, 28, 0.5);
  backdrop-filter: blur(8px);
}

/* Responsive Breakpoints for Mobile */
@media (max-width: 640px) {
  #topPill {
    top: 8px;
    padding: 5px 8px;
    gap: 5px;
  }
  .brand-group select {
    max-width: 120px;
    font-size: 11px;
  }
  #controlDeck {
    bottom: 8px;
    padding: 8px 10px;
    gap: 6px;
  }
  .row-label {
    min-width: 36px;
    font-size: 9px;
  }
  .stratum-tab {
    padding: 4px 8px;
    font-size: 10px;
  }
  #stratumCard {
    bottom: 96px;
    padding: 10px 12px;
  }
  #hud {
    top: 54px;
    left: 8px;
    max-height: calc(100dvh - 170px);
  }
  #voicePanel {
    top: 54px;
    right: 8px;
    width: calc(100vw - 16px);
  }
  #cam {
    bottom: 86px;
    right: 8px;
    width: 225px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
}
