body {
      text-align: center;
      margin: 20px 0; /* Remove horizontal margins */
      font-family: sans-serif;
      min-width: 800px; /* Minimum width to prevent layout breaking */
    }
    .main-container {
      display: flex;
      gap: 20px;
      margin: 0;
      padding: 0 20px;
      position: relative;
      justify-content: flex-start;
      min-width: 800px;
      box-sizing: border-box;
    }
    #captured-chords-container {
      order: 1;
      flex: 1 1 auto;
      min-width: 300px;
    }
    .settings-panel {
      position: sticky;
      top: 20px;
      left: 20px;
      flex: 0 0 280px; /* Fixed width, no growing or shrinking */
      width: 280px;
      background: #f8f8f8;
      padding: 15px;
      border-radius: 8px;
      border: 1px solid #ddd;
      text-align: left;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
      order: 2;
      max-height: 80vh; /* Add max-height to enable scrolling */
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .settings-panel-scroll {
      overflow-y: auto;
      margin-top: 10px;
      padding-right: 5px;
      flex: 1 1 auto;
      min-height: 0;
    }
    #fretboard-container {
      position: relative;
      display: inline-block;
      margin: 0;
    }
    #fretboard-img {
      display: block;
      width: 165px;
      height: 818px;
    }
    #dot-layer {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      pointer-events: none; /* Allow clicks to pass through layer but not dots */
    }
    .dot {
      position: absolute;
      width: 30px;
      height: 30px;
      background-color: black;
      border-radius: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: bold;
      font-size: 12px;
      overflow: hidden;
      pointer-events: auto; /* This enables clicks on the dots */
      cursor: pointer; /* Show pointer cursor on dots */
    }
    .dot.fading {
      pointer-events: none;
      z-index: 1;
    }
    .dot.previous-chord {
      z-index: 5;
    }
    .dot.playback-dot {
      background-color: #0b63ce;
      box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 12px rgba(11, 99, 206, 0.7);
      pointer-events: none;
      z-index: 20;
    }
    .dot.borrowed-ghost {
      background-color: rgba(0, 0, 0, 0.12);
      border: 2px dashed rgba(0, 0, 0, 0.6);
      color: rgba(0, 0, 0, 0.6);
      pointer-events: none;
      z-index: 2;
    }
    #notation-container {
      margin-top: 12px;
      width: 100%;
      max-width: 100%;
      min-height: 140px;
      height: 140px;
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 5px;
      overflow: hidden;
      display: block;
      position: relative; /* Ensure proper positioning */
    }
    #notation-canvas {
      width: 100%;
      height: 140px;
      min-height: 140px;
    }
    #notation-canvas svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .voicing-display {
      margin-top: 0;
      padding: 12px 10px;
      background: #b0e0e6;
      border: 1px solid #d8d8d8;
      border-radius: 6px;
      font-size: 14px;
      color: #222;
      height: 160px;
      min-height: 160px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      gap: 8px;
    }

    .voicing-chord {
      font-weight: 700;
      font-size: 20px;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      display: block;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      line-height: 1.1;
      color: #000;
    }

    .voicing-info {
      font-weight: 700;
      font-size: 14px;
      color: #333;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      display: block;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      line-height: 1.1;
    }

    .voicing-ambiguity {
      font-size: 11px;
      color: #666;
      line-height: 1.1;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      display: block;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }

        .piano-display {
          margin-bottom: 12px;
          padding: 0;
          background: transparent;
          border: none;
          position: sticky;
          top: 0;
          z-index: 3;
        }

        .piano-keys {
          position: relative;
          height: 90px;
          width: 100%;
          overflow: hidden;
          background: #fff;
          border: 1px solid #e5e5e5;
          border-radius: 6px;
        }

        .piano-key {
          position: absolute;
          top: 0;
          box-sizing: border-box;
          border: 1px solid #cfcfcf;
        }

        .piano-key.white {
          height: 90px;
          background: #fff;
          z-index: 1;
        }

        .piano-key.black {
          height: 55px;
          background: #111;
          border-color: #111;
          z-index: 2;
        }

        .piano-key.white.active {
          background: #004ff8;
        }

        .piano-key.black.active {
          background: #004ff8;
        }

        .piano-key.white.faded {
          background: #f9d9d9;
        }

        .piano-key.black.faded {
          background: #f9d9d9;
        }

        .piano-key.active.white {
          background: #004ff8;
        }

        .piano-key.active.black {
          background: #004ff8;
        }

