/* ==============================================================================
   RAW CAPTURE WEB — 1:1 CANONICAL NATIVE RETRO-SAMPLER DESIGN SYSTEM
   Faithfully matching Masada Audio's Raw Capture iOS / Hardware Interface
   ============================================================================== */

/* Self-Hosted Typography — Zero External Font Network Calls */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/share-tech-mono-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vt323-latin.woff2') format('woff2');
}

:root {
  --bg-black: #000000;
  --bg-app: #050608;
  --bg-panel: #0a0b0f;
  --bg-btn: #0f1118;
  --bg-btn-hover: #171924;
  --bg-btn-active: #222533;
  --bg-lcd: #07080b;

  --border-dark: #191b24;
  --border-subtle: #242735;
  --border-btn: #1f212e;
  --border-active: #ffaa00;

  --amber-primary: #ffaa00;
  --amber-light: #ffc433;
  --amber-dim: #7a5405;
  --amber-glow: rgba(255, 170, 0, 0.45);
  --amber-bg: rgba(255, 170, 0, 0.12);

  --text-white: #f2f2f7;
  --text-muted: #8e8e99;
  --text-dim: #4c4e5a;
  --text-lcd-dim: #5c4308;

  --accent-red: #ff3b30;
  --accent-green: #30d158;
  --accent-cyan: #00e5ff;

  --font-ui: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-lcd: 'VT323', 'Share Tech Mono', monospace;
  --font-tech: 'Share Tech Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.3;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

/* Studio Device Switcher Bar (Tablet & Desktop Only) */
.studio-device-bar {
  display: none;
  width: 100%;
  max-width: 1140px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #090c12;
  border: 1px solid #1a2232;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  margin-bottom: 8px;
  flex-shrink: 0;
  z-index: 100;
}

@media (min-width: 768px) {
  .studio-device-bar {
    display: flex;
  }
}

.studio-device-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  color: #8ea2be;
  letter-spacing: 1px;
}

.device-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 8px #30d158;
  animation: pulseGreen 2s infinite;
}

.studio-device-modes {
  display: flex;
  gap: 6px;
}

.studio-mode-pill {
  background: #10141d;
  border: 1px solid #202738;
  color: #79879f;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.8px;
  transition: all 0.15s ease;
}

.studio-mode-pill:hover {
  border-color: #3b4760;
  color: #ffffff;
}

.studio-mode-pill.active {
  background: var(--amber-primary);
  border-color: var(--amber-primary);
  color: #000000;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(255, 149, 0, 0.4);
}

/* Studio Workspace Container */
.studio-workspace {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: all 0.25s ease;
  overflow: hidden;
}

/* App Container - Responsive phone chassis / full view filling 100% viewport */
.app-wrapper {
  width: 100%;
  max-width: 490px;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 6px) 10px env(safe-area-inset-bottom, 8px) 10px;
  gap: 5px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  border-left: 1px solid #14141a;
  border-right: 1px solid #14141a;
  overflow: hidden;
  position: relative;
}

/* Mobile Phone Default (< 768px): 100% Edge-to-Edge Pure App */
@media (max-width: 767px) {
  body {
    padding: 0;
    overflow-x: hidden;
  }
  .studio-device-bar {
    display: none !important;
  }
  .studio-workspace,
  .studio-workspace.view-studio,
  .studio-workspace.view-phone,
  .studio-workspace.view-tablet {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    gap: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
  }
  .studio-workspace .app-wrapper,
  .studio-workspace.view-studio .app-wrapper,
  .studio-workspace.view-phone .app-wrapper,
  .studio-workspace.view-tablet .app-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    flex: 1 1 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: env(safe-area-inset-top, 6px) 8px env(safe-area-inset-bottom, 8px) 8px !important;
  }
  .studio-workspace.view-phone .app-wrapper::before {
    display: none !important; /* No fake island on actual mobile screen */
  }
  .studio-rack-panel {
    display: none !important;
  }
}

@media (min-width: 768px) {
  /* Desktop View Mode 1: Phone Frame (393px × 852px iPhone 16 Pro) */
  .studio-workspace.view-phone .app-wrapper {
    width: 393px;
    height: 852px;
    max-height: calc(100vh - 60px);
    border-radius: 36px;
    border: 4px solid #232836;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .studio-workspace.view-phone .app-wrapper::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #000000;
    border-radius: 20px;
    z-index: 50;
    pointer-events: none;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1);
  }

  .studio-workspace.view-phone .studio-rack-panel {
    display: none !important;
  }

  /* Desktop View Mode 2: Tablet (iPad Frame ~680px) */
  .studio-workspace.view-tablet .app-wrapper {
    width: 680px;
    max-width: 95vw;
    height: calc(100vh - 60px);
    max-height: 920px;
    border-radius: 20px;
    border: 2px solid #202636;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.95);
  }

  .studio-workspace.view-tablet .studio-rack-panel {
    display: none !important;
  }

  /* Desktop View Mode 3: Studio Widescreen (Dual Console) */
  .studio-workspace.view-studio {
    display: flex;
    gap: 16px;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 1140px;
    height: calc(100vh - 60px);
    max-height: 880px;
  }

  .studio-workspace.view-studio .app-wrapper {
    width: 480px;
    flex: 0 0 480px;
    height: 100%;
    border-radius: 14px;
    border: 1px solid #1c2434;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  }

  .studio-workspace.view-studio .studio-rack-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 580px;
    height: 100%;
    background: #090c13;
    border: 1px solid #1c2434;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    gap: 10px;
    overflow-y: auto;
  }
}

/* Studio Rack Panel Component Styles */
.studio-rack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.rack-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rack-unit-tag {
  font-family: var(--font-tech);
  font-size: 8.5px;
  font-weight: 700;
  color: #30d158;
  letter-spacing: 1px;
}

.rack-title-text {
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 800;
  color: var(--amber-primary);
  letter-spacing: 1px;
}

.rack-tab-toggles {
  display: flex;
  gap: 5px;
}

.rack-tab-pill {
  background: #10141d;
  border: 1px solid #202738;
  color: #79879f;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.8px;
  transition: all 0.15s ease;
}

.rack-tab-pill.active {
  background: var(--amber-primary);
  color: #000000;
  font-weight: 800;
  border-color: var(--amber-primary);
}

.rack-content-pane {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.rack-content-pane.active {
  display: flex;
}

.rack-pad-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
  flex-shrink: 0;
}

.rack-lvl-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rack-label {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: #8a94a6;
  min-width: 58px;
}

.rack-pills-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
}

#desktopRackBanks .grid-bank-pill,
#padGridBanksPills .grid-bank-pill {
  flex: 1;
  width: auto;
  min-width: 56px;
  padding: 0 8px;
}

.rack-studio-dock {
  background: #070a10;
  border: 1px solid #18202d;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.rack-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 5px;
}

.rack-dock-title {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--amber-primary);
  letter-spacing: 0.8px;
}

.rack-dock-status {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 700;
  color: #30d158;
  letter-spacing: 0.6px;
}

.rack-dock-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.rack-readout-cell {
  background: #0c1018;
  border: 1px solid #1a2232;
  border-radius: 5px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rack-readout-label {
  font-family: var(--font-tech);
  font-size: 8px;
  color: #6d778a;
  letter-spacing: 0.6px;
}

.rack-readout-val {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
}

.rack-dock-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 6px;
}

.rack-dock-btn {
  background: #101520;
  border: 1px solid #222b3d;
  color: #d5dce8;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 8px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.rack-dock-btn:hover {
  border-color: var(--amber-primary);
  color: #ffffff;
}

.rack-dock-btn.primary {
  background: rgba(255, 149, 0, 0.14);
  border-color: var(--amber-primary);
  color: var(--amber-primary);
}

.rack-dock-btn.primary:hover {
  background: var(--amber-primary);
  color: #000000;
}

.desktop-crate-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

/* Responsive Ergonomics for Compact Mobile Phones */
@media (max-width: 480px) and (max-height: 750px) {
  .app-wrapper {
    gap: 3px;
    padding: env(safe-area-inset-top, 4px) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }
  .top-header {
    padding: 2px 2px;
  }
  .anchor-bar {
    padding: 3px 6px;
    font-size: 9px;
  }
  .action-btn {
    min-height: 30px;
    font-size: 9.5px;
    padding: 4px 2px;
  }
  .lcd-screen-container {
    min-height: 110px;
    padding: 6px 8px;
  }
  .lcd-top-bar {
    font-size: 13px;
  }
  .bank-nav-tab {
    padding: 5px 2px;
    font-size: 9.5px;
  }
  .performance-section {
    min-height: 130px;
  }
  .rc-pad {
    aspect-ratio: 1 / 1 !important;
    min-height: unset !important;
    padding: 5px 6px;
  }
  .ctrl-btn {
    font-size: 9px;
  }
  .footer-btn {
    padding: 6px 2px;
    font-size: 9.5px;
  }
}

/* 1. Header Bar */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 4px 4px;
}

.app-title-text {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
}

.btn-settings {
  background: var(--bg-btn);
  border: 1px solid var(--border-btn);
  border-radius: 5px;
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-settings:hover {
  background: var(--bg-btn-hover);
  border-color: var(--border-subtle);
}

/* 2. Divided Hardware Telemetry Bar (Left: MASADA Connect 3-Dot Link | Right: GPS & Privacy Shield) */
.anchor-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #090a0e;
  border: 1px solid #181c28;
  border-radius: 5px;
  padding: 5px 10px;
  font-family: var(--font-tech);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: #8c93a8;
  text-transform: uppercase;
}

.anchor-bar.anchor-bar-split {
  padding: 2px 3px;
  gap: 2px;
  min-height: 29px;
  justify-content: space-between;
}

.anchor-split-divider {
  width: 1px;
  align-self: stretch;
  margin: 4px 1px;
  background: #1f2536;
  flex-shrink: 0;
}

.anchor-text {
  display: inline-block;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #7d859c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mc-three-dot-badge.is-linked .anchor-text,
.anchor-text.connected {
  color: #30d158;
}

.anchor-gps-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.65px;
  color: #9ba3b8;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.anchor-gps-badge:hover {
  background: #111521;
  border-color: #2b3348;
  color: #f8fafc;
}

.anchor-gps-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 6px rgba(48, 209, 88, 0.75);
  flex-shrink: 0;
}

.anchor-gps-badge.is-safe {
  color: #b7c0d4;
}
.anchor-gps-badge.is-safe .anchor-gps-dot {
  background: #30d158;
  box-shadow: 0 0 6px rgba(48, 209, 88, 0.75);
}

.anchor-gps-badge.is-shield {
  color: #5ce1ff;
  border-color: rgba(0, 229, 255, 0.22);
  background: rgba(0, 229, 255, 0.05);
}
.anchor-gps-badge.is-shield .anchor-gps-dot {
  background: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.85);
}

.anchor-gps-badge.is-active {
  color: #ffbe3b;
  border-color: rgba(255, 184, 0, 0.28);
  background: rgba(255, 184, 0, 0.06);
}
.anchor-gps-badge.is-active .anchor-gps-dot {
  background: #ffb800;
  box-shadow: 0 0 6px rgba(255, 184, 0, 0.85);
}

/* 3. Top Action Buttons (Row 1 & Row 2) */
.action-grid-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.action-btn {
  background: var(--bg-btn);
  border: 1px solid var(--border-btn);
  border-radius: 4px;
  color: #9ea0b0;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.action-btn:hover {
  background: var(--bg-btn-hover);
  color: #ffffff;
  border-color: var(--border-subtle);
}

.action-btn:active {
  background: var(--bg-btn-active);
  transform: translateY(1px);
}

.action-btn.active {
  background: #141722;
  border-color: #2e3347;
  color: #ffffff;
}

.action-btn.amber-text {
  color: var(--amber-primary);
}

.action-btn.amber-filled {
  background: var(--amber-primary);
  color: #000000;
  border-color: var(--amber-primary);
  font-weight: 800;
}

