/* =====================================================================
   El juego del practicador: arenas de tempo (🎵 ⭐ 🔥 🔑)
   El color de cada arena sale de --ga-h (azul en Grave → rojo en Prestissimo)
   ===================================================================== */
.game-hud { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .92rem; white-space: nowrap; border: 1px solid var(--line); }
.game-hud:empty { display: none; }
.game-hud:hover { border-color: var(--accent); }
.game-hud b { font-weight: 800; }
.game-hud .gh-arena { font-family: var(--display); font-weight: 600; color: var(--accent); }
.game-hud .cold { opacity: .55; }
@media (max-width: 640px) {
  .stu-bar.has-nav .game-hud { order: 4; flex: 1 1 100%; justify-content: space-around; }
}

.ga-page { gap: 18px; }
.ga-insts { align-self: start; }
.ga-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }

/* Arena actual */
.ga-hero { --ga-c: hsl(var(--ga-h) 70% 45%); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start;
  border: 2px solid color-mix(in srgb, var(--ga-c) 55%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--ga-c) 14%, var(--surface)), var(--surface) 70%); }
.ga-badge { --ga-c: hsl(var(--ga-h) 70% 45%); width: 92px; height: 104px; display: grid; place-content: center; text-align: center; color: #fff;
  background: linear-gradient(160deg, hsl(var(--ga-h) 75% 55%), hsl(var(--ga-h) 70% 35%));
  clip-path: polygon(50% 0, 100% 18%, 100% 72%, 50% 100%, 0 72%, 0 18%); box-shadow: var(--shadow); }
.ga-badge span { font-family: var(--display); font-size: 2.4rem; font-weight: 700; line-height: 1; }
.ga-badge small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.ga-badge.big { width: 120px; height: 136px; margin: 0 auto; }
.ga-badge.big span { font-size: 3.2rem; }
.ga-hero-body { display: grid; gap: 6px; min-width: 0; }
.ga-hero h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); color: hsl(var(--ga-h) 65% 40%); }
:root[data-theme="dark"] .ga-hero h2 { color: hsl(var(--ga-h) 80% 72%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ga-hero h2 { color: hsl(var(--ga-h) 80% 72%); } }
.ga-inst { color: var(--muted); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.ga-it { margin: 0; font-style: italic; color: var(--muted); }
.ga-unlock { margin: 0; }
.ga-prog { display: grid; gap: 6px; margin: 6px 0; }
.ga-bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.ga-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, hsl(var(--ga-h, 222) 75% 55%), hsl(calc(var(--ga-h, 222) - 21) 75% 50%)); transition: width .4s; }
.ga-req { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .95rem; }
.ga-req .ok { color: var(--ok); font-weight: 700; }
.ga-wait { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); margin: 4px 0 0; }
.ga-go { justify-self: start; }
@media (max-width: 520px) { .ga-hero { grid-template-columns: 1fr; } .ga-hero .ga-badge { width: 72px; height: 82px; } .ga-hero .ga-badge span { font-size: 1.9rem; } }

