/* ==========================================================================
   AUDIO STUDIO PRO — MOZART AI STUDIO CLEAN DESIGN SYSTEM
   Modern, Ultra-Clean DAW & AI Studio UI (Preserving Brand Color Scheme)
   ========================================================================== */

:root {
  /* Brand Core Colors (Strictly Preserved) */
  --asp-bg-canvas: #080a0f;
  --asp-bg-surface-shell: #0e131f;
  --asp-bg-surface-raised: #141b2d;
  --asp-bg-surface-high: #1a233a;
  --asp-bg-surface-glass: rgba(18, 24, 40, 0.78);
  --asp-bg-deep-well: #090d16;

  /* Accent Palette */
  --asp-primary: #6366f1;
  --asp-primary-hover: #4f46e5;
  --asp-primary-glow: rgba(99, 102, 241, 0.35);

  --asp-cyan: #06b6d4;
  --asp-cyan-bright: #67e8f9;
  --asp-cyan-glow: rgba(6, 182, 212, 0.35);

  --asp-purple: #8c5aff;
  --asp-purple-glow: rgba(140, 90, 255, 0.35);

  --asp-amber: #f59e0b;
  --asp-rose: #f43f5e;
  --asp-emerald: #10b981;
  --asp-red-rec: #ef4444;

  /* Text & Typography */
  --asp-text-strong: #f8fafc;
  --asp-text-default: #cbd5e1;
  --asp-text-muted: #94a3b8;
  --asp-text-subtle: #64748b;

  /* Borders & Glass */
  --asp-border-subtle: rgba(255, 255, 255, 0.08);
  --asp-border-medium: rgba(255, 255, 255, 0.14);
  --asp-border-active: rgba(99, 102, 241, 0.5);
  --asp-glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.1);

  /* Radius System */
  --asp-radius-sm: 6px;
  --asp-radius-md: 10px;
  --asp-radius-lg: 16px;
  --asp-radius-xl: 24px;
  --asp-radius-full: 9999px;

  /* Shadows */
  --asp-shadow-card: 0 16px 40px -10px rgba(0, 0, 0, 0.65);
  --asp-shadow-floating: 0 20px 60px 0 rgba(0, 0, 0, 0.75), 0 0 30px rgba(99, 102, 241, 0.15);
  --asp-shadow-glow: 0 0 25px var(--asp-primary-glow);
}

/* ==========================================================================
   PREVIEW TOP NOTICE BANNER (Switch between current and modern version)
   ========================================================================== */
.mozart-preview-banner {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(6, 182, 212, 0.15) 50%, rgba(140, 90, 255, 0.2) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--asp-radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--asp-text-strong);
  max-width: 1240px;
  margin: 0 auto 20px auto;
  position: relative;
  z-index: 10;
}

.mozart-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mozart-sparkle-pill {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--asp-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mozart-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-banner-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 14px;
  border-radius: var(--asp-radius-full);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-banner-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* ==========================================================================
   MOZART-STYLE STUDIO DOCK & TRANSPORT BAR (Hardware Command Deck)
   ========================================================================== */
.studio-transport-deck {
  background: rgba(11, 15, 25, 0.92);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-lg);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 70px;
  z-index: 95;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  max-width: 1240px;
  margin: 0 auto 24px auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Left Group: Project Selector & Status */
.transport-project-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.transport-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.transport-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 10px var(--asp-primary-glow);
}

.transport-brand-text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  text-transform: uppercase;
}

.project-pill-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-full);
  padding: 5px 12px;
  color: var(--asp-text-strong);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-pill-select:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--asp-border-medium);
}

.project-save-check {
  color: var(--asp-emerald);
  font-size: 11px;
}

/* Center Group: Musical & Transport Controls */
.transport-center-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.transport-chip {
  background: var(--asp-bg-deep-well);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-full);
  padding: 5px 12px;
  color: var(--asp-text-default);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.transport-chip:hover {
  border-color: var(--asp-border-medium);
  color: #fff;
}

.transport-timecode {
  background: #05070c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--asp-radius-sm);
  padding: 4px 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--asp-cyan-bright);
  min-width: 90px;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Transport Buttons Cluster */