/* Corner triangle for buttons with sub-functions (Masada 1:1 hardware specification) */
.dog-ear,
.action-btn.dog-ear,
.ctrl-btn.dog-ear,
.bank-nav-tab {
  position: relative;
  overflow: hidden;
}

.dog-ear::after,
.action-btn.dog-ear::after,
.ctrl-btn.dog-ear::after,
.bank-nav-tab::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 11px 11px 0;
  border-color: transparent var(--amber-primary) transparent transparent;
  pointer-events: none;
  z-index: 5;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

/* When bank tab is active (amber background), corner triangle is stark black */
.bank-nav-tab.active::after {
  border-color: transparent #000000 transparent transparent;
}

/* Visual pulse when long-press / hold sub-function triggers */
.hold-activated {
  transform: scale(0.95) !important;
  box-shadow: 0 0 18px rgba(255, 149, 0, 0.85) !important;
  filter: brightness(1.3);
}

.btn-sub-label {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-top: 1px;
}

/* 4. Retro LCD Analyzer Screen */
.lcd-screen-container {
  background: var(--bg-lcd);
  border: 1px solid #1a1d28;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  flex: 1 1 0; /* Absorbs vertical height, giving tall retro LCD look */
  min-height: 160px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.95);
}

/* Faint vertical amber guidelines across LCD */
.lcd-screen-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 19.8%,
    rgba(255, 170, 0, 0.09) 20%
  );
  pointer-events: none;
  z-index: 1;
}

.lcd-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  font-family: var(--font-lcd);
  font-size: 13.5px;
  letter-spacing: 0.8px;
  color: var(--amber-primary);
  text-shadow: 0 0 8px var(--amber-glow);
  z-index: 2;
  position: relative;
}

#lcdSampleName {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
  flex-shrink: 1;
}

#lcdTimeDisplay {
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.lcd-format-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lcd-tag {
  color: var(--text-lcd-dim);
}

.lcd-tag.active {
  color: var(--amber-primary);
  text-shadow: 0 0 6px var(--amber-glow);
}

.lcd-tag.wav-active {
  color: #4cd964;
  text-shadow: 0 0 6px rgba(76, 217, 100, 0.6);
}

/* Center LCD / Waveform Area */
.lcd-center-area {
  flex: 1;
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 110px;
  overflow: hidden;
  z-index: 2;
}

.lcd-offline-notice {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  background: rgba(7, 8, 11, 0.75);
  backdrop-filter: blur(2px);
  z-index: 4;
}

.lcd-offline-title {
  font-family: var(--font-lcd);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--amber-primary);
  text-shadow: 0 0 10px var(--amber-glow);
}

.lcd-offline-sub {
  font-family: var(--font-lcd);
  font-size: 15px;
  letter-spacing: 1.5px;
  color: #cca000;
  opacity: 0.85;
}

#waveformCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  cursor: crosshair;
}

.lcd-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-lcd);
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--amber-primary);
  text-shadow: 0 0 8px var(--amber-glow);
  z-index: 2;
  position: relative;
}

/* 5. Bank Tabs Row */
.bank-tabs-strip {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.bank-nav-tab {
  flex: 1;
  background: var(--bg-btn);
  border: 1px solid var(--border-btn);
  border-radius: 4px;
  color: #9ea0b0;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
}

.bank-nav-tab:hover {
  color: #ffffff;
  background: var(--bg-btn-hover);
}

.bank-nav-tab.active {
  background: var(--amber-primary);
  color: #000000;
  border-color: var(--amber-primary);
  font-weight: 800;
}

/* 6. Performance & Controls Section (Split Three Columns: Pads, Page Dots, Controls) */
.performance-section {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 4px;
  flex-shrink: 0;
  margin: 2px 0;
  width: 100%;
}

/* Left: 4-Pad Quad Grid */
.pads-column {
  flex: 0 0 60%;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}

.pads-quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

/* 4x4 Extended Mode (for Desktop) */
.pads-quad-grid.matrix-mode {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.rc-pad {
  aspect-ratio: 1 / 1 !important; /* STRICT SQUARES ONLY MATCHING MPC NATIVE SCREENSHOT */
  width: 100%;
  height: auto !important;
  min-height: unset !important;
  background: #0c0d12;
  border: 1px solid #1e202c;
  border-left: 3.5px solid #282c3c !important;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: all 0.08s ease;
  user-select: none;
}

.rc-pad:hover {
  border-color: #2e3244;
}

.rc-pad.pad-drag-hover {
  border-color: #ff9f0a !important;
  border-left-color: #ffffff !important;
  box-shadow: 0 0 25px rgba(255, 159, 10, 0.6) !important;
  background: #141724 !important;
}

/* Left column pads get signature amber left accent stripe (matches native iOS screenshot) */
#padSlot1, #padSlot3 {
  border-left: 3.5px solid #ff9f0a !important;
}

/* Assigned / Active / Selected Pad (1:1 with Native iOS Screenshot: Dark obsidian surface with glowing amber border) */
.rc-pad.has-chop, .rc-pad.selected {
  background: #0f1118 !important;
  border: 1.5px solid #ff9f0a !important;
  border-left: 3.5px solid #ff9f0a !important;
  box-shadow: 0 0 14px rgba(255, 159, 10, 0.35) !important;
}

.rc-pad.has-chop .rc-pad-id, .rc-pad.selected .rc-pad-id {
  color: #8e90a0 !important;
  font-weight: 700 !important;
}

.rc-pad.has-chop .rc-pad-tag, .rc-pad.selected .rc-pad-tag {
  color: #ff9f0a !important;
  font-weight: 800 !important;
}

.rc-pad.has-chop .rc-pad-content {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3) !important;
  text-align: right;
  align-self: flex-end;
}

.rc-pad:active, .rc-pad.playing {
  background: #ff9f0a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 25px rgba(255, 159, 10, 0.95), inset 0 0 10px rgba(255, 255, 255, 0.7) !important;
  transform: translateY(1px);
}

.rc-pad:active .rc-pad-id, .rc-pad.playing .rc-pad-id,
.rc-pad:active .rc-pad-tag, .rc-pad.playing .rc-pad-tag,
.rc-pad:active .rc-pad-content, .rc-pad.playing .rc-pad-content {
  color: #000000 !important;
  font-weight: 900;
}

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

.rc-pad-id {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  color: #555869;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rc-pad-tag {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  color: #ff9f0a;
}

.rc-pad-content {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-family: var(--font-tech);
  font-size: 11px;
  color: #2b2d3c;
  text-align: right;
}

/* Dedicated Page Dots Real Estate Channel (Between Pads and Control Strip) */
.page-dots-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  width: 10px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  z-index: 5;
}

.page-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3e445a;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Touch target expansion for effortless clicking */
.page-dot::before {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
}

.page-dot:hover {
  background: #6b7596;
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.25);
}

.page-dot.active {
  background: #ff9f0a;
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 159, 10, 0.9);
  transform: scale(1.2);
}

.page-slide-down {
  animation: padPageSlideDown 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.page-slide-up {
  animation: padPageSlideUp 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes padPageSlideDown {
  0% { transform: translateY(-8px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes padPageSlideUp {
  0% { transform: translateY(8px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Right: Vertical Control Strip */
.controls-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  height: 100%;
}

.split-control-pair {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6px;
  flex: 1;
}

.ctrl-btn {
  background: var(--bg-btn);
  border: 1px solid var(--border-btn);
  border-radius: 4px;
  color: #9ea0b0;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 2px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  position: relative;
}

.ctrl-btn:hover {
  background: var(--bg-btn-hover);
  color: #ffffff;
}

.ctrl-btn:active {
  background: var(--bg-btn-active);
  transform: translateY(1px);
}

.ctrl-btn.rec-btn {
  color: var(--amber-primary);
  font-weight: 800;
}

.ctrl-btn.rec-btn.recording {
  background: var(--accent-red) !important;
  color: #ffffff !important;
  border-color: #ff6b64 !important;
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.7);
  animation: pulse-rec 1s infinite alternate;
}

@keyframes pulse-rec {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

.ctrl-btn.import-btn {
  color: #ffffff;
}

.ctrl-btn.playing-stop {
  background: #251214 !important;
  border-color: #ff3b30 !important;
  color: #ff453a !important;
  box-shadow: 0 0 14px rgba(255, 59, 48, 0.45) !important;
  font-weight: 800 !important;
}

.ctrl-btn.dog-ear::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent var(--amber-primary) transparent transparent;
}

#btnSliceChop {
  color: var(--amber-primary);
}
#btnSliceChop .btn-sub-label {
  color: var(--amber-primary);
  opacity: 0.85;
}

#btnOneShot {
  color: var(--amber-primary);
}
#btnOneShot .btn-sub-label {
  color: var(--amber-primary);
  opacity: 0.85;
}

#btnTruncate {
  color: var(--amber-primary);
  font-weight: 800;
  letter-spacing: 1px;
}

/* 7. Zoom Control Segmented Slider */
.zoom-strip-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.zoom-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #8e8e99;
}

.zoom-val-text {
  color: var(--amber-primary);
  font-family: var(--font-tech);
}

/* Stepped LED Segment Bar */
.zoom-bar-outer {
  background: #090a0e;
  border: 1px solid #1c1e28;
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  height: 18px;
}

.zoom-seg {
  flex: 1;
  height: 10px;
  background: #151722;
  border-radius: 1px;
  transition: background 0.08s ease;
}

.zoom-seg.active {
  background: var(--amber-primary);
  box-shadow: 0 0 4px var(--amber-glow);
}

/* 8. Bottom Footer Status Strip */
.bottom-footer-bar {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr 1.55fr;
  gap: 5px;
  margin-top: 4px;
}

.footer-btn {
  background: #090a0e;
  border: 1px solid #161822;
  border-radius: 4px;
  padding: 9px 4px;
  text-align: center;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--amber-primary);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.12s ease;
}

.footer-btn:hover {
  background: #141724;
  border-color: #2b3044;
}

.footer-btn.center-crate {
  color: #8e8e99;
}

.footer-btn.center-crate:hover {
  color: #ffffff;
}


/* ==========================================================================
   SAMPLER SETTINGS MODAL (1:1 with Masada Native Screenshot)
   ========================================================================== */
.settings-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.settings-modal-backdrop.open,
.settings-modal-backdrop.active {
  display: flex;
}

.settings-modal-card {
  width: 92%;
  max-width: 420px;
  max-height: 94vh;
  overflow-y: auto;
  background: #0b0f16;
  border: 1px solid #1c2433;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2px;
}

.settings-title {
  font-family: var(--font-tech);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--amber-primary);
  letter-spacing: 1.2px;
}

.settings-sub-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  color: #30d158;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

.status-dot-green {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 6px rgba(48, 209, 88, 0.8);
}

.status-dot-amber {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--amber-primary);
  box-shadow: 0 0 6px var(--amber-primary);
  animation: pulseAmber 2s infinite;
}

.settings-close-x {
  background: none;
  border: none;
  color: var(--amber-primary);
  font-size: 19px;
  font-weight: bold;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: opacity 0.15s;
}

.settings-close-x:hover {
  opacity: 0.8;
}

.settings-rows-container {
  display: flex;
  flex-direction: column;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-label {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.8px;
}

.settings-val-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: var(--amber-primary);
  letter-spacing: 0.6px;
}

.settings-pill-group {
  display: flex;
  gap: 5px;
}

.settings-pill {
  background: #0f1218;
  border: 1px solid #1e2430;
  color: #6d778a;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.5px;
}

.settings-pill:hover {
  border-color: #2e3b52;
  color: #a0aec0;
}

.settings-pill.active {
  border: 1.5px solid var(--amber-primary);
  color: var(--amber-primary);
  background: #0d141e;
  box-shadow: inset 0 0 4px rgba(255, 149, 0, 0.15);
}

