.sl-pad { padding: var(--space-4); }
.sl-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4); }
.sl-col { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.sl-icon { flex: none; display: block; }
:where(.sl-btn, .sl-key, .sl-keycell, .sl-seg-btn, .sl-capo-opt, .sl-vchip):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Button */
.sl-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: 13px; line-height: 18px; font-weight: 600; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.sl-btn-md { min-height: 40px; padding: 0 var(--space-4); }
.sl-btn-stage { min-height: var(--tap-stage); padding: 0 var(--space-5); font-size: 17px; border-radius: var(--radius-lg); }
.sl-btn-primary { background: var(--accent); color: var(--on-accent); }
.sl-btn-secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); }
.sl-btn-quiet { background: transparent; color: var(--accent); }
.sl-btn-danger { background: var(--danger); color: var(--on-danger); }
.sl-btn:disabled { opacity: .45; cursor: default; }

/* Badge */
.sl-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.sl-badge-neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.sl-badge-accent { background: var(--accent-soft); color: var(--accent); }
.sl-badge-live { background: var(--live); color: var(--on-live); }
.sl-badge-alert { background: var(--alert); color: var(--on-alert); }
.sl-badge-danger { background: var(--danger); color: var(--on-danger); }
.sl-badge-success { background: var(--surface-sunken); color: var(--success); }

/* KeyChip */
.sl-key { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1.5px solid transparent; font-family: var(--font-sans); line-height: 1; cursor: default; padding: 0; }
button.sl-key { cursor: pointer; }
.sl-key-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-bottom: 2px; }
.sl-key-value { font-weight: 700; }
.sl-key-sm { min-width: 36px; height: 28px; padding: 0 var(--space-2); }
.sl-key-sm .sl-key-value { font-size: 15px; }
.sl-key-md { min-width: 52px; height: 48px; padding: 0 var(--space-3); }
.sl-key-md .sl-key-value { font-size: 20px; }
.sl-key-lg { min-width: var(--tap-stage); height: var(--tap-stage); padding: 0 var(--space-3); border-radius: var(--radius-md); }
.sl-key-lg .sl-key-value { font-size: 40px; }
.sl-key-service { background: var(--accent); color: var(--on-accent); }
.sl-key-personal { background: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); border-style: dashed; }
.sl-key-changed { background: var(--alert); color: var(--on-alert); }
.sl-key-muted { background: var(--surface-sunken); color: var(--ink-muted); }

/* Segmented */
.sl-seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--surface-sunken); border-radius: var(--radius-md); }
.sl-seg-btn { min-height: 34px; padding: 0 var(--space-4); border: 0; border-radius: 7px; background: transparent; color: var(--ink-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.sl-seg-btn.is-on { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-raised); }

/* KeyPicker */
.sl-keypicker { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.sl-keypicker > .sl-seg { align-self: flex-start; }
.sl-keygrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); max-width: 480px; }
.sl-keycell { position: relative; height: var(--tap-min); border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; }
.sl-keycell.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sl-keycell-tag { position: absolute; top: 3px; right: 4px; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }

/* CapoPicker */
.sl-capo { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.sl-capo-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-3); }
.sl-capo-big { font-family: var(--font-mono); font-size: 28px; line-height: 32px; font-weight: 600; color: var(--ink); }
.sl-capo-sub { color: var(--ink-muted); }
.sl-capo-opts { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.sl-capo-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: var(--tap-stage); height: var(--tap-stage); border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); cursor: pointer; gap: 2px; }
.sl-capo-opt.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sl-capo-opt.is-high:not(.is-on) { color: var(--ink-muted); border-style: dashed; }
.sl-capo-shape { font-size: 20px; font-weight: 700; }
.sl-capo-n { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.sl-capo-note { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* Banners */
.sl-banner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); flex-wrap: wrap; }
.sl-banner-alert { background: var(--alert-soft); color: var(--alert-ink); }
.sl-banner-info { background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); }
.sl-banner-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-pill); flex: none; }
.sl-banner-alert .sl-banner-icon { background: var(--alert); color: var(--on-alert); }
.sl-banner-info .sl-banner-icon { background: var(--accent-soft); color: var(--accent); }
.sl-banner-text { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; }
.sl-banner-text strong { font-size: 15px; line-height: 22px; font-weight: 600; }
.sl-banner-change { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 20px; line-height: 28px; font-weight: 700; }
.sl-banner-sub { font-size: 13px; line-height: 18px; opacity: .9; }
.sl-banner-alert .sl-banner-sub, .sl-banner-alert .sl-banner-text strong { color: var(--alert-ink); }
.sl-banner-info .sl-banner-sub { color: var(--ink-muted); }
.sl-banner-actions { display: flex; gap: var(--space-2); margin-left: auto; }
.sl-banner-alert .sl-btn-quiet { color: var(--alert-ink); }

/* VersionChips */
.sl-vchips { display: inline-flex; gap: var(--space-1); padding: 3px; background: var(--surface-sunken); border-radius: var(--radius-pill); }
.sl-vchip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-pill); border: 0; background: transparent; color: var(--ink-muted); font-size: 13px; font-weight: 700; letter-spacing: .02em; cursor: pointer; }
.sl-vchip.is-on { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-raised); }
.sl-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); flex: none; }
.sl-vchip-svc { color: var(--accent); font-size: 18px; line-height: 1; margin-left: -2px; }

/* MergePrompt */
.sl-merge { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--line); max-width: 520px; }
.sl-merge-head { display: flex; gap: var(--space-3); color: var(--alert-ink); }
.sl-merge-head strong { display: block; color: var(--ink); font-size: 15px; }
.sl-merge-head p { margin: 2px 0 0; color: var(--ink-muted); }
.sl-merge-actions { display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }

