/* MON2 Web MIDI CC Parameter Controller - Ultra Compact Card Frames (All Rows fit 1 Screen) */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700;800&display=swap');

:root {
  --pink: #ec4899;
  --pink-glow: rgba(236, 72, 153, 0.4);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.4);
  --yellow: #eab308;
  --yellow-glow: rgba(234, 179, 8, 0.4);
  --primary: #00f2fe;
  --font-main: var(--font-ui, 'Outfit', 'Sarabun', -apple-system, sans-serif);
  --font-mono: var(--font-mono, 'JetBrains Mono', monospace);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.8);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-core, #0e2a30);
  color: var(--text-main, #f8fafc);
  font-size: var(--fs-base, 0.90rem);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

button, input, select, textarea {
  font-family: var(--font-main);
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem 1.25rem;
  box-sizing: border-box;
}

.midi-port-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  outline: none;
  max-width: 220px;
}

.midi-port-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

/* Compact Header */
header {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card, rgba(15, 23, 42, 0.92)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08)); padding: 0.45rem 0.9rem; border-radius: var(--radius);
  box-shadow: var(--shadow); flex-wrap: wrap; gap: 0.45rem;
}

.logo-area { display: flex; align-items: center; gap: 0.65rem; }
.logo-icon {
  width: 30px; height: 30px; background: linear-gradient(135deg, var(--pink), var(--yellow));
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: #fff; box-shadow: 0 0 12px var(--pink-glow);
}