.settings-export-section {
  background: #0f121a;
  border: 1px solid #1c2230;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
}

.settings-export-title {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: var(--amber-primary);
  margin-bottom: 8px;
  letter-spacing: 0.8px;
}

.settings-close-btn {
  width: 100%;
  background: #111520;
  border: 1px solid #1f2738;
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  padding: 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  letter-spacing: 1.2px;
  transition: all 0.15s;
}

.settings-close-btn:hover {
  background: #171d2c;
  border-color: #2f3b54;
}

/* ==========================================================================
   4X4 PAD GRID MODAL (1:1 with Masada Native Screenshot)
   ========================================================================== */
.pad-grid-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.pad-grid-modal-backdrop.open {
  display: flex;
}

.pad-grid-modal-card {
  width: 92%;
  max-width: 430px;
  max-height: 94vh;
  overflow-y: auto;
  background: #0b0f16;
  border: 1px solid #1c2433;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pad-grid-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px;
}

.pad-grid-title {
  font-family: var(--font-tech);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--amber-primary);
  letter-spacing: 1.2px;
}

.pad-grid-sub {
  font-family: var(--font-tech);
  font-size: 9.5px;
  color: #707b91;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

.pad-grid-close-x {
  background: none;
  border: none;
  color: var(--amber-primary);
  font-size: 19px;
  font-weight: bold;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: opacity 0.15s;
}

.pad-grid-close-x:hover {
  opacity: 0.8;
}

.pad-grid-controls-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pad-grid-ctrl-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-group-label {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: #8a94a6;
  min-width: 58px;
  letter-spacing: 0.8px;
}

.ctrl-group-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.grid-ctrl-pill {
  background: #0e1219;
  border: 1px solid #1c2433;
  color: #6d778a;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.grid-ctrl-pill:hover {
  border-color: #2e3b52;
  color: #a0aec0;
}

.grid-ctrl-pill.active {
  border: 1.5px solid var(--amber-primary);
  color: var(--amber-primary);
  background: #0c121b;
  box-shadow: inset 0 0 4px rgba(255, 149, 0, 0.15);
}

.grid-bank-pill {
  background: #0e1219;
  border: 1px solid #1c2433;
  color: #6d778a;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  width: 28px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.grid-bank-pill:hover {
  border-color: #2e3b52;
  color: #a0aec0;
}

.grid-bank-pill.active {
  background: #ff9f0a;
  color: #000000;
  font-weight: 900;
  border-color: #ff9f0a;
}

.pad-matrix-16 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 6px 0;
}

.pad-16-slot {
  aspect-ratio: 1;
  background: #090c13;
  border: 1px solid #18202d;
  border-radius: 6px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
  user-select: none;
}

.pad-16-slot .slot-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-tech);
  font-size: 8.5px;
}

.pad-16-slot .slot-pad-label {
  color: #6a768d;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.pad-16-slot .slot-bank-code {
  color: var(--amber-primary);
  font-weight: 800;
  font-size: 8.5px;
}

.pad-16-slot .slot-status {
  font-family: var(--font-tech);
  font-size: 9.5px;
  color: #4e576d;
  text-align: center;
  margin: auto 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pad-16-slot.has-chop {
  background: #ffffff !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.65), inset 0 0 8px rgba(255, 255, 255, 0.8) !important;
}

.pad-16-slot.has-chop .slot-pad-label,
.pad-16-slot.has-chop .slot-bank-code,
.pad-16-slot.has-chop .slot-status {
  color: #000000 !important;
  font-weight: 800 !important;
}

.pad-16-slot.has-chop.active-selected {
  border: 2.5px solid #00e5ff !important;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.85), inset 0 0 8px rgba(255, 255, 255, 0.9) !important;
}

.pad-16-slot.active-selected:not(.has-chop) {
  border: 2px solid var(--amber-primary);
  background: #16140b;
  box-shadow: inset 0 0 10px rgba(255, 149, 0, 0.25), 0 0 8px rgba(255, 149, 0, 0.35);
}

.pad-16-slot.playing {
  border-color: #ffffff !important;
  background: #ff9500 !important;
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.9) !important;
}
.pad-16-slot.playing .slot-pad-label,
.pad-16-slot.playing .slot-bank-code,
.pad-16-slot.playing .slot-status {
  color: #000000 !important;
}

.pad-parameters-box {
  background: #090c13;
  border: 1px solid #18202d;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 4px;
}

.pad-params-title {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: #8a94a6;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.pad-param-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.param-name {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  min-width: 44px;
  letter-spacing: 0.8px;
}

.param-step-btn {
  width: 32px;
  height: 28px;
  background: #0e1219;
  border: 1px solid #1c2434;
  color: #ffffff;
  border-radius: 4px;
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.param-step-btn:hover {
  background: #182030;
  border-color: #2c384e;
  color: var(--amber-primary);
}

.param-slider-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.param-slider-wrapper input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: #06090e;
  border: 1px solid #18202e;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.param-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 26px;
  background: linear-gradient(180deg, #ffc043 0%, #ff9500 50%, #d47600 100%);
  border: 1px solid #ffe17d;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 149, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  cursor: ew-resize;
  margin-top: -2px;
}

.param-slider-wrapper input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 26px;
  background: linear-gradient(180deg, #ffc043 0%, #ff9500 50%, #d47600 100%);
  border: 1px solid #ffe17d;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 149, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  cursor: ew-resize;
}

.param-val-text {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  min-width: 50px;
  text-align: right;
  letter-spacing: 0.5px;
}

/* Toast */
.rc-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #11131a;
  border: 1px solid var(--amber-primary);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--font-tech);
  font-size: 12px;
  letter-spacing: 1px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9), 0 0 15px var(--amber-glow);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 1000;
}

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

/* Active Loop & Mode Button Glow */
.action-btn.loop-active, .ctrl-btn.loop-active {
  background: var(--amber-primary) !important;
  color: #000000 !important;
  border-color: var(--amber-primary) !important;
  font-weight: 800 !important;
  box-shadow: 0 0 14px var(--amber-glow) !important;
}

.action-btn.tune-active {
  background: var(--accent-cyan) !important;
  color: #000000 !important;
  border-color: var(--accent-cyan) !important;
  font-weight: 800 !important;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.5) !important;
}

/* 16-Tuning Mode Pad Face Highlights */
.rc-pad.pad-root-tune {
  border: 2px solid var(--amber-primary) !important;
  border-left: 5px solid #ffcc00 !important;
  box-shadow: 0 0 14px var(--amber-glow);
}

.rc-pad.pad-root-tune .rc-pad-id {
  color: var(--amber-primary) !important;
  font-weight: 800;
}

.rc-pad.pad-root-tune .rc-pad-content {
  color: var(--amber-primary) !important;
  font-weight: 800;
}

.rc-pad.pad-tune-mode {
  border-left: 3px solid var(--accent-cyan);
}

.rc-pad.pad-tune-mode .rc-pad-tag {
  color: var(--accent-cyan);
}

/* Crate Chop List Rows in Drawer */
.crate-chop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090a0e;
  border: 1px solid #1a1d28;
  padding: 6px 10px;
  border-radius: 4px;
  font-family: var(--font-tech);
  font-size: 11px;
  transition: all 0.1s ease;
}

.crate-chop-row:hover {
  background: #141724;
  border-color: #2b3044;
}

.crate-chop-btn {
  background: #171924;
  border: 1px solid #2a2e40;
  color: var(--amber-primary);
  border-radius: 3px;
  padding: 4px 8px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.1s ease;
}

.crate-chop-btn:hover {
  background: var(--amber-primary);
  color: #000000;
  border-color: var(--amber-primary);
}

/* ==============================================================================
   THE CRATE — 1:1 NATIVE FULL-SCREEN DRAWER & CAPTURE REPOSITORY
   ============================================================================== */
.crate-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.crate-modal-backdrop.open {
  display: flex;
}

.crate-modal-card {
  width: 100%;
  max-width: 490px;
  height: 94vh;
  height: 94dvh;
  background: #07080c;
  border: 1px solid #1c1f2b;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.95);
  animation: slide-up-crate 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up-crate {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}

/* Header */
.crate-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px 14px;
  border-bottom: 1px solid #141722;
  flex-shrink: 0;
}

.crate-title-group {
  display: flex;
  flex-direction: column;
}

.crate-title-text {
  font-family: var(--font-tech);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--amber-primary);
  text-shadow: 0 0 10px var(--amber-glow);
}

.crate-status-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-tech);
  font-size: 9px;
  color: #ffaa00;
  letter-spacing: 1px;
  margin-top: 2px;
}

.crate-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffaa00;
  box-shadow: 0 0 6px #ffaa00;
  animation: pulse-crate-dot 1.2s infinite alternate;
}

@keyframes pulse-crate-dot {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.crate-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crate-pill-btn {
  font-family: var(--font-tech);
  font-weight: 800;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 14px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.12s ease;
}

.sync-pending-pill {
  background: #ffb700;
  color: #000000;
  border: none;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.sync-pending-pill:hover {
  background: #ffc83b;
}

.select-pill {
  background: #141724;
  border: 1px solid #282c3e;
  color: #ffffff;
}

.select-pill:hover {
  background: #1c2030;
}

.crate-close-x {
  background: transparent;
  border: none;
  color: var(--amber-primary);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: transform 0.1s ease;
}

.crate-close-x:hover {
  transform: scale(1.15);
}

/* Category Filter Tags Strip */
.crate-tags-strip {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid #12141c;
  flex-shrink: 0;
}

.crate-tags-strip::-webkit-scrollbar {
  display: none;
}

.crate-tag-pill {
  background: #0f1118;
  border: 1px solid #1f2230;
  color: #8e90a2;
  padding: 6px 14px;
  border-radius: 14px;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.crate-tag-pill:hover {
  color: #ffffff;
  border-color: #2e3348;
}

.crate-tag-pill.active {
  background: #ffb700;
  color: #000000;
  border-color: #ffb700;
  font-weight: 800;
}

/* Crate Items Container */
.crate-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Individual Sample Card */
.crate-sample-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid #141622;
  padding-bottom: 14px;
}

.crate-sample-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.crate-sample-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.crate-sample-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.crate-sample-meta {
  font-family: var(--font-tech);
  font-size: 10px;
  color: #8e8e99;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.crate-sample-geo {
  font-family: var(--font-tech);
  font-size: 10px;
  color: #30d158;
  cursor: pointer;
  text-decoration: underline;
  letter-spacing: 0.5px;
}

.crate-sample-geo:hover {
  color: #4cd964;
}

.crate-sample-author {
  font-family: var(--font-tech);
  font-size: 10px;
  color: #636677;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.crate-card-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.crate-card-btn {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  background: #0f1118;
  border: 1px solid #202434;
  color: #9ea0b0;
  transition: all 0.1s ease;
}

.crate-card-btn:hover {
  background: #181b28;
  color: #ffffff;
}

.crate-card-btn.load-btn {
  color: #00e5ff;
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  font-weight: 800;
}

.crate-card-btn.load-btn:hover {
  background: #00e5ff;
  color: #000000;
}

.crate-card-btn.delete-btn {
  color: #ff9500;
  border-color: #ff9500;
  background: rgba(255, 149, 0, 0.08);
}

.crate-card-btn.delete-btn:hover {
  background: #ff9500;
  color: #000000;
}

/* Playback Row (Circular Play + Segmented Waveform Meter) */
.crate-playback-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.crate-play-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #12141e;
  border: 1px solid #232738;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 11px;
  transition: all 0.12s ease;
}

.crate-play-circle:hover {
  background: #1a1e2c;
  color: var(--amber-primary);
  border-color: var(--amber-primary);
}

.crate-play-circle.playing {
  background: var(--amber-primary);
  color: #000000;
  border-color: var(--amber-primary);
  box-shadow: 0 0 10px var(--amber-glow);
}

.crate-segmented-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.crate-wave-tick {
  flex: 1;
  height: 10px;
  background: #191c28;
  border-radius: 1px;
  transition: all 0.08s ease;
}

.crate-wave-tick.mid-peak {
  height: 16px;
}

.crate-wave-tick.tall-peak {
  height: 20px;
}

.crate-wave-tick.played {
  background: var(--amber-primary);
}

.crate-wave-tick.active-dot {
  background: #30d158;
  box-shadow: 0 0 8px #30d158;
  height: 16px;
}

/* Embedded Geolocation Map Component */
.crate-map-card {
  background: #10161a;
  border: 1px solid #1b262e;
  border-radius: 8px;
  margin-top: 8px;
  overflow: hidden;
  position: relative;
}

.crate-map-toggle-strip {
  display: flex;
  padding: 6px;
  gap: 6px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

.map-toggle-pill {
  padding: 4px 14px;
  border-radius: 12px;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  background: rgba(10, 14, 18, 0.85);
  border: 1px solid #23343d;
  color: #8e8e99;
}

.map-toggle-pill.active {
  color: #00e5ff;
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.12);
}

.crate-map-canvas-container {
  width: 100%;
  height: 150px;
  position: relative;
  background: radial-gradient(circle at 50% 50%, #152229 0%, #0d161a 100%);
}

.map-pin-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
}

.pin-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
}

