:root {
  /* Functional Neutrals */
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #1a1a1a;           /* Near-black for high legibility */
  background: #e0e0e0;      /* Classic Braun light grey matte finish */
  
  --bg-pad: #e3e3e2;        
  --bg-track: #e3e3e2;     
  --pad-label-text: #454545;
  
  /* Selected States: High contrast, low saturation */
  --bg-track-selected: #ffffff;
  --bg-pad-selected: #ffffff;

  --bg-sequencer: #ececec;
  
  /* Functional Coding: Using color only for state communication */
  --mute-solo-on: #ed8a66;    
  --mute-solo-off: #8e8e8e;  

  --step-config-selected: #ffd685;

  /* Step Sequencer: Tonal Variations */
  --bg-step: #dadada;               /* Base grey */
  --bg-step-downbeat: #cccbcb;      /* Darker grey for structural rhythm */
  --bg-step-on: #f6c286;            /* "On" state is a physical toggle contrast */
  --bg-step-on-downbeat: #f9ba76;   /* Strongest emphasis for downbeats */
  
  /* Shadows: Removed for a "Flat" and honest material look */
  --box-shadow-step: transparent;
  --box-shadow-step-on: transparent;
  --box-shadow-step-on-downbeat: transparent;

  --button-color: #b2b2b2;          /* Tactile button white */
}

:root2 {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #1e1e1e;
  background: #f6f7fb;
  --bg-pad: #fdf1b5;
  --bg-track: #fdf1b5;
  --pad-label-text: #5e5e5e;
  
  --bg-track-selected: rgba(226, 249, 152);
  --bg-pad-selected: rgba(229, 253, 152);

  --bg-sequencer: rgba(247, 255, 241);
  --mute-solo-on: rgb(255, 204, 84);
  --mute-solo-off: rgba(73, 189, 224);

  --step-config-selected: #d0d4f0;

  --bg-step: #d6dafd;
  --bg-step-downbeat: #b8bfed;
  --bg-step-on: #ffe96b;
  --bg-step-on-downbeat: #fecd58;
  --box-shadow-step: rgb(78, 92, 159);
  --box-shadow-step-on: rgb(78, 92, 159);
  --box-shadow-step-on-downbeat: rgb(78, 92, 159);

  --button-color: #7dbdf9;
}

/* Dark mode */
:darkmode {
  color: #fff;
  --bg-pad: #282828;
  --bg-track: #1e1e1e;
  --pad-label-text: #a0a0a0;
  --bg-track-selected: #383838;
  --bg-pad-selected: #404040;
  --bg-sequencer: #181818;
  --mute-solo-on: #ffffff;
  --mute-solo-off: #333333;
  --step-config-selected: #454545;
  --bg-step: #2a2a2a;
  --bg-step-downbeat: #353535;
  --bg-step-on: #d1d1d1;
  --bg-step-on-downbeat: #f0f0f0;
  --box-shadow-step: #000000;
  --box-shadow-step-on: rgba(255, 255, 255, 0.2);
  --box-shadow-step-on-downbeat: rgba(255, 255, 255, 0.3);
  --button-color: #505050;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #4a4a4a;
}

body.modal-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem;
  gap: 1.5rem;
}

