/* Visual do LLMusic. Escuro por padrão (bom para praticar em ambiente com pouca luz),
   com versão clara se o celular estiver no modo claro.
   Todas as cores ficam em variáveis (--nome): para mudar o tema, mude só aqui. */
:root {
  --fundo: #1B1512;
  --superficie: #261E19;
  --superficie-2: #302621;
  --texto: #F3EBDD;
  --suave: #B9AC9A;
  --linha: #43362D;
  --destaque: #E0A64A;
  --sobre-destaque: #1B1512;
  --ok: #6FCB8F;
  --ruim: #E8806F;
  --quase: #E6C84A;
  --fonte: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --fundo: #F6F0E4;
    --superficie: #FFFFFF;
    --superficie-2: #EFE6D6;
    --texto: #231B15;
    --suave: #6B5C4C;
    --linha: #D9CCB6;
    --destaque: #8C5B10;
    --sobre-destaque: #FFFFFF;
    --ok: #1D7448;
    --ruim: #B3392B;
    --quase: #B38A00;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  /* respeita o recorte da câmera e as bordas do celular na horizontal */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--destaque); outline-offset: 2px; }

.tela { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* ---------- Início ---------- */
.marca { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.marca img { border-radius: 14px; }
.titulo { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.sub { color: var(--suave); }
.hoje { color: var(--suave); margin-bottom: 16px; }
.grade { display: grid; gap: 12px; grid-template-columns: 1fr; }
.cartao {
  text-align: left; background: var(--superficie); border: 1px solid var(--linha);
  border-radius: 16px; padding: 16px; min-height: 88px;
  display: flex; flex-direction: column; gap: 4px;
}
button.cartao:active { background: var(--superficie-2); }
.cartao-nome { font-size: 18px; font-weight: 700; }
.cartao-desc { color: var(--suave); font-size: 14px; }
.cartao.em-breve { opacity: 0.6; }
.selo { align-self: flex-start; margin-top: 4px; font-size: 12px; color: var(--destaque); border: 1px solid var(--linha); border-radius: 999px; padding: 2px 10px; }

/* ---------- Metrônomo ---------- */
.metronomo { display: grid; gap: 16px; grid-template-columns: 1fr; }
.topo { display: flex; align-items: center; gap: 8px; }
.titulo-tela { font-size: 22px; font-weight: 700; }
.botao-texto { background: none; border: 0; color: var(--destaque); font-weight: 600; min-height: 48px; padding: 0 12px 0 0; }
.coluna { display: flex; flex-direction: column; gap: 14px; }
.andamento { color: var(--destaque); font-weight: 600; font-style: italic; text-align: center; min-height: 1.45em; }
.bpm-num { font-family: var(--mono); font-size: 96px; font-weight: 500; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.rotulo { text-align: center; color: var(--suave); font-size: 14px; margin-top: -8px; }
.linha-botoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.botao-passo {
  background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px;
  min-height: 56px; font-family: var(--mono); font-size: 20px; font-weight: 500;
}
.botao-passo:active { background: var(--superficie-2); }
input[type=range] { width: 100%; height: 44px; accent-color: var(--destaque); background: transparent; }

.batidas { display: flex; gap: 10px; justify-content: center; align-items: center; min-height: 56px; }
.batida { width: 28px; height: 28px; border-radius: 50%; background: var(--superficie-2); border: 2px solid var(--linha); transition: background 0.06s, transform 0.06s; }
.batida.forte { width: 36px; height: 36px; }
.batida.media { width: 32px; height: 32px; }
.batida.ativa { background: var(--destaque); border-color: var(--destaque); transform: scale(1.18); }

.grupo { display: flex; flex-direction: column; gap: 8px; }
.rotulo-grupo { font-size: 14px; font-weight: 600; color: var(--suave); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px;
  min-height: 48px; padding: 0 16px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--destaque); border-color: var(--destaque); color: var(--sobre-destaque); font-weight: 700; }
.chip.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }

.acoes { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 4px; }
.botao-sec { background: var(--superficie); border: 1px solid var(--linha); border-radius: 14px; min-height: 64px; font-weight: 600; }
.botao-principal { background: var(--destaque); color: var(--sobre-destaque); border: 0; border-radius: 14px; min-height: 64px; font-size: 20px; font-weight: 800; }
.botao-principal.ligado { background: var(--superficie-2); color: var(--texto); border: 2px solid var(--destaque); }
.dica { color: var(--suave); font-size: 13px; }

/* ---------- Paisagem primeiro: celular deitado ---------- */
@media (orientation: landscape) {
  .tela { padding: 10px 20px; }
  .grade { grid-template-columns: repeat(3, 1fr); }
  .metronomo { grid-template-columns: 1fr 1fr; column-gap: 28px; row-gap: 6px; align-items: start; }
  .metronomo .topo { grid-column: 1 / -1; }
  .metronomo .dica { grid-column: 1 / -1; }
  .bpm-num { font-size: 84px; }
  .batidas { min-height: 44px; }
  .botao-passo { min-height: 48px; }
  .botao-sec, .botao-principal { min-height: 56px; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .marca img { width: 44px; height: 44px; }
  .titulo { font-size: 24px; }
  .hoje { margin-bottom: 8px; }
  .cartao { min-height: 76px; padding: 12px 14px; }
  /* No celular deitado, tudo do metrônomo cabe na tela sem rolar */
  .metronomo { row-gap: 0; }
  .metronomo .topo { min-height: 40px; }
  .botao-texto { min-height: 40px; }
  .titulo-tela { font-size: 20px; }
  .coluna { gap: 8px; }
  .bpm-num { font-size: 68px; }
  .rotulo { margin-top: -4px; }
  .botao-passo { min-height: 44px; }
  input[type=range] { height: 36px; }
  .batidas { min-height: 36px; }
  .chip { min-height: 44px; }
  .grupo { gap: 4px; }
  .acoes { margin-top: 0; }
  .botao-sec, .botao-principal { min-height: 52px; }
  .metronomo .dica { display: none; }
}

/* ---------- Afinador ---------- */
.afinador { display: grid; gap: 16px; grid-template-columns: 1fr; }
.nota-grande { font-size: 110px; font-weight: 800; line-height: 1; text-align: center; min-height: 1em; color: var(--suave); }
.nota-grande.certo { color: var(--ok); }
.nota-grande.perto { color: var(--destaque); }
.nota-grande.longe { color: var(--ruim); }
.nota-detalhe { margin-top: 0; min-height: 1.45em; font-family: var(--mono); }
.medidor { position: relative; height: 44px; background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; }
.medidor-centro { position: absolute; left: calc(50% - 5%); width: 10%; top: 0; bottom: 0; background: color-mix(in srgb, var(--ok) 25%, transparent); border-left: 2px solid var(--ok); border-right: 2px solid var(--ok); }
.ponteiro { position: absolute; top: 4px; bottom: 4px; width: 8px; margin-left: -4px; border-radius: 4px; background: var(--suave); transition: left 0.08s linear; }
.ponteiro.certo { background: var(--ok); }
.ponteiro.perto { background: var(--destaque); }
.ponteiro.longe { background: var(--ruim); }
.escala { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--suave); margin-top: -8px; }
.dica-afinar { min-height: 1.45em; }
.cordas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.corda { background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; min-height: 64px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.corda-num { font-size: 11px; color: var(--suave); }
.corda-nome { font-size: 18px; font-weight: 700; }
.corda-oit { font-size: 11px; color: var(--suave); }
.corda.escolhida { border-color: var(--destaque); }
.corda.detectada { background: var(--destaque); border-color: var(--destaque); color: var(--sobre-destaque); }
.corda.detectada .corda-num, .corda.detectada .corda-oit { color: var(--sobre-destaque); }
.linha-a4 { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: center; }
.valor-a4 { text-align: center; font-family: var(--mono); font-size: 20px; }
[hidden] { display: none !important; }
@media (orientation: landscape) {
  .afinador { grid-template-columns: 1fr 1fr; column-gap: 28px; row-gap: 6px; align-items: start; }
  .afinador .topo { grid-column: 1 / -1; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .afinador { row-gap: 0; }
  .afinador .topo { min-height: 40px; }
  .nota-grande { font-size: 76px; }
  .medidor { height: 36px; }
  .afinador .coluna { gap: 6px; }
  .corda { min-height: 50px; }
  .afinador .grupo { gap: 2px; }
  .afinador .coluna { gap: 4px; }
  .chip.sm { min-height: 36px; }
  .afinador .botao-passo { min-height: 40px; }
  .afinador .botao-principal { min-height: 44px; font-size: 18px; }
  .aviso-mic { display: none; }
  .afinador .rotulo-grupo { font-size: 12px; line-height: 1.2; }
  .afinador .chips { gap: 6px; }
  .afinador .chip { min-height: 38px; }
  .afinador .topo { min-height: 34px; }
}

/* ---------- Braço virtual ---------- */
.braco { display: grid; gap: 10px; grid-template-columns: 1fr; }
.pergunta { font-size: 26px; font-weight: 800; text-align: center; min-height: 1.3em; }
.braco-svg { width: 100%; height: auto; display: block; touch-action: manipulation; }
.madeira { fill: var(--superficie); stroke: var(--linha); stroke-width: 2; }
.traste { stroke: var(--linha); stroke-width: 2; }
.pestana { stroke: var(--suave); stroke-width: 6; }
.corda-svg { stroke: var(--suave); }
.marca-casa { fill: var(--linha); }
.num-casa, .num-corda { fill: var(--suave); font-size: 15px; font-family: var(--mono); }
.toque { fill: transparent; cursor: pointer; }
.celula.fora { opacity: 0.25; pointer-events: none; }
.ponto { fill: transparent; stroke: none; }
.ponto.alvo { fill: var(--destaque); }
.ponto.certo { fill: var(--ok); }
.ponto.errado { fill: var(--ruim); }
.ponto.quase { fill: var(--quase); }
.ponto-txt { font-size: 10px; font-weight: 700; fill: var(--fundo); pointer-events: none; }
.feedback { text-align: center; min-height: 1.45em; font-weight: 600; color: var(--suave); }
.feedback.certo { color: var(--ok); } .feedback.errado { color: var(--ruim); } .feedback.quase { color: var(--quase); }
.placar { text-align: center; color: var(--suave); font-family: var(--mono); font-size: 14px; }
.braco-opcoes { display: grid; gap: 10px; }
.braco-opcoes .chip.sm { min-width: 40px; }
@media (orientation: landscape) {
  .braco-opcoes { grid-template-columns: auto auto auto 1fr; align-items: end; column-gap: 20px; }
  .braco-opcoes .acoes { grid-template-columns: 1fr 1fr; margin: 0; }
  .braco-opcoes .botao-sec { min-height: 44px; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .braco { gap: 2px; }
  .braco .topo { min-height: 34px; }
  .braco .botao-texto { min-height: 34px; }
  .braco .coluna { gap: 0; }
  .pergunta { font-size: 20px; }
  .placar { display: none; }
  .braco-svg { max-height: 190px; }
  .braco-opcoes .rotulo-grupo { font-size: 11px; }
  .braco-opcoes .chip { min-height: 36px; padding: 0 10px; }
  .braco-opcoes .chip.sm { min-width: 34px; padding: 0 8px; }
  .braco-opcoes .chips { gap: 4px; flex-wrap: nowrap; }
}

/* ---------- Leitura ---------- */
.leitura { display: grid; gap: 10px; grid-template-columns: 1fr; }
.pergunta-leitura { font-size: 22px; }
.pauta-svg { width: 100%; height: auto; max-height: 300px; display: block; }
.linha-pauta { stroke: var(--suave); stroke-width: 2; }
.clave { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 90px; fill: var(--suave); }
.clave-sub { font-size: 13px; fill: var(--suave); }
.cabeca { fill: var(--texto); }
.haste { stroke: var(--texto); stroke-width: 3; }
.nota-g.ok .cabeca { fill: var(--ok); } .nota-g.ok .haste { stroke: var(--ok); }
.nota-g.erro .cabeca { fill: var(--ruim); } .nota-g.erro .haste { stroke: var(--ruim); }
.nota-g.atual .cabeca { fill: var(--destaque); stroke: var(--destaque); stroke-width: 6; }
.nota-g.atual .haste { stroke: var(--destaque); }
.nome-nota { font-size: 22px; font-weight: 700; fill: var(--suave); }
.notas-botoes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.acidente { font-size: 34px; font-weight: 700; fill: var(--texto); font-family: Georgia, serif; }
.nota-g.ok .acidente { fill: var(--ok); } .nota-g.erro .acidente { fill: var(--ruim); } .nota-g.atual .acidente { fill: var(--destaque); }
.nota-btn.acid { display: none; font-size: 22px; }
.notas-botoes.com-acid { grid-template-columns: repeat(7, 1fr) 0.8fr 0.8fr; }
.notas-botoes.com-acid .acid { display: block; }
.nota-btn.acid[aria-pressed="true"] { background: var(--destaque); color: var(--sobre-destaque); border-color: var(--destaque); }
.nota-btn { min-height: 60px; font-family: var(--fonte); font-size: 18px; font-weight: 700; }
.leitura-opcoes { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: end; }
.painel-fim { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.estrelas { font-size: 48px; color: var(--destaque); line-height: 1; letter-spacing: 6px; }
.fim-msg { color: var(--suave); }
.fim-botoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fim-botoes .botao-sec { padding: 0 20px; min-height: 52px; }
.painel-fim .botao-principal { padding: 0 32px; }
@media (orientation: landscape) and (max-height: 460px) {
  .leitura { gap: 2px; }
  .leitura .topo, .leitura .botao-texto { min-height: 34px; }
  .leitura .coluna { gap: 0; }
  .pergunta-leitura { font-size: 17px; }
  .pauta-svg { max-height: 150px; }
  .nota-btn { min-height: 44px; }
  .leitura-opcoes .rotulo-grupo { font-size: 11px; }
  .leitura-opcoes .chip { min-height: 36px; }
  .leitura-opcoes .botao-sec { min-height: 36px; }
  .estrelas { font-size: 34px; }
  .painel-fim { gap: 2px; }
  .painel-fim .botao-principal { min-height: 44px; font-size: 16px; }
}

/* ---------- Partituras ---------- */
.partituras { display: grid; gap: 8px; grid-template-columns: 1fr; }
.peca-titulo { font-size: 20px; font-weight: 700; }
.cab-peca { display: flex; flex-direction: column; gap: 2px; }
.tab-rolagem { overflow-y: auto; max-height: 52vh; border: 1px solid var(--linha); border-radius: 12px; background: var(--superficie); padding: 4px; }
.tab-svg { width: 100%; height: auto; display: block; }
.linha-tab { stroke: var(--suave); stroke-width: 1.5; }
.barra-tab { stroke: var(--suave); stroke-width: 2.5; }
.rot-tab { font-size: 18px; font-weight: 800; fill: var(--suave); font-family: var(--fonte); }
.fundo-num { fill: var(--superficie); }
.num-tab { font-size: 17px; font-weight: 700; fill: var(--texto); font-family: var(--mono); }
.haste-tab, .viga { stroke: var(--suave); stroke-width: 2; }
.haste-tab-o { fill: none; stroke: var(--suave); stroke-width: 2; }
.num-compasso { font-size: 12px; fill: var(--suave); font-family: var(--mono); }
.acorde { font-size: 20px; font-weight: 800; fill: var(--destaque); }
.dedo { font-size: 14px; fill: var(--suave); font-style: italic; font-family: var(--fonte); }
.area-compasso { fill: transparent; cursor: pointer; }
.area-compasso.repetir { fill: color-mix(in srgb, var(--destaque) 14%, transparent); stroke: var(--destaque); stroke-width: 2; stroke-dasharray: 6 4; }
.cursor-tab { fill: color-mix(in srgb, var(--destaque) 35%, transparent); stroke: var(--destaque); stroke-width: 2; pointer-events: none; }
.barra-player { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: end; }
.barra-player .botao-principal { min-height: 52px; padding: 0 24px; font-size: 18px; }
.status-player { min-height: 1.3em; }
@media (orientation: landscape) and (max-height: 460px) {
  .partituras { gap: 2px; }
  .partituras .topo, .partituras .botao-texto { min-height: 34px; }
  .peca-titulo { font-size: 15px; }
  .cab-peca .dica { display: none; }
  .tab-rolagem { max-height: 168px; }
  .partituras .rotulo-grupo { font-size: 11px; }
  .partituras .chip { min-height: 36px; }
  .partituras .chips { gap: 4px; }
  .barra-player .botao-principal { min-height: 44px; font-size: 16px; padding: 0 16px; }
}

/* ---------- Hábitos e Pacotes ---------- */
.habitos { display: grid; gap: 14px; grid-template-columns: 1fr; }
.sequencia { text-align: center; }
.seq-num { font-family: var(--mono); font-size: 72px; font-weight: 600; line-height: 1; color: var(--destaque); }
.barra-meta { height: 14px; background: var(--superficie-2); border-radius: 999px; overflow: hidden; }
.barra-meta-fill { display: block; height: 100%; width: 0; background: var(--ok); transition: width 0.3s; }
.texto-hoje { text-align: center; }
.stats { color: var(--suave); font-size: 14px; text-align: center; }
.nav-mes { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 8px; }
.titulo-mes { text-align: center; font-size: 18px; font-weight: 700; }
.calendario { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-sem { text-align: center; color: var(--suave); font-size: 12px; }
.cal-dia { text-align: center; padding: 8px 0; border-radius: 10px; background: var(--superficie); border: 1px solid var(--linha); font-family: var(--mono); font-size: 14px; }
.cal-dia.nivel1 { background: color-mix(in srgb, var(--ok) 25%, var(--superficie)); }
.cal-dia.nivel2 { background: color-mix(in srgb, var(--ok) 50%, var(--superficie)); }
.cal-dia.nivel3 { background: var(--ok); color: var(--fundo); font-weight: 700; }
.cal-dia.hoje { outline: 2px solid var(--destaque); outline-offset: 1px; }
.linha-lembrete { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.campo-hora { min-height: 44px; border-radius: 12px; border: 1px solid var(--linha); background: var(--superficie); color: var(--texto); font: inherit; font-family: var(--mono); padding: 0 12px; }
.pacotes { display: flex; flex-direction: column; gap: 12px; }
.lista-pacotes { display: flex; flex-direction: column; gap: 8px; }
.pacote { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.pacote .remover { min-height: 44px; padding: 0 16px; }
.vazio { color: var(--suave); }
@media (orientation: landscape) {
  .habitos { grid-template-columns: 1fr 1fr; column-gap: 28px; align-items: start; }
  .habitos .topo { grid-column: 1 / -1; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .habitos { gap: 4px 28px; }
  .habitos .topo, .habitos .botao-texto { min-height: 34px; }
  .habitos .coluna { gap: 6px; }
  .seq-num { font-size: 44px; }
  .habitos .rotulo { margin-top: 0; }
  .habitos .rotulo-grupo { font-size: 11px; }
  .habitos .chip { min-height: 34px; }
  .habitos .botao-sec { min-height: 40px; }
  .habitos .botao-passo { min-height: 34px; }
  .cal-dia { padding: 4px 0; font-size: 12px; }
  .stats { font-size: 12px; }
  .habitos .dica { font-size: 12px; }
}

/* ---------- CAGED ---------- */
.caged { display: grid; gap: 10px; grid-template-columns: 1fr; }
.info-caged { font-size: 17px; font-weight: 600; min-height: 2.6em; }
.ponto.f-C { fill: #4C9BE8; } .ponto.f-A { fill: #E86F9A; } .ponto.f-G { fill: #7BC86C; }
.ponto.f-E { fill: #B58CF0; } .ponto.f-D { fill: #E8A24C; }
.ponto.neutro { fill: var(--suave); }
.ponto.fraco { opacity: 0.35; }
.ponto.raiz { stroke: var(--texto); stroke-width: 4; }
.barra-pestana { fill: color-mix(in srgb, var(--texto) 18%, transparent); stroke: var(--suave); stroke-width: 2; stroke-dasharray: 5 4; }
.bt-aulas { min-height: 44px; padding: 0 14px; margin-left: auto; font-size: 14px; }
.acoes-caged { grid-template-columns: 1fr 1.6fr; }
.desenho-quiz { max-height: 200px; }
.muda { font-size: 26px; font-weight: 700; fill: var(--suave); }
.respostas-caged { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.respostas-caged .certa { background: var(--ok); color: var(--fundo); border-color: var(--ok); }
.respostas-caged .errada { background: var(--ruim); color: var(--fundo); border-color: var(--ruim); }
.caged-opcoes { display: grid; gap: 8px; }
.caged-opcoes .chips { gap: 6px; }
@media (orientation: landscape) and (max-height: 460px) {
  .caged .topo, .caged .botao-texto { min-height: 34px; }
  .info-caged { font-size: 13px; min-height: 1.3em; line-height: 1.25; }
  .caged .braco-svg { max-height: 150px; }
  .caged-opcoes .chip { min-height: 34px; padding: 0 10px; font-size: 13px; }
  .bt-aulas { min-height: 36px; }
}
}

/* ---------- Teoria ---------- */
.teoria { display: flex; flex-direction: column; gap: 12px; }
.texto-licao { display: flex; flex-direction: column; gap: 10px; max-width: 70ch; }
.texto-licao p { line-height: 1.5; }
.tabela-int { border-collapse: collapse; font-size: 14px; max-width: 360px; }
.tabela-int td, .tabela-int th { border: 1px solid var(--linha); padding: 4px 10px; text-align: left; }
.tabela-int th { color: var(--suave); font-weight: 600; }
.demo-licao { display: flex; flex-direction: column; gap: 8px; }
.info-demo { font-weight: 600; }
.campo-lista { display: flex; flex-direction: column; gap: 4px; }
.campo-item { display: grid; grid-template-columns: 56px 80px 1fr; gap: 8px; background: var(--superficie); border: 1px solid var(--linha); border-radius: 10px; padding: 8px 12px; }
.campo-grau { color: var(--suave); font-family: var(--mono); }
.campo-cifra { font-weight: 800; font-size: 18px; color: var(--destaque); }
.exercicio-licao { display: flex; flex-direction: column; gap: 8px; }
.seq-ex { display: flex; gap: 6px; flex-wrap: wrap; }
.seq-nota { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--linha); background: var(--superficie); font-weight: 700; }
.seq-nota.atual { border-color: var(--destaque); background: var(--destaque); color: var(--sobre-destaque); }
.seq-nota.feito { background: var(--ok); color: var(--fundo); border-color: var(--ok); }
.acoes-licao { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.acoes-licao .botao-principal { padding: 0 28px; }
.quiz-tela { gap: 10px; }
.enunciado { font-size: 22px; font-weight: 700; min-height: 2.6em; }
.opcoes-quiz { display: grid; gap: 8px; grid-template-columns: 1fr; }
.opcao { min-height: 56px; text-align: left; padding: 8px 16px; font-weight: 600; }
.opcao.certa { background: var(--ok); color: var(--fundo); border-color: var(--ok); }
.opcao.errada { background: var(--ruim); color: var(--fundo); border-color: var(--ruim); }
@media (orientation: landscape) {
  .opcoes-quiz { grid-template-columns: 1fr 1fr; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .quiz-tela { gap: 4px; }
  .quiz-tela .topo, .quiz-tela .botao-texto { min-height: 34px; }
  .enunciado { font-size: 17px; min-height: 2.4em; }
  .opcao { min-height: 46px; font-size: 15px; padding: 4px 12px; }
  .quiz-tela .botao-principal { min-height: 46px; font-size: 16px; }
  .quiz-tela .feedback { font-size: 13px; min-height: 1.3em; }
}

/* ---------- Ritmo ---------- */
.ritmo { display: grid; gap: 10px; grid-template-columns: 1fr; }
.ritmo-svg { max-height: 190px; }
.compasso-num { font-size: 26px; font-weight: 800; fill: var(--suave); font-family: Georgia, serif; }
.cabeca-aberta { fill: var(--superficie); stroke: var(--texto); stroke-width: 4; }
.viga-grossa { stroke: var(--texto); stroke-width: 7; }
.bandeira { stroke: var(--texto); stroke-width: 3; fill: none; }
.pausa-svg { fill: none; stroke: var(--suave); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.pausa-pt { fill: var(--suave); }
.cursor-ritmo { stroke: var(--destaque); stroke-width: 4; }
.ritmo-ev.hit .cabeca, .ritmo-ev.hit .cabeca-aberta { fill: var(--ok); stroke: var(--ok); }
.ritmo-ev.hit .haste, .ritmo-ev.hit .viga-grossa, .ritmo-ev.hit .bandeira { stroke: var(--ok); }
.ritmo-ev.miss .cabeca, .ritmo-ev.miss .cabeca-aberta { fill: var(--ruim); stroke: var(--ruim); }
.ritmo-ev.miss .haste, .ritmo-ev.miss .viga-grossa, .ritmo-ev.miss .bandeira { stroke: var(--ruim); }
.contagem { text-align: center; font-family: var(--mono); font-size: 40px; font-weight: 700; color: var(--destaque); min-height: 1.2em; line-height: 1.1; }
.botao-tap { min-height: 120px; border-radius: 20px; border: 3px solid var(--destaque); background: var(--superficie); color: var(--texto); font-size: 22px; font-weight: 800; touch-action: manipulation; user-select: none; }
.botao-tap:disabled { opacity: 0.45; border-color: var(--linha); }
.botao-tap.batido { background: var(--destaque); color: var(--sobre-destaque); }
@media (orientation: landscape) and (max-height: 460px) {
  .ritmo { gap: 2px; }
  .ritmo .topo, .ritmo .botao-texto { min-height: 34px; }
  .ritmo .coluna { gap: 0; }
  .ritmo-svg { max-height: 100px; }
  .contagem { font-size: 26px; }
  .botao-tap { min-height: 70px; font-size: 18px; }
  .ritmo .leitura-opcoes .chip { min-height: 34px; }
  .ritmo .leitura-opcoes .botao-principal { min-height: 44px; font-size: 16px; padding: 0 20px; }
  .ritmo .estrelas { font-size: 28px; }
  .ritmo .painel-fim .botao-principal, .ritmo .fim-botoes .botao-sec { min-height: 40px; font-size: 15px; }
  .ritmo .fim-msg { font-size: 13px; }
}
@media (orientation: portrait) and (min-width: 700px) {
  .grade { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- Aulas do CAGED ---- */
.aulas-caged .bloco-desenho { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.aulas-caged .legenda { font-size: 14px; line-height: 1.4; color: var(--suave); }
.aulas-caged .detalhe-forma { font-size: 13px; line-height: 1.35; }
.aulas-caged .texto-bloco { line-height: 1.55; max-width: 70ch; }
.aulas-caged .titulo-bloco { margin-top: 10px; }
.aulas-caged .dica-bloco { background: color-mix(in srgb, var(--destaque) 14%, transparent); border-left: 4px solid var(--destaque); padding: 10px 12px; border-radius: 8px; line-height: 1.45; }
.aulas-caged .lista-bloco { padding-left: 20px; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; }
.aulas-caged .bloco-tocar, .aulas-caged .bloco-check { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--linha); border-radius: 10px; padding: 10px; margin: 6px 0; }
.aulas-caged .item-check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; align-items: center; }
.aulas-caged .item-check input { width: 22px; height: 22px; flex: none; }
.cartao-exame { border-color: var(--destaque); }

/* ---- Importar tablatura ---- */
.importar { display: flex; flex-direction: column; gap: 12px; }
.importar .coluna { display: flex; flex-direction: column; gap: 10px; }
.area-tab { width: 100%; font-family: var(--mono); font-size: 13px; line-height: 1.25; background: var(--superficie); color: var(--texto); border: 1px solid var(--linha); border-radius: 10px; padding: 10px; white-space: pre; overflow: auto; }
.form-revisao { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-revisao .campo { display: flex; flex-direction: column; gap: 4px; }
.form-revisao input, .form-revisao select { min-height: 44px; font-size: 16px; background: var(--superficie); color: var(--texto); border: 1px solid var(--linha); border-radius: 10px; padding: 0 10px; }
.rot-campo { font-size: 13px; color: var(--suave); }
.avisos { padding-left: 20px; color: var(--quase); font-size: 14px; line-height: 1.4; }
.imagens-pdf { display: flex; flex-direction: column; gap: 8px; max-height: 45vh; overflow: auto; }
.pagina-pdf { width: 100%; height: auto; background: #fff; border-radius: 6px; }
.acoes-cartao { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 420px) { .form-revisao { grid-template-columns: 1fr; } }

/* ---- Menu lateral ---- */
.menu-aba { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 40; width: 22px; height: 72px; padding: 0; border: 1px solid var(--linha); border-left: 0; border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--superficie-2) 82%, transparent); color: var(--destaque); font-size: 22px; font-weight: 800; line-height: 1; opacity: .8; }
.menu-aba:active { opacity: 1; }
.menu-veu { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s; }
.menu-veu.aberta { opacity: 1; }
.menu-gaveta { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(80vw, 300px); background: var(--superficie); border-right: 1px solid var(--linha); transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto; padding: 12px 10px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 2px; }
.menu-gaveta.aberta { transform: none; }
.menu-cab { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; }
.menu-nome { font-size: 20px; font-weight: 800; flex: 1; }
.menu-fechar { min-height: 44px; padding: 0 10px; background: none; border: 0; color: var(--destaque); font-size: 15px; font-weight: 700; }
.menu-grupo { margin: 12px 8px 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--suave); }
.menu-item { min-height: 48px; text-align: left; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--texto); font-size: 17px; }
.menu-item:active { background: var(--superficie-2); }
.menu-item[aria-current="page"] { background: var(--destaque); color: var(--sobre-destaque); font-weight: 800; }
.aviso-sair { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; background: var(--superficie-2); color: var(--texto); border: 1px solid var(--linha); border-radius: 22px; padding: 10px 18px; font-size: 15px; }
@media (orientation: landscape) and (max-height: 460px) { .menu-aba { height: 56px; } .menu-item { min-height: 40px; font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .menu-gaveta, .menu-veu { transition: none; } }