.pin-stem {
  width: 2px;
  height: 8px;
  background: #00e5ff;
  box-shadow: 0 0 8px #00e5ff;
}

.map-expand-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #2a3a44;
  color: #00e5ff;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 700;
  z-index: 5;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.map-apple-logo {
  position: absolute;
  bottom: 8px;
  left: 8px;
  color: #ffffff;
  font-size: 11px;
  font-family: var(--font-ui);
  font-weight: 600;
  opacity: 0.85;
  z-index: 5;
}

/* Bottom Actions in Crate */
.crate-bottom-actions {
  padding: 10px 14px 14px 14px;
  border-top: 1px solid #141722;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  background: #07080c;
}

.crate-action-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.crate-wide-btn {
  background: #0f1118;
  border: 1px solid #1f2334;
  border-radius: 6px;
  padding: 10px 8px;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.crate-wide-btn:hover {
  background: #171a26;
  border-color: #2b3048;
}

.crate-wide-btn.amber-accent {
  color: var(--amber-primary);
}

.crate-wide-btn.green-accent {
  color: #30d158;
}

.crate-wide-btn.purple-accent {
  color: #bf5af2;
}

.crate-action-tri-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.1fr;
  gap: 8px;
}

.crate-tri-btn {
  background: #0f1118;
  border: 1px solid #1f2334;
  border-radius: 6px;
  padding: 10px 6px;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  color: #9ea0b0;
  transition: all 0.12s ease;
}

.crate-tri-btn:hover {
  background: #171a26;
  color: #ffffff;
}

.crate-tri-btn.amber-text {
  color: var(--amber-primary);
}

.crate-tri-btn.red-accent {
  color: #ff3b30;
}

.crate-tri-btn.red-accent:hover {
  background: rgba(255, 59, 48, 0.15);
  border-color: #ff3b30;
}

/* QR Modal Backdrop */
.qr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.qr-modal-backdrop.open {
  display: flex;
}

.qr-modal-card {
  width: 90%;
  max-width: 360px;
  background: #0c0e14;
  border: 1px solid #242738;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95);
}

/* Provenance Inspector Modal */
.provenance-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 350;
  display: none;
  align-items: center;
  justify-content: center;
}

.provenance-modal-backdrop.open {
  display: flex;
}

.provenance-modal-card {
  width: 94%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: #090b10;
  border: 1px solid #1c2230;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.95);
}

.provenance-map-large {
  width: 100%;
  height: 180px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #1c2933;
  background: radial-gradient(circle at 50% 50%, #152229 0%, #0d161a 100%);
}

.provenance-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.prov-detail-item {
  background: #0e121a;
  border: 1px solid #1b202e;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prov-label {
  font-family: var(--font-tech);
  font-size: 9px;
  color: #636677;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.prov-val {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.prov-val.amber-highlight {
  color: var(--amber-primary);
}

.prov-val.green-highlight {
  color: #30d158;
}

/* ==========================================================================
   BANK DISTINCT ACCENT COLORS (A-D & E-H)
   ========================================================================== */
:root {
  --active-bank-color: #ff9500;
  --active-bank-glow: rgba(255, 149, 0, 0.4);
  --bank-a-color: #ff9500;
  --bank-b-color: #00e5ff;
  --bank-c-color: #d500f9;
  --bank-d-color: #00e676;
  --bank-e-color: #ff3d00;
  --bank-f-color: #ffd600;
  --bank-g-color: #1de9b6;
  --bank-h-color: #7c4dff;
}

.bank-nav-tab[data-bank="A"].active {
  background: var(--bank-a-color);
  border-color: var(--bank-a-color);
  box-shadow: 0 0 10px rgba(255, 149, 0, 0.4);
  color: #000000;
}
.bank-nav-tab[data-bank="B"].active {
  background: var(--bank-b-color);
  border-color: var(--bank-b-color);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
  color: #000000;
}
.bank-nav-tab[data-bank="C"].active {
  background: var(--bank-c-color);
  border-color: var(--bank-c-color);
  box-shadow: 0 0 10px rgba(213, 0, 249, 0.4);
  color: #ffffff;
}
.bank-nav-tab[data-bank="D"].active {
  background: var(--bank-d-color);
  border-color: var(--bank-d-color);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
  color: #000000;
}
.bank-nav-tab[data-bank="E"].active {
  background: var(--bank-e-color);
  border-color: var(--bank-e-color);
  box-shadow: 0 0 10px rgba(255, 61, 0, 0.4);
  color: #ffffff;
}
.bank-nav-tab[data-bank="F"].active {
  background: var(--bank-f-color);
  border-color: var(--bank-f-color);
  box-shadow: 0 0 10px rgba(255, 214, 0, 0.4);
  color: #000000;
}
.bank-nav-tab[data-bank="G"].active {
  background: var(--bank-g-color);
  border-color: var(--bank-g-color);
  box-shadow: 0 0 10px rgba(29, 233, 182, 0.4);
  color: #000000;
}
.bank-nav-tab[data-bank="H"].active {
  background: var(--bank-h-color);
  border-color: var(--bank-h-color);
  box-shadow: 0 0 10px rgba(124, 77, 255, 0.4);
  color: #ffffff;
}

/* ==========================================================================
   SPECIAL SLICE MODE (CHOP SUITE) MODAL
   ========================================================================== */
.special-slice-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 310;
  display: none;
  align-items: center;
  justify-content: center;
}

.special-slice-modal-backdrop.open {
  display: flex;
}

.special-slice-modal-card {
  width: 92%;
  max-width: 440px;
  max-height: 94vh;
  overflow-y: auto;
  background: #0b0f16;
  border: 1px solid #1c2433;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.special-slice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.special-slice-title {
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 800;
  color: var(--amber-primary);
  letter-spacing: 1.2px;
}

.special-slice-sub {
  font-family: var(--font-tech);
  font-size: 9.5px;
  color: #707b91;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

.special-slice-close-x {
  background: none;
  border: none;
  color: var(--amber-primary);
  font-size: 19px;
  font-weight: bold;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: opacity 0.15s;
}

.special-slice-close-x:hover {
  opacity: 0.8;
}

.slice-modal-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #0d121c;
  border: 1px solid #161c28;
  border-radius: 8px;
  padding: 10px;
}

.slice-section-title {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  color: #8a94a6;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.slice-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slice-val-badge {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: var(--amber-primary);
}

.slice-algo-pills {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 5px;
}

.slice-algo-pill {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #121824;
  border: 1px solid #1f2838;
  color: #9ea0b0;
  padding: 8px 6px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
}

.slice-algo-pill:hover {
  background: #1a2233;
  color: #ffffff;
}

.slice-algo-pill.active {
  background: var(--amber-primary);
  color: #000000;
  border-color: var(--amber-primary);
  font-weight: 800;
  box-shadow: 0 0 8px var(--amber-glow);
}

.slice-sensitivity-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.slice-sens-presets {
  display: flex;
  gap: 6px;
}

.sens-preset-pill {
  flex: 1;
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #121824;
  border: 1px solid #1f2838;
  color: #9ea0b0;
  padding: 6px 4px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
}

.sens-preset-pill:hover {
  color: #ffffff;
  background: #182030;
}

.sens-preset-pill.active {
  background: rgba(255, 149, 0, 0.18);
  border-color: var(--amber-primary);
  color: var(--amber-primary);
}

.slice-slider-wrapper {
  display: flex;
  align-items: center;
}

.slice-slider-wrapper input[type="range"] {
  width: 100%;
  accent-color: var(--amber-primary);
  cursor: pointer;
}

.slice-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.slice-option-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.option-label {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 700;
  color: #707b91;
  letter-spacing: 0.6px;
}

