
.sfk-client-app{
  --accent:#4f46e5;
  --line:#e5e7eb;
  --muted:#6b7280;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
.sfk-client-settings{
  display:grid;
  grid-template-columns:100px 120px 100px 100px minmax(150px,1fr) auto;
  gap:8px;
  align-items:end;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  margin-bottom:12px;
}
.sfk-client-settings label{display:block;font-size:12px;font-weight:700;margin-bottom:4px}
.sfk-client-settings input,.sfk-client-settings select{
  width:100%;padding:8px;border:1px solid var(--line);border-radius:9px;background:#fff
}
.sfk-btn{border:0;border-radius:9px;padding:9px 12px;font-weight:700;cursor:pointer}
.sfk-create,.sfk-play{background:var(--accent);color:#fff}
.sfk-pause,.sfk-stop,.sfk-replay{background:#f3f4f6;color:#111827}
.sfk-client-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.sfk-client-controls{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.sfk-loop-label{display:flex;gap:5px;align-items:center;font-size:13px}
.sfk-client-status{font-size:12px;color:var(--muted)}
.sfk-client-bars{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.sfk-client-bar{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:#fff;
  transition:.12s ease;
}
.sfk-client-bar.playing{
  background:#eef2ff;
  border-color:#818cf8;
  box-shadow:0 0 0 2px rgba(79,70,229,.12);
}
.sfk-bar-head{font-weight:800;margin-bottom:8px}
.sfk-beat-row{display:grid;gap:5px}
.sfk-beat-slot{border:1px solid var(--line);border-radius:8px;padding:6px;background:#fafafa}
.sfk-beat-slot label{display:block;font-size:10px;color:var(--muted);margin-bottom:3px}
.sfk-beat-slot input{
  width:100%;border:0;background:transparent;text-align:center;font-size:18px;font-weight:900;outline:none
}
@media(max-width:980px){
  .sfk-client-settings{grid-template-columns:repeat(3,1fr)}
  .sfk-client-bars{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .sfk-client-settings{grid-template-columns:repeat(2,1fr)}
  .sfk-client-bars{grid-template-columns:1fr}
}

.sfk-more-options-wrap{margin:-2px 0 12px}
.sfk-more-toggle{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px 11px;font-weight:700;cursor:pointer}
.sfk-more-options{margin-top:8px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fafafa;display:flex;gap:14px;flex-wrap:wrap}
.sfk-more-options[hidden]{display:none}
.sfk-more-options label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600}
.sfk-more-options input{margin:0}

/* v0.3.3: explicit chord input for every beat */
.sfk-beat-slot{background:#fff;border:1px solid #dbe1ea}
.sfk-beat-slot label{font-size:11px;font-weight:800;color:#374151}
.sfk-beat-slot input.sfk-chord-input{
  display:block!important;
  width:100%!important;
  min-width:0;
  min-height:42px;
  padding:8px 6px!important;
  border:1px solid #cbd5e1!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#111827!important;
  text-align:center;
  font-size:18px!important;
  font-weight:800!important;
  line-height:1.2;
}
.sfk-beat-slot input.sfk-chord-input:focus{
  border-color:#4f46e5!important;
  box-shadow:0 0 0 2px rgba(79,70,229,.12);
  outline:none;
}
.sfk-beat-slot input.sfk-chord-input.has-chord{background:#eef2ff!important}


/* v0.3.6: per-measure transitions / fills */
.sfk-bar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.sfk-transition-wrap{
  display:flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  font-weight:600;
  color:#6b7280;
}
.sfk-transition-select{
  max-width:118px;
  padding:5px 6px;
  border:1px solid #dbe1ea;
  border-radius:7px;
  background:#fff;
  font-size:11px;
  color:#374151;
}
.sfk-client-bar.has-transition{
  border-color:#c4b5fd;
}
.sfk-client-bar.has-transition .sfk-bar-head{
  color:#4338ca;
}

.sfk-client-bar{cursor:pointer}
.sfk-client-bar:hover{border-color:#a5b4fc}

.sfk-more-options-toggle{
  background:#111827 !important;
  color:#ffffff !important;
  border:1px solid #111827 !important;
  border-radius:9px;
  padding:9px 12px;
  font-weight:800;
  line-height:1.2;
  box-shadow:0 1px 2px rgba(0,0,0,.08);
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.sfk-more-options-toggle:hover,
.sfk-more-options-toggle:focus{
  background:#374151 !important;
  color:#ffffff !important;
  border-color:#374151 !important;
  outline:none;
}
.sfk-more-options-toggle:active{
  transform:translateY(1px);
}
.sfk-more-options-toggle[aria-expanded="true"]{
  background:#4f46e5 !important;
  border-color:#4f46e5 !important;
  color:#ffffff !important;
}

.sfk-bar-head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:8px;
}
.sfk-measure-title{
  font-weight:800;
  white-space:nowrap;
}
.sfk-measure-actions{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  justify-content:flex-start;
}
.sfk-measure-action{
  appearance:none;
  border:1px solid #d1d5db;
  background:#f9fafb;
  color:#374151;
  border-radius:7px;
  padding:4px 7px;
  font-size:11px;
  line-height:1.2;
  font-weight:700;
  cursor:pointer;
}
.sfk-measure-action:hover,
.sfk-measure-action:focus{
  border-color:#6366f1;
  background:#eef2ff;
  color:#3730a3;
  outline:none;
}
.sfk-delete-measure{
  color:#b42318;
  border-color:#fecaca;
  background:#fff7f7;
}
.sfk-delete-measure:hover,
.sfk-delete-measure:focus{
  color:#991b1b;
  border-color:#f87171;
  background:#fef2f2;
}
@media(max-width:780px){
  .sfk-bar-head{
    grid-template-columns:1fr;
  }
  .sfk-transition-wrap{
    justify-self:start;
  }
}

/* v0.4.3 compact measure controls */
.sfk-client-bar{position:relative}
.sfk-measure-actions{
  position:absolute !important;
  top:-10px !important;
  left:-10px !important;
  z-index:5;
  display:flex !important;
  gap:3px !important;
}
.sfk-measure-icon{
  appearance:none;
  width:18px;
  height:18px;
  min-width:18px;
  padding:0;
  border:1px solid #d1d5db;
  border-radius:50%;
  background:#fff;
  color:#4b5563;
  font-size:13px;
  font-weight:800;
  line-height:16px;
  text-align:center;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.08);
}
.sfk-measure-icon:hover,
.sfk-measure-icon:focus{
  border-color:#6366f1;
  background:#eef2ff;
  color:#3730a3;
  outline:none;
}
.sfk-measure-icon.sfk-delete-measure{
  color:#b42318;
  border-color:#fecaca;
}
.sfk-measure-icon.sfk-delete-measure:hover,
.sfk-measure-icon.sfk-delete-measure:focus{
  color:#991b1b;
  border-color:#f87171;
  background:#fef2f2;
}

/* v0.4.4: keep measure controls inside the measure border */
.sfk-client-bar{
  position:relative;
  padding-top:30px;
}
.sfk-measure-actions{
  position:absolute !important;
  top:8px !important;
  left:8px !important;
  z-index:5;
  display:flex !important;
  gap:4px !important;
}
.sfk-measure-icon{
  width:18px;
  height:18px;
  min-width:18px;
  line-height:16px;
  box-shadow:none;
}
.sfk-measure-title{
  padding-left:0;
}

/* v0.4.5 chord-entry keyboard workflow and validation */
.sfk-chord-input.sfk-invalid-chord{
  border-color:#dc2626 !important;
  background:#fef2f2 !important;
  color:#991b1b !important;
  box-shadow:0 0 0 2px rgba(220,38,38,.10);
}
.sfk-chord-input.sfk-invalid-chord:focus{
  outline:none;
  border-color:#b91c1c !important;
}

/* v0.4.9: More Options text/button polish */
.sfk-more-options-toggle{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px;
  min-height:36px;
  padding:8px 12px !important;
  background:#f3f4f6 !important;
  color:#111827 !important;
  border:1px solid #d1d5db !important;
  border-radius:8px !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1 !important;
  text-align:center !important;
  text-decoration:none !important;
  white-space:nowrap;
  box-shadow:none !important;
}
.sfk-more-options-toggle:hover,
.sfk-more-options-toggle:focus{
  background:#e5e7eb !important;
  color:#111827 !important;
  border-color:#9ca3af !important;
  outline:none !important;
}
.sfk-more-options-toggle:active{
  background:#d1d5db !important;
  color:#111827 !important;
  transform:none !important;
}
.sfk-more-options-toggle[aria-expanded="true"]{
  background:#eef2ff !important;
  color:#3730a3 !important;
  border-color:#a5b4fc !important;
}

/* v0.5.0 Clear All Chords button */
.sfk-clear-chords{
  background:#fff !important;
  color:#b42318 !important;
  border:1px solid #fecaca !important;
  border-radius:8px !important;
  font-weight:700 !important;
}
.sfk-clear-chords:hover,
.sfk-clear-chords:focus{
  background:#fef2f2 !important;
  color:#991b1b !important;
  border-color:#f87171 !important;
  outline:none !important;
}
.sfk-clear-chords:active{
  background:#fee2e2 !important;
}

/* v0.5.1 colorful kid-friendly UI refresh */
.sfk-client-app{
  --accent:#7c3aed;
  --accent-2:#ec4899;
  --accent-3:#06b6d4;
  --sun:#f59e0b;
  --lime:#84cc16;
  --soft-bg:#fffdf8;
  --card:#ffffff;
  --line:#eadcff;
  --muted:#6b7280;
  font-family:"Trebuchet MS","Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,230,179,.55), transparent 28%),
    radial-gradient(circle at top right, rgba(191,219,254,.55), transparent 24%),
    linear-gradient(180deg, #fffaf0 0%, #fefcff 100%);
  border:2px solid #f3e8ff;
  border-radius:22px;
  padding:16px;
  box-shadow:0 14px 34px rgba(124,58,237,.08);
}

.sfk-client-settings{
  background:linear-gradient(135deg,#fff7ed 0%,#fdf2f8 48%,#eff6ff 100%);
  border:2px solid #f5d0fe;
  border-radius:18px;
  padding:14px;
  box-shadow:0 8px 22px rgba(236,72,153,.08);
}

.sfk-client-settings label{
  font-size:12px;
  font-weight:800;
  color:#7c2d12;
  letter-spacing:.02em;
}

.sfk-client-settings input,
.sfk-client-settings select{
  background:#ffffff;
  border:2px solid #e9d5ff;
  border-radius:12px;
  min-height:42px;
  font-size:14px;
  font-weight:700;
  color:#1f2937;
  box-shadow:0 2px 0 rgba(255,255,255,.9) inset;
}

.sfk-client-settings input:focus,
.sfk-client-settings select:focus{
  border-color:#8b5cf6;
  outline:none;
  box-shadow:0 0 0 4px rgba(139,92,246,.12);
}

.sfk-client-toolbar{
  margin-top:10px;
  padding:10px 12px;
  background:linear-gradient(135deg,#eef2ff 0%,#fdf2f8 100%);
  border:2px solid #ddd6fe;
  border-radius:16px;
}

.sfk-client-controls{
  gap:8px;
}

.sfk-btn{
  min-height:38px;
  padding:9px 14px;
  border-radius:12px;
  border:2px solid transparent;
  font-size:13px;
  font-weight:800;
  letter-spacing:.01em;
  box-shadow:0 4px 0 rgba(0,0,0,.06);
}

.sfk-play{
  background:linear-gradient(135deg,#8b5cf6 0%,#ec4899 100%) !important;
  color:#fff !important;
  border-color:#c084fc !important;
}

.sfk-pause{
  background:linear-gradient(135deg,#fde68a 0%,#f59e0b 100%) !important;
  color:#7c2d12 !important;
  border-color:#fbbf24 !important;
}

.sfk-stop{
  background:linear-gradient(135deg,#fecaca 0%,#f87171 100%) !important;
  color:#7f1d1d !important;
  border-color:#fca5a5 !important;
}

.sfk-replay{
  background:linear-gradient(135deg,#bfdbfe 0%,#38bdf8 100%) !important;
  color:#0c4a6e !important;
  border-color:#7dd3fc !important;
}

.sfk-btn:hover,
.sfk-btn:focus{
  transform:translateY(-1px);
  filter:saturate(1.04);
  outline:none;
}

.sfk-btn:active{
  transform:translateY(1px);
  box-shadow:0 2px 0 rgba(0,0,0,.06);
}

.sfk-loop-label{
  background:#ffffff;
  border:2px solid #ddd6fe;
  border-radius:999px;
  padding:7px 10px;
  font-weight:700;
  color:#4c1d95;
}

.sfk-client-status{
  color:#6d28d9;
  font-size:12px;
  font-weight:700;
}

.sfk-client-bars{
  gap:12px;
  margin-top:12px;
}

.sfk-client-bar{
  background:linear-gradient(180deg,#ffffff 0%,#fffdfb 100%);
  border:2px solid #e9d5ff;
  border-radius:18px;
  box-shadow:0 8px 20px rgba(124,58,237,.08);
  overflow:visible;
}

.sfk-client-bar:nth-child(4n+1){border-color:#f5c2e7;}
.sfk-client-bar:nth-child(4n+2){border-color:#bfdbfe;}
.sfk-client-bar:nth-child(4n+3){border-color:#fde68a;}
.sfk-client-bar:nth-child(4n+4){border-color:#bbf7d0;}

.sfk-client-bar.playing{
  background:linear-gradient(180deg,#fef3c7 0%,#fff7ed 100%);
  border-color:#f59e0b !important;
  box-shadow:0 0 0 4px rgba(245,158,11,.15), 0 12px 26px rgba(245,158,11,.14);
}

.sfk-bar-head{
  margin-bottom:10px;
}

.sfk-measure-title{
  color:#7c3aed;
  font-weight:900;
  font-size:15px;
}

.sfk-transition-wrap{
  background:#faf5ff;
  border:1px solid #e9d5ff;
  border-radius:12px;
  padding:5px 8px;
  color:#6d28d9;
  font-size:11px;
  font-weight:800;
}

.sfk-transition-wrap select{
  border:1px solid #d8b4fe;
  border-radius:8px;
  background:#fff;
  color:#4c1d95;
  font-weight:700;
}

.sfk-beat-slot{
  background:linear-gradient(180deg,#ffffff 0%,#f9fafb 100%);
  border:2px solid #e5e7eb;
  border-radius:14px;
  min-height:78px;
  transition:.14s ease;
}

.sfk-beat-slot:nth-child(1){background:linear-gradient(180deg,#fef2f2 0%,#fff 100%);}
.sfk-beat-slot:nth-child(2){background:linear-gradient(180deg,#eff6ff 0%,#fff 100%);}
.sfk-beat-slot:nth-child(3){background:linear-gradient(180deg,#fefce8 0%,#fff 100%);}
.sfk-beat-slot:nth-child(4){background:linear-gradient(180deg,#f0fdf4 0%,#fff 100%);}

.sfk-beat-slot:hover{
  border-color:#c4b5fd;
  transform:translateY(-1px);
}

.sfk-beat-slot label{
  font-size:11px;
  font-weight:800;
  color:#7c3aed;
}

.sfk-chord-input{
  color:#111827 !important;
  font-size:20px !important;
  font-weight:900 !important;
  letter-spacing:.02em;
  text-transform:none;
}

.sfk-chord-input.has-chord{
  color:#be185d !important;
}

.sfk-more-options-toggle{
  background:linear-gradient(135deg,#ffffff 0%,#f3e8ff 100%) !important;
  color:#5b21b6 !important;
  border:2px solid #d8b4fe !important;
  border-radius:12px !important;
  box-shadow:0 4px 0 rgba(91,33,182,.05) !important;
}

.sfk-more-options-toggle:hover,
.sfk-more-options-toggle:focus{
  background:linear-gradient(135deg,#faf5ff 0%,#ede9fe 100%) !important;
  color:#4c1d95 !important;
  border-color:#a78bfa !important;
}

.sfk-more-options-toggle[aria-expanded="true"]{
  background:linear-gradient(135deg,#ddd6fe 0%,#fbcfe8 100%) !important;
  color:#4c1d95 !important;
  border-color:#8b5cf6 !important;
}

.sfk-clear-chords{
  background:linear-gradient(135deg,#fff1f2 0%,#ffe4e6 100%) !important;
  color:#be123c !important;
  border:2px solid #fda4af !important;
  box-shadow:0 4px 0 rgba(190,24,93,.05) !important;
}

.sfk-clear-chords:hover,
.sfk-clear-chords:focus{
  background:linear-gradient(135deg,#ffe4e6 0%,#fecdd3 100%) !important;
  color:#9f1239 !important;
  border-color:#fb7185 !important;
}

.sfk-measure-icon{
  background:#ffffff !important;
  border:2px solid #ddd6fe !important;
  color:#6d28d9 !important;
}

.sfk-measure-icon:hover,
.sfk-measure-icon:focus{
  background:#f3e8ff !important;
  border-color:#a78bfa !important;
  color:#5b21b6 !important;
}

.sfk-measure-icon.sfk-delete-measure{
  color:#be123c !important;
  border-color:#fecdd3 !important;
}

.sfk-measure-icon.sfk-delete-measure:hover,
.sfk-measure-icon.sfk-delete-measure:focus{
  background:#fff1f2 !important;
  border-color:#fb7185 !important;
  color:#9f1239 !important;
}

.sfk-chord-input.sfk-invalid-chord{
  background:#fff1f2 !important;
  border-radius:10px;
}

@media(max-width:700px){
  .sfk-client-app{
    padding:12px;
    border-radius:18px;
  }
  .sfk-btn{
    min-height:36px;
    padding:8px 12px;
  }
  .sfk-beat-slot{
    min-height:72px;
  }
}

/* v0.5.2: instrument toggles always visible; no More Options button */
.sfk-more-panel,
.sfk-more-options-panel{
  display:flex !important;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}
.sfk-more-panel.hidden,
.sfk-more-options-panel.hidden,
.sfk-more-panel.sfk-hidden,
.sfk-more-options-panel.sfk-hidden{
  display:flex !important;
}
.sfk-more-options-toggle{
  display:none !important;
}

/* v0.5.5 — master beat volume */
.sfk-volume-control{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:38px;
  padding:5px 8px;
  background:linear-gradient(135deg,#ecfeff 0%,#eff6ff 100%);
  border:2px solid #bae6fd;
  border-radius:13px;
  color:#0c4a6e;
  box-shadow:0 4px 0 rgba(14,116,144,.05);
}
.sfk-volume-icon{
  font-size:15px;
  line-height:1;
}
.sfk-volume-step{
  appearance:none;
  width:25px;
  height:25px;
  min-width:25px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #7dd3fc;
  border-radius:50%;
  background:#fff;
  color:#0369a1;
  font-size:17px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}
.sfk-volume-step:hover,
.sfk-volume-step:focus{
  background:#e0f2fe;
  border-color:#38bdf8;
  outline:none;
}
.sfk-volume-slider{
  width:108px;
  height:5px;
  accent-color:#0ea5e9;
  cursor:pointer;
}
.sfk-volume-value{
  min-width:36px;
  font-size:11px;
  font-weight:900;
  text-align:right;
  color:#075985;
}
@media(max-width:700px){
  .sfk-volume-control{
    width:100%;
    justify-content:center;
  }
  .sfk-volume-slider{
    flex:1;
    max-width:180px;
  }
}

/* v0.5.6 — restore Style + always-visible instrument switches */
.sfk-instrument-toggles{
  display:flex !important;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0;
  padding:9px 10px;
  background:linear-gradient(135deg,#f0fdf4 0%,#eff6ff 52%,#faf5ff 100%);
  border:2px solid #dbeafe;
  border-radius:14px;
}
.sfk-instrument-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  margin:0;
  background:#fff;
  border:1px solid #d8b4fe;
  border-radius:999px;
  color:#4c1d95;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  user-select:none;
}
.sfk-instrument-toggle:hover{
  background:#faf5ff;
  border-color:#a78bfa;
}
.sfk-instrument-toggle input{
  width:15px;
  height:15px;
  margin:0;
  accent-color:#7c3aed;
}
.sfk-client-settings .sfk-style{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  width:100%;
  min-width:145px;
}

/* v0.5.7 — optional note line in every measure */
.sfk-measure-note-wrap{
  margin:2px 0 9px;
}
.sfk-measure-note{
  width:100%;
  min-height:30px;
  box-sizing:border-box;
  padding:6px 9px;
  border:1px dashed #d8b4fe;
  border-radius:9px;
  background:rgba(250,245,255,.78);
  color:#6b21a8;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
}
.sfk-measure-note::placeholder{
  color:#a78bfa;
  font-weight:600;
}
.sfk-measure-note:focus{
  outline:none;
  border-style:solid;
  border-color:#8b5cf6;
  background:#fff;
  box-shadow:0 0 0 3px rgba(139,92,246,.10);
}

/* v0.6.6 — client sound preset selectors */
.sfk-sound-palette{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:9px 0;
  padding:9px 10px;
  border:2px solid #dbeafe;
  border-radius:14px;
  background:linear-gradient(135deg,#f0f9ff 0%,#faf5ff 100%);
}
.sfk-sound-palette-title{
  font-size:12px;
  font-weight:900;
  color:#5b21b6;
  margin-right:2px;
}
.sfk-sound-palette label{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:11px;
  font-weight:800;
  color:#374151;
}
.sfk-sound-palette select{
  max-width:130px;
  min-height:30px;
  padding:4px 6px;
  border:1px solid #c4b5fd;
  border-radius:8px;
  background:#fff;
  font-size:11px;
  font-weight:700;
}

/* v0.6.7 — sound dropdowns integrated into Instruments */
.sfk-instruments-panel{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:10px 0;
  padding:10px 12px;
  border:2px solid #ddd6fe;
  border-radius:16px;
  background:linear-gradient(135deg,#faf5ff 0%,#eff6ff 100%);
}
.sfk-instruments-title{
  font-size:12px;
  font-weight:900;
  color:#5b21b6;
  margin-right:2px;
}
.sfk-instrument-card{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  border:1px solid #e9d5ff;
  border-radius:11px;
  background:#fff;
}
.sfk-instrument-guitar{
  border-color:#c4b5fd;
  background:linear-gradient(135deg,#ffffff 0%,#faf5ff 100%);
}
.sfk-instrument-card .sfk-instrument-toggle{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin:0;
  white-space:nowrap;
  font-size:12px;
  font-weight:800;
  color:#374151;
}
.sfk-instrument-card .sfk-sound-select{
  min-width:120px;
  max-width:155px;
  min-height:30px;
  padding:4px 7px;
  border:1px solid #c4b5fd;
  border-radius:8px;
  background:#fff;
  color:#312e81;
  font-size:11px;
  font-weight:700;
}
.sfk-instrument-card .sfk-sound-select:focus{
  outline:none;
  border-color:#8b5cf6;
  box-shadow:0 0 0 3px rgba(139,92,246,.1);
}
.sfk-instrument-drums{
  flex-wrap:wrap;
}
.sfk-drum-sound-row{
  display:flex;
  gap:4px;
  flex-wrap:wrap;
}
.sfk-instrument-drums .sfk-sound-select{
  min-width:105px;
  max-width:120px;
}
.sfk-sound-palette{
  display:none !important;
}
@media(max-width:760px){
  .sfk-instruments-panel{
    align-items:stretch;
  }
  .sfk-instrument-card{
    width:100%;
    justify-content:space-between;
  }
  .sfk-instrument-card .sfk-sound-select{
    flex:1;
    max-width:none;
  }
  .sfk-instrument-drums .sfk-drum-sound-row{
    width:100%;
  }
  .sfk-instrument-drums .sfk-sound-select{
    flex:1 1 30%;
    max-width:none;
  }
}

/* v0.7.0 — collapsible Instruments */
.sfk-instruments-panel{display:block;padding:0;overflow:hidden;}
.sfk-instruments-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;}
.sfk-instruments-title{margin:0;}
.sfk-instruments-toggle-more{border:0;background:transparent;padding:3px 2px;color:#6d28d9;font-size:12px;font-weight:800;cursor:pointer;}
.sfk-instruments-toggle-more:hover,.sfk-instruments-toggle-more:focus{text-decoration:underline;outline:none;}
.sfk-instruments-toggle-more::before{content:"– ";color:#8b5cf6;}
.sfk-instruments-body{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 12px 11px;border-top:1px solid rgba(196,181,253,.55);}
.sfk-instruments-body[hidden]{display:none!important;}
@media(max-width:760px){.sfk-instruments-body{flex-direction:column;align-items:stretch;}}

/* v0.7.4 — Loop Region */
.sfk-loop-region{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 7px;
  border:1px solid #c4b5fd;
  border-radius:9px;
  background:#faf5ff;
}
.sfk-loop-region label{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin:0;
  font-size:11px;
  font-weight:800;
  color:#4c1d95;
}
.sfk-loop-region select{
  min-height:28px;
  max-width:112px;
  padding:3px 5px;
  border:1px solid #ddd6fe;
  border-radius:7px;
  background:#fff;
  font-size:11px;
}
@media(max-width:720px){
  .sfk-loop-region{
    width:100%;
    justify-content:flex-start;
  }
}

/* v0.7.7 — finite loop repeats */
.sfk-loop-region .sfk-loop-count{
  min-width:58px;
}
.sfk-loop-region select:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* v0.7.8 — visual Loop Region band */
.sfk-client-bar.sfk-loop-region-bar{
  background:linear-gradient(180deg,#fff7ed 0%,#ffedd5 100%);
  border-color:#fdba74;
  box-shadow:inset 0 3px 0 #fb923c;
}
.sfk-client-bar.sfk-loop-region-start{
  border-left:3px solid #f97316;
}
.sfk-client-bar.sfk-loop-region-end{
  border-right:3px solid #f97316;
}
.sfk-client-bar{
  position:relative;
}
.sfk-client-bar.sfk-loop-region-bar.playing{
  box-shadow:inset 0 3px 0 #fb923c,0 0 0 3px rgba(59,130,246,.25);
}

/* v0.7.9 — D.C. / D.S. / Fine / Coda navigation */
.sfk-navigation-select{
  min-height:28px;
  max-width:132px;
  padding:3px 6px;
  border:1px solid #c7d2fe;
  border-radius:8px;
  background:#eef2ff;
  color:#3730a3;
  font-size:10px;
  font-weight:800;
}
.sfk-navigation-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  margin:7px 0 2px;
  padding:3px 8px;
  border-radius:999px;
  background:#eef2ff;
  border:1px solid #a5b4fc;
  color:#3730a3;
  font-size:10px;
  font-weight:900;
  letter-spacing:.02em;
}
.sfk-nav-fine{
  background:#ecfdf5;
  border-color:#86efac;
  color:#166534;
}
.sfk-nav-to_coda,
.sfk-nav-coda,
.sfk-nav-dc_coda,
.sfk-nav-ds_coda{
  background:#fdf4ff;
  border-color:#e879f9;
  color:#86198f;
}
.sfk-nav-segno,
.sfk-nav-dc_fine,
.sfk-nav-ds_fine{
  background:#eff6ff;
  border-color:#93c5fd;
  color:#1d4ed8;
}
@media(max-width:760px){
  .sfk-navigation-select{
    max-width:116px;
  }
}

/* v0.8.0 — Navigation moved into measure corner */
.sfk-client-bar{
  position:relative;
  padding-top:38px;
}
.sfk-navigation-corner{
  position:absolute;
  top:6px;
  right:7px;
  z-index:4;
  display:flex;
  align-items:center;
  gap:5px;
}
.sfk-navigation-corner .sfk-navigation-select{
  min-height:25px;
  max-width:126px;
  padding:2px 5px;
  border-radius:7px;
  font-size:9px;
}
.sfk-navigation-corner .sfk-navigation-badge{
  margin:0;
  padding:2px 6px;
  font-size:8px;
  white-space:nowrap;
}
.sfk-client-bar .sfk-bar-head{
  padding-right:0;
}
.sfk-client-bar.sfk-loop-region-start,
.sfk-client-bar.sfk-loop-region-end{
  /* Loop boundary is communicated by color/border only; no text labels. */
}
@media(max-width:760px){
  .sfk-client-bar{
    padding-top:42px;
  }
  .sfk-navigation-corner{
    left:7px;
    right:auto;
    max-width:calc(100% - 14px);
  }
  .sfk-navigation-corner .sfk-navigation-select{
    max-width:118px;
  }
}

/* v0.8.1 — selected Navigation label lives inside the Navigation control */
.sfk-navigation-corner .sfk-navigation-select{
  font-weight:900;
  min-width:92px;
}
.sfk-navigation-corner .sfk-nav-value-none{
  background:#f8fafc;
  border-color:#cbd5e1;
  color:#64748b;
}
.sfk-navigation-corner .sfk-nav-value-segno,
.sfk-navigation-corner .sfk-nav-value-dc_fine,
.sfk-navigation-corner .sfk-nav-value-ds_fine{
  background:#eff6ff;
  border-color:#93c5fd;
  color:#1d4ed8;
}
.sfk-navigation-corner .sfk-nav-value-fine{
  background:#ecfdf5;
  border-color:#86efac;
  color:#166534;
}
.sfk-navigation-corner .sfk-nav-value-to_coda,
.sfk-navigation-corner .sfk-nav-value-coda,
.sfk-navigation-corner .sfk-nav-value-dc_coda,
.sfk-navigation-corner .sfk-nav-value-ds_coda{
  background:#fdf4ff;
  border-color:#e879f9;
  color:#86198f;
}
.sfk-navigation-corner .sfk-navigation-badge{
  display:none !important;
}

/* v0.8.2 — custom drawn Coda icon */
.sfk-navigation-corner{
  align-items:center;
}
.sfk-coda-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  flex:0 0 18px;
}
.sfk-coda-icon svg{
  width:18px;
  height:18px;
  stroke:#111827;
  stroke-width:4.5;
  fill:none;
  stroke-linecap:square;
  stroke-linejoin:miter;
}
.sfk-navigation-corner .sfk-navigation-select{
  min-width:104px;
}

/* v0.8.3 — custom drawn Segno icon */
.sfk-segno-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  flex:0 0 18px;
}
.sfk-segno-icon svg{
  width:18px;
  height:18px;
  stroke:#111827;
  stroke-width:4.2;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.sfk-segno-icon circle{
  fill:#111827;
  stroke:none;
}

/* v0.8.6 — drag and drop measure reordering */
.sfk-drag-measure{
  cursor:grab;
  font-size:13px;
  line-height:1;
  letter-spacing:-2px;
  user-select:none;
}
.sfk-drag-measure:active{
  cursor:grabbing;
}
.sfk-client-bar{
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.sfk-client-bar.sfk-dragging{
  opacity:.45;
  transform:scale(.985);
}
.sfk-client-bar.sfk-drag-over-before{
  box-shadow:inset 0 4px 0 #7c3aed,0 0 0 2px rgba(124,58,237,.12);
}
.sfk-client-bar.sfk-drag-over-after{
  box-shadow:inset 0 -4px 0 #7c3aed,0 0 0 2px rgba(124,58,237,.12);
}

/* v0.8.7 — animated measure insertion / push-right effect */
.sfk-client-bars{
  position:relative;
}
.sfk-client-bar{
  will-change:transform,opacity;
}
.sfk-client-bar.sfk-measure-inserted{
  animation:sfkMeasureInsert .38s cubic-bezier(.2,.85,.25,1);
}
@keyframes sfkMeasureInsert{
  0%{
    opacity:0;
    transform:scale(.92) translateX(-18px);
  }
  65%{
    opacity:1;
    transform:scale(1.02) translateX(2px);
  }
  100%{
    opacity:1;
    transform:scale(1) translateX(0);
  }
}
@media (prefers-reduced-motion: reduce){
  .sfk-client-bar,
  .sfk-client-bar.sfk-measure-inserted{
    animation:none !important;
    transition:none !important;
  }
}

/* v0.8.8 — stronger visible measure-shift animation */
.sfk-client-bars.sfk-layout-shifting{
  overflow:visible;
}
.sfk-client-bars.sfk-layout-shifting .sfk-client-bar{
  will-change:transform,opacity;
}
.sfk-client-bars.sfk-layout-shifting::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:12px;
  animation:sfkLayoutShiftFlash .55s ease-out;
}
@keyframes sfkLayoutShiftFlash{
  0%{box-shadow:inset 0 0 0 2px rgba(124,58,237,.16)}
  100%{box-shadow:inset 0 0 0 0 rgba(124,58,237,0)}
}

/* The older insertion animation remains as fallback, but the Web Animations
   movement in v0.8.8 is now the primary effect. */
.sfk-client-bar.sfk-measure-inserted{
  animation-duration:.52s;
}

/* v0.8.9 — live drag-insert preview */
.sfk-client-bar.sfk-drag-preview-shift{
  transform:translate(var(--sfk-drag-dx,0),var(--sfk-drag-dy,0));
  transition:transform .28s cubic-bezier(.2,.8,.2,1);
}
.sfk-client-bar.sfk-dragging{
  opacity:.32;
  transform:scale(.97);
  box-shadow:0 8px 22px rgba(0,0,0,.14);
}
.sfk-client-bar.sfk-drag-over-before{
  box-shadow:inset 5px 0 0 #7c3aed,0 0 0 2px rgba(124,58,237,.12);
}
.sfk-client-bar.sfk-drag-over-after{
  box-shadow:inset -5px 0 0 #7c3aed,0 0 0 2px rgba(124,58,237,.12);
}
.sfk-drag-measure-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
@media(max-width:1100px){
  .sfk-drag-measure-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .sfk-drag-measure-grid{grid-template-columns:1fr}
}

/* v0.9.0 — pastel rainbow measure palette */
.sfk-client-bar{
  background:var(--sfk-measure-bg,#fff) !important;
  border-color:var(--sfk-measure-border,#e5e7eb) !important;
}
.sfk-client-bar .sfk-measure-title{
  color:#1f2937;
}
.sfk-client-bar.sfk-loop-region-bar{
  background:var(--sfk-measure-bg,#fff) !important;
  border-color:var(--sfk-measure-border,#e5e7eb) !important;
  box-shadow:inset 0 3px 0 var(--sfk-measure-accent,#8b5cf6);
}
.sfk-client-bar.sfk-loop-region-start{
  border-left:3px solid var(--sfk-measure-accent,#8b5cf6) !important;
}
.sfk-client-bar.sfk-loop-region-end{
  border-right:3px solid var(--sfk-measure-accent,#8b5cf6) !important;
}
.sfk-client-bar.sfk-loop-region-bar.playing{
  box-shadow:
    inset 0 3px 0 var(--sfk-measure-accent,#8b5cf6),
    0 0 0 3px rgba(59,130,246,.28);
}

/* v0.9.1 — subtle insertion gap while dragging */
.sfk-client-bar.sfk-drag-preview-shift{
  transform:none !important;
}
.sfk-client-bar.sfk-drag-preview-gap{
  transform:translateX(var(--sfk-gap-shift,14px)) !important;
  transition:transform .18s ease-out !important;
}
.sfk-client-bar.sfk-drag-over-before{
  box-shadow:inset 3px 0 0 #7c3aed,0 0 0 1px rgba(124,58,237,.10);
}
.sfk-client-bar.sfk-drag-over-after{
  box-shadow:inset -3px 0 0 #7c3aed,0 0 0 1px rgba(124,58,237,.10);
}

/* v0.9.2 — dynamic drag/drop for newly added measures */
.sfk-client-bars{
  min-height:40px;
}

/* v0.9.3 — redesigned measure layout */
.sfk-client-bar{
  padding-top:10px !important;
}
.sfk-measure-top{
  display:grid;
  grid-template-columns:32px 1fr 32px;
  align-items:center;
  min-height:30px;
  margin-bottom:8px;
}
.sfk-measure-top .sfk-insert-before{
  grid-column:1;
  justify-self:start;
}
.sfk-measure-top .sfk-delete-measure{
  grid-column:3;
  justify-self:end;
}
.sfk-measure-title{
  grid-column:2;
  text-align:center;
  font-size:13px;
  font-weight:900;
  line-height:1.2;
  color:#1f2937;
  cursor:grab;
  user-select:none;
}
.sfk-measure-title:active{cursor:grabbing}
.sfk-measure-top .sfk-measure-icon{
  width:26px;
  height:26px;
  min-width:26px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  font-size:17px;
  font-weight:800;
}
.sfk-client-bar .sfk-bar-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  padding:0 !important;
  margin:0 0 8px;
}
.sfk-transition-wrap,
.sfk-navigation-inline{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.sfk-transition-select,
.sfk-navigation-inline .sfk-navigation-select{
  min-height:28px;
  height:28px;
  font-size:10px;
  padding:3px 6px;
  border-radius:8px;
}
.sfk-transition-select{max-width:116px}
.sfk-navigation-inline .sfk-navigation-select{
  min-width:92px;
  max-width:126px;
}
.sfk-navigation-inline .sfk-coda-icon,
.sfk-navigation-inline .sfk-segno-icon{
  width:16px;
  height:16px;
  flex-basis:16px;
}
.sfk-navigation-inline .sfk-coda-icon svg,
.sfk-navigation-inline .sfk-segno-icon svg{
  width:16px;
  height:16px;
}
.sfk-navigation-corner{display:none !important}
.sfk-measure-actions{display:none !important}
@media(max-width:760px){
  .sfk-client-bar{padding-top:10px !important}
  .sfk-client-bar .sfk-bar-head{flex-wrap:wrap}
}

/* v0.9.9 — Bar Zoom */
.sfk-client-app{
  --sfk-bar-scale:1;
}
.sfk-bar-zoom-control{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:34px;
  padding:4px 7px;
  border:1px solid #dbe1ea;
  border-radius:9px;
  background:#fff;
}
.sfk-bar-zoom-label{
  font-size:11px;
  font-weight:800;
  color:#4b5563;
}
.sfk-bar-zoom-btn{
  width:27px;
  height:27px;
  padding:0;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#f8fafc;
  color:#111827;
  font-size:17px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}
.sfk-bar-zoom-btn:hover:not(:disabled){
  background:#eef2ff;
  border-color:#818cf8;
}
.sfk-bar-zoom-btn:disabled{
  opacity:.38;
  cursor:default;
}
.sfk-bar-zoom-value{
  min-width:38px;
  text-align:center;
  font-size:11px;
  font-weight:800;
  color:#374151;
}

/* Shrinking Bar zoom also allows more Bars to fit on a row. */
.sfk-client-bars{
  grid-template-columns:repeat(
    auto-fit,
    minmax(calc(225px * var(--sfk-bar-scale)),1fr)
  ) !important;
  gap:calc(10px * var(--sfk-bar-scale)) !important;
}
.sfk-client-bar{
  padding:calc(10px * var(--sfk-bar-scale)) !important;
  border-radius:calc(12px * var(--sfk-bar-scale) + 2px);
}
.sfk-measure-top{
  grid-template-columns:
    calc(32px * var(--sfk-bar-scale))
    1fr
    calc(32px * var(--sfk-bar-scale)) !important;
  min-height:calc(30px * var(--sfk-bar-scale)) !important;
  margin-bottom:calc(8px * var(--sfk-bar-scale)) !important;
}
.sfk-measure-title{
  font-size:calc(13px * var(--sfk-bar-scale)) !important;
}
.sfk-measure-top .sfk-measure-icon{
  width:calc(26px * var(--sfk-bar-scale)) !important;
  height:calc(26px * var(--sfk-bar-scale)) !important;
  min-width:calc(26px * var(--sfk-bar-scale)) !important;
  font-size:calc(17px * var(--sfk-bar-scale)) !important;
}
.sfk-client-bar .sfk-bar-head{
  gap:calc(7px * var(--sfk-bar-scale)) !important;
  margin-bottom:calc(8px * var(--sfk-bar-scale)) !important;
}
.sfk-transition-select,
.sfk-navigation-inline .sfk-navigation-select{
  min-height:calc(28px * var(--sfk-bar-scale)) !important;
  height:calc(28px * var(--sfk-bar-scale)) !important;
  font-size:calc(10px * var(--sfk-bar-scale)) !important;
  padding:
    calc(3px * var(--sfk-bar-scale))
    calc(6px * var(--sfk-bar-scale)) !important;
}
.sfk-measure-note{
  font-size:calc(12px * var(--sfk-bar-scale)) !important;
  min-height:calc(30px * var(--sfk-bar-scale)) !important;
}
.sfk-beat-row{
  gap:calc(5px * var(--sfk-bar-scale)) !important;
}
.sfk-beat-slot{
  padding:calc(6px * var(--sfk-bar-scale)) !important;
}
.sfk-beat-slot label{
  font-size:calc(11px * var(--sfk-bar-scale)) !important;
}
.sfk-beat-slot input.sfk-chord-input{
  min-height:calc(42px * var(--sfk-bar-scale)) !important;
  padding:
    calc(8px * var(--sfk-bar-scale))
    calc(6px * var(--sfk-bar-scale)) !important;
  font-size:calc(18px * var(--sfk-bar-scale)) !important;
}

@media(max-width:600px){
  .sfk-client-bars{
    grid-template-columns:1fr !important;
  }
}

/* v0.10.0 — proportional Bar zoom: every inner component scales together */
.sfk-client-bar{
  --sfk-z:var(--sfk-bar-scale,1);
  font-size:calc(14px * var(--sfk-z));
  border-width:max(1px,calc(1px * var(--sfk-z)));
}

/* Top row */
.sfk-measure-top{
  gap:calc(4px * var(--sfk-z)) !important;
  margin-bottom:calc(8px * var(--sfk-z)) !important;
}
.sfk-measure-title{
  font-size:calc(13px * var(--sfk-z)) !important;
  line-height:1.15 !important;
}
.sfk-measure-top .sfk-measure-icon{
  width:calc(26px * var(--sfk-z)) !important;
  height:calc(26px * var(--sfk-z)) !important;
  min-width:calc(26px * var(--sfk-z)) !important;
  min-height:calc(26px * var(--sfk-z)) !important;
  border-radius:calc(13px * var(--sfk-z)) !important;
  font-size:calc(17px * var(--sfk-z)) !important;
  line-height:1 !important;
  border-width:max(1px,calc(1px * var(--sfk-z))) !important;
}

/* Fill/Break/Outro + Navigation row */
.sfk-client-bar .sfk-bar-head{
  gap:calc(7px * var(--sfk-z)) !important;
  margin-bottom:calc(8px * var(--sfk-z)) !important;
}
.sfk-transition-wrap,
.sfk-navigation-inline{
  gap:calc(4px * var(--sfk-z)) !important;
  font-size:calc(10px * var(--sfk-z)) !important;
}
.sfk-transition-select,
.sfk-navigation-inline .sfk-navigation-select{
  min-height:calc(28px * var(--sfk-z)) !important;
  height:calc(28px * var(--sfk-z)) !important;
  padding:
    calc(3px * var(--sfk-z))
    calc(6px * var(--sfk-z)) !important;
  border-radius:calc(8px * var(--sfk-z)) !important;
  border-width:max(1px,calc(1px * var(--sfk-z))) !important;
  font-size:calc(10px * var(--sfk-z)) !important;
  line-height:1.1 !important;
}
.sfk-transition-select{
  width:calc(116px * var(--sfk-z)) !important;
  max-width:calc(116px * var(--sfk-z)) !important;
}
.sfk-navigation-inline .sfk-navigation-select{
  width:calc(126px * var(--sfk-z)) !important;
  min-width:calc(92px * var(--sfk-z)) !important;
  max-width:calc(126px * var(--sfk-z)) !important;
}
.sfk-navigation-inline .sfk-coda-icon,
.sfk-navigation-inline .sfk-segno-icon,
.sfk-navigation-inline .sfk-coda-icon svg,
.sfk-navigation-inline .sfk-segno-icon svg{
  width:calc(16px * var(--sfk-z)) !important;
  height:calc(16px * var(--sfk-z)) !important;
  min-width:calc(16px * var(--sfk-z)) !important;
  flex-basis:calc(16px * var(--sfk-z)) !important;
}

/* Note */
.sfk-measure-note-wrap{
  margin-bottom:calc(8px * var(--sfk-z)) !important;
}
.sfk-measure-note{
  width:100% !important;
  min-height:calc(30px * var(--sfk-z)) !important;
  padding:
    calc(6px * var(--sfk-z))
    calc(8px * var(--sfk-z)) !important;
  border-radius:calc(8px * var(--sfk-z)) !important;
  border-width:max(1px,calc(1px * var(--sfk-z))) !important;
  font-size:calc(12px * var(--sfk-z)) !important;
  line-height:1.2 !important;
}

/* Beat/chord area */
.sfk-beat-row{
  gap:calc(5px * var(--sfk-z)) !important;
}
.sfk-beat-slot{
  padding:calc(6px * var(--sfk-z)) !important;
  border-radius:calc(8px * var(--sfk-z)) !important;
  border-width:max(1px,calc(1px * var(--sfk-z))) !important;
}
.sfk-beat-slot label{
  font-size:calc(11px * var(--sfk-z)) !important;
  margin-bottom:calc(3px * var(--sfk-z)) !important;
  line-height:1.15 !important;
}
.sfk-beat-slot input.sfk-chord-input{
  min-height:calc(42px * var(--sfk-z)) !important;
  padding:
    calc(8px * var(--sfk-z))
    calc(6px * var(--sfk-z)) !important;
  border-radius:calc(8px * var(--sfk-z)) !important;
  border-width:max(1px,calc(1px * var(--sfk-z))) !important;
  font-size:calc(18px * var(--sfk-z)) !important;
  line-height:1.15 !important;
}

/* State/decoration also scales */
.sfk-client-bar.sfk-loop-region-start{
  border-left-width:max(2px,calc(3px * var(--sfk-z))) !important;
}
.sfk-client-bar.sfk-loop-region-end{
  border-right-width:max(2px,calc(3px * var(--sfk-z))) !important;
}
.sfk-client-bar.sfk-drag-over-before{
  box-shadow:
    inset calc(3px * var(--sfk-z)) 0 0 #7c3aed,
    0 0 0 max(1px,calc(1px * var(--sfk-z))) rgba(124,58,237,.10);
}
.sfk-client-bar.sfk-drag-over-after{
  box-shadow:
    inset calc(-3px * var(--sfk-z)) 0 0 #7c3aed,
    0 0 0 max(1px,calc(1px * var(--sfk-z))) rgba(124,58,237,.10);
}

/* Keep tiny zoom levels usable */
@media(max-width:600px){
  .sfk-transition-select,
  .sfk-navigation-inline .sfk-navigation-select{
    width:auto !important;
    max-width:100% !important;
  }
}

/* v0.10.1 — keep Navigation inside Bar at every zoom level */
.sfk-client-bar{
  min-width:0;
  overflow:hidden;
}

.sfk-client-bar .sfk-bar-head{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  width:100%;
  min-width:0;
  align-items:center;
}

.sfk-transition-wrap,
.sfk-navigation-inline{
  min-width:0;
  width:100%;
  max-width:100%;
}

.sfk-transition-select,
.sfk-navigation-inline .sfk-navigation-select{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}

.sfk-navigation-inline{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  overflow:hidden;
}

.sfk-navigation-inline:not(:has(.sfk-coda-icon)):not(:has(.sfk-segno-icon)){
  grid-template-columns:minmax(0,1fr);
}

.sfk-navigation-inline .sfk-navigation-select{
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}

.sfk-transition-select{
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}

/* At very small Bar zooms, slightly reduce the control gap too. */
.sfk-client-app[style*="--sfk-bar-scale:0.6"] .sfk-client-bar .sfk-bar-head,
.sfk-client-app[style*="--sfk-bar-scale:0.7"] .sfk-client-bar .sfk-bar-head{
  gap:3px !important;
}

/* v0.10.2 — compact beat/chord layout at small bar zoom */
.sfk-beat-row{
  align-items:start !important;
}

.sfk-beat-slot{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  min-height:0 !important;
  height:auto !important;
  gap:calc(4px * var(--sfk-z)) !important;
  padding:
    calc(5px * var(--sfk-z))
    calc(5px * var(--sfk-z)) !important;
}

.sfk-beat-slot label{
  display:block;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  line-height:1.05 !important;
  font-size:calc(10px * var(--sfk-z)) !important;
}

.sfk-beat-slot input.sfk-chord-input{
  min-height:calc(34px * var(--sfk-z)) !important;
  height:calc(34px * var(--sfk-z)) !important;
  padding:
    calc(4px * var(--sfk-z))
    calc(4px * var(--sfk-z)) !important;
  margin:0 !important;
  font-size:calc(17px * var(--sfk-z)) !important;
  line-height:1 !important;
  text-align:center;
}

/* Tighter compact mode when zoom is below 100% */
.sfk-client-app[style*="--sfk-bar-scale:0.6"] .sfk-beat-slot,
.sfk-client-app[style*="--sfk-bar-scale:0.7"] .sfk-beat-slot,
.sfk-client-app[style*="--sfk-bar-scale:0.8"] .sfk-beat-slot,
.sfk-client-app[style*="--sfk-bar-scale:0.9"] .sfk-beat-slot{
  gap:2px !important;
  padding:3px !important;
}

.sfk-client-app[style*="--sfk-bar-scale:0.6"] .sfk-beat-slot label,
.sfk-client-app[style*="--sfk-bar-scale:0.7"] .sfk-beat-slot label,
.sfk-client-app[style*="--sfk-bar-scale:0.8"] .sfk-beat-slot label,
.sfk-client-app[style*="--sfk-bar-scale:0.9"] .sfk-beat-slot label{
  font-size:9px !important;
}

.sfk-client-app[style*="--sfk-bar-scale:0.6"] .sfk-beat-slot input.sfk-chord-input,
.sfk-client-app[style*="--sfk-bar-scale:0.7"] .sfk-beat-slot input.sfk-chord-input,
.sfk-client-app[style*="--sfk-bar-scale:0.8"] .sfk-beat-slot input.sfk-chord-input,
.sfk-client-app[style*="--sfk-bar-scale:0.9"] .sfk-beat-slot input.sfk-chord-input{
  min-height:28px !important;
  height:28px !important;
  font-size:15px !important;
  padding:2px 3px !important;
}

/* Make the whole beat area look visually tighter */
.sfk-client-bar .sfk-beat-row + .sfk-beat-row{
  margin-top:calc(4px * var(--sfk-z)) !important;
}

/* v0.10.5 — drag performance optimization */
.sfk-client-bars.sfk-is-dragging .sfk-client-bar{
  transition:none !important;
}
.sfk-client-bars.sfk-is-dragging .sfk-client-bar.sfk-drag-preview-gap{
  transition:transform .12s ease-out !important;
}

/* v0.10.6 — Bar drag/reorder removed */
.sfk-measure-title{
  cursor:default !important;
}
.sfk-measure-title:active{
  cursor:default !important;
}
.sfk-client-bar{
  -webkit-user-drag:none !important;
  user-select:auto;
}
.sfk-client-bar.sfk-dragging,
.sfk-client-bar.sfk-drag-preview-gap,
.sfk-client-bar.sfk-drag-over-before,
.sfk-client-bar.sfk-drag-over-after{
  transform:none !important;
  opacity:1 !important;
  box-shadow:none !important;
}

/* v0.10.7 — Virtual Piano */
.sfk-virtual-piano{
  margin-top:14px;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.sfk-piano-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.sfk-piano-head strong{
  display:block;
  font-size:14px;
  color:#111827;
}
.sfk-piano-hint,
.sfk-piano-keyboard-hint{
  font-size:11px;
  color:#6b7280;
}
.sfk-piano-keys{
  --white-count:15;
  position:relative;
  display:grid;
  grid-template-columns:repeat(15,minmax(34px,1fr));
  height:150px;
  min-width:620px;
  user-select:none;
  touch-action:none;
}
.sfk-piano-key{
  appearance:none;
  padding:0;
  margin:0;
  cursor:pointer;
  user-select:none;
  touch-action:none;
}
.sfk-piano-white{
  position:relative;
  z-index:1;
  height:150px;
  border:1px solid #cbd5e1;
  border-right:0;
  border-radius:0 0 6px 6px;
  background:linear-gradient(#ffffff,#f8fafc);
}
.sfk-piano-white:last-of-type{
  border-right:1px solid #cbd5e1;
}
.sfk-piano-white.is-down{
  background:#e0e7ff;
  box-shadow:inset 0 -4px 0 rgba(79,70,229,.18);
}
.sfk-piano-black{
  position:absolute;
  z-index:3;
  top:0;
  left:calc((100% / 15) * var(--black-pos));
  width:calc((100% / 15) * .62);
  height:92px;
  transform:translateX(-50%);
  border:1px solid #111827;
  border-radius:0 0 5px 5px;
  background:linear-gradient(#1f2937,#030712);
  color:#fff;
  box-shadow:0 3px 5px rgba(0,0,0,.24);
}
.sfk-piano-black.is-down{
  background:#4338ca;
  transform:translateX(-50%) translateY(2px);
}
.sfk-piano-note{
  position:absolute;
  left:0;
  right:0;
  bottom:25px;
  text-align:center;
  font-size:11px;
  font-weight:800;
  color:#475569;
}
.sfk-piano-computer-key{
  position:absolute;
  left:0;
  right:0;
  bottom:7px;
  text-align:center;
  font-size:9px;
  font-weight:800;
  opacity:.72;
}
.sfk-piano-black .sfk-piano-computer-key{
  bottom:8px;
  color:#fff;
}
@media(max-width:760px){
  .sfk-virtual-piano{
    overflow-x:auto;
  }
  .sfk-piano-head{
    min-width:620px;
  }
}

/* v0.10.8 — geometrically correct piano keyboard */
.sfk-piano-keys{
  position:relative;
  display:grid;
  grid-template-columns:repeat(15,minmax(34px,1fr));
  height:160px;
  min-width:660px;
}

.sfk-piano-white{
  height:160px;
  min-width:0;
  border:1px solid #cbd5e1;
  border-right:0;
  border-radius:0 0 6px 6px;
  background:linear-gradient(to bottom,#fff 0%,#fff 72%,#f8fafc 100%);
  box-sizing:border-box;
}

.sfk-piano-white:last-of-type{
  border-right:1px solid #cbd5e1;
}

/* A black key is centered exactly over a white-key boundary. */
.sfk-piano-black{
  left:calc((100% / 15) * var(--black-pos)) !important;
  width:calc((100% / 15) * .60) !important;
  height:98px !important;
  transform:translateX(-50%) !important;
  border-radius:0 0 5px 5px !important;
  box-sizing:border-box;
}

.sfk-piano-black.is-down{
  transform:translateX(-50%) translateY(2px) !important;
}

/* Slight visual key separation like a real keyboard. */
.sfk-piano-white::after{
  content:"";
  position:absolute;
  top:0;
  right:-1px;
  width:1px;
  height:100%;
  background:#cbd5e1;
  pointer-events:none;
}

/* v0.10.9 — clean piano keys with no visible annotations */
.sfk-piano-note,
.sfk-piano-computer-key{
  display:none !important;
}

/* v0.11.0 — sharper 3D piano keys */
.sfk-virtual-piano{
  background:
    linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  border:1px solid #d1d5db;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 24px rgba(15,23,42,.05);
}

.sfk-piano-keys{
  background:
    linear-gradient(180deg,#eef2f7 0%,#e5e7eb 100%);
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:8px 8px 12px;
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,.9),
    inset 0 -6px 12px rgba(148,163,184,.20);
  overflow:hidden;
}

.sfk-piano-white{
  position:relative;
  height:160px;
  min-width:0;
  border:1px solid #9ca3af;
  border-right:0;
  border-radius:0 0 8px 8px;
  background:
    linear-gradient(180deg,#ffffff 0%,#ffffff 10%,#f8fafc 58%,#eef2f7 82%,#dbe3ec 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -8px 10px rgba(148,163,184,.20),
    inset -1px 0 0 rgba(148,163,184,.30),
    0 2px 0 rgba(148,163,184,.18);
}

.sfk-piano-white::before{
  content:"";
  position:absolute;
  left:8%;
  right:8%;
  top:6px;
  height:18px;
  border-radius:0 0 12px 12px;
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,0));
  pointer-events:none;
}

.sfk-piano-white::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:18px;
  background:linear-gradient(180deg,rgba(255,255,255,0),rgba(100,116,139,.13));
  pointer-events:none;
}

.sfk-piano-white:last-of-type{
  border-right:1px solid #9ca3af;
}

.sfk-piano-white.is-down{
  background:
    linear-gradient(180deg,#eef3ff 0%,#e2e8f8 58%,#ced8ec 100%);
  box-shadow:
    inset 0 3px 6px rgba(99,102,241,.14),
    inset 0 -3px 5px rgba(100,116,139,.20),
    0 1px 0 rgba(148,163,184,.12);
  transform:translateY(2px);
}

.sfk-piano-black{
  position:absolute;
  z-index:3;
  top:8px;
  left:calc((100% / 15) * var(--black-pos)) !important;
  width:calc((100% / 15) * .60) !important;
  height:102px !important;
  transform:translateX(-50%) !important;
  border:1px solid #020617;
  border-top-color:#111827;
  border-radius:0 0 7px 7px !important;
  background:
    linear-gradient(180deg,#515b6b 0%,#1f2937 10%,#0f172a 52%,#020617 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    inset -1px -10px 14px rgba(0,0,0,.40),
    inset 1px 0 0 rgba(255,255,255,.05),
    0 5px 10px rgba(0,0,0,.30);
}

.sfk-piano-black::before{
  content:"";
  position:absolute;
  left:10%;
  right:10%;
  top:5px;
  height:16px;
  border-radius:0 0 12px 12px;
  background:linear-gradient(180deg,rgba(255,255,255,.20),rgba(255,255,255,0));
  pointer-events:none;
}

.sfk-piano-black.is-down{
  background:
    linear-gradient(180deg,#4f46e5 0%,#3730a3 55%,#1e1b4b 100%);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.08),
    inset 0 -4px 6px rgba(0,0,0,.28),
    0 2px 6px rgba(0,0,0,.22);
  transform:translateX(-50%) translateY(3px) !important;
}

@media(max-width:760px){
  .sfk-piano-keys{
    min-width:660px;
  }
}