/* Chord Capture Styles */
#captured-chords-container {
      padding: 0;
      border-bottom: 1px solid #eee;
    }
    .setting {
      margin-bottom: 12px;
    }
    .setting label {
      display: block;
      margin-bottom: 5px;
      font-weight: 600;
      font-size: 13px;
      color: #333;
    }
    .setting input[type="range"] {
      width: 100%;
      margin: 5px 0;
      height: 8px;
      border-radius: 4px;
    }
    .setting-hint {
      font-size: 11px;
      color: #777;
      margin-top: 2px;
      font-style: italic;
    }
    .setting-checkbox {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
    }
    .setting-checkbox input {
      margin: 0;
    }
    .setting-checkbox label {
      font-weight: 600;
      font-size: 13px;
    }
    .radio-group {
      display: flex;
      align-items: center;
      margin-top: 5px;
      background: #f0f0f0;
      padding: 5px 8px;
      border-radius: 4px;
      gap: 8px;
      flex-wrap: wrap;
    }
    .radio-group label {
      margin-right: 10px;
      font-weight: normal;
      font-size: 12px;
    }
    #debug {
      grid-column: 1 / -1;
      margin-top: 20px;
      padding: 10px;
      background: #f5f5f5;
      border: 1px solid #ddd;
      width: 80%;
      max-width: 700px;
      max-height: 300px;
      overflow-y: auto;
      text-align: left;
      font-family: monospace;
      font-size: 14px;
      margin-left: auto;
      margin-right: auto;
      border-radius: 4px;
    }
    .setting-group {
      margin-top: 10px;
    }
    .root-note-selector {
      margin-top: 8px;
      margin-left: 0;
    }
    .root-note-selector select {
      width: 100%;
      padding: 5px;
      border: 1px solid #ddd;
      border-radius: 4px;
      background-color: white;
    }
    .setting-inline {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      margin-top: 10px;
    }
    .setting-inline label {
      display: inline-block;
      margin-right: 10px;
      font-weight: bold;
    }
    .setting-inline button {
      padding: 6px 12px;
      background: #e7e7e7;
      border: 1px solid #ccc;
      border-radius: 4px;
      cursor: pointer;
      font-weight: bold;
      margin-right: 8px;
    }
    .setting-inline button:hover {
      background: #d7d7d7;
    }
    .mode-toggle-row {
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .mode-toggle-label {
      font-size: 12px;
      font-weight: 700;
      color: #444;
    }
    .mode-toggle-group {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .mode-toggle-group button.is-active,
    .score-tool-button.is-active {
      background: #111;
      color: #fff;
      border-color: #111;
    }
    #manual-add-btn {
      background: #5cb85c;
      color: white;
      border: none;
    }
    .score-editor-root {
      margin-top: 12px;
      border: 1px solid #d8d8d8;
      border-radius: 8px;
      background: linear-gradient(180deg, #fbfbfb 0%, #f3f3f3 100%);
      padding: 12px;
    }
    .score-editor-root.is-hidden {
      display: none;
    }
    .score-editor-toolbar {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 12px;
    }
    .score-toolbar-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }
    .score-tool-button {
      padding: 6px 10px;
      border: 1px solid #bbb;
      border-radius: 6px;
      background: #fff;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
    }
    .score-tool-button:disabled {
      cursor: not-allowed;
      opacity: 0.45;
    }
    .score-edit-command-row {
      padding: 7px;
      border: 1px solid #d6dbe3;
      border-radius: 7px;
      background: rgba(246,248,252,0.9);
    }
    .score-export-row {
      padding: 7px;
      border: 1px solid #cdd9e8;
      border-radius: 7px;
      background: rgba(240,246,255,0.88);
    }
    .score-export-resolution-label {
      color: #444;
      font-size: 12px;
      font-weight: 700;
    }
    .score-export-resolution {
      padding: 6px 28px 6px 8px;
      border: 1px solid #aeb9c7;
      border-radius: 6px;
      background: #fff;
      color: #222;
      font-size: 12px;
      font-weight: 700;
    }
    .score-export-button {
      border-color: #153f85;
      background: #153f85;
      color: #fff;
    }
    .score-export-button:hover:not(:disabled) {
      background: #0e2f66;
    }
    .score-export-status {
      min-height: 1em;
      color: #42526a;
      font-size: 11px;
      font-weight: 700;
    }
    .score-png-export-host {
      position: fixed;
      left: -20000px;
      top: 0;
      z-index: -1;
      visibility: hidden;
      overflow: visible;
      background: #fff;
      pointer-events: none;
    }
    .score-toolbar-section {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 5px;
      padding-right: 8px;
      margin-right: 2px;
      border-right: 1px solid #d8dde6;
    }
    .score-toolbar-section:last-child {
      padding-right: 0;
      border-right: none;
    }
    .score-toolbar-section-label {
      margin-right: 2px;
      color: #536071;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }
    .score-inline-checkbox {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0 8px;
      font-size: 12px;
      font-weight: 700;
      color: #444;
    }
    .score-inline-button-group {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 0 4px;
      border-left: 1px solid #ddd;
      border-right: 1px solid #ddd;
      margin: 0 2px;
    }
    .score-editor-toolbar input[type="text"] {
      min-width: 140px;
      padding: 6px 8px;
      border: 1px solid #bbb;
      border-radius: 6px;
      background: #fff;
      font-size: 12px;
    }
    .score-manual-entry {
      padding: 8px;
      border: 1px solid #d6d6d6;
      border-radius: 7px;
      background: rgba(255,255,255,0.72);
    }
    .score-manual-entry-title {
      font-size: 12px;
      font-weight: 800;
      color: #222;
    }
    .score-manual-entry-hint {
      font-size: 11px;
      color: #666;
    }
    .score-manual-string {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #444;
    }
    .score-editor-toolbar .score-manual-string input[type="text"] {
      box-sizing: border-box;
      min-width: 0;
      width: 34px;
      padding: 5px 4px;
      text-align: center;
    }
    .score-editor-toolbar .score-manual-string input[aria-invalid="true"] {
      border-color: #b42318;
      outline: 2px solid rgba(180,35,24,0.18);
    }
    .score-manual-feedback {
      flex: 1 0 100%;
      box-sizing: border-box;
      margin-top: 2px;
      padding: 7px 9px;
      border: 1px solid #e2a8a3;
      border-radius: 6px;
      background: #fff1f0;
      color: #9f241c;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.35;
    }
    .score-manual-feedback[hidden] {
      display: none;
    }
    .score-editor-surface {
      overflow: visible;
      padding: 12px 14px;
      border: 1px solid #ddd;
      border-radius: 8px;
      background:
        radial-gradient(circle at top left, rgba(219,229,255,0.35), transparent 28%),
        linear-gradient(180deg, #fffefb 0%, #fcfbf5 100%);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
    }
    .score-editor-surface.is-engraved-surface {
      min-height: 240px;
    }
    .score-editor-scroll-frame {
      overflow-x: auto;
      overflow-y: hidden;
    }
    .score-editor-render-host {
      min-width: 920px;
      position: relative;
    }
    .score-editor-render-host svg {
      overflow: visible;
    }
    .score-editor-surface .abcjs-container {
      min-width: 920px;
    }
    .score-surface-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 3;
    }
    .score-beat-hitbox {
      position: absolute;
      border: none;
      padding: 0;
      margin: 0;
      background: transparent;
      pointer-events: auto;
      cursor: pointer;
    }
    .score-cursor {
      position: absolute;
      width: 2px;
      background: #d21f1f;
      border-radius: 999px;
      box-shadow: 0 0 0 1px rgba(210,31,31,0.18);
    }
    .score-selected-event-box {
      position: absolute;
      border: 2px solid rgba(21,63,133,0.88);
      border-radius: 8px;
      background: rgba(21,63,133,0.07);
      box-shadow: 0 0 0 1px rgba(21,63,133,0.08);
      pointer-events: none;
    }
    .score-selected-beat-box {
      background: rgba(21,63,133,0.05);
      border-style: dashed;
    }
    .score-event-handle {
      position: absolute;
      width: 18px;
      height: 18px;
      padding: 0;
      margin: 0;
      border: 1px solid rgba(21,63,133,0.42);
      border-radius: 999px;
      background: rgba(255,255,255,0.94);
      color: #153f85;
      font-size: 11px;
      font-weight: 800;
      line-height: 16px;
      text-align: center;
      cursor: pointer;
      pointer-events: auto;
      box-shadow: 0 1px 2px rgba(17,24,39,0.12);
    }
    .score-event-handle:hover {
      background: #f4f8ff;
      border-color: rgba(21,63,133,0.7);
    }
    .score-event-handle.is-active {
      background: #153f85;
      color: #fff;
      border-color: #153f85;
    }
    .score-editor-surface .abcjs-notehead,
    .score-editor-surface .abcjs-tab-number,
    .score-editor-surface .abcjs-rest,
    .score-editor-surface .abcjs-note,
    .score-editor-surface .abcjs-tabNumber {
      cursor: pointer;
    }
    .score-editor-surface .abcjs-title {
      font-family: "Georgia", "Times New Roman", serif;
      font-weight: 700;
      letter-spacing: 0.01em;
    }
    .score-editor-surface .abcjs-chord {
      font-weight: 700;
      fill: #243046;
    }
    .score-editor-surface .livefrets-selected-event .abcjs-notehead,
    .score-editor-surface .livefrets-selected-event .abcjs-tab-number,
    .score-editor-surface .livefrets-selected-event.abcjs-rest path,
    .score-editor-surface .livefrets-selected-event.abcjs-note .abcjs-stem,
    .score-editor-surface .livefrets-selected-event.abcjs-note .abcjs-chord {
      fill: #153f85;
      stroke: #153f85;
    }
    .score-editor-surface .livefrets-selected-note {
      fill: #b12020 !important;
      stroke: #b12020 !important;
      font-weight: 700;
    }
    .score-editor-surface .livefrets-selected-note tspan {
      fill: #b12020 !important;
    }
    .score-editor-surface .livefrets-selected-event .abcjs-tab-number {
      font-weight: 700;
    }
    .score-editor-surface .abcjs-note_selected {
      fill: #153f85;
      stroke: #153f85;
    }
    .score-surface-loading {
      min-height: 220px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #5d6470;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    .score-surface-error {
      color: #a94442;
    }
    .score-editor-meta {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 220px;
      gap: 12px;
      margin-top: 12px;
      align-items: start;
    }
    .score-editor-sidepanel {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .score-editor-warnings,
    .score-editor-status,
    .score-editor-inspector,
    .score-test-output {
      border: 1px solid #ddd;
      border-radius: 6px;
      background: #fff;
      padding: 10px;
      font-size: 12px;
      line-height: 1.4;
      min-height: 58px;
      box-sizing: border-box;
    }
    .score-warning-empty {
      color: #777;
    }
    .score-warning-item {
      color: #a94442;
      font-weight: 700;
    }
    .score-editor-inspector {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .score-inspector-card {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding-bottom: 6px;
      border-bottom: 1px solid #ececec;
    }
    .score-inspector-card:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }
    .score-inspector-card h3 {
      margin: 0;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #444;
    }
    .score-inspector-row {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .score-inspector-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 11px;
      font-weight: 700;
      color: #555;
    }
    .score-inspector-field input,
    .score-inspector-field select {
      padding: 6px 8px;
      border: 1px solid #bbb;
      border-radius: 6px;
      background: #fff;
      font-size: 12px;
    }
    .score-inspector-checkbox {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 700;
      color: #444;
    }
    .score-inspector-tech-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px 10px;
    }
    .score-selection-summary {
      font-size: 12px;
      color: #555;
    }
    .score-selection-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 4px;
    }
    .score-chip-strip {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .score-chip-button {
      padding: 4px 8px;
      border: 1px solid #b9c2d2;
      border-radius: 999px;
      background: #f6f8fc;
      color: #334155;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
    }
    .score-chip-button.is-active {
      background: #153f85;
      border-color: #153f85;
      color: #fff;
    }
    .score-chip-button.is-cursor:not(.is-active) {
      border-color: #d21f1f;
      box-shadow: inset 0 0 0 1px rgba(210,31,31,0.18);
    }
    .score-chip-empty {
      color: #7b8794;
      font-size: 11px;
      font-style: italic;
    }
    .score-selection-hint {
      font-size: 11px;
      color: #6b7280;
      line-height: 1.35;
    }
    .score-delete-button {
      align-self: flex-start;
      background: #fceaea;
      border-color: #de9a9a;
      color: #8f2b2b;
    }
    .score-test-output {
      grid-column: 1 / -1;
      font-family: monospace;
      white-space: pre-wrap;
    }
    #notation-container {
      margin-top: 12px;
      width: 100%;
      max-width: 100%;
      height: 140px; /* Increased height to prevent cut-off */
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 5px;
      overflow: hidden;
      display: block;
      position: relative; /* Ensure proper positioning */
    }
    #notation-canvas {
      width: 100%;
      height: 100%;
    }
    #notation-canvas svg {
      width: 100%;
      height: 100%;
      display: block;
    }