.toolbar {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.toolbar label {
  font-weight: 600;
  font-size: 0.9rem;
}

.tempo-control,
.step-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.transport {
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.import-button {
  background: #5a6478;
  color: #ffffff;
  font-weight: 600;
}

.import-button:hover,
.import-button:focus {
  background: #6d7a91;
}

.export-button {
  background: #1f7a8c;
  color: #ffffff;
  font-weight: 600;
}

.export-button:hover,
.export-button:focus {
  background: #278da1;
}

.tempo-inputs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

button {
  border: none;
  border-radius: 2px;
  background: var(--button-color, #5c98ff);
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover,
button:focus {
  background: #6fc3ff;
}

 #play-toggle {
  border-radius: 999px;
  width: 3rem;
  height: 3rem;
  box-shadow: 0 5px 0px var(--box-shadow-step, rgb(58, 58, 58));
  transition: all 0.2s ease;
  
}


#play-toggle:hover {
  transform: translateY(1px);
  box-shadow: 0 4px 0px  rgba(78, 92, 159, 1);
}

.playing {
  transform: translateY(0px);
  box-shadow: 0 0px 0px  rgba(78, 92, 159, 1);
}

#tempo-input {
  width: 4.5rem;
  padding: 0.35rem;
  border-radius: 6px;
  border: 1px solid #d0d4f0;
  text-align: center;
}

.sample-controls,
.sequencer {
  background: var(--bg-sequencer, #ffffff);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(28, 45, 90, 0.08);
}

.sample-controls h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.pad-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pad-row {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 0.7rem 0 0 0.7rem;
  background: var(--bg-pad, rgb(255, 248, 218));
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  overflow: visible;
  padding: 0.3rem;
}

.pad-delete-btn {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #888;
  color: #fff;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  z-index: 5;
}

.pad-row:hover .pad-delete-btn {
  opacity: 1;
}

.pad-delete-btn:hover {
  background: #e74c3c;
}

.pad-row.selected {
  background: var(--bg-pad-selected, rgb(255, 248, 218));
  /* box-shadow: inset 0 0 0 1px rgba(24, 78, 137, 0.28); */
}

.pad-row-main {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.4rem;
  width: 100%;
  padding: 0 0.45rem 0.2rem 0.55rem;
}

.pad-row .pad {
  order: 99;
  flex: 1 1 auto;
  min-width: 0;
  box-shadow: none;
}

.pad {
  display: flex;
  align-items: center;
  gap: 0.04rem;
  width: auto;
  background: transparent;
  border-radius: 0.8rem;
  font-size: 0.85rem;
  font-weight: 400;
}

.pad.add-pad {
  justify-content: center;
  background: rgba(75, 107, 251, 0.08);
  border: 1px dashed #b9c4ff;
  color: #81afff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.pad.add-pad:hover,
.pad.add-pad:focus {
  box-shadow: none;
  border-color: #ffba30;
}

.pad:hover {
  box-shadow: none;
}

 
.pad.playing {
  /* box-shadow: 0 0 0 2px rgba(243, 114, 44, 0.35); */
}

.pad.soloed {
  /* box-shadow: 0 0 0 2px rgba(243, 178, 63, 0.35); */
}

.pad.solo-suppressed {
  opacity: 0.7;
}

.pad.muted {
  opacity: 0.55;
}

.pad-row.solo-suppressed {
  opacity: 0.9;
}

.pad-row.solo-suppressed .pad-action:not(.is-active),
.pad-row.solo-suppressed .pad-row-knob {
  opacity: 0.7;
}

.pad-row-toggles {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 0 0 4px;
  width: 4rem;
  align-self: center;
}

.pad-row-edit {
  display: flex;
  gap: 0.4rem;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.pad-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  background: var(--mute-solo-off);
  color: #d4f1ff;
  border: none;
  border-radius: 0.12rem;
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 1px rgba(31, 107, 161, 0.25);

}

.pad-action:hover,
.pad-action:focus {
  background: #90b1ff;
  transform: translateY(-1px);
}

.pad-action.is-active {
  background: var(--mute-solo-on,#fcd548);
  color: #ffffff;
  box-shadow: 0 0px 10px 3px rgba(255, 255, 255);


}

.pad-action[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pad-label-block {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.45rem 0.2rem;
}

.pad.is-empty .pad-label-block {
  cursor: pointer;
}

.pad-label-text {
  text-align: left;
  color: var(--pad-label-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.5rem;

  letter-spacing: 0.01em;
  line-height: 1;
  padding-left: 0.1rem;
  font-family: "Jersey 20", sans-serif;

}

.pad-label-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  padding: 0.1rem;
  font-family: "Jersey 20", sans-serif;

}

.pad-label-input:focus {
  background: rgba(255, 255, 255);
  border-color: rgba(24, 78, 137);
}

.pad-label-input:disabled {
  cursor: pointer;
}
 

.pad-edit-sample-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
  margin-bottom: 0.4rem;
  flex: 1;
}

.pad-edit-sample-btn:hover {
  background: #a8a8a8;
}

.pad-edit-sample-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.pad-edit-sample-btn:hover .pad-edit-sample-icon {
  opacity: 1;
}

.pad-row-knob {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  width: auto;
  flex-shrink: 0;
  line-height: 1;
}

.pad-row-knob x-knob {
  --size: 62px;
  --value-height: 12px;
  --label-height: 0px;
  --label-margin-top: 0px;
  --value-font: 600 9px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: block;
  margin-bottom: 0;
}

.pad-row-knob x-knob.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.pad-row-knob-value {
  display: block;
  color: #101114;
  font-size: 0.58rem;
  line-height: 0.9;
  margin-top: -0.5rem;
}

.pad-row-knob-label {
  display: block;
  color: #101114;
  font-size: 0.6rem;
  line-height: 0.9;
  font-weight: 600;
  margin-top: -10px;
  padding-bottom: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.pad-row-step-count {
  display: inline-flex;
  align-items: flex-end;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.pad-step-count-container-row {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
}

.pad-step-count-container-row label {
  font-size: 0.54rem;
  line-height: 0.9;
}

.pad-step-count-container-row .pad-step-count {
  min-width: 3.8rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
}

.sample-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pad-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pad-column {
  width: 340px;
  border-radius: 12px;
 padding: 0rem;
  display: flex;
  flex-direction: column;
  margin-top: 3.5rem;
}

.pad-column.is-hidden {
  display: none;
}

.pad-column-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b5d76;
}

.pad-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sample-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
}

.sample-modal.hidden {
  display: none;
}

.import-loading-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 160;
}

.import-loading-modal.hidden {
  display: none;
}

.import-loading-dialog {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: rgba(15, 18, 36, 0.9);
  color: #f2f4ff;
  box-shadow: 0 16px 36px rgba(15, 18, 36, 0.4);
}

.import-loading-dialog .loading-spinner {
  width: 18px;
  height: 18px;
  border-width: 3px;
  border-top-color: #a3dbff;
}

.import-loading-dialog p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 36, 0.55);
  backdrop-filter: blur(6px);
}

.sample-modal-dialog {
  position: relative;
  width: min(560px, calc(100% - 2.5rem));
  height: 82vh;
  max-height: 292vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 1.75rem 2rem;
  box-shadow: 0 24px 48px rgba(20, 32, 88, 0.25);
}

.sample-modal .modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sample-modal .modal-toolbar h2 {
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #5b5d76;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
  color: #2a2d3e;
}

.sample-modal .sample-controls {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  gap: 1.25rem;
}

.play-preview-button {
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, #4bd1ae, #2fb89b);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.play-preview-button span[aria-hidden="true"] {
  font-size: 1.1rem;
  line-height: 1;
}

.play-preview-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.play-preview-button:not(:disabled):hover,
.play-preview-button:not(:disabled):focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(43, 184, 155, 0.26);
}

