/* ═══════════════════════════════════════════════════════════════
   PANEL V2 (beta, aditivo/removible) — "El Archivo"
   Estética: Editorial Luminoso. TODO scopeado bajo .pv2 para no
   filtrar al resto del sitio (oscuro). Borrar este archivo + sus
   líneas en index.html + el bloque CodexV2 en app.js devuelve la
   app al panel v1 sin cambios.
   ═══════════════════════════════════════════════════════════════ */

/* Fondo claro de página solo mientras el panel v2 está montado */
body.pv2-active {
    background: #fdfdfb !important;
    background-attachment: scroll !important;
    color: #1a1a1a;
}
body.pv2-active .noise-overlay { display: none !important; }
/* Scrollbar de ventana en claro mientras v2 está activo */
html.pv2-active::-webkit-scrollbar,
html.pv2-active::-webkit-scrollbar-track { background: #f1ece1 !important; }
html.pv2-active::-webkit-scrollbar-thumb {
    background: #d8cfbb !important; border: 3px solid #f1ece1 !important; border-radius: 6px;
}

/* ── Tokens locales (tema claro) ── */
.pv2 {
    --pv2-bg: #fdfdfb;
    --pv2-surface: #ffffff;
    --pv2-cream: #f7f4ec;
    --pv2-cream-2: #f1ece1;
    --pv2-ink: #1a1714;
    --pv2-ink-soft: #6b6358;
    --pv2-ink-faint: #9a9183;
    --pv2-line: #e9e2d4;
    --pv2-line-soft: #f0ebe0;
    --pv2-gold: #b08642;
    --pv2-gold-soft: #c7a56b;
    --pv2-cool: #2f8aa6;
    --pv2-shadow: 0 1px 2px rgba(40,30,15,.04), 0 8px 24px -10px rgba(40,30,15,.14);
    --pv2-shadow-lg: 0 2px 4px rgba(40,30,15,.05), 0 20px 50px -18px rgba(40,30,15,.22);
    --pv2-radius: 16px;
    --pv2-radius-sm: 11px;
    --pv2-font-display: 'Playfair Display', Georgia, serif;
    --pv2-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    position: relative;
    min-height: 100vh;
    background: var(--pv2-bg);
    color: var(--pv2-ink);
    font-family: var(--pv2-font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}
.pv2 *, .pv2 *::before, .pv2 *::after { box-sizing: border-box; }
.pv2 ::selection { background: rgba(176,134,66,.18); }

/* Textura de fondo muy sutil (papel cálido) */
.pv2::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(1100px 600px at 88% -8%, rgba(199,165,107,.10), transparent 60%),
        radial-gradient(900px 600px at -5% 8%, rgba(47,138,166,.06), transparent 55%);
}
.pv2-shell { position: relative; z-index: 1; }

/* ── Tipografía base ── */
.pv2 h1, .pv2 h2, .pv2 h3, .pv2 h4 { font-family: var(--pv2-font-display); font-weight: 700; color: var(--pv2-ink); margin: 0; letter-spacing: -.01em; }
.pv2 p { margin: 0; }
.pv2 button { font-family: inherit; cursor: pointer; }
.pv2 img { display: block; max-width: 100%; }
.pv2-eyebrow {
    font-family: var(--pv2-font-body); font-size: .7rem; font-weight: 700;
    letter-spacing: .22em; text-transform: uppercase; color: var(--pv2-gold);
}

/* ── Header claro ── */
.pv2-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(253,253,251,.82);
    backdrop-filter: saturate(1.2) blur(14px);
    -webkit-backdrop-filter: saturate(1.2) blur(14px);
    border-bottom: 1px solid var(--pv2-line);
}
.pv2-header-inner {
    max-width: 1120px; margin: 0 auto; padding: 14px 28px;
    display: flex; align-items: center; gap: 16px;
}
.pv2-brand { display: flex; align-items: baseline; gap: 10px; }
.pv2-brand-mark { font-family: var(--pv2-font-display); font-size: 1.4rem; font-weight: 800; letter-spacing: .02em; }
.pv2-brand-tag { font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--pv2-ink-faint); }
.pv2-beta-pill {
    font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--pv2-gold); background: rgba(176,134,66,.1); border: 1px solid rgba(176,134,66,.28);
    padding: 3px 8px; border-radius: 999px;
}
.pv2-header-spacer { flex: 1; }
.pv2-back {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    background: transparent; border: 1px solid var(--pv2-line); color: var(--pv2-ink-soft);
    font-size: .82rem; font-weight: 600; transition: all .18s ease;
}
.pv2-back:hover { border-color: var(--pv2-gold-soft); color: var(--pv2-ink); background: var(--pv2-cream); }
.pv2-avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, #f2ead8, #e7d9bd); color: var(--pv2-gold);
    font-weight: 700; font-size: .95rem; border: 1px solid var(--pv2-line); overflow: hidden;
}
.pv2-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Layout general ── */
.pv2-shell { max-width: 1120px; margin: 0 auto; padding: 30px 28px 90px; }
.pv2-block { margin-top: 40px; }
.pv2-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pv2-block-title { font-size: 1.5rem; }
.pv2-block-sub { font-size: .82rem; color: var(--pv2-ink-soft); }