.transport-btn-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: var(--asp-radius-full);
  border: 1px solid var(--asp-border-subtle);
}

.btn-transport-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--asp-primary) 0%, #4f46e5 100%);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--asp-primary-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-transport-play:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px var(--asp-primary-glow);
}

.btn-transport-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--asp-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-transport-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-transport-rec {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--asp-red-rec);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-transport-rec.armed {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Right Group: Audio Quality Badge & Quick Navigation */
.transport-right-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-master-quality {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--asp-cyan-bright);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--asp-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   SEGMENTED STUDIO MODE PILLS (Hero Switcher)
   ========================================================================== */
.studio-segmented-pill-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto 20px auto;
  max-width: 620px;
  background: rgba(14, 19, 31, 0.9);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-full);
  padding: 5px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.studio-pill-tab {
  flex: 1;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--asp-text-muted);
  border-radius: var(--asp-radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.studio-pill-tab:hover {
  color: var(--asp-text-strong);
}

.studio-pill-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.studio-pill-tab.active.tab-ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(140, 90, 255, 0.3) 100%);
  border-color: rgba(140, 90, 255, 0.4);
  color: #fff;
}

/* ==========================================================================
   MAIN STUDIO WORKSPACE & COMMAND DECK (Clean Arranger)
   ========================================================================== */
.studio-main-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 180px 20px;
}

/* Hero Section (Clean Minimalist Headline) */
.studio-hero-strip {
  text-align: center;
  margin-bottom: 28px;
}

.studio-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--asp-text-strong);
  margin-bottom: 8px;
  line-height: 1.15;
}