/* Chord Capture Styles */
#captured-chords-container {
  flex: 1 1 auto;
  min-width: 300px;
  order: 1;
    }

#captured-chords-container h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

#captured-chords-list {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Chord Group Flex Layout */
.captured-chords-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* Reduce gap between chord items */
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
}

/* Each chord item as a vertical block */
.captured-chord-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 2px; /* Reduce border radius */
  padding: 5px; /* Reduce padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 110px;  /* Slightly reduce width */
  box-sizing: border-box;
  margin: 0; /* Remove all margins */
  box-shadow: none; /* Remove shadow */
}

.captured-chord-item .diagram {
  width: 100px;
  height: 300px;
  margin-bottom: 10px;
  background-color: white !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Chord Diagram Styles */
.chord-diagram {
  width: 100px !important;
  height: 300px !important;
  background-color: #ffffff !important;
  border: none !important; /* Remove blue border */
  margin: 0 auto;
  display: block !important;
  box-shadow: none !important; /* Remove shadow */
}

.captured-chord-item .info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px; /* Reduce top margin */
}

.captured-chord-item .label {
  font-weight: bold;
  font-size: 12px; /* Slightly smaller font */
  margin-bottom: 1px;
  text-align: center;
  width: 100%;
}

.captured-chord-item .notes {
  font-size: 10px; /* Smaller font */
  color: #666;
  margin-bottom: 2px;
  text-align: center;
}

