/* ============ playalong.cz ============ */
:root {
  --bg: #FFFBF4;
  --surface: #FFFFFF;
  --surface-2: #F7F2E9;
  --ink: #1D1A2F;
  --muted: #6E6A80;
  --line: #ECE5D8;
  --shadow: 0 1px 2px rgba(29, 26, 47, .06), 0 8px 24px rgba(29, 26, 47, .07);

  /* stupně tóniny */
  --d0: #FF5A5F; --d0-ink: #fff;
  --d1: #FFB020; --d1-ink: #2A1E00;
  --d2: #7BC74D; --d2-ink: #102A00;
  --d3: #2D9CDB; --d3-ink: #fff;
  --d4: #8B5CF6; --d4-ink: #fff;
  --d5: #FF6FB5; --d5-ink: #fff;
  --d6: #14B8A6; --d6-ink: #fff;
  --dx: #3A3650; --dx-ink: #fff;

  /* části písně */
  --s-intro: #FFB020;
  --s-verse: #2D9CDB;
  --s-pre: #8B5CF6;
  --s-chorus: #FF5A5F;
  --s-bridge: #7BC74D;
  --s-solo: #FF8A3D;
  --s-inter: #B07CFF;
  --s-outro: #14B8A6;

  --fs: 19px;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14121D;
    --surface: #1D1A2A;
    --surface-2: #26223A;
    --ink: #F4F1FA;
    --muted: #A39FB5;
    --line: #322D47;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --dx: #E6E1F5; --dx-ink: #14121D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14121D;
  --surface: #1D1A2A;
  --surface-2: #26223A;
  --ink: #F4F1FA;
  --muted: #A39FB5;
  --line: #322D47;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --dx: #E6E1F5; --dx-ink: #14121D;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo em { font-style: normal; color: var(--d5); }
.strings { display: grid; grid-template-columns: repeat(6, 4px); gap: 3px; height: 26px; }
.strings i { border-radius: 3px; display: block; }
.strings i:nth-child(1) { background: var(--d0); }
.strings i:nth-child(2) { background: var(--d1); }
.strings i:nth-child(3) { background: var(--d2); }
.strings i:nth-child(4) { background: var(--d3); }
.strings i:nth-child(5) { background: var(--d4); }
.strings i:nth-child(6) { background: var(--d5); }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.sync { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.sync:empty { display: none; }
@media (max-width: 860px) { .sync { display: none; } }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--bg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--surface);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.big { padding: 14px 22px; font-size: 17px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { padding: 8px 11px; }
.btn.rainbow {
  border: none; color: #fff;
  background: linear-gradient(100deg, var(--d0), var(--d1) 25%, var(--d5) 55%, var(--d4) 80%, var(--d3));
  background-size: 200% 100%;
  animation: shimmer 6s ease-in-out infinite alternate;
  text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
@keyframes shimmer { to { background-position: 100% 0; } }
.btn:focus-visible, .chip:focus-visible, .key-btn:focus-visible { outline: 3px solid var(--d3); outline-offset: 2px; }

/* ---------- library ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 16px 80px; }
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1; margin: 0 0 10px; letter-spacing: -.035em; font-weight: 800; }
.hero h1 .hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--d1) 55%, transparent) 62%); }
.hero p { margin: 0; color: var(--muted); font-size: 17px; }
.search {
  width: 100%; max-width: 360px; padding: 12px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); outline: none;
}
.search:focus { border-color: var(--d3); }
.lib-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative; background: var(--surface); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow); cursor: pointer;
  border: 1.5px solid var(--line); overflow: hidden;
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-3px); }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--card-c); }
.card h3 { margin: 6px 0 2px; font-size: 20px; letter-spacing: -.01em; line-height: 1.2; padding-right: 26px; }
.card .artist { color: var(--muted); font-size: 14px; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.badge.key { background: var(--card-c); color: #fff; }
.sec-dots { display: flex; gap: 3px; margin-left: auto; }
.sec-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.card .del {
  position: absolute; top: 12px; right: 10px; border: none; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 18px; padding: 2px 6px; border-radius: 8px; opacity: .5;
}
.card .del:hover { opacity: 1; background: var(--surface-2); }

.empty { text-align: center; padding: 60px 20px; border: 2px dashed var(--line); border-radius: 24px; }
.empty .big-emoji { font-size: 56px; }
.empty h2 { margin: 8px 0 6px; font-size: 26px; }
.empty p { color: var(--muted); margin: 0 0 20px; }
.empty .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 60; background: rgba(20, 18, 29, .45);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: 24px; width: 100%; max-width: 720px;
  padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.25);
  animation: pop .2s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.02em; }
.modal .sub { color: var(--muted); margin: 0 0 20px; }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps i { height: 5px; flex: 1; border-radius: 4px; background: var(--line); display: block; }
.steps i.on:nth-child(1) { background: var(--d0); }
.steps i.on:nth-child(2) { background: var(--d4); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px;
  background: var(--bg); outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--d3); }
.field textarea { min-height: 300px; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; line-height: 1.55; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; }
.hint b { color: var(--ink); }
.modal-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.guess {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--d1) 22%, transparent), color-mix(in srgb, var(--d5) 18%, transparent));
  margin-bottom: 16px;
}
.guess .big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.seg button { border: none; background: transparent; padding: 7px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); }
.key-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.key-btn {
  position: relative; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px;
  padding: 12px 4px; cursor: pointer; font-weight: 700; font-size: 17px;
}
.key-btn:hover { border-color: var(--ink); }
/* (hvězdička u doporučených tónin zrušena) */
.key-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.key-preview { margin-top: 18px; }
.key-preview .lbl { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 15px;
  background: var(--chip-bg, var(--dx)); color: var(--chip-ink, var(--dx-ink));
  cursor: grab; touch-action: none; user-select: none;
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
  transition: transform .1s ease, box-shadow .1s ease;
}
.chip:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.chip small { font-size: 10px; font-weight: 600; opacity: .75; }
.chip.armed { outline: 3px solid var(--ink); outline-offset: 2px; transform: translateY(-2px); }
.chip.add { background: transparent; color: var(--muted); border: 1.5px dashed var(--line); box-shadow: none; cursor: pointer; }
.chip.add:hover { color: var(--ink); border-color: var(--ink); }
.chip.static { cursor: default; }
.chip.sec { border-radius: 10px; }

.d0 { --chip-bg: var(--d0); --chip-ink: var(--d0-ink); }
.d1 { --chip-bg: var(--d1); --chip-ink: var(--d1-ink); }
.d2 { --chip-bg: var(--d2); --chip-ink: var(--d2-ink); }
.d3 { --chip-bg: var(--d3); --chip-ink: var(--d3-ink); }
.d4 { --chip-bg: var(--d4); --chip-ink: var(--d4-ink); }
.d5 { --chip-bg: var(--d5); --chip-ink: var(--d5-ink); }
.d6 { --chip-bg: var(--d6); --chip-ink: var(--d6-ink); }
.dx { --chip-bg: var(--dx); --chip-ink: var(--dx-ink); }

[data-s="intro"]  { --sc: var(--s-intro); }
[data-s="verse"]  { --sc: var(--s-verse); }
[data-s="pre"]    { --sc: var(--s-pre); }
[data-s="chorus"] { --sc: var(--s-chorus); }
[data-s="bridge"] { --sc: var(--s-bridge); }
[data-s="inter"]  { --sc: var(--s-inter); }
[data-s="solo"]   { --sc: var(--s-solo); }
[data-s="outro"]  { --sc: var(--s-outro); }
.chip.sec { --chip-bg: var(--sc); --chip-ink: #fff; }

/* ---------- editor ---------- */
.editor { max-width: 1200px; margin: 0 auto; padding: 22px 16px 120px; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; align-items: start; }
.editor.play { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
/* text vlevo, paleta vpravo */ .editor.edit > .sheet-wrap { grid-column: 1; grid-row: 2; } .editor.edit > .palette { grid-column: 2; grid-row: 2; }
.song-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.song-head .titles { min-width: 0; flex: 1 1 320px; }
.title-input, .artist-input {
  display: block; width: 100%; border: none; background: transparent; outline: none; padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.title-input { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.artist-input { font-size: 18px; color: var(--muted); }
.title-input:focus, .artist-input:focus { border-bottom-color: var(--d3); }
.play .title-input, .play .artist-input { pointer-events: none; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.key-pill {
  display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 16px;
  background: var(--d0); color: #fff;
}
.key-pill small { font-weight: 600; opacity: .8; font-size: 12px; }
.tgroup { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.tgroup button { border: none; background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 700; border-radius: 999px; }
.tgroup button:hover { background: var(--surface-2); }
.tgroup span { font-size: 13px; color: var(--muted); padding: 0 4px; font-weight: 600; min-width: 52px; text-align: center; }
.tgroup button.on { background: var(--d6); color: #fff; }

/* palette */
.palette {
  position: sticky; top: 76px; background: var(--surface); border-radius: 20px; padding: 18px;
  border: 1.5px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 96px); overflow-y: auto;
}
.palette h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.palette .group { margin-bottom: 18px; }
.palette .group:last-child { margin-bottom: 0; }
.palette .tip { font-size: 13px; color: var(--muted); line-height: 1.45; border-top: 1px solid var(--line); padding-top: 12px; }
.palette .tip b { color: var(--ink); }

/* sheet */
.sheet-wrap { background: var(--surface); border-radius: 20px; border: 1.5px solid var(--line); padding: 26px 26px 34px; min-height: 300px; }
.play .sheet-wrap { border: none; background: transparent; padding: 10px 4px 40vh; }
.sheet { font-size: var(--fs); }
.sec-label {
  display: inline-flex; align-items: center; gap: 6px; margin: 16px 0 0 0;
  padding: 3px 12px 3px 10px; border-radius: 8px 8px 8px 0; background: var(--sc); color: #fff;
  font-weight: 800; font-size: 13px; letter-spacing: .03em; text-transform: uppercase;
  cursor: grab; touch-action: none; user-select: none;
}
.play .sec-label { cursor: default; }
.sheet > .sec-label:first-child { margin-top: 0; }
.line {
  position: relative; white-space: pre-wrap; word-break: break-word;
  line-height: 3.1; padding: 0 44px 0 14px; border-left: 4px solid transparent;
  min-height: 3.1em;
}
.line[data-s] { border-left-color: var(--sc); background: color-mix(in srgb, var(--sc) 6%, transparent); }
.line.empty-line { line-height: 2.2; min-height: 2.2em; }
.line.instr .c.pad { width: .8em; }
.c { position: relative; }
.c.pad { display: inline-block; width: .55em; line-height: 1.25; }
.edit .c { cursor: text; }
.edit.arming .c { cursor: copy; }
.edit.arming .c:hover { background: color-mix(in srgb, var(--d3) 22%, transparent); border-radius: 3px; }
.c.target { background: color-mix(in srgb, var(--d3) 28%, transparent); border-radius: 3px; box-shadow: inset 2px 0 0 var(--d3); }
.chord {
  position: absolute; left: -.15em; bottom: calc(100% + .05em);
  white-space: nowrap; line-height: 1; font-size: .7em; font-weight: 800;
  padding: .24em .5em; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-ink);
  box-shadow: 0 1.5px 0 rgba(0,0,0,.15);
  touch-action: none; user-select: none; z-index: 2;
}
.edit .chord { cursor: grab; }
.edit .chord:hover { filter: brightness(1.08); transform: translateY(-1px); }
.chord.ghosted { opacity: .25; }
.line.sec-target { outline: 2.5px dashed var(--drag-c, var(--d3)); outline-offset: 2px; border-radius: 4px; }
.line-tools {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 2px; opacity: 0; transition: opacity .12s ease; line-height: 1;
}
.edit .line:hover .line-tools { opacity: 1; }
.line-tools button { border: none; background: var(--surface-2); border-radius: 8px; width: 24px; height: 24px; cursor: pointer; font-size: 14px; color: var(--muted); }
.line-tools button:hover { color: var(--ink); background: var(--line); }
.play .gap { height: 1.2em; }
.play .line { padding-right: 8px; }

/* ghost */
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  transform: translate(-6px, calc(-100% - 10px)) rotate(-3deg);
  box-shadow: 0 10px 24px rgba(0,0,0,.25) !important;
  font-size: 16px;
}

/* trash */
.trash {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 200%); opacity: 0; z-index: 90;
  background: var(--ink); color: var(--bg); padding: 14px 26px; border-radius: 999px; font-weight: 700;
  transition: transform .2s ease, background .15s ease; pointer-events: none;
}
.trash.show { transform: translate(-50%, 0); opacity: 1; }
.trash.hot { background: var(--d0); color: #fff; transform: translate(-50%, 0) scale(1.08); }

/* popover */
.popover {
  position: fixed; z-index: 80; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.2); padding: 12px; width: max-content; max-width: min(340px, calc(100vw - 24px));
  animation: pop .15s ease;
}
.popover h5 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.popover .chips { gap: 6px; }
.popover .chip { cursor: pointer; padding: 6px 11px; font-size: 14px; }
.popover .row { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.popover .roots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 10px; }
.popover .roots button, .popover .quals button {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 4px; cursor: pointer; font-weight: 700;
}
.popover .quals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.popover .roots button.on, .popover .quals button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.popover .key-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
.popover .key-btn { padding: 8px 2px; font-size: 14px; border-radius: 10px; }
.popover .seg { margin-bottom: 10px; }

/* toast */
.toast {
  position: fixed; left: 50%; top: 76px; transform: translate(-50%, -20px); opacity: 0; z-index: 95;
  background: var(--ink); color: var(--bg); padding: 10px 14px 10px 18px; border-radius: 999px; font-weight: 600;
  display: flex; gap: 12px; align-items: center; transition: all .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: none; background: var(--d1); color: #2A1E00; font-weight: 800; padding: 5px 12px; border-radius: 999px; cursor: pointer; }

/* ---------- společný zpěvník ---------- */
.banner {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 16px; margin-bottom: 20px; font-weight: 600;
  background: color-mix(in srgb, var(--d1) 22%, var(--surface));
}
.badge.author { background: color-mix(in srgb, var(--d3) 14%, var(--surface)); }
.by { font-size: 14px; color: var(--muted); margin-top: 2px; }
.by b { color: var(--ink); }
.modal.narrow { max-width: 460px; }
.form-err { color: var(--d0); font-weight: 600; font-size: 14px; margin: 0; min-height: 1em; }
.form-err:empty { display: none; }
.user-btn small { color: var(--d4); font-weight: 800; }

/* ---------- tónina z nahrávky ---------- */
.audio-box {
  border: 2px dashed var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 16px;
  display: grid; gap: 10px; transition: border-color .15s ease, background .15s ease;
}
.audio-box.over { border-color: var(--d3); background: color-mix(in srgb, var(--d3) 8%, transparent); }
.audio-box.busy .audio-row { opacity: .5; pointer-events: none; }
.audio-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.audio-head span { font-size: 12px; color: var(--muted); }
.audio-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.yt-form { display: flex; gap: 6px; flex: 1 1 240px; min-width: 0; }
.yt-input {
  flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px;
  background: var(--bg); outline: none;
}
.yt-input:focus { border-color: var(--d0); }
.audio-status { font-size: 13px; color: var(--muted); min-height: 1em; }
.audio-status:empty { display: none; }
.audio-status.err { color: var(--d0); font-weight: 600; }
.audio-results { display: grid; gap: 6px; }
.audio-results:empty { display: none; }
.audio-result { display: flex; gap: 6px; align-items: stretch; }
.res-key {
  position: relative; flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 14px;
  cursor: pointer; overflow: hidden; text-align: left;
}
.res-key:hover { border-color: var(--ink); }
.res-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--w); background: var(--d4); border-radius: 0 4px 4px 0; }
.audio-result.best .res-key { border-color: var(--d4); }
.audio-result.best .res-bar { background: linear-gradient(90deg, var(--d0), var(--d5), var(--d4)); }
.res-name { font-weight: 800; font-size: 17px; }
.res-pct { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.res-capo {
  border: none; border-radius: 12px; padding: 0 12px; cursor: pointer; font-weight: 700; font-size: 13px;
  background: color-mix(in srgb, var(--d6) 16%, var(--surface)); color: var(--ink); white-space: nowrap;
}
.res-capo:hover { background: var(--d6); color: #fff; }
.capo-note { font-size: 13px; font-weight: 600; margin: 12px 0 0; }
.capo-pill {
  border: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-weight: 800;
  background: var(--d6); color: #fff;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .editor { grid-template-columns: minmax(0, 1fr); padding-bottom: 46vh; }
  .editor.edit > .sheet-wrap, .editor.edit > .palette { grid-column: 1; grid-row: auto; }
  .palette {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; border-radius: 20px 20px 0 0;
    max-height: 40vh; padding: 14px 16px; border-bottom: none;
  }
  .palette .tip { display: none; }
  .palette .chip { padding: 5px 10px; font-size: 14px; }
  .palette .chips { gap: 5px; }
  .palette h4 { margin-bottom: 5px; }
  .palette .group { margin-bottom: 12px; }
  .sheet-wrap { padding: 18px 12px 26px; }
  .line { padding-right: 56px; padding-left: 10px; }
  .line-tools { opacity: .55; }
  .key-grid { grid-template-columns: repeat(4, 1fr); }
  .two { grid-template-columns: 1fr; }
  .topbar { padding: 10px 16px; }
  .logo { font-size: 18px; }
}
@media (max-width: 520px) {
  .logo span:last-child { display: none; }
  :root { --fs: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* paralelní tónina */
.key-btn .rel { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 1px; }
.key-btn.on .rel { color: inherit; opacity: .75; }
.res-name small { font-weight: 600; color: var(--muted); font-size: 14px; }

/* vložit řádek na začátek */
.add-top {
  display: block; width: 100%; margin: 0 0 14px; padding: 7px 12px; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: 10px; background: transparent;
  color: var(--muted); font-weight: 600; font-size: 13px; text-align: left;
}
.add-top:hover { color: var(--ink); border-color: var(--s-intro); background: color-mix(in srgb, var(--s-intro) 10%, transparent); }

/* akordy před začátkem textu: volná místa vyčnívají doleva, text zůstává zarovnaný */
.line { padding-left: calc(14px + 1.7em); }
.line > .c.pre:first-child { margin-left: calc(var(--pre, 0) * -.55em); }
.edit .c.pre { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--muted) 30%, transparent); border-radius: 2px; }
.edit .c.pre.target { box-shadow: inset 2px 0 0 var(--d3); }
@media (max-width: 860px) { .line { padding-left: calc(10px + 1.7em); } }

/* zpět / vrátit */
.tgroup.history button { font-weight: 600; font-size: 14px; padding: 7px 12px; }
.tgroup button:disabled { opacity: .35; cursor: default; background: transparent; }

/* označení akordů a kurzor pro vložení */
.c.sel { background: color-mix(in srgb, var(--d3) 22%, transparent); }
.c.sel .chord { outline: 2px solid var(--ink); outline-offset: 1px; }
.c.caret { box-shadow: inset 2px 0 0 var(--d0); animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { box-shadow: inset 2px 0 0 transparent; } }
.edit .sheet { user-select: none; }

/* =========================================================
   Jednoduchý seznam písniček
   ========================================================= */
.song-list { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.song-list li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.song-list li.none { color: var(--muted); padding: 14px 4px; border: none; }
.song-link {
  flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0; padding: 12px 6px;
  text-decoration: none; font-size: 17px; border-radius: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song-link:hover { background: var(--surface); }
.song-link .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; margin-right: 12px; align-self: center; }
.sl-artist { color: var(--muted); }
.sl-sep { color: var(--muted); white-space: pre; }
.sl-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.sl-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .12s ease; }
.song-list li:hover .sl-actions, .song-list li:focus-within .sl-actions { opacity: 1; }
.sl-btn {
  border: none; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 16px;
}
.sl-btn:hover { background: var(--surface-2); color: var(--ink); }
@media (hover: none) { .sl-actions { opacity: .6; } }
.hero h1 { font-size: clamp(30px, 5vw, 44px); }

/* =========================================================
   Režim hraní: co nejvíc místa na text
   ========================================================= */
body.playing .topbar { display: none; }
.editor.play { max-width: none; padding-top: 6px; gap: 6px; }
.play-bar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  padding: 4px 0 8px; border-bottom: 1px solid var(--line);
}
.pb-back {
  text-decoration: none; font-size: 20px; font-weight: 700; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--surface-2); flex: none;
}
.pb-back:hover { background: var(--line); }
.pb-name { flex: 1 1 220px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.pb-artist { color: var(--muted); }
.play-bar .controls { gap: 6px; }
.play-bar .key-pill { padding: 5px 12px; font-size: 14px; }
.play-bar .tgroup button { padding: 5px 10px; }
.play-bar .btn { padding: 5px 12px; font-size: 14px; }
.play-bar .tgroup span { min-width: 0; }
.tbtn {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px;
  cursor: pointer; font-weight: 600; font-size: 14px;
}
.tbtn:hover { border-color: var(--ink); }
a.tbtn { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
.play .sheet-wrap { padding: 0 0 40vh; }
.play .line { line-height: 2.7; min-height: 2.7em; }
.play .gap { height: .6em; }
.play .sec-block { margin-bottom: .5em; }
.sheet.cols { column-width: 21em; column-gap: 36px; column-rule: 1px solid var(--line); }
.sheet.cols .sec-block { break-inside: avoid; }

/* =========================================================
   Štítky částí vpravo, barevný pruh vpravo
   ========================================================= */
.sec-head { position: relative; height: 0; }
.sec-label {
  position: absolute; right: 0; top: .3em; z-index: 3; margin: 0;
  border-radius: 8px 0 0 8px;
}
.line { border-left: none; border-right: 4px solid transparent; }
.line[data-s] { border-right-color: var(--sc); }
.line.sec-first { padding-right: 7.5em; }
.line.sec-first .line-tools { top: auto; bottom: 2px; transform: none; }
.sheet > .sec-head:first-child + .line, .sec-block:first-child { margin-top: 0; }

/* =========================================================
   Těsnější řádky
   ========================================================= */
.edit .line { line-height: 2.8; min-height: 2.8em; }
.play .line { line-height: 1.75; min-height: 1.75em; }
.play .line.has-chords { line-height: 2.45; min-height: 2.45em; }
.play .chord { font-size: .66em; padding: .18em .45em; }
.play .gap { height: .45em; }

/* štítky částí svisle v pravém okraji u barevného pruhu – nezabírají místo textu */
.sec-label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  top: 0; right: 0; padding: 8px 3px; font-size: 11px; letter-spacing: .08em;
  border-radius: 0 7px 7px 0;
}
.edit .line, .edit .line.sec-first { padding-right: 60px; }
.play .line, .play .line.sec-first { padding-right: 26px; }
.line-tools, .line.sec-first .line-tools { right: 26px; top: 50%; bottom: auto; transform: translateY(-50%); }
.line.sec-short { min-height: 4.4em; }
@media (max-width: 860px) { .edit .line, .edit .line.sec-first { padding-right: 60px; } }
.line.instr { white-space: nowrap; }
.play .sec-block { padding-top: .4em; }
.play .line.instr .c.pad { width: .42em; }

/* =========================================================
   Štítky částí zpátky nahoru vlevo (jako původně), pruh vlevo
   ========================================================= */
.sec-head { position: static; height: auto; }
.sec-label {
  position: static; writing-mode: horizontal-tb; transform: none;
  display: inline-flex; margin: 12px 0 0; padding: 3px 12px 3px 10px;
  font-size: 12px; letter-spacing: .03em; border-radius: 8px 8px 8px 0;
}
.sheet > .sec-head:first-of-type .sec-label { margin-top: 0; }
.play .sec-label { margin-top: 4px; }
.line { border-right: none; border-left: 4px solid transparent; }
.line[data-s] { border-left-color: var(--sc); }
.edit .line, .edit .line.sec-first { padding-right: 44px; }
.play .line, .play .line.sec-first { padding-right: 8px; }
.line-tools, .line.sec-first .line-tools { right: 4px; }
.line.sec-short { min-height: auto; }
@media (max-width: 860px) { .edit .line, .edit .line.sec-first { padding-right: 56px; } }

/* jeden sloupec: text uprostřed, nenatahovat přes celou šířku */
.play .sheet:not(.cols) { max-width: 46em; margin: 0 auto; }
.play .sec-head { padding-bottom: 6px; }

/* štítky částí nahoře vpravo, pruh vpravo */
.sec-head { display: flex; justify-content: flex-end; }
.sec-label { border-radius: 8px 8px 0 8px; }
.line { border-left: none; border-right: 4px solid transparent; }
.line[data-s] { border-right-color: var(--sc); }

/* tónina u názvu, číslo transpozice */
.pb-key { color: var(--muted); font-weight: 600; font-size: 15px; }
.titles .key-pill { margin-top: 8px; }
.tgroup .tr-val {
  min-width: 34px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted);
}
.tgroup .tr-val.moved { color: var(--d4); }

/* žádné prázdné místo pod písničkou při hraní */
.editor.play { padding-bottom: 16px; }
.play .sheet-wrap { padding-bottom: 8px; min-height: 0; }

/* posouvání */
#asBtn { font-weight: 700; font-size: 13px; white-space: nowrap; }
#asSpeed { min-width: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ve sloupcích: štítek části vpravo na řádku s textem */
.line.has-label { padding-right: 4.6em; }
.line.has-label > .sec-label {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  margin: 0; padding: 2px 8px; font-size: 11px; line-height: 1.4; border-radius: 8px;
}

/* akordy prvního řádku se vejdou do barevného pole */
.line.block-start.has-chords { padding-top: .5em; }

/* =========================================================
   Kompaktní zobrazení
   ========================================================= */
.tbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.line-pair { display: flex; align-items: stretch; position: relative; }
.line-pair > .line { flex: 1 1 0; min-width: 0; }
.line-pair > .line:first-child { border-right: none; }
.line-pair > .line + .line { padding-left: calc(10px + 1.7em); box-shadow: inset 1px 0 0 color-mix(in srgb, var(--sc) 40%, transparent); }
.line-pair.has-label > .line:last-of-type { padding-right: 4.6em; }
.line-pair.has-label > .sec-label {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  margin: 0; padding: 2px 8px; font-size: 11px; line-height: 1.4; border-radius: 8px;
}
.rep-badge {
  display: inline-block; margin-left: .5em; padding: .05em .5em; border-radius: 999px;
  font-size: .68em; font-weight: 800; line-height: 1.4; vertical-align: middle;
  background: var(--ink); color: var(--bg);
}
.collapsed-ref {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-direction: row-reverse;
  margin: 4px 0 8px; padding: 6px 10px; cursor: pointer; border-radius: 8px 0 0 8px;
  border-right: 4px solid var(--sc); background: color-mix(in srgb, var(--sc) 8%, transparent);
}
.collapsed-ref:hover { background: color-mix(in srgb, var(--sc) 16%, transparent); }
.collapsed-ref .sec-label { position: static; transform: none; margin: 0; }
.cr-text { color: var(--muted); font-size: 14px; font-weight: 600; }
.line.rep-line { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ink) 35%, transparent); }

/* =========================================================
   Play-along
   ========================================================= */
.al-btn { background: linear-gradient(90deg, var(--d0), var(--d5), var(--d4)); color: #fff; border: none; }
.al-btn:hover { filter: brightness(1.08); }
.along .play-bar { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.al-play { min-width: 44px; font-size: 16px !important; }
.al-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; min-width: 84px; }
.al-seek { width: min(260px, 40vw); accent-color: var(--d0); }
.al-voc { display: inline-flex; align-items: center; gap: 4px; font-size: 18px; }
.al-voc input { width: 90px; accent-color: var(--d5); }

.al-now {
  position: sticky; top: 52px; z-index: 15; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 8px 2px 10px; background: var(--bg);
}
.al-now small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.al-now .chord { position: static; display: inline-block; font-size: 30px; padding: .2em .55em; min-width: 2.4em; text-align: center; }
.al-now .al-next { font-size: 20px; opacity: .75; }
.al-cur { transition: transform .15s ease; }
.al-next-wrap { min-width: 120px; }
.al-meter { height: 5px; border-radius: 9px; background: var(--line); margin-top: 6px; overflow: hidden; width: 120px; }
.al-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--d1), var(--d0)); border-radius: 9px; }
.al-src { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-left: auto; }

.al-sheet { max-width: 46em; margin: 0 auto; width: 100%; }
.along .sheet-wrap { padding-bottom: 45vh; }
.along.al-editing .sheet-wrap { padding-bottom: 260px; }
.al-sec { margin: .9em 0 .1em; }
.al-sec .sec-label { position: static; display: inline-block; }
.al-line { cursor: pointer; transition: font-size .2s ease, opacity .2s ease, background .2s ease; border-radius: 6px; }
.al-line .c { color: var(--muted); transition: color .08s linear; }
.al-line.past { opacity: .5; }
.al-line.past .c { color: var(--ink); }
.al-line.cur { font-size: 1.14em; background: color-mix(in srgb, var(--sc, var(--d3)) 16%, transparent); opacity: 1; }
.al-line.cur .c { color: color-mix(in srgb, var(--ink) 55%, transparent); }
.al-line.cur .c.on { color: var(--ink); text-shadow: 0 0 .5px var(--ink); }
.al-line .chord { transition: transform .15s ease, box-shadow .15s ease; }
.al-line .chord.now { transform: scale(1.3) translateY(-2px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chip-bg) 35%, transparent), 0 4px 14px color-mix(in srgb, var(--chip-bg) 55%, transparent); z-index: 3; }
.al-empty p { max-width: 34em; margin: 8px auto 0; color: var(--muted); }