/* KeyHistory */
.sl-hist { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); max-width: 420px; }
.sl-hist-head { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-3); }
.sl-hist-usual { display: flex; flex-direction: column; gap: var(--space-2); padding-bottom: var(--space-3); margin-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.sl-hist-u { display: flex; align-items: center; gap: var(--space-3); }
.sl-hist-ulabel { flex: 1; font-weight: 600; }
.sl-hist-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); min-width: 24px; text-align: right; }
.sl-hist-list { list-style: none; margin: 0; padding: 0; }
.sl-hist-row { display: grid; grid-template-columns: 40px 1fr auto; gap: var(--space-3); align-items: baseline; padding: 6px 0; }
.sl-hist-key { font-weight: 700; color: var(--accent); }
.sl-hist-when { font-size: 12px; color: var(--ink-muted); }

/* ChordSheet */
.sl-sheet { padding: var(--space-5); font-size: 100%; }
.sl-sheet-sec { font-size: .59em; line-height: 1.4; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin: var(--space-5) 0 var(--space-2); font-size: 13px; }
.sl-sheet-sec:first-child { margin-top: 0; }
.sl-sheet-gap { height: var(--space-3); }
.sl-sheet-line { display: flex; flex-wrap: wrap; align-items: flex-end; }
.sl-pn-lead { margin-left: 12px; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; font-style: italic; color: var(--accent); }
.sl-pn-mine { margin-left: 12px; display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; font-style: italic; color: var(--ink); }
.sl-cs-seg { display: inline-flex; flex-direction: column; white-space: pre; }
.sl-chord { font-family: var(--font-mono); font-size: 20px; line-height: 24px; font-weight: 600; color: var(--chord); padding-right: .6em; }
.sl-lyr { font-size: 22px; line-height: 30px; font-weight: 500; color: var(--ink); }

/* ServiceItem */
.sl-item { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap-min); padding: var(--space-3) var(--space-4) var(--space-3) var(--space-2); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.sl-item + .sl-item { margin-top: var(--space-2); }
.sl-item.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.sl-item.is-live { border-color: var(--live); box-shadow: inset 0 0 0 1px var(--live); }
.sl-item-drag { color: var(--ink-muted); cursor: grab; }
.sl-item-type { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-muted); flex: none; }
.sl-item-main { flex: 1; min-width: 0; }
.sl-item-title { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; flex-wrap: wrap; }
.sl-item-meta { font-size: 12px; line-height: 16px; color: var(--ink-muted); margin-top: 2px; }

/* SlidePreview */
.sl-slide-wrap { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); width: 100%; max-width: 360px; }
.sl-slide { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; container-type: inline-size; border: 1px solid var(--line); }
.sl-slide-wrap.is-live .sl-slide { outline: 3px solid var(--live); outline-offset: 2px; }
.sl-slide-dark { background: var(--slide-dark-bg); color: var(--slide-dark-ink); }
.sl-slide-light { background: var(--slide-light-bg); color: var(--slide-light-ink); }
.sl-slide-lines { font-weight: 600; font-size: 6.2cqw; line-height: 1.25; padding: 0 6cqw; }
.sl-slide-copy { position: absolute; left: 0; right: 0; bottom: 3cqw; font-size: 2cqw; opacity: .7; }
.sl-slide-cap { display: flex; align-items: center; gap: var(--space-2); font-size: 12px; color: var(--ink-muted); }

/* ControlIndicator */
.sl-control { display: inline-flex; align-items: center; gap: var(--space-3); padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3); min-height: 48px; border-radius: var(--radius-pill); background: var(--surface-raised); border: 1px solid var(--line); }
.sl-control-dot { width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--ink-muted); }
.sl-control.is-me .sl-control-dot { background: var(--live); }
.sl-control-text { display: flex; flex-direction: column; line-height: 1.2; padding-right: var(--space-2); }
.sl-control-k { font-size: 11px; color: var(--ink-muted); }
.sl-control-text strong { font-size: 14px; }

/* SyncStatus */
.sl-sync { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--surface-sunken); font-size: 13px; font-weight: 600; }
.sl-sync-live { color: var(--success); }
.sl-sync-syncing { color: var(--ink); }
.sl-sync-offline { color: var(--danger); }
.sl-sync-n { color: var(--ink-muted); font-weight: 500; margin-left: 2px; }

/* KeyChip pulse: a suggested capo, for up to 10 seconds */
.sl-key-pulse { position: relative; overflow: visible; }
.sl-key-pulse::after { content: ""; position: absolute; inset: -6px; border: 3px solid var(--accent); border-radius: 14px; pointer-events: none; animation: sl-pulse 1.6s ease-in-out infinite; }
@keyframes sl-pulse { 0%, 100% { opacity: .15; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .sl-key-pulse::after { animation: none; opacity: 1; } }

/* SectionBlock */
.sl-block { width: var(--tap-stage); height: 72px; flex: none; }
.sl-block .sl-key-value { font-size: 20px; font-weight: 700; }
.sl-rpt { font-size: 11px; line-height: 12px; font-weight: 700; margin-top: 3px; opacity: .9; white-space: nowrap; }

/* NotesStrip */
.sl-notes { display: flex; flex-direction: column; gap: 6px; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); }
.sl-notes-row { display: flex; align-items: flex-start; gap: 10px; }
.sl-notes-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; font-size: 15px; line-height: 22px; }
.sl-notes-who { font-size: 13px; font-weight: 700; color: var(--ink-muted); margin-right: 8px; }
