/**
 * ============================================================================
 * APPLE LIQUID GLASS — WORKBENCH & LIVING LAB STYLES
 * ============================================================================
 * Enhanced with:
 * 1. Mobile-First Thumb Ergonomics (Zero Overflow, Safe Area Physics)
 * 2. Viscous Jelly Squish & Liquid Touch Wavefront
 * 3. Native iOS-tier Bottom Sheet Dock for Mobile
 * 4. Ambient Caustic Sheen Shimmer
 * ============================================================================
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

:root {
  --lg-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --lg-font-persian: 'Vazirmatn', 'Plus Jakarta Sans', -apple-system, sans-serif;
  --lg-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body {
  font-family: var(--lg-font-sans);
  background-color: var(--lg-canvas-bg);
  color: var(--lg-canvas-text);
  min-height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 400ms ease, color 400ms ease;
  touch-action: pan-y;
}

/* ============================================================================
 * BACKGROUND SIMULATION HARNESS (Zero-Overflow Protected)
 * ============================================================================ */

#canvas-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  z-index: -1;
  overflow: hidden;
  contain: paint layout size;
  clip-path: inset(0);
  pointer-events: none;
  transition: opacity 600ms var(--lg-spring-fluid);
}

/* 1. AURORA FLUID MESH */
.stage-mesh {
  background: radial-gradient(circle at 50% 50%, #f6f5f2 0%, #ebe8e1 100%);
  width: 100%;
  height: 100%;
  overflow: hidden;
  contain: paint layout size;
}

.theme-dark .stage-mesh {
  background: radial-gradient(circle at 50% 50%, #101014 0%, #050507 100%);
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.75;
  animation: blob-drift 22s infinite alternate ease-in-out;
  pointer-events: none;
  contain: paint layout size;
  overflow: hidden;
}

.aurora-1 {
  width: min(500px, 85vw);
  height: min(500px, 85vw);
  background: radial-gradient(circle, #ff6b6b 0%, #ff8e53 100%);
  top: -5%;
  left: 5%;
}

.aurora-2 {
  width: min(550px, 90vw);
  height: min(550px, 90vw);
  background: radial-gradient(circle, #4facfe 0%, #00f2fe 100%);
  bottom: -10%;
  right: 5%;
  animation-duration: 28s;
  animation-delay: -5s;
}

.aurora-3 {
  width: min(400px, 75vw);
  height: min(400px, 75vw);
  background: radial-gradient(circle, #f093fb 0%, #f5576c 100%);
  top: 35%;
  left: 15%;
  animation-duration: 24s;
  animation-delay: -10s;
}

.aurora-4 {
  width: min(350px, 65vw);
  height: min(350px, 65vw);
  background: radial-gradient(circle, #43e97b 0%, #38f9d7 100%);
  top: 10%;
  right: 10%;
  opacity: 0.45;
  animation-duration: 32s;
  animation-delay: -15s;
}

@media (max-width: 640px) {
  .aurora-blob {
    max-width: 60vw;
    max-height: 60vw;
  }
  .aurora-1 { left: 0; top: 0; }
  .aurora-2 { right: 2%; bottom: 0; }
  .aurora-3 { left: 8%; top: 35%; }
  .aurora-4 { right: 4%; top: 10%; }
}

@keyframes blob-drift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(40px, -30px) scale(1.08) rotate(25deg); }
  100% { transform: translate(-30px, 50px) scale(0.94) rotate(-20deg); }
}

@media (max-width: 640px) {
  @keyframes blob-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8px, -10px) scale(1.02); }
    100% { transform: translate(-8px, 10px) scale(0.98); }
  }
}

/* 2. PHOTO BACKGROUND (Alpine) */
.stage-photo {
  background: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=2000&q=80') center/cover no-repeat !important;
}

.stage-photo .aurora-blob {
  display: none;
}

/* 3. MINIMAL STUDIO (Clean warm silver) */
.stage-minimal {
  background: #F2F2F0 !important;
}
.theme-dark .stage-minimal {
  background: #141418 !important;
}
.stage-minimal .aurora-blob {
  opacity: 0.15;
}

/* 4. OLED DARK */
.stage-dark {
  background: #000000 !important;
}
.stage-dark .aurora-blob {
  opacity: 0.35;
}

/* Watermark in background */
.canvas-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  opacity: 0.07;
  user-select: none;
  width: 90vw;
  max-width: 90vw;
}

.watermark-title {
  font-size: clamp(38px, 11vw, 160px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.watermark-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(9px, 2vw, 14px);
  letter-spacing: 0.15em;
  margin-top: 0.8rem;
}

/* ============================================================================
 * CAUSTIC SHIMMER & LIQUID TOUCH WAVEFRONT
 * ============================================================================ */

/* Ambient Caustic Gleam Sweep across all shells (Zero Overflow Invariant) */
.lg-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.08) 48%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 62%
  );
  background-size: 250% 250%;
  background-position: -150% -150%;
  pointer-events: none;
  animation: caustic-sweep 9s infinite cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.7;
}

@keyframes caustic-sweep {
  0% { background-position: -150% -150%; }
  30% { background-position: 150% 150%; }
  100% { background-position: 150% 150%; }
}

/* Optical Ripple on Touch Coordinates */
.liquid-touch-ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
  animation: touch-ripple-expand 650ms cubic-bezier(0.12, 0.8, 0.25, 1) forwards;
  mix-blend-mode: overlay;
  z-index: 10;
}

@keyframes touch-ripple-expand {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(32); opacity: 0; }
}

/* ============================================================================
 * TOP FLOATING ISLAND NAVIGATION (Mobile-Responsive & Zero-Overflow)
 * ============================================================================ */

.top-nav-container {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  padding: 0 16px;
  max-width: 100vw;
  box-sizing: border-box;
  pointer-events: none;
}

.top-nav-container > * {
  pointer-events: auto;
}

/* Expanded VisionOS Island Drawer */
.island-expanded-card {
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  padding: 4px;
  margin-top: 8px;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transition: all var(--lg-duration-normal) var(--lg-spring-fluid);
  overflow: hidden;
}

.island-expanded-card.active {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.island-expanded-body {
  padding: 12px 16px;
}

.island-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.status-indicator-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 8px #34c759;
  animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.island-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.telemetry-item {
  background: rgba(0, 0, 0, 0.04);
  padding: 8px 10px;
  border-radius: 12px;
}

.theme-dark .telemetry-item {
  background: rgba(255, 255, 255, 0.08);
}

.telemetry-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--lg-canvas-text-muted);
  display: block;
  margin-bottom: 2px;
}

.telemetry-val {
  font-size: 11px;
  font-weight: 600;
}

.lg-floating-island {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9999px;
  background: var(--lg-glass-secondary);
  backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
  -webkit-backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
  border: 1px solid var(--lg-glass-border);
  box-shadow: var(--lg-shadow-ambient), var(--lg-shadow-rim);
  max-width: 100%;
  overflow: hidden;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.apple-logo {
  font-size: 16px;
  line-height: 1;
}

.brand-text {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.badge-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.theme-dark .badge-tag {
  background: rgba(255, 255, 255, 0.15);
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
  padding: 2px;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

/* Sliding Liquid Spring Pill for Top Dynamic Island */
.top-nav-pill-indicator {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 0;
  border-radius: 9999px;
  background: var(--lg-glass-elevated);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), var(--lg-shadow-rim);
  border: 1px solid var(--lg-glass-border);
  transition: transform 320ms var(--lg-spring-fluid), width 320ms var(--lg-spring-fluid), opacity 150ms ease;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

.top-nav-pill-indicator.ready {
  opacity: 1;
}

.nav-item {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--lg-canvas-text);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--lg-duration-fast) ease, opacity var(--lg-duration-fast) ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}

.nav-item:hover {
  opacity: 0.85;
}

.nav-item.active {
  font-weight: 600;
  color: var(--lg-canvas-text);
}

.top-nav-pill-indicator:not(.ready) ~ .nav-item.active {
  background: var(--lg-glass-elevated);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Dynamic Live Badges and Droplets */
.nav-droplet-badge {
  font-size: 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
}

.nav-droplet-dot,
.mobile-tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 6px #34c759;
  display: inline-block;
  animation: droplet-pulse 1.8s infinite ease-in-out;
  flex-shrink: 0;
}

.mobile-tab-dot {
  position: absolute;
  top: 4px;
  right: calc(50% - 13px);
}

@keyframes droplet-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-pill-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--lg-glass-border-subtle);
  background: var(--lg-glass-interactive);
  color: var(--lg-canvas-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--lg-duration-fast) var(--lg-spring-snappy);
  flex-shrink: 0;
}

