:root {
  --bg: #0b0f14;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-hover: rgba(255, 255, 255, 0.08);
  --panel-active: rgba(255, 255, 255, 0.12);
  --stroke: rgba(255, 255, 255, 0.1);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #7cc4ff;
  --accent2: #9bffcf;
  --accent-pink: #f472b6;
  --root-color: #f59e0b;
  --chord-color: #3b82f6;
  --scale-color: #10b981;
  --muted-color: #475569;
  
  /* Degree Colors */
  --degree-root: #f59e0b;
  --degree-3rd: #10b981;
  --degree-5th: #8b5cf6;
  --degree-7th: #f472b6;
  --degree-other: #3b82f6;
  
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --radius: 14px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 196, 255, 0.08), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(155, 255, 207, 0.06), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

.mainContent {
  max-width: 1360px;
  margin: 24px auto 60px;
  padding: 0 18px;
}

h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

h3 {
  font-size: 1.05rem;
  margin: 0;
  color: #fff;
}

p {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.infoCallout {
  background: rgba(124, 196, 255, 0.06);
  border: 1px solid rgba(124, 196, 255, 0.15);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.infoCallout .calloutHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--accent);
}

.infoCallout p {
  color: var(--text);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.infoCallout p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* Autocomplete search input in visualHeader */
.visualHeader {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 8px 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(11, 15, 20, 0.95), rgba(11, 15, 20, 0.85));
  border-bottom: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  box-sizing: border-box;
}

.rightHead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

#searchForm {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  width: 100%;
}

.searchWrap--autocomplete {
  position: relative;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.autocompleteShell {
  position: relative;
  width: 100%;
}

#tuneSearchInput {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  color: #fff;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

#tuneSearchInput:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.15);
}

.searchChooserPanel {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.searchChooserPanel label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}


