/* ═══════════════════════════════════════════════════════════════
   CDA · Casa de Alabanza Radio-TV — Sistema de diseño v2
   "Santuario moderno" · móvil-primero · PWA
   ═══════════════════════════════════════════════════════════════ */

/* ── Fuentes autohospedadas (latin, variables) ── */
@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/fraunces-var-regular.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/fraunces-var-italic.woff2') format('woff2');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Sans';
    src: url('/fonts/dmsans-var-regular.woff2') format('woff2');
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ── */
:root {
    /* Oro */
    --gold: #c9a45c;
    --gold-bright: #e3bf7a;
    --gold-deep: #a8813c;
    --gold-light: #e8d5a8;
    --gold-glow: rgba(201, 164, 92, .16);

    /* Zona oscura (navy) */
    --navy-950: #090f20;
    --navy-900: #0e1930;
    --navy-800: #14213f;
    --navy-700: #1e2d4d;
    --navy-600: #2b3d63;
    --on-navy: #f4efe6;
    --on-navy-dim: rgba(244, 239, 230, .62);
    --on-navy-faint: rgba(244, 239, 230, .38);

    /* Zona clara (crema) */
    --cream: #faf7f1;
    --cream-2: #f2ede2;
    --surface: #ffffff;
    --ink: #26221a;
    --ink-2: #6f6759;
    --ink-3: #a59b8a;
    --line: rgba(38, 34, 26, .09);

    /* Semánticos */
    --live: #e05a4e;
    --ok: #7c9a6e;
    --danger: #c75c5c;

    /* Forma */
    --radius-lg: 24px;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow-1: 0 2px 10px rgba(24, 18, 6, .05), 0 10px 34px rgba(24, 18, 6, .07);
    --shadow-2: 0 6px 18px rgba(24, 18, 6, .09), 0 20px 60px rgba(24, 18, 6, .13);
    --shadow-gold: 0 8px 28px rgba(201, 164, 92, .35);
    --ease: cubic-bezier(.22, .8, .36, 1);

    /* Tipografía */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

    /* Métricas de app */
    --nav-h: 60px;
    --bottomnav-h: 62px;
    --sa-b: env(safe-area-inset-bottom, 0px);

    /* ── Aliases legacy (vistas viejas + admin dependen de estos) ── */
    --dark: var(--navy-700);
    --dark-warm: #263a5e;
    --dark-card: #22335a;
    --cream-dark: var(--cream-2);
    --text: #3d3830;
    --text-light: #8a8279;
    --text-muted: #b5aea3;
    --accent: var(--ok);
    --shadow: var(--shadow-1);
    --shadow-hover: var(--shadow-2);
}

/* ── Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100dvh;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: var(--font-body); }
::selection { background: rgba(201, 164, 92, .28); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* Scrollbar sutil (desktop) */
@media (hover: hover) {
    ::-webkit-scrollbar { width: 10px; height: 8px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(38, 34, 26, .18); border-radius: 8px; border: 2px solid var(--cream); }
}