.option-toggle-btn {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #121824;
  border: 1px solid #1f2838;
  color: #8a94a6;
  padding: 7px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.option-toggle-btn.active {
  background: rgba(48, 209, 88, 0.15);
  border-color: #30d158;
  color: #30d158;
}

.target-bank-pills {
  display: flex;
  gap: 4px;
}

.target-bank-pill {
  flex: 1;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  background: #121824;
  border: 1px solid #1f2838;
  color: #8a94a6;
  padding: 6px 2px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
}

.target-bank-pill:hover {
  color: #ffffff;
}

.target-bank-pill.active {
  background: var(--active-bank-color, var(--amber-primary));
  color: #000000;
  border-color: var(--active-bank-color, var(--amber-primary));
}

.slice-summary-box {
  background: #080b10;
  border: 1px solid #151a24;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-label {
  font-family: var(--font-tech);
  font-size: 9px;
  color: #636677;
  letter-spacing: 0.6px;
}

.summary-val {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.summary-val.highlight {
  color: var(--amber-primary);
}

.slice-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.slice-action-btn {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
  border: none;
}

.slice-action-btn.primary {
  background: var(--amber-primary);
  color: #000000;
  box-shadow: 0 0 12px var(--amber-glow);
}

.slice-action-btn.primary:hover {
  background: #ffaa33;
}

.slice-action-btn.secondary {
  background: #141a26;
  border: 1px solid #232d40;
  color: #00e5ff;
}

.slice-action-btn.secondary:hover {
  background: #1c2536;
  color: #ffffff;
}

.slice-action-btn.close-btn {
  background: transparent;
  border: 1px solid #1c2230;
  color: #707b91;
  font-size: 10px;
  padding: 7px;
}

.slice-action-btn.close-btn:hover {
  color: #ffffff;
  border-color: #333d52;
}

/* ==========================================================================
   CRATE EMPTY STATE & MULTI-SELECT STYLES
   ========================================================================== */
.crate-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  gap: 10px;
}

.crate-empty-icon {
  font-size: 38px;
  opacity: 0.4;
  margin-bottom: 2px;
}

.crate-empty-title {
  font-family: var(--font-tech);
  font-size: 13.5px;
  font-weight: 800;
  color: #8e95a5;
  letter-spacing: 1.5px;
}

.crate-empty-sub {
  font-family: var(--font-tech);
  font-size: 9.5px;
  color: #555c6d;
  letter-spacing: 1px;
}

.crate-empty-desc {
  font-family: var(--font-ui);
  font-size: 11px;
  color: #4b5161;
  max-width: 290px;
  line-height: 1.45;
  margin-top: 4px;
}

.crate-empty-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.crate-empty-btn {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crate-empty-btn.rec-btn {
  background: rgba(255, 59, 48, 0.15);
  border: 1px solid #ff3b30;
  color: #ff3b30;
}

.crate-empty-btn.rec-btn:hover {
  background: #ff3b30;
  color: #ffffff;
}

.crate-empty-btn.import-btn {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid #00e5ff;
  color: #00e5ff;
}

.crate-empty-btn.import-btn:hover {
  background: #00e5ff;
  color: #000000;
}

/* Multi-Select Checkbox & Highlight on Crate Sample Card */
.crate-sample-card {
  position: relative;
  transition: all 0.15s ease;
}

.crate-sample-card.is-selected {
  border-color: var(--amber-primary) !important;
  background: rgba(255, 149, 0, 0.05);
  box-shadow: 0 0 10px rgba(255, 149, 0, 0.15);
  border-radius: 6px;
  padding: 8px;
}

.crate-select-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #3c4254;
  background: #0c0f17;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.12s ease;
  margin-top: 2px;
}

.crate-sample-card:hover .crate-select-checkbox {
  border-color: #707b91;
}

.crate-select-checkbox.checked {
  background: var(--amber-primary);
  border-color: var(--amber-primary);
  box-shadow: 0 0 8px var(--amber-glow);
}

.crate-select-checkbox.checked::after {
  content: '✓';
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

/* Batch Actions Panel */
.crate-batch-actions-panel {
  background: #0a0d14;
  border: 1px solid #1d2535;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

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

.batch-count {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  color: var(--amber-primary);
  letter-spacing: 0.8px;
}

.batch-header-btns {
  display: flex;
  gap: 6px;
}

.batch-mini-btn {
  background: #141a26;
  border: 1px solid #242d40;
  color: #9ea0b0;
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.batch-mini-btn:hover {
  color: #ffffff;
  background: #1d2536;
}

.crate-batch-btns-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 6px;
}

.batch-action-btn {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 7px 4px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  border: none;
  transition: all 0.12s ease;
}

.batch-action-btn.red-accent {
  background: rgba(255, 69, 58, 0.18);
  border: 1px solid #ff453a;
  color: #ff453a;
}
.batch-action-btn.red-accent:hover {
  background: #ff453a;
  color: #ffffff;
}

.batch-action-btn.amber-accent {
  background: rgba(255, 149, 0, 0.18);
  border: 1px solid var(--amber-primary);
  color: var(--amber-primary);
}
.batch-action-btn.amber-accent:hover {
  background: var(--amber-primary);
  color: #000000;
}

.batch-action-btn.green-accent {
  background: rgba(48, 209, 88, 0.18);
  border: 1px solid #30d158;
  color: #30d158;
}
.batch-action-btn.green-accent:hover {
  background: #30d158;
  color: #000000;
}

/* ==============================================================================
   MASADA THEME ENGINE (ECOSYSTEM, MODERN, LEGACY)
   Canonical color palettes dynamically applied across the entire app
   ============================================================================== */

/* 1. ECOSYSTEM THEME (Default Industrial Luxury: OLED Black, Amber/Gold) */
body, body[data-theme="ecosystem"] {
  --bg-black: #000000;
  --bg-app: #050608;
  --bg-panel: #0a0b0f;
  --bg-btn: #0f1118;
  --bg-btn-hover: #171924;
  --bg-btn-active: #222533;
  --bg-lcd: #07080b;

  --border-dark: #191b24;
  --border-subtle: #242735;
  --border-btn: #1f212e;
  --border-active: #ffaa00;

  --amber-primary: #ffaa00;
  --amber-light: #ffc433;
  --amber-dim: #7a5405;
  --amber-glow: rgba(255, 170, 0, 0.45);
  --amber-bg: rgba(255, 170, 0, 0.12);

  --text-white: #f2f2f7;
  --text-muted: #8e8e99;
  --text-dim: #4c4e5a;
  --text-lcd-dim: #5c4308;

  --accent-red: #ff3b30;
  --accent-green: #30d158;
  --accent-cyan: #00e5ff;
}

/* 2. MODERN THEME (Cyberpunk / Future Dark: Deep Navy/Black, Electric Cyan & Neon Pink) */
body[data-theme="modern"] {
  --bg-black: #020408;
  --bg-app: #05080e;
  --bg-panel: #0c0d12;
  --bg-btn: #0e131d;
  --bg-btn-hover: #141c2c;
  --bg-btn-active: #1c263c;
  --bg-lcd: #060a10;

  --border-dark: #121824;
  --border-subtle: #1c273a;
  --border-btn: #182234;
  --border-active: #00ffff;

  --amber-primary: #00ffff;
  --amber-light: #70ffff;
  --amber-dim: #006677;
  --amber-glow: rgba(0, 255, 255, 0.45);
  --amber-bg: rgba(0, 255, 255, 0.12);

  --text-white: #f0f8ff;
  --text-muted: #7890a8;
  --text-dim: #3d4f66;
  --text-lcd-dim: #004d5a;

  --accent-red: #ff007f;
}

body[data-theme="modern"] .app-wrapper {
  background-color: #05080e;
  border-color: #121824;
}

body[data-theme="modern"] .lcd-screen-container {
  background: #060a10;
  border-color: #182436;
  box-shadow: inset 0 0 25px rgba(0, 255, 255, 0.08);
}

body[data-theme="modern"] .lcd-screen-container::before {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 19.8%,
    rgba(0, 255, 255, 0.06) 20%
  );
}

body[data-theme="modern"] .rc-pad {
  background: #0b0f17;
  border-color: #182234;
  border-left-color: #202e46 !important;
}

body[data-theme="modern"] .rc-pad:hover {
  border-color: #00ffff;
}

body[data-theme="modern"] #padSlot1, body[data-theme="modern"] #padSlot3 {
  border-left: 3.5px solid #00ffff !important;
}

body[data-theme="modern"] .rc-pad.has-chop,
body[data-theme="modern"] .rc-pad.selected {
  background: #0d1422 !important;
  border: 1.5px solid #00ffff !important;
  border-left: 3.5px solid #00ffff !important;
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.40) !important;
}

body[data-theme="modern"] .rc-pad.has-chop .rc-pad-tag,
body[data-theme="modern"] .rc-pad.selected .rc-pad-tag {
  color: #00ffff !important;
}

body[data-theme="modern"] .action-btn.amber-filled,
body[data-theme="modern"] .ctrl-btn.amber-filled {
  background: #00ffff;
  color: #05080e;
  border-color: #00ffff;
}

body[data-theme="modern"] .settings-pill.active {
  background: rgba(0, 255, 255, 0.15) !important;
  border-color: #00ffff !important;
  color: #00ffff !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.25);
}

body[data-theme="modern"] .settings-modal-card {
  border-color: #00ffff;
  box-shadow: 0 12px 40px rgba(0, 255, 255, 0.15);
}

body[data-theme="modern"] .btn-hardware-rec.recording {
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.7);
  background: #ff007f;
}

/* 3. LEGACY THEME (Authentic Akai MPC 2000XL / 3000 Hardware: Beige chassis, Blue Backlit LCD, Rubber Grey Pads, Crimson Red Accents) */
body[data-theme="legacy"] {
  --bg-black: #2c2824;
  --bg-app: #d8d2ca; /* MPC 2000XL vintage chassis beige/stone */
  --bg-panel: #e6e0d8;
  --bg-btn: #ccc5bb;
  --bg-btn-hover: #b8b1a6;
  --bg-btn-active: #a69f94;
  --bg-lcd: #1658b5; /* Iconic MPC Blue Backlit LCD */

  --border-dark: #8c857e;
  --border-subtle: #a09991;
  --border-btn: #8c857e;
  --border-active: #cc1111; /* Classic Akai Red */

  --amber-primary: #cc1111; /* Akai Crimson Red for active elements */
  --amber-light: #ff3333;
  --amber-dim: #660808;
  --amber-glow: rgba(204, 17, 17, 0.35);
  --amber-bg: rgba(204, 17, 17, 0.10);

  --text-white: #0e1014;
  --text-muted: #4e4a45;
  --text-dim: #7a746e;
  --text-lcd-dim: rgba(255, 255, 255, 0.6);

  --accent-red: #cc1111;
}

body[data-theme="legacy"] .app-wrapper {
  background-color: #d8d2ca;
  border-color: #8c857e;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.35);
  color: #0e1014;
}

body[data-theme="legacy"] .studio-workspace {
  background: #202226;
}
body[data-theme="legacy"] .studio-device-bar {
  background: #18191c;
  border-bottom-color: #383b42;
}

body[data-theme="legacy"] .header-top {
  border-bottom-color: #b0a9a0;
}
body[data-theme="legacy"] .header-title-text {
  color: #0e1014;
}
body[data-theme="legacy"] .header-badge {
  background: #cc1111;
  color: #ffffff;
}
body[data-theme="legacy"] .meta-anchor-bar {
  background: #ccc5bb;
  border-color: #a8a197;
  color: #3e3a35;
}

body[data-theme="legacy"] .action-btn,
body[data-theme="legacy"] .ctrl-btn,
body[data-theme="legacy"] .bank-nav-tab,
body[data-theme="legacy"] .param-step-btn {
  background: #ccc5bb;
  border-color: #9c958d;
  color: #1a1c22;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

body[data-theme="legacy"] .action-btn:hover,
body[data-theme="legacy"] .ctrl-btn:hover,
body[data-theme="legacy"] .bank-nav-tab:hover {
  background: #bcb4a8;
  color: #000000;
}

body[data-theme="legacy"] .action-btn.active,
body[data-theme="legacy"] .ctrl-btn.active,
body[data-theme="legacy"] .bank-nav-tab.active {
  background: #cc1111 !important;
  color: #ffffff !important;
  border-color: #990000 !important;
}

body[data-theme="legacy"] .action-btn.amber-filled,
body[data-theme="legacy"] .ctrl-btn.amber-filled {
  background: #cc1111;
  color: #ffffff;
  border-color: #cc1111;
}

body[data-theme="legacy"] .action-btn.amber-text,
body[data-theme="legacy"] .ctrl-btn.amber-text {
  color: #cc1111;
}

/* The Legendary Blue Backlit MPC LCD Display */
body[data-theme="legacy"] .lcd-screen-container {
  background: #1b73e7 !important;
  border: 2px solid #5c5651 !important;
  border-radius: 4px !important;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* ==============================================================================
   LEGACY AKAI MPC THEME (1:1 with Native Masada Screenshots 1, 2, 4)
   ============================================================================== */
body[data-theme="legacy"] {
  background: #ece6dc !important;
  color: #1a1c22 !important;
}

body[data-theme="legacy"] .app-viewport-container {
  background: #ece6dc !important;
}

body[data-theme="legacy"] .phone-bezel {
  background: #202228 !important;
  border-color: #383b44 !important;
}

/* Home Studio Anchor Bar */
body[data-theme="legacy"] .status-bar-container {
  background: #e3ded7 !important;
  border: 1px solid #c2bcb2 !important;
  border-radius: 4px !important;
}

body[data-theme="legacy"] .status-info-text {
  color: #44413c !important;
  font-family: 'JetBrains Mono', 'SF Pro Mono', monospace !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body[data-theme="legacy"] .header-title-text {
  color: #2a2824 !important;
}

body[data-theme="legacy"] .settings-icon-btn {
  background: #ded7ce !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
}

/* Razor-sharp authentic Akai Blue LCD Screen matching Screenshot 4 */
body[data-theme="legacy"] .lcd-screen-container {
  background: #125cdb !important;
  border: 2px solid #0b3fa3 !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 0 2px rgba(255, 255, 255, 0.2) !important;
  position: relative !important;
  overflow: hidden !important;
}

body[data-theme="legacy"] .lcd-screen-container::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 6px 6px;
  z-index: 1;
}

body[data-theme="legacy"] .lcd-center-area {
  background: transparent !important;
}

body[data-theme="legacy"] #waveformCanvas {
  background: transparent !important;
  z-index: 2;
  position: relative;
}

/* Crisp, solid, non-ghostly LCD text (ZERO blur, ZERO glow, single-line horizontal fit) */
body[data-theme="legacy"] .lcd-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  gap: 6px !important;
  padding: 0 3px !important;
  font-family: 'JetBrains Mono', 'SF Pro Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
  text-shadow: none !important;
  z-index: 2;
  position: relative;
}