/* časová osa pro doladění */
.al-tl {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.08); padding: 6px 12px 8px;
}
.tl-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.tl-hint { flex: 1; font-size: 12.5px; color: var(--muted); }
.tl-tools .tbtn { padding: 2px 11px; }
.tl-area { position: relative; height: 172px; overflow: hidden; border-radius: 10px; background: var(--surface-2); touch-action: none; cursor: crosshair; }
.tl-area canvas { position: absolute; inset: 0; }
.tl-lab { position: absolute; left: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); opacity: .6; pointer-events: none; z-index: 1; }
.tl-items { position: absolute; inset: 0; }
.tl-it {
  position: absolute; box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 12px; line-height: 1; padding: 0 5px; display: flex; align-items: center; border-radius: 7px;
  cursor: grab; user-select: none; touch-action: none; z-index: 2;
}
.tl-it:hover { filter: brightness(1.06); z-index: 4; }
.tl-it.dragging { cursor: grabbing; z-index: 6; outline: 2px solid var(--ink); overflow: visible; }
.tl-it.dragging::after { content: attr(data-d); position: absolute; top: -18px; left: 0; font-size: 11px; font-weight: 700; background: var(--ink); color: var(--bg); padding: 2px 5px; border-radius: 5px; }
.tl-line { background: color-mix(in srgb, var(--d3) 22%, var(--surface)); border: 1.5px solid var(--d3); font-weight: 600; }
.tl-word { background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.tl-chord { background: var(--chip-bg); color: var(--chip-ink); font-weight: 800; border-radius: 999px; transform: translateX(-4px); padding: 0 8px; overflow: visible; }
.tl-chord::before { content: ''; position: absolute; left: 3px; top: 100%; width: 2px; height: 80px; background: var(--chip-bg); opacity: .5; }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--d0); z-index: 5; pointer-events: none; }
.tl-head::before { content: ''; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--d0); }
@media (max-width: 640px) {
  .al-now { top: 96px; }
  .al-now .chord { font-size: 24px; }
  .al-seek { width: 100%; order: 9; }
}