.captured-chord-item .actions {
  display: flex;
  justify-content: center;
  gap: 3px; /* Even smaller gap to fit three buttons */
  margin-top: 2px;
  width: 100%;
  flex-wrap: wrap;
}

.captured-chord-item .actions button {
  margin: 0;
  padding: 2px 4px; /* Further reduce padding */
  font-size: 9px; /* Smaller font */
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 2px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.captured-chord-item .actions .quick-rename-btn {
  font-size: 12px;
  padding: 1px 4px;
  line-height: 1;
}

/* Quick-rename dropdown */
.quick-rename-dropdown {
  position: absolute;
  z-index: 10000;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 180px;
  max-width: 280px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 12px;
}
.quick-rename-dropdown .qr-loading,
.quick-rename-dropdown .qr-empty {
  padding: 8px 12px;
  color: #999;
  text-align: center;
}
.quick-rename-dropdown .qr-item {
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px solid #f0f0f0;
}
.quick-rename-dropdown .qr-item:last-child {
  border-bottom: none;
}
.quick-rename-dropdown .qr-item:hover {
  background: #e8f0fe;
}
.quick-rename-dropdown .qr-name {
  font-weight: 600;
}
.quick-rename-dropdown .qr-detail {
  font-size: 10px;
  color: #888;
  white-space: nowrap;
}

.captured-chord-item .actions .duration-select {
  font-size: 9px; /* Match button font size */
  padding: 1px 2px; /* Slightly smaller padding */
  border: 1px solid #ddd;
  border-radius: 2px;
  background-color: #f0f0f0;
  margin: 0;
  max-width: 60px; /* Limit width */
  flex: 0 0 auto;
}

.captured-chord-item .duration-select option {
  font-size: 11px; /* Slightly larger for dropdown options */
}

.captured-chords-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
}

