/* Visual escuro em cartões (referência: apps de saúde/vitals). Celular primeiro. */
:root {
  --bg: #0a0c0f; --surface: #16181d; --surface-2: #1e2127; --line: #2a2e36; --line-2: #3a3f49;
  --fg: #f2f4f7; --muted: #8d95a3; --dim: #5f6673;
  --accent: #86b6f2; --accent-ink: #0a1424; --lift: #ffd166; --cifra: #ff8a1f; --danger: #ff8a80; --ok: #8fd3a8;
  --glass: rgba(255, 255, 255, .10); --glass-line: rgba(255, 255, 255, .22);
  --chord: "Archivo Narrow", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
  --lyric: "Barlow Semi Condensed", "Segoe UI", Roboto, sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --size: 22px;
  --tab-h: 62px;
  --r: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- topo e abas ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10, 12, 15, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: env(safe-area-inset-top, 0); }
.top-inner { max-width: 960px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 18px; min-height: 52px; }
.brand { font: 600 17px var(--ui); color: var(--fg); text-decoration: none; letter-spacing: -.01em; }
nav { display: flex; align-items: center; gap: 4px; flex: 1; }
nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; }
nav a svg { width: 18px; height: 18px; }
nav a.on { color: var(--fg); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); }
nav .sp { flex: 1; }

@media (max-width: 799px) {
  .top { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .top-inner { justify-content: center; min-height: 44px; padding-top: 8px; padding-bottom: 4px; }
  nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; gap: 0; justify-content: space-around;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0)); padding: 6px 4px env(safe-area-inset-bottom, 0);
    background: rgba(14, 16, 20, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  nav .sp { display: none; }
  nav a { flex: 1; flex-direction: column; gap: 3px; padding: 4px 2px; border-radius: 12px; font-size: 11px; font-weight: 500; background: none !important; box-shadow: none !important; }
  nav a svg { width: 24px; height: 24px; }
  nav a.on { color: var(--fg); }
  nav a.on svg { color: var(--accent); }
  main { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0) + 28px) !important; }
  body.song-page .top, body.song-page nav { display: none; }
}