.leftHead {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.leftHead .titleblock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.leftHead h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.leftHead .mutedLine {
  margin: 2px 0 0 0 !important;
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.visualHeader .burgerWrap {
  position: relative;
  display: flex;
  align-items: center;
}

@media (max-width: 820px) {
  .leftHead .mutedLine {
    display: none !important;
  }
}

.autocompleteBox {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 20, 28, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  backdrop-filter: blur(10px);
}

.autocompleteItem {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  color: #e2e8f0;
  cursor: pointer;
  display: block;
  transition: background 0.15s ease;
}

.autocompleteItem:hover,
.autocompleteItem.is-active {
  background: rgba(124, 196, 255, 0.15);
}

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

.autocompleteTitle {
  font-weight: 600;
  font-size: 0.95rem;
}

.autocompleteType {
  font-size: 0.75rem;
  background: rgba(124, 196, 255, 0.2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.autocompleteMeta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.autocompleteEmpty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Playback & Fretboard Grid Layout */
.visualizerGrid {
  display: grid;
  grid-template-columns: 1.2fr 16px 1fr;
  gap: 0;
  margin-bottom: 24px;
  align-items: start;
  position: relative;
}

/* Splitter styling */
.gridSplitter {
  grid-column: 2;
  width: 16px;
  height: 100%;
  min-height: 400px;
  align-self: stretch;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.gridSplitter:hover, .gridSplitter.is-dragging {
  background-color: rgba(255, 255, 255, 0.03);
}

.gridSplitterLine {
  width: 2px;
  height: 40px;
  background-color: var(--stroke);
  border-radius: 1px;
  transition: all 0.2s ease;
}

.gridSplitter:hover .gridSplitterLine, .gridSplitter.is-dragging .gridSplitterLine {
  height: 80px;
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* During dragging, disable selection across the page and change cursor */
body.is-resizing {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

@media (max-width: 1100px) {
  .visualizerGrid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .gridSplitter {
    display: none;
  }
}

/* Settings selector area */
.settingChooserPanel {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settingChooserPanel label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.settingSelect {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.92rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settingSelect:focus {
  border-color: var(--accent);
}

select option {
  background: #161a22;
  /* Matches var(--panel) */
  color: #fff;
}

/* Paper container for sheet music */
.paperCard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paperWrap {
  background: #fff;
  border-radius: 8px;
  padding: 2px 16px 16px;
  overflow-x: auto;
}

.inlineAudioWrap {
  margin-top: 10px;
}

/* Fretboard Column styling */
.fretboardPanel {
  position: sticky;
  top: 24px;
}

.fretboardTitleRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.fretboardTitleRow h2 {
  margin: 0;
}

/* Controls inside fretboard panel */
.fretboardControls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--stroke);
}

.fretboardControls .controlItem {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 120px;
}

.fretboardControls label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.fretboardControls select {
  background: var(--bg);
  border: 1px solid var(--stroke);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.fretboardControls .controlItem--fullWidth {
  flex: 1 1 100%;
}

.voicingToggleGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.voicingToggleBtn, .layoutToggleBtn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.voicingToggleBtn:hover, .layoutToggleBtn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.voicingToggleBtn.active, .layoutToggleBtn.active {
  background: rgba(124, 196, 255, 0.16);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(124, 196, 255, 0.12);
}

/* Custom Tooltip Balloons for Voicing Style Buttons */
.voicingToggleBtn[data-tooltip] {
  position: relative;
}

.voicingToggleBtn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f1319;
  border: 1px solid rgba(124, 196, 255, 0.3);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: normal;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 220px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.voicingToggleBtn[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Fretboard SVG Styling */
.guitarContainer {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  padding: 18px 10px 10px;
  overflow-x: auto;
  margin-bottom: 16px;
  position: relative;
}

/* SVG D3 Elements */
.fretboard-bg {
  fill: #151a22;
  rx: 4px;
  ry: 4px;
}

.fretboard-nut {
  stroke: #8e9bb0;
  stroke-width: 6px;
}

.fret-line {
  stroke: #475569;
  stroke-width: 2.2px;
}

.string-line {
  stroke: #a0aec0;
  opacity: 0.75;
}

.fret-marker {
  fill: #2d3748;
  opacity: 0.65;
}

.fretboard-note-marker {
  cursor: pointer;
}

.fretboard-note-marker circle {
  transform-origin: center;
  transform-box: fill-box;
  transition: transform 0.15s ease;
}

.fretboard-note-marker:hover circle {
  transform: scale(1.25);
}

.fretboard-label {
  text-anchor: middle;
  dominant-baseline: middle;
  font-weight: bold;
  font-family: monospace;
}

/* Legend items */
.wheelLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 20px;
}

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

.legendColor {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.rootColor {
  background: var(--root-color);
  border: 1px solid #fff;
}

.chordColor {
  background: var(--chord-color);
  border: 1px solid #fff;
}

.scaleColor {
  background: rgba(16, 185, 129, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.65);
}

.playingColor {
  background: var(--accent-pink);
  border: 1px solid #fff;
  box-shadow: 0 0 8px var(--accent-pink);
}

.degreeRootColor {
  background: var(--degree-root);
  border: 1px solid #fff;
}

.degree3rdColor {
  background: var(--degree-3rd);
  border: 1px solid #fff;
}

.degree5thColor {
  background: var(--degree-5th);
  border: 1px solid #fff;
}

.degree7thColor {
  background: var(--degree-7th);
  border: 1px solid #fff;
}

.degreeOtherColor {
  background: var(--degree-other);
  border: 1px solid #fff;
}

.mutedColor {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: var(--muted);
}

/* Current Playback Details Callout */
.activeInfoPanel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activeInfoTitle {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0;
}

.activeInfoContent {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.activeInfoContent .notesList {
  font-size: 0.95rem;
  font-weight: normal;
  color: var(--muted);
}

.activeInfoDesc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Education Section */
.educationalPanel {
  margin-top: 24px;
}

.eduGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.eduCard {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 20px;
}

.eduCard h3 {
  margin-bottom: 10px;
  color: var(--accent);
}

.eduCard p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Status message */
.statusContainer {
  margin-bottom: 16px;
}

.statusMessage {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  font-size: 0.9rem;
}

.statusMessage.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Mini buttons in setting list */
.settingHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.settingMetaText {
  font-size: 0.82rem;
  color: var(--muted);
}

/* abcjs playback highlights */
.abcjs-note_selected {
  fill: var(--accent-pink) !important;
  stroke: var(--accent-pink) !important;
}

.abcjs-cursor {
  stroke: var(--accent-pink) !important;
  stroke-width: 2.5px;
}

/* Force ABC notation to render dark and fully opaque on white paper */
.paperWrap svg {
  display: block;
}

.paperWrap .abcjs-container,
.paperWrap .abcjs-svg,
.paperWrap svg,
.paperWrap svg * {
  opacity: 1 !important;
}

.paperWrap .abcjs-note,
.paperWrap .abcjs-rest,
.paperWrap .abcjs-staff,
.paperWrap .abcjs-bar,
.paperWrap .abcjs-ledger,
.paperWrap .abcjs-clef,
.paperWrap .abcjs-key-signature,
.paperWrap .abcjs-time-signature,
.paperWrap .abcjs-decoration,
.paperWrap .abcjs-slur,
.paperWrap .abcjs-tie,
.paperWrap .abcjs-beam-elem,
.paperWrap .abcjs-triplet,
.paperWrap .abcjs-dynamic,
.paperWrap .abcjs-part,
.paperWrap .abcjs-lyric,
.paperWrap .abcjs-chord,
.paperWrap .abcjs-tempo,
.paperWrap .abcjs-title,
.paperWrap .abcjs-text,
.paperWrap path,
.paperWrap line,
.paperWrap polyline,
.paperWrap polygon,
.paperWrap ellipse,
.paperWrap circle,
.paperWrap rect,
.paperWrap text,
.paperWrap tspan {
  fill: #111 !important;
  stroke: #111 !important;
  color: #111 !important;
  opacity: 1 !important;
}

/* Ensure playback highlight and cursor overrides are preserved */
.paperWrap .abcjs-note_selected,
.paperWrap .abcjs-note_selected * {
  fill: var(--accent-pink) !important;
  stroke: var(--accent-pink) !important;
}

.paperWrap .abcjs-cursor {
  stroke: var(--accent-pink) !important;
  stroke-width: 2.5px !important;
  opacity: 1 !important;
}

/* Interactive Chord Shortcuts Container */
.chordShortcutsContainer {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

.shortcutsLabel {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.shortcutsList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chordShortcutBtn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chordShortcutBtn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.chordShortcutBtn:active {
  transform: translateY(1px);
}

.chordShortcutBtn.activeShortcut {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.chordShortcutCard {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 6px 8px 8px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chordShortcutCard:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.chordShortcutCard.activeShortcut {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.chordShortcutCard .cardTitle {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

/* Top Row Mini Chord Diagrams */
.miniChordDiagramSVG {
  display: block;
  overflow: visible;
}

.miniChordDiagramSVG text {
  fill: var(--text) !important;
  stroke: none !important;
}

.miniChordDiagramSVG line {
  stroke: rgba(255, 255, 255, 0.3) !important;
}

.miniChordDiagramSVG .chord-nut-line {
  stroke: rgba(255, 255, 255, 0.85) !important;
  stroke-width: 2.5px !important;
}

.miniChordDiagramSVG circle.chord-fret-dot {
  fill: #3b82f6 !important;
  stroke: #ffffff !important;
  stroke-width: 1px !important;
}

.miniChordDiagramSVG circle.chord-root-dot {
  fill: #f59e0b !important;
  stroke: #ffffff !important;
  stroke-width: 1px !important;
}

.miniChordDiagramSVG text.chord-open-mark {
  fill: #34d399 !important;
  stroke: none !important;
}

.miniChordDiagramSVG text.chord-muted-mark {
  fill: #94a3b8 !important;
  stroke: none !important;
}

/* Staff Sheet Music Chord Diagrams */
.paperWrap .staff-chord-diagram {
  overflow: visible;
}

.paperWrap .staff-chord-diagram text {
  fill: #1e293b !important;
  stroke: none !important;
  font-family: inherit;
}

.paperWrap .staff-chord-diagram line {
  stroke: #475569 !important;
}

.paperWrap .staff-chord-diagram .chord-nut-line {
  stroke: #0f172a !important;
  stroke-width: 2px !important;
}

.paperWrap .staff-chord-diagram circle.chord-fret-dot,
.paperWrap .staff-chord-diagram circle.chord-root-dot {
  fill: #000000 !important;
  stroke: #000000 !important;
  stroke-width: 0.5px !important;
}

.paperWrap .staff-chord-diagram text.chord-open-mark {
  fill: #000000 !important;
  stroke: none !important;
}

.paperWrap .staff-chord-diagram text.chord-muted-mark {
  fill: #000000 !important;
  stroke: none !important;
}

/* Top Score Chord Row under Title */
.paperWrap .top-score-chord-row-group {
  overflow: visible;
}

.paperWrap .top-score-chord-bg {
  fill: #f8fafc !important;
  stroke: #cbd5e1 !important;
  stroke-width: 1px !important;
  transition: all 0.2s ease;
}

.paperWrap .top-score-chord-card:hover .top-score-chord-bg {
  fill: #eff6ff !important;
  stroke: #93c5fd !important;
}

.paperWrap .top-score-chord-card.active-score-chord .top-score-chord-bg {
  fill: #dbeafe !important;
  stroke: #2563eb !important;
  stroke-width: 1.5px !important;
}

.paperWrap .top-score-chord-title {
  fill: #0f172a !important;
  stroke: none !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  font-family: Inter, system-ui, sans-serif !important;
}

.paperWrap .top-score-chord-card.active-score-chord .top-score-chord-title {
  fill: #1d4ed8 !important;
}

.chordShortcutBtn.activeShortcut {
  background: var(--chord-color);
  border-color: var(--chord-color);
  color: #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Tabs for Notation Panel */
.panelTabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 8px;
}

.panelTabsLeft {
  display: flex;
  gap: 8px;
}

.panelTabsRight {
  display: flex;
  align-items: center;
}

.panelTab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.panelTab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.panelTab.active {
  color: var(--accent);
  background: rgba(124, 196, 255, 0.1);
}

/* ABC Editor */
.abcEditorWrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.abcEditorWrap label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

#abcTextarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--stroke);
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#abcTextarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.15);
}

.abcEditorActions {
  display: flex;
  gap: 10px;
}

.primaryBtn, .secondaryBtn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primaryBtn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #0b0f14;
}

.primaryBtn:hover {
  background: #a3d4ff;
  border-color: #a3d4ff;
  transform: translateY(-1px);
}

.secondaryBtn {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text);
}

.secondaryBtn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.primaryBtn:active, .secondaryBtn:active {
  transform: translateY(1px);
}

.abcError {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: monospace;
}

/* Custom range slider styling */
#measuresPerLineSlider,
.fretboardControls input[type="range"],
.panelTabsRight input[type="range"],
#measuresPerLineControl input[type="range"],
.recordingControlsGrid input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin-top: 6px;
  margin-bottom: 6px;
}

#measuresPerLineSlider::-webkit-slider-runnable-track,
.fretboardControls input[type="range"]::-webkit-slider-runnable-track,
.panelTabsRight input[type="range"]::-webkit-slider-runnable-track,
#measuresPerLineControl input[type="range"]::-webkit-slider-runnable-track,
.recordingControlsGrid input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

#measuresPerLineSlider::-moz-range-track,
.fretboardControls input[type="range"]::-moz-range-track,
.panelTabsRight input[type="range"]::-moz-range-track,
#measuresPerLineControl input[type="range"]::-moz-range-track,
.recordingControlsGrid input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

#measuresPerLineSlider::-webkit-slider-thumb,
.fretboardControls input[type="range"]::-webkit-slider-thumb,
.panelTabsRight input[type="range"]::-webkit-slider-thumb,
#measuresPerLineControl input[type="range"]::-webkit-slider-thumb,
.recordingControlsGrid input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
  margin-top: -5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, background-color 0.1s ease;
}

#measuresPerLineSlider::-webkit-slider-thumb:hover,
.fretboardControls input[type="range"]::-webkit-slider-thumb:hover,
.panelTabsRight input[type="range"]::-webkit-slider-thumb:hover,
#measuresPerLineControl input[type="range"]::-webkit-slider-thumb:hover,
.recordingControlsGrid input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: #a3d4ff;
}

#measuresPerLineSlider::-moz-range-thumb,
.fretboardControls input[type="range"]::-moz-range-thumb,
.panelTabsRight input[type="range"]::-moz-range-thumb,
#measuresPerLineControl input[type="range"]::-moz-range-thumb,
.recordingControlsGrid input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, background-color 0.1s ease;
}

#measuresPerLineSlider::-moz-range-thumb:hover,
.fretboardControls input[type="range"]::-moz-range-thumb:hover,
.panelTabsRight input[type="range"]::-moz-range-thumb:hover,
#measuresPerLineControl input[type="range"]::-moz-range-thumb:hover,
.recordingControlsGrid input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.25);
  background: #a3d4ff;
}

/* External Tools Links */
.sessionIconLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  vertical-align: middle;
}

.sessionIconLink:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.sessionIconLink img {
  width: 18px;
  height: 18px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.sessionIconLink:hover img {
  opacity: 1;
}

/* ==========================================================================
   Player & Fretboard Only (Clean Recording Layout) Mode
   ========================================================================== */

/* Header recording button visual state */
#headerRecordingToggle.active {
  color: var(--accent);
  background: rgba(124, 196, 255, 0.16);
  box-shadow: 0 0 10px rgba(124, 196, 255, 0.12);
  border-color: var(--accent);
}

/* Hide everything we don't want when in recording mode */
body.recording-mode .visualHeader,
body.recording-mode .educationalPanel,
body.recording-mode .footer,
body.recording-mode #visualizerGrid,
body.recording-mode #fretboardDisplayPanel {
  display: none !important;
}

/* Make sure main content container has clean margins/padding */
body.recording-mode .mainContent {
  margin-top: 20px;
  margin-bottom: 20px;
  max-width: 1200px;
}

/* Recording Mode Container styling */
.recordingModeContainer {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Controls section styled horizontally */
.recordingControlsPanel {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--stroke);
  padding: 16px 20px;
}

.recordingControlsGrid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

/* Search panel & Setting panel stacked on separate rows in Recording Mode */
body.recording-mode .searchChooserPanel,
body.recording-mode .settingChooserPanel {
  margin-bottom: 0 !important;
  flex: 1 1 100% !important;
  width: 100%;
}

/* Fretboard controls panel inside recording grid */
body.recording-mode .fretboardControls {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

/* Dropdown/slider control items inside recording mode */
body.recording-mode .fretboardControls .controlItem {
  flex: 1 1 170px;
  min-width: 140px;
}

/* Full width Voicing control */
body.recording-mode .fretboardControls .controlItem--fullWidth {
  flex: 1 1 100% !important;
  margin-top: 4px;
}

body.recording-mode #guitarVoicingToggleGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Hide Position control and Recording Layout button in Recording mode */
body.recording-mode #fretboardPositionControl,
body.recording-mode #recordingModeControl {
  display: none !important;
}

/* Styling for Measures per Line control inside recording mode */
body.recording-mode #measuresPerLineControl {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 170px;
  min-width: 140px;
}

body.recording-mode #measuresPerLineLabel {
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: var(--muted) !important;
  margin-right: 0 !important;
  line-height: 1.2;
}

body.recording-mode #measuresPerLineSlider {
  width: 100% !important;
  height: 24px !important;
  margin: 2px 0 !important;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

body.recording-mode #measuresPerLineSlider::-webkit-slider-runnable-track {
  width: 100% !important;
  height: 6px !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 4px !important;
}

body.recording-mode #measuresPerLineSlider::-moz-range-track {
  width: 100% !important;
  height: 6px !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 4px !important;
}

body.recording-mode #measuresPerLineSlider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: var(--accent) !important;
  border: 2px solid #fff !important;
  cursor: pointer !important;
  margin-top: -5px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

body.recording-mode #measuresPerLineSlider::-moz-range-thumb {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: var(--accent) !important;
  border: 2px solid #fff !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

/* Styles for Player and Fretboard Container */
.recordingPlayerPanel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
}

/* Keep sheet music paper neat and clean */
body.recording-mode .paperWrap {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  margin-bottom: 12px;
}

/* When clean recording is active, hide the controls panel, audio wrap, and recording player header */
body.recording-clean .recordingControlsPanel,
body.recording-clean #audioWrap,
body.recording-clean .recordingPlayerHeader {
  display: none !important;
}

/* Subtle transparent full-screen background image overlay for Recording Mode */
body.recording-mode {
  position: relative;
}

body.recording-mode::before {
  content: "";
  position: fixed;
  top: -15px;
  left: -15px;
  width: calc(100vw + 30px);
  height: calc(100vh + 30px);
  background-image: url("/assets/img/YouTubeTitleImage.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.20;
  filter: blur(2px) brightness(0.35);
  pointer-events: none;
  z-index: 0;
}

body.recording-mode > * {
  position: relative;
  z-index: 1;
}