.studio-hero-sub {
  font-size: 14px;
  color: var(--asp-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   HIGH-IMPACT FREE CONVERSION SPOTLIGHT BANNER IN BODY
   ========================================================================== */
.studio-free-conversion-spotlight {
  margin: 0 0 28px 0;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(16, 185, 129, 0.12);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.studio-free-conversion-spotlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #34d399, #06b6d4, transparent);
}

.free-spotlight-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.free-spotlight-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.free-badge-major {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
  white-space: nowrap;
  flex-shrink: 0;
}

.free-spotlight-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.free-spotlight-headline {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.free-spotlight-subline {
  margin: 0;
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.4;
}

.free-spotlight-perks {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.free-perk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: var(--asp-radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}

.pill-badge-free {
  display: inline-block;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #34d399;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: var(--asp-radius-full);
  margin-left: 6px;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .studio-free-conversion-spotlight {
    padding: 14px 16px;
    margin-bottom: 20px;
  }
  .free-spotlight-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .free-spotlight-headline {
    font-size: 1.02rem;
  }
  .free-spotlight-subline {
    font-size: 0.8rem;
  }
  .free-spotlight-perks {
    width: 100%;
    gap: 8px;
  }
  .free-perk-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
}

/* The Central Studio Arranger Deck (The Core Canvas) */
.studio-arranger-deck {
  background: var(--asp-bg-surface-shell);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-xl);
  box-shadow: var(--asp-shadow-card);
  overflow: hidden;
  margin-bottom: 32px;
  position: relative;
}

/* Arranger Top Toolbar (Above Ruler & Playhead) */
.arranger-top-toolbar {
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  box-sizing: border-box;
}

.arranger-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.arranger-deck-badge {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
}

.arranger-stems-chip {
  font-size: 11px;
  font-weight: 600;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #67e8f9;
  padding: 3px 10px;
  border-radius: var(--asp-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.arranger-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stems-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stem-monitoring-switch {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--asp-radius-sm);
  padding: 2px;
}

.btn-stem-mode {
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--asp-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-stem-mode:hover {
  color: #fff;
}

.btn-stem-mode.active {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 2px 8px var(--asp-primary-glow);
}

.btn-stems-zip-top {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--asp-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-stems-zip-top:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--asp-primary-glow);
  color: #fff;
}

/* Arranger Body Wrap: Relative Boundary for Ruler, Tracks and Playhead */
.arranger-body-wrap {
  position: relative;
  width: 100%;
}

/* Timeline Ruler Strip */
.timeline-ruler-strip {
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 16px 8px 180px; /* Offset for track headers */
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  color: var(--asp-text-subtle);
}

.ruler-beats-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding-right: 20px;
}

.ruler-beat {
  position: relative;
}

.ruler-beat::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  height: 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* Track Stack Container */
.track-stack-container {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #090c14;
}

/* Individual Studio Track Row (Header + Clip Body) */
.studio-track-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 80px;
}

/* Track Header Card (Left Controller) */
.track-header-card {
  width: 170px;
  flex-shrink: 0;
  background: var(--asp-bg-surface-raised);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

.track-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-color-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.indicator-master { background: var(--asp-primary); box-shadow: 0 0 8px var(--asp-primary); }
.indicator-vocals { background: var(--asp-cyan); box-shadow: 0 0 8px var(--asp-cyan); }
.indicator-drums { background: var(--asp-amber); box-shadow: 0 0 8px var(--asp-amber); }
.indicator-bass { background: var(--asp-rose); box-shadow: 0 0 8px var(--asp-rose); }
.indicator-other { background: var(--asp-purple); box-shadow: 0 0 8px var(--asp-purple); }

.track-name-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--asp-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.track-controls-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.btn-track-toggle {
  width: 24px;
  height: 24px;
  border-radius: var(--asp-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--asp-text-muted);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-track-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-track-toggle.active-mute {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-track-toggle.active-solo {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
}

.track-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.track-slider-mini {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.track-slider-mini::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.track-db-readout {
  font-family: monospace;
  font-size: 9px;
  color: var(--asp-text-subtle);
  width: 32px;
  text-align: right;
}

/* Audio Clip Body (The Solid Colored Clip Container - Mozart Style) */
.track-clip-body {
  flex: 1;
  border-radius: var(--asp-radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.track-clip-body:hover {
  filter: brightness(1.05);
}

.track-clip-body.clip-dragover-active {
  border-color: #67e8f9 !important;
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.55), inset 0 0 16px rgba(6, 182, 212, 0.2) !important;
  filter: brightness(1.18) !important;
  transform: scale(1.008);
}

.clip-empty-drop-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Clip Themes by Stems / Master */
.clip-master {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.clip-vocals {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.clip-drums {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.clip-bass {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.clip-other {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border: 1px solid rgba(140, 90, 255, 0.4);
}

.clip-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  position: relative;
}

.clip-filename-label {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  max-width: 350px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-clip-mini-download {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--asp-radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-clip-mini-download:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: #fff;
  color: #fff;
}

/* High-Contrast High-Definition Waveform Container */
.clip-waveform-canvas-box {
  width: 100%;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
}

.clip-master .clip-waveform-canvas-box {
  height: 56px;
}

.clip-waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Arranger Timeline Overlay Layer (Playhead & Trim Handles on Clip Area) */
.studio-timeline-overlay-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 196px;
  right: 16px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

@media (max-width: 900px) {
  .arranger-top-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }
  .arranger-toolbar-right {
    width: 100%;
  }
  .stems-toolbar-actions {
    width: 100%;
  }
  .studio-timeline-overlay-layer {
    left: 98px;
    right: 14px;
  }
}

/* Playhead Indicator & Interactive Scrubber Handle in Arranger */
.studio-playhead-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95);
  z-index: 25;
  pointer-events: auto !important;
  cursor: ew-resize;
  transition: none !important;
  will-change: left;
  touch-action: none;
}

/* Expanded clickable/draggable hitbox */
.studio-playhead-line::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  width: 18px;
  cursor: ew-resize;
}

.playhead-handle {
  position: absolute;
  top: 0;
  left: -7px;
  width: 16px;
  height: 14px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 50% 100%, 0 50%);
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 10px #67e8f9;
  transition: transform 0.15s ease, background-color 0.15s ease;
  z-index: 26;
  pointer-events: auto !important;
}

.studio-playhead-line:hover .playhead-handle,
.studio-playhead-line.is-dragging .playhead-handle {
  background: #67e8f9;
  transform: scale(1.2);
  cursor: grabbing;
}

.studio-playhead-line.is-dragging {
  background: #67e8f9;
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.95), 0 0 30px rgba(103, 232, 249, 0.5);
}

.playhead-time-badge {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: #090d16;
  border: 1px solid #67e8f9;
  color: #67e8f9;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85);
  z-index: 28;
}

.studio-playhead-line:hover .playhead-time-badge,
.studio-playhead-line.is-dragging .playhead-time-badge {
  opacity: 1;
}

/* Trimming Locator Region (Ableton/Logic/Mozart style) */
.studio-trim-region {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 100%;
  background: rgba(99, 102, 241, 0.12);
  border-left: 2px solid var(--asp-cyan-bright);
  border-right: 2px solid var(--asp-cyan-bright);
  box-shadow: inset 0 0 16px rgba(6, 182, 212, 0.15);
  pointer-events: none;
  z-index: 8;
  transition: none;
}

/* ==========================================================================
   CONSOLIDATED STUDIO COMMAND BAR / DECK (Upload, Format & Actions)
   ========================================================================== */
.studio-command-deck {
  background: var(--asp-bg-surface-glass);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-lg);
  padding: 20px 24px;
  backdrop-filter: blur(16px);
  box-shadow: var(--asp-shadow-card);
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.command-deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.command-deck-dropzone {
  flex: 1;
  min-width: 280px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--asp-radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.command-deck-dropzone:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--asp-primary);
}

.dropzone-icon {
  font-size: 24px;
  color: var(--asp-cyan-bright);
}

.dropzone-text-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--asp-text-strong);
}

.dropzone-text-sub {
  font-size: 11px;
  color: var(--asp-text-muted);
}

/* Format Pills Cluster */
.command-format-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-format-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-full);
  padding: 7px 14px;
  color: var(--asp-text-default);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-format-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-format-pill.active {
  background: var(--asp-primary);
  border-color: var(--asp-primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--asp-primary-glow);
}

/* Primary Action CTA */
.btn-studio-primary-action {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--asp-radius-full);
  padding: 12px 28px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--asp-primary-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-studio-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px var(--asp-primary-glow);
}