.icon-pill-btn:hover {
  transform: scale(1.1);
}

/* Mobile-Specific Navbar Tweaks */
@media (max-width: 580px) {
  .top-nav-container {
    padding: 0 8px;
  }
  .lg-floating-island {
    padding: 4px 8px;
    gap: 6px;
    width: 100%;
    max-width: calc(100vw - 16px);
  }
  .nav-brand .badge-tag {
    display: none;
  }
  .nav-brand .brand-text {
    display: none;
  }
  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
  }
  .nav-item {
    padding: 4px 6px;
    font-size: 11px;
  }
  .icon-pill-btn {
    width: 28px;
    height: 28px;
  }
}

/* ============================================================================
 * MAIN WORKBENCH CONTENT & BENTO (Mobile 140px Clearance)
 * ============================================================================ */

.workbench-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 16px 180px; /* Generous 180px bottom clearance for mobile dock */
  box-sizing: border-box;
}

.hero-section {
  text-align: center;
  margin-bottom: 48px;
}

.eyebrow-chip {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lg-canvas-text-muted);
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.04);
}

.theme-dark .eyebrow-chip {
  background: rgba(255, 255, 255, 0.08);
}

.hero-headline {
  font-size: clamp(32px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-lede {
  font-size: clamp(15px, 2.2vw, 20px);
  color: var(--lg-canvas-text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.5;
  padding: 0 8px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* BENTO GRID (Single Column on Mobile) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  padding-bottom: 160px;
}

.bento-card {
  grid-column: span 6;
  min-height: 260px;
  min-width: 0;
  padding: 24px;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
  will-change: transform;
  scroll-margin-top: 125px;
  scroll-margin-bottom: 120px;
}

.bento-card:has(.lg-core) {
  padding: var(--lg-bezel-padding, 6px);
}

.card-georank-radar,
.card-reclaim-battle,
.card-crypto-invoice,
.card-lead-vault,
.card-anchor-primitives {
  padding: 24px;
}

@media (max-width: 860px) {
  .bento-card {
    grid-column: span 12;
    padding: 18px;
  }
}

/* Unified Card Header & Hierarchy Architecture */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-eyebrow,
.tag-mono {
  font-family: var(--lg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lg-canvas-text-muted);
}

.card-title {
  font-family: var(--lg-font-sans);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--lg-canvas-text);
  margin: 0;
}

.card-desc,
.card-body {
  font-family: var(--lg-font-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--lg-canvas-text-muted);
  margin: 4px 0 16px 0;
  max-width: 62ch;
}

.badge-tag,
.status-indicator {
  display: inline-flex;
  align-items: center;
  font-family: var(--lg-font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--lg-glass-border-subtle);
  color: var(--lg-canvas-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-dark .badge-tag,
.theme-dark .status-indicator {
  background: rgba(255, 255, 255, 0.08);
}

.math-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--lg-canvas-text);
}

/* Card Visualizers */
.interactive-preview-zone {
  height: 80px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(0, 0, 0, 0.12);
}

.refraction-specimen {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--lg-glass-elevated);
  box-shadow: var(--lg-shadow-crisp);
}

.color-spectrum-strip {
  display: flex;
  gap: 8px;
}

.band {
  flex: 1;
  padding: 10px 4px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.band-r { background: rgba(255, 59, 48, 0.15); color: #ff3b30; }
.band-g { background: rgba(52, 199, 89, 0.15); color: #34c759; }
.band-b { background: rgba(0, 122, 255, 0.15); color: #007aff; }

/* Liquid Mercury Slider Component */
.mercury-slider-container {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mercury-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mercury-slider-track {
  height: 12px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
  position: relative;
  cursor: pointer;
  touch-action: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.theme-dark .mercury-slider-track {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mercury-slider-fill {
  height: 100%;
  width: 50%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #007aff, #5856d6);
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  transition: width 60ms ease-out;
}

.mercury-slider-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #d8d8de 65%, #a8a8b2 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), inset 0 1px 2px #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  cursor: grab;
  touch-action: none;
  will-change: transform, left;
  transition: transform 120ms cubic-bezier(0.18, 1.25, 0.32, 1);
}

.mercury-slider-thumb:active {
  cursor: grabbing;
}

/* Concentric Bezel Visualizer */
.bezel-visualizer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

.viz-outer {
  width: 100%;
  max-width: 360px;
  padding: 6px;
  border-radius: 32px;
  border: 1.5px solid var(--lg-glass-border);
  background: var(--lg-glass-secondary);
  text-align: center;
}

.viz-inner {
  padding: 16px;
  border-radius: 26px;
  border: 1px solid var(--lg-glass-border-subtle);
  background: var(--lg-glass-primary);
}

.viz-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--lg-canvas-text-muted);
}

/* Fluid Morphing Stage */
.morph-stage {
  height: 110px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  filter: url(#apple-fluid-metablob);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 18px;
  padding: 8px;
  touch-action: none;
}

.droplet {
  width: 100px;
  height: 48px;
  border-radius: 9999px;
  background: #ff6b6b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  cursor: grab;
  user-select: none;
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35);
  transition: transform 120ms ease;
  touch-action: none;
}

.droplet-2 {
  background: #4facfe;
  box-shadow: 0 8px 20px rgba(79, 172, 254, 0.35);
}

.droplet:active {
  cursor: grabbing;
  transform: scale(0.96);
}

/* ============================================================================
 * LIVING CALIBRATION DOCK (Apple-Grade Mobile Bottom Sheet & Desktop Card)
 * ============================================================================ */

.tuning-dock {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 330px;
  max-width: calc(100vw - 32px);
  z-index: 1000;
  padding: 6px;
  border-radius: 26px;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.18), var(--lg-shadow-rim);
  transition: transform var(--lg-duration-normal) var(--lg-spring-fluid),
              max-height var(--lg-duration-normal) var(--lg-spring-fluid);
  overflow: hidden;
  box-sizing: border-box;
}

.sheet-handle-bar {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(120, 120, 128, 0.35);
  margin: 6px auto 2px;
}

.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  cursor: pointer;
  user-select: none;
}

.dock-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.knob-icon {
  font-size: 15px;
}

.dock-minimize-btn {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--lg-canvas-text);
  font-weight: 700;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  transition: transform var(--lg-duration-fast) ease;
}

.theme-dark .dock-minimize-btn {
  background: rgba(255, 255, 255, 0.12);
}

.dock-body {
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  transition: opacity var(--lg-duration-fast) ease;
}

.tuning-dock.minimized .dock-body {
  display: none;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-label-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-row label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--lg-canvas-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.val-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.theme-dark .val-badge {
  background: rgba(255, 255, 255, 0.12);
}

/* Segmented Control */
.segmented-control {
  display: flex;
  gap: 3px;
  background: rgba(0, 0, 0, 0.05);
  padding: 3px;
  border-radius: 10px;
}

.theme-dark .segmented-control {
  background: rgba(255, 255, 255, 0.08);
}

.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 5px 3px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 7px;
  color: var(--lg-canvas-text);
  cursor: pointer;
  transition: all var(--lg-duration-fast) ease;
}

.seg-btn.active {
  background: var(--lg-glass-elevated);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Sliders */
.lg-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.10);
  outline: none;
}

.theme-dark .lg-slider {
  background: rgba(255, 255, 255, 0.18);
}

.lg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform var(--lg-duration-fast) var(--lg-spring-snappy);
}

/* Toggle Checkbox */
.toggle-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding-top: 2px;
}

.lg-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background var(--lg-duration-fast) ease;
}

.lg-toggle:checked {
  background: #007aff;
}

.lg-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--lg-duration-fast) var(--lg-spring-fluid);
}

.lg-toggle:checked::after {
  transform: translateX(16px);
}

/* ============================================================================
 * MOBILE-FIRST ADAPTIVE BOTTOM SHEET (Under 640px)
 * ============================================================================ */
@media (max-width: 640px) {
  .tuning-dock {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    border-radius: 26px 26px 0 0;
    border-bottom: none;
    padding: 4px 12px calc(12px + env(safe-area-inset-bottom, 12px));
    transform: translateY(0);
    box-sizing: border-box;
    overflow: hidden;
  }

  .sheet-handle-bar {
    display: block;
  }

  .tuning-dock.minimized {
    transform: translateY(calc(100% - 56px - env(safe-area-inset-bottom, 12px)));
  }

  .tuning-dock.minimized .dock-body {
    display: none !important;
  }
}