/* Marcadores */
.ga-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ga-stat { display: grid; gap: 2px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.ga-stat .ga-emo { font-size: 1.4rem; }
.ga-stat b { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; }
.ga-stat small { line-height: 1.3; }

/* Misiones */
.ga-missions { display: grid; gap: 10px; }
.ga-mission { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; background: var(--surface); }
.ga-mission:hover { border-color: var(--accent); }
.ga-mission.done { background: color-mix(in srgb, var(--ok-soft) 60%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.ga-mission.done .pr-ico { background: var(--ok); color: #fff; }
.ga-m-body { display: grid; gap: 3px; }
.ga-m-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ga-m-bar i { display: block; height: 100%; background: var(--accent); }
.ga-mission.done .ga-m-bar i { background: var(--ok); }
.ga-m-count { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }

/* Estrella de dominios */
.ga-radar { width: 100%; max-width: 360px; justify-self: center; overflow: visible; }
.ga-r-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.ga-r-axis { stroke: var(--line); stroke-width: 1; }
.ga-r-area { fill: color-mix(in srgb, var(--accent) 28%, transparent); stroke: var(--accent); stroke-width: 2; }
.ga-r-dot { fill: var(--accent); }
.ga-r-label { font-size: 10px; fill: var(--muted); font-weight: 700; font-family: var(--body); }
.ga-dom-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; font-size: .92rem; }
.ga-dom-list li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.ga-dom-list b { white-space: nowrap; }

/* Ranking */
.ga-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 420px; overflow-y: auto; }
.ga-rank li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.ga-rank li:nth-child(odd) { background: var(--surface-2); }
.ga-rank li.me { background: var(--accent-soft); outline: 2px solid var(--accent); }
.ga-pos { font-family: var(--display); font-weight: 700; text-align: center; }
.ga-who { display: grid; min-width: 0; }
.ga-who b, .ga-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-pts { white-space: nowrap; }

/* Mapa de arenas */
.ga-map { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ga-step { --ga-c: hsl(var(--ga-h) 70% 45%); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 10px 0; position: relative; }
.ga-step::before { content: ''; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.ga-step:first-child::before { top: 50%; }
.ga-step:last-child::before { bottom: 50%; }
.ga-dot { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); }
.ga-step.past .ga-dot { background: var(--ga-c); color: #fff; border-color: var(--ga-c); }
.ga-step.now .ga-dot { background: var(--ga-c); color: #fff; border-color: var(--ga-c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ga-c) 25%, transparent); transform: scale(1.1); }
.ga-step.next { opacity: .72; }
.ga-step p { margin: 2px 0; }
.ga-step b { font-family: var(--display); font-size: 1.1rem; display: inline-flex; align-items: center; gap: 8px; }
.ga-need { color: var(--muted); }

/* Historial y ayuda */
.ga-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ga-hist li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ga-h-pts { font-weight: 800; color: var(--ok); white-space: nowrap; }
.ga-h-pts.neg { color: var(--bad); }
.ga-how summary { cursor: pointer; padding: 2px 0; }
.ga-how[open] summary { margin-bottom: 12px; }
.ga-how li { margin: 6px 0; }

/* Prueba de arena */
.ga-intro { border-left: 6px solid hsl(var(--ga-h) 70% 45%); }
.ga-test-top { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 8px; }
.ga-test-top .ga-bar { grid-column: 1 / -1; }
.ga-result { text-align: center; display: grid; gap: 10px; justify-items: center; position: relative; overflow: hidden; }
.ga-result.pass { border: 2px solid hsl(var(--ga-h) 70% 45%); }

/* Lección: puntos y claves */
.ld-game { font-weight: 800; color: var(--ok); }
.hub-tile.ga-tile { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.hub-tile.ga-tile svg { color: var(--accent); }
.ga-two > .card { align-content: start; }
.ga-rank li.me, .ga-rank li.me * { color: var(--ink); }
.ga-rank li.me .muted { color: var(--muted); }
@media (max-width: 640px) {
  .stu-bar.has-nav .stu-nav { min-width: 0; }
  .stu-bar.has-nav .stu-nav a { padding: 7px 6px; gap: 4px; font-size: .88rem; min-width: 0; }
}
@media (max-width: 360px) { .stu-bar.has-nav .stu-nav a svg { display: none; } }

/* =================== Fase 2 =================== */
/* Renovador de racha */
.ga-rescue { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; border: 2px solid var(--warn); background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); }
.ga-rescue .ga-emo { font-size: 2.4rem; }
.ga-rescue h2 { margin: 0 0 4px; }
.ga-rescue p { margin: 0 0 8px; }
.ga-rescue .ga-bar i { background: linear-gradient(90deg, #F5B83D, #F26B5B); }

/* Cofres */
.ga-chest-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ga-chest { display: grid; justify-items: center; gap: 4px; padding: 16px 12px; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: center; transition: transform .15s; }
.ga-chest:hover { transform: translateY(-2px) rotate(-1deg); border-style: solid; }
.ga-chest small { color: var(--muted); }
.ga-chest-emo { font-size: 2.6rem; line-height: 1; }
.ga-chest.k-arena { border-color: #F5B83D; }
.ga-chest.k-racha { border-color: #F26B5B; }
.ga-chest.opening .ga-chest-emo { animation: ga-shake .18s linear infinite; }
.ga-chest.open { border-style: solid; border-color: var(--ok); background: color-mix(in srgb, var(--ok-soft) 60%, var(--surface)); }
.ga-chest.open small { color: var(--ink); font-weight: 700; }
@keyframes ga-shake { 0% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) scale(1.08); } 100% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .ga-chest.opening .ga-chest-emo { animation: none; } }

/* Desafíos grandes */
.ga-ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ga-ch { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; background: var(--surface); }
.ga-ch:hover { border-color: var(--accent); transform: translateY(-1px); }
.ga-ch-body { display: grid; gap: 3px; }
.ch-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ch-clock { font-family: var(--display); font-size: 2rem; font-variant-numeric: tabular-nums; }
.ch-clock.low { color: var(--bad); }
.ch-score { font-weight: 800; font-size: 1.1rem; }
.ch-stars { font-size: 2rem; letter-spacing: 4px; margin: 0; }
.ch-stars span { filter: grayscale(1); opacity: .3; }
.ch-stars span.on { filter: none; opacity: 1; }
.ch-fb { overflow-x: auto; }

/* Perfil: títulos y marcos */
.avatar.big { width: 56px; height: 56px; font-size: 1.5rem; }
.ga-prof { gap: 14px; align-items: center; }
.ga-title { color: var(--accent); font-weight: 800; font-style: italic; }
.ga-dot-av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: .75rem; vertical-align: middle; }
.frame-bronce { box-shadow: 0 0 0 3px #B87333; }
.frame-plata { box-shadow: 0 0 0 3px #A8B3C2; }
.frame-oro { box-shadow: 0 0 0 3px #E2B33C, 0 0 10px #E2B33C88; }
.frame-esmeralda { box-shadow: 0 0 0 3px #2BB37A, 0 0 10px #2BB37A77; }
.frame-rubi { box-shadow: 0 0 0 3px #D9344F, 0 0 10px #D9344F77; }
.frame-arcoiris { box-shadow: 0 0 0 2px #F26B5B, 0 0 0 4px #F5B83D, 0 0 0 6px #2BB3A3, 0 0 0 8px #2350D8; }
.game-hud .gh-chest { animation: ga-pulse 1.6s ease-in-out infinite; }
@keyframes ga-pulse { 50% { transform: scale(1.15); } }

/* Mini repaso de la lección */
.lesson-quiz { border: 2px solid var(--accent); }

/* Entrenamiento de guitarra */
.tr-inst a { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.tr-inst-name { display: inline-flex; align-items: center; gap: 4px; opacity: .9; }
.g-tab { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .95rem; line-height: 1.35; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; margin: 0; color: var(--ink); }
.g-chords { display: flex; flex-wrap: wrap; gap: 10px; }
.g-chord { display: grid; justify-items: center; gap: 2px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.g-chord:hover { border-color: var(--accent); }
.g-chord .chord-svg { width: 96px; height: auto; }
.g-chart { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.g-bar { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.g-bar small { color: var(--muted); font-size: .7rem; }
.g-bar b { font-family: var(--display); font-size: 1.25rem; }
.g-bar.cur { background: var(--accent); border-color: var(--accent); }
.g-bar.cur b, .g-bar.cur small { color: var(--accent-ink); }
.tr-cam { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tr-cam-clock { font-family: var(--display); font-size: 3rem; font-variant-numeric: tabular-nums; }

/* =================== Fase 3: grabaciones y certificados =================== */
.rec-card .rec { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rec-card .rec audio { max-width: 100%; }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rv-list li { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.rv-list audio, .rv-card audio { width: 100%; }
.rv-card { border-left: 6px solid hsl(var(--ga-h) 70% 45%); }
.rv-card h2 { margin: 0; }
.rv-stars { display: flex; gap: 4px; }
.rv-stars button { font-size: 1.6rem; background: none; border: 0; cursor: pointer; filter: grayscale(1); opacity: .35; padding: 2px; }
.rv-stars button.on { filter: none; opacity: 1; }

/* Certificado */
.cert-host { min-height: 100vh; }
.cert-page { max-width: 1060px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 16px; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cert { --ga-c: hsl(var(--ga-h) 65% 42%); aspect-ratio: 1.414 / 1; background: #FFFDF7; color: #1E2433; border-radius: 6px; padding: 18px; box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 15% 20%, hsl(var(--ga-h) 70% 92%) 0, transparent 40%), radial-gradient(circle at 85% 85%, #F5E7C4 0, transparent 40%); }
.cert-in { height: 100%; border: 3px double var(--ga-c); outline: 1px solid #C9A64A; outline-offset: -10px; border-radius: 4px; padding: 4% 7%; display: grid; align-content: center; justify-items: center; text-align: center; gap: 6px; }
.cert-school { margin: 0; letter-spacing: .25em; text-transform: uppercase; font-size: .85rem; color: #6B6F7B; }
.cert h1 { margin: 2px 0 6px; font-family: var(--display); font-size: clamp(1.6rem, 4.4vw, 2.8rem); color: var(--ga-c); }
.cert-txt { margin: 0; font-style: italic; color: #4A5060; }
.cert-name { margin: 4px 0; font-family: var(--display); font-size: clamp(1.8rem, 5vw, 3.2rem); color: #1E2433; border-bottom: 2px solid #C9A64A; padding: 0 24px 4px; }
.cert-arena { display: flex; align-items: center; gap: 16px; margin: 8px 0; text-align: left; }
.cert-arena .ga-badge.big { width: 84px; height: 96px; margin: 0; }
.cert-arena .ga-badge.big span { font-size: 2.4rem; }
.cert-arena b { display: block; font-family: var(--display); font-size: clamp(1.3rem, 3.4vw, 2rem); color: var(--ga-c); }
.cert-arena > div:last-child i, .cert-arena > div:last-child span { display: block; color: #4A5060; }
.cert-what { margin: 0; max-width: 60ch; color: #3A4050; }
.cert-meta { margin: 0; font-size: .9rem; color: #6B6F7B; }
.cert-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 12%; width: 80%; margin-top: 4%; }
.cert-sign div { display: grid; justify-items: center; }
.cert-line { display: block; width: 100%; min-height: 1.6em; border-bottom: 1px solid #1E2433; font-family: var(--display); }
.cert-sign small { color: #6B6F7B; margin-top: 4px; }
@media (max-width: 640px) { .cert { aspect-ratio: auto; } .cert-in { padding: 24px 14px; } .cert-sign { width: 100%; } }
@media print {
  @page { size: landscape; margin: 8mm; }
  .no-print, .stu-bar, .side, .sec-tabs, .toasts { display: none !important; }
  body, .cert-host { background: #fff !important; }
  .cert-page { max-width: none; padding: 0; }
  .cert { box-shadow: none; aspect-ratio: auto; height: 180mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =================== Fase 4: temporadas, ligas, duelos y honor =================== */
.ga-season { --lg: #B87333; border-top: 5px solid var(--lg); }
.ga-season.lg-plata { --lg: #A8B3C2; } .ga-season.lg-oro { --lg: #E2B33C; } .ga-season.lg-diamante { --lg: #4FC3F7; }
.ga-season .ga-bar i { background: var(--lg); }
.ga-league { display: flex; align-items: center; gap: 14px; }
.ga-league-emo { font-size: 2.8rem; line-height: 1; }
.ga-league b { display: block; font-family: var(--display); font-size: 1.5rem; }
.ga-duels { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ga-duel { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.ga-duel.play { border-color: var(--accent); background: var(--accent-soft); }
.ga-duel.won { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.ga-podium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.ga-podium li { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 12px 6px; border-radius: 14px; background: var(--surface-2); }
.ga-podium li.p1 { order: 2; padding-top: 20px; background: color-mix(in srgb, #E2B33C 22%, var(--surface)); }
.ga-podium li.p2 { order: 1; } .ga-podium li.p3 { order: 3; }
.ga-pod-medal { font-size: 1.8rem; }
.ga-podium b { overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }

/* =================== Fase 5: modo escucha =================== */
.ls-panel { display: grid; gap: 10px; }
.ls-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-chip { min-width: 2.6em; text-align: center; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 800; font-size: .9rem; transition: background .15s; }
.ls-chip.cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ls-chip.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.ls-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ls-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--warn)); transition: width .08s; }
.ls-status { margin: 0; }
.tr-listen { display: grid; gap: 8px; padding: 12px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; }
.tr-arena-lock { display: block; color: var(--warn); font-weight: 700; }

/* ---------- Torneos ---------- */
.ga-tour-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ga-tour-board li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ga-tour-board li .pos { min-width: 2em; text-align: center; font-weight: 700; }
.ga-tour-board li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-tour-board li.me { border-color: var(--accent); background: var(--accent-soft); }
.ga-tour-board li:nth-child(1) { border-color: color-mix(in srgb, #e0a800 55%, var(--line)); }

/* ---------- Reto de tempo en las piezas ---------- */
.tp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tp-title { font-weight: 700; margin-right: 4px; }
.tp-btn { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.tp-btn small { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.tp-btn:hover:not(:disabled) { border-color: var(--accent); }
.tp-btn.ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.tp-btn:disabled:not(.ok) { opacity: .55; cursor: not-allowed; }

/* ---------- Alabanza: cifrado, transporte y pista ---------- */
.input.mono, .pz-out { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; line-height: 1.45; }
.pz-out { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); white-space: pre; overflow-x: auto; min-height: 2.6em; }
.pz-out:empty { display: none; }
.pz-table { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pz-table > div { display: grid; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 2px; }
.pz-table > div span { font-family: var(--display); font-size: 1.3rem; color: var(--accent); font-weight: 700; }
.pz-prog { font-family: var(--display); font-size: 1.3rem; font-weight: 700; margin: 0; }
.pz-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pz-chip { display: grid; justify-items: center; min-width: 84px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); transition: transform .12s, background .12s, border-color .12s; }
.pz-chip b { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; }
.pz-chip small { color: var(--muted); }
.pz-chip.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); transform: scale(1.07); }
.pz-chip.on small { color: inherit; opacity: .85; }
.pz-diag .row { gap: 6px; }
.pz-shape { display: grid; justify-items: center; width: 92px; border-radius: 12px; border: 2px solid transparent; padding: 2px; }
.pz-shape.on { border-color: var(--accent); background: var(--accent-soft); }
.pz-shape .chord-svg { width: 84px; height: auto; }
.pz-part { cursor: pointer; }
.pz-part input { accent-color: var(--accent); }
@media (max-width: 560px) { .pz-chip { min-width: 64px; padding: 8px 10px; } .pz-chip b { font-size: 1.25rem; } }
.ga-tour-board li, .ga-tour-board li b, .ga-tour-board li .nm { color: var(--ink); }
.ga-tour-board li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.ga-result .ga-tour-board { width: 100%; max-width: 440px; margin: 4px auto; text-align: left; }

/* ---------- Piano por cable (MIDI) ---------- */
.midi-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; position: relative; }
.midi-btn:hover { border-color: var(--accent); }
.midi-btn.on { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); background: var(--ok-soft); }
.midi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.stu-bar .midi-btn { padding: 6px 9px; }
.midi-test { padding: 18px; border-radius: 14px; border: 2px dashed var(--line); text-align: center; font-family: var(--display); font-size: 1.4rem; font-weight: 700; color: var(--muted); }
.midi-test.lit { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.midi-status .ok-txt { color: var(--ok); }
.midi-guide li { margin-bottom: 6px; }
.kb .midi-hit { filter: brightness(.85); box-shadow: inset 0 -6px 0 var(--accent); }

/* ---------- Editor de partituras ---------- */
@font-face { font-family: 'HGBravura'; src: url('../vendor/alphatab/font/Bravura.woff2') format('woff2'), url('../vendor/alphatab/font/Bravura.woff') format('woff'); font-display: block; }
.se-page { max-width: 1240px; }
.se-head { align-items: flex-end; gap: 12px; }
.se-title { margin: 2px 0; }
.se-sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; display: grid; gap: 8px; }
.se-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.se-grp { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.se-tb { min-width: 40px; height: 40px; padding: 0 8px; border-radius: 9px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; }
.se-tb:hover:not(:disabled) { background: var(--accent-soft); }
.se-tb.on { background: var(--accent); color: var(--accent-ink); }
.se-tb:disabled { opacity: .35; cursor: default; }
.se-gl { font-family: 'HGBravura'; font-size: 26px; line-height: 1; display: inline-block; transform: translateY(5px); }
.se-gl.dot { transform: translateY(0); font-size: 30px; }
.se-gl.tie { transform: translateY(-2px); }
.se-input { align-items: center; gap: 10px; }
.se-letters { display: flex; flex-wrap: wrap; gap: 4px; }
.se-letters .btn { min-width: 48px; padding: 6px 10px; }
.se-hint { flex: 1 1 260px; }
.se-card { padding: 8px; overflow: hidden; }
.se-sheet { overflow: auto; max-height: 70vh; background: #fff; border-radius: 10px; }
.se-render { min-height: 240px; }
.se-sel-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.se-sel-grid, .se-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.se-settings summary { cursor: pointer; }
.se-settings[open] summary { margin-bottom: 10px; }
.se-tpls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.se-tpl { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.se-tpl small { color: var(--muted); }
.se-tpl.on { border-color: var(--accent); background: var(--accent-soft); }
.se-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.se-card-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.se-card-main { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; min-width: 0; }
.se-card-main b { display: block; }
.se-keys .p88-wrap { max-width: 100%; }
@media (max-width: 640px) {
  .se-tb { min-width: 36px; height: 38px; padding: 0 6px; }
  .se-gl { font-size: 22px; }
  .se-hint { display: none; }
  .se-sheet { max-height: 60vh; }
  .se-sticky { gap: 6px; padding: 6px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; box-shadow: 0 6px 10px -8px rgba(0,0,0,.25); }
  .se-tools, .se-letters, .se-input { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .se-tools::-webkit-scrollbar, .se-letters::-webkit-scrollbar, .se-input::-webkit-scrollbar { display: none; }
  .se-grp, .se-letters .btn, .se-input .seg { flex: 0 0 auto; }
  .se-letters .btn { min-width: 42px; padding: 6px 8px; }
  .se-input .seg button { white-space: nowrap; }
}