/* ==========================================================================
   AI STUDIO MODELS RACK (Mozart-Style Grid Cards)
   ========================================================================== */
.studio-models-rack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.studio-model-card {
  background: var(--asp-bg-surface-raised);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.studio-model-card:hover {
  transform: translateY(-3px);
  border-color: var(--asp-border-active);
}

.model-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--asp-radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--asp-text-muted);
}

.model-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--asp-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.icon-box-cyan { background: rgba(6, 182, 212, 0.15); color: var(--asp-cyan-bright); border: 1px solid rgba(6, 182, 212, 0.3); }
.icon-box-purple { background: rgba(140, 90, 255, 0.15); color: var(--asp-purple); border: 1px solid rgba(140, 90, 255, 0.3); }
.icon-box-amber { background: rgba(245, 158, 11, 0.15); color: var(--asp-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.icon-box-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }

.model-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--asp-text-strong);
  margin-bottom: 6px;
}

.model-card-desc {
  font-size: 12px;
  color: var(--asp-text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.btn-model-trigger {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--asp-radius-full);
  padding: 8px 16px;
  color: var(--asp-text-strong);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-model-trigger:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   MOZART-SIGNATURE FLOATING BOTTOM PROMPT & ASSISTANT BAR (REMOVED)
   ========================================================================== */
.studio-floating-bottom-bar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.studio-floating-bottom-bar.hidden-bar {
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
}

/* Tier 1: Chips Shelf */
.floating-chips-shelf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px;
}

.chips-shelf-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #67e8f9;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.floating-suggestions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.floating-suggestions-row::-webkit-scrollbar {
  display: none;
}

.floating-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--asp-radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.floating-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #fff;
}

.btn-floating-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.btn-floating-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Tier 2: Dedicated Input Row */
.floating-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.floating-ai-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-sparkle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 8px #67e8f9;
}

.floating-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  padding: 4px 0;
  min-width: 0;
}

