/* App do Músico — RODA DOS TONS (17/11/2026). Cores = tokens do Músico (musica/tokens.css: --m-*), dia e noite.
   Só a página rola (nada de scroll dentro). Texto pequeno em Inter 400, pouco negrito. Projeto: _nill/PROJETO_RODA_DOS_TONS.md */
.mu-rd-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; color: currentColor; overflow: visible; }

.rd-tela { display: grid; gap: 1.6rem; }
.rd-tela__titulo { display: flex; align-items: center; gap: 1rem; margin: 0; font-family: var(--m-fonte, sans-serif); font-size: 2.6rem; font-weight: 700; color: var(--m-texto, #fff); }
.rd-tela__titulo .mu-rd-ico { color: var(--m-ouro, #ff8a1f); font-size: 2.8rem; }
.rd-tela__sub { margin: -.8rem 0 0; font-family: "Inter", var(--m-fonte, sans-serif); font-weight: 400; font-size: 1.4rem; color: var(--m-texto-2, rgba(255,255,255,.62)); }

/* layout: PC = roda à esquerda, escala e acordes à direita; embaixo, largo, progressões e cromatismo */
.rd { display: grid; grid-template-columns: minmax(340px, 520px) minmax(0, 1fr); gap: 2rem; align-items: start; color: var(--m-texto, #fff); font-family: var(--m-fonte, sans-serif); }
.rd-col { display: grid; gap: 2rem; min-width: 0; }
.rd-col--largo { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
@media (max-width: 1099px) {
  .rd { grid-template-columns: minmax(0, 1fr); }
  .rd-col--largo { grid-template-columns: minmax(0, 1fr); }
}

.rd-cartao { border: 1px solid var(--m-borda, #2e2818); background: var(--m-superficie, #161410); border-radius: 1.2rem; padding: 1.8rem; display: grid; gap: 1.4rem; min-width: 0;
  animation: rd-sobe .55s var(--m-ease, ease) both; }
.rd-col--info .rd-cartao:nth-child(2) { animation-delay: .08s; }
.rd-col--largo .rd-cartao { animation-delay: .14s; }
.rd-cartao__topo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rd-cartao :where(h2) { margin: 0; }
.rd-cartao h2 { font-family: var(--m-fonte, sans-serif); font-size: 2rem; font-weight: 600; }
.rd-dica, .rd-legenda { margin: 0; font-family: "Inter", var(--m-fonte, sans-serif); font-weight: 400; font-size: 1.35rem; line-height: 1.5; color: var(--m-texto-2, rgba(255,255,255,.62)); }
.rd-legenda { text-align: center; max-width: 44ch; justify-self: center; }
.rd-aviso { padding: 2rem; text-align: center; color: var(--m-texto-2); }
.rd-carregando { display: grid; place-items: center; gap: 1rem; min-height: 30rem; color: var(--m-texto-2); font-family: "Inter", var(--m-fonte); }
.rd-carregando__ico { font-size: 4.8rem; color: var(--m-ouro, #ff8a1f); animation: rd-gira 1.6s linear infinite; }

/* botões */
.rd-btn { display: inline-flex; align-items: center; gap: .6rem; min-height: 3.8rem; padding: 0 1.4rem; border-radius: 1rem; border: 1px solid var(--m-borda, #2e2818); background: transparent; color: var(--m-texto, #fff);
  font: 500 1.4rem var(--m-fonte, sans-serif); cursor: pointer; transition: border-color .2s, transform .15s, background .2s, color .2s; }
.rd-btn:hover { border-color: var(--m-ouro, #ff8a1f); color: var(--m-ouro, #ff8a1f); transform: translateY(-1px); }
.rd-btn:active { transform: scale(.97); }
.rd-btn:focus-visible, .rd-segm__b:focus-visible, .rd-nota:focus-visible, .rd-grau:focus-visible, .rd-play:focus-visible { outline: 2px solid var(--m-ouro, #ff8a1f); outline-offset: 2px; }
.rd-btn--ouro { background: var(--m-ouro, #ff8a1f); border-color: var(--m-ouro, #ff8a1f); color: #17171a; }
.rd-btn--ouro:hover { background: var(--m-ouro-claro, #ffab5c); color: #17171a; }
.rd-btn--ouro.is-tocando i { animation: rd-pisca .6s ease-in-out infinite alternate; }
.rd-btn__ico { font-size: 1.6rem; }

/* segmentos (Quintas | Cromática, Maior | Menor, escalas) */
.rd-segm { display: inline-flex; flex-wrap: wrap; gap: .4rem; padding: .4rem; border-radius: 1.1rem; background: var(--m-superficie-2, #1d1a12); border: 1px solid var(--m-borda, #2e2818); }
.rd-segm__b { min-height: 3.6rem; padding: 0 1.3rem; border: 0; border-radius: .8rem; background: transparent; color: var(--m-texto-2, rgba(255,255,255,.62)); font: 500 1.4rem var(--m-fonte, sans-serif); cursor: pointer; transition: background .25s, color .25s; }
.rd-segm__b:hover { color: var(--m-texto, #fff); }
.rd-segm__b.is-on { background: var(--m-ouro, #ff8a1f); color: #17171a; }
.rd-segm--peq .rd-segm__b { min-height: 3.2rem; font-size: 1.3rem; padding: 0 1rem; }

/* ── A RODA ── */
.rd-palco { display: grid; gap: 1.2rem; justify-items: center; }
.rd-controles { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.rd-roda-caixa { width: min(100%, 50rem); aspect-ratio: 1; }
.rd-roda { width: 100%; height: 100%; display: block; overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; transition: opacity .5s, transform .6s var(--m-ease, ease); }
.rd-roda.is-girando { cursor: grabbing; }
.rd-roda.is-entrando { opacity: 0; transform: rotate(-25deg) scale(.92); }
.rd-anel { fill: none; stroke: var(--m-borda, #2e2818); stroke-width: 1.2; }
.rd-anel--0 { fill: var(--m-superficie, #161410); stroke-width: 1.6; }
.rd-anel--3 { fill: var(--m-fundo, #0e0d0a); }
.rd-raio { stroke: var(--m-borda, #2e2818); stroke-width: 1; transition: opacity .5s; }
.rd-bloco { fill: var(--m-ouro-suave, rgba(255, 138, 31,.12)); stroke: var(--m-ouro, #ff8a1f); stroke-width: 1.4; stroke-linejoin: round; transition: opacity .45s; }
.rd-ponteiro { fill: var(--m-ouro, #ff8a1f); }
.rd-roda.is-cromatica .rd-bloco { opacity: 0; }
.rd-roda.is-cromatica .rd-raio { opacity: .35; }

.rd-item { cursor: pointer; transition: transform .75s var(--m-ease, ease), opacity .45s; outline: none; }
.rd-roda.is-girando .rd-item { transition: none; }
.rd-item__bola { fill: transparent; stroke: transparent; stroke-width: 2; transition: fill .3s, stroke .3s, r .3s; }
.rd-item__nome { text-anchor: middle; dominant-baseline: central; fill: var(--m-texto, #fff); font-family: "Figtree", var(--m-fonte, sans-serif); font-weight: 600; pointer-events: none; transition: fill .3s; }
.rd-item--fora .rd-item__nome { font-size: 19px; }
.rd-item--meio .rd-item__nome { font-size: 15px; fill: var(--m-texto-2, rgba(255,255,255,.62)); }
.rd-item--dentro .rd-item__nome { font-size: 12px; fill: var(--m-texto-3, rgba(255,255,255,.4)); }
.rd-item__grau { text-anchor: middle; font-family: "Inter", var(--m-fonte, sans-serif); font-size: 9px; font-weight: 400; fill: var(--m-ouro, #ff8a1f); pointer-events: none; }
.rd-item--fora .rd-item__nome { transform: translateY(-3px); }
.rd-item.is-familia .rd-item__nome { fill: var(--m-texto, #fff); }
.rd-item.is-tonica .rd-item__bola { fill: var(--m-ouro, #ff8a1f); }
.rd-item.is-tonica .rd-item__nome, .rd-item.is-tonica .rd-item__grau { fill: #17171a; }
.rd-item:hover .rd-item__bola, .rd-item:focus-visible .rd-item__bola { stroke: var(--m-ouro, #ff8a1f); }
.rd-item.rd-pulso .rd-item__bola { animation: rd-pulso .7s var(--m-ease, ease); }
/* vista cromática: só as 12 notas andam; os anéis de dentro somem */
.rd-roda.is-cromatica .rd-item--meio, .rd-roda.is-cromatica .rd-item--dentro { opacity: 0; pointer-events: none; }
.rd-roda.is-cromatica .rd-item--fora .rd-item__nome { fill: var(--m-texto-3, rgba(255,255,255,.4)); transform: none; }
.rd-roda.is-cromatica .rd-item.is-escala .rd-item__nome { fill: var(--m-texto, #fff); }
.rd-roda.is-cromatica .rd-item.is-escala .rd-item__bola { stroke: var(--m-ouro, #ff8a1f); }
.rd-roda.is-cromatica .rd-item.is-tonica-c .rd-item__bola { fill: var(--m-ouro, #ff8a1f); }
.rd-roda.is-cromatica .rd-item.is-tonica-c .rd-item__nome { fill: #17171a; }
.rd-forma { pointer-events: none; }
.rd-forma__linha { fill: var(--m-ouro-suave, rgba(255, 138, 31,.12)); stroke: var(--m-ouro, #ff8a1f); stroke-width: 1.6; stroke-linejoin: round; animation: rd-aparece .6s .35s var(--m-ease, ease) both; }
.rd-forma__passo { text-anchor: middle; font-family: "Inter", var(--m-fonte, sans-serif); font-size: 11px; font-weight: 500; fill: var(--m-texto-2, rgba(255,255,255,.62)); animation: rd-aparece .6s .5s both; }
.rd-forma__passo.is-semi { fill: var(--m-ouro, #ff8a1f); }

.rd-centro { cursor: pointer; outline: none; }
.rd-centro__bola { fill: var(--m-superficie-3, #241c08); stroke: var(--m-ouro, #ff8a1f); stroke-width: 1.6; transition: fill .3s; }
.rd-centro:hover .rd-centro__bola, .rd-centro:focus-visible .rd-centro__bola { fill: var(--m-ouro-suave, rgba(255, 138, 31,.12)); }
.rd-centro__nome { text-anchor: middle; dominant-baseline: central; font-family: "Figtree", var(--m-fonte); font-weight: 700; font-size: 24px; fill: var(--m-ouro, #ff8a1f); pointer-events: none; }
.rd-centro__sub { text-anchor: middle; font-family: "Inter", var(--m-fonte); font-size: 10px; font-weight: 400; fill: var(--m-texto-2, rgba(255,255,255,.62)); pointer-events: none; }

/* ── O TOM ── */
.rd-tom__topo { display: flex; align-items: center; gap: 1.4rem; }
.rd-tom__cifra { display: grid; place-items: center; min-width: 6.4rem; height: 6.4rem; padding: 0 .8rem; border-radius: 1.2rem; background: var(--m-ouro-suave, rgba(255, 138, 31,.12)); color: var(--m-ouro, #ff8a1f);
  font: 700 3rem "Figtree", var(--m-fonte); }
.rd-tom__nome { margin: 0; font-family: var(--m-fonte); font-size: 2.4rem; font-weight: 600; }
.rd-tom__arm { margin: .2rem 0 0; font-family: "Inter", var(--m-fonte); font-weight: 400; font-size: 1.4rem; color: var(--m-texto-2); }
.rd-tom__lista { margin: 0; display: grid; gap: .8rem; }
.rd-tom__lista > div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; align-items: baseline; padding-top: .8rem; border-top: 1px solid var(--m-borda, #2e2818); }
.rd-tom__lista dt { font-family: "Inter", var(--m-fonte); font-weight: 400; font-size: 1.3rem; color: var(--m-texto-3); }
.rd-tom__lista :where(dd) { margin: 0; }
.rd-tom__lista dd { font-family: "Inter", var(--m-fonte); font-weight: 400; font-size: 1.4rem; color: var(--m-texto-2); }
.rd-tom__lista dd b { font: 600 1.6rem "Figtree", var(--m-fonte); color: var(--m-texto); }

/* ── ESCALA ── */
.rd-pauta { min-height: 9rem; color: var(--m-texto, #fff); }
.rd-pauta.is-carregando { background: linear-gradient(90deg, transparent, var(--m-superficie-2), transparent); background-size: 200% 100%; animation: rd-brilho 1.2s linear infinite; border-radius: .8rem; }
.rd-pauta svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.rd-pauta .abcjs-note, .rd-pauta .abcjs-note * { transition: fill .15s; }
.rd-pauta .abcjs-note.rd-toca, .rd-pauta .abcjs-note.rd-toca * { fill: var(--m-ouro, #ff8a1f) !important; }
.rd-teclado { width: 100%; }
.rd-teclas { display: block; width: 100%; height: auto; max-height: 13rem; touch-action: manipulation; }
.rd-tecla { cursor: pointer; transition: fill .12s; }
.rd-tecla--b { fill: #f4f1e8; stroke: #b9b3a4; stroke-width: 1; }
.rd-tecla--p { fill: #1b1a17; stroke: #000; stroke-width: 1; }
.rd-tecla--b.is-escala { fill: #ffe7a3; }
.rd-tecla--p.is-escala { fill: #8a6a12; }
.rd-tecla.is-tonica { fill: var(--m-ouro, #ff8a1f); }
.rd-tecla.rd-toca { fill: #ff9f1a; }
.rd-tecla__do { text-anchor: middle; font: 400 9px "Inter", sans-serif; fill: #6b665a; pointer-events: none; }
.rd-notas { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.rd-nota { display: grid; justify-items: center; min-width: 4.6rem; padding: .5rem .6rem; border-radius: .9rem; border: 1px solid var(--m-borda, #2e2818); background: var(--m-superficie-2, #1d1a12); color: var(--m-texto); cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s; }
.rd-nota b { font: 600 1.6rem "Figtree", var(--m-fonte); }
.rd-nota small { font: 400 1.1rem "Inter", var(--m-fonte); color: var(--m-texto-3); }
.rd-nota:hover { border-color: var(--m-ouro, #ff8a1f); }
.rd-nota.is-tonica { border-color: var(--m-ouro, #ff8a1f); }
.rd-nota.rd-toca { background: var(--m-ouro, #ff8a1f); color: #17171a; transform: translateY(-2px); }
.rd-nota.rd-toca small { color: #17171a; }
.rd-passo { font: 400 1.1rem "Inter", var(--m-fonte); color: var(--m-texto-3); min-width: 1.4rem; text-align: center; }
.rd-passo.is-semi { color: var(--m-ouro, #ff8a1f); }
.rd-passo.is-tres { color: var(--m-baixo, #7fb4ff); }

/* ── ACORDES ── */
.rd-graus { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.2rem, 1fr)); gap: .6rem; }
.rd-grau { display: grid; justify-items: center; gap: .1rem; padding: .9rem .3rem; border-radius: 1rem; border: 1px solid var(--m-borda, #2e2818); background: var(--m-superficie-2, #1d1a12); color: var(--m-texto); cursor: pointer;
  transition: transform .15s, border-color .2s; min-width: 0; }
.rd-grau:hover { border-color: var(--m-ouro, #ff8a1f); transform: translateY(-2px); }
.rd-grau small { font: 400 1.2rem "Inter", var(--m-fonte); color: var(--m-ouro, #ff8a1f); }
.rd-grau b { font: 600 1.6rem "Figtree", var(--m-fonte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rd-grau span { font: 400 1rem "Inter", var(--m-fonte); color: var(--m-texto-3); }


.rd-completo { display: grid; gap: 1.2rem; padding: 1.4rem; border-radius: 1rem; background: var(--m-superficie-2, #1d1a12); border: 1px solid var(--m-borda, #2e2818); }
.rd-completo.rd-entra { animation: rd-sobe .4s var(--m-ease, ease) both; }
.rd-completo__topo { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.rd-completo__cifra { font: 700 3.2rem "Figtree", var(--m-fonte); color: var(--m-ouro, #ff8a1f); }
.rd-completo__topo > div:nth-child(2) { flex: 1; min-width: 16rem; }
.rd-completo__nome { margin: 0; font-size: 1.6rem; font-weight: 500; }
.rd-completo__grau { margin: .2rem 0 0; font: 400 1.3rem "Inter", var(--m-fonte); color: var(--m-texto-2); }
.rd-completo__acoes { display: flex; gap: .6rem; flex-wrap: wrap; }
.rd-completo__notas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; }
.rd-completo__nota { width: 100%; display: grid; justify-items: start; gap: .1rem; padding: .8rem 1rem; border-radius: .9rem; border: 1px solid var(--m-borda, #2e2818); background: var(--m-superficie, #161410); color: var(--m-texto); cursor: pointer; text-align: left; transition: border-color .2s; }
.rd-completo__nota:hover { border-color: var(--m-ouro, #ff8a1f); }
.rd-completo__nota b { font: 600 1.8rem "Figtree", var(--m-fonte); }
.rd-completo__nota span { font: 400 1.2rem "Inter", var(--m-fonte); color: var(--m-texto-2); }
.rd-completo__nota small { font: 400 1.1rem "Inter", var(--m-fonte); color: var(--m-ouro, #ff8a1f); }
.rd-completo__formula { margin: 0; font: 400 1.3rem "Inter", var(--m-fonte); color: var(--m-texto-2); }
.rd-completo__formula b { font-weight: 600; color: var(--m-texto); }
.rd-completo__desenhos { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: center; }
.rd-completo__desenhos :where(figure) { margin: 0; }
.rd-completo__desenhos figure { display: grid; justify-items: center; gap: .4rem; }
.rd-completo__desenhos figcaption { font: 400 1.2rem "Inter", var(--m-fonte); color: var(--m-texto-3); }
.rd-completo__desenhos svg { width: auto; height: 12rem; max-width: 100%; }

/* ── PROGRESSÕES e SEQUÊNCIAS ── */
.rd-progs__lista { display: grid; gap: .8rem; }
.rd-prog { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 1.2rem; border-radius: 1rem; background: var(--m-superficie-2, #1d1a12); }
.rd-prog__txt { display: grid; gap: .3rem; min-width: 0; }
.rd-prog__txt > b { font-size: 1.5rem; font-weight: 500; }
.rd-prog__txt > small { font: 400 1.2rem "Inter", var(--m-fonte); color: var(--m-ouro, #ff8a1f); }
.rd-play { flex: none; display: grid; place-items: center; width: 4.4rem; height: 4.4rem; border-radius: 50%; border: 0; background: var(--m-ouro, #ff8a1f); color: #17171a; font-size: 1.8rem; cursor: pointer; transition: transform .15s, background .2s; }
.rd-play:hover { background: var(--m-ouro-claro, #ffab5c); transform: scale(1.06); }
.rd-play:active { transform: scale(.94); }
.rd-seq { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.rd-seq__ac { min-height: 3.2rem; padding: 0 .9rem; border-radius: .8rem; border: 1px solid var(--m-borda, #2e2818); background: var(--m-superficie, #161410); color: var(--m-texto); font: 600 1.4rem "Figtree", var(--m-fonte); cursor: pointer; transition: background .2s, color .2s, transform .15s, border-color .2s; }
.rd-seq__ac:hover { border-color: var(--m-ouro, #ff8a1f); }
.rd-seq__ac.rd-toca { background: var(--m-ouro, #ff8a1f); border-color: var(--m-ouro, #ff8a1f); color: #17171a; transform: translateY(-2px); }
.rd-seq__seta { color: var(--m-texto-3); font-size: 1.2rem; }

/* ── CROMATISMO ── */
.rd-crom__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr)); gap: 1rem; }
.rd-ex { display: grid; gap: 1rem; align-content: start; padding: 1.4rem; border-radius: 1rem; background: var(--m-superficie-2, #1d1a12); border: 1px solid transparent; transition: border-color .25s, transform .25s; }
.rd-ex:hover { border-color: var(--m-borda, #2e2818); transform: translateY(-2px); }
.rd-ex__topo { display: flex; align-items: center; gap: 1rem; }
.rd-ex__topo :where(h3) { margin: 0; }
.rd-ex__topo h3 { font-size: 1.6rem; font-weight: 600; }
.rd-ex__num { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; flex: none; border-radius: 50%; background: var(--m-ouro-suave, rgba(255, 138, 31,.12)); color: var(--m-ouro, #ff8a1f); font: 600 1.3rem "Figtree", var(--m-fonte); }
.rd-ex :where(p) { margin: 0; }
.rd-ex p { font: 400 1.35rem/1.5 "Inter", var(--m-fonte); color: var(--m-texto-2); }
.rd-ex__acoes { display: flex; flex-wrap: wrap; gap: .6rem; }

/* animações */
@keyframes rd-sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rd-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes rd-pulso { 0% { fill: var(--m-ouro, #ff8a1f); } 100% { fill: transparent; } }
@keyframes rd-pisca { from { opacity: 1; } to { opacity: .4; } }
@keyframes rd-gira { to { transform: rotate(360deg); } }
@keyframes rd-brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.rd-item.is-tonica.rd-pulso .rd-item__bola { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .rd-item, .rd-roda, .rd-cartao, .rd-completo.rd-entra, .rd-forma__linha, .rd-forma__passo { transition: none !important; animation: none !important; }
}

/* dia: teclas e textos escuros sobre fundo claro */
[data-tema="dia"] .rd-tecla--b { fill: #fff; stroke: #cfc9bb; }
[data-tema="dia"] .rd-tecla--b.is-escala { fill: #ffe7a3; }
[data-tema="dia"] .rd-tecla.is-tonica { fill: #ff8a1f; }

/* celular */
@media (max-width: 599px) {
  .rd-cartao { padding: 1.4rem; }
  .rd-roda-caixa { width: min(100%, 86vw); }
  .rd-tom__lista > div { grid-template-columns: 1fr; gap: .2rem; }
  .rd-crom__lista { grid-template-columns: minmax(0, 1fr); }
  .rd-segm__b { padding: 0 1rem; font-size: 1.3rem; }
}