/* ═══ NAVBAR ═══ */
.nav {
    position: sticky; top: 0; z-index: 200;
    height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
    background: rgba(11, 18, 37, .88);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    border-bottom: 1px solid rgba(201, 164, 92, .16);
}
.nav .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.nav .brand-mark {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, var(--gold-bright), var(--gold-deep));
    color: #1a2440;
    box-shadow: 0 2px 10px rgba(201, 164, 92, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.nav .brand-text { min-width: 0; }
.nav .brand-text .name {
    font-family: var(--font-display); font-weight: 620; font-size: 1.02rem;
    color: #fff; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap;
}
.nav .brand-text .tagline {
    font-size: .56rem; color: var(--gold-light); text-transform: uppercase;
    letter-spacing: 2.2px; font-weight: 600; margin-top: 2px; white-space: nowrap;
}
@media (max-width: 350px) { .nav .brand-text .tagline { display: none; } }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    color: rgba(255, 255, 255, .64); text-decoration: none; font-size: .85rem;
    padding: 8px 14px; border-radius: 9px; transition: all .22s var(--ease); font-weight: 500;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav .badge {
    background: var(--gold); color: var(--navy-900); padding: 4px 12px; border-radius: 20px;
    font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.nav .user-name { color: rgba(255, 255, 255, .5); font-size: .82rem; }
.nav .btn-logout {
    color: rgba(255, 255, 255, .45); background: none; border: 1px solid rgba(255, 255, 255, .14);
    padding: 6px 14px; border-radius: 9px; font-size: .78rem; cursor: pointer; transition: all .2s;
}
.nav .btn-logout:hover { border-color: rgba(255, 255, 255, .32); color: rgba(255, 255, 255, .75); }
.nav .btn-cta {
    background: var(--gold); color: var(--navy-900); padding: 8px 18px; border-radius: 10px;
    font-size: .84rem; font-weight: 700; text-decoration: none; transition: all .22s var(--ease);
}
.nav .btn-cta:hover { background: var(--gold-bright); transform: translateY(-1px); box-shadow: var(--shadow-gold); }

/* Hamburguesa */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 10px; margin-right: -6px; }
.hamburger span { display: block; width: 21px; height: 2px; background: #fff; margin: 4.5px 0; transition: all .3s var(--ease); border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
        background: rgba(11, 18, 37, .97);
        -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
        flex-direction: column; align-items: stretch; padding: 10px 14px 16px; gap: 2px;
        border-bottom: 1px solid rgba(201, 164, 92, .18);
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    }
    .nav-links.open { display: flex; animation: navDrop .25s var(--ease); }
    .nav-links a { padding: 13px 16px; font-size: .95rem; }
    .nav .badge { align-self: flex-start; margin: 6px 16px 0; }
    .nav .user-name { padding: 10px 16px 0; }
    .nav .btn-logout { margin: 8px 16px 4px; }
    .nav .btn-cta { margin: 8px 16px 4px; text-align: center; }
}
@keyframes navDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (min-width: 769px) {
    .nav { padding: 0 32px; }
}

/* ═══ CONTENEDOR / SECCIONES ═══ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 18px; }

.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-header h2 {
    font-family: var(--font-display); font-weight: 600; font-size: 1.42rem;
    color: var(--ink); letter-spacing: -.015em; line-height: 1.15;
}
.section-header h2 span { color: var(--gold-deep); font-style: italic; }
.section-header .dia-label { font-size: .78rem; color: var(--ink-3); font-weight: 500; white-space: nowrap; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: .64rem; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase;
    color: var(--gold-deep);
}

/* ═══ BOTONES ═══ */
.btn {
    padding: 12px 26px; border-radius: var(--radius-sm); font-size: .88rem; cursor: pointer;
    font-weight: 600; border: none; transition: all .22s var(--ease); text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-gold { background: linear-gradient(140deg, var(--gold-bright), var(--gold)); color: var(--navy-900); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid rgba(38, 34, 26, .16); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-dark { background: var(--navy-700); color: #fff; }
.btn-dark:hover { background: var(--navy-600); }

/* ═══ TARJETAS ═══ */
.card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow-1);
}

/* ═══ BADGES DE ESTADO ═══ */
.badge-live {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 13px; border-radius: 30px;
    background: rgba(224, 90, 78, .14); border: 1px solid rgba(224, 90, 78, .35);
    color: #ff8d80; font-size: .68rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
}
.badge-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px var(--live); animation: pulseDot 1.6s ease-in-out infinite; }
.badge-247 {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 13px; border-radius: 30px;
    background: rgba(201, 164, 92, .13); border: 1px solid rgba(201, 164, 92, .32);
    color: var(--gold-light); font-size: .68rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
}
.badge-247 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(201, 164, 92, .8); }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }

/* ═══ FOOTER ═══ */
.footer {
    background: var(--navy-950); color: var(--on-navy-faint);
    padding: 46px 24px calc(40px + var(--sa-b));
    margin-top: 64px; text-align: center; font-size: .82rem;
    border-top: 1px solid rgba(201, 164, 92, .12);
}
.footer .verse {
    font-family: var(--font-display); font-style: italic; font-weight: 500;
    color: var(--gold-light); font-size: 1.08rem; margin-bottom: 6px; letter-spacing: .01em;
}
.footer .verse-ref { color: var(--on-navy-dim); font-size: .78rem; }
.footer .foot-divider { width: 34px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 22px auto; border: none; opacity: .7; }
.footer .copy { font-size: .73rem; }