body[data-theme="legacy"] #lcdSampleName {
  color: #ffffff !important;
  font-family: 'JetBrains Mono', 'SF Pro Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-shadow: none !important;
  max-width: 42% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-theme="legacy"] .lcd-format-tags {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: 'JetBrains Mono', 'SF Pro Mono', monospace !important;
  font-size: 10px !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
}

body[data-theme="legacy"] .lcd-tag {
  color: rgba(255, 255, 255, 0.40) !important;
  background: transparent !important;
  border: none !important;
  text-shadow: none !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

body[data-theme="legacy"] .lcd-tag.wav-active {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

body[data-theme="legacy"] #lcdTimeDisplay {
  color: #ffffff !important;
  font-family: 'JetBrains Mono', 'SF Pro Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  text-align: right !important;
}

body[data-theme="legacy"] .lcd-bottom-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  white-space: nowrap !important;
  font-family: 'JetBrains Mono', 'SF Pro Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
  text-shadow: none !important;
  padding: 0 3px !important;
  z-index: 2;
  position: relative;
}

body[data-theme="legacy"] #lcdPreRecStatus,
body[data-theme="legacy"] #lcdSeekMode {
  color: #ffffff !important;
  text-shadow: none !important;
  font-family: 'JetBrains Mono', 'SF Pro Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

/* Vintage Akai Hardware Chassis Buttons matching Screenshots 1 & 4 */
body[data-theme="legacy"] .ctrl-btn {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] #btnSliceChop {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #cc1111 !important;
  font-weight: 800 !important;
}
body[data-theme="legacy"] #btnSliceChop .btn-sub-label {
  color: #660808 !important;
  font-weight: 700 !important;
}
body[data-theme="legacy"] #btnSliceChop.dog-ear::after {
  border-color: transparent #cc1111 transparent transparent !important;
}

body[data-theme="legacy"] #btnOneShot {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #cc1111 !important;
  font-weight: 800 !important;
}
body[data-theme="legacy"] #btnOneShot .btn-sub-label {
  color: #660808 !important;
  font-weight: 700 !important;
}
body[data-theme="legacy"] #btnOneShot.dog-ear::after {
  border-color: transparent #cc1111 transparent transparent !important;
}

body[data-theme="legacy"] #btnTruncate {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #cc1111 !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
}

body[data-theme="legacy"] #btnRec {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #cc1111 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] #btnPurge,
body[data-theme="legacy"] #btnExtract {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #cc1111 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] #btnNormalize,
body[data-theme="legacy"] #btnLock,
body[data-theme="legacy"] #btnLoopMode,
body[data-theme="legacy"] #btnCrate,
body[data-theme="legacy"] #btnTags,
body[data-theme="legacy"] #btnImport,
body[data-theme="legacy"] #btnPlayAll,
body[data-theme="legacy"] #btnScrub {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] #btnUndo {
  background: #ccc5bb !important;
  border: 1.5px solid #8c857e !important;
  color: #66625c !important;
  font-weight: 700 !important;
}

/* Bank navigation tabs matching Screenshots 1 & 4 */
body[data-theme="legacy"] .bank-nav-tab {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
}
body[data-theme="legacy"] .bank-nav-tab.active {
  background: #cc1111 !important;
  border-color: #990000 !important;
  color: #ffffff !important;
}
body[data-theme="legacy"] .bank-nav-tab::after {
  border-color: transparent #cc1111 transparent transparent !important;
}

/* Zoom control (Warm vintage cream track, NO black accents) */
body[data-theme="legacy"] .zoom-section {
  color: #2a2824 !important;
}
body[data-theme="legacy"] .zoom-val-text {
  color: #cc1111 !important;
  font-weight: 800 !important;
}
body[data-theme="legacy"] .zoom-bar-container {
  background: #dcd6cd !important;
  border: 1.5px solid #b8b1a6 !important;
  border-radius: 4px !important;
}
body[data-theme="legacy"] .zoom-bar-track {
  background: #dcd6cd !important;
}
body[data-theme="legacy"] .zoom-notch {
  background: #cac3b9 !important;
  border: 1px solid #b8b1a6 !important;
}
body[data-theme="legacy"] .zoom-notch.active {
  background: #cc1111 !important;
  border-color: #990000 !important;
  box-shadow: 0 0 4px rgba(204, 17, 17, 0.4) !important;
}

/* Footer buttons matching Screenshot 4: VINTAGE CREAM BUTTONS, ZERO BLACK ACCENTS */
body[data-theme="legacy"] .bottom-footer-bar,
body[data-theme="legacy"] .footer-nav-bar {
  background: #e6e0d8 !important;
  border-top: 1.5px solid #b8b1a6 !important;
}

body[data-theme="legacy"] .footer-btn {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  border-radius: 4px !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
  color: #cc1111 !important;
  font-weight: 800 !important;
  font-size: 11px !important;
}
body[data-theme="legacy"] .footer-btn:hover {
  background: #beb7ad !important;
}
body[data-theme="legacy"] #btnBankGroupToggle,
body[data-theme="legacy"] #btnExportChopSend {
  color: #cc1111 !important;
  font-weight: 800 !important;
}
body[data-theme="legacy"] #btnFooterCrate,
body[data-theme="legacy"] .footer-btn.center-crate {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
}

/* MPC Rubber Grey Pads with Electric Cyan Accents (NO orange borders) */
body[data-theme="legacy"] #padSlot1,
body[data-theme="legacy"] #padSlot2,
body[data-theme="legacy"] #padSlot3,
body[data-theme="legacy"] #padSlot4 {
  border-left: 1.5px solid #8c857e !important;
}

body[data-theme="legacy"] .rc-pad {
  background: #c8bebd !important;
  border: 1.5px solid #8c857e !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  color: #1a1c22 !important;
}

body[data-theme="legacy"] .rc-pad:hover {
  background: #beb3b2 !important;
}

body[data-theme="legacy"] .rc-pad-id {
  color: #4e4842 !important;
  font-weight: 700 !important;
}

