/* Páginas del libro (/l/): escúchalo, corrígelo, dictados y guía del profesor. Una columna, como los ejercicios.
   Tokens copiados de lee-las-notas.css (claro y oscuro). Un solo botón carmesí por página. */
:root {
  --bg: #FAF9F8;
  --surface: #FFFFFF;
  --line: #E4E2DE;
  --line-strong: #CBC8C3;
  --ink: #121213;
  --ink-2: #585652;
  --ink-3: #7A7772;
  --staff: #3D3B38;
  --brand: #DB0934;
  --brand-hover: #B6072B;
  --on-brand: #FFFFFF;
  --ok: #0F6E56; --ok-bg: #E3F4EE; --ok-text: #0A4C3B;
  --fail: #C2410C; --fail-bg: #FDEDE4; --fail-text: #8A2E08;
  --info-bg: #E8EFF8; --info-text: #14355F; --info: #1E4E8C;
  --focus: #ED3157;
  --font-display: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-music: 'Noto Music', 'Bravura', 'Apple Symbols', 'Segoe UI Symbol', serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121213; --surface: #1B1A1A; --line: #3D3B38; --line-strong: #585652;
  --ink: #FAF9F8; --ink-2: #CBC8C3; --ink-3: #A5A29C; --staff: #CBC8C3;
  --brand: #ED3157; --brand-hover: #F36884; --on-brand: #121213;
  --ok: #5FC2A3; --ok-bg: #0E2A22; --ok-text: #A8E3D0;
  --fail: #F08A5D; --fail-bg: #2E1A10; --fail-text: #F9C4A8;
  --info-bg: #14223A; --info-text: #B7CBEA; --info: #8DB0E2;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #121213; --surface: #1B1A1A; --line: #3D3B38; --line-strong: #585652;
  --ink: #FAF9F8; --ink-2: #CBC8C3; --ink-3: #A5A29C; --staff: #CBC8C3;
  --brand: #ED3157; --brand-hover: #F36884; --on-brand: #121213;
  --ok: #5FC2A3; --ok-bg: #0E2A22; --ok-text: #A8E3D0;
  --fail: #F08A5D; --fail-bg: #2E1A10; --fail-text: #F9C4A8;
  --info-bg: #14223A; --info-text: #B7CBEA; --info: #8DB0E2;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font-sans); padding-inline: 16px; padding-block: 24px 48px; }
.wrap { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
p { margin: 0; }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.eyebrow { font: 500 .75rem/1.4 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--ink); }
h1 { font: 700 2.25rem/1.14 var(--font-display); letter-spacing: -.015em; margin: 6px 0 8px; text-wrap: balance; }
h2 { font: 700 1.125rem/1.35 var(--font-sans); margin: 0; }
h3 { font: 700 1rem/1.4 var(--font-sans); margin: 6px 0 0; }
.lead { color: var(--ink-2); max-width: 60ch; }
.nota { color: var(--ink-2); font-size: .9375rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.frase { font-size: 1.125rem; line-height: 1.55; }
.pie-ej { color: var(--ink-2); font-size: .875rem; text-align: center; min-height: 1em; }

/* Botones */
.primary { border: 0; background: var(--brand); color: var(--on-brand); font: 700 .9375rem/1 var(--font-sans); padding: 12px 22px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-block; }
.primary:hover { background: var(--brand-hover); }
.ghost { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 500 .875rem/1 var(--font-sans); padding: 10px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.ghost[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.boton { display: inline-block; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; font: 700 .9375rem/1 var(--font-sans); padding: 12px 18px; border-radius: 10px; text-decoration: none; }
.boton:hover { background: var(--ink); color: var(--bg); }
.sec { color: var(--ink-2); font-size: .9375rem; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: 12px; padding: 3px; background: var(--surface); gap: 2px; align-self: flex-start; max-width: 100%; }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: 500 .9375rem/1 var(--font-sans); padding: 9px 13px; border-radius: 9px; cursor: pointer; min-width: 40px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg.mini { flex-wrap: nowrap; }
.seg.mini button { padding: 7px 10px; font-size: .875rem; min-width: 34px; }

/* Reproductor */
.player { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tempo { display: inline-flex; align-items: center; gap: 6px; }
.tempo output { min-width: 4.6em; text-align: center; font: 500 .9375rem/1 var(--font-sans); color: var(--ink-2); }
.tempo .ghost { width: 38px; justify-content: center; font-size: 1.125rem; padding: 8px 0; }
.player.solo-ajustes > .primary { display: none; }

/* Pentagramas: como en teoria.css */
.pent { display: flex; justify-content: center; overflow-x: auto; min-width: 0; }
svg.staff { width: 100%; height: auto; display: block; overflow: visible; }
svg.staff .line { stroke: var(--staff); stroke-width: 1.4; }
svg.staff .barl { stroke: var(--staff); stroke-width: 1.4; }
svg.staff .clef { fill: var(--staff); font-family: var(--font-music); }
svg.staff .clef.calco { fill: var(--line-strong); }
svg.staff .clefbar, svg.staff .ink, svg.staff .rest, svg.staff .head { fill: var(--ink); }
svg.staff .rest { font-family: var(--font-music); }
svg.staff .stem { stroke: var(--ink); stroke-width: 1.5; }
svg.staff .hole { fill: var(--surface); }
svg.staff .acc line, svg.staff .acc path { stroke: var(--ink); }
svg.staff .acc polygon { fill: var(--ink); }
svg.staff .ts { fill: var(--ink); font: 700 25px var(--font-sans); text-anchor: middle; }
svg.staff .lab { fill: var(--ink-2); font: 700 13px var(--font-sans); text-anchor: middle; }
svg.staff .lab.izq { text-anchor: start; } svg.staff .lab.der { text-anchor: end; }
svg.staff .lab.grande { font-size: 15px; fill: var(--ink); }
svg.staff .tup { fill: var(--ink); font: 700 14px var(--font-sans); text-anchor: middle; }
svg.staff .lab.volta { text-anchor: start; fill: var(--ink); }
svg.staff .lab.simbolo { font-family: var(--font-music); font-size: 30px; font-weight: 400; fill: var(--ink); }
svg.staff .ev.on .tup { fill: var(--info); }
svg.staff .guia { stroke: var(--ink-3); stroke-width: 1; }
svg.staff .pulso { stroke: var(--ink-3); stroke-width: 1.6; }
svg.staff .escribe { stroke: var(--line-strong); }
svg.staff .tup { fill: var(--ink); font: 700 14px var(--font-sans); text-anchor: middle; }
svg.staff .lab.volta { text-anchor: start; font-weight: 700; fill: var(--ink); }
svg.staff .lab.simbolo { font-family: var(--font-music); font-size: 30px; font-weight: 400; fill: var(--ink); }
svg.staff .marca { fill: var(--ink); font-family: var(--font-music); }
svg.staff .resp { fill: var(--ink); font: 700 30px var(--font-sans); }
svg.staff .txt-arriba { fill: var(--ink); font: italic 700 15px var(--font-display); }
svg.staff .din { fill: var(--ink); font: italic 700 19px var(--font-display); }
svg.staff .din.txt { font-size: 15px; font-weight: 400; }
svg.staff .hueco { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 3 3; }
svg.staff .ev.on .head, svg.staff .ev.on .ink { fill: var(--info); }
svg.staff .ev.on .stem { stroke: var(--info); }
svg.staff .ev.on .tup { fill: var(--info); }

/* Listas de enlaces */
.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lista li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.lista a { font-weight: 700; }
.lista span { font-size: .875rem; color: var(--ink-2); }

/* Ritmo */
ol.lineas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ol.lineas li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
ol.lineas .n { font-weight: 700; color: var(--ink-2); }

/* Corrígelo */
.ej h2 { display: flex; gap: 10px; align-items: baseline; }
.ej h2 .n { display: inline-flex; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); align-items: center; justify-content: center; font-size: .875rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slots:has(.seg.mini button:nth-child(3)) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.slots.anchos { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); min-width: 0; }
.slot .k { font-weight: 700; font-size: .875rem; color: var(--ink-2); min-width: 1.2em; }
.slot select, .slot input { font: 500 1rem/1.2 var(--font-sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 6px; min-width: 0; flex: 1; }
.slot input { width: 4.2em; flex: none; text-align: center; }
.slot.fila { justify-content: flex-start; flex-wrap: wrap; }
.slot.ok { border-color: var(--ok); background: var(--ok-bg); }
.slot.fail { border-color: var(--fail); background: var(--fail-bg); }
.slot.chk { cursor: pointer; font-size: .875rem; }
.slot.chk input { width: auto; flex: none; }
.nums { display: flex; flex-direction: column; gap: 8px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.series { display: flex; flex-direction: column; gap: 10px; }
.serie { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.serie .et { width: 100%; font-size: .875rem; color: var(--ink-2); }
.serie .n { font-weight: 700; min-width: 2.2em; text-align: center; }
.slot.hueco { padding: 3px; }
.fragmentos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.frag { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.revela { display: flex; flex-direction: column; gap: 10px; }
/* En el móvil, los pentagramas largos de las fichas no se encogen hasta no leerse: se desplazan dentro de su caja */
.ej > div > .pent svg { min-width: 520px; }
.ej > div > .pent { justify-content: flex-start; }
.comprueba { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.fb:empty { display: none; }
.fb { border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.fb.ok { background: var(--ok-bg); color: var(--ok-text); font-weight: 700; }
.fb.fail { background: var(--fail-bg); color: var(--fail-text); }
.fallo { display: flex; flex-direction: column; gap: 3px; }
.fallo + .fallo { border-top: 1px solid color-mix(in srgb, var(--fail) 30%, transparent); padding-top: 10px; }
.fallo .t { font-weight: 700; }
.fb .truco { border-top: 1px solid color-mix(in srgb, var(--fail) 30%, transparent); padding-top: 10px; }
.fallo .t b { display: inline-block; min-width: 1.6em; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.resumen .t { font-weight: 700; font-size: 1.0625rem; }
.resumen.ok { border-color: var(--ok); }
.resumen.fail { border-color: var(--fail); }

.go-end { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 18px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.go-end p { color: var(--ink-2); }

/* Profesor */
ol.pasos { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.sol-ej { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.sol p { font-size: .9375rem; }
.dict-sol { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.dict-sol > div { display: flex; gap: 8px; align-items: center; }
.tarea { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.tarea .msg { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9375rem; overflow-wrap: anywhere; }

.salto { display: flex; flex-direction: column; gap: 10px; }
.pie { font: 400 .75rem/1.5 var(--font-sans); color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; }
.pie a { color: inherit; }
@media (max-width: 420px) {
  h1 { font-size: 1.875rem; }
  .card { padding: 14px 12px; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ♯ ♭ ♮ ♩ 𝄪 𝄫 en el texto (los envuelve alteraciones.js): Noto Music, un poco más grandes y algo subidos, como en un libro de música */
.alteracion { font-family: 'Noto Music', serif; font-weight: 400; font-style: normal; font-size: 1.2em; line-height: 0; vertical-align: .12em; margin: 0 .02em; }
svg tspan.alteracion { font-family: 'Noto Music', serif; font-weight: 400; font-size: 1.2em; baseline-shift: .12em; }
/* Adornos (pentagrama.js, LM 4): grupeto con la fuente de música y «tr» en cursiva */
svg.staff .orn { fill: var(--ink); font-family: var(--font-music); }
svg.staff .orn-tr { fill: var(--ink); font: italic 700 19px var(--font-sans, 'Plus Jakarta Sans', sans-serif); }
/* Cifrado americano encima de la entonación (data-cifrado) */
svg.staff .lab.arriba.cifrado { text-anchor: start; font-size: 16px; font-weight: 700; }
/* El color del libro (datos: color, lo pone web.mjs): una franja arriba de cada página /l/ de ese libro.
   No es el carmesí de la marca (ese sigue siendo el acento del botón principal). En oscuro, el mismo color aclarado. */
body { border-top: 6px solid var(--libro, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { border-top-color: var(--libro-claro, transparent); } }
:root[data-theme="dark"] body { border-top-color: var(--libro-claro, transparent); }
/* Verdadero o falso y unir: una fila por frase, a lo ancho (la frase a la izquierda, el control a la derecha) */
.slots.vf, .slots.unir { display: flex; flex-direction: column; gap: 8px; }
.slots.vf .slot, .slots.unir .slot { display: flex; flex-direction: row; align-items: center; gap: 10px; width: 100%; }
.slots.vf .slot .t, .slots.unir .slot .t { flex: 1; }
.slots.unir .slot select { min-width: 9.5em; max-width: 55%; }
/* «A la venta en papel» en la página del libro: un enlace de texto, sin carmesí */
.a-la-venta { margin: 0 0 16px; color: var(--ink-2); }
.a-la-venta a { color: var(--ink); font-weight: 700; }