/* ============================================================================
 * PHASE 6: 2D LIQUID WAVE TANK COMPONENT
 * ============================================================================ */
.card-wave-tank {
  grid-column: span 12;
  min-height: 320px;
}

.wave-tank-container {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(0, 122, 255, 0.08) 0%, rgba(0, 0, 0, 0.03) 100%);
  border: 1px solid var(--lg-glass-border-subtle);
  touch-action: none;
  cursor: crosshair;
}

.theme-dark .wave-tank-container {
  background: radial-gradient(circle at 50% 50%, rgba(0, 122, 255, 0.16) 0%, rgba(20, 20, 28, 0.8) 100%);
}

#liquid-wave-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.wave-tank-overlay {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.wave-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--lg-canvas-text-muted);
  background: var(--lg-glass-elevated);
  padding: 4px 10px;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.wave-actions {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.wave-action-btn {
  background: var(--lg-glass-elevated);
  border: 1px solid var(--lg-glass-border-subtle);
  color: var(--lg-canvas-text);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--lg-shadow-crisp);
  transition: transform var(--lg-duration-fast) var(--lg-spring-snappy);
}

.wave-action-btn:hover {
  transform: scale(1.05);
}

/* ============================================================================
 * PHASE 7: VISCOUS SLOSHING FLASK & GAUGE
 * ============================================================================ */
.card-slosh {
  grid-column: span 6;
  min-height: 280px;
}

@media (max-width: 860px) {
  .card-slosh {
    grid-column: span 12;
  }
}

.slosh-flask-wrapper {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.03);
  border: 1.5px solid var(--lg-glass-border);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05), var(--lg-shadow-rim);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-dark .slosh-flask-wrapper {
  background: rgba(255, 255, 255, 0.04);
}

#slosh-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.slosh-fluid-fill {
  fill: url(#slosh-gradient);
  transition: fill 300ms ease;
  filter: drop-shadow(0 4px 12px rgba(0, 122, 255, 0.45));
}

.slosh-meniscus-rim {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.slosh-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
}

.slosh-telemetry-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--lg-canvas-text-muted);
}

.btn-agitate {
  background: var(--lg-glass-elevated);
  border: 1px solid var(--lg-glass-border-subtle);
  color: var(--lg-canvas-text);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--lg-shadow-crisp);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform var(--lg-duration-fast) var(--lg-spring-snappy);
}

.btn-agitate:hover {
  transform: scale(1.05);
}

/* ============================================================================
 * PHASE 8: MULTI-STATE DYNAMIC ISLAND MORPHING
 * ============================================================================ */
.island-mode-selector {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.06);
  padding: 3px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.theme-dark .island-mode-selector {
  background: rgba(255, 255, 255, 0.08);
}

.island-mode-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  color: var(--lg-canvas-text);
  cursor: pointer;
  transition: all var(--lg-duration-fast) ease;
}

.island-mode-btn.active {
  background: var(--lg-glass-elevated);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Dynamic Island Morph States */
.lg-floating-island {
  transition: width 350ms var(--lg-spring-fluid),
              height 350ms var(--lg-spring-fluid),
              border-radius 350ms var(--lg-spring-fluid);
}

.island-state-container {
  display: none;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.island-state-container.active {
  display: flex;
}

/* 1. MUSIC PLAYER STATE */
.island-music-state {
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.mini-album-art {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff2d55, #ff375f);
  box-shadow: 0 2px 6px rgba(255, 45, 85, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.music-track-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 10px;
  color: var(--lg-canvas-text-muted);
}

.equalizer-wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 16px;
  margin-left: auto;
}

.eq-bar {
  width: 3px;
  background: #34c759;
  border-radius: 2px;
  animation: eq-bounce 1s ease-in-out infinite alternate;
}

.eq-1 { height: 14px; animation-delay: 0.1s; }
.eq-2 { height: 8px;  animation-delay: 0.3s; }
.eq-3 { height: 16px; animation-delay: 0.2s; }
.eq-4 { height: 10px; animation-delay: 0.4s; }

@keyframes eq-bounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* 2. CALL STATE WITH DETACHED SECONDARY DROPLET */
.island-call-state {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.island-call-state.active {
  display: flex;
}

.caller-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #34c759;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  flex-shrink: 0;
}

.caller-info {
  display: flex;
  flex-direction: column;
}

.caller-name {
  font-size: 12px;
  font-weight: 700;
}

.caller-status {
  font-size: 10px;
  color: #34c759;
  font-weight: 600;
}

.call-wave-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(52, 199, 89, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34c759;
  font-size: 11px;
}

/* 3. FACE ID / SPATIAL SCANNER STATE */
.island-faceid-state {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.island-faceid-state.active {
  display: flex;
}

.faceid-cube {
  width: 22px;
  height: 22px;
  border: 2px solid #007aff;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faceid-laser {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #00f2fe;
  box-shadow: 0 0 6px #00f2fe;
  animation: laser-scan 1.2s infinite ease-in-out alternate;
}

@keyframes laser-scan {
  0% { top: 0; }
  100% { top: 100%; }
}

.faceid-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #007aff;
  letter-spacing: 0.05em;
}

/* 4. DYNAMIC ISLAND VOICE QUEUE STATE (Item 115) */
.island-voice-queue-state {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.island-voice-queue-state.active {
  display: flex;
}

.voice-queue-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--lg-voice-queue-amber, #ff9f0a);
}

.voice-queue-amber-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lg-voice-queue-amber, #ff9f0a);
  box-shadow: 0 0 8px var(--lg-voice-queue-amber, #ff9f0a);
  animation: lg-queue-pulse 1.4s infinite ease-in-out;
}

@keyframes lg-queue-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.voice-queue-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.voice-queue-speaker {
  font-size: 11px;
  font-weight: 700;
  color: var(--lg-canvas-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-queue-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--lg-canvas-text-muted);
}

.voice-queue-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.voice-wave-bar {
  width: 2.5px;
  height: 6px;
  background: var(--lg-voice-queue-amber, #ff9f0a);
  border-radius: 1px;
  animation: lg-voice-wave 0.8s infinite ease-in-out alternate;
}

.voice-wave-bar:nth-child(2) { animation-delay: 0.15s; height: 12px; }
.voice-wave-bar:nth-child(3) { animation-delay: 0.3s; height: 9px; }
.voice-wave-bar:nth-child(4) { animation-delay: 0.45s; height: 14px; }
.voice-wave-bar:nth-child(5) { animation-delay: 0.2s; height: 8px; }

@keyframes lg-voice-wave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.3); }
}

.voice-queue-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.voice-queue-pill-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 8px;
  color: var(--lg-canvas-text);
  cursor: pointer;
  transition: all 180ms ease;
}

.voice-queue-pill-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.04);
}

/* ============================================================================
 * PHASE 9: DROPLET SPAWNER CONTROLS
 * ============================================================================ */
.droplet-spawner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.droplet-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-spawn {
  background: var(--lg-glass-elevated);
  border: 1px solid var(--lg-glass-border-subtle);
  color: var(--lg-canvas-text);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: var(--lg-shadow-crisp);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: transform var(--lg-duration-fast) var(--lg-spring-snappy);
}

.btn-spawn:hover {
  transform: scale(1.05);
}

.btn-reset-drop {
  background: var(--lg-glass-interactive);
  padding: 5px 10px;
  opacity: 0.85;
}

.btn-reset-drop:hover {
  opacity: 1;
}

/* ============================================================================
 * PHASE 12: VISIONOS SPATIAL CONTROLS & LIQUID TOGGLE SUITE
 * ============================================================================ */
.card-spatial-controls {
  grid-column: span 6;
  min-height: 280px;
}

@media (max-width: 860px) {
  .card-spatial-controls {
    grid-column: span 12;
  }
}

/* Spatial Segmented Control */
.spatial-seg-container {
  position: relative;
  display: flex;
  background: rgba(0, 0, 0, 0.06);
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid var(--lg-glass-border-subtle);
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.theme-dark .spatial-seg-container {
  background: rgba(255, 255, 255, 0.08);
}

.spatial-seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 9999px;
  background: var(--lg-glass-elevated);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), var(--lg-shadow-rim);
  transition: transform 320ms var(--lg-spring-fluid), width 320ms var(--lg-spring-fluid);
  pointer-events: none;
}

.spatial-seg-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--lg-canvas-text);
  cursor: pointer;
  z-index: 1;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
  transition: color var(--lg-duration-fast) ease;
}

.spatial-seg-tab.active {
  color: var(--lg-canvas-text);
  font-weight: 700;
}