/* ═══ BOTTOM NAV (app móvil / PWA) ═══ */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
    display: none;
    align-items: stretch; justify-content: space-around;
    height: calc(var(--bottomnav-h) + var(--sa-b));
    padding: 0 4px var(--sa-b);
    background: rgba(10, 17, 35, .93);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    backdrop-filter: blur(20px) saturate(1.5);
    border-top: 1px solid rgba(201, 164, 92, .16);
}
.bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: rgba(244, 239, 230, .52); text-decoration: none;
    font-size: .58rem; font-weight: 600; letter-spacing: .4px;
    transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.bn-item:active { color: var(--gold-light); }
.bn-item.active { color: var(--gold); }
.bn-fab-wrap { flex: 1.15; display: flex; align-items: flex-start; justify-content: center; }
.bn-fab {
    position: relative; width: 58px; height: 58px; margin-top: -20px; border-radius: 50%;
    border: none; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
    color: var(--navy-900);
    box-shadow: 0 0 0 5px rgba(10, 17, 35, .93), 0 8px 26px rgba(201, 164, 92, .5);
    transition: transform .18s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.bn-fab:active { transform: scale(.92); }
.bn-fab .icon { margin-left: 2px; }
.bn-fab .icon-pause-solid { margin-left: 0; display: none; }
.bn-fab .bn-spinner { display: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(14,25,48,.22); border-top-color: var(--navy-900); animation: spin .8s linear infinite; }
.bn-fab.playing .icon-play-solid { display: none; }
.bn-fab.playing .icon-pause-solid { display: block; }
.bn-fab.connecting .icon-play-solid, .bn-fab.connecting .icon-pause-solid { display: none; }
.bn-fab.connecting .bn-spinner { display: block; }
.bn-fab .bn-ring { position: absolute; inset: -7px; border-radius: 50%; border: 2px solid rgba(201, 164, 92, .45); opacity: 0; pointer-events: none; }
.bn-fab.playing .bn-ring { animation: ringPulse 2.2s ease-out infinite; }

@media (max-width: 768px) {
    body.has-bottomnav { padding-bottom: calc(var(--bottomnav-h) + var(--sa-b)); }
    body.has-bottomnav .bottom-nav { display: flex; }
    body.has-bottomnav .footer { padding-bottom: 40px; }
    /* Elementos flotantes suben sobre la barra */
    body.has-bottomnav .chat-fab { bottom: calc(var(--bottomnav-h) + var(--sa-b) + 14px) !important; }
    body.has-bottomnav .chat-panel { bottom: calc(var(--bottomnav-h) + var(--sa-b) + 88px) !important; }
    body.has-bottomnav #installBanner { bottom: calc(var(--bottomnav-h) + var(--sa-b)) !important; border-radius: 0; }
}

/* Toast del radio (páginas sin hero-player) */
#radioToast {
    position: fixed; left: 50%; transform: translateX(-50%) translateY(16px);
    bottom: calc(var(--bottomnav-h) + var(--sa-b) + 18px); z-index: 400;
    background: rgba(14, 22, 44, .96); color: #ffb3a7;
    border: 1px solid rgba(255, 179, 167, .25);
    padding: 11px 20px; border-radius: 30px; font-size: .8rem; font-weight: 500;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
    opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
    max-width: calc(100vw - 40px); text-align: center;
}
#radioToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 769px) { #radioToast { bottom: 28px; } }

/* ═══ BIBLIOTECA ═══ */
.bib-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 18px 10px; }
.bib-breadcrumb { font-size: .74rem; color: var(--ink-3); margin-bottom: 16px; }
.bib-breadcrumb a { color: var(--gold-deep); text-decoration: none; font-weight: 500; }
.bib-breadcrumb .sep { margin: 0 6px; opacity: .6; }

