/* Pitch Detector Styles */

/* Microphone Button */
.pitch-detector-btn {
  position: fixed;
  bottom: 3.75em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #4a90e2;
  color: white;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.45);
  cursor: pointer;
  z-index: 999;
  font-size: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 1;
}

/* Balloon Pop Button */
.balloon-mode-btn {
  position: fixed;
  bottom: 4.8em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  /* background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9)); */
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.balloon-mode-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.balloon-mode-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

.balloon-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transform: rotate(19deg);
}

/* Lightning Button */
.lightning-mode-btn {
  position: fixed;
  bottom: 7.4em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  /* background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9)); */
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.lightning-mode-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.lightning-mode-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

.lightning-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

/* Lightning toggle toast */
.lightning-toggle-toast {
  position: fixed;
  z-index: 1001;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(125, 222, 255, 0.3);
  color: #e7f6ff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

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

.lightning-toggle-toast.hidden {
  opacity: 0;
}

.lightning-toggle-status {
  font-weight: 800;
  text-decoration: underline;
}

.lightning-toggle-status.enabled {
  color: #78f0ff;
  text-shadow: 0 0 6px rgba(120, 240, 255, 0.55);
}

.lightning-toggle-status.disabled {
  color: #ffb4b4;
  text-shadow: 0 0 6px rgba(255, 180, 180, 0.45);
}

/* Flame Button */
.flame-mode-btn {
  position: fixed;
  bottom: 9.2em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.95), rgba(255, 69, 0, 0.9));
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(255, 100, 0, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.flame-mode-btn:hover {
  opacity: 1;
  border-color: rgba(255, 200, 100, 0.9);
  box-shadow: 0 0 18px rgba(255, 130, 0, 0.7);
}

.flame-mode-btn.active {
  box-shadow: 0 0 22px rgba(255, 120, 0, 0.8), 0 0 10px rgba(255, 80, 0, 0.6);
  opacity: 1;
}

.flame-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transform: rotate(0deg);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

/* Keyboard Shortcuts Button */
.keyboard-shortcuts-btn {
  position: fixed;
  bottom: 15.5em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
}

.keyboard-shortcuts-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.keyboard-shortcuts-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

.keyboard-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

/* Keyboard Shortcuts Panel */
.kb-shortcuts-panel {
  position: fixed;
  width: 300px;
  min-width: 240px;
  min-height: 200px;
  max-height: 80vh;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: both;
}

.kb-shortcuts-panel.hidden {
  display: none;
}

.kb-shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.kb-shortcuts-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.kb-shortcuts-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.kb-shortcuts-close:hover {
  color: #e7f6ff;
}

.kb-shortcuts-body {
  overflow-y: auto;
  padding: 10px 14px;
}

.kb-shortcuts-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #78d4ff;
  margin: 10px 0 6px;
}

.kb-shortcuts-group-title:first-child {
  margin-top: 0;
}

.kb-shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 12px;
  color: rgba(200, 220, 240, 0.75);
}

.kb-shortcut-keys {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.kb-key-badge {
  display: inline-block;
  background: rgba(30, 50, 80, 0.7);
  border: 1px solid rgba(100, 140, 200, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: inherit;
  color: #c8e0f0;
  line-height: 1.4;
  white-space: nowrap;
}

/* CAGED Button */
.caged-mode-btn {
  position: fixed;
  bottom: 34em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  /* background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9)); */
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.caged-mode-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.caged-mode-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

/* CAGED Floating Modal */
.caged-modal {
  position: fixed;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  background: rgba(10, 18, 32, 0.94);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  min-width: 180px;
}

.caged-modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  cursor: grab;
  user-select: none;
  border-bottom: 1px solid rgba(100, 140, 200, 0.15);
}

.caged-modal-header:active {
  cursor: grabbing;
}

.caged-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(200, 215, 240, 0.9);
  letter-spacing: 0.5px;
}

.caged-modal-line-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(200, 215, 240, 0.6);
  cursor: pointer;
  margin-left: auto;
}

.caged-modal-line-toggle input[type="checkbox"] {
  accent-color: #3498db;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.caged-modal-close-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(200, 215, 240, 0.5);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.caged-modal-close-btn:hover {
  background: rgba(255, 80, 80, 0.2);
  color: rgba(255, 150, 150, 0.9);
}

.caged-modal-buttons {
  display: flex;
  gap: 6px;
  padding: 10px;
}

.caged-shape-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 2px solid var(--shape-color, rgba(100, 140, 200, 0.4));
  background: rgba(255, 255, 255, 0.06);
  color: #e8f0ff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.caged-shape-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 12px color-mix(in srgb, var(--shape-color) 50%, transparent);
  transform: scale(1.08);
}

.caged-shape-btn:active {
  transform: scale(0.95);
}

/* CAGED Root Selection Row */
.caged-modal-root-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 10px;
  border-top: 1px solid rgba(100, 140, 200, 0.12);
}

.caged-root-select-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(100, 140, 200, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #c8d7f0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.caged-root-select-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.caged-root-select-btn.active {
  background: rgba(52, 152, 219, 0.35);
  border-color: rgba(52, 152, 219, 0.7);
  animation: caged-pulse 1.2s ease-in-out infinite;
}

@keyframes caged-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(52, 152, 219, 0.3); }
  50% { box-shadow: 0 0 12px rgba(52, 152, 219, 0.7); }
}

.caged-root-display {
  font-size: 14px;
  font-weight: 700;
  color: rgba(200, 215, 240, 0.85);
  letter-spacing: 0.3px;
  flex: 1;
}

.caged-root-clear-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 100, 100, 0.3);
  background: rgba(255, 80, 80, 0.12);
  color: rgba(255, 150, 150, 0.9);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.caged-root-clear-btn:hover {
  background: rgba(255, 80, 80, 0.3);
  border-color: rgba(255, 100, 100, 0.6);
}

/* CAGED Root Section wrapper */
.caged-modal-root-section {
  border-top: 1px solid rgba(100, 140, 200, 0.12);
}

.caged-modal-root-section .caged-modal-root-row {
  border-top: none;
}

/* CAGED Note Pill Row */
.caged-note-pill-row {
  display: flex;
  gap: 5px;
  padding: 2px 10px 8px;
  justify-content: center;
}