/* Liquid Interactive Row */
.spatial-interactive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.liquid-switch-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--lg-canvas-text-muted);
}

.liquid-switch-track {
  width: 52px;
  height: 30px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.14);
  position: relative;
  cursor: pointer;
  transition: background 250ms ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.theme-dark .liquid-switch-track {
  background: rgba(255, 255, 255, 0.16);
}

.liquid-switch-track.active {
  background: #34c759;
}

.liquid-switch-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transform: scale3d(1, 1, 1);
  transition: transform 250ms var(--lg-spring-fluid), left 250ms var(--lg-spring-fluid);
  will-change: transform, left;
}

.liquid-switch-track.active .liquid-switch-thumb {
  left: calc(100% - 27px);
}

.btn-open-modal {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================================
 * LIQUID GLASS MODAL SHEET (VisionOS Floating Sheet)
 * ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  box-sizing: border-box;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  border-radius: 32px;
  padding: 22px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35), var(--lg-shadow-rim);
  transform: translateY(30px) scale(0.96);
  transition: transform 400ms var(--lg-spring-fluid);
  box-sizing: border-box;
  overflow: hidden;
}

.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-drag-bar {
  width: 38px;
  height: 4.5px;
  border-radius: 3px;
  background: rgba(120, 120, 128, 0.45);
  margin: 0 auto 16px;
  cursor: grab;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close-btn {
  font-size: 13px;
  font-weight: 700;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--lg-canvas-text-muted);
  margin-bottom: 16px;
}

.modal-feature-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-feature-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 10px;
  border-radius: 8px;
}

.theme-dark .modal-feature-badge {
  background: rgba(255, 255, 255, 0.08);
}

.modal-footer {
  width: 100%;
}

@media (max-width: 640px) {
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    max-width: 100vw;
    border-radius: 32px 32px 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 14px));
    transform: translateY(100%);
  }

  .modal-backdrop.active .modal-card {
    transform: translateY(0);
  }
}

/* ============================================================================
 * PHASE 15: SEARCH BAR, VISION DOCK, TOAST & CODE INSPECTOR
 * ============================================================================ */

/* 1. Liquid Glass Search Bar */
.search-bar-wrapper {
  max-width: 480px;
  margin: 0 auto 36px;
  padding: 0 16px;
  box-sizing: border-box;
}

.search-bar-glass {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 9999px;
  border: 1px solid var(--lg-glass-border);
  box-shadow: var(--lg-shadow-ambient), var(--lg-shadow-rim);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.search-bar-glass:focus-within {
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25), var(--lg-shadow-ambient);
}

.search-icon {
  font-size: 14px;
  color: var(--lg-canvas-text-muted);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--lg-canvas-text);
  outline: none;
  min-width: 0;
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--lg-canvas-text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
  opacity: 0.6;
  transition: opacity 150ms ease;
}

.search-clear-btn:hover {
  opacity: 1;
}

.search-empty-feedback {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--lg-canvas-text-muted);
  background: var(--lg-glass-secondary);
  border: 1px solid var(--lg-glass-border-subtle);
  border-radius: 9999px;
  padding: 6px 16px;
  backdrop-filter: blur(var(--lg-blur-sm));
  -webkit-backdrop-filter: blur(var(--lg-blur-sm));
  animation: fade-in-up 200ms var(--lg-spring-fluid);
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Micro-Dither Toggle State */
.dither-disabled .lg-specular-gleam {
  filter: none !important;
}

/* 2. Floating Quick-Action Glass Dock */
.vision-dock-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  pointer-events: none;
}

.vision-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid var(--lg-glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), var(--lg-shadow-rim);
  pointer-events: auto;
}

.dock-item {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--lg-glass-border-subtle);
  background: var(--lg-glass-interactive);
  color: var(--lg-canvas-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: transform 250ms var(--lg-spring-fluid), background 150ms ease;
  flex-shrink: 0;
}

.dock-item:hover {
  transform: scale(1.22) translateY(-6px);
  background: var(--lg-glass-elevated);
}

.dock-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  white-space: nowrap;
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
}

@media (max-width: 640px) {
  .vision-dock-container {
    bottom: 70px;
  }
  .dock-item {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

/* 3. Top Toast Notification */
.toast-glass {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  opacity: 0;
  pointer-events: none;
  z-index: 1500;
  padding: 8px 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--lg-glass-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  transition: transform 350ms var(--lg-spring-fluid), opacity 350ms ease;
}

.toast-glass.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 4. Developer Code Inspector Drawer */
.code-inspector-card {
  max-width: 580px;
}

.code-selector-row {
  margin-bottom: 12px;
}

.code-component-picker {
  margin-bottom: 12px;
}

.code-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--lg-glass-border-subtle);
  background: var(--lg-glass-elevated);
  color: var(--lg-canvas-text);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.code-viewer-container {
  max-height: 220px;
  overflow-y: auto;
  border-radius: 14px;
  background: #0d0d14;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #e0e0ea;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.btn-copy-code {
  font-weight: 700;
  font-size: 12px;
  padding: 10px;
  cursor: pointer;
}

/* ============================================================================
 * V5.0 ULTIMATE SYSTEM COMPONENT ARMORY STYLES
 * ============================================================================ */

/* ----------------------------------------------------------------------------
 * 1. FORMS & INTERACTIVE INPUTS
 * ---------------------------------------------------------------------------- */
.lg-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.lg-input-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--lg-canvas-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.lg-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--lg-glass-border);
  background: var(--lg-glass-secondary);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  position: relative;
  overflow: hidden;
}

.lg-input-box:focus-within {
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.22), var(--lg-shadow-ambient);
}

.lg-input-field {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--lg-canvas-text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  min-width: 0;
}

.lg-input-field::placeholder {
  color: var(--lg-canvas-text-muted);
  opacity: 0.7;
}

.lg-input-clear {
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--lg-canvas-text-muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
  opacity: 0.7;
}

.theme-dark .lg-input-clear {
  background: rgba(255, 255, 255, 0.12);
}

.lg-input-clear:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Droplet Infill Checkbox & Radio */
.lg-selection-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.lg-control-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.lg-checkbox-well {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--lg-glass-border);
  background: var(--lg-glass-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 220ms var(--lg-spring-fluid);
  position: relative;
  overflow: hidden;
  box-shadow: var(--lg-shadow-crisp);
}

.lg-checkbox-droplet {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(135deg, #007aff, #5856d6);
  transform: scale(0);
  transition: transform 260ms cubic-bezier(0.18, 1.45, 0.32, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.lg-control-item.active .lg-checkbox-well {
  border-color: #007aff;
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.35);
}

.lg-control-item.active .lg-checkbox-droplet {
  transform: scale(1);
}

.lg-radio-well {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--lg-glass-border);
  background: var(--lg-glass-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 220ms var(--lg-spring-fluid);
  box-shadow: var(--lg-shadow-crisp);
}

.lg-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34c759;
  transform: scale(0);
  transition: transform 260ms cubic-bezier(0.18, 1.45, 0.32, 1);
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
}

.lg-control-item.active .lg-radio-well {
  border-color: #34c759;
}

.lg-control-item.active .lg-radio-dot {
  transform: scale(1);
}

.lg-control-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-canvas-text);
}

/* Elastic Liquid Stepper */
.lg-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--lg-glass-secondary);
  border: 1px solid var(--lg-glass-border);
  border-radius: 9999px;
  padding: 3px;
  box-shadow: var(--lg-shadow-ambient), var(--lg-shadow-rim);
}

.lg-stepper-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--lg-glass-elevated);
  color: var(--lg-canvas-text);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms var(--lg-spring-snappy), background 150ms ease;
  user-select: none;
}

.lg-stepper-btn:hover {
  background: var(--lg-glass-interactive);
}

.lg-stepper-val {
  min-width: 44px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--lg-canvas-text);
  user-select: none;
}

/* ----------------------------------------------------------------------------
 * 2. NAVIGATION, OVERLAYS & NOTIFICATIONS
 * ---------------------------------------------------------------------------- */

/* Stacked Glass Notification Banners */
.lg-notification-stack {
  position: relative;
  width: 100%;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 8px;
}

.lg-notif-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  transition: transform 350ms var(--lg-spring-fluid), opacity 350ms ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), var(--lg-shadow-rim);
}

.lg-notif-card:active {
  cursor: grabbing;
}