body[data-theme="legacy"] .rc-pad-content {
  color: #111111 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] .rc-pad-tag {
  color: #00e5ff !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

body[data-theme="legacy"] .rc-pad.has-chop,
body[data-theme="legacy"] .rc-pad.selected {
  background: #c8bebd !important;
  border: 2.5px solid #00e5ff !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

body[data-theme="legacy"] .rc-pad.has-chop .rc-pad-content,
body[data-theme="legacy"] .rc-pad.selected .rc-pad-content {
  color: #000000 !important;
  font-weight: 800 !important;
}

/* ==============================================================================
   THE CRATE MODAL IN LEGACY MODE (1:1 with Native Screenshot 1)
   Warm Vintage Cream Tone, Solid Red Accents, Electric Blue Waveform Ticks,
   ZERO Black Accents or Dark Buttons
   ============================================================================== */
body[data-theme="legacy"] .crate-modal-card {
  background: #ebe5dc !important;
  border: 2px solid #8c857e !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45) !important;
  color: #1a1c22 !important;
}

body[data-theme="legacy"] .crate-modal-header {
  background: #ebe5dc !important;
  border-bottom: 1px solid #c8c0b4 !important;
}

body[data-theme="legacy"] .crate-title-text {
  color: #cc1111 !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
}

body[data-theme="legacy"] .crate-status-sub {
  color: #009900 !important;
  font-weight: 700 !important;
}

body[data-theme="legacy"] .crate-status-dot {
  background: #00cc00 !important;
  box-shadow: 0 0 6px #00cc00 !important;
}

body[data-theme="legacy"] .crate-pill-btn {
  background: #cc1111 !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
}

body[data-theme="legacy"] .crate-action-btn-select {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
}

body[data-theme="legacy"] .crate-close-x {
  color: #cc1111 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

/* Crate filter pill bar matching Screenshot 1 */
body[data-theme="legacy"] .crate-tags-strip {
  background: #e5dfd6 !important;
  border-bottom: 1px solid #c8c0b4 !important;
}

body[data-theme="legacy"] .crate-tag-pill {
  background: #ded7cd !important;
  border: 1.5px solid #9c958d !important;
  color: #333333 !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
}

body[data-theme="legacy"] .crate-tag-pill:hover {
  background: #cec7bd !important;
  color: #000000 !important;
}

body[data-theme="legacy"] .crate-tag-pill.active {
  background: #cc1111 !important;
  border-color: #990000 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 0 6px rgba(204, 17, 17, 0.3) !important;
}

/* Crate items container & sample cards */
body[data-theme="legacy"] .crate-items-container {
  background: #ebe5dc !important;
}

body[data-theme="legacy"] .crate-sample-card {
  background: #ded7cd !important;
  border: 1px solid #c8c0b4 !important;
  border-radius: 4px !important;
  color: #1a1c22 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="legacy"] .crate-sample-title {
  color: #111111 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] .crate-sample-meta,
body[data-theme="legacy"] .crate-sample-author {
  color: #66625c !important;
}

body[data-theme="legacy"] .crate-sample-geo {
  color: #66625c !important;
  text-decoration: underline !important;
}

body[data-theme="legacy"] .crate-card-btn {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
}

body[data-theme="legacy"] .crate-card-btn:hover {
  background: #beb7ad !important;
}

body[data-theme="legacy"] .crate-card-btn.delete-btn {
  color: #cc1111 !important;
  font-weight: 800 !important;
}

/* Active Crate Item Card with Solid Red Stripe (1:1 with Screenshot 1) */
body[data-theme="legacy"] .crate-sample-card.active-crate-item,
body[data-theme="legacy"] .crate-sample-card.active {
  background: #eee7dd !important;
  border-left: 3.5px solid #cc1111 !important;
  border-top: 1px solid #c8c0b4 !important;
  border-right: 1px solid #c8c0b4 !important;
  border-bottom: 1px solid #c8c0b4 !important;
}

body[data-theme="legacy"] .crate-active-indicator {
  color: #cc1111 !important;
  font-weight: 800 !important;
}

/* Mini Waveform & Circular Play Button */
body[data-theme="legacy"] .crate-play-circle {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #444444 !important;
}

body[data-theme="legacy"] .crate-play-circle.playing {
  background: #90caf9 !important;
  border: 1.5px solid #64b5f6 !important;
  color: #1565c0 !important;
}

body[data-theme="legacy"] .crate-wave-tick {
  background: #9c958d !important;
}

body[data-theme="legacy"] .crate-wave-tick.played,
body[data-theme="legacy"] .crate-sample-card.active-crate-item .crate-wave-tick {
  background: #1b73e7 !important;
  box-shadow: 0 0 5px rgba(27, 115, 231, 0.6) !important;
}

/* Crate Bottom Actions Area (Warm Cream, ZERO Black) */
body[data-theme="legacy"] .crate-bottom-actions {
  background: #ded7cd !important;
  border-top: 1.5px solid #c8c0b4 !important;
}

body[data-theme="legacy"] .crate-wide-btn {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
}

body[data-theme="legacy"] .crate-wide-btn:hover {
  background: #beb7ad !important;
}

body[data-theme="legacy"] .crate-wide-btn.amber-accent,
body[data-theme="legacy"] .crate-wide-btn.green-accent {
  color: #1a1c22 !important;
}

body[data-theme="legacy"] .crate-tri-btn {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
}

body[data-theme="legacy"] .crate-tri-btn:hover {
  background: #beb7ad !important;
}

body[data-theme="legacy"] .crate-tri-btn.purge-btn {
  color: #cc1111 !important;
}

/* Settings Modal & Export Suite Modal in Legacy mode */
body[data-theme="legacy"] .settings-modal-card,
body[data-theme="legacy"] .export-suite-card {
  background: #e6e0d8 !important;
  border: 2px solid #8c857e !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45) !important;
  color: #0e1014 !important;
}

body[data-theme="legacy"] .settings-header {
  border-bottom: 1px solid #b8b1a6 !important;
}

body[data-theme="legacy"] .settings-title {
  color: #cc1111 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] .settings-sub-status {
  color: #007700 !important;
}

body[data-theme="legacy"] .status-dot-green {
  background: #00cc00 !important;
  box-shadow: 0 0 6px #00cc00 !important;
}

body[data-theme="legacy"] .settings-close-x {
  color: #cc1111 !important;
}

body[data-theme="legacy"] .settings-row {
  border-bottom: 1px solid #c5beb4 !important;
}

body[data-theme="legacy"] .settings-label {
  color: #0e1014 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] .settings-val-indicator {
  color: #00cc00 !important;
  font-weight: 700 !important;
}

body[data-theme="legacy"] .settings-pill {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #3e3a35 !important;
  font-weight: 700 !important;
}

body[data-theme="legacy"] .settings-pill:hover {
  background: #beb7ad !important;
  color: #000000 !important;
}

body[data-theme="legacy"] .settings-pill.active {
  background: #ffffff !important;
  border: 2px solid #cc1111 !important;
  color: #cc1111 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 6px rgba(204, 17, 17, 0.2) !important;
}

body[data-theme="legacy"] .settings-export-section {
  background: #ded7ce !important;
  border: 1px solid #b0a9a0 !important;
}

body[data-theme="legacy"] .settings-export-title {
  color: #cc1111 !important;
  font-weight: 800 !important;
}

body[data-theme="legacy"] .settings-close-btn {
  background: #ccc5bb !important;
  border: 1.5px solid #9c958d !important;
  color: #1a1c22 !important;
  font-weight: 800 !important;
}

/* Studio Rack Panel */
body[data-theme="legacy"] .studio-rack-panel {
  background: #e6e0d8 !important;
  border-color: #8c857e !important;
  color: #0e1014 !important;
}
body[data-theme="legacy"] .rack-title-text,
body[data-theme="legacy"] .rack-label,
body[data-theme="legacy"] .pad-params-title {
  color: #0e1014 !important;
}
body[data-theme="legacy"] .rack-tab-pill.active,
body[data-theme="legacy"] .grid-ctrl-pill.active,
body[data-theme="legacy"] .grid-bank-pill.active {
  background: #cc1111 !important;
  border-color: #990000 !important;
  color: #ffffff !important;
}

/* ==============================================================================
   SAVE TO CRATE MODAL (1:1 with Native Masada Screenshot)
   ============================================================================== */
.save-to-crate-card {
  background: #0c0d12;
  border: 1.5px solid #FFB800;
  border-radius: 14px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 184, 0, 0.2);
  position: relative;
  z-index: 1000;
  animation: modalScaleIn 0.16s ease-out;
}

body[data-theme="modern"] .save-to-crate-card {
  background: #0c0d12;
  border-color: #00ffff;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 255, 255, 0.25);
}

body[data-theme="legacy"] .save-to-crate-card {
  background: #e6e0d8;
  border-color: #cc1111;
  color: #0e1014;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), 0 0 25px rgba(204, 17, 17, 0.25);
}

.save-to-crate-title {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #FFB800;
  text-align: center;
  text-transform: uppercase;
}

body[data-theme="modern"] .save-to-crate-title {
  color: #00ffff;
}

body[data-theme="legacy"] .save-to-crate-title {
  color: #cc1111;
}

.crate-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.crate-form-label {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8e8e99;
  text-transform: uppercase;
}

body[data-theme="legacy"] .crate-form-label {
  color: #5c5651;
}

.crate-input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.crate-input {
  flex: 1;
  background: #000000;
  border: 1px solid #242738;
  border-radius: 6px;
  padding: 10px 12px;
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.crate-input:focus {
  border-color: #FFB800;
}

body[data-theme="modern"] .crate-input:focus {
  border-color: #00ffff;
}

body[data-theme="legacy"] .crate-input {
  background: #ffffff;
  border-color: #8c857e;
  color: #0e1014;
}

body[data-theme="legacy"] .crate-input:focus {
  border-color: #cc1111;
}

.crate-mic-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #242738;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.crate-mic-btn:hover {
  background: rgba(255, 184, 0, 0.15);
  border-color: #FFB800;
  color: #FFB800;
}

.crate-mic-btn.listening {
  background: rgba(57, 255, 20, 0.2);
  border-color: #39ff14;
  color: #39ff14;
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(57, 255, 20, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 15px rgba(57, 255, 20, 0.7); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(57, 255, 20, 0.4); }
}

.crate-preview-capsule {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1f2430;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

body[data-theme="legacy"] .crate-preview-capsule {
  background: #f0ebd8;
  border-color: #8c857e;
}

.crate-preview-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid #2a2e40;
  color: #ffffff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.crate-preview-play-btn:hover {
  border-color: #FFB800;
  color: #FFB800;
}

.crate-preview-play-btn.playing {
  background: rgba(57, 255, 20, 0.15);
  border-color: #39ff14;
  color: #39ff14;
}

.crate-preview-wave-wrapper {
  flex: 1;
  height: 38px;
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.crate-preview-wave-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.crate-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.crate-tag-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #2a2e40;
  border-radius: 6px;
  padding: 4px 8px;
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.crate-tag-chip:hover {
  background: rgba(255, 69, 58, 0.2);
  border-color: #ff453a;
  color: #ff453a;
}

body[data-theme="legacy"] .crate-tag-chip {
  background: #ccc5bb;
  border-color: #8c857e;
  color: #0e1014;
}

.crate-tags-scroll-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crate-pill-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #202434;
  border-radius: 5px;
  padding: 4px 8px;
  color: #8e8e99;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.crate-pill-chip:hover {
  color: #ffffff;
  border-color: #383e54;
}

.crate-pill-chip.selected {
  background: rgba(255, 184, 0, 0.12);
  border: 1.5px solid #FFB800;
  color: #FFB800;
}

body[data-theme="modern"] .crate-pill-chip.selected {
  background: rgba(0, 255, 255, 0.12);
  border-color: #00ffff;
  color: #00ffff;
}

body[data-theme="legacy"] .crate-pill-chip {
  background: #ccc5bb;
  border-color: #8c857e;
  color: #4e4842;
}

body[data-theme="legacy"] .crate-pill-chip.selected {
  background: rgba(204, 17, 17, 0.15);
  border-color: #cc1111;
  color: #cc1111;
}

.crate-add-tag-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.crate-add-tag-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #2a2e40;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.crate-add-tag-btn:hover {
  background: #FFB800;
  color: #000000;
  border-color: #FFB800;
}

body[data-theme="modern"] .crate-add-tag-btn:hover {
  background: #00ffff;
  color: #000000;
  border-color: #00ffff;
}

body[data-theme="legacy"] .crate-add-tag-btn {
  background: #ccc5bb;
  border-color: #8c857e;
  color: #0e1014;
}

body[data-theme="legacy"] .crate-add-tag-btn:hover {
  background: #cc1111;
  color: #ffffff;
  border-color: #cc1111;
}

.crate-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.crate-cancel-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2a2e40;
  border-radius: 6px;
  color: #8e8e99;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
  padding: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}

.crate-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

body[data-theme="legacy"] .crate-cancel-btn {
  background: #ccc5bb;
  border-color: #8c857e;
  color: #0e1014;
}

.crate-save-btn {
  flex: 2;
  background: rgba(255, 184, 0, 0.12);
  border: 1.5px solid #FFB800;
  border-radius: 6px;
  color: #FFB800;
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}

.crate-save-btn:hover {
  background: #FFB800;
  color: #000000;
}

body[data-theme="modern"] .crate-save-btn {
  background: rgba(0, 255, 255, 0.12);
  border-color: #00ffff;
  color: #00ffff;
}

body[data-theme="modern"] .crate-save-btn:hover {
  background: #00ffff;
  color: #000000;
}

body[data-theme="legacy"] .crate-save-btn {
  background: rgba(204, 17, 17, 0.15);
  border-color: #cc1111;
  color: #cc1111;
}

body[data-theme="legacy"] .crate-save-btn:hover {
  background: #cc1111;
  color: #ffffff;
}

/* ==============================================================================
   MASADA PROVENANCE v1.1 / v1.2 READABLE PRESENTATION & TECHNICAL DRAWER
   ============================================================================== */
.prov-v11-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1f2430;
  border-radius: 6px;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
}

.prov-v11-status-pill {
  color: #00e5ff;
  letter-spacing: 0.6px;
}

.prov-v11-seal-badge {
  color: #30d158;
  font-size: 9.5px;
  letter-spacing: 0.8px;
}

.prov-v11-summary-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: #080a10;
  border: 1px solid #1c202e;
  border-radius: 8px;
}

.prov-v11-summary-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prov-v11-heading {
  font-family: var(--font-tech);
  font-size: 8.5px;
  font-weight: 800;
  color: #8e8e99;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.prov-v11-value {
  font-family: var(--font-tech);
  font-size: 11px;
  color: #f2f2f7;
  line-height: 1.4;
}

.prov-v11-creators-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.prov-v11-creator-card {
  background: #0d1018;
  border: 1px solid #222636;
  border-radius: 5px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prov-v11-creator-label {
  font-family: var(--font-tech);
  font-size: 7.5px;
  font-weight: 700;
  color: #8e8e99;
  letter-spacing: 0.6px;
}

.prov-v11-creator-name {
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  color: var(--amber-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prov-v11-timeline-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: #080a10;
  border: 1px solid #1c202e;
  border-radius: 8px;
}

.prov-v11-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 140px;
  overflow-y: auto;
}

.prov-v11-timeline-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 5px;
  cursor: pointer;
}

.prov-v11-timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.prov-v11-timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-tech);
  font-size: 10px;
  color: #e5e7f0;
}

.prov-v11-timeline-toggle {
  font-size: 8.5px;
  color: #00e5ff;
  font-weight: 700;
  flex-shrink: 0;
}

.prov-v11-timeline-details {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 5px 0 2px 10px;
  font-family: var(--font-tech);
  font-size: 9px;
  color: #9ea3b5;
}

.prov-v11-timeline-item.expanded .prov-v11-timeline-details {
  display: flex;
}

.prov-v11-tech-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prov-v11-tech-toggle {
  background: transparent;
  border: none;
  color: #00e5ff;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  padding: 4px 2px;
}

.prov-v11-tech-drawer {
  background: #06070b;
  border: 1px solid #1e2333;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #8e94a8;
  display: flex;
  flex-direction: column;
  gap: 3px;
  word-break: break-all;
}

body[data-theme="legacy"] .prov-v11-status-bar,
body[data-theme="legacy"] .prov-v11-summary-banner,
body[data-theme="legacy"] .prov-v11-timeline-section,
body[data-theme="legacy"] .prov-v11-tech-drawer {
  background: #ded7cd !important;
  border-color: #9c958d !important;
  color: #1a1c22 !important;
}

body[data-theme="legacy"] .prov-v11-value,
body[data-theme="legacy"] .prov-v11-timeline-top {
  color: #111111 !important;
}

body[data-theme="legacy"] .prov-v11-creator-card {
  background: #ebe5dc !important;
  border-color: #9c958d !important;
}

body[data-theme="legacy"] .prov-v11-creator-name,
body[data-theme="legacy"] .prov-v11-status-pill,
body[data-theme="legacy"] .prov-v11-tech-toggle,
body[data-theme="legacy"] .prov-v11-timeline-toggle {
  color: #cc1111 !important;
}

.btn-sub-label {
  pointer-events: none;
}

/* ============================================================================
   MASADA LIVE VIDEO RECORDER MODAL (REC [VIDEO] — Distinct from IMPORT)
   ============================================================================ */
.video-rec-modal-card {
  max-width: 480px;
  width: 94%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-rec-viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 210px;
  max-height: 300px;
  background: radial-gradient(circle at 50% 50%, #101520 0%, #05070b 100%);
  border: 1.5px solid #252c3f;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-rec-viewfinder.is-recording {
  border-color: #ff3b30;
  box-shadow: 0 0 18px rgba(255, 59, 48, 0.35);
}

.video-rec-viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.video-rec-hud-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}

