/* ═══════════════════════════════════════════════════════════════════ */
/* ULAMORA TIME STUDIO — CHRONO-PHYSICS & TEMPORAL DYNAMICS STYLESHEET */
/* Obsidian Cyan & Quantum Violet Temporal Aesthetic                   */
/* ═══════════════════════════════════════════════════════════════════ */

:root {
  --chrono-bg-void: #05070d;
  --chrono-bg-blade: rgba(9, 13, 22, 0.94);
  --chrono-bg-card: rgba(16, 23, 38, 0.65);
  --chrono-bg-card-hover: rgba(24, 34, 56, 0.85);
  --chrono-border: rgba(255, 255, 255, 0.08);
  --chrono-border-subtle: rgba(255, 255, 255, 0.04);
  --chrono-border-focus: rgba(0, 232, 255, 0.45);

  --chrono-cyan: #00e8ff;
  --chrono-cyan-glow: rgba(0, 232, 255, 0.35);
  --chrono-purple: #c084fc;
  --chrono-purple-glow: rgba(192, 132, 252, 0.35);
  --chrono-amber: #fbbf24;
  --chrono-emerald: #10b981;
  --chrono-rose: #f43f5e;

  --chrono-text-main: #f1f5f9;
  --chrono-text-muted: #94a3b8;
  --chrono-text-dim: #64748b;

  --chrono-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --chrono-font-sans: 'Inter', system-ui, sans-serif;
  --chrono-font-display: 'Space Grotesk', 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--chrono-bg-void);
  color: var(--chrono-text-main);
  font-family: var(--chrono-font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 232, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 1. TOP HUD NAVBAR                                                   */
/* ═══════════════════════════════════════════════════════════════════ */
.top-hud-navbar {
  height: 56px;
  background: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--chrono-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  position: relative;
}

.hud-left-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--chrono-border-subtle);
  transition: all 0.2s ease;
}
.brand-lockup:hover {
  background: rgba(0, 232, 255, 0.06);
  border-color: rgba(0, 232, 255, 0.25);
}
.brand-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.brand-title {
  font-family: var(--chrono-font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ffffff;
}
.brand-divider {
  width: 1px;
  height: 14px;
  background: var(--chrono-border);
}
.brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--chrono-cyan);
  background: rgba(0, 232, 255, 0.12);
  border: 1px solid rgba(0, 232, 255, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Studio Navigation Tabs */
.hud-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hud-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--chrono-font-sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--chrono-text-muted);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}
.hud-nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.hud-nav-tab.active {
  color: var(--chrono-cyan);
  background: rgba(0, 232, 255, 0.1);
  border-color: rgba(0, 232, 255, 0.3);
  font-weight: 600;
}
.tab-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chrono-cyan);
  box-shadow: 0 0 8px var(--chrono-cyan);
}

/* Right HUD Actions */
.hud-toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--chrono-border);
  border-radius: 8px;
  padding: 3px;
}

.hud-tool-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--chrono-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hud-tool-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}
.hud-tool-btn.active {
  color: var(--chrono-cyan);
  background: rgba(0, 232, 255, 0.15);
  border-color: rgba(0, 232, 255, 0.4);
}

.hud-divider {
  width: 1px;
  height: 20px;
  background: var(--chrono-border);
  margin: 0 4px;
}

/* Language Selector */
.hud-lang-inline {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lang-inline-btn {
  background: transparent;
  border: none;
  font-family: var(--chrono-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--chrono-text-dim);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.lang-inline-btn:hover {
  color: #ffffff;
}
.lang-inline-btn.active {
  color: var(--chrono-cyan);
  font-weight: 700;
}
.lang-inline-sep {
  font-family: var(--chrono-font-mono);
  font-size: 10px;
  color: var(--chrono-text-dim);
}

.hud-mobile-menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--chrono-border);
  border-radius: 8px;
  color: var(--chrono-text-main);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 2. THREE-BLADE SHELL LAYOUT                                         */
/* ═══════════════════════════════════════════════════════════════════ */
.chrono-app-shell {
  display: flex;
  height: calc(100vh - 56px);
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Blade Base Styling */
.chrono-blade-left,
.chrono-blade-right {
  background: var(--chrono-bg-blade);
  border-color: var(--chrono-border);
  display: flex;
  flex-direction: column;
  z-index: 30;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s ease;
}

.chrono-blade-left {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  border-right: 1px solid var(--chrono-border);
}
.chrono-blade-left.collapsed {
  transform: translateX(-100%);
  width: 0;
  min-width: 0;
  overflow: hidden;
}

.chrono-blade-right {
  width: 350px;
  min-width: 350px;
  max-width: 350px;
  border-left: 1px solid var(--chrono-border);
}
.chrono-blade-right.collapsed {
  transform: translateX(100%);
  width: 0;
  min-width: 0;
  overflow: hidden;
}

/* Blade Header */
.blade-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--chrono-border);
  flex-shrink: 0;
  background: rgba(14, 20, 32, 0.7);
}
.blade-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.blade-header-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(0, 232, 255, 0.12);
  border: 1px solid rgba(0, 232, 255, 0.25);
  color: var(--chrono-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}