.lg-notif-card[data-depth="0"] {
  z-index: 3;
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lg-notif-card[data-depth="1"] {
  z-index: 2;
  transform: translateY(-14px) scale(0.95);
  opacity: 0.85;
}

.lg-notif-card[data-depth="2"] {
  z-index: 1;
  transform: translateY(-28px) scale(0.90);
  opacity: 0.65;
}

.notif-leading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notif-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #007aff, #00c7be);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 122, 255, 0.35);
}

.notif-app-icon.alt-color {
  background: linear-gradient(135deg, #ff9500, #ff2d55);
  box-shadow: 0 3px 8px rgba(255, 149, 0, 0.35);
}

.notif-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.notif-title {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-desc {
  font-size: 11px;
  color: var(--lg-canvas-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--lg-canvas-text-muted);
  flex-shrink: 0;
}

/* Liquid Spring Accordion */
.lg-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.lg-accordion-item {
  border-radius: 18px;
  overflow: hidden;
  transition: all 300ms var(--lg-spring-fluid);
}

.lg-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--lg-canvas-text);
}

.lg-accordion-chevron {
  font-size: 12px;
  transition: transform 300ms var(--lg-spring-fluid);
  color: var(--lg-canvas-text-muted);
}

.lg-accordion-item.open .lg-accordion-chevron {
  transform: rotate(90deg);
  color: #007aff;
}

.lg-accordion-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 350ms var(--lg-spring-fluid), opacity 250ms ease;
  padding: 0 16px;
}

.lg-accordion-item.open .lg-accordion-body {
  max-height: 140px;
  opacity: 1;
  padding-bottom: 14px;
}

.accordion-inner-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--lg-canvas-text-muted);
}

/* ----------------------------------------------------------------------------
 * 3. DATA VISUALIZATION & METRICS
 * ---------------------------------------------------------------------------- */

/* KPI Stat Card with Glowing Sparkline */
.kpi-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.kpi-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.kpi-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 9999px;
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.sparkline-wrapper {
  width: 100%;
  height: 60px;
  margin-top: 8px;
  position: relative;
}

.sparkline-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sparkline-stroke {
  fill: none;
  stroke: #007aff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0, 122, 255, 0.45));
}

.sparkline-area {
  fill: url(#sparkline-gradient);
  opacity: 0.35;
}

/* Circular Liquid Progress Ring */
.progress-ring-card-body {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  padding: 10px 0;
}

.progress-ring-box {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.progress-ring-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 8;
}

.theme-dark .progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.12);
}

.progress-ring-fill {
  fill: none;
  stroke: url(#progress-gradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 238;
  stroke-dashoffset: 71; /* 70% complete */
  transition: stroke-dashoffset 800ms var(--lg-spring-fluid);
  filter: drop-shadow(0 2px 8px rgba(0, 122, 255, 0.4));
}

.progress-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--lg-canvas-text);
}

.progress-subtext {
  font-size: 9px;
  color: var(--lg-canvas-text-muted);
  font-weight: 600;
}

/* Metablob Avatar Clumping */
.avatar-clump-zone {
  display: flex;
  align-items: center;
  padding: 12px 0 6px;
  filter: url(#apple-fluid-metablob);
}

.clump-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin-inline-start: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  user-select: none;
  transition: transform 200ms var(--lg-spring-snappy);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.clump-avatar:first-child {
  margin-inline-start: 0;
}

.clump-avatar:hover {
  transform: translateY(-4px) scale(1.15);
  z-index: 10;
}

.av-1 { background: linear-gradient(135deg, #ff2d55, #ff375f); }
.av-2 { background: linear-gradient(135deg, #007aff, #5856d6); }
.av-3 { background: linear-gradient(135deg, #34c759, #30b0c7); }
.av-4 { background: linear-gradient(135deg, #ff9500, #ffcc00); }

/* Liquid Wave Shimmer Skeleton */
.skeleton-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(0, 0, 0, 0.05) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite ease-in-out;
  max-width: 100%;
  box-sizing: border-box;
}

.theme-dark .skeleton-line {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.06) 100%);
  background-size: 200% 100%;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-45 { width: 45%; }

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ----------------------------------------------------------------------------
 * 4. MEDIA CONTROLLER (Compact Liquid Glass Mini-Player)
 * ---------------------------------------------------------------------------- */
.card-media-player {
  grid-column: span 6;
  min-height: 280px;
}

@media (max-width: 860px) {
  .card-media-player {
    grid-column: span 12;
  }
}

.media-player-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.media-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.media-artwork {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #af52de, #007aff);
  box-shadow: 0 6px 18px rgba(175, 82, 222, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
}

.media-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.media-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-artist {
  font-size: 12px;
  color: var(--lg-canvas-text-muted);
}

.media-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.media-btn {
  background: var(--lg-glass-elevated);
  border: 1px solid var(--lg-glass-border-subtle);
  color: var(--lg-canvas-text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: transform 120ms var(--lg-spring-snappy), background 150ms ease;
}

.media-btn:hover {
  transform: scale(1.1);
}

.media-btn.play-pause-btn {
  width: 48px;
  height: 48px;
  font-size: 18px;
  background: #007aff;
  color: white;
  border: none;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.4);
}

.media-scrubber-track {
  height: 6px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
  position: relative;
  cursor: pointer;
  margin: 4px 0;
}

.theme-dark .media-scrubber-track {
  background: rgba(255, 255, 255, 0.12);
}

.media-scrubber-fill {
  height: 100%;
  width: 42%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #007aff, #af52de);
  position: absolute;
  left: 0;
  top: 0;
}

.media-time-row {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--lg-canvas-text-muted);
}

/* ----------------------------------------------------------------------------
 * 5. FLOATING MOBILE LIQUID TAB BAR
 * ---------------------------------------------------------------------------- */
.lg-mobile-tabbar-container {
  display: none;
}

@media (max-width: 640px) {
  .lg-mobile-tabbar-container {
    display: flex;
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 10px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    pointer-events: none;
    width: calc(100vw - 20px);
    max-width: 420px;
  }

  .lg-mobile-tabbar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    padding: 5px 6px;
    border-radius: 9999px;
    background: var(--lg-glass-secondary);
    backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
    -webkit-backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
    border: 1px solid var(--lg-glass-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), var(--lg-shadow-rim);
    position: relative;
    pointer-events: auto;
    box-sizing: border-box;
  }

  .mobile-tab-btn {
    border: none;
    background: transparent;
    color: var(--lg-canvas-text);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 2px;
    min-height: 44px;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    position: relative;
    z-index: 2;
    transition: color 150ms ease;
    flex: 1 1 0;
    min-width: 0;
    user-select: none;
  }

  .mobile-tab-btn.active {
    font-weight: 700;
    color: var(--lg-canvas-text);
  }

  .mobile-tab-icon {
    font-size: 15px;
    line-height: 1;
  }

  .mobile-tab-label {
    font-size: 9.5px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .mobile-tab-pill-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 6px;
    width: calc((100% - 12px) / 5);
    border-radius: 9999px;
    background: var(--lg-glass-elevated);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), var(--lg-shadow-rim);
    border: 1px solid var(--lg-glass-border);
    transition: transform 300ms var(--lg-spring-fluid);
    z-index: 1;
    pointer-events: none;
  }
}

/* ============================================================================
 * STATE PERFECTION PASS (v5.1 AUDIT SUITE)
 * ============================================================================ */

/* 1. Universal Concentric Focus Rings */
:focus-visible {
  outline: 2px solid var(--lg-focus-ring, #007aff) !important;
  outline-offset: 3px !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.lg-control-item:focus-visible,
.mobile-tab-btn:focus-visible,
.seg-btn:focus-visible,
.nav-item:focus-visible,
.dock-item:focus-visible,
.lg-accordion-header:focus-visible,
.lg-stepper-btn:focus-visible,
.play-pause-btn:focus-visible,
.media-btn:focus-visible {
  outline: 2px solid var(--lg-focus-ring, #007aff) !important;
  outline-offset: 2.5px !important;
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.45) !important;
}

/* 2. Universal Disabled States */
[disabled],
.is-disabled,
[aria-disabled="true"] {
  opacity: 0.38 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  filter: grayscale(0.6) !important;
}

.lg-stepper-btn.is-disabled {
  opacity: 0.28 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: transparent !important;
}

/* 3. Input Validation States */
.lg-input-box.has-error {
  border-color: var(--lg-error-border, #ff3b30) !important;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.22), var(--lg-shadow-ambient) !important;
}

.lg-input-box.has-success {
  border-color: var(--lg-success-border, #34c759) !important;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.22), var(--lg-shadow-ambient) !important;
}

/* 4. Media Player Playing & Pulsing States */
.card-media-player.is-playing .media-artwork {
  box-shadow: 0 0 24px rgba(0, 122, 255, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  animation: lg-artwork-pulse 2.2s ease-in-out infinite;
}

@keyframes lg-artwork-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 12px rgba(0, 122, 255, 0.3));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 6px 18px rgba(0, 122, 255, 0.6));
  }
}

.card-media-player.is-playing .play-pause-btn {
  background: linear-gradient(135deg, #007aff, #34c759);
  box-shadow: 0 4px 16px rgba(52, 199, 89, 0.45);
}

.media-scrubber-track {
  cursor: pointer;
  position: relative;
}

.media-scrubber-track:hover .media-scrubber-fill {
  background: linear-gradient(90deg, #007aff, #5856d6);
  filter: brightness(1.15);
}

/* 5. Avatar Clump Hover Spring Fan-Out */
.avatar-clump-zone {
  transition: gap 240ms var(--lg-spring-fluid);
}

.avatar-clump-zone .clump-avatar {
  transition: transform 260ms var(--lg-spring-fluid), box-shadow 200ms ease;
}

.avatar-clump-zone:hover .clump-avatar:nth-child(2) {
  transform: translateX(-5px) scale(1.04);
}
.avatar-clump-zone:hover .clump-avatar:nth-child(3) {
  transform: translateX(-10px) scale(1.08);
}
.avatar-clump-zone:hover .clump-avatar:nth-child(4) {
  transform: translateX(-15px) scale(1.12);
}

/* 6. Accessibility & Reduced Motion Guard */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .card-media-player.is-playing .media-artwork {
    animation: none !important;
  }
}

/* ============================================================================
 * ITEM 113 & 114: EDUCATIONAL & SPATIAL WHITEBOARD & ROUNDTABLE
 * ============================================================================ */
.card-classroom-spatial {
  grid-column: span 12;
  position: relative;
  overflow: visible;
}

.classroom-spatial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 860px) {
  .classroom-spatial-grid {
    grid-template-columns: 1fr;
  }
}

/* 113. Floating Glass Tool Palette (.lg-whiteboard-palette) */
.whiteboard-stage-canvas {
  position: relative;
  height: 230px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

.whiteboard-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  opacity: 0.6;
}

.theme-dark .whiteboard-grid-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
}

.whiteboard-stage-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  border-radius: 6px;
  font-weight: 600;
}

.whiteboard-drawing-preview {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-equation {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--lg-canvas-text);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.lg-whiteboard-palette {
  position: relative;
  z-index: 3;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--lg-palette-bg, rgba(255, 255, 255, 0.65));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--lg-palette-border, rgba(255, 255, 255, 0.75));
  border-radius: 18px;
  box-shadow: var(--lg-palette-shadow);
  transition: transform 200ms var(--lg-spring-fluid);
}

.palette-tool-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--lg-canvas-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  transition: all 180ms ease;
}

.palette-tool-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.palette-tool-btn.active {
  background: rgba(0, 122, 255, 0.15);
  border-color: rgba(0, 122, 255, 0.5);
  color: #007aff;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.palette-divider {
  width: 1px;
  height: 20px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 2px;
}

.theme-dark .palette-divider {
  background: rgba(255, 255, 255, 0.15);
}

.palette-colors-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.color-droplet-well {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 160ms var(--lg-spring-fluid);
}

.color-droplet-well:hover,
.color-droplet-well.active {
  transform: scale(1.35);
  box-shadow: 0 0 8px currentColor;
}

/* 114. Spatial Roundtable Collaboration Pod (.lg-roundtable-pod) */
.lg-roundtable-pod {
  position: relative;
  height: 230px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pod-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pod-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 6px #34c759;
}

.pod-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--lg-canvas-text);
}

