/* ==========================================================================
   Ferramentas de música (ferramentas/*.html) — por cima de ../css/styles.css
   Visual do portal: fundo grafite, cartões com borda e brilho laranja.
   ========================================================================== */

.ferr-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 48px 0 26px; }
.ferr-topo h1 { margin: 10px 0 0; font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.ferr-topo p.ferr-sub { margin: 10px 0 0; max-width: 62ch; color: var(--muted); font-size: 16px; line-height: 1.6; }
.ferr-acoes { display: flex; flex-wrap: wrap; gap: 10px; }

.ferr-layout { display: grid; gap: 22px; }
@media (min-width: 1000px) { .ferr-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }

.ferr-palco, .ferr-info, .ferr-cartao {
  position: relative; border-radius: 22px; border: 1px solid rgba(255, 152, 0, .24);
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 152, 0, .09), transparent 60%), var(--panel);
}
.ferr-palco { padding: clamp(20px, 4vw, 40px); overflow: hidden; min-height: 420px; }
.ferr-info { padding: 22px 22px 18px; }
.ferr-info h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.ferr-info h2 svg { color: var(--orange); width: 20px; height: 20px; }
.ferr-info ol, .ferr-info ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.ferr-info ol { list-style: decimal; } .ferr-info ul { list-style: disc; }
.ferr-info li::marker { color: var(--orange); font-weight: 700; }
.ferr-info li + li { margin-top: 6px; }
.ferr-info strong { color: inherit; }
.ferr-dica { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 152, 0, .35); background: rgba(255, 152, 0, .08); font-size: 13.5px; line-height: 1.55; }
.ferr-dica svg { flex: none; color: var(--orange); width: 18px; height: 18px; margin-top: 2px; }