.caged-note-pill {
  width: 32px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(140, 170, 220, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(200, 215, 240, 0.8);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.caged-note-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(140, 170, 220, 0.6);
}

.caged-note-pill.active {
  background: rgba(52, 152, 219, 0.4);
  border-color: rgba(52, 152, 219, 0.8);
  color: #fff;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.35);
}

/* CAGED Accidental Row */
.caged-accidental-row {
  display: flex;
  gap: 8px;
  padding: 2px 10px 10px;
  justify-content: center;
}

.caged-accidental-btn {
  width: 36px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(140, 170, 220, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 215, 240, 0.7);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.caged-accidental-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(140, 170, 220, 0.5);
}

.caged-accidental-btn.active {
  background: rgba(52, 152, 219, 0.35);
  border-color: rgba(52, 152, 219, 0.7);
  color: #fff;
  box-shadow: 0 0 6px rgba(52, 152, 219, 0.3);
}

/* CAGED Quality Toggle (Major/Minor) */
.caged-quality-toggle {
  display: flex;
  padding: 8px 10px 10px;
  gap: 0;
  border-top: 1px solid rgba(100, 140, 200, 0.12);
}

.caged-quality-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid rgba(100, 140, 200, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 215, 240, 0.5);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.caged-quality-btn:first-child {
  border-radius: 6px 0 0 6px;
  border-right: none;
}

.caged-quality-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.caged-quality-btn.active {
  background: rgba(52, 152, 219, 0.3);
  border-color: rgba(52, 152, 219, 0.6);
  color: #fff;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.2);
}

.caged-quality-toggle.minor-active .caged-quality-btn.active {
  background: rgba(155, 89, 182, 0.3);
  border-color: rgba(155, 89, 182, 0.6);
  box-shadow: 0 0 8px rgba(155, 89, 182, 0.2);
}

/* Flame toggle toast */
.flame-toggle-toast {
  position: fixed;
  z-index: 1001;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(255, 150, 80, 0.3);
  color: #e7f6ff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

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

.flame-toggle-toast.hidden {
  opacity: 0;
}

.flame-toggle-status {
  font-weight: 800;
  text-decoration: underline;
}

.flame-toggle-status.enabled {
  color: #ffb070;
  text-shadow: 0 0 6px rgba(255, 140, 70, 0.55);
}

.flame-toggle-status.disabled {
  color: #ffb4b4;
  text-shadow: 0 0 6px rgba(255, 180, 180, 0.45);
}

/* Balloon toggle toast */
.balloon-toggle-toast {
  position: fixed;
  z-index: 1001;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(12, 18, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

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

.balloon-toggle-toast.hidden {
  opacity: 0;
}

.balloon-toggle-status {
  font-weight: 800;
  text-decoration: underline;
}

.balloon-toggle-status.enabled {
  color: #7CFF6B;
  text-shadow: 0 0 6px rgba(124, 255, 107, 0.45);
}

.balloon-toggle-status.disabled {
  color: #FF8B8B;
  text-shadow: 0 0 6px rgba(255, 139, 139, 0.45);
}

.pitch-detector-btn:hover {
  opacity: 1;
  border-color: rgba(255, 150, 120, 0.9);
  box-shadow: 0 0 18px rgba(255, 130, 100, 0.7);
  font-size: 36px;
}

.pitch-detector-btn.inactive {
  background: #4a90e2;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.45);
  opacity: 1;
}

.pitch-detector-btn.active {
  box-shadow: 0 0 22px rgba(255, 100, 120, 0.8), 0 0 10px rgba(255, 60, 80, 0.6);
  opacity: 1;
}

.pitch-detector-btn.listening {
  background: linear-gradient(135deg, rgb(215 55 33 / 95%), rgba(255, 75, 55, 0.9));
  /* border-color: rgba(255, 150, 120, 0.9); */
  box-shadow: 0 0 22px rgba(255, 120, 0, 0.8), 0 0 10px rgba(255, 80, 0, 0.6);
  animation: pulse-red 1.5s ease-in-out infinite;
  opacity: 1;
  border: 2px solid rgb(255 255 255 / 71%);
}

.pitch-detector-btn.flash-success {
  background: #4CAF50;
  animation: flash-green 0.2s ease;
}

@keyframes pulse-red {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.8), 0 0 30px rgba(244, 67, 54, 0.6);
    transform: scale(1.08);
  }
}

@keyframes flash-green {
  0%, 100% {
    background: #4CAF50;
  }
  50% {
    background: #8BC34A;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
  }
}

/* Pitch Indicator Overlay */
.pitch-indicator {
  position: fixed;
  top: 11em;
  left: 85%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.95) 0%, rgba(106, 90, 205, 0.95) 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 998;
  min-width: 280px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pitch-indicator.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-20px);
}

.pitch-indicator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px 10px 0 0;
  margin: -16px -24px 8px -24px;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pitch-indicator-header:hover {
  background: rgba(0, 0, 0, 0.3);
}

.pitch-indicator-header:active {
  cursor: grabbing;
}

.pitch-indicator-title {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

.pitch-indicator-drag-hint {
  font-size: 14px;
  opacity: 0.5;
  letter-spacing: -2px;
}

.pitch-indicator-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pitch-level-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.pitch-level-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  font-weight: 600;
}

.pitch-gain-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pitch-gain-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.pitch-gain-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.pitch-gain-btn:active {
  transform: scale(0.95);
}

.pitch-gain-value {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  min-width: 32px;
  text-align: center;
  opacity: 0.9;
}

.pitch-level-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.pitch-level-fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 6px;
  transition: width 0.1s ease, background 0.2s ease;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.pitch-level-value {
  font-size: 11px;
  font-family: 'Courier New', monospace;
  text-align: right;
  opacity: 0.9;
  font-weight: bold;
}

/* Settings Section */
.pitch-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pitch-setting-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pitch-setting-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  font-weight: 600;
}

.pitch-setting-value {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  opacity: 1;
  color: #4CAF50;
}

.pitch-setting-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.pitch-setting-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(76, 175, 80, 0.6);
  transition: all 0.2s ease;
}

.pitch-setting-slider::-webkit-slider-thumb:hover {
  background: #66BB6A;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
}

.pitch-setting-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 4px rgba(76, 175, 80, 0.6);
  transition: all 0.2s ease;
}

.pitch-setting-slider::-moz-range-thumb:hover {
  background: #66BB6A;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
}

.pitch-setting-checkbox {
  width: 100%;
  height: 20px;
  cursor: pointer;
  accent-color: #4CAF50;
}

.pitch-note {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  transition: color 0.2s ease;
}

.pitch-frequency {
  font-size: 14px;
  text-align: center;
  opacity: 0.9;
  font-family: 'Courier New', monospace;
}

.pitch-position {
  font-size: 13px;
  text-align: center;
  opacity: 0.85;
  font-weight: 500;
}

.pitch-confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.pitch-confidence-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.pitch-confidence-fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 4px;
  transition: width 0.2s ease, background 0.2s ease;
}

.pitch-confidence-text {
  font-size: 12px;
  font-weight: bold;
  min-width: 40px;
  text-align: right;
  font-family: 'Courier New', monospace;
}

/* ─── Pitch Indicator Close Button ─── */
.pitch-indicator-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.2s ease;
}
.pitch-indicator-close:hover {
  color: #fff;
}

/* ─── Piano Pitch Detector: Wide Horizontal Layout ─── */
.piano-pitch-layout {
  flex-direction: row !important;
  gap: 16px !important;
  align-items: stretch;
}

