:root {
  --bg-deep: #060a12;
  --bg-panel: rgba(13, 20, 34, 0.86);
  --bg-panel-elevated: rgba(21, 31, 52, 0.78);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-highlight: rgba(56, 189, 248, 0.42);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Heatmap & Anatomical Accent Colors */
  --color-agonist: #ff2e1f;
  --color-synergist: #ff941a;
  --color-stabilizer: #eab308;
  --color-antagonist: #38bdf8;
  --color-deep-layer: #a855f7;
  --color-superficial-layer: #ec4899;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 54px 1fr 104px;
  grid-template-columns: 330px 1fr 360px;
  grid-template-areas:
    "header header header"
    "left viewport right"
    "footer footer footer";
  pointer-events: none;
}

/* 3D Canvas Viewport spans behind panels for full-bleed cinematic look */
#viewport-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
  background: radial-gradient(circle at 50% 42%, #131f38 0%, #09101f 52%, #04070e 100%);
}

#webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#webgl-canvas:active {
  cursor: grabbing;
}

#labels-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

/* Floating 3D Pin Annotations */
.muscle-pin-label {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(9, 15, 28, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left: 3px solid var(--pin-color, #ff4d38);
  color: #f8fafc;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.muscle-pin-label:hover,
.muscle-pin-label.is-selected {
  background: rgba(20, 32, 58, 0.96);
  border-color: #38bdf8;
  transform: translate(-50%, -105%) scale(1.06);
  z-index: 10;
}

.muscle-pin-label .pin-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  margin-left: 4px;
  color: var(--pin-color, #ff941a);
}

.muscle-pin-label .pin-layer-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}

/* Hover Tooltip in 3D Viewport */
.hover-tooltip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  background: rgba(8, 13, 24, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 195px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  transform: translate(16px, -50%);
}

.tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tooltip-title {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.tooltip-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.tooltip-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.tooltip-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: #ff941a;
}

.tooltip-hint {
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 4px;
}

/* Heatmap Legend Overlay */
.heatmap-legend-bar {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  background: rgba(10, 16, 29, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--text-secondary);
  pointer-events: none;
  white-space: nowrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.swatch-agonist {
  background: var(--color-agonist);
  box-shadow: 0 0 8px var(--color-agonist);
}
.swatch-synergist {
  background: var(--color-synergist);
  box-shadow: 0 0 6px var(--color-synergist);
}
.swatch-stabilizer {
  background: var(--color-stabilizer);
}
.swatch-antagonist {
  background: #3b5578;
}

.legend-line-sample {
  width: 18px;
  height: 0;
  border-top: 2px dashed #38bdf8;
  display: inline-block;
}

/* Top Header */
.top-header {
  grid-area: header;
  z-index: 10;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(8, 13, 24, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 77, 56, 0.12);
  border: 1px solid rgba(255, 77, 56, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.brand-subtitle {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-pill-group {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.pill-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.pill-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  font-weight: 600;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: 1px solid rgba(125, 211, 252, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.export-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

/* Side Panels */
.side-panel {
  z-index: 10;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
  max-height: calc(100vh - 158px);
}

.left-panel {
  grid-area: left;
}

.right-panel {
  grid-area: right;
}

.panel-section {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.flex-grow-section {
  flex: 1;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.section-desc {
  margin: 0 0 8px 0;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.value-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 77, 56, 0.18);
  color: #ff6b57;
  border: 1px solid rgba(255, 77, 56, 0.35);
}

.count-pill {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-secondary);
}

.sub-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 8px 0 5px 0;
}

.segmented-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.segmented-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.seg-btn {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-btn:hover {
  color: var(--text-primary);
  border-color: rgba(148, 163, 184, 0.35);
}

.seg-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.mini-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

/* ============================================================================
   Brand-Consistent Range Slider (Following modern-web-guidance `slider` rules)
   ============================================================================ */
input[type="range"] {
  --slider-track-size: 0.42rem;
  --slider-thumb-size: 1.05rem;
  --slider-track-radius: 999px;
  --slider-thumb-radius: 50%;
  --slider-track-color: rgba(51, 65, 85, 0.85);
  --slider-fill-color: #38bdf8;
  --slider-thumb-color: #f8fafc;
  --slider-direction: to right;

  &:dir(rtl) {
    --slider-direction: to left;
  }

  --attr-min: attr(min type(<number>), 0);
  --attr-max: attr(max type(<number>), 100);
  --control-value: attr(value type(<number>), 0);
  --slider-progress: calc(
    progress(var(--control-value), var(--attr-min), var(--attr-max)) * 100%
  );

  appearance: none;
  inline-size: 100%;
  block-size: 1.9rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

@supports not (opacity: progress(1, 0, 100)) {
  input[type="range"] {
    --slider-progress: calc(
      (var(--control-value) - var(--attr-min)) /
      (var(--attr-max) - var(--attr-min)) * 100%
    );
  }
}

#explode-slider {
  --slider-fill-color: #ff5733;
}

#timeline-slider {
  --slider-fill-color: #38bdf8;
  --slider-track-size: 0.5rem;
  --slider-thumb-size: 1.15rem;
}

/* WebKit/Blink separate rule blocks */
input[type="range"]::-webkit-slider-runnable-track {
  block-size: var(--slider-track-size);
  border: 0;
  border-radius: var(--slider-track-radius);
  background: linear-gradient(
    var(--slider-direction),
    var(--slider-fill-color) var(--slider-progress),
    var(--slider-track-color) var(--slider-progress)
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  margin-block-start: calc(
    (var(--slider-track-size) - var(--slider-thumb-size)) / 2
  );
  border: 2px solid var(--slider-fill-color);
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Firefox separate rule blocks */
input[type="range"]::-moz-range-track {
  block-size: var(--slider-track-size);
  border: 0;
  border-radius: var(--slider-track-radius);
  background: var(--slider-track-color);
}

input[type="range"]::-moz-range-progress {
  block-size: var(--slider-track-size);
  border-radius: var(--slider-track-radius);
  background: var(--slider-fill-color);
}

input[type="range"]::-moz-range-thumb {
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  border: 2px solid var(--slider-fill-color);
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--slider-fill-color);
  outline-offset: 4px;
}

.slider-row-compact {
  margin-top: 10px;
}

.slider-label-line {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.mono-val {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* Muscle Directory List */
.muscle-directory {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 4px;
}

.muscle-dir-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  cursor: pointer;
  transition: all 0.14s ease;
}

.muscle-dir-item:hover {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(56, 189, 248, 0.35);
}

.muscle-dir-item.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
}

.dir-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dir-name-zh {
  font-weight: 600;
  font-size: 12.5px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dir-name-en {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.badge-pill {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-superficial {
  background: rgba(236, 72, 153, 0.16);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-deep {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.38);
}

/* Right Panel: Inspector Card */
.inspector-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.layer-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.layer-superficial {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.layer-deep {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.pair-compare-btn {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pair-compare-btn:hover {
  background: rgba(168, 85, 247, 0.32);
}

.insp-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.insp-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.insp-live-meter {
  background: rgba(9, 14, 26, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 9px 10px;
  margin-bottom: 10px;
}

.meter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.meter-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.role-agonist {
  background: rgba(255, 46, 31, 0.22);
  color: #ff6b5b;
  border: 1px solid rgba(255, 46, 31, 0.45);
}

.role-synergist {
  background: rgba(255, 148, 26, 0.22);
  color: #ffb04d;
  border: 1px solid rgba(255, 148, 26, 0.45);
}

.role-stabilizer {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.role-antagonist {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.insp-pct-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
}

.meter-bar-track {
  width: 100%;
  height: 7px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.meter-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eab308, #ff941a, #ff2e1f);
  transition: width 0.08s linear;
}

.insp-note {
  margin: 0;
  font-size: 11.5px;
  color: #e2e8f0;
}

.anatomy-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.meta-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 7px 9px;
}

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

.meta-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot-origin {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
}

.dot-insertion {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f43f5e;
  display: inline-block;
}

.meta-text {
  font-size: 11.5px;
  color: #f1f5f9;
}

/* Telemetry List */
.telemetry-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.telemetry-row {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 7px;
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.telemetry-row:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.telemetry-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 4px;
}

.telemetry-name {
  font-weight: 600;
  color: #f1f5f9;
}

.telemetry-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.telemetry-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 999px;
  overflow: hidden;
}

.telemetry-bar-fg {
  height: 100%;
  border-radius: 999px;
  transition: width 0.06s linear;
}

/* Bottom Timeline Dock */
.bottom-timeline-dock {
  grid-area: footer;
  z-index: 10;
  pointer-events: auto;
  background: rgba(8, 13, 24, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.timeline-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.movement-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.move-tab {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.move-tab:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

.move-tab.active {
  background: linear-gradient(135deg, rgba(255, 77, 56, 0.22), rgba(255, 148, 26, 0.18));
  border-color: #ff5733;
  color: #fff;
}

.phase-banner {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.phase-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5733;
  box-shadow: 0 0 8px #ff5733;
  flex-shrink: 0;
}

.phase-sep {
  color: var(--text-muted);
}

.phase-detail-text {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.transport-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.transport-btn:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.transport-btn.primary-play {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  min-width: 78px;
  justify-content: center;
}

.transport-btn.active-toggle {
  background: rgba(255, 148, 26, 0.22);
  border-color: #ff941a;
  color: #ffb04d;
}

.timeline-scrubber-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.scrubber-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: -4px;
}

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

.timeline-pct-readout {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  min-width: 52px;
  text-align: right;
}

.speed-pills {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 2px;
}

.speed-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
}

.speed-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}