.captured-chords-actions button {
  padding: 8px 15px;
  background: #5cb85c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.captured-chords-actions button#delete-group-btn {
  background: #d9534f;
}

.captured-chords-actions button:hover {
  opacity: 0.9;
}

#save-to-group-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  color: #666;
}
.setting-checkbox input[type="checkbox"]:disabled + label {
  color: #999;
  cursor: not-allowed;
}

.soc-key-filter-inline {
  margin-top: 6px;
}

.soc-key-filter-inline button {
  width: 100%;
  text-align: center;
}

.soc-key-filter-modal-content {
  width: 520px;
  max-width: calc(100% - 40px);
  margin: 8% auto;
}

.soc-key-filter-group {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 10px;
  background: #fafafa;
}

.soc-key-filter-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 600;
}

.soc-key-filter-keys {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px 8px;
}

.soc-key-filter-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.soc-key-filter-item input {
  margin: 0;
}

.soc-key-filter-group.is-disabled {
  opacity: 0.6;
}

.right-column {
  position: sticky;
  top: 20px;
  right: 20px;
  flex: 0 0 165px; /* Fixed width, no growing or shrinking */
  width: 165px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  order: 3;
  height: fit-content; /* Ensure it only takes the necessary height */
}

@media (max-width: 900px) {
  .right-column {
    position: static;
  }
}

