:root {
  --bg: #f5f3ee; --surface: #ffffff; --surface-2: #ece9e1; --text: #1d1d1f; --muted: #6b6a66;
  --line: #d9d5cb; --accent: #d9601c; --accent-text: #ffffff; --now: #fff1e6; --danger: #b3261e;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c; --surface: #1d2028; --surface-2: #272b35; --text: #eeeae2; --muted: #9a978f;
    --line: #333845; --accent: #ff8a3d; --accent-text: #1a1206; --now: #3a2a1d; --danger: #ff7b72;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }

/* ---- cabeçalho ---- */
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; max-width: 760px; margin: 0 auto; }
.topbar h1 { font-size: 1.05rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 4px; }
.brand span { color: var(--accent); }
.sub { color: var(--muted); margin: 0 0 18px; }
.icon-btn {
  border: 0; background: var(--surface-2); border-radius: 999px; width: 40px; height: 40px;
  display: inline-grid; place-items: center; flex: none; font-size: 1.1rem;
}

/* ---- cartões e formulários ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 0.95rem; margin: 0 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > input { flex: 1 1 200px; min-width: 0; }
input[type=text], input[type=url], input[type=password], input[type=tel], input[type=email] {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 100%;
}
.btn {
  border: 0; border-radius: 10px; padding: 12px 18px; background: var(--accent); color: var(--accent-text);
  font-weight: 700;
}
.btn.secondary { background: var(--surface-2); color: var(--text); font-weight: 600; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.5; }
.senha-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.senha-row input[type=password], .senha-row input[type=text] { flex: 1 1 180px; width: auto; }
.senha-row .hint { flex-basis: 100%; }
.or { text-align: center; color: var(--muted); margin: 10px 0; font-size: 0.9rem; }
.file-btn { display: block; text-align: center; }
.error { color: var(--danger); margin-top: 8px; }
.hint { color: var(--muted); font-size: 0.9rem; }

/* ---- listas de músicas ---- */
.songs { list-style: none; margin: 0; padding: 0; }
.songs li a {
  display: flex; gap: 12px; align-items: center; padding: 10px 4px; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.songs li:last-child a { border-bottom: 0; }
.thumb { width: 56px; height: 42px; border-radius: 8px; background: var(--surface-2) center/cover; flex: none; display: grid; place-items: center; color: var(--muted); }
.songs .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.songs .m { color: var(--muted); font-size: 0.85rem; }
.songs .info { min-width: 0; flex: 1; }
.empty { color: var(--muted); font-size: 0.95rem; }

/* ---- processamento ---- */
.status { text-align: center; padding: 40px 16px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--surface-2); border-top-color: var(--accent); margin: 0 auto 16px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- tela da música ---- */
.now {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.now .cur-name { font-size: clamp(2.6rem, 13vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.now .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.now .next { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); }
.now .next b { color: var(--text); font-size: 1.6rem; }

.shapes {
  display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin-top: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 8px 8px;
}
.shape { margin: 0; text-align: center; min-width: 0; }
.shape .diagram { max-width: 100%; height: auto; margin: 0 auto; }
.shape figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.shape.cur figcaption { color: var(--text); font-weight: 700; }
.shape.cur { flex: 0 1 184px; }
.shape.nxt { flex: 0 1 115px; opacity: 0.6; }
.no-chord { height: 224px; display: grid; place-items: center; color: var(--muted); width: 184px; max-width: 100%; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(0 0 0 / 0.18);
}
.dock .label { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.dock-cur { min-width: 0; flex: 0 1 auto; }
.dock-cur b { display: block; font-size: 2.2rem; line-height: 1.05; font-weight: 800; white-space: nowrap; }
.dock-next { text-align: center; opacity: 0.65; flex: none; }
.dock-next b { display: block; font-size: 1rem; }
.dock .play { width: 52px; height: 52px; }
body.has-dock { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
.player { margin: 14px 0; }
.player .controls { display: flex; align-items: center; gap: 12px; }
.play {
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text);
  font-size: 1.4rem; flex: none; display: grid; place-items: center;
}
.seek { flex: 1; min-width: 0; }
.seek input { width: 100%; accent-color: var(--accent); }
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }

.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; text-align: center; min-width: 0; }
.tool .label { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 2px; margin-top: 4px; }
.stepper button { border: 0; background: var(--surface-2); border-radius: 8px; width: 32px; height: 34px; font-size: 1.1rem; flex: none; padding: 0; }
.stepper b { font-variant-numeric: tabular-nums; font-size: 0.9rem; white-space: nowrap; min-width: 0; overflow: hidden; }

.meta-line { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.meta-line b { color: var(--text); }

.sheet-row { margin-bottom: 14px; }
.sheet-row .bars { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 6px; }
.bar-col { min-width: 0; }
.row-chords { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rc {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 2px 0;
  text-align: center; flex: 0 0 auto;
}
.rc b { display: block; font-size: 0.85rem; }
.rc.on { border-color: var(--accent); background: var(--now); }
.rc.on b { color: var(--accent); }
.bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px;
  min-height: 52px; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: center; cursor: pointer;
  position: relative; min-width: 0; padding-top: 16px;
}
.bar .n { position: absolute; top: 2px; left: 6px; font-size: 0.6rem; color: var(--muted); }
.bar .slot {
  font-weight: 700; font-size: 0.95rem; white-space: nowrap; border-radius: 6px; text-align: left; min-height: 1.3em;
}
.bar .slot.long { font-size: 0.78rem; }
.bar .slot.rep { color: var(--muted); font-weight: 500; }
.bar.cur { background: var(--now); border-color: var(--accent); }
.bar .slot.on { color: var(--accent); }
@media (max-width: 520px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chord-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chord-list .cl { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 4px 2px; text-align: center; }
.chord-list .cl b { display: block; }

.section-title { font-size: 0.95rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin: 22px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.toggle { font-size: 0.85rem; text-transform: none; letter-spacing: 0; display: flex; gap: 6px; align-items: center; font-weight: 500; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.actions .btn { flex: 1 1 auto; }
.share-box { margin-bottom: 14px; }
.share-box input { font-size: 0.9rem; }

/* ---- diagramas ---- */
.diagram { display: block; }
.dg-fret { stroke: var(--muted); stroke-width: 1; }
.dg-nut { stroke: var(--text); stroke-width: 4; }
.dg-string { stroke: var(--muted); stroke-width: 1; }
.dg-dot { fill: var(--text); }
.dg-open { fill: none; stroke: var(--text); stroke-width: 1.4; }
.dg-mark { fill: var(--muted); font-size: 11px; }
.dg-base { fill: var(--muted); font-size: 10px; }
.dg-none { fill: var(--muted); font-size: 10px; }

#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 0.9rem; z-index: 10;
  max-width: calc(100% - 32px);
}

/* ---- contas ---- */
.wrap.narrow { max-width: 440px; padding-top: 32px; }
.brand.big { font-size: 2.2rem; }
.userbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.userbar .brand { margin: 0; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 4px 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.tab { border: 0; background: none; border-radius: 8px; padding: 9px; font-weight: 600; color: var(--muted); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack > label:not(.toggle) { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; color: var(--muted); }
.stack input[type=email], .stack input[type=password], .stack input[type=text], .stack input[type=tel] {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 100%; color: var(--text); font-size: 1rem;
}

/* ---- playlists ---- */
.list-gap { margin-top: 10px; }
.thumb.pl { font-size: 1.2rem; }
.pl-item { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.pl-item:last-child { border-bottom: 0; }
.pl-item .song-link { flex: 1; min-width: 0; border-bottom: 0 !important; }
.pl-item .pos { color: var(--muted); font-size: 0.85rem; width: 1.4em; text-align: right; flex: none; }
.pl-actions { display: flex; gap: 4px; flex: none; }
.icon-btn.sm { width: 34px; height: 34px; font-size: 0.95rem; }
.icon-btn:disabled { opacity: 0.35; }
.pl-songs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; margin-bottom: 14px; }
.checks { display: flex; flex-direction: column; gap: 4px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.pl-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; font-size: 0.85rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px;
}
.pl-nav a { text-decoration: none; color: var(--accent); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-nav .pl-next { text-align: right; }
.pl-nav .pl-name { color: var(--muted); white-space: nowrap; }

/* ---- assinatura ---- */
:root { --ok: #1f7a3d; --ok-bg: #e6f4ea; --warn: #8a5a00; --warn-bg: #fff4d6; --bad-bg: #fde8e7; }
@media (prefers-color-scheme: dark) {
  :root { --ok: #6fd28f; --ok-bg: #16301f; --warn: #ffcf66; --warn-bg: #352a10; --bad-bg: #3a1c1b; }
}
.trial-bar {
  display: block; text-decoration: none; background: var(--warn-bg); color: var(--warn); border-radius: 10px;
  padding: 10px 12px; margin: -4px 0 14px; font-size: 0.92rem;
}
.test-banner {
  background: var(--warn-bg); color: var(--warn); border: 1px dashed currentColor; border-radius: 10px;
  padding: 8px 10px; font-size: 0.9rem; margin-bottom: 12px;
}
.plan-box { display: flex; flex-direction: column; gap: 2px; background: var(--now); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.plan-box span { color: var(--muted); font-size: 0.9rem; }
.code-input { font-size: 1.8rem !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.plan-status { display: flex; flex-direction: column; gap: 4px; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.plan-status b { font-size: 1.1rem; }
.plan-status.ok { background: var(--ok-bg); color: var(--ok); }
.plan-status.warn { background: var(--warn-bg); color: var(--warn); }
.plan-status.bad { background: var(--bad-bg); color: var(--danger); }
.plan-status span { color: var(--text); }
.pix-card .qr { display: grid; place-items: center; margin: 4px 0 14px; }
.pix-card .qr svg { width: min(260px, 100%); height: auto; border-radius: 8px; background: #fff; }
.pix-card .row input { font-size: 0.8rem; }
.waiting { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: 0.25; } }
.inv-list { list-style: none; margin: 0; padding: 0; }
.inv-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.inv-list li:last-child { border-bottom: 0; }
.inv { font-weight: 600; }
.inv.paga { color: var(--ok); }
.inv.pendente { color: var(--warn); }
.inv.expirada, .inv.cancelada { color: var(--muted); }

/* ---- admin ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
table.adm { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
table.adm th, table.adm td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.adm th { color: var(--muted); font-weight: 600; }
table.adm .sub-row td { border-bottom: 1px solid var(--line); padding-top: 0; color: var(--muted); }
.btn.sm { padding: 6px 10px; font-size: 0.85rem; }
.wrap-code { word-break: break-all; font-size: 0.8rem; }
.who { flex-wrap: wrap; justify-content: flex-end; }
.link-btn { text-decoration: none; }

/* ---- tela da música: topo fixo e palco horizontal ---- */
.song-head {
  position: sticky; top: 0; z-index: 6; background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px); margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgb(0 0 0 / 0.08);
}
.song-head .topbar { padding-bottom: 6px; }
.tools.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 4px;
  max-width: 760px; margin: 0 auto; padding: 0 12px 8px;
}
.tools.compact .tool { padding: 4px 3px; border-radius: 10px; }
.tools.compact .label { font-size: 0.6rem; letter-spacing: 0.02em; }
.tools.compact .stepper { margin-top: 2px; }
.tools.compact .stepper button { width: 26px; height: 28px; font-size: 1rem; border-radius: 7px; }
.tools.compact .stepper b { font-size: 0.82rem; }

.stage { overflow: hidden; margin-bottom: 12px; border-radius: var(--radius); }
.stage-track { display: flex; width: 100%; }
.stage-track.slide { transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1); }
.panel {
  flex: 0 0 50%; min-width: 0; box-sizing: border-box; padding: 10px 10px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  opacity: 0.55; transform: scale(0.97); transition: opacity 0.3s, transform 0.3s; cursor: pointer;
}
.panel + .panel { margin-left: 0; }
.panel.cur { opacity: 1; transform: none; }
.ptop { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.ptag { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pn { font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.pslots { display: flex; flex-wrap: wrap; gap: 0 8px; min-height: 2.3rem; align-items: center; }
.pslot { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; line-height: 1.15; }
.pslot.rep { color: var(--muted); font-weight: 600; }
.pslot.on { color: var(--accent); }
.pchords { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; justify-content: flex-start; }
.pc { text-align: center; border-radius: 10px; padding: 2px 2px 3px; border: 1px solid transparent; }
.pc b { display: block; font-size: 0.8rem; }
.pc.on { border-color: var(--accent); background: var(--surface); }
.pc.on b { color: var(--accent); }
.pvazio { color: var(--muted); padding: 22px 0; text-align: center; font-weight: 600; }
@media (min-width: 700px) { .pslot { font-size: 2rem; } }
/* respiro entre os painéis sem mudar a largura (o deslize anda exatamente 1 painel) */
.panel { border: 4px solid var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.panel.cur { border-color: var(--bg); }
.panel { padding: 8px 6px 6px; }
.pchords { gap: 2px; justify-content: center; }
.pc { padding: 1px 1px 2px; }
/* painéis em pé (retrato), desenhos grandes um embaixo do outro */
.stage-track { align-items: stretch; }
.panel { display: flex; flex-direction: column; min-height: 420px; }
.pchords { flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; flex: 1; }
.pchords.n3 { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.pc { width: 100%; display: flex; flex-direction: column; align-items: center; }
.pchords.n3 .pc { width: auto; }
.pc .diagram { max-width: 100%; height: auto; }
.pc b { font-size: 1rem; margin-top: 2px; }
.pslots { min-height: 2.6rem; }

/* botão de voltar laranja */
.topbar .icon-btn { background: var(--accent); color: #111; font-weight: 800; text-decoration: none; }

/* chave do modo simplificado */
.simple-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px;
}
.simple-toggle span { font-size: 0.85rem; color: var(--muted); }
.simple-toggle b { color: var(--text); margin-right: 4px; }
.simple-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.simple-toggle i { flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--surface-2); position: relative; transition: background 0.2s; }
.simple-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 0.2s, background 0.2s; }
.simple-toggle input:checked + i { background: var(--accent); }
.simple-toggle input:checked + i::after { transform: translateX(20px); background: #111; }
.simple-toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* desenho: casas numeradas e dedo dentro da bolinha */
.dg-casa { fill: var(--muted); font-size: 7.5px; font-weight: 600; }
.dg-casa-base { fill: var(--text); font-weight: 800; }
.dg-dedo { fill: var(--bg); font-size: 7.6px; font-weight: 800; pointer-events: none; }

/* painel ~30% mais curto */
.panel { min-height: 300px; }
.pchords { gap: 2px; }
.pc b { font-size: 0.9rem; margin-top: 0; }

.panel.cur .pslot.on { background: none; padding: 0; text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.panel { min-height: 0; }
.pslots { min-height: 2.4rem; }

/* painel atual: mesma cor do "Depois", sem laranja; texto na cor normal (preto no tema claro) */
.stage-track { align-items: flex-start; }
.panel.fora { max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; }
.panel.cur {
  background: var(--surface); color: var(--text); opacity: 1; transform: none;
  box-shadow: inset 0 0 0 2px var(--text);
}
.panel.cur .ptag, .panel.cur .pn, .panel.cur .pslot, .panel.cur .pc b, .panel.cur .pslot.on, .panel.cur .pc.on b { color: var(--text); }
.panel.cur .pslot.rep { color: var(--text); opacity: 1; }
.panel.cur .pslot.on { text-decoration-color: var(--text); }
.panel.cur .pc.on { background: var(--surface-2); border-color: var(--text); }
.panel.cur .dg-dedo { fill: var(--bg); }

/* barra de reprodução fixa no rodapé */
.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--bg);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgb(0 0 0 / 0.1);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
}
.player-bar .controls { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; }
.player-bar .play { width: 52px; height: 52px; }
.song-wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.song-head .topbar .icon-btn#menu-btn { background: var(--surface-2); color: var(--text); font-size: 1.4rem; line-height: 1; }
.all-chords-btn { width: 100%; margin: 4px 0 10px; }
#all-chords .chord-list { justify-content: center; }
.song-menu { margin-top: 6px; }

/* "Ver todos acordes" na barra fixa de baixo */
.player-bar .ver-acordes {
  flex: none; width: 92px; border: 0; border-radius: 12px; padding: 8px 6px; line-height: 1.15;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 0.8rem; cursor: pointer;
}
.player-bar .ver-acordes[aria-expanded="true"] { background: var(--text); color: var(--bg); }
/* botão grande de começar (tempo 0) */
.big-play {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; margin: 14px 0 6px;
  border: 0; background: none; color: var(--text); font-weight: 800; font-size: 1.05rem; cursor: pointer;
}
.big-play span {
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: #111;
  display: grid; place-items: center; font-size: 2.2rem; padding-left: 6px; box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}
.panel:not(.cur) .big-play { display: none; }
.player-bar .tom-bar { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.player-bar .tom-bar b { color: var(--text); }
/* na tela da música, os avisos aparecem acima do rodapé fixo */
body:has(.player-bar) #toast { bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

/* seletor de instrumento */
.instr-switch { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 8px; }
.instr-switch button { border: 0; background: none; border-radius: 9px; padding: 9px; font-weight: 700; color: var(--muted); cursor: pointer; }
.instr-switch button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }
.tools.compact.tres { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

/* teclado */
.kb-white { fill: #fdfcf9; stroke: #2b2b2b; stroke-width: 1; }
.kb-black { fill: #1b1b1b; }
.kb-white.kb-on { fill: #ffd2a8; }
.kb-black.kb-on { fill: #c4520a; }
.kb-dot { fill: #111; }
.kb-black.kb-on + .kb-dot { fill: #fff; }
.diagram.kb .dg-dedo { fill: #fff; }
.kb-nome { fill: var(--text); font-size: 9px; font-weight: 800; }
.pchords .diagram.kb { margin: 4px 0 2px; }

/* "Depois" com o mesmo destaque do "Agora" (o próximo acorde é o mais importante para quem está começando) */
.panel, .panel.cur { opacity: 1; transform: none; background: var(--surface); box-shadow: inset 0 0 0 2px var(--text); }
.panel .ptag, .panel .pn, .panel .pslot, .panel .pc b { color: var(--text); }
.panel .pslot.rep { color: var(--text); }
.panel .ptag { font-size: 0.75rem; }
.panel:not(.cur) .ptag { background: var(--text); color: var(--bg); border-radius: 6px; padding: 1px 6px; }

/* card de altura fixa (a de 2 acordes) */
.stage .stage-track:not(.medindo) .panel:not(.fora) { height: var(--panel-h, auto); overflow: hidden; }
.pchords.n3 { gap: 2px; }
.stage { position: relative; }
.ptop { justify-content: flex-end; min-height: 1rem; }

/* baixo */
.bass-string { stroke-width: 1.6; }
.bass-raiz { fill: var(--text); }
.bass-raiz-txt { fill: var(--bg); font-size: 6.4px; font-weight: 800; pointer-events: none; }
.bass-nota { fill: var(--surface); stroke: var(--text); stroke-width: 1.4; }
.bass-nota-txt { fill: var(--text); font-size: 6.4px; font-weight: 800; pointer-events: none; }
.instr-switch button { padding: 9px 4px; font-size: 0.92rem; }

/* ajuda pelo WhatsApp */
.ajuda-rodape { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 14px 0; }
.ajuda-link { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.ajuda-link:hover { text-decoration: underline; }

/* painel administrativo */
.adm-wrap { max-width: 1100px; }
.adm-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.adm-tabs button { border: 0; background: none; border-radius: 9px; padding: 9px 12px; font-weight: 700; color: var(--muted); cursor: pointer; flex: 1 1 auto; }
.adm-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }
.adm-busca { width: 100%; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 14px; }
.adm-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.adm-stat b { font-size: 1.4rem; }
.adm-stat span { color: var(--muted); font-size: 0.85rem; }
.est { font-weight: 700; }
.est.ativo { color: var(--ok); }
.est.teste { color: var(--warn); }
.est.vencido, .est.verificar_email { color: var(--danger); }
.online { color: var(--ok); font-size: 0.8rem; }
table.adm a { color: var(--accent); }
/* botão de lixeira (painel) */
.lixeira {
  border: 0; background: none; color: var(--muted); width: 34px; height: 34px; border-radius: 8px;
  display: inline-grid; place-items: center; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.lixeira:hover, .lixeira:focus-visible { background: var(--bad-bg); color: var(--danger); }