.floating-input-field::placeholder {
  color: #64748b;
  font-size: 12px;
}

.floating-actions-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.floating-kbd-shortcut {
  font-size: 10px;
  font-family: monospace;
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 6px;
}

.btn-floating-action {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  border: none;
  color: #fff;
  border-radius: var(--asp-radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.btn-floating-action:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.5);
}

@media (max-width: 600px) {
  .floating-kbd-shortcut {
    display: none;
  }
}

/* ==========================================================================
   RESPONSIVE REFINEMENTS
   ========================================================================== */
@media (max-width: 900px) {
  .timeline-ruler-strip {
    display: none;
  }
  
  .studio-track-row {
    flex-direction: row;
    gap: 8px;
  }
  
  .track-header-card {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    padding: 8px 6px;
  }
  
  .studio-timeline-overlay-layer {
    left: 98px;
    right: 14px;
  }
  
  .studio-transport-deck {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  
  .transport-right-group {
    display: none;
  }
}

/* ==========================================================================
   INTERACTIVE PROGRESS, RESULT CARDS & TRIM LOCATOR CONTROLS
   ========================================================================== */

/* Progress Bar in Command Deck */
.studio-progress-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--asp-radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--asp-text-strong);
}

.progress-track-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--asp-radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1 0%, #06b6d4 50%, #a855f7 100%);
  border-radius: var(--asp-radius-full);
  transition: width 0.25s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Converted Result Deck Card */
.studio-result-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--asp-radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
}

.result-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-check-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--asp-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.result-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.result-meta {
  font-size: 12px;
  color: var(--asp-text-muted);
}

.result-actions-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-result-download {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--asp-radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease;
}

.btn-result-download:hover {
  transform: translateY(-1px);
  color: #fff;
}

.btn-result-finder {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--asp-text-strong);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--asp-radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-result-finder:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Draggable Trim Locator Handles (DAW Ableton/Mozart Style) */
.trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  cursor: ew-resize;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  user-select: none;
  touch-action: none;
}

.trim-handle-left {
  left: -12px;
}

.trim-handle-right {
  right: -12px;
}