/* YouTube přehrávač pro play-along (YouTube vyžaduje viditelný přehrávač aspoň 200×200) */
.al-yt {
  position: fixed; right: 14px; bottom: 14px; z-index: 40; width: 356px; height: 200px;
  border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.25); background: #000;
}
.al-yt[hidden] { display: none; }
.al-yt iframe { width: 100%; height: 100%; display: block; }
body.al-editing .al-yt { bottom: 236px; }
.along .sheet-wrap { padding-bottom: max(45vh, 240px); }
.al-err { color: var(--d0); font-weight: 600; }
.al-ytpop { display: grid; gap: 8px; width: min(300px, calc(100vw - 52px)); }
.al-ytpop input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--surface); color: var(--ink); }
.al-ytpop .modal-actions { margin-top: 2px; }
.al-ytpop .hint { margin: 0; padding: 0; background: none; }
@media (max-width: 640px) {
  .al-yt { right: 8px; left: 8px; width: auto; height: 200px; bottom: 8px; }
}
.al-ad {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; margin: 0;
  max-width: calc(100% - 24px); text-align: center; font-size: 16px; font-weight: 700;
  color: var(--d1-ink); background: var(--d1); padding: 10px 22px; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); pointer-events: none;
}
.al-ad[hidden] { display: none; }

