/* Ahora lo Oyes · componentes.
   Cárgalo después de tokens.css. Todo usa las variables de marca; no pongas colores sueltos.
   Prefijo alo- en todas las clases. Guía completa: marca/GUIA.md */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font-family: var(--font-texto); font-size: 17px; line-height: 27px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
p { margin: 0; }
img, svg { max-width: 100%; }
a { color: var(--enlace); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--subrayado); }
:focus-visible { outline: none; box-shadow: var(--anillo-foco); border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.alo-contenedor { max-width: 1040px; margin: 0 auto; padding-inline: var(--space-4); }
@media (min-width: 720px) { .alo-contenedor { padding-inline: var(--space-8); } }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.alo-fila { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4); }
.alo-pila { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }

/* Botón */
.alo-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-6); border-radius: var(--radius-full); border: 1.5px solid var(--linea-fuerte); background: var(--superficie); color: var(--tinta); font-family: var(--font-texto); font-size: 17px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
.alo-btn:hover { border-color: var(--tinta); }
.alo-btn:focus-visible { outline: none; box-shadow: var(--anillo-foco); }
.alo-btn--principal { background: var(--subrayado); border-color: var(--subrayado); color: var(--sobre-subrayado); }
.alo-btn--principal:hover { border-color: var(--sobre-subrayado); }
.alo-btn--suave { background: var(--superficie-2); border-color: transparent; }
.alo-btn--suave:hover { border-color: var(--linea-fuerte); }
.alo-btn--grande { min-height: 56px; padding: 0 var(--space-8); font-size: 19px; }
.alo-btn--peq { min-height: 34px; padding: 0 var(--space-4); font-size: 14px; }
.alo-btn[disabled] { opacity: .45; cursor: not-allowed; }
.alo-btn svg { width: 14px; height: 14px; fill: currentColor; flex: none; }

/* Subrayado: la palabra clave de un título */
.alo-sub { background: var(--subrayado); color: var(--sobre-subrayado); padding: 0 .12em; border-radius: var(--radius-sm); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Estado: resultado de una corrección */
.alo-estado { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: var(--radius-full); background: var(--superficie-2); color: var(--tinta); font-family: var(--font-texto); font-size: 14px; line-height: 20px; font-weight: 700; white-space: nowrap; }
.alo-estado--bien { background: var(--bien-suave); color: var(--bien); }
.alo-estado--casi { background: var(--casi-suave); color: var(--casi); }
.alo-estado--mal { background: var(--mal-suave); color: var(--mal); }
.alo-estado--bien::before { content: "✓"; }
.alo-estado--casi::before { content: "~"; }
.alo-estado--mal::before { content: "✗"; }

/* Pestañas */
.alo-pestanas { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--superficie-2); border-radius: var(--radius-full); }
.alo-pestanas button { min-height: 40px; padding: 0 18px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--tinta-suave); font-family: var(--font-texto); font-size: 14px; line-height: 20px; font-weight: 700; cursor: pointer; }
.alo-pestanas button[aria-selected="true"] { background: var(--superficie); color: var(--tinta); box-shadow: var(--shadow-sm); }
.alo-pestanas button:focus-visible { outline: none; box-shadow: var(--anillo-foco); }

/* Tarjeta de ejercicio */
.alo-tarjeta { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radius-md); max-width: 360px; }
.alo-tarjeta__cabeza { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.alo-tarjeta__figura { font-family: var(--font-musica); font-size: 32px; line-height: 36px; }
.alo-tarjeta__meta { font-size: 13px; line-height: 18px; color: var(--tinta-suave); }
.alo-tarjeta__titulo { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.01em; }
.alo-tarjeta__texto { margin: 0; color: var(--tinta-suave); }
.alo-tarjeta__pie { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); flex-wrap: wrap; }

/* Selector de figura */
.alo-figuras { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.alo-figura { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 68px; min-height: 64px; padding: 4px 10px; border: 1.5px solid var(--linea-fuerte); border-radius: var(--radius-md); background: var(--superficie); color: var(--tinta); cursor: pointer; }
.alo-figura__g { font-family: var(--font-musica); font-size: 28px; line-height: 32px; }
.alo-figura__t { font-family: var(--font-texto); font-size: 12px; line-height: 16px; font-weight: 700; color: var(--tinta-suave); }
.alo-figura[aria-pressed="true"] { background: var(--subrayado); border-color: var(--subrayado); color: var(--sobre-subrayado); }
.alo-figura[aria-pressed="true"] .alo-figura__t { color: var(--sobre-subrayado); }
.alo-figura:focus-visible { outline: none; box-shadow: var(--anillo-foco); }

/* Teclado para escribir notas */
.alo-teclado { position: relative; display: flex; height: 140px; max-width: 100%; border: 1px solid var(--linea-fuerte); border-top: 4px solid var(--tinta); border-radius: 0 0 var(--radius-sm) var(--radius-sm); overflow: hidden; user-select: none; touch-action: manipulation; }
.alo-tecla-b { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; background: var(--tecla-blanca); border-left: 1px solid var(--linea-fuerte); color: var(--tecla-negra); font-family: var(--font-texto); font-size: 12px; line-height: 16px; font-weight: 700; cursor: pointer; }
.alo-tecla-b:first-child { border-left: 0; }
.alo-tecla-n { position: absolute; top: 0; height: 60%; background: var(--tecla-negra); border-radius: 0 0 4px 4px; z-index: 1; cursor: pointer; }
.alo-tecla-b.activa, .alo-tecla-n.activa { background: var(--subrayado); color: var(--sobre-subrayado); }
.alo-tecla-b:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--tecla-negra); }
.alo-tecla-n:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--subrayado); }