/* Hero destacado */
.bib-hero {
    display: grid; border-radius: var(--radius-lg); overflow: hidden;
    background: linear-gradient(155deg, var(--navy-800), var(--navy-700));
    box-shadow: var(--shadow-2); margin-bottom: 28px;
}
.bib-hero-media { position: relative; display: block; padding-top: 52%; background: var(--navy-800); }
.bib-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bib-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,25,48,.55), transparent 45%); }
.bib-hero-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(201, 164, 92, .92); color: var(--navy-900);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .45); transition: transform .25s var(--ease);
}
.bib-hero-media:hover .bib-hero-play { transform: translate(-50%, -50%) scale(1.08); }
.bib-hero-body { padding: 20px 22px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bib-chip {
    display: inline-block; font-size: .64rem; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700;
    color: var(--gold-light); background: rgba(201, 164, 92, .14); border: 1px solid rgba(201, 164, 92, .3);
    padding: 4px 12px; border-radius: 20px;
}
.bib-hero-title {
    font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: #fff; line-height: 1.3; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bib-hero-meta { display: flex; align-items: center; gap: 14px; font-size: .76rem; color: var(--on-navy-dim); }
.bib-hero-cta {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
    background: linear-gradient(140deg, var(--gold-bright), var(--gold)); color: var(--navy-900);
    font-size: .85rem; font-weight: 700; padding: 11px 24px; border-radius: var(--radius-sm);
    text-decoration: none; transition: all .22s var(--ease);
}
.bib-hero-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
@media (min-width: 769px) {
    .bib-hero { grid-template-columns: 1.25fr 1fr; }
    .bib-hero-media { padding-top: 0; min-height: 300px; }
    .bib-hero-body { justify-content: center; padding: 32px 34px; }
    .bib-hero-title { font-size: 1.55rem; }
}

/* Filtros + buscador */
.bib-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.bib-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.bib-chip-btn {
    font-size: .76rem; font-weight: 600; padding: 8px 16px; border-radius: 30px; text-decoration: none;
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
    transition: all .2s var(--ease); white-space: nowrap;
}
.bib-chip-btn:hover { border-color: rgba(201, 164, 92, .5); color: var(--gold-deep); }
.bib-chip-btn.active { background: linear-gradient(140deg, var(--gold-bright), var(--gold)); color: var(--navy-900); border-color: transparent; box-shadow: 0 4px 14px rgba(201, 164, 92, .3); }
.bib-search { position: relative; display: flex; }
.bib-search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.bib-search input {
    font-size: .84rem; padding: 10px 14px 10px 38px; width: 180px;
    border: 1px solid var(--line); border-radius: 30px; background: var(--surface); color: var(--ink);
    transition: all .25s var(--ease); font-family: var(--font-body);
}
.bib-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-glow); width: 210px; }
.bib-search input::placeholder { color: var(--ink-3); }
@media (max-width: 600px) { .bib-search, .bib-search input { width: 100%; } .bib-search input:focus { width: 100%; } }

/* Filas carrusel */
.bib-row { margin-bottom: 30px; }
.bib-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bib-row-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--ink); margin: 0; letter-spacing: -.01em; }
.bib-row-link { font-size: .76rem; font-weight: 600; color: var(--gold-deep); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.bib-row-link:hover { text-decoration: underline; }
.bib-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 12px; -webkit-overflow-scrolling: touch; }
.bib-scroll::-webkit-scrollbar { height: 4px; }
.bib-scroll::-webkit-scrollbar-thumb { background: rgba(201, 164, 92, .35); border-radius: 4px; }