/* Řádky bez textu (mezihra, intro z akordů): akordy přímo v řádku, žádné místo na text */
.line.instr, .play .line.instr.has-chords { line-height: 2; min-height: 2em; padding-top: .1em !important; padding-bottom: .1em; }
.line.instr .c.pad:has(.chord) { width: auto; }
.line.instr .chord { position: relative; left: 0; bottom: auto; display: inline-block; vertical-align: middle; margin-right: .3em; }
.edit .line.instr .c.pad:not(:has(.chord)) { width: .8em; }
.line.instr { white-space: normal; }
.al-sec-btn { cursor: pointer; }


/* Seznam: dvě jasné ikony (Play-along / Jen akordy), schvalování */
.sl-actions { opacity: 1; gap: 6px; align-items: center; }
.sl-ico {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; text-decoration: none;
  font-size: 18px; line-height: 1; border: 1.5px solid transparent; transition: transform .12s ease, filter .12s ease;
}
.sl-ico:hover { transform: translateY(-1px); filter: brightness(1.05); }
.sl-along { background: color-mix(in srgb, var(--d5) 18%, var(--surface)); border-color: color-mix(in srgb, var(--d5) 45%, transparent); }
.sl-chords { background: color-mix(in srgb, var(--d3) 16%, var(--surface)); border-color: color-mix(in srgb, var(--d3) 40%, transparent); }
.sl-pending { margin-left: 8px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: var(--d1-ink); background: color-mix(in srgb, var(--d1) 40%, transparent); white-space: nowrap; }
.sl-approve { border: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--d2); color: var(--d2-ink); }
.sl-approve:hover { filter: brightness(1.06); }
.ico { display: inline-grid; place-items: center; line-height: 0; }
.btn .ico { margin-right: -2px; }
.sl-ico .ico svg { width: 20px; height: 20px; }
.sl-along { color: color-mix(in srgb, var(--d5) 80%, var(--ink)); }
.sl-chords { color: color-mix(in srgb, var(--d3) 80%, var(--ink)); }
.sl-ico .ico svg { width: 23px; height: 23px; }
.sl-ico { width: 40px; height: 40px; }
.capo-on { border-color: var(--d1); background: color-mix(in srgb, var(--d1) 14%, var(--surface)); }
.capo-pick { display: grid; gap: 6px; min-width: 240px; }
.capo-opt { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: baseline; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.capo-opt:hover { border-color: var(--ink); }
.capo-opt.on { border-color: var(--d1); background: color-mix(in srgb, var(--d1) 14%, var(--surface)); }
.capo-opt b { font-size: 15px; }
.capo-opt span { font-size: 14px; }
.capo-opt small { grid-column: 2; color: var(--muted); font-size: 12px; }
.sl-along-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 11px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 14px; color: #fff; white-space: nowrap;
  background: linear-gradient(90deg, var(--d0), var(--d5), var(--d4)); box-shadow: 0 2px 8px color-mix(in srgb, var(--d5) 35%, transparent);
  transition: transform .12s ease, filter .12s ease;
}
.sl-along-pill:hover { transform: translateY(-1px); filter: brightness(1.06); }
.sl-along-pill .ico svg { width: 19px; height: 19px; }
.sl-link { text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.sl-link:hover { background: var(--surface-2); text-decoration: underline; }
.sl-link-along { color: color-mix(in srgb, var(--d5) 85%, var(--ink)); }
.sl-link-chords { color: color-mix(in srgb, var(--d3) 85%, var(--ink)); }
