/* =========================================================
   LECTOR TIPO ATRIL (site/assets/js/lector.js, site/catalogo-lector.php)
   La partitura de muestra abierta en un atril: portada de la edición con los datos de la obra + páginas.
   Mobile first: base = celular; desde 600, 768 y 1024 px crece. Hover solo con @media (hover: hover).
   ========================================================= */
.czm-lector {
    --lec-fondo: #0d0d0f;
    --lec-barra: rgba(20, 20, 23, 0.92);
    --lec-linea: rgba(255, 255, 255, 0.1);
    --lec-linea-fuerte: rgba(255, 255, 255, 0.24);
    --lec-texto: #ececee;
    --lec-tenue: rgba(236, 236, 238, 0.62);
    --lec-oro: #c5a059;
    --lec-oro-claro: #e6cb97;
    --lec-vino: #874865;
    /* Papeles de color, casi blancos (pedido del dueño): terracota del catálogo (#c95c3f) y verde de "El Corazón de
       Cenzontle" en la portada (#307c56), muy aclarados para que la partitura se lea como en marfil */
    --lec-terracota: #f9ebe3;
    --lec-verde: #e8f1ec;
    /* El círculo para elegir cada papel: un poco más marcado que el papel, para que no se vean los cuatro iguales */
    --lec-muestra: #faf7ee;
    --lec-tinta: #161513;
    --lec-papel: #faf7ee;
    /* Botón "Al atril" (atril.js lo pinta; sus colores vienen de estas variables) */
    --ob-tinta: #ececee;
    --ob-linea: rgba(255, 255, 255, 0.3);
    /* "En tu atril" (ya está en el atril): terracota del catálogo con letras blancas (pedido del dueño; antes dorado) */
    --ob-activo-fondo: #c95c3f;
    --ob-activo-texto: #ffffff;

    position: fixed; inset: 0;
    /* Encima del botón de idioma (999999): el lector se agrega al final del <body>, así que gana el empate */
    z-index: 999999;
    display: flex; flex-direction: column;
    background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(216, 184, 126, 0.1) 0%, rgba(18, 18, 20, 0.98) 62%, #08080a 100%), var(--lec-fondo);
    color: var(--lec-texto);
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
    opacity: 0; transition: opacity .25s ease;
}
.czm-lector[hidden] { display: none; }
.czm-lector.is-abierto { opacity: 1; }
.czm-lector[data-papel="blanco"] { --lec-papel: #ffffff; --lec-muestra: #ffffff; }
/* Terracota y verde casi blancos (pidió el dueño; terracota en lugar de sepia). Se probó el terracota fuerte del
   catálogo con letras y partitura en blanco, pero la partitura perdía elegancia: ahora son tonos muy claros, con tinta
   y partitura negras como los demás. */
.czm-lector[data-papel="terracota"] { --lec-papel: var(--lec-terracota); --lec-muestra: #f3cfbf; }
.czm-lector[data-papel="verde"] { --lec-papel: var(--lec-verde); --lec-muestra: #cfe3d8; }
.czm-lector *, .czm-lector *::before, .czm-lector *::after { box-sizing: border-box; }
.czm-lector button { font-family: inherit; margin: 0; }
.czm-lector svg { display: block; flex-shrink: 0; }
.czm-lector :focus-visible { outline: 2px solid var(--lec-oro-claro); outline-offset: 2px; }

/* ---------- 1. Barra de arriba: obra + herramientas ---------- */
.czm-lector-barra {
    position: relative; z-index: 10; /* encima de la hoja: los tonos del papel se despliegan sobre ella */
    flex-shrink: 0; display: flex; align-items: center; gap: 10px;
    min-height: 60px; padding: 8px 8px 8px 16px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: var(--lec-barra);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--lec-linea);
}
.czm-lector-obra { flex: 1; min-width: 0; display: flex; align-items: center; }
/* Celular: el logo de Cenzontle en lugar del título de la obra (pedido del dueño: tanto título se veía de más).
   El logo es a color para fondo claro: aquí se pasa a blanco. El título se esconde solo a la vista (sigue siendo
   el nombre del visor para lectores de pantalla). Desde 768 px: el logo y al lado el título (sin "Edición Cenzontle"). */
.czm-lector-logo { display: block; flex-shrink: 0; width: 50px; height: 50px; margin: -4px 0 -4px -6px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.92; -webkit-user-drag: none; user-select: none; }
.czm-lector-obra-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.czm-lector .czm-lector-titulo {
    margin: 0; padding: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; font-weight: 600; line-height: 1.25; color: #ffffff;
}
.czm-lector-compositor {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--lec-oro);
}
.czm-lector-herr { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }

.czm-lector-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 44px; height: 44px; padding: 0 12px;
    border: 1px solid var(--lec-linea); border-radius: 22px;
    background: rgba(255, 255, 255, 0.05); color: var(--lec-texto);
    font-size: 0.66rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
    cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.czm-lector-btn svg { width: 18px; height: 18px; }
.czm-lector-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.czm-lector-btn[hidden] { display: none; }
.czm-lector-btn--icono { padding: 0; width: 44px; }
.czm-lector-btn[aria-pressed="true"] { background: var(--lec-oro); border-color: var(--lec-oro-claro); color: #121214; }
.czm-lector-btn-txt { display: none; }
.czm-lector-cerrar { background: #ffffff; border-color: #ffffff; color: #121214; }

/* Doble página: en celular y tablet siempre (solo el ícono; empieza apagado); en computadora, solo cuando cabe
   (lector.js le pone is-disponible) y con texto */
.czm-lector-doble { display: none; }
.czm-lector-doble.is-disponible { display: inline-flex; width: 44px; padding: 0; }

/* Tono del papel */
.czm-lector-papel { display: none; align-items: center; gap: 4px; height: 44px; padding: 0 8px; border: 1px solid var(--lec-linea); border-radius: 22px; background: rgba(0, 0, 0, 0.3); }
.czm-lector-tono { width: 26px; height: 26px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; transition: transform .2s, border-color .2s; }
.czm-lector-tono[data-tono="marfil"] { background: #faf7ee; }
.czm-lector-tono[data-tono="blanco"] { background: #ffffff; }
.czm-lector-tono[data-tono="terracota"] { background: #f3cfbf; }
.czm-lector-tono[data-tono="verde"] { background: #cfe3d8; }
.czm-lector-tono[aria-pressed="true"] { border-color: var(--lec-oro); box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.35); }

/* Celular: botón redondo con el color actual del papel; al tocarlo, los tres tonos aparecen a su izquierda, en la
   misma barra (pedido del dueño; antes se desplegaban hacia abajo, sobre la hoja) */
.czm-lector-tonos { position: relative; display: inline-flex; align-items: center; }
.czm-lector-tono-muestra { display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--lec-muestra); border: 2px solid var(--lec-oro); transition: background-color .3s ease; }
.czm-lector-tono-btn[aria-expanded="true"] { border-color: var(--lec-oro); background: rgba(197, 160, 89, 0.16); }
.czm-lector-papel.is-abierto {
    display: inline-flex; position: absolute; top: 50%; right: calc(100% + 8px); z-index: 20;
    gap: 8px; height: 46px; padding: 0 9px; transform: translateY(-50%);
    border-color: var(--lec-linea-fuerte); background: rgba(20, 20, 23, 0.98);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
    animation: czm-lector-tonos .18s ease-out both;
}
.czm-lector-papel.is-abierto .czm-lector-tono { width: 28px; height: 28px; } /* cuatro tonos: caben a la izquierda */
@keyframes czm-lector-tonos { from { opacity: 0; transform: translate(10px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }

/* ---------- 2. El escenario: el atril con la luz encima ---------- */
.czm-lector-escenario {
    position: relative; flex: 1; min-height: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    touch-action: none; /* los gestos (deslizar, pellizcar, doble toque) los maneja lector.js */
    -webkit-user-select: none; user-select: none;
}
.czm-lector-escenario.is-acercado { cursor: grab; }
.czm-lector-escenario.is-arrastrando { cursor: grabbing; }
.czm-lector-lampara {
    position: absolute; top: 0; left: 50%; width: 120%; height: 70%; transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 238, 204, 0.14) 0%, rgba(216, 184, 126, 0.04) 45%, transparent 72%);
    pointer-events: none;
}
.czm-lector-vista { position: relative; transform-origin: 50% 50%; will-change: transform; }
.czm-lector-vista.is-suave { transition: transform .22s ease-out; }

.czm-lector-pliego {
    position: relative; display: flex;
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.4);
    animation: czm-lector-entra .28s ease both;
}
.czm-lector-pliego.va-sig { animation-name: czm-lector-sig; }
.czm-lector-pliego.va-ant { animation-name: czm-lector-ant; }
@keyframes czm-lector-entra { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes czm-lector-sig { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes czm-lector-ant { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

/* Lomo de la partitura abierta (dos páginas) */
.czm-lector-pliego.is-doble::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 34px; transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.07) 30%, rgba(0,0,0,.24) 50%, rgba(0,0,0,.07) 70%, rgba(0,0,0,0) 100%);
    pointer-events: none; z-index: 3;
}

/* Cada página: medidas que pone lector.js (--lec-w, --lec-h) */
.czm-lector-hoja {
    position: relative; overflow: hidden; flex-shrink: 0;
    width: var(--lec-w, 300px); height: var(--lec-h, 424px);
    background: var(--lec-papel); color: var(--lec-tinta);
    transition: background-color .3s ease;
    container-type: size;
}
.czm-lector-pliego > .czm-lector-hoja:first-child { border-radius: 4px 0 0 4px; }
.czm-lector-pliego > .czm-lector-hoja:last-child { border-radius: 0 4px 4px 0; }
.czm-lector-pliego > .czm-lector-hoja:only-child { border-radius: 4px; }
.czm-lector-hoja img.czm-lector-img {
    display: block; width: 100%; height: 100%; object-fit: contain;
    mix-blend-mode: multiply; /* el blanco del escaneo toma el tono del papel */
    -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.czm-lector-hoja.is-cargando::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
    border: 3px solid rgba(22, 21, 19, 0.15); border-top-color: var(--lec-oro); border-radius: 50%;
    animation: czm-lector-gira .8s linear infinite;
}
@keyframes czm-lector-gira { to { transform: rotate(360deg); } }
.czm-lector-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 0.8rem; color: rgba(22, 21, 19, 0.6); }

/* Marca de agua: el sello de Cenzontle y "Ejemplar de muestra" */
.czm-lector-agua {
    position: absolute; top: 50%; left: 50%; width: 46cqw; height: 46cqw; transform: translate(-50%, -50%);
    background: url('https://cenzontlemusica.com/wp-content/uploads/2026/01/Logo-Cenzontle-Musica-EP_Cuadro.png') center / contain no-repeat;
    opacity: 0.1; mix-blend-mode: multiply; pointer-events: none; z-index: 2;
}
.czm-lector-agua-txt {
    position: absolute; left: 0; right: 0; bottom: 2.4cqh; text-align: center; pointer-events: none; z-index: 2;
    font-size: clamp(7px, 2.2cqw, 11px); font-weight: 700; letter-spacing: .25em; text-transform: uppercase;
    color: rgba(135, 72, 101, 0.42);
}
.czm-lector-num { position: absolute; top: 2.2cqh; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(8px, 2.6cqw, 13px); font-weight: 700; color: rgba(22, 21, 19, 0.55); z-index: 2; }
.czm-lector-num--izq { left: 4cqw; }
.czm-lector-num--der { right: 4cqw; }

/* ---------- La portada de la edición (datos de la obra) ---------- */
.czm-lector-ficha {
    position: absolute; inset: 5cqw; display: flex; flex-direction: column; align-items: center;
    padding: 7cqh 7cqw 5cqh; text-align: center;
    border: 1px solid rgba(22, 21, 19, 0.55);
    outline: 1px solid rgba(22, 21, 19, 0.25); outline-offset: -1.6cqw;
}
/* Nada se aplasta: antes, con un título largo y varios movimientos, la ficha encogía el título hasta dejar una
   rayita de letras. Si de verdad no cabe todo, solo los datos (la lista de abajo) ceden y se cortan al final. */
.czm-lector-ficha > * { flex-shrink: 0; }
.czm-lector-ficha > .czm-lector-ficha-datos { flex-shrink: 1; min-height: 0; overflow: hidden; }
.czm-lector-ficha-sello { font-size: clamp(7px, 2.3cqw, 11px); font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--lec-vino); }
.czm-lector-ficha-comp { margin-top: 7cqh; font-size: clamp(9px, 3.6cqw, 17px); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1.35; }
.czm-lector-ficha-titulo {
    margin: 2.4cqh 0 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
    font-size: clamp(15px, 8.2cqw, 46px); line-height: 1.12; color: var(--lec-tinta);
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.czm-lector-ficha-anio { margin-top: 1.6cqh; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: clamp(10px, 3.6cqw, 18px); color: rgba(22, 21, 19, 0.7); }
.czm-lector-ficha-adorno { width: 30cqw; margin: 4cqh 0; color: rgba(22, 21, 19, 0.5); }
.czm-lector-ficha-adorno svg { width: 100%; height: auto; }
.czm-lector-ficha-datos { display: flex; flex-direction: column; gap: 2cqh; width: 100%; margin: 0; }
.czm-lector-ficha-datos div { display: flex; flex-direction: column; gap: .4cqh; }
.czm-lector-ficha-datos dt { font-size: clamp(6px, 2.1cqw, 10px); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgba(22, 21, 19, 0.5); }
.czm-lector-ficha-datos dd { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(9px, 3.3cqw, 16px); line-height: 1.35; color: var(--lec-tinta); }
.czm-lector-ficha-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2cqw; margin-top: 3cqh; }
.czm-lector-ficha-cats span { padding: .5cqh 2cqw; border: 1px solid rgba(22, 21, 19, 0.3); border-radius: 99px; font-size: clamp(6px, 2cqw, 10px); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.czm-lector-ficha-mov { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.czm-lector-ficha-pie { margin-top: auto; padding-top: 3cqh; font-size: clamp(6px, 2cqw, 10px); font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgba(22, 21, 19, 0.45); }

/* Junto a la carátula (Mi atril): "Ficha de la obra" arriba y el título más chico, que ya está grande al lado */
/* Más compacta que la portada normal, para que quepan los datos (movimientos largos, varias categorías): sin el
   adorno (ya está en la carátula) y con menos aire entre renglones */
.czm-lector-hoja.is-tecnica .czm-lector-ficha { padding-top: 5.5cqh; padding-bottom: 4cqh; }
.czm-lector-hoja.is-tecnica .czm-lector-ficha-adorno { display: none; }
.czm-lector-hoja.is-tecnica .czm-lector-ficha-anio { margin-top: 1cqh; }
.czm-lector-hoja.is-tecnica .czm-lector-ficha-datos { margin-top: 3.5cqh; gap: 1.3cqh; }
.czm-lector-hoja.is-tecnica .czm-lector-ficha-cats { margin-top: 2.4cqh; }
.czm-lector-hoja.is-tecnica .czm-lector-ficha-ir { margin-top: 3cqh; }
.czm-lector-hoja.is-tecnica .czm-lector-ficha-pie { padding-top: 2cqh; }
.czm-lector-hoja.is-tecnica .czm-lector-ficha-comp { margin-top: 3.4cqh; font-size: clamp(8px, 3cqw, 14px); }

/* Fichas que no caben (lector.js, ajustarFicha: muchos movimientos, título largo, pantalla bajita): primero menos
   aire y letra un poco más chica (is-apretada); si aún no cabe, más chica, sin adorno y el título en dos renglones
   (is-muy-apretada). Van después de lo de arriba para ganarle. */
.czm-lector-hoja.is-apretada .czm-lector-ficha { padding-top: 5cqh; padding-bottom: 4cqh; }
.czm-lector-hoja.is-apretada .czm-lector-ficha-comp { margin-top: 3cqh; }
.czm-lector-hoja.is-apretada .czm-lector-ficha-titulo { font-size: clamp(12px, 6.4cqw, 34px); margin-top: 1.6cqh; }
.czm-lector-hoja.is-apretada .czm-lector-ficha-adorno { margin: 2.4cqh 0; }
.czm-lector-hoja.is-apretada .czm-lector-ficha-datos { gap: 1cqh; }
.czm-lector-hoja.is-apretada .czm-lector-ficha-datos dd { font-size: clamp(8px, 2.8cqw, 14px); line-height: 1.28; }
.czm-lector-hoja.is-apretada .czm-lector-ficha-cats { margin-top: 2cqh; }
.czm-lector-hoja.is-apretada .czm-lector-ficha-pie { padding-top: 2cqh; }
.czm-lector-hoja.is-muy-apretada .czm-lector-ficha-adorno { display: none; }
.czm-lector-hoja.is-muy-apretada .czm-lector-ficha-titulo { font-size: clamp(11px, 5.4cqw, 28px); -webkit-line-clamp: 2; }
.czm-lector-hoja.is-muy-apretada .czm-lector-ficha-anio { margin-top: 1cqh; }
.czm-lector-hoja.is-muy-apretada .czm-lector-ficha-datos { margin-top: 3cqh; }
.czm-lector-hoja.is-muy-apretada .czm-lector-ficha-datos dd { font-size: clamp(7px, 2.4cqw, 12px); line-height: 1.22; }
.czm-lector-hoja.is-muy-apretada .czm-lector-ficha-datos dt { font-size: clamp(6px, 1.8cqw, 9px); }
.czm-lector-hoja.is-muy-apretada .czm-lector-ficha-cats { margin-top: 1.6cqh; }
/* Hojas muy chicas (doble página en celular): fuera lo secundario */
.czm-lector-hoja.is-sin-extras .czm-lector-ficha-ir,
.czm-lector-hoja.is-sin-extras .czm-lector-ficha-pie { display: none; }
.czm-lector-hoja.is-minima .czm-lector-ficha-cats,
.czm-lector-hoja.is-minima .czm-lector-ficha-sello { display: none; }
.czm-lector-hoja.is-minima .czm-lector-ficha-comp { margin-top: 0; }

/* Ficha junto a la carátula (Mi atril): el título chico, un poco más grande que el nombre del compositor, en negrita
   y SIEMPRE completo (pedido del dueño: antes iba grande y en dos renglones con "…"). El más largo de la base tiene
   69 letras y cabe en dos renglones. Le gana a is-apretada / is-muy-apretada (un selector más). */
.czm-lector-hoja.is-tecnica .czm-lector-ficha .czm-lector-ficha-titulo {
    display: block; -webkit-line-clamp: unset; overflow: visible;
    margin-top: 1.4cqh; font-size: clamp(10px, 3.8cqw, 18px); font-weight: 700; line-height: 1.3;
}

/* Botón "Ver Partitura" dentro de la ficha (Mi atril, si la obra tiene partitura de muestra) */
.czm-lector .czm-lector-ficha-ir {
    display: inline-flex; align-items: center; gap: 1.8cqw; flex-shrink: 0;
    margin-top: 4cqh; padding: 1.7cqh 4.4cqw; border: 0; border-radius: 99px;
    background: var(--lec-tinta); color: var(--lec-papel);
    font-size: clamp(8px, 2.5cqw, 12px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.2;
    cursor: pointer; transition: background-color .2s ease, transform .2s ease;
}
.czm-lector .czm-lector-ficha-ir svg { width: clamp(11px, 3.4cqw, 17px); height: clamp(11px, 3.4cqw, 17px); }
.czm-lector .czm-lector-ficha-ir:focus-visible { outline: 2px solid var(--lec-vino); outline-offset: 3px; }

/* ---------- La carátula de la edición (Mi atril): la portada de la tarjeta del atril, en grande ---------- */
.czm-lector-portada {
    --lec-portada-oro: #b38b4d;
    position: absolute; inset: 6cqw; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 8cqh 8cqw 14cqh; text-align: center;
    border: 2px solid var(--lec-portada-oro);
    outline: 1px solid var(--lec-portada-oro); outline-offset: -2.4cqw;
}
.czm-lector-portada-comp { font-size: clamp(9px, 3.6cqw, 17px); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1.35; color: var(--lec-tinta); }
.czm-lector .czm-lector-portada-titulo {
    margin: 3cqh 0 0; padding: 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
    font-size: clamp(18px, 10cqw, 56px); line-height: 1.12; padding-bottom: .08em; color: var(--lec-portada-oro);
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.czm-lector .czm-lector-portada-titulo.es-largo { font-size: clamp(16px, 8.6cqw, 48px); }
.czm-lector .czm-lector-portada-titulo.es-muy-largo { font-size: clamp(14px, 7.4cqw, 42px); -webkit-line-clamp: 6; }
.czm-lector-portada-anio { margin-top: 2cqh; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: clamp(10px, 3.8cqw, 19px); color: rgba(22, 21, 19, 0.65); }
.czm-lector-portada-adorno { width: 30cqw; margin-top: 5cqh; color: var(--lec-portada-oro); }
.czm-lector-portada-adorno svg { width: 100%; height: auto; }
.czm-lector-portada-ed { position: absolute; left: 0; right: 0; bottom: 7cqh; font-size: clamp(7px, 2.3cqw, 11px); font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: rgba(22, 21, 19, 0.6); }
/* El cenzontle de la carátula, grande (pedido del dueño) y suave para que no estorbe a las letras */
.czm-lector-agua--portada { width: 78cqw; height: 78cqw; opacity: 0.08; animation: czm-lector-latido 2.7s ease-in-out infinite; }
/* Late como el de las portadas de Ediciones Recientes (cenHeartbeat en catalogo.css; aquí va su copia porque el
   visor también se abre en la página de cada compositor, que no carga catalogo.css) */
@keyframes czm-lector-latido {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.1); }
}
.czm-lector-mini-portada.is-portada { border-color: #b38b4d; color: #b38b4d; }


/* ---------- Flechas a los lados y zoom ---------- */
.czm-lector-pasar {
    position: absolute; top: 50%; z-index: 5; display: none; align-items: center; justify-content: center;
    width: 52px; height: 96px; transform: translateY(-50%); padding: 0;
    border: 1px solid var(--lec-linea); border-radius: 10px;
    background: rgba(22, 22, 26, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    color: #ffffff; cursor: pointer; opacity: .7; transition: opacity .2s, background .2s, border-color .2s, color .2s;
}
.czm-lector-pasar svg { width: 24px; height: 24px; }
.czm-lector-pasar:disabled { opacity: 0 !important; pointer-events: none; }
.czm-lector-pasar--ant { left: 16px; }
.czm-lector-pasar--sig { right: 16px; }

.czm-lector-zoom {
    position: absolute; right: 12px; bottom: 12px; z-index: 5; display: none; align-items: center; gap: 2px;
    padding: 4px; border: 1px solid var(--lec-linea); border-radius: 26px;
    background: rgba(22, 22, 26, 0.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.czm-lector-zoom button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--lec-texto); cursor: pointer; }
.czm-lector-zoom button svg { width: 18px; height: 18px; }
.czm-lector-zoom-val { min-width: 46px; text-align: center; font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--lec-oro-claro); }

/* Ayuda de gestos (celular): aparece al abrir y se va sola */
.czm-lector-ayuda {
    position: absolute; left: 50%; bottom: 14px; z-index: 5; width: max-content; max-width: calc(100% - 32px); margin: 0;
    padding: 8px 14px; border-radius: 18px; background: rgba(0, 0, 0, 0.72); color: #ffffff;
    font-size: 0.72rem; line-height: 1.35; text-align: center; pointer-events: none;
    transform: translateX(-50%); opacity: 0; transition: opacity .4s ease;
}
.czm-lector-ayuda.is-visible { opacity: 1; }

/* ---------- 3. Pie: páginas, miniaturas y acciones ---------- */
.czm-lector-pie {
    flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
    padding: 10px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--lec-barra); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--lec-linea);
}
.czm-lector-nav { display: flex; align-items: center; justify-content: center; gap: 4px; }
.czm-lector-nav button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--lec-texto); cursor: pointer; }
.czm-lector-nav button:disabled { opacity: .25; cursor: default; }
.czm-lector-nav button svg { width: 20px; height: 20px; }
.czm-lector-pag { min-width: 150px; text-align: center; font-size: 0.74rem; font-weight: 600; letter-spacing: .4px; font-variant-numeric: tabular-nums; color: #ffffff; }

.czm-lector-mini { display: none; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.czm-lector-mini-hoja {
    position: relative; flex: 0 0 auto; width: 44px; height: 62px; padding: 0; overflow: hidden;
    border: 2px solid transparent; border-radius: 3px; background: var(--lec-papel); cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); transition: transform .2s, border-color .2s;
}
.czm-lector-mini-hoja img { width: 100%; height: 100%; object-fit: cover; object-position: top; mix-blend-mode: multiply; pointer-events: none; }
.czm-lector-mini-hoja.is-activa { border-color: var(--lec-oro); transform: translateY(-2px); }
.czm-lector-mini-portada { position: absolute; inset: 3px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(22, 21, 19, 0.45); font-family: 'Playfair Display', Georgia, serif; font-size: 7px; font-weight: 700; line-height: 1.15; color: var(--lec-tinta); padding: 2px; overflow: hidden; }
.czm-lector-mini-n { position: absolute; right: 2px; bottom: 1px; font-size: 8px; font-weight: 700; color: rgba(22, 21, 19, 0.7); }

/* Celular: "Ver ficha" y "Al atril" en un renglón; "Solicitar esta obra" debajo, a todo lo ancho */
.czm-lector-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.czm-lector-acciones > * { min-width: 0; }
.czm-lector-acciones .czm-lector-btn { flex: 1 1 40%; }
.czm-lector-acciones .czm-lector-solicitar { flex-basis: 100%; }
.czm-lector-acciones .czm-obra-atril { flex: 1 1 40%; justify-content: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--lec-linea-fuerte); border-radius: 22px; text-decoration: none; font-size: 0.66rem; }
.czm-lector-acciones .czm-obra-atril[aria-pressed="true"] { padding: 0 14px; border-color: var(--ob-activo-fondo); }
.czm-lector-solicitar { background: var(--lec-oro); border-color: var(--lec-oro); color: #121214; }
.czm-lector-ver-ficha[hidden] { display: none; }
/* "Ver muestra de partitura" es largo: en pantallas angostas se parte en dos renglones en vez de cortarse con "…" */
.czm-lector-acciones .czm-lector-ver-ficha { white-space: normal; line-height: 1.2; }
.czm-lector-acciones .czm-lector-ver-ficha span { overflow: visible; text-align: left; }

@media (min-width: 600px) {
    .czm-lector-papel { display: inline-flex; }
    /* Aquí los tonos ya caben en la barra: sin el botón redondo, y aunque se hubieran desplegado en celular, en su lugar */
    .czm-lector-tono-btn { display: none; }
    .czm-lector-papel.is-abierto { position: static; transform: none; height: 44px; padding: 0 8px; gap: 4px; border-color: var(--lec-linea); background: rgba(0, 0, 0, 0.3); box-shadow: none; animation: none; }
    .czm-lector-papel.is-abierto .czm-lector-tono { width: 26px; height: 26px; }
    .czm-lector .czm-lector-titulo { font-size: 1.1rem; }
    .czm-lector-acciones .czm-lector-btn, .czm-lector-acciones .czm-obra-atril, .czm-lector-acciones .czm-lector-solicitar { flex: 0 0 auto; }
    .czm-lector-acciones { flex-wrap: nowrap; justify-content: center; }
}

@media (min-width: 768px) {
    /* Computadora: el logo y al lado el título de la obra (ya sin la etiqueta "Edición Cenzontle") */
    .czm-lector-logo { width: 52px; height: 52px; margin: -6px 0 -6px -8px; }
    .czm-lector-obra-txt { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .czm-lector-barra { min-height: 66px; padding: 10px 16px 10px 24px; gap: 16px; }
    .czm-lector-obra { gap: 14px; }
    .czm-lector-zoom { display: flex; }
    .czm-lector-pie { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-left: 24px; padding-right: 24px; }
    .czm-lector-mini.is-visible { display: flex; order: 3; flex-basis: 100%; }
    .czm-lector-acciones { justify-content: flex-end; }
    .czm-lector-ayuda { display: none; }
}

@media (min-width: 1024px) {
    .czm-lector-doble.is-disponible { width: auto; padding: 0 12px; }
    .czm-lector-btn-txt { display: inline; }
    .czm-lector-pasar { display: flex; }
    .czm-lector-zoom { bottom: 20px; right: 24px; }
    .czm-lector-mini.is-visible { order: 0; flex: 1; flex-basis: auto; justify-content: center; }
}

@media (hover: hover) {
    .czm-lector-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--lec-linea-fuerte); color: #ffffff; }
    .czm-lector-btn[aria-pressed="true"]:hover, .czm-lector-solicitar:hover { background: var(--lec-oro-claro); border-color: var(--lec-oro-claro); color: #121214; }
    .czm-lector-cerrar:hover { background: var(--lec-oro-claro); border-color: var(--lec-oro-claro); color: #121214; }
    .czm-lector-tono:hover { transform: scale(1.12); }
    .czm-lector-escenario:hover .czm-lector-pasar { opacity: .85; }
    .czm-lector-pasar:hover { opacity: 1; background: rgba(22, 22, 26, 0.95); border-color: var(--lec-oro); color: var(--lec-oro-claro); }
    .czm-lector-zoom button:hover, .czm-lector-nav button:not(:disabled):hover { background: rgba(255, 255, 255, 0.14); }
    .czm-lector-mini-hoja:hover { transform: translateY(-3px); }
    .czm-lector-acciones .czm-obra-atril:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, 0.1); }
    .czm-lector .czm-lector-ficha-ir:hover { background: var(--lec-vino); transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
    .czm-lector, .czm-lector-vista.is-suave { transition: none; }
    .czm-lector-pliego, .czm-lector-pliego.va-sig, .czm-lector-pliego.va-ant, .czm-lector-agua--portada { animation: none; }
}

/* Mientras el lector está abierto, la página de atrás no se desplaza */
html.czm-lector-abierto, html.czm-lector-abierto body { overflow: hidden !important; }