/* Tarjeta episodio */
.bib-card { scroll-snap-align: start; width: 176px; min-width: 176px; text-decoration: none; transition: transform .22s var(--ease); }
.bib-grid .bib-card { width: auto; min-width: 0; }
.bib-card:hover { transform: translateY(-4px); }
.bib-card-media {
    position: relative; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden;
    background: linear-gradient(150deg, var(--navy-800) 0%, var(--navy-600) 70%, #3d5079 100%);
    box-shadow: var(--shadow-1);
}
.bib-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.bib-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.bib-ph .bib-ph-ini { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.5rem; color: rgba(232, 213, 168, .9); }
.bib-ph .icon { color: rgba(201, 164, 92, .55); }
.bib-card-overlay { position: absolute; inset: 0; z-index: 2; background: rgba(10, 17, 35, .28); opacity: 0; transition: opacity .2s; display: flex; align-items: center; justify-content: center; }
.bib-card:hover .bib-card-overlay { opacity: 1; }
.bib-card-overlay .bib-mini-play {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(201, 164, 92, .95); color: var(--navy-900);
    display: flex; align-items: center; justify-content: center;
}
.bib-card-dur { position: absolute; bottom: 6px; right: 6px; z-index: 2; font-size: .62rem; font-weight: 600; background: rgba(10, 17, 35, .82); color: var(--on-navy); padding: 2px 7px; border-radius: 5px; }
.bib-card-body { padding: 9px 3px 0; }
.bib-card-title { font-size: .8rem; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bib-card-prog { font-size: .68rem; font-weight: 600; color: var(--gold-deep); margin: 4px 0 0; }
.bib-card-date { font-size: .64rem; color: var(--ink-3); margin: 2px 0 0; }

/* Grid paginado */
.bib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 26px; }
.bib-pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 30px; font-size: .8rem; }
.bib-pager a { color: var(--gold-deep); font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 30px; border: 1px solid var(--line); background: var(--surface); transition: all .2s; }
.bib-pager a:hover { border-color: var(--gold); }
.bib-pager .off { color: var(--ink-3); opacity: .5; padding: 8px 14px; }
.bib-pager .pg { color: var(--ink-2); padding: 8px 6px; }

/* Página episodio */
.bib-show-title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--ink); line-height: 1.35; margin: 0 0 6px; letter-spacing: -.01em; }
.bib-show-date { font-size: .82rem; color: var(--ink-3); }
.bib-prevnext { display: flex; justify-content: space-between; gap: 14px; margin: 26px 0 34px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bib-prevnext a { font-size: .8rem; font-weight: 600; color: var(--gold-deep); text-decoration: none; }
.bib-prevnext a:hover { text-decoration: underline; }
.bib-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: var(--navy-900); box-shadow: var(--shadow-2); }
.bib-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.bib-audio-box { margin-top: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-1); }
.bib-audio-box p { font-size: .74rem; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.bib-audio-box .icon { color: var(--gold-deep); }
.bib-audio-box audio { width: 100%; height: 36px; }

/* ═══ PWA: banner instalar + hint iOS ═══ */
.pwa-banner {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    background: rgba(13, 21, 42, .97);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid rgba(201, 164, 92, .3);
    padding: 13px 16px calc(13px + var(--sa-b));
    animation: bannerUp .35s var(--ease);
}
@keyframes bannerUp { from { transform: translateY(100%); } to { transform: none; } }
.pwa-banner-inner { max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 13px; }
.pwa-banner-icon { width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0; box-shadow: 0 4px 14px rgba(201, 164, 92, .35); }
.pwa-banner-t { flex: 1; min-width: 0; }
.pwa-banner-t strong { display: block; font-size: .86rem; color: #fff; font-weight: 600; }
.pwa-banner-t span { display: block; font-size: .71rem; color: var(--on-navy-dim); margin-top: 1px; line-height: 1.45; }
.pwa-banner-t .ios-share-glyph { display: inline-block; vertical-align: -3px; color: var(--gold-light); }
.pwa-banner .btn-inst {
    background: linear-gradient(140deg, var(--gold-bright), var(--gold)); color: var(--navy-900);
    font-weight: 700; font-size: .8rem; padding: 10px 18px; border-radius: 10px; border: none;
    cursor: pointer; white-space: nowrap; font-family: var(--font-body);
}
.pwa-banner .btn-x { background: none; border: none; color: var(--on-navy-faint); cursor: pointer; padding: 6px; display: flex; }

/* ═══ ANIMACIONES BASE ═══ */
.fade-up { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ringPulse { 0% { transform: scale(.94); opacity: .8; } 100% { transform: scale(1.28); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}
