/* Compositor Silelo: pauta estilo Mario Paint com acabamento Aero (vidro, azul-água, brilho) */
:root { --col: 34px; --row: 11px; --topo: 40px; --base: 18px; --tinta: #10324a; --vidro: rgba(255,255,255,.72); --azul: #1f86c8; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.35 "Segoe UI", Tahoma, system-ui, sans-serif; color: var(--tinta);
  background: linear-gradient(180deg, #dff4ff 0%, #b9e3f7 45%, #d8f3d0 100%); overflow-x: hidden;
}
#app { display: flex; flex-direction: column; gap: 7px; padding: 8px 10px 10px; min-height: 100%; }
#app > * { min-width: 0; max-width: 100%; }
.grupo-fita, .fita { min-width: 0; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* topo: bancos, indicador, ajuda */
.topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bancos { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: #ffffff8c; border: 1px solid #9fcbe6; }
.banco { border: 0; border-radius: 7px; padding: 4px 12px; cursor: pointer; background: none; font-weight: 600; line-height: 1.1; text-align: left; }
.banco small { display: block; font-size: 10px; font-weight: 400; color: #4b7896; }
.banco[aria-selected="true"] { background: linear-gradient(#e9fbff, #9fdcff 50%, #6cc4f5 51%, #aee4ff); box-shadow: 0 0 0 1px #0f6fae, 0 0 8px #29a3ff88; }
.indicador { flex: 1 1 260px; min-width: 0; margin: 0; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; background: #ffffffb8; border: 1px solid #b7d9ee;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indicador b { color: #0d5e96; }
.indicador img { width: 16px; height: 16px; vertical-align: -3px; object-fit: contain; }
.ajuda-btn { font-weight: 700; }
.tocar-caixa, .ferr-caixa, .ferramentas { display: flex; gap: 4px; align-items: center; }
.ferr-caixa .sep { width: 1px; align-self: stretch; margin: 2px 4px; background: #a9d3ec; }
/* abas da fita */
.abas-fita { display: flex; gap: 2px; margin-bottom: -8px; padding-left: 6px; position: relative; z-index: 1; overflow-x: auto; scrollbar-width: none; }
.aba-fita { border: 1px solid #a9d3ec; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 4px 14px; cursor: pointer; font-weight: 600; font-size: 13px; background: linear-gradient(#f4fbff, #d7ecf8); color: #2a5b7c; }
.aba-fita[aria-selected="true"] { background: #fff; color: #0d5e96; box-shadow: 0 -2px 6px #29a3ff33; padding-bottom: 6px; }

/* paleta */
.paleta { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 4px; padding: 6px; border-radius: 10px;
  background: linear-gradient(#ffffffd9, #e3f4ffcc); border: 1px solid #8cc6e8; box-shadow: inset 0 1px #fff, 0 2px 6px #0b4a7222; }
.inst { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 48px; min-width: 0; padding: 2px 1px; border-radius: 8px; cursor: pointer;
  border: 1px solid #9fcbe6; background: linear-gradient(#fff 0%, #eaf6ff 50%, #d3ecfb 51%, #e9f7ff 100%); }
.inst img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; pointer-events: none; }
.inst .nome { max-width: 100%; font-size: 9.5px; line-height: 1.05; color: #264f6b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.inst:hover { border-color: #3aa0dc; box-shadow: 0 0 6px #43b3ff88; }
.inst[aria-checked="true"] { border-color: #0f6fae; background: linear-gradient(#e9fbff, #9fdcff 50%, #6cc4f5 51%, #aee4ff); box-shadow: 0 0 0 2px #fff, 0 0 10px #29a3ff; }
.inst .num { position: absolute; left: 3px; top: 1px; font-size: 9px; color: #4b7896; }
.inst.carregando::after { content: ''; position: absolute; right: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #1f86c8; border-right-color: transparent; animation: gira .8s linear infinite; }
.inst.usado::before { content: ''; position: absolute; right: 4px; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: #2fb344; }
@keyframes gira { to { transform: rotate(360deg); } }
:focus-visible { outline: 2px solid #ff9d00; outline-offset: 2px; }

/* fita (ribbon) */
.fita { display: flex; }
.grupo-fita { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 48px; padding: 7px 10px; border-radius: 0 9px 9px 9px; border: 1px solid #a9d3ec;
  background: linear-gradient(#ffffff, #e6f5ffd8); box-shadow: inset 0 1px #fff, 0 2px 6px #0b4a7218; }
.grupo-fita .linha { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.grupo-fita .linha + .linha { padding-left: 14px; border-left: 1px solid #cfe3f0; }
.nome-grupo { display: none; }
.btn { border: 1px solid #7fb4d6; border-radius: 6px; padding: 5px 10px; cursor: pointer; white-space: nowrap; min-height: 30px;
  background: linear-gradient(#fdfeff 0%, #e6f3fb 49%, #cfe6f5 50%, #e4f3fc 100%); box-shadow: inset 0 1px #fff; }
.btn.mini { padding: 3px 8px; font-size: 13px; min-height: 28px; }
.btn:hover { border-color: #2b8fd0; background: linear-gradient(#f4fbff 0%, #d9f0ff 49%, #b2def8 50%, #d3efff 100%); }
.btn[aria-pressed="true"], .btn[aria-checked="true"] { background: linear-gradient(#cfeeff, #8fd0f6); border-color: #0f6fae; font-weight: 600; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.perigo { color: #9b1c1c; }
.btn.perigo-forte { color: #fff; border-color: #8b1a12; background: linear-gradient(#ff9a8a 0%, #e24a35 50%, #c42b1c 51%, #ea5a3f 100%); }
.btn.gravar[aria-pressed="true"] { color: #fff; border-color: #8b1a12; background: linear-gradient(#ff8a7a, #d8342c); }
.btn.tocar { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; border-color: #0b6b25; min-width: 86px; justify-content: center;
  background: linear-gradient(#8fe28a 0%, #3fb53a 50%, #23962a 51%, #53c24a 100%); text-shadow: 0 1px 1px #0005; }
.btn.tocar.on { border-color: #8b1a12; background: linear-gradient(#ff9a8a 0%, #e24a35 50%, #c42b1c 51%, #ea5a3f 100%); }
.ico-play { width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.on .ico-play { width: 10px; height: 10px; border: 0; background: #fff; }
.campo { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.campo select { border: 1px solid #7fb4d6; border-radius: 5px; background: #fff; padding: 3px 4px; min-height: 28px; max-width: 150px; }
.campo input[type=range] { width: 96px; accent-color: var(--azul); }
.campo output { min-width: 2.4em; font-weight: 700; font-variant-numeric: tabular-nums; }
.rotulo-dur { font-size: 13px; }
.duracoes { display: flex; gap: 2px; }
.dur { position: relative; width: 34px; height: 30px; padding: 0; border: 1px solid #7fb4d6; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 700;
  background: linear-gradient(#fdfeff, #d8ecf8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.dur i { display: block; height: 4px; border-radius: 2px; background: #1f86c8; }
.dur[aria-checked="true"] { border-color: #0f6fae; background: linear-gradient(#cfeeff, #8fd0f6); box-shadow: 0 0 6px #29a3ff88; }

/* mixer */
.mixer { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border-radius: 10px; background: #0f2c44e6; color: #e6f5ff; border: 1px solid #2c6d99; }
.mixer .vazio-mixer { margin: 4px 8px; font-size: 13px; }
.canal { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 78px; padding: 6px 4px; border-radius: 8px; background: linear-gradient(#274b68, #16324a); border: 1px solid #3b6f95; }
.canal img { width: 24px; height: 24px; object-fit: contain; }
.canal .nome { font-size: 10.5px; text-align: center; line-height: 1.1; min-height: 2.2em; }
.canal input[type=range] { width: 70px; accent-color: #7cd3ff; }
.canal .ms { display: flex; gap: 3px; }
.canal .ms button { width: 28px; height: 24px; padding: 0; border-radius: 5px; border: 1px solid #5c93bb; background: #1d3f5a; color: #cfeaff; font-weight: 700; cursor: pointer; }
.canal .ms button[aria-pressed="true"].m { background: #d8342c; border-color: #ff8a7a; color: #fff; }
.canal .ms button[aria-pressed="true"].s { background: #f0b400; border-color: #ffe08a; color: #332200; }

/* pauta */
.pauta-caixa { position: relative; display: flex; border-radius: 10px; border: 1px solid #86bfdf; overflow: hidden;
  background: linear-gradient(#fffef6, #fffdf0); box-shadow: inset 0 0 0 1px #fff, 0 4px 12px #0b4a7226; }
.clave { position: relative; flex: 0 0 58px; border-right: 1px solid #d6e6ef; background: #fffef6; z-index: 2;
  height: calc(var(--topo) + 15 * var(--row) + var(--base)); }
.clave .sol { position: absolute; left: 4px; top: calc(var(--topo) + 1.4 * var(--row)); font: 78px/1 "Segoe UI Symbol", "Noto Music", "Bravura", serif; color: #203a50; }
.clave .formula { position: absolute; right: 4px; top: calc(var(--topo) + 3.9 * var(--row)); font: 700 17px/0.95 Georgia, serif; text-align: center; }
.pauta-rolo { position: relative; flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-color: #7fb4d6 #eaf6ff; overscroll-behavior-x: contain; }
.pauta { position: relative; height: calc(var(--topo) + 15 * var(--row) + var(--base)); cursor: crosshair; touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.pauta.ferr-borracha { cursor: cell; }
.pauta.ferr-selecao { cursor: text; }
.pauta:focus { outline: none; }
.pauta:focus-visible { box-shadow: inset 0 0 0 2px #ff9d00; }
/* cinco linhas (E4 G4 B4 D5 F5) e linhas suplementares claras (C4, A5, C6) */
.linhas { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(#324b5e, #324b5e) 0 calc(var(--topo) + 12 * var(--row)) / 100% 1px no-repeat,
    linear-gradient(#324b5e, #324b5e) 0 calc(var(--topo) + 10 * var(--row)) / 100% 1px no-repeat,
    linear-gradient(#324b5e, #324b5e) 0 calc(var(--topo) + 8 * var(--row)) / 100% 1px no-repeat,
    linear-gradient(#324b5e, #324b5e) 0 calc(var(--topo) + 6 * var(--row)) / 100% 1px no-repeat,
    linear-gradient(#324b5e, #324b5e) 0 calc(var(--topo) + 4 * var(--row)) / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, #9bb6c822 0 6px, transparent 6px 10px) 0 calc(var(--topo) + 14 * var(--row)) / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, #9bb6c855 0 6px, transparent 6px 10px) 0 calc(var(--topo) + 2 * var(--row)) / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, #9bb6c855 0 6px, transparent 6px 10px) 0 calc(var(--topo) + 0 * var(--row)) / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 calc(var(--col) - 1px), #0e5c8a12 calc(var(--col) - 1px) var(--col));
}
.faixas i { position: absolute; left: 0; right: 0; height: var(--row); margin-top: calc(var(--row) / -2); pointer-events: none; }
.faixas i.tonica { background: #ffd54a2e; }
.faixas i.fora { background: #7a8a9612; }
.regua { position: absolute; left: 0; right: 0; top: 0; height: 20px; background: linear-gradient(#eaf5fc, #d9ecf7); border-bottom: 1px solid #c3dced; cursor: col-resize; }
.compassos i { position: absolute; top: calc(var(--topo) + 4 * var(--row)); height: calc(8 * var(--row) + 1px); width: 1px; background: #324b5e; pointer-events: none; }
.compassos i.fim { width: 5px; border-left: 1px solid #324b5e; background: linear-gradient(90deg, transparent 0 2px, #324b5e 2px); }
.compassos b { position: absolute; top: 4px; font: 600 10px/1 "Segoe UI", sans-serif; color: #4b6f88; pointer-events: none; }
.pauta .apos { position: absolute; top: 20px; bottom: 0; background: #0b3a5a14; pointer-events: none; }
.selecao { position: absolute; top: 0; bottom: 0; background: #2f95dd26; border-left: 2px solid #2f95dd; border-right: 2px solid #2f95dd; pointer-events: none; }
.marcador { position: absolute; top: 18px; bottom: 0; width: 2px; margin-left: -1px; background: #ff9d00aa; pointer-events: none; }
.marcador::before { content: ''; position: absolute; top: -2px; left: -5px; border: 6px solid transparent; border-top-color: #ff9d00; }
.nota { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; object-fit: contain; image-rendering: pixelated; pointer-events: none; z-index: 2; }
.nota.toca { outline: 2px solid #ffd43b; border-radius: 50%; }
.rabo { position: absolute; height: 6px; margin-top: -3px; border-radius: 0 4px 4px 0; opacity: .75; pointer-events: none; z-index: 1;
  box-shadow: inset 0 1px #ffffff99, 0 0 0 1px #0b254033; }
.rabo::after { content: ''; position: absolute; right: -1px; top: -3px; width: 4px; height: 12px; border-radius: 2px; background: inherit; box-shadow: 0 0 0 1px #0b254055; }
.sel-nota { outline: 2px dashed #2f95dd; outline-offset: 1px; border-radius: 50%; }
.acid { position: absolute; margin: -10px 0 0 -23px; font: 700 13px/1 Georgia, serif; color: #10324a; pointer-events: none; z-index: 2; }
.sup { position: absolute; width: 22px; height: 1px; margin-left: -11px; background: #324b5e; pointer-events: none; }
.fantasma { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; opacity: .5; pointer-events: none; image-rendering: pixelated; z-index: 3; }
.fantasma.apaga { opacity: .9; filter: grayscale(1) contrast(.5); }
.fantasma-rabo { position: absolute; height: 6px; margin-top: -3px; border-radius: 3px; opacity: .45; pointer-events: none; z-index: 3; }
.fantasma-nome { position: absolute; margin: -34px 0 0 12px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 4;
  background: #10324ae6; color: #fff; }
.caret { position: absolute; width: var(--col); height: calc(var(--row) * 2); margin-top: calc(var(--row) * -1); border: 2px dashed #ff9d00; border-radius: 6px; pointer-events: none; z-index: 3; }
.cursor { position: absolute; left: 0; top: calc(var(--topo) - 4px); bottom: 4px; width: var(--col); margin-left: calc(var(--col) / -2); background: linear-gradient(90deg, transparent, #fff7a855 30%, #fff7a8aa 50%, #fff7a855 70%, transparent); pointer-events: none; z-index: 1; }
.corredor { position: absolute; left: 0; top: 0; width: 40px; height: 44px; margin: -40px 0 0 -20px; pointer-events: none; z-index: 5; will-change: transform; filter: drop-shadow(0 2px 2px #0003); }
.vazio { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); width: min(460px, 86%); margin: 0; padding: 10px 14px; border-radius: 12px; text-align: center;
  background: #ffffffe0; border: 1px dashed #7fb4d6; color: #1c4d6d; pointer-events: none; font-size: 14px; }
.vazio small { color: #4b7896; }

.estado { min-height: 1.35em; margin: 0; font-size: 13px; color: #1c4d6d; }
.estado.erro { color: #a61b1b; font-weight: 600; }
.publicar { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--vidro); border: 1px solid #a9d3ec; }
.publicar label { font-weight: 600; }
.publicar input { flex: 1 1 200px; min-width: 0; border: 1px solid #7fb4d6; border-radius: 6px; padding: 6px 8px; background: #fff; }
.publicar-btn { font-weight: 700; color: #fff; border-color: #0b5a90; background: linear-gradient(#7cc8ff 0%, #2f95dd 50%, #1478c2 51%, #3aa2e8 100%); text-shadow: 0 1px 1px #0005; }
.publicar-btn:hover { background: linear-gradient(#9ad6ff 0%, #40a6ee 50%, #1a86d4 51%, #52b2f2 100%); }
kbd { font: 11px/1 Consolas, monospace; padding: 1px 4px; border: 1px solid #9fbfd4; border-bottom-width: 2px; border-radius: 4px; background: #fff; color: #10324a; }

/* resultado da publicação */
.resultado { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: #0b3a5a55; z-index: 20; }
.resultado-card { width: min(420px, 100%); padding: 18px 20px; border-radius: 14px; text-align: center; background: linear-gradient(#ffffff, #e5f5ff); border: 1px solid #7fb4d6; box-shadow: 0 10px 30px #0b3a5a55; }
.resultado-card h2 { margin: 4px 0 6px; font-size: 20px; color: #0d5e96; }
.resultado-card .emotes { display: flex; justify-content: center; gap: 4px; min-height: 26px; flex-wrap: wrap; }
.resultado-card .emotes img { width: 24px; height: 24px; object-fit: contain; }
.resultado-card ul { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.resultado-card li { padding: 6px 2px; border-radius: 8px; background: #fff; border: 1px solid #cfe5f3; font-size: 12px; }
.resultado-card li b { display: block; font-size: 18px; color: #0d5e96; }
.resultado-card .aviso { font-size: 12px; color: #4b7896; }
.resultado-card .acoes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* modais simples */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: #0b3a5a59; }
.modal-caixa { width: min(440px, 100%); padding: 16px 18px; border-radius: 12px; background: linear-gradient(#fff, #eaf6ff); border: 1px solid #7fb4d6; box-shadow: 0 12px 32px #0b3a5a66; }
.modal-caixa h2 { margin: 0 0 6px; font-size: 17px; color: #0d5e96; }
.modal-caixa p { margin: 0 0 10px; }
.modal-caixa input { width: 100%; padding: 6px 8px; border: 1px solid #7fb4d6; border-radius: 6px; font-size: 12px; }
.modal-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* ajuda estilo Vista */
.janela-ajuda { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 12px; background: #0b3a5a47; }
.ajuda-caixa { display: flex; flex-direction: column; width: min(860px, 100%); height: min(620px, 100%); border-radius: 10px; overflow: hidden; border: 1px solid #5f8fb3;
  background: #fff; box-shadow: 0 16px 40px #0b3a5a77; }
.ajuda-topo { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; color: #fff; font-weight: 600;
  background: linear-gradient(#5aa7dd, #2a74b3 50%, #1d5e98 51%, #3a86c4); text-shadow: 0 1px 1px #0006; }
.ajuda-fechar { width: 32px; height: 24px; border-radius: 5px; border: 1px solid #8b1a12; color: #fff; font-weight: 700; cursor: pointer; background: linear-gradient(#f0a090, #d8452f 50%, #c1301c 51%, #de5a3f); }
.ajuda-corpo { flex: 1; display: flex; min-height: 0; }
.ajuda-indice { flex: 0 0 210px; display: flex; flex-direction: column; gap: 2px; padding: 10px; overflow-y: auto; background: linear-gradient(#eef7fd, #dcedf8); border-right: 1px solid #c3dced; }
.ajuda-indice a { padding: 5px 8px; border-radius: 6px; color: #0d5e96; text-decoration: none; font-size: 13px; }
.ajuda-indice a:hover { background: #fff; text-decoration: underline; }
.ajuda-indice .btn { margin-top: 8px; }
.ajuda-texto { flex: 1; overflow-y: auto; padding: 8px 18px 20px; font-size: 14px; line-height: 1.5; }
.ajuda-texto h2 { margin: 18px 0 6px; font-size: 17px; color: #1d5e98; border-bottom: 1px solid #d5e7f3; padding-bottom: 3px; }
.ajuda-texto ul, .ajuda-texto ol { padding-left: 20px; margin: 4px 0; }
.atalhos-tabela { border-collapse: collapse; width: 100%; font-size: 13px; }
.atalhos-tabela th, .atalhos-tabela td { padding: 4px 8px; border-bottom: 1px solid #e3eef6; text-align: left; vertical-align: top; }
.atalhos-tabela th { white-space: nowrap; font-weight: 400; }

/* tour */
.tour { position: fixed; inset: 0; z-index: 28; }
.tour-luz { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px #0b2a4299, 0 0 0 3px #ffd43b, 0 0 18px 4px #ffd43b; pointer-events: none; transition: all .25s; }
.tour-balao { position: fixed; width: min(320px, calc(100% - 24px)); padding: 12px 14px; border-radius: 12px; background: linear-gradient(#fff, #eaf6ff); border: 1px solid #7fb4d6; box-shadow: 0 10px 28px #0b3a5a77; }
.tour-balao h2 { margin: 2px 0 4px; font-size: 16px; color: #0d5e96; }
.tour-balao p { margin: 0 0 8px; font-size: 13.5px; }
.tour-passo { font-size: 11px !important; color: #4b7896; text-transform: uppercase; letter-spacing: .08em; }
.tour-acoes { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 700px) {
  :root { --col: 32px; --row: 10px; --topo: 36px; }
  #app { padding: 6px; gap: 6px; }
  .topo { gap: 6px; }
  .indicador { order: 3; flex: 1 1 200px; }
  .ajuda-btn { order: 4; }
  .paleta { display: flex; overflow-x: auto; padding: 5px; scrollbar-width: thin; }
  .inst { flex: 0 0 52px; height: 50px; }
  /* celular: a fita vira uma fileira só que rola para o lado, e os botões ficam maiores para o dedo */
  .grupo-fita { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .grupo-fita .linha { flex-wrap: nowrap; }
  .ferr-caixa { overflow-x: auto; max-width: 100%; }
  .btn, .btn.mini { min-height: 38px; }
  .dur { width: 38px; height: 38px; }
  .campo select { min-height: 38px; }
  .clave { flex-basis: 42px; }
  .clave .sol { font-size: 64px; left: 1px; }
  .clave .formula { font-size: 14px; right: 2px; }
  .ajuda-corpo { flex-direction: column; }
  .ajuda-indice { flex: 0 0 auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #c3dced; }
  .ajuda-indice a { white-space: nowrap; }
  .ajuda-indice .btn { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .tour-luz { transition: none; } .inst.carregando::after { animation: none; } }

/* modo Bateria: nomes das peças à esquerda e grade de passos (canvas) no lugar da pauta */
.vistas { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: #ffffff8c; border: 1px solid #9fcbe6; }
.vista { border: 0; border-radius: 7px; padding: 6px 12px; cursor: pointer; background: none; font-weight: 600; }
.vista[aria-selected="true"] { background: linear-gradient(#fff4d6, #ffd36b 50%, #f5b93a 51%, #ffdc86); box-shadow: 0 0 0 1px #b7791f; }
.pecas { flex: 0 0 118px; position: relative; z-index: 2; background: #f5fbff; border-right: 1px solid #c3dced; padding-top: 20px; }
.pecas button { display: flex; align-items: center; gap: 5px; width: 100%; height: var(--linha-bat, 20px); padding: 0 6px; border: 0; border-bottom: 1px solid #e3eef6; background: none;
  font-size: 11.5px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #10324a; }
.pecas button:hover, .pecas button.hover { background: #dff1ff; }
.pecas button i { flex: 0 0 9px; height: 9px; border-radius: 50%; }
.grade { position: relative; }
.grade canvas { position: absolute; left: 0; top: 0; display: block; cursor: pointer; touch-action: pan-x; }
.grade canvas:focus { outline: none; }
.grade canvas:focus-visible { box-shadow: inset 0 0 0 2px #ff9d00; }
.forcas { display: flex; gap: 2px; }
.midi-estado { margin: 0; font-size: 13px; color: #1c4d6d; }
.midi-estado.ok { color: #1b7a2a; font-weight: 600; }
.btn.midi-ativo { background: linear-gradient(#d6ffd2, #7fd67a); border-color: #1b7a2a; }
@media (max-width: 700px) {
  .pecas { flex-basis: 78px; }
  .pecas button { font-size: 10px; padding: 0 3px; }
  .vista { padding: 8px 10px; }
}