.roundtable-center-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
}

.roundtable-cluster {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Spatial Pod Circle Rim */
.roundtable-glass-table {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-spatial-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--lg-canvas-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Active Speaking Acoustic Halo */
.lg-pod-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(52, 199, 89, 0.8);
  box-shadow: var(--lg-halo-glow-speaking);
  animation: lg-pod-halo-pulse 1.8s infinite ease-out;
  pointer-events: none;
}

@keyframes lg-pod-halo-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Pod Student Avatars positioned around table */
.pod-seat {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--lg-glass-elevated);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--lg-canvas-text);
  cursor: pointer;
  transition: transform 220ms var(--lg-spring-fluid);
}

.pod-seat:hover {
  transform: scale(1.15) !important;
  z-index: 10;
}

.pod-seat-top    { top: -2px; left: calc(50% - 19px); }
.pod-seat-bottom { bottom: -2px; left: calc(50% - 19px); }
.pod-seat-left   { left: -2px; top: calc(50% - 19px); }
.pod-seat-right  { right: -2px; top: calc(50% - 19px); }

.pod-seat.is-speaking {
  border-color: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.4), 0 4px 16px rgba(52, 199, 89, 0.5);
}

.pod-seat.is-speaking::after {
  content: '🎙';
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 9px;
  background: #34c759;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 1px solid white;
}

.pod-footer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pod-whisper-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--lg-canvas-text);
  cursor: pointer;
  transition: all 180ms ease;
}

.pod-whisper-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.03);
}

/* ============================================================================
 * ITEM 116: LIVE INSTANT QUIZ & TIMED POLL CARD (.lg-instant-quiz)
 * ============================================================================ */
.card-instant-quiz {
  grid-column: span 6;
  position: relative;
  overflow: visible;
}

@media (max-width: 860px) {
  .card-instant-quiz {
    grid-column: span 12;
  }
}

.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.quiz-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-timer-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.35);
  color: var(--lg-voice-queue-amber, #ff9f0a);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
}

.quiz-timer-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lg-voice-queue-amber, #ff9f0a);
  animation: lg-queue-pulse 1.2s infinite ease-in-out;
}

.quiz-question-box {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
}

.theme-dark .quiz-question-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.quiz-question-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--lg-canvas-text);
  line-height: 1.45;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option-btn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 180ms var(--lg-spring-fluid);
  text-align: left;
}

.theme-dark .quiz-option-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.quiz-option-btn:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

.quiz-option-btn.selected {
  border-color: var(--lg-quiz-active, #0071e3);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.25);
}

.quiz-option-btn.correct {
  border-color: var(--lg-quiz-correct, #34c759);
}

/* Histogram vote fill bar inside option */
.quiz-histogram-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 113, 227, 0.15);
  border-radius: 12px;
  pointer-events: none;
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.quiz-option-btn.correct .quiz-histogram-fill {
  background: rgba(52, 199, 89, 0.18);
}

.quiz-option-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-letter-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lg-canvas-text);
}

.theme-dark .quiz-letter-badge {
  background: rgba(255, 255, 255, 0.1);
}

.quiz-option-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-canvas-text);
}

.quiz-option-stats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--lg-canvas-text-muted);
}

/* ============================================================================
 * ITEM 117: PEDAGOGICAL COMPREHENSION GAUGE (.lg-pedagogical-gauge)
 * ============================================================================ */
.card-pedagogical-gauge {
  grid-column: span 6;
  position: relative;
  overflow: visible;
}

@media (max-width: 860px) {
  .card-pedagogical-gauge {
    grid-column: span 12;
  }
}

.gauge-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.gauge-metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gauge-stat-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gauge-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gauge-ring-mini {
  width: 52px;
  height: 52px;
  position: relative;
  flex-shrink: 0;
}

.gauge-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 800;
  color: var(--lg-canvas-text);
}

.gauge-legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--lg-canvas-text-muted);
}

.gauge-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  display: inline-block;
  box-shadow: 0 0 6px #34c759;
}

.gauge-dot-amber {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff9f0a;
  display: inline-block;
  box-shadow: 0 0 6px #ff9f0a;
}

.confusion-trigger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
}

.theme-dark .confusion-trigger-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-confusion-pulse {
  background: rgba(255, 159, 10, 0.15);
  border: 1px solid rgba(255, 159, 10, 0.4);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ff9f0a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 180ms var(--lg-spring-fluid);
}

.btn-confusion-pulse:hover {
  background: rgba(255, 159, 10, 0.3);
  transform: scale(1.04);
}

.btn-confusion-pulse:active {
  transform: scale(0.96);
}

/* ============================================================================
 * ITEM 118: ROLL-CALL & ATTENDANCE QUICK MATRIX (.lg-attendance-grid)
 * ============================================================================ */
.card-attendance-grid {
  grid-column: span 12;
  position: relative;
  overflow: visible;
}