.preview-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.sample-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2a2d3e;
}

.sample-modal .library {
  max-height: 460px;
  overflow-y: auto;
}

.root-pitch {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
}

.root-pitch-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5b5d76;
}

.root-pitch x-knob {
  --size: 56px;
}

.root-pitch x-knob.disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.8);
}

.pad-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #2a2d3e;
}

.pad-name-prefix {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: #6e7092;
}

.pad-name-button {
  border-radius: 6px;
  color: #2a2d3e;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
  font-family: monospace;
  background-color: white;
}

.pad-name-button:hover,
.pad-name-button:focus {
  background: #d6dafd;
  border-color: #c4c9f7;
}

.pad-name-input {
  border: 1px solid #c4c9f7;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  min-width: 140px;
}

#sample-input {
  display: none;
}

.file-label {
  background: #2a2d3e;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
 
}

.waveform-editor {
  position: relative;
  width: 100%;
  border-radius: 1px;
  overflow: hidden;
  background: #0d0d17;
}

#wave-canvas {
  width: 100%;
  height: 100px;
  display: block;
}

#start-handle{
  z-index: 1111111;
}

#end-handle{
  margin-right: 5px;
}
 
 

.waveform-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.trim-region {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.trim-start {
  left: 0;
  width: 0%;
}

.trim-end {
  right: 0;
  width: 0%;
}

.trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  cursor: ew-resize;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.trim-handle-start {
  left: 0%;
  transform: translateX(-50%);
}

.trim-handle-end {
  left: 100%;
  transform: translateX(-50%);
}

.handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--button-color, #5c98ff);
  box-shadow: 0 0 8px rgba(92, 152, 255, 0.6);
}

.trim-handle-start .handle-line {
  background: #4bd1ae;
  box-shadow: 0 0 8px rgba(75, 209, 174, 0.6);

}

.trim-handle-end .handle-line {
  background: #f3722c;
  box-shadow: 0 0 8px rgba(243, 114, 44, 0.6);
 }

 .right-grip {
  right: 10px;
 }

 .left-grip {
  left: 10px;
 }