main { max-width: 960px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right)) 60px max(16px, env(safe-area-inset-left)); }
h1 { font: 600 clamp(26px, 7vw, 34px)/1.15 var(--ui); letter-spacing: -.02em; margin: 6px 0 4px; text-wrap: balance; }
h2 { font: 600 19px/1.25 var(--ui); margin: 28px 0 10px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.by { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.eyebrow, .date { font: 600 12px var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* ---------- botões e campos ---------- */
button, select, input, textarea { font: inherit; color: var(--fg); }
button, .btn { font: 500 15px var(--ui); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; min-height: 44px; min-width: 44px; padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--fg); white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--line-2); }
button:active, .btn:active { transform: scale(.97); }
button:focus-visible, .btn:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button svg, .btn svg { width: 18px; height: 18px; flex: none; }
.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 600; }
.danger { color: var(--danger); }
.small { min-height: 34px; min-width: 34px; padding: 0 12px; font-size: 13px; }
.on-btn { background: var(--glass); border-color: var(--glass-line); }
.spotify { background: #1db954; color: #04140a; border-color: #1db954; font-weight: 600; }
.icon-btn { padding: 0; width: 44px; }
select, input[type=text], input[type=url], input[type=email], input[type=password], input[type=date], input[type=number], textarea { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; width: 100%; min-height: 46px; }
select { width: auto; min-width: 76px; cursor: pointer; font-weight: 600; }
textarea { resize: vertical; line-height: 1.4; }
textarea.mono { font: 14px/1.4 ui-monospace, Menlo, Consolas, monospace; min-height: 320px; }
label.f { display: block; margin: 14px 0; }
label.f > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.msg { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin: 12px 0; }
.msg.err { border-color: var(--danger); color: var(--danger); }
.msg.ok { border-color: var(--ok); }

/* ---------- cartões e listas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 12px 0; }
.list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 14px; background: var(--surface); border-radius: var(--r); }
.item .tile { grid-row: span 2; width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; font: 600 24px var(--ui); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.tile.t0 { background: linear-gradient(160deg, #9db6cc 0%, #4d6d8c 55%, #1d2c3d 100%); }
.tile.t1 { background: linear-gradient(160deg, #3bbfa0 0%, #1d5c63 50%, #0e1d2e 100%); }
.tile.t2 { background: linear-gradient(160deg, #6f9fc4 0%, #2b4f78 55%, #0c1a2c 100%); }
.tile.t3 { background: linear-gradient(160deg, #a58bd6 0%, #5a3f8f 55%, #1d1533 100%); }
.item .info { min-width: 0; }
.item .t { font: 600 18px/1.25 var(--ui); letter-spacing: -.01em; }
.item .t a { color: var(--fg); text-decoration: none; }
.item .t a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.item .s { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.item > svg { color: var(--dim); width: 20px; height: 20px; }
.item.plain .btns { grid-column: 1 / -1; }
.item .btns { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; position: relative; z-index: 1; }
.item .btns .btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
.item.plain { grid-template-columns: minmax(0, 1fr) auto; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.chip.k { color: var(--accent); background: rgba(134, 182, 242, .12); }

/* ---------- página da música ---------- */
.song-head { display: flex; align-items: center; gap: 10px; padding-top: calc(env(safe-area-inset-top, 0) + 4px); }
.song-head .tt { flex: 1; min-width: 0; }
.song-head h1 { font-size: 20px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.song-head .by { font-size: 13px; margin: 1px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.round { width: 40px; height: 40px; min-height: 40px; min-width: 40px; padding: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.pos { font: 600 12px var(--ui); color: var(--muted); min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }

.seg-ctl { display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin: 12px 0 0; }
.seg-ctl button { flex: 1; min-height: 36px; min-width: 0; padding: 0 6px; border: 1px solid transparent; background: none; color: var(--muted); font-size: 14px; }
.seg-ctl button.on-btn { color: var(--fg); background: var(--glass); border-color: var(--glass-line); }

.road { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; font: 500 12px/1.5 var(--ui); color: var(--muted); }
.road li { display: inline-flex; align-items: center; gap: 6px; }
.road li:not(:last-child)::after { content: "›"; color: var(--dim); }
.road .up { color: var(--lift); font-weight: 600; }
.songnote { margin: 10px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.songnote.open { display: block; }

.chart { margin-top: 10px; font-size: var(--size); }
.chart.cols { column-gap: .5em; }
.block { break-inside: avoid; background: var(--surface); border-radius: .6em; padding: .45em .65em .55em; margin: 0 0 .4em; }
.name { font: 600 11px/1.3 var(--ui); font-size: max(10px, .5em); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .3em; }
.name .vezes { display: inline-block; margin-left: .5em; color: var(--accent); font-weight: 700; font-size: 1.15em; letter-spacing: 0; }
.lines { display: grid; gap: .2em; min-width: 0; }
.ln { line-height: 1.15; }
.ln.plain { font: 500 1em/1.25 var(--lyric); }
.seg { display: inline-flex; flex-direction: column; vertical-align: bottom; }
.seg .ch { font: 700 .88em/1.1 var(--chord); color: var(--cifra); min-height: 1.1em; padding-right: .45em; white-space: pre; }
.seg .tx { font: 500 1em/1.25 var(--lyric); white-space: pre; min-height: 1.25em; }
.seg.vazio .tx { min-width: .2em; }
.chrow { display: flex; flex-wrap: wrap; gap: .05em .8em; font: 700 1em/1.25 var(--chord); color: var(--cifra); }
.chrow span:first-child { color: var(--cifra); }
.mapa .chrow { font-size: .9em; }
.lift-head { break-inside: avoid; font: 700 .7em/1.2 var(--ui); color: var(--lift); margin: .2em 0 .4em; padding: .35em .65em; border-radius: .6em; background: rgba(255, 209, 102, .12); }
.inicio { font: 500 .72em/1.3 var(--lyric); color: var(--fg); }
.inicio b { font: 600 .75em var(--ui); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-right: .4em; }
.note { font: 400 .62em/1.35 var(--ui); color: var(--muted); }

/* barra de ferramentas da música (fica embaixo, ao alcance do polegar) */
body.song-page main { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0)) !important; }
.toolbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom, 0));
  background: rgba(14, 16, 20, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.toolbar-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tgroup { display: flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 999px; padding: 2px; }
.tgroup button { min-height: 40px; min-width: 38px; padding: 0 8px; border: 0; background: none; font-size: 15px; font-weight: 600; }
.tgroup select { min-height: 36px; min-width: 52px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--glass); text-align: center; text-align-last: center; -webkit-appearance: none; appearance: none; color: var(--cifra); font: 700 17px var(--chord); }
.tgroup .lbl { font: 600 10px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding-left: 8px; }
.tgroup button.on-btn { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--accent); }
.toolbar .round { width: 44px; height: 44px; }
.sheet { position: fixed; z-index: 29; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom, 0)); padding: 14px max(16px, env(safe-area-inset-left)) 16px;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: 0 -18px 40px rgba(0, 0, 0, .5); }
.sheet-inner { max-width: 960px; margin: 0 auto; }
.sheet iframe { width: 100%; border: 0; border-radius: 12px; height: 152px; display: block; }
.sheet .actions { margin-top: 12px; }