.pv2-panel {
    background: var(--pv2-surface); border: 1px solid var(--pv2-line);
    border-radius: var(--pv2-radius); box-shadow: var(--pv2-shadow);
}

/* ═══════════════ HERO — Leyendo ahora ═══════════════ */
.pv2-hero {
    display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; margin-top: 26px;
}
.pv2-hero-reading {
    position: relative; overflow: hidden; padding: 30px;
    display: flex; gap: 26px; align-items: center;
    background:
        linear-gradient(180deg, #ffffff, #fffdf8);
    border: 1px solid var(--pv2-line); border-radius: var(--pv2-radius); box-shadow: var(--pv2-shadow-lg);
}
.pv2-hero-reading::after {
    content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(199,165,107,.16), transparent 70%); pointer-events: none;
}
.pv2-hero-cover-wrap { position: relative; flex-shrink: 0; }
.pv2-hero-cover {
    width: 168px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px;
    box-shadow: 0 2px 6px rgba(30,20,10,.12), 0 26px 50px -20px rgba(30,20,10,.5);
}
.pv2-hero-meta { min-width: 0; }
.pv2-hero-reading-badge {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px;
    font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pv2-gold);
}
.pv2-hero-reading-badge::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pv2-gold);
    box-shadow: 0 0 0 4px rgba(176,134,66,.16); animation: pv2-pulse 2.4s ease-in-out infinite;
}
@keyframes pv2-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.pv2-hero-title { font-size: 1.85rem; line-height: 1.12; margin-bottom: 6px; }
.pv2-hero-author { font-size: .98rem; color: var(--pv2-ink-soft); margin-bottom: 18px; }
.pv2-hero-author em { font-style: italic; }
.pv2-progress { margin-top: 6px; }
.pv2-progress-track { height: 7px; border-radius: 999px; background: var(--pv2-cream-2); overflow: hidden; }
.pv2-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pv2-gold-soft), var(--pv2-gold)); }
.pv2-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.pv2-progress-label { font-size: .76rem; color: var(--pv2-ink-faint); }
.pv2-progress-edit {
    border: 1px solid var(--pv2-line); background: var(--pv2-surface); color: var(--pv2-ink-soft);
    border-radius: 999px; padding: 4px 11px; font-size: .72rem; font-weight: 600;
}
.pv2-progress-edit:hover { border-color: var(--pv2-gold-soft); color: var(--pv2-ink); }

.pv2-hero-empty { flex-direction: column; text-align: center; justify-content: center; gap: 14px; color: var(--pv2-ink-soft); }
.pv2-hero-empty svg { color: var(--pv2-gold-soft); }
.pv2-hero-empty-title { font-family: var(--pv2-font-display); font-size: 1.5rem; color: var(--pv2-ink); }