/* Controles */
.ferr-rotulo { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ferr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ferr-chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font: 700 14px "DM Sans", sans-serif; cursor: pointer; transition: .18s ease; }
.ferr-chip:hover { border-color: var(--orange); color: var(--orange); }
.ferr-chip.ativo { background: var(--orange); border-color: var(--orange); color: #171717; }
.ferr-redondo { width: 52px; height: 52px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-soft); color: inherit; font: 800 22px "DM Sans", sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: .18s ease; }
.ferr-redondo:hover { border-color: var(--orange); color: var(--orange); }
.ferr-play { min-width: 180px; min-height: 58px; border-radius: 16px; border: 0; background: var(--orange); color: #171717; font: 800 18px "DM Sans", sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 14px 30px rgba(255, 152, 0, .25); transition: transform .15s ease; }
.ferr-play:hover { transform: translateY(-2px); }
.ferr-play.tocando { background: #2c2c2c; color: #ff9800; border: 1px solid #ff9800; box-shadow: none; }
.ferr-play svg { width: 22px; height: 22px; }
input[type="range"].ferr-faixa { width: 100%; accent-color: #ff9800; height: 28px; }
.ferr-select { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-soft); color: inherit; font: 600 15px "DM Sans", sans-serif; }

/* Trava: teste grátis → assinatura */
.ferr-trava { position: absolute; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(18, 18, 18, .72); backdrop-filter: blur(6px); }
.ferr-trava.ver { display: flex; }
.ferr-trava-card { max-width: 420px; text-align: center; padding: 28px 26px; border-radius: 20px; background: #161616; border: 1px solid rgba(255, 152, 0, .45); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); color: #f2f2f2; }
.ferr-trava-card img { width: 52px; height: 52px; margin: 0 auto 14px; display: block; }
.ferr-trava-card h3 { margin: 0; font-size: 21px; font-weight: 700; }
.ferr-trava-card p { margin: 10px 0 0; color: #c8c8c8; font-size: 14.5px; line-height: 1.6; }
.ferr-trava-card .ferr-acoes { justify-content: center; margin-top: 18px; }
.ferr-trava-card .outline-button { color: #fff; }

/* Cartão "parte do portal" */
.ferr-portal { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; padding: 18px 20px; border-radius: 18px; background: #161616; border: 1px solid rgba(255, 255, 255, .14); color: #d2d2d2; text-decoration: none; transition: border-color .25s, transform .25s; }
.ferr-portal:hover { border-color: rgba(255, 152, 0, .75); transform: translateY(-2px); }
.ferr-portal img { width: 42px; height: 42px; flex: none; }
.ferr-portal b { color: #fff; }
.ferr-portal span.link { color: #ff9800; font-weight: 700; font-size: 13px; }

/* Hub de ferramentas */
.ferr-grade { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ferr-cartao { display: flex; flex-direction: column; gap: 10px; padding: 22px; color: inherit; text-decoration: none; transition: border-color .25s, transform .25s; }
.ferr-cartao:hover { border-color: var(--orange); transform: translateY(-4px); }
.ferr-cartao .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 152, 0, .12); color: var(--orange); }
.ferr-cartao .ico svg { width: 28px; height: 28px; }
.ferr-cartao strong { font-size: 18px; }
.ferr-cartao span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.ferr-cartao .em-breve { align-self: flex-start; border: 1px solid rgba(255, 152, 0, .4); border-radius: 999px; padding: 2px 10px; color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

html[data-theme="claro"] .ferr-palco, html[data-theme="claro"] .ferr-info, html[data-theme="claro"] .ferr-cartao {
  border-color: rgba(236, 136, 0, .3);
  background: radial-gradient(110% 85% at 100% 0%, rgba(236, 136, 0, .18), rgba(236, 136, 0, .05) 45%, transparent 70%), linear-gradient(160deg, #ffffff 0%, #f4f4f4 50%, #e9e9e9 100%);
}
html[data-theme="claro"] .ferr-play.tocando { background: #fff; }

.centro { justify-content: center; text-align: center; }

/* ---- Metrônomo ---- */
.metro { display: flex; flex-direction: column; gap: 26px; }
.metro-visor { position: relative; display: grid; place-items: center; padding: 18px 0 4px; }
.metro-pulso { position: absolute; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 152, 0, .35), transparent 65%); opacity: 0; }
.metro-pulso.bate { animation: metro-bate .35s ease-out; }
@keyframes metro-bate { from { opacity: 1; transform: scale(.85); } to { opacity: 0; transform: scale(1.15); } }
.metro-num { position: relative; display: flex; align-items: baseline; gap: 8px; }
.metro-num span { font-size: clamp(76px, 14vw, 120px); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.metro-num small { font-size: 18px; font-weight: 700; color: var(--orange); letter-spacing: .14em; }
.metro-nome { position: relative; margin: 6px 0 0; color: var(--muted); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.metro-pontos { display: flex; justify-content: center; gap: 14px; }
.metro-ponto { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); transition: background .08s, transform .08s; }
.metro-ponto.forte { border-color: rgba(255, 152, 0, .6); }
.metro-ponto.ativo { background: var(--orange); border-color: var(--orange); transform: scale(1.25); box-shadow: 0 0 18px rgba(255, 152, 0, .6); }
.metro-linha { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.metro-linha .ferr-faixa { flex: 1; min-width: 160px; }
.metro-tap { min-height: 58px; padding: 0 22px; border-radius: 16px; }
.metro-grade { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (min-width: 700px) { .metro-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.metro-grade .ferr-chip { min-width: 52px; font-size: 16px; }
.metro-acento { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.metro-acento input { width: 18px; height: 18px; accent-color: #ff9800; }

/* ---- Afinador ---- */
.afi { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.afi-mostrador { position: relative; width: min(420px, 100%); aspect-ratio: 320 / 190; color: inherit; }
.afi-escala { width: 100%; height: auto; display: block; }
.afi-ponteiro { position: absolute; left: 50%; bottom: 5.5%; width: 4px; height: 66%; margin-left: -2px; border-radius: 4px; background: var(--orange); transform-origin: 50% 100%; transition: transform .12s ease-out; box-shadow: 0 0 14px rgba(255, 152, 0, .5); }
.afi-ponteiro::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--orange); }
.afi-solfejo { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.afi-mostrador.afinado .afi-ponteiro, .afi-mostrador.afinado .afi-ponteiro::after { background: #3fbf6f; box-shadow: 0 0 18px rgba(63, 191, 111, .6); }
.afi-status { margin: 0; font-weight: 700; font-size: 16px; text-align: center; }
.afi-freq { margin: -10px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.afi-cordas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.afi-corda { min-width: 54px; height: 54px; border-radius: 14px; display: inline-flex; align-items: baseline; justify-content: center; padding-top: 12px; border: 1px solid var(--line); font-weight: 800; font-size: 20px; }
.afi-corda small { font-size: 11px; color: var(--muted); margin-left: 1px; }
.afi-corda.ativa { border-color: var(--orange); background: rgba(255, 152, 0, .14); color: var(--orange); }
.afi-cromatico { color: var(--muted); font-size: 14px; }
.afi-la { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.afi-la .ferr-redondo { width: 38px; height: 38px; font-size: 18px; }
.afi-la b { font-size: 18px; color: inherit; min-width: 36px; text-align: center; }
html[data-theme="claro"] .afi-la b { color: #2c2c2c; }

/* ---- Campo harmônico ---- */
.campo { display: flex; flex-direction: column; gap: 18px; }
.campo-linha { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.campo-titulo { margin: 8px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.campo-escala { display: flex; flex-wrap: wrap; gap: 8px; }
.campo-escala span { min-width: 44px; padding: 8px 10px; text-align: center; border-radius: 10px; background: var(--panel-soft); font-weight: 800; }
.campo-acordes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.campo-acorde { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; border-radius: 14px; border: 1px solid var(--line); border-top: 4px solid var(--cor, var(--orange)); background: var(--panel-soft); color: inherit; text-align: left; cursor: pointer; font-family: inherit; transition: transform .15s, border-color .15s; }
.campo-acorde:hover { transform: translateY(-3px); border-color: var(--cor, var(--orange)); }
.campo-acorde.soando { animation: campo-soa .5s ease; }
@keyframes campo-soa { 30% { box-shadow: 0 0 0 4px var(--cor, var(--orange)); } }
.campo-acorde strong { font-size: 24px; letter-spacing: -.02em; }
.campo-grau { font-size: 13px; font-weight: 800; color: var(--cor, var(--orange)); letter-spacing: .06em; }
.campo-notas { font-size: 13px; color: var(--muted); }
.campo-funcao { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.campo-acorde.f-tônica { --cor: #3fbf6f; }
.campo-acorde.f-subdominante { --cor: #4f9dff; }
.campo-acorde.f-dominante { --cor: #ff9800; }
.campo-relativa { margin: 0; color: var(--muted); }
.campo-relativa b { color: var(--orange); }
.campo-progs { display: grid; gap: 8px; }
.campo-prog { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: inherit; font-family: inherit; cursor: pointer; text-align: left; transition: border-color .15s; }
.campo-prog:hover { border-color: var(--orange); }
.campo-prog span { min-width: 120px; color: var(--muted); font-weight: 700; font-size: 13px; }
.campo-prog b { flex: 1; font-size: 16px; }
.campo-prog svg { width: 20px; height: 20px; color: var(--orange); }

/* ---- Afinador: nota em destaque acima do mostrador ---- */
.afi-leitura { display: flex; flex-direction: column; align-items: center; min-height: 104px; justify-content: flex-end; }
.afi-leitura #afiNota { font-size: clamp(64px, 14vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.afi-leitura sup { font-size: .45em; }
.afi-leitura small { font-size: .32em; color: var(--muted); margin-left: 2px; }
.afi:has(.afi-mostrador.afinado) #afiNota { color: #3fbf6f; }
.afi-mostrador { margin-top: -6px; }
.afi-nivel { width: min(260px, 80%); height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.afi-nivel span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #3fbf6f, #ff9800); transition: width .08s linear; }

/* ---- Botão de voltar: visível e fácil de tocar ---- */
.subpage-header .back-link.ferr-voltar { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 152, 0, .6); background: rgba(255, 152, 0, .1); color: #ff9800; font-weight: 700; white-space: nowrap; }
.subpage-header .back-link.ferr-voltar:hover { background: #ff9800; color: #171717; }

/* ---- Celular: tudo centralizado, alvos de toque grandes, sem apertos ---- */
@media (max-width: 640px) {
  .subpage-header { padding: 14px 0; }
  .subpage-header .portal-content { gap: 10px; padding: 0 16px; }
  .subpage-logo { height: 34px; width: auto; }
  .portal-content { padding: 0 16px; }
  .ferr-topo { margin: 22px 0 18px; gap: 14px; }
  .ferr-topo > div:first-child { width: 100%; }
  .ferr-topo p.ferr-sub { font-size: 15px; }
  .ferr-acoes, .ferr-acoes .om-share-btn { width: 100%; }
  .ferr-palco { padding: 20px 16px 24px; min-height: 0; border-radius: 20px; }
  .ferr-info { padding: 20px 18px; }
  .ferr-chips { justify-content: center; }
  .ferr-rotulo { text-align: center; }
  .metro { gap: 22px; }
  .metro-linha.centro { flex-wrap: nowrap; }
  .metro-linha.centro > * { flex: 1; min-width: 0; }
  .ferr-play { min-width: 0; }
  .metro-tap { padding: 0 12px; }
  .metro-grade { text-align: center; }
  .metro-acento { justify-content: center; }
  .afi-la { flex-wrap: wrap; justify-content: center; }
  .campo-titulo { font-size: 20px; text-align: center; }
  .campo-escala { justify-content: center; }
  .campo-acordes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campo-prog { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
  .campo-prog span { min-width: 0; grid-column: 1; }
  .campo-prog b { grid-column: 1; }
  .campo-prog svg { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .campo-relativa { text-align: center; }
}
.afi .metro-linha.centro { width: 100%; justify-content: center; }
@media (max-width: 640px) { .afi .metro-linha.centro .ferr-play { flex: 0 1 260px; } }

/* ==========================================================================
   Peças comuns das ferramentas novas (som.js): blocos, abas, teclado e braço
   ========================================================================== */
.ferr-coluna { display: flex; flex-direction: column; gap: 22px; }
.ferr-linha { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; }
.ferr-abas { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--panel-soft); border: 1px solid var(--line); align-self: flex-start; }
.ferr-abas button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 700 14px "DM Sans", sans-serif; cursor: pointer; }
.ferr-abas button.ativo { background: var(--orange); color: #171717; }
.ferr-visor { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; border-radius: 18px; background: var(--panel-soft); border: 1px solid var(--line); text-align: center; }
.ferr-visor strong { font-size: clamp(44px, 9vw, 72px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--orange); }
.ferr-visor small { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ferr-visor .notas { color: var(--muted); font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.ferr-bpm { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 240px; }
.ferr-bpm .ferr-faixa { flex: 1; }
.ferr-bpm b { min-width: 74px; font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.ferr-bpm b small { font-size: 11px; color: var(--orange); letter-spacing: .1em; margin-left: 3px; }
.ferr-bpm .ferr-redondo { width: 42px; height: 42px; font-size: 20px; flex: none; }
.ferr-rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.ferr-nota-baixa { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.ferr-chips.miudo .ferr-chip { min-height: 36px; padding: 0 12px; font-size: 13px; }
.ferr-chips.tons .ferr-chip { min-width: 48px; padding: 0 10px; }
.ferr-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ferr-check input { width: 18px; height: 18px; accent-color: #ff9800; }

/* Teclado de piano */
.piano { position: relative; height: 170px; min-width: 520px; user-select: none; touch-action: manipulation; }
.piano .tecla { position: absolute; top: 0; border: 0; padding: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; font: 800 12px "DM Sans", sans-serif; transition: background .1s; }
.piano .branca { height: 100%; background: linear-gradient(#f4f4f4, #ffffff); border: 1px solid #bdbdbd; border-radius: 0 0 8px 8px; color: #171717; z-index: 1; padding-bottom: 10px; }
.piano .preta { height: 60%; background: linear-gradient(#3a3a3a, #111); border-radius: 0 0 6px 6px; color: #fff; z-index: 2; padding-bottom: 8px; box-shadow: 0 3px 6px rgba(0, 0, 0, .4); }
.piano .tecla span { pointer-events: none; }
.piano .branca.marcada { background: linear-gradient(#ffd08a, #ffb84d); }
.piano .preta.marcada { background: linear-gradient(#ffb347, #e07b00); color: #171717; }
.piano .tecla.raiz { background: linear-gradient(#ff9800, #ec8800) !important; color: #171717; }
.piano .tecla.fora { opacity: .55; }
.piano .tecla.apertada, .piano .tecla.soando { background: #3fbf6f !important; color: #fff; }

/* Braço de violão / baixo */
.braco { --casas: 12; display: flex; flex-direction: column; gap: 0; min-width: 620px; padding: 6px 0; user-select: none; }
.braco-numeros, .braco-corda { display: grid; grid-template-columns: 46px repeat(var(--casas), minmax(0, 1fr)); }
.braco-numeros span { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding-bottom: 4px; }
.braco-corda { position: relative; }
.braco-corda::before { content: ""; position: absolute; left: 46px; right: 0; top: 50%; height: var(--esp, 1px); background: linear-gradient(90deg, #c9c9c9, #8d8d8d); transform: translateY(-50%); pointer-events: none; }
.braco-casa { position: relative; height: 38px; border: 0; border-right: 3px solid rgba(190, 190, 190, .5); background: rgba(120, 72, 32, .22); cursor: pointer; display: grid; place-items: center; padding: 0; }
.braco-casa.solta { background: transparent; border-right: 6px solid #d9d9d9; }
.braco-corda:first-of-type .braco-casa.marca::after, .braco-casa.dupla::after { content: none; }
.braco-casa > span { position: relative; z-index: 1; min-width: 28px; height: 28px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; font: 800 12px "DM Sans", sans-serif; color: #171717; }
.braco-casa.marcada > span { background: #ffd08a; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.braco-casa.raiz > span { background: #ff9800; }
.braco-casa.destaque > span { background: #fff; outline: 3px solid #ff9800; }
.braco-casa.fora > span { opacity: .45; }
.braco-casa.abafada > span { background: transparent; color: #ff6b6b; font-size: 15px; box-shadow: none; }
.braco-casa.soando > span { background: #3fbf6f !important; color: #fff; transform: scale(1.15); }
.braco-casa:hover > span:empty { background: rgba(255, 152, 0, .25); }
/* pontinhos de marcação do braço (3, 5, 7, 9 e 12) — na faixa do meio */
.braco-corda:nth-of-type(4) .braco-casa.marca, .braco-corda:nth-of-type(4) .braco-casa.dupla { background-image: radial-gradient(circle at 50% 100%, rgba(255, 255, 255, .35) 5px, transparent 6px); }
html[data-theme="claro"] .braco-casa { background: rgba(160, 105, 50, .16); }

/* ---- Bateria ---- */
#batGrade { display: flex; flex-direction: column; gap: 22px; }
.bat-grade { display: grid; grid-template-columns: 112px repeat(var(--passos, 16), minmax(26px, 1fr)); gap: 5px; }
.bat-cab { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding-bottom: 2px; }
.bat-cab.tempo { color: var(--orange); }
.bat-peca { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: inherit; font: 700 13px "DM Sans", sans-serif; cursor: pointer; text-align: left; padding: 0; }
.bat-peca:hover { color: var(--orange); }
.bat-passo { height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-soft); cursor: pointer; padding: 0; transition: background .1s, transform .1s; }
.bat-passo.inicio { border-color: rgba(255, 152, 0, .35); }
.bat-passo.on { background: var(--orange); border-color: var(--orange); }
.bat-passo.forte { background: #ff5a1f; border-color: #ff5a1f; }
.bat-passo.agora { outline: 2px solid #3fbf6f; outline-offset: 1px; }
.bat-passo.on.agora { transform: scale(1.08); }

/* ---- Gerador de ritmos ---- */
.rit-palco { display: grid; gap: 18px; }
@media (min-width: 760px) { .rit-palco { grid-template-columns: 1.1fr 1fr; align-items: stretch; } }
.rit-acordes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.rit-acordes span { min-width: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); text-align: center; font-weight: 800; font-size: 18px; }
.rit-acordes span small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.rit-acordes span.agora { background: var(--orange); border-color: var(--orange); color: #171717; }
.rit-acordes span.agora small { color: #171717; }
.rit-pontos { display: flex; gap: 10px; justify-content: center; }

/* ---- Escalas ---- */
.esc-notas { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.esc-nota { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-soft); cursor: pointer; color: inherit; font-family: inherit; transition: transform .12s, border-color .12s; }
.esc-nota:hover { border-color: var(--orange); }
.esc-nota strong { font-size: 24px; }
.esc-nota span { font-size: 12px; color: var(--muted); font-weight: 700; }
.esc-nota em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--orange); letter-spacing: .05em; }
.esc-nota.agora { background: var(--orange); border-color: var(--orange); color: #171717; transform: translateY(-3px); }
.esc-nota.agora span, .esc-nota.agora em { color: #171717; }
.esc-formula { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.esc-formula span { padding: 4px 10px; border-radius: 8px; background: rgba(255, 152, 0, .12); color: var(--orange); font-weight: 800; font-size: 13px; }

/* ---- Violão ---- */
.vio-dic { display: grid; gap: 22px; }
@media (min-width: 760px) { .vio-dic { grid-template-columns: 260px 1fr; align-items: start; } }
.vio-diagrama { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border-radius: 18px; background: var(--panel-soft); border: 1px solid var(--line); }
.vio-diagrama svg { width: 210px; height: auto; color: inherit; }
.vio-diagrama h3 { margin: 0; font-size: 34px; font-weight: 800; color: var(--orange); letter-spacing: -.02em; }
.vio-posicoes { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); font-size: 14px; }
.vio-posicoes .ferr-redondo { width: 38px; height: 38px; font-size: 18px; }

/* ---- Harmonia vocal ---- */
.voz-tabela { display: grid; gap: 6px; grid-template-columns: 120px repeat(var(--cols, 4), minmax(64px, 1fr)); min-width: 460px; }
.voz-tabela > * { padding: 10px 6px; border-radius: 10px; text-align: center; font-weight: 800; }
.voz-tabela .cab { font-size: 18px; color: var(--orange); background: transparent; }
.voz-tabela .cab small { display: block; font-size: 11px; color: var(--muted); }
.voz-tabela .rot { text-align: left; display: flex; align-items: center; gap: 8px; font-size: 14px; background: transparent; border: 0; color: inherit; cursor: pointer; font-family: inherit; }
.voz-tabela .rot i { width: 12px; height: 12px; border-radius: 50%; background: var(--cor); flex: none; }
.voz-tabela .rot.solo { color: var(--orange); }
.voz-tabela .cel { background: var(--panel-soft); border: 1px solid var(--line); border-left: 4px solid var(--cor); font-size: 17px; }
.voz-tabela .cel small { font-size: 11px; color: var(--muted); margin-left: 2px; }
.voz-tabela .cel.agora { background: var(--cor); color: #171717; }
.voz-tabela .cel.agora small { color: #171717; }
.voz-trilha { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.voz-trilha span { min-width: 46px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); text-align: center; font-weight: 800; }
.voz-trilha span.agora { background: var(--orange); color: #171717; border-color: var(--orange); }
.voz-vogal { font-size: clamp(36px, 7vw, 54px); font-weight: 800; color: var(--orange); letter-spacing: .04em; min-height: 1.1em; }

@media (max-width: 640px) {
  .ferr-linha { justify-content: center; }
  .ferr-abas { align-self: center; }
  .ferr-bpm { min-width: 0; flex: 1 1 100%; }
  .bat-grade { grid-template-columns: 74px repeat(var(--passos, 8), minmax(0, 1fr)); gap: 4px; }
  .bat-peca { font-size: 12px; }
  .bat-passo { height: 34px; border-radius: 8px; }
  .vio-diagrama svg { width: 190px; }
  .esc-notas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .voz-tabela { grid-template-columns: 92px repeat(var(--cols, 4), minmax(58px, 1fr)); min-width: 0; }
}

/* ---- Tom da música (diapasão vocal) ---- */
.voz-topo { display: grid; gap: 14px; align-items: center; }
@media (min-width: 640px) { .voz-topo { grid-template-columns: 1fr auto; } }
.voz-atual { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.voz-atual b { font-size: clamp(40px, 8vw, 58px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.voz-atual small { color: var(--muted); font-size: 14px; font-weight: 600; }
.voz-nivel { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.voz-nivel span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #3fbf6f, #ff9800); transition: width .08s linear; }
.graf-voz { width: 100%; height: 260px; display: block; border-radius: 16px; background: var(--panel-soft); border: 1px solid var(--line); }
.tom-sugestoes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tom-sugestoes button { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-soft); color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.tom-sugestoes button b { font-size: 28px; }
.tom-sugestoes button small { color: var(--muted); font-size: 12px; font-weight: 700; }
.tom-sugestoes button.ativo { border-color: var(--orange); background: rgba(255, 152, 0, .12); }
.tom-sugestoes button.ativo b { color: var(--orange); }
.tom-grande { display: flex; align-items: center; justify-content: center; gap: 22px; }
.tom-grande > div { display: flex; flex-direction: column; align-items: center; min-width: 170px; }
.tom-grande b { font-size: clamp(64px, 13vw, 96px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--orange); }
.tom-grande small { color: var(--muted); font-weight: 700; font-size: 14px; }
.tom-escala { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tom-escala span { min-width: 44px; padding: 8px 10px; text-align: center; border-radius: 10px; background: var(--panel-soft); font-weight: 800; }
.tom-escala span.raiz { background: var(--orange); color: #171717; }
.tom-ref { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; }
.tom-ref b { color: inherit; }
.tom-onda { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.tom-onda i { width: 4px; height: 6px; border-radius: 2px; background: var(--orange); }
.tom-onda.tocando i { animation: tom-onda .9s ease-in-out infinite; }
.tom-onda.tocando i:nth-child(2) { animation-delay: .15s; } .tom-onda.tocando i:nth-child(3) { animation-delay: .3s; }
@keyframes tom-onda { 50% { height: 18px; } }
.tom-barra { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tom-barra span { display: block; height: 100%; width: 0; background: var(--orange); }
.ferr-campo { display: flex; flex-direction: column; gap: 6px; }
.ferr-campo input { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-soft); color: inherit; font: 600 15px "DM Sans", sans-serif; }
.voz-topo .ferr-play { padding: 0 24px; white-space: nowrap; }
@media (max-width: 640px) {
  .voz-topo { justify-items: center; text-align: center; }
  .voz-atual { justify-content: center; }
  .voz-topo .metro-linha { width: 100%; flex-wrap: nowrap; }
  .voz-topo .ferr-play { flex: 1; min-width: 0; padding: 0 14px; font-size: 16px; }
  .graf-voz { height: 220px; }
  .tom-grande { gap: 12px; }
  .tom-grande > div { min-width: 130px; }
}
.voz-mic { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 700; }
.voz-mic select { max-width: min(320px, 70vw); min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-soft); color: inherit; font: 600 13px "DM Sans", sans-serif; }
#vozDiag { display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1.5; }

/* Apresentação de cada ferramenta no portal (a ferramenta mora no app Ferramentas Musicais). */
.ferr-vitrine { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.ferr-vitrine .detail-visual { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; }
.ferr-aviso-app { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 22px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255, 152, 0, .28); background: rgba(255, 152, 0, .07); color: var(--muted); font-size: 14px; line-height: 1.55; }
.ferr-vitrine .ferr-aviso-app { margin: 0; }
.ferr-aviso-app svg { flex: none; margin-top: 2px; color: var(--orange); }
.ferr-aviso-app b { color: inherit; filter: brightness(1.25); }
.ferr-abrir { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--orange); color: #161616; font-weight: 700; text-decoration: none; }
.ferr-abrir:hover { filter: brightness(1.08); }