.blade-header-icon-box.purple {
  background: rgba(192, 132, 252, 0.12);
  border-color: rgba(192, 132, 252, 0.25);
  color: var(--chrono-purple);
}
.blade-title-text {
  font-family: var(--chrono-font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
}

.btn-sidebar-collapse {
  background: transparent;
  border: none;
  color: var(--chrono-text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.btn-sidebar-collapse:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 3. LEFT BLADE: MODULES & PARADIGMS (GENERAL STUDIO 3D TACTILE STYLE)*/
/* ═══════════════════════════════════════════════════════════════════ */
.blade-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  background: rgba(12, 15, 23, 0.95);
  user-select: none;
}
.blade-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.blade-header-icon-box {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.blade-header-icon-box.purple {
  background: rgba(192, 132, 252, 0.12);
  border-color: rgba(192, 132, 252, 0.25);
  color: var(--chrono-purple);
}
.blade-title-text {
  font-family: var(--chrono-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e2e8f0;
  text-transform: uppercase;
  white-space: nowrap;
}
.blade-badge-count {
  font-family: var(--chrono-font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.btn-sidebar-collapse {
  background: linear-gradient(180deg, #161e2c 0%, #0c1018 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.45);
  color: #cbd5e1;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-sidebar-collapse:hover {
  background: linear-gradient(180deg, #1e283b 0%, #121724 100%);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.55);
}
.btn-sidebar-collapse:active {
  transform: translateY(1px) scale(0.98);
}

/* Precision Search & Filter Box (General Studio Style) */
.blade-search-filter-box {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 11, 18, 0.6);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blade-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.blade-search-icon {
  width: 13px;
  height: 13px;
  color: rgba(255, 255, 255, 0.35);
  position: absolute;
  left: 9px;
  pointer-events: none;
}
.blade-search-input {
  width: 100%;
  background: #07090e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 26px 6px 28px;
  font-family: var(--chrono-font-mono);
  font-size: 11px;
  color: #ffffff;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: all 0.18s ease;
}
.blade-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.blade-search-input:focus {
  border-color: rgba(0, 232, 255, 0.7);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 232, 255, 0.2);
}
.blade-search-kbd {
  position: absolute;
  right: 9px;
  font-family: var(--chrono-font-mono);
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.blade-search-clear {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.blade-search-clear:hover {
  color: #ffffff;
}
.blade-search-clear.hidden {
  display: none !important;
}

/* 3D DEEP TACTILE PALETTE FILTER CHIPS GRID (General Studio) */
.palette-filter-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 2px 0 0 0;
  width: 100%;
}
.domain-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 5px 2px;
  border-radius: 7px;
  font-family: var(--chrono-font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* Physical 3D Keycap Gradient & Layered Bevels */
  background: linear-gradient(180deg, #181d2a 0%, #0d111a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;

  /* 3D Chamfered Edge + Deep Ambient & Drop Shadows */
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.85),
    0 2px 5px rgba(0, 0, 0, 0.65),
    0 1px 1px rgba(0, 0, 0, 0.4);

  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.domain-pill-btn[data-filter="all"] { color: #e2e8f0; }
.domain-pill-btn[data-filter="quantum"] { color: #6ee7b7; }
.domain-pill-btn[data-filter="thermo"] { color: #22d3ee; }
.domain-pill-btn[data-filter="cosmos"] { color: #fcd34d; }
.domain-pill-btn[data-filter="cognition"] { color: #d8b4fe; }

/* Keycap Hover */
.domain-pill-btn:hover {
  background: linear-gradient(180deg, #22293b 0%, #131825 100%);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
  color: #ffffff;
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.28),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.9),
    0 4px 10px rgba(0, 0, 0, 0.75),
    0 1px 2px rgba(0, 0, 0, 0.5);
}
.domain-pill-btn:active {
  transform: translateY(1px);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.9),
    0 1px 1px rgba(0, 0, 0, 0.5) !important;
}

/* Category-Specific 3D Active Illuminated States */
.domain-pill-btn.active[data-filter="all"] {
  background: linear-gradient(180deg, #0d2133 0%, #07121c 100%) !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  color: #38bdf8 !important;
  transform: translateY(0.5px);
  box-shadow: 
    inset 0 1.5px 3.5px rgba(0, 0, 0, 0.9),
    inset 0 0 12px rgba(56, 189, 248, 0.18),
    inset 0 -1px 0 0 rgba(56, 189, 248, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.6) !important;
}
.domain-pill-btn.active[data-filter="quantum"] {
  background: linear-gradient(180deg, #0a2c1f 0%, #04170f 100%) !important;
  border-color: rgba(16, 185, 129, 0.6) !important;
  color: #34d399 !important;
  transform: translateY(0.5px);
  box-shadow: 
    inset 0 1.5px 3.5px rgba(0, 0, 0, 0.9),
    inset 0 0 12px rgba(16, 185, 129, 0.2),
    inset 0 -1px 0 0 rgba(16, 185, 129, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.6) !important;
}
.domain-pill-btn.active[data-filter="thermo"] {
  background: linear-gradient(180deg, #092333 0%, #04131d 100%) !important;
  border-color: rgba(6, 182, 212, 0.6) !important;
  color: #22d3ee !important;
  transform: translateY(0.5px);
  box-shadow: 
    inset 0 1.5px 3.5px rgba(0, 0, 0, 0.9),
    inset 0 0 12px rgba(6, 182, 212, 0.2),
    inset 0 -1px 0 0 rgba(6, 182, 212, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.6) !important;
}
.domain-pill-btn.active[data-filter="cosmos"] {
  background: linear-gradient(180deg, #301f07 0%, #180f02 100%) !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  color: #fbbf24 !important;
  transform: translateY(0.5px);
  box-shadow: 
    inset 0 1.5px 3.5px rgba(0, 0, 0, 0.9),
    inset 0 0 12px rgba(245, 158, 11, 0.2),
    inset 0 -1px 0 0 rgba(245, 158, 11, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.6) !important;
}
.domain-pill-btn.active[data-filter="cognition"] {
  background: linear-gradient(180deg, #28133d 0%, #140920 100%) !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
  color: #c084fc !important;
  transform: translateY(0.5px);
  box-shadow: 
    inset 0 1.5px 3.5px rgba(0, 0, 0, 0.9),
    inset 0 0 12px rgba(168, 85, 247, 0.2),
    inset 0 -1px 0 0 rgba(168, 85, 247, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

/* Modules Scroll Area */
.modules-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 3D Tactile Palette Node Cards (Matching General Studio .palette-card) */
.module-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, #131826 0%, #0c1018 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px !important;
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.35);
  border-radius: 9px;
  padding: 9px 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  text-align: left;
  outline: none;
}
.module-card.border-l-cyan { border-left-color: #00e8ff !important; }
.module-card.border-l-purple { border-left-color: #c084fc !important; }
.module-card.border-l-amber { border-left-color: #fbbf24 !important; }
.module-card.border-l-emerald { border-left-color: #10b981 !important; }
.module-card.border-l-rose { border-left-color: #f43f5e !important; }

.module-card:hover {
  transform: translateY(-1.5px);
  background: linear-gradient(180deg, #182132 0%, #0f1420 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.55);
}

.module-card.active {
  background: linear-gradient(180deg, #152236 0%, #0c1422 100%) !important;
  border-color: rgba(0, 232, 255, 0.45) !important;
  box-shadow: 
    inset 0 1px 0 0 rgba(0, 232, 255, 0.3),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.8),
    0 4px 16px rgba(0, 232, 255, 0.18) !important;
}

.module-card.filtered-out {
  display: none !important;
}

.module-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.module-card-title {
  font-family: var(--chrono-font-sans);
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}
.module-card:hover .module-card-title {
  color: #ffffff;
}
.module-card.active .module-card-title {
  color: var(--chrono-cyan);
  font-weight: 700;
}

.module-card-tag {
  font-family: var(--chrono-font-mono);
  font-size: 8px;
  font-weight: 600;
  padding: 1.5px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.module-card.active .module-card-tag {
  background: rgba(0, 232, 255, 0.15);
  color: var(--chrono-cyan);
  border-color: rgba(0, 232, 255, 0.3);
}

.module-card-desc {
  font-family: var(--chrono-font-sans);
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.module-card:hover .module-card-desc {
  color: rgba(255, 255, 255, 0.7);
}

.module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.module-card-sig {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.38);
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.module-card-action {
  font-family: var(--chrono-font-mono);
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
}
.module-card:hover .module-card-action {
  color: #ffffff;
}
.module-card.active .module-card-action {
  color: var(--chrono-cyan);
}

.module-card-arrow-btn {
  width: 24px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
  padding: 6px 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.module-card:hover .module-card-arrow-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateX(1px);
}
.module-card.active .module-card-arrow-btn {
  background: rgba(0, 232, 255, 0.12);
  border-color: rgba(0, 232, 255, 0.35);
  color: var(--chrono-cyan);
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 4. CENTER WORKSPACE: SIMULATION CANVAS                              */
/* ═══════════════════════════════════════════════════════════════════ */
.chrono-workspace-center {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 50% 50%, #080c16 0%, #030408 100%);
  overflow: hidden;
}

#time-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Viewport Top HUD (2 Rows) */
.viewport-top-hud {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 20;
}
.viewport-top-hud > * {
  pointer-events: auto;
}

.viewport-hud-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.btn-floating-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid var(--chrono-border);
  backdrop-filter: blur(14px);
  color: #cbd5e1;
  font-family: var(--chrono-font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
#btn-open-inspector {
  margin-left: auto;
}
.btn-floating-trigger:hover {
  background: rgba(18, 25, 42, 0.95);
  border-color: rgba(0, 232, 255, 0.4);
  color: #ffffff;
}
.btn-floating-trigger.hidden {
  display: none !important;
}

/* On desktop (viewport > 1024px), automatically hide floating triggers if their blade is open */
@media (min-width: 1025px) {
  .chrono-blade-left:not(.collapsed) ~ .chrono-workspace-center #btn-open-modules,
  .chrono-app-shell:has(#blade-left:not(.collapsed)) #btn-open-modules,
  .chrono-layout-3blade:has(#blade-left:not(.collapsed)) #btn-open-modules {
    display: none !important;
  }
  .chrono-app-shell:has(#blade-right:not(.collapsed)) #btn-open-inspector,
  .chrono-layout-3blade:has(#blade-right:not(.collapsed)) #btn-open-inspector {
    display: none !important;
  }
}

.viewport-hud-row-center {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Chrono Flow Control Segmented Bar */
.hud-chrono-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 12, 22, 0.88);
  border: 1px solid var(--chrono-border);
  border-radius: 12px;
  padding: 4px 6px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chrono-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  font-family: var(--chrono-font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--chrono-text-muted);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.chrono-action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}
.chrono-action-btn.active {
  color: var(--chrono-cyan);
  background: rgba(0, 232, 255, 0.14);
  border-color: rgba(0, 232, 255, 0.4);
}

/* Distinct Prominent Loschmidt Time Reversal Button */
.chrono-action-btn.btn-reverse-arrow {
  color: #fca5a5;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(248, 113, 113, 0.35);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
  position: relative;
}
.chrono-action-btn.btn-reverse-arrow:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(168, 85, 247, 0.28) 100%);
  border-color: rgba(248, 113, 113, 0.6);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.3);
  transform: translateY(-0.5px);
}
.chrono-action-btn.btn-reverse-arrow:active {
  transform: translateY(0.5px) scale(0.98);
}

/* Bottom Floating Telemetry Dock - Sleek Single-Line HUD Bar */
.viewport-bottom-dock {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 14px;
  padding: 7px 16px;
  background: rgba(9, 13, 24, 0.92);
  background-clip: padding-box;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: var(--chrono-font-mono);
  font-size: 11px;
  z-index: 20;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
  overflow-x: auto;
  scrollbar-width: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.viewport-bottom-dock::-webkit-scrollbar {
  display: none;
}
.viewport-bottom-dock:hover {
  background: rgba(11, 16, 28, 0.96);
  border-color: rgba(56, 189, 248, 0.32);
}
.dock-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dock-stat-label {
  color: #64748b;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dock-stat-val {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}
.dock-stat-item.primary-metric .dock-stat-label {
  color: #94a3b8;
  font-weight: 700;
}
.dock-stat-item.primary-metric .dock-stat-val {
  color: var(--chrono-cyan);
  font-weight: 700;
}
.dock-stat-val.purple {
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(192, 132, 252, 0.28);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.dock-stat-sep {
  width: 1px;
  height: 13px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 4.1 FLOATING TELEMETRY & DIAGRAM WIDGET (DRAGGABLE & COLLAPSIBLE)   */
/* ═══════════════════════════════════════════════════════════════════ */
.chrono-diagram-widget {
  position: absolute;
  top: 72px;
  right: 20px;
  width: 294px;
  background: rgba(11, 16, 28, 0.94);
  background-clip: padding-box;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72);
  z-index: 25;
  user-select: none;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  pointer-events: auto;
}

.chrono-diagram-widget:hover {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

.chrono-diagram-widget.is-dragging {
  cursor: grabbing !important;
  opacity: 0.96;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9) !important;
  transition: none !important;
}

/* Header & Drag Handle */
.diagram-widget-header {
  height: 36px;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 26, 44, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  cursor: grab;
  transition: background 0.15s ease;
}
.diagram-widget-header:hover {
  background: rgba(24, 35, 58, 0.95);
}
.diagram-widget-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.diagram-widget-drag-dots {
  color: rgba(255, 255, 255, 0.38);
  font-size: 13px;
  letter-spacing: -1px;
  cursor: grab;
  line-height: 1;
}
.diagram-widget-icon {
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
}
.diagram-widget-title {
  font-family: var(--chrono-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f8fafc;
  white-space: nowrap;
}

.diagram-widget-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.diagram-widget-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.65);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.diagram-widget-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.diagram-widget-action-btn:active {
  transform: scale(0.95);
}

/* Diagram Body & Canvas Wrap */
.diagram-widget-body {
  display: flex;
  flex-direction: column;
}
.diagram-canvas-wrap {
  padding: 8px 10px 6px 10px;
  display: flex;
  justify-content: center;
  background: #050811;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
#diagram-widget-canvas {
  width: 100%;
  height: 165px;
  display: block;
  border-radius: 7px;
  background: radial-gradient(ellipse at 50% 30%, rgba(14, 22, 38, 0.75) 0%, rgba(4, 7, 14, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Footer Live Telemetry Bar */
.diagram-widget-footer {
  padding: 6px 12px;
  background: rgba(10, 15, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--chrono-font-mono);
  font-size: 9.5px;
}
.diagram-footer-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.diagram-footer-lbl {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
  font-size: 8.5px;
}
.diagram-footer-val {
  color: #e2e8f0;
  font-weight: 700;
}
.diagram-footer-val.font-accent {
  color: #38bdf8;
}
.diagram-footer-sep {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
}

/* Collapsed State: Instant, Stutter-Free Compact Bar with Smooth 10px Corners */
.chrono-diagram-widget.is-collapsed {
  border-radius: 10px;
}
.chrono-diagram-widget.is-collapsed .diagram-widget-header {
  border-bottom: none;
  height: 34px;
}
.chrono-diagram-widget.is-collapsed .diagram-widget-body {
  display: none !important;
}
.chrono-diagram-widget.is-collapsed .icon-collapse {
  display: none !important;
}
.chrono-diagram-widget.is-collapsed .icon-expand {
  display: block !important;
}

/* Discipline Border & Clean Accent Highlights on Widget */
.chrono-diagram-widget.theme-quantum { border-color: rgba(52, 211, 153, 0.32); }
.chrono-diagram-widget.theme-quantum:hover { border-color: rgba(52, 211, 153, 0.52); }
.chrono-diagram-widget.theme-quantum .diagram-widget-icon { color: #34d399; }

.chrono-diagram-widget.theme-thermo { border-color: rgba(192, 132, 252, 0.32); }
.chrono-diagram-widget.theme-thermo:hover { border-color: rgba(192, 132, 252, 0.52); }
.chrono-diagram-widget.theme-thermo .diagram-widget-icon { color: #c084fc; }

.chrono-diagram-widget.theme-cosmos { border-color: rgba(56, 189, 248, 0.32); }
.chrono-diagram-widget.theme-cosmos:hover { border-color: rgba(56, 189, 248, 0.52); }
.chrono-diagram-widget.theme-cosmos .diagram-widget-icon { color: #38bdf8; }

.chrono-diagram-widget.theme-cognition { border-color: rgba(244, 63, 94, 0.32); }
.chrono-diagram-widget.theme-cognition:hover { border-color: rgba(244, 63, 94, 0.52); }
.chrono-diagram-widget.theme-cognition .diagram-widget-icon { color: #fb7185; }

/* ═══════════════════════════════════════════════════════════════════ */
/* 5. RIGHT BLADE: INSPECTOR & CONTROLS                                */
/* ═══════════════════════════════════════════════════════════════════ */
.inspector-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Telemetry Dashboard Mini Grid */
.telemetry-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.telemetry-unit {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.telemetry-unit-label {
  font-family: var(--chrono-font-mono);
  font-size: 8.5px;
  color: var(--chrono-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.telemetry-unit-val {
  font-family: var(--chrono-font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

/* Scientific Visual Overlays */
.param-group-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--chrono-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.param-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--chrono-font-display);
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scientific-toggles-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sci-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
}
.sci-toggle-label {
  font-family: var(--chrono-font-sans);
  font-size: 11.5px;
  color: #cbd5e1;
}
.sci-toggle-checkbox {
  display: none;
}
.sci-toggle-switch {
  width: 32px;
  height: 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sci-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.2s ease;
}
.sci-toggle-checkbox:checked + .sci-toggle-switch {
  background: rgba(0, 232, 255, 0.3);
  border-color: var(--chrono-cyan);
}
.sci-toggle-checkbox:checked + .sci-toggle-switch::after {
  transform: translateX(14px);
  background: var(--chrono-cyan);
  box-shadow: 0 0 6px var(--chrono-cyan);
}

/* Parameter Sliders */
.param-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.param-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--chrono-font-sans);
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
}
.param-value-badge {
  font-family: var(--chrono-font-mono);
  font-weight: 700;
  font-size: 11.5px;
  color: var(--chrono-cyan);
}

.param-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
.param-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--chrono-cyan);
  box-shadow: 0 0 8px rgba(0, 232, 255, 0.8);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.param-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Math Formulation Box */
.math-formula-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--chrono-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.math-formula-title {
  font-family: var(--chrono-font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--chrono-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.math-formula-render {
  font-size: 12px;
  color: #f8fafc;
  overflow-x: auto;
  padding: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 6. MOBILE DRAWER COMMAND CENTER                                     */
/* ═══════════════════════════════════════════════════════════════════ */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.mobile-nav-drawer.open {
  display: block;
}
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeInBackdrop 0.2s ease both;
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-drawer-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(90vw, 380px);
  background: linear-gradient(180deg, #090e18 0%, #050810 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  overflow-y: auto;
  z-index: 10;
  animation: slideDrawerRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
@keyframes slideDrawerRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #0a0e18;
  user-select: none;
}
.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-brand-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.drawer-brand-text {
  font-family: var(--chrono-font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  color: #ffffff;
}
.drawer-brand-badge {
  font-family: var(--chrono-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 232, 255, 0.12);
  border: 1px solid rgba(0, 232, 255, 0.25);
  color: var(--chrono-cyan);
  letter-spacing: 0.08em;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.drawer-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--chrono-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}
.section-tag {
  font-size: 9px;
  color: var(--chrono-cyan);
  background: rgba(0, 232, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.drawer-telemetry-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 8px;
}
.drawer-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.drawer-stat-label {
  font-family: var(--chrono-font-mono);
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.drawer-stat-val {
  font-family: var(--chrono-font-mono);
  font-size: 11.5px;
  font-weight: 700;
}
.drawer-stat-val.text-cyan { color: var(--chrono-cyan); }
.drawer-stat-val.text-purple { color: var(--chrono-purple); }
.drawer-stat-val.text-amber { color: var(--chrono-amber); }

.drawer-pills-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-pill-item {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--chrono-font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.drawer-pill-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.drawer-pill-item.active {
  background: rgba(0, 232, 255, 0.09);
  border-color: rgba(0, 232, 255, 0.35);
  color: var(--chrono-cyan);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 10px rgba(0, 232, 255, 0.12);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 9px;
  flex-shrink: 0;
}
.pill-dot.bg-cyan { background: var(--chrono-cyan); box-shadow: 0 0 6px var(--chrono-cyan); }
.pill-dot.bg-purple { background: var(--chrono-purple); box-shadow: 0 0 6px var(--chrono-purple); }
.pill-dot.bg-amber { background: var(--chrono-amber); box-shadow: 0 0 6px var(--chrono-amber); }
.pill-dot.bg-emerald { background: var(--chrono-emerald); box-shadow: 0 0 6px var(--chrono-emerald); }
.pill-dot.bg-rose { background: var(--chrono-rose); box-shadow: 0 0 6px var(--chrono-rose); }

.pill-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  margin-left: 8px;
  letter-spacing: 0.05em;
}
.pill-check {
  font-size: 11px;
  font-weight: 700;
  color: var(--chrono-cyan);
  margin-left: 8px;
  width: 14px;
  text-align: right;
}

.drawer-panels-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.drawer-panel-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: all 0.18s ease;
}
.drawer-panel-box:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}
.panel-box-left {
  display: flex;
  align-items: center;
  gap: 11px;
}
.panel-box-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.panel-box-icon.cyan-box { background: rgba(0, 232, 255, 0.12); border: 1px solid rgba(0, 232, 255, 0.25); color: #00e8ff; }
.panel-box-icon.purple-box { background: rgba(192, 132, 252, 0.14); border: 1px solid rgba(192, 132, 252, 0.28); color: #c084fc; }
.panel-box-icon.amber-box { background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.28); color: #fbbf24; }
.panel-box-icon.emerald-box { background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.28); color: #10b981; }
.panel-box-icon.indigo-box { background: rgba(99, 102, 241, 0.14); border: 1px solid rgba(99, 102, 241, 0.28); color: #818cf8; }
.panel-box-icon.slate-box { background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.panel-box-info {
  display: flex;
  flex-direction: column;
}
.panel-box-title {
  font-family: var(--chrono-font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
}
.panel-box-desc {
  font-family: var(--chrono-font-mono);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
}
.drawer-arrow {
  font-family: var(--chrono-font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, color 0.2s ease;
}
.drawer-panel-box:hover .drawer-arrow {
  color: var(--chrono-cyan);
  transform: translateX(2px);
}

.drawer-footer-section {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}
.drawer-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer-lang-switcher {
  display: flex;
  gap: 8px;
}
.drawer-lang-switcher button {
  flex: 1;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--chrono-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.18s ease;
}
.drawer-lang-switcher button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}
.drawer-lang-switcher button.active {
  background: rgba(0, 232, 255, 0.15);
  border-color: rgba(0, 232, 255, 0.4);
  color: var(--chrono-cyan);
}
.drawer-core-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--chrono-font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}
.hud-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.hud-pill-dot.bg-cyan { background: var(--chrono-cyan); }
.hud-pill-dot.pulse {
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Mobile Panel Overlay Backdrop */
.mobile-panel-backdrop {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-panel-backdrop.active {
  display: block;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 7. RESPONSIVE MEDIA QUERIES                                         */
/* ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hud-nav-tabs {
    display: none !important;
  }
  .hud-mobile-menu-btn {
    display: inline-flex !important;
  }
  .chrono-blade-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 86vw;
    z-index: 50;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85);
    transform: translateX(-100%);
  }
  .chrono-blade-left.open-mobile {
    transform: translateX(0) !important;
  }
  .chrono-blade-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 330px;
    max-width: 86vw;
    z-index: 50;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
    transform: translateX(100%);
  }
  .chrono-blade-right.open-mobile {
    transform: translateX(0) !important;
  }
}

@media (max-width: 768px) {
  .top-hud-navbar {
    padding: 0 10px;
    height: 52px;
  }
  .hud-left-cluster {
    gap: 8px;
  }
  .brand-lockup {
    padding: 4px 6px;
    gap: 6px;
  }
  .brand-title {
    font-size: 12px;
    letter-spacing: 0.1em;
  }
  .brand-sub {
    font-size: 9px;
    padding: 2px 5px;
  }
  .viewport-top-hud {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
  }
  .btn-floating-trigger {
    padding: 5px 10px;
    font-size: 10.5px;
  }
  .chrono-action-btn {
    padding: 4px 8px;
    font-size: 9px;
  }
}

@media (max-width: 520px) {
  .brand-divider,
  .brand-sub {
    display: none !important;
  }
  .hud-lang-inline {
    display: none !important;
  }
  .hud-divider {
    display: none !important;
  }
  .hud-actions-toolbar {
    background: transparent;
    border: none;
    padding: 0;
  }
  .viewport-bottom-dock {
    width: calc(100% - 16px);
    left: 8px;
    right: 8px;
    transform: none;
    padding: 5px 8px;
    justify-content: space-around;
    gap: 6px;
    font-size: 10px;
  }
  .dock-stat-sep:nth-child(n+4) {
    display: none !important;
  }
  .dock-stat-item:nth-child(n+5) {
    display: none !important;
  }
}

/* Color & Badge Utility Classes */
.btn-reversal-purple {
  color: #c084fc;
}
.telemetry-unit-val.text-cyan {
  color: #00e8ff;
}
.telemetry-unit-val.text-purple {
  color: #c084fc;
}
.telemetry-unit-val.text-emerald {
  color: #10b981;
}
.badge-tag-cyan {
  font-size: 9px;
  color: #00e8ff;
  background: rgba(0, 232, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}
.badge-tag-purple {
  font-size: 9px;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ───────────────────────────────────────────────────────────────── */
/* EXPERIMENT RECORD & SCIENTIFIC VALIDATION PANEL                   */
/* ───────────────────────────────────────────────────────────────── */
.validation-group-box {
  margin-top: 14px;
}
.validation-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.validation-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--chrono-border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.validation-card-label {
  font-family: var(--chrono-font-mono);
  font-size: 8.5px;
  color: var(--chrono-text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.validation-card-value {
  font-family: var(--chrono-font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.validation-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.btn-validation-tool {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--chrono-border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--chrono-text-muted);
  font-family: var(--chrono-font-mono);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-validation-tool:hover {
  background: rgba(0, 232, 255, 0.12);
  border-color: rgba(0, 232, 255, 0.35);
  color: #ffffff;
}
.btn-validation-tool:active {
  transform: scale(0.97);
}
.validation-counter-text {
  font-family: var(--chrono-font-mono);
  font-size: 9.5px;
  color: var(--chrono-text-dim);
  margin-top: 8px;
  text-align: center;
}

/* Math Explanation Guide in Formula Box */
.formula-glossary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-family: var(--chrono-font-mono);
  font-size: 9.5px;
}
.formula-glossary-table td {
  padding: 2px 4px;
  vertical-align: top;
}
.formula-glossary-sym {
  color: var(--chrono-cyan);
  font-weight: 600;
  white-space: nowrap;
}
.formula-glossary-desc {
  color: var(--chrono-text-muted);
}
.formula-assumptions-text {
  font-family: var(--chrono-font-mono);
  font-size: 9px;
  color: var(--chrono-text-dim);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Chrono Flow Control Active Indicators */
.chrono-action-btn.active {
  background: rgba(0, 232, 255, 0.16) !important;
  border-color: rgba(0, 232, 255, 0.5) !important;
  color: #00e8ff !important;
  box-shadow: 0 0 12px rgba(0, 232, 255, 0.25) !important;
}
.chrono-action-btn.btn-reverse-arrow.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(168, 85, 247, 0.35) 100%) !important;
  border-color: rgba(248, 113, 113, 0.8) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.45) !important;
}
.chrono-action-btn.pulsing {
  animation: pulseButtonGlow 0.4s ease;
}
@keyframes pulseButtonGlow {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 232, 255, 0); }
  50% { transform: scale(1.05); box-shadow: 0 0 16px rgba(0, 232, 255, 0.6); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 232, 255, 0); }
}