/* Identidad + media Codex */
.pv2-identity {
    display: flex; flex-direction: column; padding: 26px;
    background: linear-gradient(165deg, #1d1a16, #2a251d);
    border: 1px solid #2a251d; border-radius: var(--pv2-radius);
    box-shadow: var(--pv2-shadow-lg); color: #f3ecdd; overflow: hidden; position: relative;
}
.pv2-identity::after {
    content: ""; position: absolute; left: -60px; bottom: -90px; width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(199,165,107,.2), transparent 70%); pointer-events: none;
}
.pv2-identity-top { display: flex; align-items: center; gap: 14px; }
.pv2-identity-avatar {
    width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(135deg, #c7a56b, #8d6f47); color: #1d1a16; font-weight: 800; font-size: 1.25rem; overflow: hidden;
}
.pv2-identity-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pv2-identity-name { font-family: var(--pv2-font-display); font-size: 1.3rem; color: #fff; line-height: 1.1; }
.pv2-identity-since { font-size: .72rem; color: #b6ab93; letter-spacing: .04em; margin-top: 2px; }
.pv2-avg { margin-top: auto; padding-top: 22px; }
.pv2-avg-label { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: #b6ab93; }
.pv2-avg-row { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.pv2-avg-num { font-family: var(--pv2-font-display); font-size: 3.6rem; font-weight: 800; line-height: .9; letter-spacing: -.02em; }
.pv2-avg-max { font-size: 1.1rem; color: #8c826d; font-weight: 600; }
.pv2-avg-foot { font-size: .76rem; color: #b6ab93; margin-top: 8px; }
.pv2-avg-foot strong { color: #e7d9bd; font-weight: 600; }

/* ═══════════════ STATS strip ═══════════════ */
.pv2-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.pv2-stat {
    background: var(--pv2-surface); border: 1px solid var(--pv2-line); border-radius: var(--pv2-radius-sm);
    padding: 20px; box-shadow: var(--pv2-shadow); position: relative; overflow: hidden;
}
.pv2-stat-num { font-family: var(--pv2-font-display); font-size: 2.5rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.pv2-stat-label { font-size: .8rem; color: var(--pv2-ink-soft); margin-top: 7px; }
.pv2-stat-sub { font-size: .72rem; color: var(--pv2-ink-faint); margin-top: 2px; }
.pv2-stat-ico { position: absolute; right: 14px; top: 14px; color: var(--pv2-line); }

/* ═══════════════ PALADAR (géneros / ADN / histograma) ═══════════════ */
.pv2-palate { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pv2-card-pad { padding: 26px; }
.pv2-card-pad .pv2-eyebrow { display: block; margin-bottom: 16px; }

/* Donut */
.pv2-donut-wrap { display: flex; align-items: center; gap: 22px; }
.pv2-donut { flex-shrink: 0; }
.pv2-donut-center-num { font-family: var(--pv2-font-display); font-size: 1.7rem; font-weight: 800; fill: var(--pv2-ink); }
.pv2-donut-center-lbl { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; fill: var(--pv2-ink-faint); }
.pv2-legend { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.pv2-legend-item { display: flex; align-items: center; gap: 9px; font-size: .84rem; }
.pv2-legend-dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.pv2-legend-name { color: var(--pv2-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv2-legend-val { margin-left: auto; color: var(--pv2-ink-soft); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ADN */
.pv2-dna-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin-bottom: 13px; }
.pv2-dna-name { font-size: .86rem; color: var(--pv2-ink); }
.pv2-dna-pct { font-size: .8rem; color: var(--pv2-ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.pv2-dna-track { grid-column: 1/-1; height: 8px; border-radius: 999px; background: var(--pv2-cream-2); overflow: hidden; }
.pv2-dna-fill { height: 100%; border-radius: 999px; }
.pv2-note { font-size: .76rem; color: var(--pv2-ink-faint); margin-top: 4px; font-style: italic; }

/* Histograma de notas */
.pv2-hist { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.pv2-hist-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.pv2-hist-bar { width: 100%; border-radius: 7px 7px 3px 3px; min-height: 4px; transition: height .3s ease; position: relative; }
.pv2-hist-count { font-size: .76rem; font-weight: 700; color: var(--pv2-ink); }
.pv2-hist-band { font-size: .68rem; color: var(--pv2-ink-faint); font-variant-numeric: tabular-nums; }

/* ═══════════════ MÉTRICAS de comunidad ═══════════════ */
.pv2-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pv2-metric {
    background: var(--pv2-surface); border: 1px solid var(--pv2-line); border-radius: var(--pv2-radius-sm);
    box-shadow: var(--pv2-shadow); overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease;
}
.pv2-metric:hover { box-shadow: var(--pv2-shadow-lg); }
.pv2-metric.is-open { box-shadow: var(--pv2-shadow-lg); border-color: var(--pv2-gold-soft); }
.pv2-metric-head { width: 100%; text-align: left; background: transparent; border: 0; padding: 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.pv2-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pv2-metric-name { font-family: var(--pv2-font-display); font-size: 1.08rem; font-weight: 700; }
.pv2-metric-val { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pv2-metric-bar { height: 6px; border-radius: 999px; background: var(--pv2-cream-2); overflow: hidden; }
.pv2-metric-fill { height: 100%; border-radius: 999px; }
.pv2-metric-tier { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pv2-metric-tier-tag { font-size: .78rem; font-weight: 700; }
.pv2-metric-short { font-size: .78rem; color: var(--pv2-ink-soft); }
.pv2-metric-chev { color: var(--pv2-ink-faint); transition: transform .2s ease; flex-shrink: 0; }
.pv2-metric.is-open .pv2-metric-chev { transform: rotate(180deg); }
.pv2-metric-detail { padding: 0 18px 18px; border-top: 1px solid var(--pv2-line-soft); padding-top: 14px; }
.pv2-metric-long { font-size: .82rem; color: var(--pv2-ink-soft); line-height: 1.55; margin-bottom: 14px; }
.pv2-tiers { display: flex; flex-direction: column; gap: 6px; }
.pv2-tier { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: .8rem; }
.pv2-tier-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; opacity: .45; }
.pv2-tier-name { color: var(--pv2-ink-soft); }
.pv2-tier-rank { margin-left: auto; font-size: .7rem; color: var(--pv2-ink-faint); font-variant-numeric: tabular-nums; }
.pv2-tier--active { background: var(--pv2-cream); }
.pv2-tier--active .pv2-tier-dot { opacity: 1; box-shadow: 0 0 0 3px rgba(176,134,66,.14); }
.pv2-tier--active .pv2-tier-name { color: var(--pv2-ink); font-weight: 700; }
.pv2-metrics-empty { grid-column: 1/-1; text-align: center; color: var(--pv2-ink-soft); padding: 30px; font-size: .9rem; }

/* ═══════════════ ESTANTERÍAS ═══════════════ */
.pv2-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.pv2-tab {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    background: var(--pv2-surface); border: 1px solid var(--pv2-line); color: var(--pv2-ink-soft);
    font-size: .88rem; font-weight: 600; transition: all .16s ease;
}
.pv2-tab:hover { border-color: var(--pv2-gold-soft); color: var(--pv2-ink); }
.pv2-tab--active { background: var(--pv2-ink); border-color: var(--pv2-ink); color: #fff; }
.pv2-tab-count {
    font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
    background: var(--pv2-cream-2); color: var(--pv2-ink-soft);
}
.pv2-tab--active .pv2-tab-count { background: rgba(255,255,255,.18); color: #fff; }
.pv2-tab--add { border-style: dashed; color: var(--pv2-gold); }
.pv2-tab--add:hover { background: var(--pv2-cream); border-color: var(--pv2-gold); }

.pv2-list-actions { display: flex; gap: 8px; margin-left: auto; }
.pv2-act {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px;
    background: var(--pv2-surface); border: 1px solid var(--pv2-line); color: var(--pv2-ink-soft);
    font-size: .78rem; font-weight: 600; transition: all .16s ease;
}
.pv2-act:hover { border-color: var(--pv2-gold-soft); color: var(--pv2-ink); }
.pv2-act--on { background: var(--pv2-gold); border-color: var(--pv2-gold); color: #fff; }
.pv2-act--danger:hover { border-color: #e0a3a3; color: #c0392b; }

.pv2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.pv2-card { position: relative; display: flex; flex-direction: column; gap: 10px; }
.pv2-card-cover-wrap {
    position: relative; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; cursor: pointer;
    background: var(--pv2-cream-2);
    box-shadow: 0 1px 3px rgba(30,20,10,.1), 0 14px 26px -14px rgba(30,20,10,.4);
    transition: transform .22s cubic-bezier(.23,1,.32,1), box-shadow .22s ease;
}
.pv2-card:hover .pv2-card-cover-wrap { transform: translateY(-5px); box-shadow: 0 2px 5px rgba(30,20,10,.12), 0 26px 40px -16px rgba(30,20,10,.5); }
.pv2-card-cover { width: 100%; height: 100%; object-fit: cover; }
.pv2-card-score {
    position: absolute; top: 9px; right: 9px; min-width: 36px; height: 36px; padding: 0 7px;
    display: grid; place-items: center; border-radius: 10px; backdrop-filter: blur(6px);
    background: rgba(255,255,255,.92); box-shadow: 0 3px 10px rgba(20,15,5,.28);
    font-family: var(--pv2-font-body); font-weight: 800; font-size: 1.02rem; font-variant-numeric: tabular-nums;
    border: 1.5px solid currentColor;
}
.pv2-card-info { min-width: 0; }
.pv2-card-title { font-size: .9rem; font-weight: 600; color: var(--pv2-ink); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.pv2-card-author { font-size: .78rem; color: var(--pv2-ink-faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv2-card-mine { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: .74rem; color: var(--pv2-ink-soft); }
.pv2-card-mine b { font-weight: 800; }
.pv2-card-remove {
    position: absolute; top: 9px; left: 9px; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(255,255,255,.92); border: 1px solid var(--pv2-line);
    color: var(--pv2-ink-soft); opacity: 0; transform: scale(.85); transition: all .16s ease; box-shadow: 0 2px 6px rgba(20,15,5,.2);
}
.pv2-card:hover .pv2-card-remove { opacity: 1; transform: scale(1); }
.pv2-card-remove:hover { color: #c0392b; border-color: #e0a3a3; }
.pv2-card-reorder { display: flex; gap: 6px; justify-content: center; }
.pv2-reorder-btn { width: 30px; height: 26px; border-radius: 7px; border: 1px solid var(--pv2-line); background: var(--pv2-surface); color: var(--pv2-ink-soft); display: grid; place-items: center; }
.pv2-reorder-btn:disabled { opacity: .35; cursor: default; }

.pv2-list-empty { text-align: center; padding: 60px 20px; color: var(--pv2-ink-soft); }
.pv2-list-empty svg { color: var(--pv2-gold-soft); margin-bottom: 14px; }
.pv2-list-empty-title { font-family: var(--pv2-font-display); font-size: 1.4rem; color: var(--pv2-ink); margin-bottom: 6px; }
.pv2-list-empty-hint { font-size: .88rem; }
.pv2-list-empty .pv2-btn { margin-top: 18px; }

.pv2-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
    background: var(--pv2-ink); color: #fff; border: 1px solid var(--pv2-ink); font-weight: 600; font-size: .88rem;
    transition: all .16s ease;
}
.pv2-btn:hover { background: #000; }
.pv2-btn--ghost { background: transparent; color: var(--pv2-ink); border-color: var(--pv2-line); }
.pv2-btn--ghost:hover { border-color: var(--pv2-gold-soft); background: var(--pv2-cream); }

/* ═══════════════ HISTORIAL ═══════════════ */
.pv2-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 14px; }
.pv2-hcard { cursor: pointer; }
.pv2-hcard .pv2-card-cover-wrap { box-shadow: 0 1px 3px rgba(30,20,10,.1), 0 10px 20px -12px rgba(30,20,10,.4); }
.pv2-hcard:hover .pv2-card-cover-wrap { transform: translateY(-4px); }
.pv2-hcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.pv2-hcard-mine { font-size: .74rem; font-weight: 800; }
.pv2-hcard-date { font-size: .7rem; color: var(--pv2-ink-faint); }
.pv2-show-more { display: block; margin: 24px auto 0; }

/* ═══════════════ LOADING ═══════════════ */
.pv2-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 70vh; color: var(--pv2-ink-soft); }
.pv2-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--pv2-cream-2); border-top-color: var(--pv2-gold); animation: pv2-spin .8s linear infinite; }
@keyframes pv2-spin { to { transform: rotate(360deg); } }

/* ═══════════════ Modales reutilizados (portales a document.body) ═══════════════
   BookSearchModal / CreateSectionModal / ShareOptionsModal son UIs oscuras
   completas y autoconsistentes (.book-search-overlay/-modal, .create-section-*,
   .share-options-overlay). Se reutilizan tal cual: un diálogo oscuro enfocado
   sobre el panel claro es coherente y funcional. Un re-skin parcial (panel
   blanco con controles internos oscuros) se vería roto, así que se dejan en su
   estilo nativo. (Follow-up posible: modales claros propios del v2.)
   Suavizamos solo el backdrop para que la transición claro→modal sea menos brusca. */
body.pv2-active .book-search-overlay,
body.pv2-active .create-section-overlay,
body.pv2-active .share-options-overlay {
    background: rgba(26, 23, 20, .55) !important;
    backdrop-filter: blur(3px);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 900px) {
    .pv2-hero { grid-template-columns: 1fr; }
    .pv2-palate { grid-template-columns: 1fr; }
    .pv2-metrics { grid-template-columns: repeat(2, 1fr); }
    .pv2-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .pv2-shell { padding: 20px 16px 70px; }
    .pv2-header-inner { padding: 12px 16px; }
    .pv2-brand-tag { display: none; }
    .pv2-hero-reading { flex-direction: column; text-align: center; padding: 24px; gap: 18px; }
    .pv2-hero-cover { width: 132px; }
    .pv2-hero-reading-badge { justify-content: center; }
    .pv2-progress-row { justify-content: center; }
    .pv2-metrics { grid-template-columns: 1fr; }
    .pv2-block-title { font-size: 1.3rem; }
    .pv2-avg-num { font-size: 3rem; }
    .pv2-grid { grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }
    .pv2-list-actions { width: 100%; margin-left: 0; margin-top: 4px; }
    .pv2-donut-wrap { flex-direction: column; align-items: stretch; }
    .pv2-donut { align-self: center; }
}