@media (min-width: 800px) {

  .chart:not(.cols) .block { display: grid; grid-template-columns: minmax(0, 7em) minmax(0, 1fr); gap: 4px 16px; padding: .5em .8em; }
  .chart:not(.cols) .name { padding-top: .45em; margin: 0; }
}

/* ---------- editor ---------- */
.mapa-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 70px 120px minmax(0, 1.6fr) auto; gap: 6px; align-items: center; margin: 6px 0; }
.mapa-row .mv { display: flex; gap: 4px; }
.preview { border: 1px dashed var(--line-2); border-radius: 14px; padding: 8px 12px; margin-top: 10px; --size: 18px; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 8px; }
.tbl th, .tbl td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 640px) {
  .mapa-row { grid-template-columns: 1fr 1fr; }
  .mapa-row > :nth-child(1), .mapa-row > :nth-child(4) { grid-column: 1 / -1; }
}
@media print {
  .top, nav, .toolbar, .sheet, .seg-ctl, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .block { background: none; border: 1px solid #ccc; }
}

/* ---------- caber sempre na largura do aparelho ---------- */
.row > *, .actions > *, .card, .block, .lines, .chart, .info, .tt, td { min-width: 0; }
main { overflow-wrap: anywhere; }
img, iframe, video, svg, table { max-width: 100%; }
button, .btn { white-space: normal; text-align: center; line-height: 1.2; }
.seg-ctl button, .tgroup button, .item .btns .btn { white-space: nowrap; }
select { max-width: 100%; text-overflow: ellipsis; }
.row select, .card select, label.f select, .mapa-row select { width: 100%; }
.mapa-row > * { min-width: 0; }
.seg { max-width: 100%; }
.seg .tx { white-space: pre-wrap; }
.seg .ch { white-space: pre-wrap; }
textarea.mono { white-space: pre; overflow-x: auto; }

/* Tabelas viram cartões empilhados no celular */
@media (max-width: 640px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr:first-child { display: none; }
  .tbl tr { background: var(--surface); border-radius: 16px; padding: 10px 14px; margin: 0 0 8px; }
  .tbl td { border: 0; padding: 3px 0; }
  .tbl td .btn, .tbl td select { margin-top: 6px; }
}

/* Barra da música em telas estreitas (até 360 px) */
@media (max-width: 380px) {
  .toolbar { padding-left: 6px; padding-right: 6px; }
  .toolbar-inner { gap: 4px; }
  .tgroup .lbl { display: none; }
  .tgroup button { min-width: 32px; padding: 0 5px; font-size: 14px; }
  .tgroup select { min-width: 44px; padding: 0 4px; font-size: 16px; }
  .toolbar .round { width: 40px; height: 40px; min-width: 40px; }
  .seg-ctl button { font-size: 13px; padding: 0 2px; }
}
@media (max-width: 330px) {
  .tgroup button { min-width: 28px; padding: 0 3px; }
  .song-head h1 { font-size: 18px; }
}

/* Renomear bloco na prévia do editor */
.name-edit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pencil { min-height: 30px; min-width: 30px; width: 30px; padding: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent); }
.pencil svg { width: 15px; height: 15px; }
.name-edit input { min-height: 36px; padding: 6px 10px; font: 500 15px var(--ui); letter-spacing: 0; text-transform: none; color: var(--fg); flex: 1 1 140px; }
.name-edit .small { min-height: 36px; }