.logo-title h1 {
  font-size: 1.05rem; font-weight: 800;
  background: linear-gradient(to right, #ffffff, var(--pink), var(--green), var(--yellow));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.logo-title p { font-size: 0.72rem; color: var(--text-muted, #94a3b8); }

.cc-midi-bar {
  padding: 0.42rem 0.9rem !important;
}

.cc-midi-bar label {
  font-size: 0.78rem !important;
}

/* Mode Selector Tabs Bar (Unified SSS Design System) */
.mode-selector-tabs,
.mode-toggle-group {
  display: inline-flex;
  align-items: center;
  background: rgba(10, 31, 36, 0.9);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(191, 207, 196, 0.2);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
  gap: 2px;
  box-sizing: border-box;
  min-height: 38px;
}

.mode-tab-btn,
.mode-toggle-btn {
  padding: 0.28rem 0.62rem;
  border-radius: 7px;
  font-family: var(--font-ui, 'Outfit', sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  color: #BFCFC4;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  line-height: 1.25;
}

.mode-tab-btn:hover,
.mode-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.mode-tab-btn.active[data-mode="voice"],
.mode-toggle-btn.active,
.mode-toggle-btn[data-mode="voice"].active {
  color: #ffffff;
  background: linear-gradient(135deg, #EE7848, #D5A738); color: #050812;
  box-shadow: 0 2px 8px rgba(238, 120, 72, 0.45);
}

.mode-tab-btn.active[data-mode="sampler"],
.mode-toggle-btn.sampler-active,
.mode-toggle-btn[data-mode="sampler"].active {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.45);
}

/* Demo Button */
.btn-demo {
  background: linear-gradient(135deg, #EE7848, #D5A738); color: #050812; border: none;
  padding: 0.45rem 0.95rem; border-radius: 20px; font-family: var(--font-main); font-weight: 700;
  font-size: 0.8rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35); transition: all 0.25s ease; animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

.btn-demo:hover { transform: translateY(-2px) scale(1.03); }

/* Main Container Card */
.card {
  background: var(--bg-card, rgba(15, 23, 42, 0.92)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08)); border-radius: var(--radius); padding: 0.52rem 0.65rem;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.38rem;
}

.card-title {
  font-size: 0.86rem; font-weight: 700; display: flex; align-items: center;
  justify-content: space-between; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.28rem; flex-wrap: wrap; gap: 0.35rem;
}

/* 3-COLUMN COMPACT GRID LAYOUT (Matches Step Sequencer 3-Track Matrix Density) */
.rows-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
  align-items: stretch;
}

.grid-column {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
}

@media (max-width: 1120px) {
  .rows-container:not(.sampler-rows-container) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .rows-container.sampler-rows-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .rows-container,
  .rows-container.sampler-rows-container {
    grid-template-columns: 1fr;
  }
}

.param-row-card {
  background: rgba(10, 14, 26, 0.75); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px; padding: 0.32rem 0.4rem 0.34rem; display: flex;
  flex-direction: column; gap: 0.22rem; min-width: 0;
}

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

.row-title {
  font-size: 0.7rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 0.28rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.row-badge {
  background: rgba(255, 255, 255, 0.08); color: var(--text-muted, #94a3b8); font-size: 0.56rem;
  font-weight: 700; padding: 1px 5px; border-radius: 6px; font-family: var(--font-mono);
  flex-shrink: 0;
}

/* 3-Knob Grid inside each Row */
.row-knobs-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.26rem;
}

/* Color Themes & Card Borders (Pink, Green, Yellow) */
.knob-col-1 { --knob-theme: var(--pink); --knob-glow: var(--pink-glow); }
.knob-col-2 { --knob-theme: var(--green); --knob-glow: var(--green-glow); }
.knob-col-3 { --knob-theme: var(--yellow); --knob-glow: var(--yellow-glow); }

/* ULTRA COMPACT KNOB CARD (Matching mon2-16step-sequencer Knob Proportions) */
.knob-card-item {
  width: 100%;
  min-width: 0;
  background: rgba(11, 16, 30, 0.95);
  border: 1.5px solid var(--knob-theme);
  box-shadow: 0 0 8px var(--knob-glow);
  border-radius: 8px; padding: 0.2rem 0.26rem 0.22rem; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; position: relative; gap: 0.08rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
  user-select: none;
}

.knob-card-item:hover {
  transform: translateY(-1px); box-shadow: 0 0 13px var(--knob-glow);
}

/* Subtle 4-Way Arrow Drag Handle Button (Bottom-Left beside OLED Pill) */
.drag-handle {
  position: absolute; top: auto; bottom: 3px; left: 4px;
  width: 14px; height: 14px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--knob-theme); display: flex; align-items: center; justify-content: center;
  font-size: 0.54rem; cursor: grab; transition: all 0.2s ease; z-index: 2; opacity: 0.65;
}

.knob-card-item:hover .drag-handle {
  opacity: 1;
}

.drag-handle:hover {
  background: var(--knob-theme); color: #070913; box-shadow: 0 0 6px var(--knob-theme);
  transform: scale(1.12);
}

.drag-handle:active { cursor: grabbing; }

/* Drag and Drop Visual States */
.knob-card-item.dragging {
  opacity: 0.4; transform: scale(0.95); border-style: dashed !important;
}

.knob-card-item.drag-over {
  border: 2px solid var(--knob-theme) !important; box-shadow: 0 0 18px var(--knob-theme); transform: scale(1.03);
}

/* HEADER INFO (Full card width, clean label + CC badge alignment) */
.knob-header-info {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding-left: 0;
  gap: 0.2rem;
}

.knob-label {
  font-size: 0.63rem; font-weight: 700; color: #f8fafc; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}

.cc-badge {
  font-family: var(--font-mono); font-size: 0.52rem; font-weight: 800;
  background: rgba(0, 0, 0, 0.55); color: var(--knob-theme);
  border: 1px solid var(--knob-theme); padding: 0 3.5px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0; line-height: 1.35;
}

/* ROTARY KNOB GRAPHIC */
.knob-wrapper {
  position: relative; width: 38px; height: 38px; display: flex;
  align-items: center; justify-content: center; cursor: ns-resize;
  touch-action: none;
}

.knob-dots-ring {
  position: absolute; width: 100%; height: 100%; pointer-events: none;
}

.knob-dot {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22); transform: translate(-50%, -50%);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.knob-dot.active {
  background: var(--knob-theme); box-shadow: 0 0 4px var(--knob-theme);
}

/* SOLID FILLED COLOR KNOB DIAL BODY */
.knob-body {
  width: 26px !important; height: 26px !important; border-radius: 50% !important;
  background: var(--knob-theme);
  border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.72), inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 0 9px var(--knob-glow);
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: transform 0.04s linear;
}

.knob-col-1 .knob-body { background: radial-gradient(circle at 38% 38%, #f472b6 0%, #ec4899 55%, #db2777 100%); }
.knob-col-2 .knob-body { background: radial-gradient(circle at 38% 38%, #34d399 0%, #10b981 55%, #059669 100%); }
.knob-col-3 .knob-body { background: radial-gradient(circle at 38% 38%, #fde047 0%, #eab308 55%, #ca8a04 100%); }

.knob-pointer {
  position: absolute !important; top: 2px !important; left: 50% !important;
  width: 2.5px !important; height: 7px !important; transform: translateX(-50%) !important;
  background: #ffffff !important; border-radius: 2px !important;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.75) !important;
}

.knob-val-text {
  font-family: var(--font-mono) !important; font-size: 0.72rem !important; font-weight: 800 !important;
  line-height: 1.15 !important; padding: 1px 6px !important; min-width: 30px !important;
  margin-top: 0 !important; text-align: center;
}

.console-box {
  font-family: var(--font-mono); font-size: 0.72rem; background: #050811;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-sm);
  height: 76px; overflow-y: auto; padding: 0.42rem 0.65rem; display: flex; flex-direction: column; gap: 0.12rem;
}

.log-item { color: var(--text-muted, #94a3b8); }
.log-item.cc { color: var(--primary); }
.log-item.system { color: #f59e0b; }

/* Demo Cursor Overlay */
#demo-cursor {
  position: fixed; width: 24px; height: 24px; pointer-events: none; z-index: 9999;
  top: 0; left: 0; display: none; transform: translate(-50%, -50%); transition: transform 0.1s ease;
}

#demo-cursor svg { filter: drop-shadow(0 4px 10px rgba(236, 72, 153, 0.8)); }
#demo-cursor.clicking { transform: translate(-50%, -50%) scale(0.75); }

#demo-tooltip-banner {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(16px);
  border: 2px solid var(--pink); box-shadow: 0 0 30px var(--pink-glow);
  padding: 0.75rem 1.25rem; border-radius: 40px; z-index: 9998; display: none;
  align-items: center; gap: 0.85rem; color: #fff; font-weight: 600; font-size: 0.85rem; max-width: 90%;
}

#demo-tooltip-banner .badge-step { background: linear-gradient(135deg, var(--pink), var(--yellow)); padding: 0.2rem 0.65rem; border-radius: 16px; font-size: 0.75rem; font-weight: 800; color: #000; }
#demo-tooltip-banner .btn-stop-demo { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); padding: 0.25rem 0.65rem; border-radius: 16px; font-size: 0.75rem; cursor: pointer; }

/* Preset Management Toolbar Styles */
.preset-toolbar-card {
  padding: 0.48rem 0.9rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(0, 242, 254, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.preset-toolbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.preset-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.preset-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  white-space: nowrap;
}

.preset-select, .preset-name-input {
  background: #090d1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.78rem;
  padding: 0.34rem 0.65rem;
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.2s ease;
}

.preset-select {
  cursor: pointer;
  max-width: 230px;
}

.preset-name-input {
  width: 100%;
  font-family: var(--font-mono);
}

.preset-select:focus, .preset-name-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.preset-actions-group {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.btn-preset {
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.34rem 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  user-select: none;
}

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

.btn-import {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}
.btn-import:hover {
  background: rgba(148, 163, 184, 0.25);
  border-color: #cbd5e1;
}

.btn-save {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(234, 179, 8, 0.25));
  color: #fef08a;
  border-color: rgba(234, 179, 8, 0.4);
}
.btn-save:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(234, 179, 8, 0.4));
  box-shadow: 0 0 15px var(--yellow-glow);
}

.btn-push {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border-color: #34d399;
  box-shadow: 0 0 15px var(--green-glow);
}
.btn-push:hover {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.7);
}

.btn-quick-save {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}
.btn-quick-save:hover {
  background: rgba(59, 130, 246, 0.35);
}

@keyframes pulse-success {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
  70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-push.success-pulse {
  animation: pulse-success 0.8s ease-out;
}

.preset-quick-guide {
  margin-top: 0.4rem;
  padding-top: 0.34rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.73rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}

.preset-quick-guide b {
  color: var(--primary);
}

/* ============================================================
   PITCH FX SELECTOR & DYNAMIC KNOB SUITE
   ============================================================ */
.pitchfx-card {
  position: relative;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.34rem 0.45rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pitchfx-span-row {
  grid-column: 1 / -1;
}

.pitchfx-badge {
  background: rgba(236, 72, 153, 0.2);
  color: var(--pink);
  border: 1px solid var(--pink);
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.pitchfx-layout {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
  justify-content: space-between;
  margin-top: 0;
}

.pitchfx-modes-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 0.28rem;
  min-width: 0;
}

.btn-pfx-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  padding: 0.35rem 0.5rem;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-main, #f8fafc);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
}

.btn-pfx-mode:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-pfx-mode.active {
  background: rgba(236, 72, 153, 0.25);
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
  color: #fff;
}

/* Specific Active Themes for Mode Buttons */
.btn-pfx-mode[data-theme="cyan"].active {
  background: rgba(0, 242, 254, 0.22);
  border-color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.45);
  color: #00f2fe;
}

.btn-pfx-mode[data-theme="magenta"].active {
  background: rgba(236, 72, 153, 0.22);
  border-color: #ec4899;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.45);
  color: #f472b6;
}

.btn-pfx-mode[data-theme="yellow"].active {
  background: rgba(234, 179, 8, 0.22);
  border-color: #eab308;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.45);
  color: #fde047;
}

.btn-pfx-mode[data-theme="blue"].active {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.45);
  color: #60a5fa;
}

.btn-pfx-mode[data-theme="red"].active {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.btn-pfx-mode[data-theme="green"].active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.btn-pfx-mode[data-theme="white"].active {
  background: rgba(255, 255, 255, 0.22);
  border-color: #f8fafc;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

/* Dots inside buttons */
.pfx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.pfx-cyan { background: #00f2fe; box-shadow: 0 0 6px #00f2fe; }
.pfx-magenta { background: #ec4899; box-shadow: 0 0 6px #ec4899; }
.pfx-yellow { background: #eab308; box-shadow: 0 0 6px #eab308; }
.pfx-blue { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.pfx-red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.pfx-green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.pfx-white { background: #ffffff; box-shadow: 0 0 6px #ffffff; }

/* Dynamic Knob Container (Matches 1/3 knob card width on 3-col desktop grid) */
.pitchfx-knob-container {
  width: 157px;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

@media (max-width: 900px) {
  .pitchfx-modes-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .pitchfx-layout {
    flex-direction: column;
    align-items: stretch;
  }
  .pitchfx-modes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .btn-pfx-mode {
    min-height: 52px;
  }
  .pitchfx-knob-container {
    width: 100%;
  }
}

/* Dynamic Knob Colors & Glow */
.knob-pitchfx-dynamic.theme-cyan { --knob-theme: #00f2fe; --knob-glow: rgba(0, 242, 254, 0.4); border-color: #00f2fe; }
.knob-pitchfx-dynamic.theme-cyan .knob-body { background: radial-gradient(circle at 38% 38%, #67e8f9 0%, #00f2fe 55%, #0891b2 100%) !important; box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.6), 0 0 12px rgba(0, 242, 254, 0.5) !important; }
.knob-pitchfx-dynamic.theme-cyan .knob-wrapper .knob-pointer { background: #ffffff !important; box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.7) !important; }
.knob-pitchfx-dynamic.theme-cyan .knob-wrapper .knob-dot.active { background: #00f2fe; box-shadow: 0 0 6px #00f2fe; }
.knob-pitchfx-dynamic.theme-cyan .cc-badge { border-color: #00f2fe; color: #00f2fe; }

.knob-pitchfx-dynamic.theme-magenta { --knob-theme: #ec4899; --knob-glow: rgba(236, 72, 153, 0.4); border-color: #ec4899; }
.knob-pitchfx-dynamic.theme-magenta .knob-body { background: radial-gradient(circle at 38% 38%, #f472b6 0%, #ec4899 55%, #db2777 100%) !important; box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.6), 0 0 12px rgba(236, 72, 153, 0.5) !important; }
.knob-pitchfx-dynamic.theme-magenta .knob-wrapper .knob-pointer { background: #ffffff !important; box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.7) !important; }
.knob-pitchfx-dynamic.theme-magenta .knob-wrapper .knob-dot.active { background: #ec4899; box-shadow: 0 0 6px #ec4899; }
.knob-pitchfx-dynamic.theme-magenta .cc-badge { border-color: #ec4899; color: #ec4899; }

.knob-pitchfx-dynamic.theme-yellow { --knob-theme: #eab308; --knob-glow: rgba(234, 179, 8, 0.4); border-color: #eab308; }
.knob-pitchfx-dynamic.theme-yellow .knob-body { background: radial-gradient(circle at 38% 38%, #fde047 0%, #eab308 55%, #ca8a04 100%) !important; box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.6), 0 0 12px rgba(234, 179, 8, 0.5) !important; }
.knob-pitchfx-dynamic.theme-yellow .knob-wrapper .knob-pointer { background: #ffffff !important; box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.7) !important; }
.knob-pitchfx-dynamic.theme-yellow .knob-wrapper .knob-dot.active { background: #eab308; box-shadow: 0 0 6px #eab308; }
.knob-pitchfx-dynamic.theme-yellow .cc-badge { border-color: #eab308; color: #eab308; }

.knob-pitchfx-dynamic.theme-blue { --knob-theme: #3b82f6; --knob-glow: rgba(59, 130, 246, 0.4); border-color: #3b82f6; }
.knob-pitchfx-dynamic.theme-blue .knob-body { background: radial-gradient(circle at 38% 38%, #60a5fa 0%, #3b82f6 55%, #1d4ed8 100%) !important; box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.6), 0 0 12px rgba(59, 130, 246, 0.5) !important; }
.knob-pitchfx-dynamic.theme-blue .knob-wrapper .knob-pointer { background: #ffffff !important; box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.7) !important; }
.knob-pitchfx-dynamic.theme-blue .knob-wrapper .knob-dot.active { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.knob-pitchfx-dynamic.theme-blue .cc-badge { border-color: #3b82f6; color: #3b82f6; }

.knob-pitchfx-dynamic.theme-red { --knob-theme: #ef4444; --knob-glow: rgba(239, 68, 68, 0.4); border-color: #ef4444; }
.knob-pitchfx-dynamic.theme-red .knob-body { background: radial-gradient(circle at 38% 38%, #f87171 0%, #ef4444 55%, #b91c1c 100%) !important; box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.6), 0 0 12px rgba(239, 68, 68, 0.5) !important; }
.knob-pitchfx-dynamic.theme-red .knob-wrapper .knob-pointer { background: #ffffff !important; box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.7) !important; }
.knob-pitchfx-dynamic.theme-red .knob-wrapper .knob-dot.active { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.knob-pitchfx-dynamic.theme-red .cc-badge { border-color: #ef4444; color: #ef4444; }

.knob-pitchfx-dynamic.theme-green { --knob-theme: #10b981; --knob-glow: rgba(16, 185, 129, 0.4); border-color: #10b981; }
.knob-pitchfx-dynamic.theme-green .knob-body { background: radial-gradient(circle at 38% 38%, #34d399 0%, #10b981 55%, #059669 100%) !important; box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.6), 0 0 12px rgba(16, 185, 129, 0.5) !important; }
.knob-pitchfx-dynamic.theme-green .knob-wrapper .knob-pointer { background: #ffffff !important; box-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.7) !important; }
.knob-pitchfx-dynamic.theme-green .knob-wrapper .knob-dot.active { background: #10b981; box-shadow: 0 0 6px #10b981; }
.knob-pitchfx-dynamic.theme-green .cc-badge { border-color: #10b981; color: #10b981; }

.knob-pitchfx-dynamic.theme-white { --knob-theme: #ffffff; --knob-glow: rgba(255, 255, 255, 0.4); border-color: #ffffff; }
.knob-pitchfx-dynamic.theme-white .knob-body { background: radial-gradient(circle at 38% 38%, #ffffff 0%, #e2e8f0 55%, #94a3b8 100%) !important; box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.8), 0 0 12px rgba(255, 255, 255, 0.5) !important; }
.knob-pitchfx-dynamic.theme-white .knob-wrapper .knob-pointer { background: #070913 !important; box-shadow: 0 0 2px rgba(0,0,0,0.8) !important; }
.knob-pitchfx-dynamic.theme-white .knob-wrapper .knob-dot.active { background: #ffffff; box-shadow: 0 0 6px #ffffff; }
.knob-pitchfx-dynamic.theme-white .cc-badge { border-color: #ffffff; color: #ffffff; }