.attendance-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.attendance-counters-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attendance-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: var(--lg-font-mono);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--lg-canvas-text);
}

.theme-dark .attendance-pill-badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.badge-present { color: var(--lg-attendance-present, #34c759); border-color: rgba(52, 199, 89, 0.3); }
.badge-absent  { color: var(--lg-attendance-absent, #ff3b30); border-color: rgba(255, 59, 48, 0.3); }
.badge-tardy   { color: var(--lg-attendance-tardy, #ff9f0a); border-color: rgba(255, 159, 10, 0.3); }
.badge-excused { color: var(--lg-attendance-excused, #5856d6); border-color: rgba(88, 86, 214, 0.3); }

.attendance-matrix-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.student-roll-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  transition: all 180ms ease;
}

.theme-dark .student-roll-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.student-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lg-glass-elevated);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--lg-canvas-text);
}

.student-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--lg-canvas-text);
}

.status-chip-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms var(--lg-spring-fluid);
}

.status-chip-btn:hover {
  transform: scale(1.08);
}

.status-chip-btn.status-p {
  background: rgba(52, 199, 89, 0.15);
  border-color: #34c759;
  color: #34c759;
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.25);
}

.status-chip-btn.status-a {
  background: rgba(255, 59, 48, 0.15);
  border-color: #ff3b30;
  color: #ff3b30;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.25);
}

.status-chip-btn.status-t {
  background: rgba(255, 159, 10, 0.15);
  border-color: #ff9f0a;
  color: #ff9f0a;
  box-shadow: 0 0 8px rgba(255, 159, 10, 0.25);
}

.status-chip-btn.status-e {
  background: rgba(88, 86, 214, 0.15);
  border-color: #5856d6;
  color: #5856d6;
  box-shadow: 0 0 8px rgba(88, 86, 214, 0.25);
}

/* ============================================================================
 * ITEMS 130 & 131: SPATIAL GEO-GRID RADAR & 3D MAP MEDALS (.lg-map-medal-pin)
 * ============================================================================ */
.card-georank-radar {
  grid-column: span 7;
  position: relative;
  overflow: visible;
}

@media (max-width: 860px) {
  .card-georank-radar {
    grid-column: span 12;
  }
}

.radar-container {
  margin-top: 14px;
  position: relative;
  width: 100%;
}

.radar-grid-map {
  position: relative;
  width: 100%;
  min-height: 340px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 50%, rgba(13, 20, 36, 0.95) 0%, rgba(5, 7, 15, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4), 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.theme-dark .radar-grid-map {
  background: radial-gradient(circle at 50% 50%, rgba(20, 24, 38, 0.95) 0%, #06080e 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

.radar-map-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(0, 122, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 122, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center center;
}

.radar-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(52, 199, 89, 0.7), transparent);
  box-shadow: 0 0 12px #34c759;
  animation: radar-sweep 4s infinite linear;
}

@keyframes radar-sweep {
  0% { transform: translateY(0); opacity: 0.8; }
  50% { opacity: 1; }
  100% { transform: translateY(340px); opacity: 0.8; }
}

.radar-pins-layer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  justify-items: center;
  align-items: center;
  padding: 10px 0;
}

/* 3D Apple Liquid Glass Map Medal Pin */
.lg-map-medal-pin {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  font-family: var(--lg-font-mono);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 200ms var(--lg-spring-fluid), box-shadow 200ms ease;
  user-select: none;
  outline: none;
}

.lg-map-medal-pin::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 3px;
  right: 3px;
  height: 40%;
  border-radius: 7px 7px 4px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.lg-map-medal-pin:hover {
  transform: translateY(-3px) scale(1.18);
  z-index: 10;
}

.pin-medal-green {
  background: radial-gradient(circle at 35% 35%, #34c759 0%, #1e7033 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.55), inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.pin-medal-yellow {
  background: radial-gradient(circle at 35% 35%, #ffcc00 0%, #d47b00 100%);
  color: #1a1a1c;
  box-shadow: 0 4px 14px rgba(255, 149, 0, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.pin-medal-red {
  background: radial-gradient(circle at 35% 35%, #ff3b30 0%, #ab170f 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 59, 48, 0.55), inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.pin-medal-active {
  box-shadow: 0 0 0 3px #007aff, 0 6px 20px rgba(0, 122, 255, 0.6) !important;
  transform: scale(1.15) !important;
}

/* VisionOS Floating Street Inspector Dock */
.lg-street-inspector-dock {
  position: relative;
  z-index: 3;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), var(--lg-shadow-rim);
}

.inspector-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inspect-pin-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--lg-font-mono);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: white;
  flex-shrink: 0;
}

.bg-medal-green { background: #34c759; box-shadow: 0 0 8px #34c759; }
.bg-medal-yellow { background: #ff9500; box-shadow: 0 0 8px #ff9500; }
.bg-medal-red { background: #ff3b30; box-shadow: 0 0 8px #ff3b30; }

.inspect-meta {
  display: flex;
  flex-direction: column;
}

.inspect-street-title {
  font-size: 12.5px;
  font-weight: 700;
  color: white;
}

.inspect-leader-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
}

.btn-reclaim-zone-pill {
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(52, 199, 89, 0.4);
  background: rgba(52, 199, 89, 0.18);
  color: #34c759;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms var(--lg-spring-fluid);
  white-space: nowrap;
}

.btn-reclaim-zone-pill:hover {
  background: rgba(52, 199, 89, 0.32);
  transform: scale(1.05);
}

/* ============================================================================
 * ITEM 132: INTERACTIVE REVENUE BATTLE SIMULATOR (.lg-zone-reclaim-slider)
 * ============================================================================ */
.card-reclaim-battle {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .card-reclaim-battle {
    grid-column: span 12;
  }
}

.battle-simulator-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.slider-control-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.03);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--lg-glass-border-subtle);
}

.theme-dark .slider-control-card {
  background: rgba(255, 255, 255, 0.04);
}

.slider-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-metric-label {
  font-family: var(--lg-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--lg-canvas-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.slider-val-badge {
  font-family: var(--lg-font-mono);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--lg-glass-border-subtle);
  letter-spacing: -0.01em;
}

.theme-dark .slider-val-badge {
  background: rgba(255, 255, 255, 0.06);
}

.text-emerald { color: #34c759; }
.text-blue { color: #007aff; }

/* Tactile 26px Metallic Specular Range Slider */
.lg-zone-reclaim-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.1);
  outline: none;
  margin: 6px 0;
  cursor: pointer;
  transition: background 150ms ease;
}

.theme-dark .lg-zone-reclaim-slider {
  background: rgba(255, 255, 255, 0.14);
}

.lg-zone-reclaim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #d8d8de 100%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28), inset 0 -1px 2px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 160ms var(--lg-spring-fluid);
}

.lg-zone-reclaim-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.slider-ticks-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--lg-font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--lg-canvas-text-muted);
  letter-spacing: 0.02em;
}

.revenue-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.revenue-kpi-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--lg-glass-elevated);
  border: 1px solid var(--lg-glass-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.highlight-box {
  background: rgba(52, 199, 89, 0.06);
  border-color: rgba(52, 199, 89, 0.35);
  box-shadow: 0 4px 18px rgba(52, 199, 89, 0.08);
}

.theme-dark .highlight-box {
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.3);
}

.kpi-micro-label {
  font-family: var(--lg-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--lg-canvas-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.kpi-metric-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.kpi-currency-symbol {
  font-family: var(--lg-font-sans);
  font-size: 18px;
  font-weight: 700;
  color: #34c759;
  line-height: 1;
}

.kpi-giant-stat {
  font-family: var(--lg-font-mono);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--lg-canvas-text);
}

.kpi-unit-tag {
  font-family: var(--lg-font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--lg-canvas-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ============================================================================
 * ITEM 133: LIQUID CRYPTO INVOICE (.lg-crypto-invoice-card)
 * ============================================================================ */
.card-crypto-invoice {
  grid-column: span 5;
}

@media (max-width: 860px) {
  .card-crypto-invoice {
    grid-column: span 12;
  }
}

.crypto-invoice-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.invoice-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.invoice-status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invoice-plan-chip {
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(0, 122, 255, 0.15);
  color: #007aff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.invoice-id-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--lg-canvas-text-muted);
}

.invoice-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #ff9500;
}

.crypto-amount-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.crypto-amount-num {
  font-family: var(--lg-font-mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--lg-canvas-text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.crypto-currency-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #34c759;
}

.crypto-address-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.address-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--lg-canvas-text-muted);
}

.address-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--lg-glass-border-subtle);
}