/* Botão da playlist do culto */
.playlist-btn { display: flex; width: 100%; margin: 14px 0 4px; min-height: 50px; font-size: 16px; }
@media (min-width: 800px) { .playlist-btn { display: inline-flex; width: auto; } }

/* Botões lado a lado nas listas do painel */
.td-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) { .td-btns { justify-content: flex-start; margin-top: 6px; } .tbl td .td-btns .btn { margin-top: 0; } }

/* Parte repetida no mapa: só o nome, sem repetir os acordes */
.block.repete { padding-top: .35em; padding-bottom: .35em; }
.block.repete .name { margin-bottom: 0; }
.block.repete .lines:empty { display: none; }

/* Compartilhar repertório */
.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 8px 0 4px; min-height: 48px; font-size: 15px; }
.share-btn svg { width: 20px; height: 20px; flex: none; }
@media (min-width: 800px) { .share-btn { display: inline-flex; width: auto; margin-left: 8px; } }

/* Escolher partes da música no repertório */
details.partes { margin: 4px 0 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
details.partes > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; min-height: 44px; padding: 8px 12px; cursor: pointer; list-style: none; }
details.partes > summary::-webkit-details-marker { display: none; }
details.partes > summary::after { content: "▾"; color: var(--muted); margin-left: auto; }
details.partes[open] > summary::after { content: "▴"; }
.partes-tit { font-weight: 600; }
.partes-resumo { color: var(--accent); font-size: 14px; }
.partes-resumo.erro { color: var(--danger); }
details.partes > .hint, details.partes > .partes-lista, details.partes > .actions { margin-left: 12px; margin-right: 12px; }
details.partes > .actions { margin-bottom: 10px; }
.partes-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 2px 12px; }
.partes-lista .parte { display: flex; align-items: center; gap: 10px; min-height: 40px; min-width: 0; }
.partes-lista .parte input { width: 20px; height: 20px; flex: none; accent-color: var(--cifra); }
.partes-lista .parte span { min-width: 0; overflow-wrap: anywhere; }