.piano-pitch-left {
  flex: 1;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.piano-pitch-right {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 16px;
}

.piano-pitch-right .pitch-radar-container {
  margin: 0;
}

.piano-pitch-right .pitch-confidence {
  margin-top: 4px;
  width: 100%;
}

/* Override the default min-width so the piano indicator is wider but shorter */
#pianoPitchIndicator {
  min-width: 480px;
  max-width: 560px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pitch-detector-btn {
    bottom: 4.75em;
    right: 12px;
    width: 50px;
    height: 50px;
    font-size: 40px;
  }

  .balloon-mode-btn {
    bottom: 7.75em;
    right: 12px;
    width: 50px;
    height: 50px;
    font-size: 40px;
  }

  .pitch-indicator {
    top: 10px;
    min-width: 240px;
    padding: 12px 18px;
  }

  .pitch-note {
    font-size: 28px;
  }

  .pitch-frequency {
    font-size: 12px;
  }

  .pitch-position {
    font-size: 11px;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .pitch-indicator {
  background: linear-gradient(135deg, rgba(30, 40, 60, 0.95) 0%, rgba(40, 30, 60, 0.95) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pitch-detector-btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ===== RADAR CIRCULAR PROGRESS INDICATOR ===== */

/* Radar Container */
.pitch-radar {
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 10px rgba(74, 144, 226, 0));
  transition: filter 0.3s ease;
}

.pitch-radar.sustained {
  filter: drop-shadow(0 0 20px rgba(74, 144, 226, 0.8));
}

/* Radar Circles */
.radar-base {
  opacity: 0.3;
}

.radar-outer,
.radar-middle,
.radar-inner,
.radar-core {
  transition: stroke 0.3s ease,
              stroke-dashoffset 0.5s ease,
              opacity 0.3s ease,
              fill 0.3s ease;
}

/* Rotation Animations */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-medium {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes spin-fast {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes radar-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Animation Classes */
.radar-outer.spinning {
  animation: spin-slow var(--spin-duration, 30s) linear infinite;
}

.radar-middle.spinning {
  animation: spin-medium var(--spin-duration, 15s) linear infinite;
}

.radar-inner.spinning {
  animation: spin-fast var(--spin-duration, 8s) linear infinite;
}

.radar-core.pulsing {
  animation: radar-pulse var(--pulse-duration, 2s) ease-in-out infinite;
}

.radar-outer.flickering,
.radar-middle.flickering,
.radar-inner.flickering {
  animation: flicker 0.6s ease-in-out infinite;
}

/* Note Text */
.radar-note-text {
  transition: fill 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.radar-note-text.matched {
  fill: #4a90e2;
  filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.8));
}

/* Info Display */
.radar-info {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.9;
}

/* ─── Playback Actions Button (above Keyboard Shortcuts) ─── */

.playback-actions-btn {
  position: fixed;
  bottom: 22.5em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
}

.playback-actions-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.playback-actions-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

.playback-actions-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.playback-actions-svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.playback-arc-text {
  fill: rgba(220, 230, 255, 0.9);
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.playback-arc-top {
  font-size: 7px;
}

.playback-arc-bottom {
  font-size: 8px;
}

.playback-arc-icon {
  fill: rgba(220, 230, 255, 0.95);
  font-size: 13px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.playback-actions-btn:hover .playback-arc-text {
  fill: #ffffff;
}

.playback-actions-btn:hover .playback-arc-icon {
  fill: #ffffff;
}

.playback-actions-btn.active .playback-arc-text {
  fill: #ffffff;
}

.playback-actions-btn.active .playback-arc-icon {
  fill: #ffffff;
}

/* Playback Actions Panel */
.playback-actions-panel {
  position: fixed;
  width: 310px;
  min-width: 260px;
  min-height: 120px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playback-actions-panel.hidden {
  display: none;
}

.playback-actions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.playback-actions-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.playback-actions-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.playback-actions-close:hover {
  color: #e7f6ff;
}

.playback-actions-body {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Re-style the playback cards when inside the floating panel */
.playback-actions-body .control-group.playback-card {
  background: none;
  border: none;
  border-radius: 0;
  padding: 8px 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Divider line between simple and advanced sections */
.playback-actions-body .control-group.playback-card + .control-group.playback-card {
  border-top: 1px solid rgba(100, 140, 200, 0.15);
  padding-top: 10px;
}

/* Simple actions: equal-third slots in a row */
.playback-actions-body .playback-card-primary {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.playback-actions-body .playback-card-primary > .actionButton,
.playback-actions-body .playback-card-primary > .hum-control {
  flex: 1 1 0;
  min-width: 0;
}

.playback-actions-body .playback-card-primary > .actionButton {
  padding: 6px 4px;
  font-size: 13px;
  text-align: center;
  box-sizing: border-box;
}

.playback-actions-body .playback-card-primary .hum-button {
  flex: 1;
  padding: 6px 4px;
  font-size: 13px;
  text-align: center;
  box-sizing: border-box;
}

/* Advanced actions: each control row full width */
.playback-actions-body .playback-card-advanced {
  flex-direction: column;
  gap: 6px;
}

.playback-actions-body .playback-card-advanced .strum-control,
.playback-actions-body .playback-card-advanced .bass-strum-control,
.playback-actions-body .playback-card-advanced .arpeggio-control {
  width: 100%;
  display: flex;
}

.playback-actions-body .playback-card-advanced .strum-button,
.playback-actions-body .playback-card-advanced .bass-strum-button,
.playback-actions-body .playback-card-advanced .arpeggio-button {
  flex: 1;
}

.playback-actions-body .actionButton,
.playback-actions-body .playback-button {
  background: rgba(20, 28, 50, 0.7);
  border: 1px solid rgba(100, 120, 180, 0.25);
  color: #c8ddf0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.playback-actions-body .actionButton:hover,
.playback-actions-body .playback-button:hover {
  background: rgba(30, 45, 75, 0.8);
  border-color: rgba(120, 150, 220, 0.45);
}

.playback-actions-body .actionButton.active,
.playback-actions-body .playback-button.active,
.playback-actions-body .actionButton.last-action {
  background: rgba(40, 60, 120, 0.6);
  border-color: rgba(100, 150, 230, 0.5);
  color: #e7f6ff;
}

/* ─── Record Action Button (above Playback Actions) ─── */

.record-action-btn {
  position: fixed;
  bottom: 23.2em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
  font-family: inherit;
}

.record-btn-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 1px;
}

.record-btn-icon {
  font-size: 18px;
  line-height: 1;
}

.record-action-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.record-action-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

.record-action-btn.recording {
  background: linear-gradient(135deg, rgba(220, 50, 50, 0.95), rgba(180, 30, 30, 0.9));
  box-shadow: 0 0 22px rgba(255, 80, 80, 0.7), 0 0 10px rgba(255, 40, 40, 0.5);
  opacity: 1;
  animation: record-pulse 1.2s ease-in-out infinite;
}

@keyframes record-pulse {
  0%, 100% { box-shadow: 0 0 22px rgba(255, 80, 80, 0.7), 0 0 10px rgba(255, 40, 40, 0.5); }
  50% { box-shadow: 0 0 30px rgba(255, 80, 80, 0.9), 0 0 16px rgba(255, 40, 40, 0.7); }
}

.record-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

/* Record Action Panel */
.record-action-panel {
  position: fixed;
  width: 300px;
  min-width: 200px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.record-action-panel.hidden {
  display: none;
}

.record-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.record-action-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.record-action-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.record-action-close:hover {
  color: #e7f6ff;
}

.record-action-body {
  padding: 10px;
  max-height: 80vh;
  overflow-y: auto;
}

/* (Legacy .record-control overrides removed — panel now builds its own content) */

/* ─── Accidentals Action Button (above Record) ─── */

.accidentals-action-btn {
  position: fixed;
  bottom: 38.5em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
  font-family: inherit;
  line-height: 1;
}

.accidentals-action-btn {
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.accidentals-btn-top,
.accidentals-btn-bottom {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
}

.accidentals-btn-sep {
  width: 26px;
  height: 1px;
  background: rgba(230, 240, 255, 0.7);
  margin: 3px 0;
}

.accidentals-action-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.accidentals-action-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

/* Accidentals Panel */
.accidentals-action-panel {
  position: fixed;
  width: 240px;
  min-width: 0;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.accidentals-action-panel.hidden {
  display: none;
}

.accidentals-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.accidentals-action-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.accidentals-action-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.accidentals-action-close:hover {
  color: #e7f6ff;
}

.accidentals-action-body {
  padding: 12px 14px;
  font-size: 14px;
}

/* Re-style note-preference when inside the floating panel */
.accidentals-action-body .note-preference {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  flex-wrap: nowrap;
  background: none;
  border: none;
  padding: 0;
}

.accidentals-action-body .note-toggle {
  background: rgba(15, 25, 45, 0.5);
  border: 1px solid rgba(100, 140, 200, 0.3);
  color: rgba(200, 215, 240, 0.85);
  width: 52px;
  height: 44px;
  font-size: 18px;
  border-radius: 8px;
  box-shadow: none;
}

.accidentals-action-body .note-toggle:hover {
  border-color: rgba(120, 170, 240, 0.5);
  background: rgba(30, 50, 80, 0.6);
}

.accidentals-action-body .note-toggle.active {
  background: rgba(33, 150, 243, 0.3);
  border-color: rgba(33, 150, 243, 0.7);
  color: #e7f6ff;
}

.accidentals-action-body .preference-label {
  font-size: 14px;
  width: 100%;
  margin-bottom: 4px;
}

/* ─── Define Key / Circle of Fifths Picker ─── */

.key-section {
  margin-top: 4px;
}

.key-section-sep {
  height: 1px;
  background: rgba(100, 140, 200, 0.15);
  margin: 10px 0;
}

.define-key-btn {
  display: block;
  width: 100%;
  padding: 10px 0;
  border-radius: 6px;
  border: 1px solid rgba(100, 140, 200, 0.25);
  background: rgba(30, 45, 70, 0.6);
  color: rgba(200, 215, 240, 0.9);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.define-key-btn:hover {
  background: rgba(40, 65, 100, 0.7);
  border-color: rgba(120, 170, 240, 0.4);
}

.define-key-btn.active {
  background: rgba(50, 80, 130, 0.7);
  border-color: rgba(100, 180, 255, 0.5);
}

/* Active key indicator */
.active-key-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  color: rgba(200, 215, 240, 0.9);
}

.active-key-label.hidden {
  display: none;
}

.active-key-name {
  font-weight: 700;
  color: rgba(80, 200, 120, 0.95);
}

.active-key-acc {
  font-size: 11px;
  color: rgba(160, 180, 210, 0.6);
}

.active-key-clear {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.5);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  margin-left: 2px;
}

.active-key-clear:hover {
  color: #ff6b6b;
}

/* Circle of fifths picker */
.cof-picker {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.cof-picker.hidden {
  display: none;
}

.cof-svg {
  display: block;
}

.cof-key circle {
  transition: fill 0.15s ease, stroke 0.15s ease;
}

.cof-key:hover circle {
  fill: rgba(60, 100, 160, 0.5) !important;
  stroke: rgba(140, 200, 255, 0.6) !important;
}

.cof-key text {
  pointer-events: none;
  user-select: none;
}

.cof-key-inner text {
  opacity: 0.65;
}

.cof-selected circle {
  fill: rgba(80, 200, 120, 0.35) !important;
  stroke: rgba(80, 200, 120, 0.7) !important;
}

.cof-selected text {
  fill: rgba(80, 200, 120, 1) !important;
}

/* ─── Capo Action Button (above CAGED) ─── */

.capo-action-btn {
  position: fixed;
  bottom: 56.2em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
  font-family: inherit;
  line-height: 1;
}

.capo-action-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.capo-action-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

/* Capo Panel */
.capo-action-panel {
  position: fixed;
  width: 330px;
  min-width: 300px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.capo-action-panel.hidden {
  display: none;
}

.capo-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.capo-action-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.capo-action-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.capo-action-close:hover {
  color: #e7f6ff;
}

.capo-action-body {
  padding: 14px;
}

/* Re-style the capo section when inside the floating panel */
.capo-action-body .tuning-section {
  padding: 0;
  margin: 0;
  border: none;
  background: none;
}

.capo-action-body .tuning-section-title {
  display: none;
}

.capo-action-body .tuning-instructions-text {
  font-size: 13px;
  color: rgba(180, 200, 220, 0.65);
  margin: 0 0 10px;
}

/* ─── Frets Action Button (above Capo) ─── */

.frets-action-btn {
  position: fixed;
  bottom: 73em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
  font-family: inherit;
  line-height: 1;
}

.frets-action-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.frets-action-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

/* Frets Panel */
.frets-action-panel {
  position: fixed;
  width: 240px;
  min-width: 180px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.frets-action-panel.hidden {
  display: none;
}

.frets-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.frets-action-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.frets-action-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.frets-action-close:hover {
  color: #e7f6ff;
}

.frets-action-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.frets-dropdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.frets-action-body .preference-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(200, 210, 240, 0.8);
  white-space: nowrap;
}

.frets-number-section {
  border-top: 1px solid rgba(100, 140, 200, 0.15);
  margin-top: 8px;
  padding-top: 10px;
}

.frets-number-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(200, 215, 240, 0.85);
  user-select: none;
}

.frets-number-toggle input[type="checkbox"] {
  accent-color: #5ba3d9;
  width: 13px;
  height: 13px;
  cursor: pointer;
  margin: 0;
}

.frets-position-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.frets-position-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(180, 200, 230, 0.7);
  white-space: nowrap;
}

.frets-position-select {
  flex: 1;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(100, 140, 200, 0.25);
  background: rgba(20, 30, 50, 0.8);
  color: rgba(200, 215, 240, 0.9);
  cursor: pointer;
  outline: none;
}

.frets-position-select:focus {
  border-color: rgba(100, 160, 240, 0.5);
}

.frets-tip-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
}

.frets-number-tip {
  flex: 1;
  font-size: 12.5px;
  color: rgba(140, 170, 210, 0.55);
  line-height: 1.45;
  font-style: italic;
}

.frets-help-btn {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(100, 160, 240, 0.4);
  background: rgba(40, 70, 120, 0.4);
  color: rgba(140, 180, 240, 0.8);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.2s;
  margin-top: 2px;
}

.frets-help-btn:hover {
  background: rgba(60, 100, 180, 0.5);
  border-color: rgba(100, 180, 255, 0.6);
  color: #e7f6ff;
}

/* ─── Fret Number Demo Animation ─── */

.frets-demo-cursor {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  will-change: left, top;
}

.frets-demo-click-pulse {
  position: fixed;
  z-index: 99998;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  background: rgba(100, 180, 255, 0.5);
  pointer-events: none;
  animation: fretsDemoClickPulse 0.45s ease-out forwards;
}

@keyframes fretsDemoClickPulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ─── Capo Tutorial Help Buttons ─── */

.capo-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(100, 160, 240, 0.4);
  background: rgba(40, 70, 120, 0.4);
  color: rgba(140, 180, 240, 0.8);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.2s;
}

.capo-help-btn:hover {
  background: rgba(60, 100, 180, 0.5);
  border-color: rgba(100, 180, 255, 0.6);
  color: #e7f6ff;
}

/* ─── Tutorial Arrow Keys Overlay ─── */

.tutorial-arrow-keys {
  position: fixed;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.tutorial-arrow-row {
  display: flex;
  gap: 3px;
}

.tutorial-arrow-key {
  width: 28px;
  height: 26px;
  border-radius: 5px;
  background: rgba(50, 60, 80, 0.95);
  border: 1px solid rgba(120, 150, 200, 0.4);
  color: rgba(200, 220, 255, 0.9);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.1s ease;
}

.tutorial-arrow-key.pressed {
  background: rgba(80, 140, 240, 0.7);
  border-color: rgba(100, 180, 255, 0.8);
  box-shadow: 0 0 8px rgba(100, 180, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(2px);
  color: #ffffff;
}

/* ─── Tutorial Arrow Keys Label ─── */

.tutorial-arrow-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(140, 190, 255, 0.7);
  text-align: center;
  margin-top: 5px;
}

/* ─── Tutorial Stepper Spotlight ─── */

.tutorial-stepper-spotlight {
  box-shadow: 0 0 14px rgba(80, 230, 140, 0.6), 0 0 4px rgba(80, 230, 140, 0.3) !important;
  border-color: rgba(80, 230, 140, 0.7) !important;
  outline: 2px solid rgba(80, 230, 140, 0.35);
  outline-offset: 3px;
  transition: box-shadow 0.3s, border-color 0.3s, outline 0.3s;
}

/* ─── Hide real cursor during tutorials ─── */

body.tutorial-running,
body.tutorial-running * {
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill-opacity="0"/></svg>') 0 0, none !important;
}

/* ─── Tutorial Pointing Finger ─── */

.tutorial-pointing-finger {
  position: fixed;
  z-index: 99999;
  font-size: 20px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  will-change: left, top;
}

/* ─── Display Action Button & Panel ─── */

.display-action-btn {
  position: fixed;
  bottom: 10em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
  font-family: inherit;
  line-height: 1;
  padding: 0;
}

.display-action-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.display-action-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

/* Display Panel */
.display-action-panel {
  position: fixed;
  width: 280px;
  min-width: 220px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.display-action-panel.hidden {
  display: none;
}

.display-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.display-action-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.display-action-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.display-action-close:hover {
  color: #e7f6ff;
}

.display-action-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Three effect buttons in a row */
.display-effect-buttons {
  display: flex;
  gap: 6px;
}

.display-effect-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid rgba(100, 140, 200, 0.2);
  background: rgba(30, 45, 70, 0.6);
  color: rgba(200, 215, 240, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.display-effect-btn:hover {
  background: rgba(40, 65, 100, 0.7);
  border-color: rgba(120, 160, 220, 0.4);
}

.display-effect-btn.section-open {
  background: rgba(50, 80, 130, 0.7);
  border-color: rgba(100, 180, 255, 0.5);
  box-shadow: 0 0 8px rgba(100, 180, 255, 0.15);
}

.display-effect-btn.effect-enabled {
  box-shadow: 0 0 10px rgba(80, 200, 120, 0.3);
  border-color: rgba(80, 200, 120, 0.4);
}

.display-effect-btn.effect-enabled.section-open {
  border-color: rgba(100, 200, 150, 0.5);
  box-shadow: 0 0 10px rgba(80, 200, 120, 0.3), 0 0 8px rgba(100, 180, 255, 0.15);
}

.display-effect-emoji {
  font-size: 20px;
  line-height: 1;
}

.display-effect-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Settings area */
.display-settings-area {
  display: flex;
  flex-direction: column;
}

.display-settings-section {
  border-top: 1px solid rgba(100, 140, 200, 0.15);
  padding-top: 10px;
}

.display-enable-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: rgba(200, 215, 240, 0.9);
  user-select: none;
  margin-bottom: 2px;
}

.display-enable-checkbox {
  accent-color: #5ba3d9;
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0;
}

.display-enable-label {
  font-size: 12px;
}

.display-settings-divider {
  height: 1px;
  background: rgba(100, 140, 200, 0.12);
  margin: 8px 0;
}

/* Restyle the moved modal settings to fit the compact panel */
.display-settings-section .spacing-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.display-settings-section .spacing-control label {
  font-size: 11px;
  color: rgba(180, 200, 230, 0.8);
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 0;
}

.display-settings-section .spacing-control input[type="range"] {
  flex: 1;
  min-width: 60px;
  height: 4px;
}

.display-settings-section .spacing-control span {
  font-size: 10px;
  color: rgba(160, 190, 220, 0.7);
  min-width: 32px;
  text-align: right;
}

.display-settings-section .spacing-control select {
  flex: 1;
  font-size: 11px;
  padding: 3px 6px;
  background: rgba(20, 35, 60, 0.8);
  color: #c8d7f0;
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 4px;
}

.display-settings-section .flame-toggle-option,
.display-settings-section .lightning-toggle-option,
.display-settings-section .balloon-toggle-option {
  margin-bottom: 6px;
}

.display-settings-section .flame-toggle-label,
.display-settings-section .lightning-toggle-label,
.display-settings-section .balloon-toggle-label {
  font-size: 11px;
  color: rgba(180, 200, 230, 0.8);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.display-settings-section .flame-presets,
.display-settings-section .lightning-presets,
.display-settings-section .balloon-presets {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.display-settings-section .flame-preset,
.display-settings-section .lightning-preset,
.display-settings-section .balloon-preset {
  flex: 1;
  min-width: 0;
  padding: 5px 4px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(100, 140, 200, 0.2);
  background: rgba(30, 45, 70, 0.5);
  color: rgba(200, 215, 240, 0.85);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  font-family: inherit;
}

.display-settings-section .flame-preset:hover,
.display-settings-section .lightning-preset:hover,
.display-settings-section .balloon-preset:hover {
  background: rgba(50, 80, 130, 0.6);
  border-color: rgba(120, 170, 240, 0.4);
}

.display-settings-section .flame-preset-default,
.display-settings-section .lightning-preset-default,
.display-settings-section .balloon-preset-default {
  font-size: 8px;
  opacity: 0.5;
  font-weight: 400;
}

/* ─── Beta Features Button & Panel ─── */

.beta-features-btn {
  position: fixed;
  bottom: 8em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(180, 100, 255, 0.3);
  cursor: pointer;
  z-index: 1000;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(90, 60, 130, 0.85), rgba(60, 40, 110, 0.8));
  font-family: inherit;
  line-height: 1;
  padding: 0;
}

.beta-features-btn:hover {
  opacity: 1;
  border-color: rgba(200, 160, 255, 0.9);
  box-shadow: 0 0 18px rgba(180, 130, 255, 0.7);
}

.beta-features-btn.active {
  background: linear-gradient(135deg, rgba(160, 100, 255, 0.95), rgba(120, 70, 230, 0.9));
  box-shadow: 0 0 22px rgba(180, 140, 255, 0.8), 0 0 10px rgba(130, 90, 220, 0.6);
  opacity: 1;
}

/* Beta Panel */
.beta-features-panel {
  position: fixed;
  width: 260px;
  min-width: 200px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(140, 100, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.beta-features-panel.hidden {
  display: none;
}

.beta-features-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(140, 100, 200, 0.2);
  cursor: move;
  user-select: none;
}

.beta-features-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f0ff;
  letter-spacing: 0.03em;
}

.beta-features-close {
  background: none;
  border: none;
  color: rgba(180, 160, 220, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.beta-features-close:hover {
  color: #e7f0ff;
}

.beta-features-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.beta-feature-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(140, 100, 200, 0.2);
  background: rgba(30, 25, 50, 0.6);
  color: rgba(200, 190, 230, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}

.beta-feature-btn:hover {
  background: rgba(50, 40, 80, 0.7);
  border-color: rgba(160, 120, 220, 0.4);
}

.beta-feature-btn.active {
  background: rgba(100, 60, 180, 0.35);
  border-color: rgba(160, 120, 255, 0.5);
  box-shadow: 0 0 10px rgba(140, 100, 255, 0.2);
  color: #e0d0ff;
}

.beta-feature-emoji {
  font-size: 20px;
  line-height: 1;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.beta-feature-hz-label {
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
}

.beta-feature-name {
  font-size: 13px;
}

/* Hide standalone buttons when nested under beta panel */
.beta-hidden {
  position: absolute !important;
  left: -9999px !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ─── Fragment Dismiss Buttons & Toast ─── */

.fragment-dismiss-bar {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  justify-content: center;
}

.fragment-dismiss-btn {
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(120,140,180,0.25);
  background: rgba(30,40,60,0.7);
  color: rgba(180,195,220,0.85);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.fragment-dismiss-btn:hover {
  background: rgba(50,60,90,0.8);
  border-color: rgba(140,160,200,0.4);
}

.fragment-snooze-btn:hover {
  color: #f0c060;
  border-color: rgba(240,192,96,0.35);
}

.fragment-disable-btn:hover {
  color: #ff8080;
  border-color: rgba(255,128,128,0.35);
}

.fragment-disable-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(25,20,45,0.92);
  color: rgba(200,190,230,0.9);
  border: 1px solid rgba(140,100,200,0.35);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.fragment-disable-toast.show {
  opacity: 1;
}

.fragment-disable-toast.hidden {
  display: none;
}

/* ─── Frequency Monitor: unified bar (Hz button + readout) ─── */

.frequency-monitor-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.frequency-monitor-content {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.frequency-monitor-content.compact {
  font-size: 11px;
  white-space: normal;
  max-width: 85vw;
  line-height: 1.3;
}

.frequency-monitor-content.compact .freq-item {
  display: inline-block;
  margin-bottom: 2px;
}

.frequency-monitor-content .freq-item {
  display: inline-block;
}

.frequency-monitor-content .freq-note {
  display: inline-block;
  min-width: 3.5ch;
  text-align: left;
  font-weight: 700;
}

.frequency-monitor-content .freq-hz {
  display: inline-block;
  text-align: right;
  margin-left: 0.2ch;
  font-weight: 300;
  opacity: 0.7;
}

/* ─── Tuning Panel (floating, draggable) ─── */

.tuning-action-panel {
  position: fixed;
  width: 500px;
  min-width: 340px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.tuning-action-panel.hidden {
  display: none;
}

.tuning-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}

.tuning-action-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.tuning-action-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.tuning-action-close:hover {
  color: #e7f6ff;
}

.tuning-action-body {
  padding: 14px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Re-style tuning sections inside the floating panel */
.tuning-action-body .tuning-section {
  padding: 0;
  margin: 0 0 12px 0;
  border: none;
  background: none;
}

.tuning-action-body .tuning-section:last-child {
  margin-bottom: 0;
}

.tuning-action-body .tuning-section-title {
  font-size: 18px;
  margin-bottom: 6px;
}

.tuning-action-body .tuning-instructions-text {
  font-size: 16px;
  margin-bottom: 8px;
}

/* Hide the footer exit button inside the panel (panel has its own close) */
.tuning-action-body .help-modal-footer {
  display: none;
}

/* Scale down elements for floating panel context */
.tuning-action-body .note-letter {
  font-size: 30px;
}

.tuning-action-body .note-octave {
  font-size: 15px;
  margin-bottom: 2px;
}

.tuning-action-body .string-label-number {
  font-size: 24px;
}

.tuning-action-body .string-label-text {
  font-size: 11px;
}

.tuning-action-body .tuning-string {
  padding: 6px 6px 8px;
  min-width: 46px;
  gap: 4px;
  background: rgba(15, 25, 45, 0.5);
  border-color: rgba(100, 140, 200, 0.25);
}

.tuning-action-body .string-note {
  padding: 6px 8px;
  background: rgba(10, 20, 40, 0.6);
  border-color: rgba(90, 155, 255, 0.3);
}

.tuning-action-body .tuning-strings-container {
  gap: 6px;
}

.tuning-action-body .tuning-preset-button {
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(15, 25, 45, 0.5);
  border-color: rgba(100, 140, 200, 0.3);
  color: #c8ddf0;
}

.tuning-action-body .tuning-preset-button.active {
  background: rgba(33, 150, 243, 0.3);
  border-color: rgba(33, 150, 243, 0.7);
  color: #e7f6ff;
}

.tuning-action-body .tuning-presets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px auto;
}

.tuning-action-body .manual-strum-controls button {
  font-size: 16px;
  padding: 8px 16px;
  background: rgba(15, 25, 45, 0.5);
  border-color: rgba(100, 140, 200, 0.3);
  box-shadow: none;
}

.tuning-action-body .tuning-section-title,
.tuning-action-body .tuning-instructions-text {
  color: #c8ddf0;
}

.tuning-action-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

/* ─── Tuning Action Button (above Frets) ─── */

.tuning-action-btn {
  position: fixed;
  bottom: 98.5em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
  font-family: inherit;
  line-height: 1;
  padding: 0;
}

.tuning-action-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}

.tuning-action-btn:active {
  transform: scale(0.95);
}

.tuning-action-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Dock Panel  —  macOS-style magnification sidebar
   ═══════════════════════════════════════════════════════════════ */

.dock-panel {
  position: fixed;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 5px;
  z-index: 1000;
  background: rgba(12, 22, 40, 0.45);
  border: 1px solid rgba(100, 150, 220, 0.08);
  border-radius: 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Subtle glow when cursor is close enough to trigger magnification */
.dock-panel.dock-magnifying {
  border-color: rgba(100, 170, 240, 0.14);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.28),
              0 0 40px rgba(80, 150, 240, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── Dock item wrapper — provides uniform layout dimensions ── */
.dock-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
  /* NO transition here — wrapper sizes are set by JS in rAF */
}

/* Override every button's fixed positioning when inside the dock.
 * Force identical box-model so the 50×50 base is truly uniform. */
.dock-item > * {
  position: static !important;
  bottom: auto !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
  width: 50px !important;
  height: 50px !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  border-width: 2px !important;
  margin: 0 !important;
  flex-shrink: 0;
  transform-origin: center center;
  transition: border-color 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease,
              opacity 0.3s ease;
}

.dock-item > *:active {
  filter: brightness(0.88);
}

/* Playback card labels */
.playback-card-label {
  width: 100%;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.45);
  padding: 0 2px 4px;
  margin: 0;
}

/* Make gear/toggle buttons match adjacent button height */
.playback-actions-body .strum-toggle,
.playback-actions-body .hum-toggle,
.playback-actions-body .bass-strum-toggle,
.playback-actions-body .arpeggio-toggle {
  align-self: stretch;
}

/* ═══════════════════════════════════════════════════
   SOUND ACTION BUTTON + PANEL
   ═══════════════════════════════════════════════════ */

.sound-action-btn {
  position: fixed;
  bottom: 10em;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  border: 2px solid transparent;
  background: linear-gradient(135deg, rgba(60, 80, 120, 0.85), rgba(40, 60, 100, 0.8));
  box-shadow: 0 4px 14px rgba(50, 140, 255, 0.35);
  cursor: pointer;
  z-index: 1000;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  transition: all 0.3s ease;
  opacity: 0.9;
}
.sound-action-btn:hover {
  opacity: 1;
  border-color: rgba(166, 244, 255, 0.9);
  box-shadow: 0 0 18px rgba(144, 230, 255, 0.7);
}
.sound-action-btn.active {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.95), rgba(60, 140, 255, 0.9));
  box-shadow: 0 0 22px rgba(140, 226, 255, 0.8), 0 0 10px rgba(90, 160, 255, 0.6);
  opacity: 1;
}

/* Panel */
.sound-action-panel {
  position: fixed;
  width: 260px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sound-action-panel.hidden { display: none; }

.sound-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}
.sound-action-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}
.sound-action-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.sound-action-close:hover { color: #e7f6ff; }

.sound-action-body {
  padding: 10px 14px;
  overflow-y: auto;
  max-height: 70vh;
}

/* Voice toggle (Single / Multi) — mirrors CAGED Major/Minor */
.sound-voice-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
}
.sound-voice-btn {
  flex: 1;
  padding: 5px 0;
  border: 1px solid rgba(100, 140, 200, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 215, 240, 0.5);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}
.sound-voice-btn:first-child {
  border-radius: 6px 0 0 6px;
  border-right: none;
}
.sound-voice-btn:last-child {
  border-radius: 0 6px 6px 0;
}
.sound-voice-btn.active {
  background: rgba(52, 152, 219, 0.3);
  border-color: rgba(52, 152, 219, 0.6);
  color: #fff;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.2);
}
.sound-voice-toggle.multi-active .sound-voice-btn.active {
  background: rgba(155, 89, 182, 0.3);
  border-color: rgba(155, 89, 182, 0.6);
  box-shadow: 0 0 8px rgba(155, 89, 182, 0.2);
}

/* Section labels */
.sound-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(200, 215, 240, 0.4);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Waveform grid */
.sound-wave-section {
  margin-bottom: 12px;
}
.sound-wave-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.sound-wave-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sound-wave-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: #a0aec0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px;
}
.sound-wave-btn:hover {
  background: linear-gradient(135deg, #5a6578 0%, #3d4758 100%);
  border-color: rgba(255, 255, 255, 0.3);
  color: #e2e8f0;
}
.sound-wave-btn.active {
  background: linear-gradient(135deg, #2b4a6f 0%, #1a365d 100%);
  border-color: rgba(99, 179, 237, 0.6);
  color: #90cdf4;
  box-shadow: 0 0 10px rgba(99, 179, 237, 0.3);
}
.sound-wave-symbol {
  font-size: 16px;
  line-height: 1;
}
.sound-wave-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0.7;
}
.sound-blend-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.sound-blend-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #90cdf4;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
.sound-blend-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #90cdf4;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

/* Sample section */
.sound-sample-section {
  border-top: 1px solid rgba(100, 140, 200, 0.15);
  padding-top: 10px;
}

/* Sample Enabled/Disabled toggle — mirrors voice toggle */
.sound-sample-mode-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
}
.sound-sample-mode-btn {
  flex: 1;
  padding: 5px 0;
  border: 1px solid rgba(100, 140, 200, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(200, 215, 240, 0.5);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}
.sound-sample-mode-btn:first-child {
  border-radius: 6px 0 0 6px;
  border-right: none;
}
.sound-sample-mode-btn:last-child {
  border-radius: 0 6px 6px 0;
}
.sound-sample-mode-btn.active {
  background: rgba(52, 152, 219, 0.3);
  border-color: rgba(52, 152, 219, 0.6);
  color: #fff;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.2);
}
.sound-sample-mode-toggle.enabled-active .sound-sample-mode-btn.active {
  background: rgba(72, 187, 120, 0.2);
  border-color: rgba(72, 187, 120, 0.6);
  box-shadow: 0 0 8px rgba(72, 187, 120, 0.2);
  color: #9ae6b4;
}

/* Collapsible details */
.sound-sample-details {
  transition: all 0.2s ease;
}
.sound-sample-details.hidden {
  display: none;
}

/* Current sample display */
.sound-current-sample {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.sound-current-thumb {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  filter: brightness(0.9);
}
.sound-current-label {
  font-size: 11px;
  color: rgba(200, 215, 240, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Library cards grid */
.sound-library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}
.sound-library-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid rgba(100, 140, 200, 0.15);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sound-library-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(100, 140, 200, 0.35);
}
.sound-library-card.active {
  background: rgba(72, 187, 120, 0.15);
  border-color: rgba(72, 187, 120, 0.5);
  box-shadow: 0 0 8px rgba(72, 187, 120, 0.2);
}
.sound-library-thumb {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0.85);
}
.sound-library-card.active .sound-library-thumb {
  filter: brightness(1.1);
}
.sound-library-icon {
  font-size: 20px;
  line-height: 1;
}
.sound-library-name {
  font-size: 8px;
  font-weight: 600;
  color: rgba(200, 215, 240, 0.55);
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.2px;
}
.sound-library-card.active .sound-library-name {
  color: #9ae6b4;
}

/* Sustain row */
.sound-sustain-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.sound-sustain-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(200, 215, 240, 0.5);
  flex-shrink: 0;
}
.sound-sustain-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.sound-sustain-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ae6b4;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
.sound-sustain-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ae6b4;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
.sound-sustain-value {
  font-size: 10px;
  color: rgba(200, 215, 240, 0.6);
  min-width: 32px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════
   VOLUME WIDGET — Bottom-right speaker + slider + VU
   ═══════════════════════════════════════════════════ */

.volume-widget {
  position: fixed;
  bottom: 9px;
  right: 18px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.volume-widget:hover {
  opacity: 1;
}

/* Slider area — VU overlaid on slider, centered over speaker */
.vw-slider-area {
  position: relative;
  width: 22px;
  height: 120px;
  /* Center over the speaker icon in the bottom row */
  margin-right: 5px;
}

/* VU Meter — sits behind the slider as a glowing fill */
.vw-vu-meter {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 112px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  z-index: 0;
}
.vw-vu-fill {
  width: 100%;
  height: 0%;
  border-radius: 5px;
  background: linear-gradient(to top, #22c55e, #86efac);
  transition: height 0.05s ease-out;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Vertical slider — overlaid on top of VU meter */
.vw-slider-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 120px;
  z-index: 1;
}
.vw-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 112px;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  transform: rotate(-90deg);
  transform-origin: top left;
  position: absolute;
  top: 113px;
  left: 3px;
}
.vw-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c4edff, #4cb8ff);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.6), 0 0 20px rgba(80, 180, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.vw-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 16px rgba(100, 200, 255, 0.8), 0 0 28px rgba(80, 180, 255, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: scale(1.15);
}
.vw-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c4edff, #4cb8ff);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.6), 0 0 20px rgba(80, 180, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Bottom row — mute on left, speaker on right, vertically centered */
.vw-bottom-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  align-self: flex-end;
}

/* Speaker icon */
.vw-speaker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  cursor: default;
}
.vw-speaker-icon {
  font-size: 28px;
  line-height: 1;
  filter: grayscale(0.3);
  transition: filter 0.2s ease;
}
.volume-widget:hover .vw-speaker-icon {
  filter: grayscale(0);
}
.volume-widget.muted .vw-speaker-icon {
  filter: grayscale(0.6) brightness(0.7);
}
.vw-speaker-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(200, 215, 240, 0.4);
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.volume-widget:hover .vw-speaker-label {
  color: rgba(200, 215, 240, 0.8);
}

/* MUTE button — styled like BRAIN button but red */
.vw-mute-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid rgba(200, 80, 80, 0.3);
  background: linear-gradient(135deg, #5c2a2a 0%, #3d1c1c 100%);
  color: rgba(240, 160, 160, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(60, 20, 20, 0.35);
  text-transform: uppercase;
}
.vw-mute-icon {
  font-size: 10px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.vw-mute-label {
  line-height: 1;
}
.vw-mute-btn:hover {
  background: linear-gradient(135deg, #7a3333 0%, #5c2525 100%);
  border-color: rgba(255, 120, 120, 0.55);
  color: rgba(255, 200, 200, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 12px rgba(80, 20, 20, 0.4);
}
.vw-mute-btn:hover .vw-mute-icon {
  opacity: 1;
}
.vw-mute-btn.active {
  background: linear-gradient(135deg, #c0392b 0%, #962d22 100%);
  border-color: rgba(255, 130, 110, 0.6);
  color: #fff;
  box-shadow: 0 0 10px rgba(192, 57, 43, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.vw-mute-btn.active .vw-mute-icon {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════
   HUM SETTINGS FLOATING PANEL
   ═══════════════════════════════════════════════════ */

.hum-settings-panel {
  position: fixed;
  width: 270px; /* overridden by JS when docked below Playback Actions */
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(34, 201, 119, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 20px rgba(34, 201, 119, 0.08);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hum-settings-panel.hidden { display: none; }

.hum-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(34, 201, 119, 0.15);
  cursor: move;
  user-select: none;
}
.hum-settings-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}
.hum-settings-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.hum-settings-close:hover { color: #e7f6ff; }

.hum-settings-body {
  padding: 12px 14px;
}

.hum-settings-desc {
  font-size: 13px;
  color: rgba(200, 220, 240, 0.6);
  line-height: 1.4;
  margin-bottom: 10px;
}

.hum-settings-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.hum-settings-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(200, 215, 240, 0.5);
  flex-shrink: 0;
  white-space: nowrap;
}
.hum-settings-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(34, 201, 119, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: #22c977;
}
.hum-settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c977;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(34, 201, 119, 0.4);
}
.hum-settings-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c977;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
.hum-settings-value {
  font-size: 13px;
  color: rgba(200, 215, 240, 0.7);
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Preset buttons */
.hum-settings-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.hum-settings-preset-btn {
  padding: 7px 6px;
  border-radius: 6px;
  border: 1px solid rgba(34, 201, 119, 0.25);
  background: rgba(34, 201, 119, 0.08);
  color: rgba(200, 220, 240, 0.7);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.hum-settings-preset-btn:hover {
  background: rgba(34, 201, 119, 0.18);
  border-color: rgba(34, 201, 119, 0.5);
  color: #e7f6ff;
}
.hum-settings-preset-btn.active {
  background: rgba(34, 201, 119, 0.25);
  border-color: rgba(34, 201, 119, 0.7);
  color: #fff;
  box-shadow: 0 0 8px rgba(34, 201, 119, 0.25);
}

.hum-settings-hint {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(200, 215, 240, 0.35);
  text-align: center;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* Playback Settings Panels (Strum, Bass Strum, Arpeggio)                */
/* ═══════════════════════════════════════════════════════════════════════ */

.playback-settings-panel {
  position: fixed;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.playback-settings-panel.hidden { display: none; }

.pb-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}
.pb-settings-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.pb-settings-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.pb-settings-close:hover { color: #e7f6ff; }

.pb-settings-body {
  padding: 10px 14px;
}

.pb-settings-desc {
  font-size: 12px;
  color: rgba(200, 215, 240, 0.55);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Mode toggle (Simple / ADV) */
.pb-settings-mode-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  background: rgba(20, 35, 60, 0.6);
  border-radius: 8px;
  padding: 3px;
}
.pb-mode-btn {
  flex: 1;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(180, 210, 240, 0.5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pb-mode-btn:hover {
  color: rgba(180, 210, 240, 0.8);
  background: rgba(60, 100, 160, 0.15);
}
.pb-mode-btn.active {
  background: rgba(60, 120, 200, 0.3);
  color: #e7f6ff;
  box-shadow: 0 0 6px rgba(60, 120, 200, 0.2);
}

/* Option buttons grid */
.pb-settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pb-option-btn {
  padding: 6px 12px;
  border: 1px solid rgba(100, 140, 200, 0.2);
  border-radius: 8px;
  background: rgba(20, 35, 60, 0.5);
  color: rgba(180, 210, 240, 0.7);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.pb-option-btn:hover {
  background: rgba(60, 120, 200, 0.15);
  border-color: rgba(100, 160, 230, 0.4);
  color: #e7f6ff;
}
.pb-option-btn.active {
  background: rgba(60, 140, 220, 0.25);
  border-color: rgba(100, 180, 255, 0.6);
  color: #fff;
  box-shadow: 0 0 8px rgba(60, 140, 220, 0.25);
}

/* Strum simple grid: 4 per row */
.strum-simple-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

/* ADV pattern buttons: full-width */
.pb-pattern-btn {
  flex: 1 1 calc(50% - 3px);
  min-width: 0;
}

/* Bass strum grid: 2 per row */
.bass-strum-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

/* Arpeggio grid: 3 side by side */
.arpeggio-grid .pb-option-btn {
  flex: 1;
  min-width: 0;
}

.pb-settings-hint {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(200, 215, 240, 0.35);
  text-align: center;
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* Hum Settings — Temperament toggle                                     */
/* ═══════════════════════════════════════════════════════════════════════ */

.hum-settings-divider {
  height: 1px;
  background: rgba(34, 201, 119, 0.15);
  margin: 12px 0;
}

.hum-settings-temperament-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c8ddf0;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 4px;
}
.hum-settings-temperament-toggle input[type="checkbox"] {
  accent-color: #22c977;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.hum-settings-temperament-desc {
  font-size: 11px;
  color: rgba(200, 215, 240, 0.4);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* Temperament Panel (auto-spawns during hum)                            */
/* ═══════════════════════════════════════════════════════════════════════ */

.temperament-panel {
  position: fixed;
  width: 200px;
  background: rgba(10, 18, 32, 0.96);
  border: 1px solid rgba(100, 140, 200, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.temperament-panel.hidden { display: none; }

.temperament-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.2);
  cursor: move;
  user-select: none;
}
.temperament-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e7f6ff;
  letter-spacing: 0.03em;
}

.temperament-header-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.temperament-help {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(140, 180, 220, 0.4);
  background: rgba(30, 50, 80, 0.6);
  color: rgba(180, 210, 240, 0.7);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
}
.temperament-help:hover {
  border-color: rgba(140, 200, 255, 0.7);
  color: #e7f6ff;
  background: rgba(50, 90, 140, 0.5);
}

.temperament-close {
  background: none;
  border: none;
  color: rgba(180, 210, 240, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.temperament-close:hover { color: #e7f6ff; }

.temperament-body {
  padding: 10px 12px;
}

/* ET / JI toggle */
.temperament-toggle-row {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  background: rgba(20, 35, 60, 0.6);
  border-radius: 8px;
  padding: 3px;
}
.temperament-choice {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(180, 210, 240, 0.5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.temperament-choice:hover {
  color: rgba(180, 210, 240, 0.8);
  background: rgba(60, 100, 160, 0.15);
}
.temperament-choice.active {
  background: rgba(80, 200, 120, 0.25);
  color: #e7f6ff;
  box-shadow: 0 0 6px rgba(80, 200, 120, 0.2);
}

/* Key wheel container */
.temperament-wheel-container {
  margin: 8px 0;
}

/* Root label */
.temperament-root-label {
  text-align: center;
  font-size: 12px;
  color: rgba(200, 220, 240, 0.6);
  margin-bottom: 6px;
}
.temperament-root-value {
  font-weight: 700;
  color: rgba(80, 200, 120, 0.9);
  font-size: 13px;
}
.temperament-root-source {
  font-size: 10px;
  color: rgba(200, 215, 240, 0.35);
  margin-left: 4px;
}

/* Hint text */
.temperament-hint {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(200, 215, 240, 0.3);
  text-align: center;
}