.theme-dark .address-pill-row {
  background: rgba(255, 255, 255, 0.05);
}

.address-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--lg-canvas-text);
}

.btn-copy-address {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--lg-glass-border);
  background: var(--lg-glass-elevated);
  color: var(--lg-canvas-text);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease;
}

.btn-copy-address:hover {
  transform: scale(1.08);
}

.btn-simulate-webhook {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 122, 255, 0.35);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.15) 0%, rgba(88, 86, 214, 0.15) 100%);
  color: #007aff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms var(--lg-spring-fluid);
}

.btn-simulate-webhook:hover {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.25) 0%, rgba(88, 86, 214, 0.25) 100%);
  transform: translateY(-1px);
}

.invoice-verified-badge {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(52, 199, 89, 0.18);
  border: 1px solid rgba(52, 199, 89, 0.4);
  color: #34c759;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  animation: badge-appear 300ms var(--lg-spring-fluid);
}

@keyframes badge-appear {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================================
 * ITEM 134: HIGH-DENSITY GLASS LEAD VAULT TABLE (.lg-lead-vault-table)
 * ============================================================================ */
.card-lead-vault {
  grid-column: span 7;
}

@media (max-width: 860px) {
  .card-lead-vault {
    grid-column: span 12;
  }
}

.lead-vault-table-wrapper {
  margin-top: 14px;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--lg-glass-border-subtle);
  background: rgba(0, 0, 0, 0.02);
}

.theme-dark .lead-vault-table-wrapper {
  background: rgba(255, 255, 255, 0.02);
}

.lg-lead-vault-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11.5px;
  min-width: 520px;
}

.lg-lead-vault-table th {
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--lg-canvas-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--lg-glass-border-subtle);
  background: rgba(0, 0, 0, 0.03);
}

.theme-dark .lg-lead-vault-table th {
  background: rgba(255, 255, 255, 0.04);
}

.lg-lead-vault-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--lg-glass-border-subtle);
  color: var(--lg-canvas-text);
  vertical-align: middle;
}

.agency-cell {
  display: flex;
  flex-direction: column;
}

.agency-title {
  font-weight: 700;
  font-size: 12px;
}

.agency-sub {
  font-size: 9.5px;
  color: var(--lg-canvas-text-muted);
}

.archetype-chip {
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-fox { background: rgba(255, 149, 0, 0.15); color: #ff9500; }
.chip-eagle { background: rgba(0, 122, 255, 0.15); color: #007aff; }
.chip-hippo { background: rgba(142, 142, 147, 0.15); color: #8e8e93; }

.blind-count-badge {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
}

.btn-trojan-email {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--lg-glass-border);
  background: var(--lg-glass-elevated);
  color: var(--lg-canvas-text);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}

.btn-trojan-email:hover {
  background: rgba(0, 122, 255, 0.15);
  border-color: #007aff;
  color: #007aff;
}

/* ============================================================================
   CARD 22: GOLDEN ANCHOR PRIMITIVES & ANTI-SLOP (Items 135–138)
   ============================================================================ */

.card-anchor-primitives {
  grid-column: span 12;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Item 136: Metric Strip Demo */
.lg-metric-strip-demo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lg-glass-border);
  border-radius: 18px;
  overflow: hidden;
  box-sizing: border-box;
}

.lg-metric-item {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
  box-sizing: border-box;
}

.lg-metric-item:last-child {
  border-right: none;
}

.lg-metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lg-canvas-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lg-metric-val-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.lg-metric-val {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--lg-canvas-text);
  line-height: 1.1;
}

.lg-metric-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chip-green {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.chip-cyan {
  background: rgba(0, 199, 190, 0.15);
  color: #00c7be;
  border: 1px solid rgba(0, 199, 190, 0.3);
}

.chip-purple {
  background: rgba(175, 82, 222, 0.15);
  color: #af52de;
  border: 1px solid rgba(175, 82, 222, 0.3);
}

.lg-metric-sub {
  font-size: 11px;
  color: var(--lg-canvas-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Item 135: Minimalist Frosted Glass Data Table */
.lg-minimal-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lg-glass-border);
  border-radius: 18px;
  padding: 6px;
  box-sizing: border-box;
}

.lg-minimal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.lg-minimal-table th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lg-canvas-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.lg-minimal-table td {
  padding: 12px 14px;
  color: var(--lg-canvas-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.lg-minimal-table tr:last-child td {
  border-bottom: none;
}

.lg-minimal-table code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11.5px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-anchor-action {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--lg-glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--lg-canvas-text);
  cursor: pointer;
  transition: all 140ms ease;
}

.btn-anchor-action:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Dual Grid for Primitives 3 & 4 */
.anchor-primitives-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  box-sizing: border-box;
}

.lg-sub-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lg-glass-border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  min-width: 0;
}

.sub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sub-card-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lg-canvas-muted);
}

.sub-card-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--lg-canvas-muted);
}

.sub-card-title {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--lg-canvas-text);
}

.sub-card-desc {
  margin: 0 0 16px 0;
  font-size: 12px;
  color: var(--lg-canvas-muted);
  line-height: 1.45;
}

.btn-primitive-primary {
  width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(225, 230, 240, 0.92) 100%);
  color: #0b0d14;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 140ms cubic-bezier(0.18, 1.45, 0.32, 1), box-shadow 140ms ease;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Vazirmatn', -apple-system, sans-serif;
  letter-spacing: -0.01em;
}

.btn-primitive-primary:hover {
  transform: translateY(-1.5px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-primitive-primary:active {
  transform: scale(0.97);
}

/* Tactile Form Demo — Luminous Frosted Wells */
.tactile-form-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tactile-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tactile-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--lg-canvas-muted);
  font-family: 'Vazirmatn', -apple-system, sans-serif;
  letter-spacing: -0.01em;
}

.tactile-input-well {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--lg-canvas-text);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  outline: none;
  font-family: 'Vazirmatn', -apple-system, sans-serif;
  transition: all 180ms ease;
}

.tactile-input-well:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.08), inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-tactile-submit {
  width: 100%;
  padding: 11px 16px;
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  color: var(--lg-canvas-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms ease;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Vazirmatn', -apple-system, sans-serif;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-tactile-submit:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.btn-tactile-submit:active {
  transform: scale(0.97);
}

@media (max-width: 768px) {
  .lg-metric-strip-demo {
    grid-template-columns: 1fr;
  }
  .lg-metric-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .lg-metric-item:last-child {
    border-bottom: none;
  }
  .anchor-primitives-dual-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
 * CARD 23: ECOSYSTEM DOMAIN MASTER SPECIMENS (Items 141–145)
 * ============================================================================ */
.card-domain-specimens {
  grid-column: span 12;
  margin-top: 14px;
}

.domain-specimens-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 18px;
  box-sizing: border-box;
}

.domain-specimen-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lg-glass-border);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  min-width: 0;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.2);
  transition: transform 200ms ease, border-color 200ms ease;
}

.domain-specimen-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.specimen-span-full {
  grid-column: 1 / -1;
}

.specimen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.specimen-title {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--lg-canvas-text);
  font-family: 'Vazirmatn', -apple-system, sans-serif;
}

.specimen-desc {
  margin: 0 0 16px 0;
  font-size: 12.5px;
  color: var(--lg-canvas-muted);
  line-height: 1.5;
  font-family: 'Vazirmatn', -apple-system, sans-serif;
}

/* Island Primitive Specimen in Card 22 */
.lg-island-primitive-demo {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lg-glass-border);
  border-radius: 20px;
}

.island-primitive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.island-primitive-pills {
  display: flex;
  gap: 6px;
}

.btn-island-mode-chip {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid var(--lg-glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--lg-canvas-text);
  cursor: pointer;
  transition: all 160ms ease;
}

.btn-island-mode-chip.active {
  background: #0071E3;
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.island-primitive-preview-well {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.island-preview-capsule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 9999px;
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
}

.island-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 8px #34C759;
  display: inline-block;
}

.island-preview-dot.pulse {
  animation: lg-pulse 2s infinite ease-in-out;
}

.island-preview-text {
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.btn-island-expand-pill {
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 11px;
  cursor: pointer;
  transition: all 140ms ease;
}

.btn-island-expand-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

.island-preview-drawer {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  box-sizing: border-box;
}

.drawer-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  font-family: ui-monospace, monospace;
}

.btn-drawer-tactile {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: none;
  background: #0071E3;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
}

@media (max-width: 900px) {
  .domain-specimens-grid {
    grid-template-columns: 1fr;
  }
}