.video-rec-status-pill {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(8, 10, 15, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #00e5ff;
  backdrop-filter: blur(4px);
}

.video-rec-status-pill.recording {
  background: rgba(255, 59, 48, 0.9);
  border-color: #ff6961;
  color: #ffffff;
  animation: recBlink 1s infinite alternate;
}

.video-rec-status-pill.ready-review {
  background: rgba(48, 209, 88, 0.22);
  border-color: #30d158;
  color: #30d158;
}

.video-rec-timer-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(5, 7, 11, 0.88);
  border: 1px solid #2b3347;
  color: var(--amber-primary);
}

.video-rec-hud-bottom {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.video-rec-spec-badge {
  font-family: var(--font-tech);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #c7cad6;
  background: rgba(5, 7, 11, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 7px;
  border-radius: 4px;
  pointer-events: none;
}

.video-rec-cam-switch-btn {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 5px 9px;
  border-radius: 4px;
  background: rgba(12, 16, 24, 0.9);
  border: 1px solid var(--amber-primary);
  color: var(--amber-primary);
  cursor: pointer;
}

.video-rec-cam-switch-btn:hover {
  background: var(--amber-primary);
  color: #000000;
}

.video-rec-primary-btn {
  width: 100%;
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 13px 14px;
  border-radius: 6px;
  border: 1.5px solid #ff3b30;
  background: linear-gradient(180deg, rgba(255, 59, 48, 0.22) 0%, rgba(180, 24, 18, 0.34) 100%);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.14s ease;
}

.video-rec-primary-btn:hover {
  background: #ff3b30;
  color: #ffffff;
}

.video-rec-primary-btn.is-recording {
  background: #ff3b30;
  border-color: #ff8a80;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.45);
}

.video-rec-error-banner {
  display: none;
  background: rgba(255, 59, 48, 0.14);
  border: 1px solid #ff3b30;
  color: #ff8a80;
  font-family: var(--font-tech);
  font-size: 10px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
}

body[data-theme="legacy"] .video-rec-viewfinder {
  border-color: #8f887f;
}

/* ==============================================================================
   MASADA CONNECT — THREE-DOT ECOSYSTEM INDICATOR & PAIRING / PRESENCE MODAL
   Approved Visual Language (1:1 with Native Raw Capture rc-1.1.0):
     • Purple (#A855F7) — Archive Drum Bus (DB)
     • Orange (#F97316) — MASADA EPOCH (EP)
     • Gold   (#FFB800) — Core Foundry / Chord Foundry (CF)
   ============================================================================== */

.top-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-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;
}

.mc-three-dot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  background: #090a0e;
  border: 1px solid #1c202b;
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.mc-three-dot-badge.anchor-split-left {
  flex: 1 1 auto;
  min-width: 0;
  height: auto;
  padding: 4px 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  justify-content: flex-start;
}

.mc-three-dot-badge:hover {
  background: #10131c;
  border-color: #2f364a;
}

.mc-three-dot-badge.is-linked {
  border-color: rgba(255, 184, 0, 0.35);
  background: rgba(255, 184, 0, 0.04);
}

.mc-three-dot-badge.is-warning {
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(248, 113, 113, 0.06);
}

.mc-dots-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.mc-dot-col {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.mc-led-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.18s ease;
}

/* Purple — Archive Drum Bus */
.mc-led-dot.purple.dim {
  background: rgba(168, 85, 247, 0.22);
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.mc-led-dot.purple.bright {
  background: #A855F7;
  border: 1px solid #c084fc;
  box-shadow: 0 0 7px rgba(168, 85, 247, 0.85);
}
.mc-led-dot.purple.pulsing {
  background: #A855F7;
  animation: mcLedPulse 1.15s ease-in-out infinite;
}
.mc-led-dot.purple.warning {
  background: rgba(168, 85, 247, 0.28);
  border: 1.4px solid #F87171;
  box-shadow: 0 0 5px rgba(248, 113, 113, 0.65);
}

/* Orange — MASADA EPOCH */
.mc-led-dot.orange.dim {
  background: rgba(249, 115, 22, 0.22);
  border: 1px solid rgba(249, 115, 22, 0.35);
}
.mc-led-dot.orange.bright {
  background: #F97316;
  border: 1px solid #fb923c;
  box-shadow: 0 0 7px rgba(249, 115, 22, 0.85);
}
.mc-led-dot.orange.pulsing {
  background: #F97316;
  animation: mcLedPulse 1.15s ease-in-out infinite;
}
.mc-led-dot.orange.warning {
  background: rgba(249, 115, 22, 0.28);
  border: 1.4px solid #F87171;
  box-shadow: 0 0 5px rgba(248, 113, 113, 0.65);
}

/* Gold — Core Foundry / Chord Foundry */
.mc-led-dot.gold.dim {
  background: rgba(255, 184, 0, 0.22);
  border: 1px solid rgba(255, 184, 0, 0.35);
}
.mc-led-dot.gold.bright {
  background: #FFB800;
  border: 1px solid #ffd147;
  box-shadow: 0 0 7px rgba(255, 184, 0, 0.85);
}
.mc-led-dot.gold.pulsing {
  background: #FFB800;
  animation: mcLedPulse 1.15s ease-in-out infinite;
}
.mc-led-dot.gold.warning {
  background: rgba(255, 184, 0, 0.28);
  border: 1.4px solid #F87171;
  box-shadow: 0 0 5px rgba(248, 113, 113, 0.65);
}

@keyframes mcLedPulse {
  0%, 100% { opacity: 0.26; transform: scale(0.92); }
  50% { opacity: 0.96; transform: scale(1.08); }
}

.mc-selected-tick {
  width: 4px;
  height: 1.5px;
  border-radius: 1px;
  background: transparent;
  transition: background 0.16s ease;
}

.mc-selected-tick.active {
  background: #e2e8f0;
}

.mc-bezel-divider {
  width: 1px;
  height: 12px;
  background: #1e2330;
  flex-shrink: 0;
}

.mc-compact-code {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: #9ba3b8;
  text-transform: uppercase;
  flex-shrink: 0;
}

.mc-three-dot-badge.is-linked .mc-compact-code {
  color: #f8fafc;
}

.mc-three-dot-badge.is-warning .mc-compact-code {
  color: #F87171;
}

@media (max-width: 390px) {
  .btn-settings {
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 1px;
  }
  .mc-three-dot-badge {
    padding: 0 7px;
    gap: 5px;
  }
}

/* MASADA Connect Modal Styles */
.mc-modal-card {
  max-width: 470px !important;
  width: 95% !important;
  max-height: 90vh;
  overflow-y: auto;
}

.mc-nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 10px;
  background: #06070b;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #1b2030;
}

.mc-nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #8b93a7;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 8px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.mc-nav-tab:hover {
  color: #ffffff;
}

.mc-nav-tab.active {
  background: var(--amber-primary);
  color: #000000;
  border-color: var(--amber-primary);
}

.mc-pairing-banner {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid #2d364d;
  background: rgba(255, 170, 0, 0.1);
  font-family: var(--font-tech);
  font-size: 10.5px;
  line-height: 1.4;
  color: #f8fafc;
}

.mc-pairing-banner.is-success {
  background: rgba(48, 209, 88, 0.12);
  border-color: #30d158;
  color: #7ef29d;
}

.mc-pairing-banner.is-error {
  background: rgba(255, 59, 48, 0.14);
  border-color: #ff3b30;
  color: #ff9a92;
}

.mc-pairing-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mc-tab-pane {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.mc-tab-pane.active {
  display: flex;
}

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

.mc-section-label,
.mc-field-label {
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #8e95a9;
  text-transform: uppercase;
}

.mc-apps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-app-card {
  background: #080a10;
  border: 1px solid #1d2232;
  border-left: 3px solid var(--mc-accent, #8e8e99);
  border-radius: 7px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mc-app-card.is-selected {
  border-color: rgba(255, 255, 255, 0.28);
  border-left: 3px solid var(--mc-accent, #ffb800);
  box-shadow: inset 0 0 0 1px rgba(255, 184, 0, 0.14);
}

.mc-app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mc-app-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-app-title-row .mc-led-dot {
  width: 9px;
  height: 9px;
}

.mc-app-name {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.mc-app-status-pill {
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: #111522;
  border: 1px solid #252c40;
  color: #9ba3b8;
  letter-spacing: 0.6px;
}

.mc-app-status-pill.bright {
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.5);
  background: rgba(48, 209, 88, 0.1);
}

.mc-app-status-pill.pulsing {
  color: #ffb800;
  border-color: rgba(255, 184, 0, 0.45);
}

.mc-app-status-pill.warning {
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.1);
}

.mc-app-meta {
  font-family: var(--font-tech);
  font-size: 9.5px;
  color: #8b93a7;
  line-height: 1.35;
}

.mc-app-warning-box {
  font-family: var(--font-tech);
  font-size: 9.5px;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 4px;
  padding: 5px 8px;
}

.mc-app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-card-btn {
  background: #121622;
  border: 1px solid #262e42;
  color: #dbe2f0;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  padding: 6px 9px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.14s ease;
}

.mc-card-btn:hover {
  border-color: #4a5678;
  color: #ffffff;
}

.mc-card-btn.selected {
  background: var(--amber-primary);
  border-color: var(--amber-primary);
  color: #000000;
}

.mc-card-btn.danger {
  border-color: rgba(255, 59, 48, 0.45);
  color: #ff7b72;
}

.mc-card-btn.danger:hover {
  background: #ff3b30;
  color: #ffffff;
}

.mc-local-export-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid #1d2232;
  border-radius: 7px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mc-local-export-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-local-pill {
  flex: 1;
  min-width: 118px;
  background: #0d1018;
  border: 1px solid #242a3d;
  color: #b4bcd0;
  font-family: var(--font-tech);
  font-size: 9px;
  font-weight: 800;
  padding: 7px 6px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}

.mc-local-pill.active {
  background: var(--amber-primary);
  border-color: var(--amber-primary);
  color: #000000;
}

.mc-privacy-footnote {
  font-size: 9.5px;
  color: #7d8599;
  line-height: 1.35;
}

.mc-qr-instructions {
  font-size: 11px;
  color: #c5ccdc;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1d2333;
  border-radius: 6px;
  padding: 8px 10px;
}

.mc-qr-viewfinder-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  background: #000000;
  border: 1.5px solid #252c40;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-qr-viewfinder-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc-qr-reticle {
  position: absolute;
  width: 146px;
  height: 146px;
  border: 2px solid rgba(255, 184, 0, 0.78);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.mc-qr-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font-family: var(--font-tech);
  font-size: 10px;
  color: #8b93a7;
  background: radial-gradient(circle at center, rgba(20, 25, 38, 0.85), rgba(5, 6, 10, 0.96));
}

.mc-qr-paste-box,
.mc-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mc-text-input {
  background: #000000;
  border: 1px solid #262e42;
  color: #ffffff;
  padding: 10px 11px;
  border-radius: 5px;
  font-family: var(--font-tech);
  font-size: 11.5px;
  outline: none;
  user-select: text !important;
  -webkit-user-select: text !important;
}

.mc-text-input:focus {
  border-color: var(--amber-primary);
}

.mc-pin-input {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 5px;
  text-align: center;
  color: #30d158;
}

.mc-app-hint-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-hint-pill {
  flex: 1;
  min-width: 112px;
  background: #0c0f17;
  border: 1px solid #242b3d;
  color: #b8c0d4;
  font-family: var(--font-tech);
  font-size: 9.5px;
  font-weight: 800;
  padding: 8px 6px;
  border-radius: 5px;
  cursor: pointer;
}

.mc-hint-pill.active {
  border-color: var(--mc-pill-color, #ffb800);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}