.export-options {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
}

.export-options label {
  font-size: 12px;
  color: #666;
}

.export-options input[type="number"] {
  width: 40px; /* Adjust width as needed */
  padding: 2px 4px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin-right: 5px; /* Add some space before the PDF checkbox */
}

/* Add styling for the key signature dropdown */
.export-options select {
  padding: 2px 4px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin-left: 5px;
  background-color: white;
}

#export-image-btn {
  background: #0275d8;
}

/* Styles for chord editor modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  overflow: auto;
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 350px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #000;
  text-decoration: none;
}

#edit-chord-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

.edit-chord-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.edit-chord-table th, 
.edit-chord-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.edit-chord-table th {
  font-weight: bold;
  background-color: #f5f5f5;
}

.edit-chord-table input[type="number"] {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.edit-chord-table input[type="text"] {
  width: 100px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: monospace;
}

.edit-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.edit-actions button {
  padding: 6px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  border: none;
}

#save-chord-edits {
  background-color: #4CAF50;
  color: white;
}

#cancel-chord-edits {
  background-color: #f44336;
  color: white;
}

/* Add styles for multi-note editing in the chord edit modal */
.fret-inputs {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fret-input-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fret-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: monospace;
}

.add-fret-btn {
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.remove-fret-btn {
  background: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

#capture-view-btn {
  background: #ff9800;
  color: white;
  border: none;
}

#capture-view-btn:hover {
  background: #e68a00;
}

/* Collapsible sections */
.settings-section.collapsible .section-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 8px;
}

.settings-section.collapsible .section-header:hover {
  background-color: #f0f0f0;
}

.settings-section.collapsible .toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.settings-section.collapsible.collapsed .toggle-icon {
  transform: rotate(0deg);
}

.settings-section.collapsible:not(.collapsed) .toggle-icon {
  transform: rotate(90deg);
}

.settings-section.collapsible .section-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
  opacity: 1;
}

.settings-section.collapsible.collapsed .section-content {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
}