.handle-grip {
  position: absolute;
  bottom: 4px;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--button-color, #5c98ff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.trim-handle-start .handle-grip {
  border-color: #4bd1ae;
  color: #4bd1ae;
}

.trim-handle-end .handle-grip {
  border-color: #f3722c;
  color: #f3722c;
}

.trim-handle:hover .handle-grip,
.trim-handle:focus .handle-grip {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.trim-handle.dragging .handle-grip {
  transform: scale(1.15);
}

.sample-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.trim-values {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: #5b5d76;
}

.trim-value {
  background: #f1f3ff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  min-width: 3rem;
  text-align: center;
}

.trim-value:first-child {
  color: #2fb89b;
}

.trim-value:last-child {
  color: #f3722c;
}

.trim-separator {
  color: #b0b3c9;
}

.mute-toggle-btn {
  padding: 0.1rem 0.2rem;
  border-radius: 6px;
  border: 1px solid #dfe3ff;
  background: #f8f9ff;
  color: #5b5d76;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mute-toggle-btn:hover {
  background: #eef1ff;
  border-color: #c4c9f7;
}

.mute-toggle-btn[aria-pressed="true"] {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: white;
}

.mute-toggle-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.library-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.library-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #dfe3ff;
  padding-bottom: 0.5rem;
}

.tab-button {
  background: none;
  border: none;
  font-weight: 600;
  color: #8b8ea8;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--button-color, #5c98ff);
  background: rgba(92, 152, 255, 0.1);
}