/* Medley: músicas emendadas no repertório */
.chip.medley { color: var(--cifra); background: rgba(255, 138, 31, .14); }
.list .item.medley-ini { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.list .item.medley-cont { margin-top: -8px; border-top-left-radius: 6px; border-top-right-radius: 6px; box-shadow: inset 0 2px 0 rgba(255, 138, 31, .55); }
.card.medley-ini { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.card.medley-cont { border-top-left-radius: 6px; border-top-right-radius: 6px; box-shadow: inset 0 2px 0 rgba(255, 138, 31, .55); }
.medley-bar { margin: 6px 0 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.medley-bar b { color: var(--cifra); }
.medley-bar a { color: var(--fg); font-weight: 600; }

.medley-link { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -6px 0; position: relative; z-index: 1; color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.medley-link .medley-plus { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 999px; font: 600 24px/1 var(--ui); background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--muted); }
.medley-link span { position: absolute; left: calc(50% + 30px); }
.medley-link.on { color: var(--cifra); }
.medley-link.on .medley-plus { background: var(--cifra); border: 1px solid var(--cifra); color: #1a0d00; }

/* Medley numa tela só */
.road .medley-song span { color: var(--cifra); font-weight: 700; }
.chart .medley-head { break-inside: avoid; break-after: avoid; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5em; margin: .1em 0 .45em; padding: .3em .1em .25em; border-bottom: 2px solid var(--cifra); font: 700 .78em/1.25 var(--ui); color: var(--fg); }
.chart .medley-head .mh-n { color: var(--cifra); }
.chart .medley-head .mh-k { color: var(--cifra); font-family: var(--chord); }
.chart .medley-head .mh-l { color: var(--muted); font-weight: 500; }

/* ---------- mais tocadas, tons dos cantores, bandas e backlog ---------- */
.chip.toque { color: var(--lift); background: rgba(255, 209, 102, .13); }
.chip.banda { color: var(--ok); background: rgba(143, 211, 168, .13); }
.banda-tag { margin: 4px 0 2px; }
.filtros { margin-top: 4px; }
.filtros label.f { margin: 6px 0 0; }
.card.cantor { padding: 14px 16px; }
.cantor-nome { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 18px/1.25 var(--ui); margin-bottom: 6px; }
.tons-lista { display: grid; }
.tom-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.tom-linha:first-child { border-top: 0; }
.tl-mus { color: var(--fg); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.tl-tom { color: var(--cifra); font: 700 20px var(--chord); text-align: right; }
.tl-quando { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.banda { margin-top: 8px; }
.banda-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 26px 0 10px; }
.banda-head h2 { margin: 0; }
.banda-acoes { margin-left: auto; display: flex; gap: 6px; }
.back-add { margin-bottom: 4px; }
.item .back-rm { position: relative; z-index: 1; }

/* Ordem das partes no repertório */
details.partes > .partes-ordem, details.partes > .po-ins { margin-left: 12px; margin-right: 12px; }
.partes-ordem { list-style: none; padding: 0; margin-top: 4px; margin-bottom: 8px; display: grid; gap: 4px; }
.po-linha { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 2px 4px 2px 8px; border-radius: 10px; background: var(--surface); }
.po-n { color: var(--cifra); font: 700 15px var(--chord); text-align: center; }
.po-t { min-width: 0; overflow-wrap: anywhere; }
.po-bt { display: flex; gap: 4px; }
.po-bt button { min-width: 36px; padding: 0 8px; }
.po-bt button:disabled { opacity: .3; }
.po-vazio { color: var(--danger); font-size: 14px; padding: 6px 0; }
.po-ins { align-items: center; gap: 8px; }
.po-ins select { flex: 1 1 160px; }
.po-ins button { flex: 0 0 auto; }

/* Capotraste pessoal */
.capo-bar { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 0; padding: 3px 4px 3px 10px; border: 1px solid rgba(255, 138, 31, .45); background: rgba(255, 138, 31, .10); border-radius: 999px; font-size: 13px; line-height: 1.3; color: var(--fg); max-width: 100%; }
.capo-bar[hidden] { display: none; }
.capo-bar b { font-weight: 700; color: var(--cifra); }
.capo-x { min-height: 0; min-width: 0; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; }
.capo-txt { min-width: 0; }
.capo-grp { position: relative; gap: 4px; min-height: 40px; padding: 0 12px 0 10px; border: 1px dashed var(--line-2); color: var(--fg); font: 600 14px var(--ui); cursor: pointer; white-space: nowrap; }
.capo-grp::after { content: "▾"; font-size: 11px; color: var(--muted); }
.capo-grp .capo-ic { font-size: 14px; line-height: 1; }
.capo-grp select { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.capo-grp.on { border: 1px solid var(--cifra); color: var(--cifra); background: rgba(255, 138, 31, .12); }
.capo-grp:focus-within { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 440px) { .capo-grp { padding: 0 8px 0 9px; } .capo-grp .capo-ic { display: none; } .toolbar-inner { gap: 4px; } .toolbar { padding-left: 8px; padding-right: 8px; } .tgroup button { min-width: 32px; padding: 0 5px; } .tgroup select { min-width: 46px; padding: 0 4px; } .toolbar .round { width: 42px; height: 42px; min-width: 42px; } }
@media (max-width: 380px) { .capo-grp { padding: 0 9px; font-size: 13px; } .capo-grp::after { display: none; } }

/* Play verde quando a música tem link do Spotify */
.round.spotify { background: #1db954; border-color: #1db954; color: #04140a; }

/* Botão com cara de link (ex.: Esqueci minha senha) */
.linkbtn { min-height: 0; padding: 4px 0; border: 0; background: none; color: var(--accent); font: 500 15px var(--ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