.trim-handle-bar {
  width: 5px;
  height: 42px;
  border-radius: 3px;
  background: var(--asp-cyan-bright);
  box-shadow: 0 0 10px var(--asp-cyan-bright);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.trim-handle:hover .trim-handle-bar,
.trim-handle.is-dragging .trim-handle-bar {
  transform: scaleY(1.25) scaleX(1.3);
  background: #ffffff;
  box-shadow: 0 0 16px #ffffff, 0 0 10px var(--asp-cyan-bright);
}

.trim-time-badge {
  position: absolute;
  bottom: -25px;
  background: #090d16;
  border: 1px solid var(--asp-cyan);
  color: var(--asp-cyan-bright);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.trim-time-badge-left {
  left: 0;
}

.trim-time-badge-right {
  right: 0;
}

/* Mastering A/B Compare Toggle */
.ab-master-compare-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-ab-pill {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-ab-pill:hover {
  color: #f8fafc;
}

.btn-ab-pill.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

/* Piano Roll Card for MIDI Visualizer */
.studio-pianoroll-card {
  background: var(--asp-bg-surface-glass);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--asp-radius-lg);
  padding: 20px 24px;
  margin-top: 24px;
  backdrop-filter: blur(16px);
  box-shadow: var(--asp-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pianoroll-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pianoroll-badges-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pianoroll-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.pianoroll-canvas-container {
  width: 100%;
  height: 220px;
  position: relative;
  background: #090c14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.pianoroll-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Stems Top Bar Action Cluster */
.stems-action-header-bar {
  background: var(--asp-bg-surface-raised);
  border: 1px solid var(--asp-border-subtle);
  border-radius: var(--asp-radius-md);
  padding: 12px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   MOBILE & TABLET HIGH-PRECISION RESPONSIVE ENGINE (<= 768px)
   Strictly isolated to mobile screens; Desktop (>768px) is 100% untouched.
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
  }

  .app-container {
    overflow-x: clip !important;
  }

  .studio-main-container {
    padding: 0 10px 180px 10px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  /* 1. Hardware Transport Deck (Sticky at Top under Header) */
  .studio-transport-deck {
    position: sticky !important;
    top: 58px !important;
    z-index: 95 !important;
    background: rgba(11, 15, 25, 0.96) !important;
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 16px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), 0 0 16px rgba(99, 102, 241, 0.2) !important;
  }

  .transport-project-group {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .project-pill-select {
    max-width: 100% !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  #currentProjectTitle {
    max-width: calc(100vw - 120px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .transport-center-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .transport-timecode {
    order: 1 !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    min-width: 115px !important;
  }

  .transport-btn-cluster {
    order: 2 !important;
  }

  .btn-transport-play {
    width: 34px !important;
    height: 34px !important;
  }

  .btn-transport-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .transport-chip#chipMusicalKey {
    order: 3 !important;
    font-size: 11px !important;
    padding: 4px 9px !important;
  }

  .transport-chip#chipBpmStepper {
    order: 4 !important;
    font-size: 11px !important;
    padding: 4px 9px !important;
  }

  .transport-right-group {
    display: none !important;
  }

  /* 2. Hero Segmented Pill Switcher - Smooth Touch Scrolling */
  .studio-segmented-pill-bar {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
    padding: 4px !important;
    gap: 6px !important;
    border-radius: 14px !important;
    margin: 14px 0 16px 0 !important;
  }

  .studio-segmented-pill-bar::-webkit-scrollbar {
    display: none !important;
  }

  .studio-pill-tab {
    flex: 0 0 auto !important;
    padding: 7px 12px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
  }

  /* 3. Hero Strip Header */
  .studio-hero-strip {
    margin-bottom: 16px !important;
    padding: 0 4px !important;
  }

  .studio-hero-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    word-break: break-word !important;
  }

  .studio-hero-sub {
    font-size: 12px !important;
    line-height: 1.45 !important;
    padding: 0 4px !important;
  }

  /* 4. Arranger Deck & Stems Top Toolbar */
  .studio-arranger-deck {
    border-radius: 14px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .arranger-top-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  .arranger-toolbar-left {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .arranger-deck-badge {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }

  .arranger-stems-chip {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }

  .arranger-toolbar-right {
    width: 100% !important;
  }

  .stems-toolbar-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .stem-monitoring-switch {
    display: flex !important;
    width: 100% !important;
  }

  .btn-stem-mode {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 10px !important;
    padding: 6px 4px !important;
  }

  .btn-stems-zip-top {
    width: 100% !important;
    justify-content: center !important;
    font-size: 10px !important;
    padding: 7px 8px !important;
  }

  /* 5. Compact Track Rows with Aligned Playhead Overlay */
  .track-stack-container {
    padding: 8px 8px !important;
    gap: 8px !important;
  }

  .studio-track-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 6px !important;
    min-height: 64px !important;
  }

  .track-header-card {
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    padding: 6px 4px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    justify-content: space-between !important;
  }

  .track-header-top {
    margin-bottom: 2px !important;
  }

  .track-title-wrap {
    gap: 4px !important;
  }

  .track-color-indicator {
    width: 6px !important;
    height: 6px !important;
    flex-shrink: 0 !important;
  }

  .track-name-text {
    font-size: 9.5px !important;
    max-width: 52px !important;
  }

  .track-header-card .fa-volume-high,
  .track-header-top > span:not(.track-title-wrap span) {
    display: none !important;
  }

  .track-controls-row {
    margin-top: 3px !important;
    gap: 3px !important;
  }

  .btn-track-toggle {
    width: 20px !important;
    height: 20px !important;
    font-size: 9px !important;
    padding: 0 !important;
  }

  #tagMasterQuality,
  .track-controls-row span {
    display: none !important;
  }

  .track-slider-wrap {
    margin-top: 3px !important;
    gap: 4px !important;
  }

  .track-slider-mini {
    height: 3px !important;
  }

  .track-db-readout {
    font-size: 8px !important;
    width: 22px !important;
  }

  .track-clip-body {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
  }

  .clip-top-meta {
    gap: 4px !important;
  }

  .clip-filename-label {
    font-size: 10px !important;
    max-width: calc(100vw - 230px) !important;
  }

  #badgeActiveSpecs {
    display: none !important;
  }

  .btn-clip-mini-download {
    font-size: 9px !important;
    padding: 2.5px 6px !important;
    white-space: nowrap !important;
  }

  .clip-waveform-canvas-box {
    height: 44px !important;
  }

  /* Playhead strictly mapped to clip body, never cutting through track headers! */
  .studio-timeline-overlay-layer {
    left: 86px !important;
    right: 10px !important;
    top: 0 !important;
    bottom: 0 !important;
  }

  /* 6. Command Console Deck & Formats */
  .studio-command-deck {
    padding: 14px 10px !important;
    margin-top: 16px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .command-deck-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .command-deck-dropzone {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
    gap: 10px !important;
  }

  .dropzone-icon {
    font-size: 20px !important;
  }

  .dropzone-text-title {
    font-size: 12px !important;
  }

  .dropzone-text-sub {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }

  .command-format-cluster {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .command-format-cluster .btn-format-pill:nth-child(4) {
    grid-column: span 1 !important;
  }

  .command-format-cluster .btn-format-pill:nth-child(5) {
    grid-column: span 2 !important;
  }

  .btn-format-pill {
    text-align: center !important;
    justify-content: center !important;
    padding: 7px 4px !important;
    font-size: 11px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-studio-primary-action {
    width: 100% !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  /* 7. Result Card & Piano Roll */
  .studio-result-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px 12px !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  .result-card-left {
    gap: 10px !important;
  }

  .result-actions-cluster {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .btn-result-download,
  .btn-result-finder {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  .ab-master-compare-bar {
    width: 100% !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .studio-pianoroll-card {
    padding: 14px 10px !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  .pianoroll-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .pianoroll-badges-cluster {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  .pianoroll-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .pianoroll-canvas-container {
    height: 160px !important;
  }

  /* 8. AI Models Rack */
  .studio-models-rack {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 20px !important;
  }

  .studio-model-card {
    padding: 16px !important;
    box-sizing: border-box !important;
  }

  /* 9. Floating Bottom Prompt & AI Bar */
  .studio-floating-bottom-bar {
    bottom: 12px !important;
    width: calc(100% - 16px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    max-width: 100% !important;
  }

  .studio-floating-bottom-bar.hidden-bar {
    transform: translate(-50%, 140%) !important;
  }

  .floating-chips-shelf {
    gap: 6px !important;
    padding-bottom: 4px !important;
  }

  .chips-shelf-label {
    display: none !important;
  }

  .floating-chip {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }

  .floating-input-row {
    gap: 6px !important;
    width: 100% !important;
  }

  .floating-ai-indicator span:last-child {
    display: none !important;
  }

  .floating-input-field {
    font-size: 12px !important;
    min-width: 0 !important;
  }

  .floating-input-field::placeholder {
    font-size: 11px !important;
  }

  .floating-kbd-shortcut {
    display: none !important;
  }

  .btn-floating-action {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
}

/* ==========================================================================
   EXTRA COMPACT MOBILE OVERRIDES (<= 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .studio-main-container {
    padding: 0 6px 180px 6px !important;
  }

  .track-stack-container {
    padding: 6px 6px !important;
  }

  .track-header-card {
    width: 66px !important;
    min-width: 66px !important;
    max-width: 66px !important;
    padding: 4px 2px !important;
  }

  .track-name-text {
    font-size: 9px !important;
    max-width: 44px !important;
  }

  .studio-timeline-overlay-layer {
    left: 78px !important;
    right: 8px !important;
  }

  .clip-filename-label {
    max-width: calc(100vw - 195px) !important;
    font-size: 9.5px !important;
  }

  .transport-chip#chipMusicalKey,
  .transport-chip#chipBpmStepper {
    font-size: 10px !important;
    padding: 3px 6px !important;
  }

  .transport-timecode {
    font-size: 10px !important;
    min-width: 105px !important;
    padding: 2px 6px !important;
  }
}