.tab-button.active {
  color: var(--button-color, #5c98ff);
  background: rgba(92, 152, 255, 0.15);
}

.tab-panel {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

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

.library-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #3a3d5c;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
}

.library-search:focus {
  border-color: var(--button-color, #5c98ff);  ;
}

.library-search::placeholder {
  color: #6c70a1;
}

.library-sub-tabs {
  display: flex;
  gap: 0;
  margin-top: 0.35rem;
  position: relative;
}

.library-sub-tabs .sub-tab {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: #6c70a1;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s ease;
  border-radius: 6px 6px 0 0;
  position: relative;
  top: 1px;
  text-align: center;
}

.library-sub-tabs .sub-tab:hover {
  color: #b0b3cc;
  background: rgba(255, 255, 255, 0.03);
}

.library-sub-tabs .sub-tab.active {
  color: var(--pad-label-text);
  background:  var(--bg-pad-selected);

}

.library-category {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.65rem;
  color: #8b8ea8;
  background: rgba(92, 152, 255, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  vertical-align: middle;
}

.library-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.library-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0.2rem;
  background: #f1f3ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #2a2d3e;
  cursor: pointer;
  transition: background 0.2s ease;
}

.library-list li:hover {
  background: #eef1ff;
}

.library-list li.active {
  background: #d6dafd;
  color: #5c98ff;
  font-weight: 600;
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #c4c9f7;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8f9ff;
  gap: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-area.drag-over {
  border-color: var(--button-color, #5c98ff);
  background: #eef1ff;
}

.upload-icon {
  color: #8b8ea8;
  margin-bottom: 0.5rem;
}

.upload-text {
  margin: 0;
  font-weight: 600;
  color: #5b5d76;
  font-size: 1rem;
}

.upload-subtext {
  margin: 0;
  font-size: 0.85rem;
  color: #8b8ea8;
}

.step-grid {
  display: grid;
  gap: 0.4rem;
}

.step-grid.paired-mode {
  gap: 0.4rem;
}

.sequencer-track-row {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 0;
  align-items: start;
  justify-items: bottom;
}

.sequencer-track-row > .pad-row,
.sequencer-track-row > .add-pad {
  width: 100%;
}

.sequencer-track-add-spacer {
  min-height: 1px;
}

.step-track {
  display: grid;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem 0.6rem;
  /* border: 1px solid #dfe3ff; */
  border-radius: 0 5px 5px 5px;
  background: var(--bg-track, rgba(244, 240, 224, 0.8));
  min-height: 132px;
}

.step-track.selected {
  background: var(--bg-track-selected, #b8bfed);
 
}

.step-track-empty {
  min-height: 116px;
}

.step-track-single {
  gap: 0.55rem;
}

.step-track-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-height: 56px;
}

.step-track-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.seq-row {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 0.5rem;
}

.step-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}

.step {
  width: 100%;
  display: block;
  border-radius: 6px;
  background: var(--bg-step, #d6dafd);
  cursor: pointer;
  aspect-ratio: 1 / 1;
  box-shadow: var(--box-shadow-step, rgb(78, 92, 159)) 0px 6px 0px 0px;
  transition: all 0.2s ease;
  margin-bottom: 2px;
  
}

.step.step-downbeat {
  background: var(--bg-step-downbeat, #b8bfed);
}

.step.on {
  background: var(--bg-step-on, #ffe96b);
  box-shadow: var(--box-shadow-step-on, rgb(78, 92, 159)) 0px 3px 0px 0px;
  transform: translateY(3px);
}
.step.on.step-downbeat {
  background: var(--bg-step-on-downbeat, #fecd58);
  box-shadow: var(--box-shadow-step-on-downbeat, rgb(78, 92, 159)) 0px 3px 0px 0px;
  transform: translateY(3px);
}

.step.active {
  background-color: #fbff82;
}

.step.on.step-downbeat.active {
  background-color: #fbff82;
}

.step-config {
  
  border-radius: 5px;
  background: var(--step-config-selected);
  color: #2a2d3e;
  font-size: 0.7rem;
  padding: 0.2rem 0;
  text-align: center;
  transition: background 0.1s ease, color 0.2s ease, border-color 0.2s ease;
  margin-top:2px;
  box-shadow: 0 2px 0 0 rgb(104, 104, 104);
}

.step-config:hover,
.step-config:focus {
  background: #e3e6ff;
}

.step-config.selected {
  display: flex;
  background: var(--step-config-selected, #d0d4f0);
  border-color: #d0d4f0;
 
  height: 4rem;
  align-items: flex-start; 
  justify-content: center; 
}

.sequencer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--bg-sequencer, #fdf8e9);
  padding-left: 1;
}

.sequencer-layout {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.sequencer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sequencer-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
}

.sequencer-header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.selected-pad-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #5b5f7a;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;

}

.pad-step-count-container {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
}

.pad-step-count-container label {
  font-size: 0.6rem;
  font-weight: 600;
  color: #000000;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pad-step-count {
  min-width: 4.75rem;
  border: 1px solid #b8bfed;
  border-radius: 8px;
  background: #eef1ff;
  padding: 0.4rem 0.55rem;
  font-size: 0.6rem;

  font-family: 'SF Mono', 'Fira Code', monospace;
}

.sequencer h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2a2d3e;
}

.play-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f3722c;
}

.step-editor {
  position: fixed;
  z-index: 2000;

  border-radius: 12px;
  border: 1px solid #dfe3ff;
  /* box-shadow: 0 8px 32px rgba(75, 107, 251, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08); */
 
  display: flex;
  flex-direction: column;
 
  background: var(--step-config-selected, #ffffff);
}

.step-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.step-editor-close {
  background: transparent;
  border: none;
  font-size: 1rem;
  color: #8b8fa8;
  cursor: pointer;
  line-height: 1;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}

.step-editor-close:hover {
  color: #4b6bfb;
  background: rgba(75, 107, 251, 0.1);
}

 

.step-editor.hidden {
  display: none;
}


.step-option-row {
  display: flex;

  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1rem;
}

.step-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
  color: #373b52;
  gap: 0.1rem;
  
}

.step-option-label {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.4rem;
  color: #5b5d76;
}

.step-option x-knob {
  --size: 60px;
  --value-height: 12px;
  --label-height: 0px;
  --label-margin-top: 0px;
}

/* .pad-row-knob x-knob {

  --value-font: 600 9px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: block;
  margin-bottom: 0;
} */

.hidden {
  display: none !important;
}

@media (max-width: 1200px) {
  .sequencer-layout {
    flex-direction: column;
  }

  .pad-column {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .pad-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem;
  }

  .pad-row {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 220px;

  }
}

@media (max-width: 640px) {
  .app {
    padding: 1rem;
  }

  .toolbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .pad-column {
    flex-direction: column;
  }

  .pad-list {
    flex-direction: column;
  }

  .pad-row {
    flex: 1 1 auto;
    min-width: 0;
  }

  .sample-modal-dialog {
    width: calc(100% - 1.5rem);
    padding: 1.25rem;
  }
}




 

.select-selected {
  background-color: rgb(255, 243, 192);
}

/* Style the arrow inside the select element: */
.select-selected:after {
  position: absolute;
  content: "";
  top: 14px;
  right: 10px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: #fff transparent transparent transparent;
}

/* Point the arrow upwards when the select box is open (active): */
.select-selected.select-arrow-active:after {
  border-color: transparent transparent #fff transparent;
  top: 7px;
}

/* style the items (options), including the selected item: */
.select-items div,.select-selected {
  color: #ffffff;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
  cursor: pointer;
}

/* Style items (options): */
.select-items {
  position: absolute;
  background-color: DodgerBlue;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
}

/* Hide the items when the select box is closed: */
.select-hide {
  display: none;
}

.select-items div:hover, .same-as-selected {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Library Item */
.library-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
}

.library-play-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid #6c70a1;
  color: #6c70a1;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.library-play-btn:hover:not(:disabled) {
  border-color: #5bc0eb;
  color: #5bc0eb;
  background: rgba(91, 192, 235, 0.1);
}

.library-play-btn.ready {
  border-color: #4ecdc4;
  color: #4ecdc4;
}

.library-play-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.library-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-label.ready {
  color: #4ecdc4;
}

.library-load-btn {
  padding: 0.25rem 0.6rem;
  background: var(--button-color, #5c98ff);
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
   
  transition: all 0.2s;
}

.library-load-btn:hover:not(:disabled) {
  background: #7fd4f5;
}

.library-load-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Loading Spinner */
.loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  border-top-color: #5bc0eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Load More Button */
.load-more-item {
  justify-content: center;
  padding: 0.5rem;
}

.load-more-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px dashed #6c70a1;
  color: #6c70a1;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.load-more-btn:hover {
  border-color: #5bc0eb;
  color: #5bc0eb;
}

.backend-sample {
  opacity: 0.9;
}

.backend-sample .library-label::after {
  content: ' ☁';
  opacity: 0.5;
  font-size: 0.7rem;
}

/* Auth UI */
.auth-button-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-btn {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.login-btn {
  background: #4bd1ae;
  color: #fff;
}

.login-btn:hover {
  background: #3bc09d;
}

.logout-btn {
  background: #5a6478;
  color: #fff;
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
}

.logout-btn:hover {
  background: #6d7a91;
}

.auth-username {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a2d3e;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bounce-button {
  background: var(--bg-step-on);
  color: #ffffff;
  font-weight: 600;
}

.bounce-button:hover,
.bounce-button:focus {
  background: #f47a2d;
}

.bounce-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Page Selector */
.page-selector {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.page-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #eef1ff;
  color: #5b5d76;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.page-btn:hover {
  background: #d6dafd;
}

.page-btn.active {
  background: var(--button-color, #5c98ff);
  color: #fff;
  border-color: var(--button-color, #5c98ff);
}

.page-btn.playing {
  box-shadow: 0 0 0 2px rgba(75, 209, 174, 0.6);
}

.page-btn.active.playing {
  box-shadow: 0 0 0 2px rgba(75, 209, 174, 0.6);
}

.page-add-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
  color: #8b8ea8;
  border: 1px dashed #c4c9f7;
  cursor: pointer;
  transition: all 0.15s;
}

.page-add-btn:hover {
  border-color: var(--button-color, #5c98ff);
  color: var(--button-color, #5c98ff);
  background: rgba(92, 152, 255, 0.08);
}

.page-add-btn.hidden {
  display: none;
}

.page-remove-btn {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  background: transparent;
  color: #c0392b;
  border: 1px solid #e6d5d3;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
}

.page-remove-btn:hover {
  background: #fdf0ef;
  border-color: #c0392b;
}

.load-button {
  background: var(--button-color, #5c98ff);
  color: #ffffff;
  font-weight: 600;
}

.load-button:hover,
.load-button:focus {
  background: var(--button-color, #5c98ff);
}

.save-button {
  background: var(--button-color, #5c98ff);
  color: #ffffff;
  font-weight: 600;
}

.save-button:hover,
.save-button:focus {
  background: #3bc09d;
}

.save-as-button {
  background: #5a6478;
  color: #ffffff;
  font-weight: 600;
}

.save-as-button:hover,
.save-as-button:focus {
  background: #6d7a91;
}

.share-button {
  background: var(--button-color, #5c98ff);;
  color: #ffffff;
  font-weight: 600;
}

.share-button:hover,
.share-button:focus {
  background: #3bc09d;
}

/* Auth Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal-dialog {
  position: relative;
  width: min(400px, calc(100% - 2rem));
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(20, 32, 88, 0.25);
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #dfe3ff;
  padding-bottom: 0.5rem;
}

.auth-tab {
  background: none;
  border: none;
  font-weight: 600;
  color: #8b8ea8;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: none;
}

.auth-tab:hover {
  color: var(--button-color, #5c98ff);
  background: rgba(92, 152, 255, 0.1);
}

.auth-tab.active {
  color:var(--button-color, #5c98ff);
  background: rgba(92, 152, 255, 0.15);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form input {
  padding: 0.6rem 0.75rem;
  border: 1px solid #d0d4f0;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input:focus {
  border-color: var(--button-color, #5c98ff);
}

.auth-submit-btn {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--button-color, #5c98ff);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-submit-btn:hover {
  background: #4a86ee;
}

.auth-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin: 0;
}

.auth-error.hidden {
  display: none;
}

/* Save Project Modal */
.save-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.save-modal.hidden {
  display: none;
}

.save-modal-dialog {
  position: relative;
  width: min(420px, calc(100% - 2rem));
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(20, 32, 88, 0.25);
}

.save-modal-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2a2d3e;
}

.save-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.save-modal-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #5b5d76;
}

.save-modal-input {
  padding: 0.65rem 0.75rem;
  border: 1px solid #d0d4f0;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.save-modal-input:focus {
  border-color: var(--button-color, #5c98ff);
  box-shadow: 0 0 0 3px rgba(92, 152, 255, 0.15);
}

.save-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.save-modal-cancel-btn {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: #f1f3ff;
  color: #5b5d76;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.save-modal-cancel-btn:hover {
  background: #e3e6ff;
}

.save-modal-save-btn {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  background: #4bd1ae;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.save-modal-save-btn:hover {
  background: #3bc09d;
}

/* Load Project Modal */
.load-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.load-modal.hidden {
  display: none;
}

.load-modal-dialog {
  position: relative;
  width: min(480px, calc(100% - 2rem));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(20, 32, 88, 0.25);
}

.load-modal-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2a2d3e;
}

.load-modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.load-modal-loading {
  text-align: center;
  padding: 2rem 0;
  color: #8b8ea8;
  font-size: 0.9rem;
}

.load-modal-empty {
  text-align: center;
  padding: 2rem 0;
  color: #8b8ea8;
  font-size: 0.9rem;
}

.load-project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.load-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #f8f9ff;
  transition: background 0.15s;
}

.load-project-item:hover {
  background: #eef1ff;
}

.load-project-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.load-project-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--button-color, #5c98ff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-project-date {
  font-size: 0.75rem;
  color: #8b8ea8;
}

.load-project-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.load-project-load-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: var(--button-color, #5c98ff);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.load-project-load-btn:hover {
  background: #4a86ee;
}

.load-project-load-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.load-project-delete-btn {
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background: transparent;
  color: #c0392b;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid #e6d5d3;
  cursor: pointer;
  transition: all 0.15s;
}

.load-project-delete-btn:hover {
  background: #fdf0ef;
  border-color: #c0392b;
}

.load-project-delete-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.delete-track-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.delete-track-dialog {
  position: relative;
  width: min(340px, calc(100% - 2rem));
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  z-index: 1;
}

.delete-track-dialog h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.delete-track-dialog p {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.delete-track-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.delete-track-cancel {
  padding: 0.45rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #555;
  cursor: pointer;
  font-size: 0.85rem;
}

.delete-track-confirm {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 6px;
  background: #e74c3c;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.delete-track-confirm:hover {
  background: #c0392b;
}

.slice-btn {
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 4px;
  background: #e67e22;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.slice-btn:hover:not(:disabled) {
  background: #d35400;
}

.slice-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.slice-add-btn {
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 4px;
  background: #27ae60;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.slice-add-btn:hover {
  background: #219a52;
}

.slice-cancel-btn {
  padding: 0.35rem 0.7rem;
  border: 1px solid #888;
  border-radius: 4px;
  background: transparent;
  color: #888;
  font-size: 0.78rem;
  cursor: pointer;
}

.slice-cancel-btn:hover {
  background: rgba(255,255,255,0.05);
  color: #ccc;
}

