/* Fase 2: lista de partituras e visor. Cores e fonte vêm de casca.css. */

/* ---------- Lista ---------- */
.pt-sub { margin: 0; color: var(--tinta-suave); font-size: 16px; }
.pt-enviar { display: flex; justify-content: center; margin: 0 0 8px; cursor: pointer; }
.pt-arquivo { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pt-arquivo:focus-visible + .pt-aviso { outline: 3px solid var(--destaque); }
.pt-aviso { margin: 0; min-height: 1.5em; font-weight: 800; color: var(--destaque-degrau); }
.pt-ajuda { margin: 0 0 20px; color: var(--tinta-suave); font-size: 15px; }
.pt-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pt-item { display: flex; align-items: stretch; gap: 8px; }
.pt-item__abrir { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--linha); border-bottom-width: 5px; border-radius: var(--raio); text-decoration: none; color: var(--tinta); font-weight: 800; }
.pt-item__abrir:active { border-bottom-width: 2px; transform: translateY(3px); }
.pt-item__icone { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #eaf7ec; display: grid; place-items: center; font-size: 22px; }
.pt-item__nome { min-width: 0; overflow-wrap: anywhere; }
.pt-item__nome small { display: block; font-weight: 700; color: var(--tinta-suave); font-size: 14px; }
.pt-item__apagar { flex: none; border: 2px solid var(--linha); border-radius: var(--raio); background: var(--fundo); color: var(--tinta-suave); font: inherit; font-weight: 800; font-size: 14px; padding: 0 12px; cursor: pointer; }
.pt-item__apagar[data-certeza] { color: #b42318; border-color: #b42318; }

/* ---------- Visor ---------- */
body.tela-tocar { padding: 0; }
.tela-tocar .topo, .tela-tocar .nav { display: none; }
.tela-tocar main { padding: 0; max-width: 900px; margin: 0 auto; }
.visor { height: 100dvh; display: flex; flex-direction: column; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
.visor__topo { display: flex; align-items: center; gap: 4px; flex: none; }
.visor__titulo { margin: 0; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: none; }
.visor__folha-caixa { flex: 1; min-height: 120px; overflow: auto; border: 2px solid var(--linha); border-radius: var(--raio); background: #fff; }
.visor__erro { margin: 0; padding: 16px; font-weight: 800; color: #b42318; }
.visor__legenda { margin: 0; flex: none; text-align: center; font-weight: 800; font-size: 17px; min-height: 1.5em; }
.visor__teclado-caixa { flex: none; overflow-x: auto; }
.visor__controles { flex: none; display: grid; gap: 8px; }
.visor__linha { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }

.pt-teclado { position: relative; height: 84px; width: 100%; }
.pt-tecla { position: absolute; top: 0; }
.pt-tecla--branca { height: 80px; background: #fff; border: 1.5px solid #b9c0c9; border-radius: 0 0 5px 5px; }
.pt-tecla--preta { height: 50px; background: #2b2f38; border-radius: 0 0 4px 4px; z-index: 1; }
.pt-tecla--central::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--tinta-suave); }
.pt-tecla--d { background: var(--principal); border-color: var(--principal-degrau); }
.pt-tecla--e { background: var(--destaque); border-color: var(--destaque-degrau); }

.pt-botao { width: 56px; min-height: 48px; border: 2px solid var(--linha); border-bottom-width: 4px; border-radius: var(--raio); background: var(--fundo); color: var(--tinta); font: inherit; font-size: 20px; font-weight: 800; cursor: pointer; }
.pt-botao:active { border-bottom-width: 1px; transform: translateY(3px); }
.pt-tocar { flex: 1; max-width: 240px; justify-content: center; margin-top: 0; }
.pt-opcao { min-height: 44px; padding: 8px 14px; border: 2px solid var(--linha); border-bottom-width: 4px; border-radius: 12px; background: var(--fundo); color: var(--tinta-suave); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.pt-opcao[aria-checked="true"], .pt-opcao[aria-pressed="true"] { border-color: var(--principal); background: #eaf7ec; color: var(--tinta); }
.pt-maos .pt-opcao { flex: 1; }
.pt-rotulo { font-weight: 800; font-size: 15px; color: var(--tinta-suave); }
#andamento { flex: 1; min-width: 100px; accent-color: var(--principal); height: 32px; }
.pt-bpm { font-weight: 800; min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.pt-mais summary { text-align: center; font-weight: 800; color: var(--tinta-suave); padding: 6px; cursor: pointer; }
.pt-mais[open] { display: grid; gap: 8px; }
.pt-trecho { margin: 0; text-align: center; color: var(--tinta-suave); font-size: 14px; }
