:root {
    --pvc-ink: #0f1a2b;
    --pvc-muted: #5d6b81;
    --pvc-glass: rgba(255, 255, 255, 0.72);
    --pvc-glass-strong: rgba(255, 255, 255, 0.88);
    --pvc-teal: #0f766e;
    --pvc-teal-bright: #14b8a6;
    --pvc-gold: #b45309;
    --pvc-shadow-soft: 0 18px 44px rgba(15, 23, 42, 0.10);
    --pvc-shadow-strong: 0 26px 64px rgba(15, 23, 42, 0.13);
}

html:has(body.pvcatalog-canvas-body) {
    overflow-x: hidden;
    overflow-x: clip;
}

body.pvcatalog-canvas-body {
    margin: 0;
    overflow-x: hidden;
    overflow-x: clip;
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(20, 184, 166, 0.16), transparent 62%),
        radial-gradient(760px 460px at 96% 4%, rgba(59, 130, 246, 0.13), transparent 60%),
        radial-gradient(720px 520px at 50% 108%, rgba(245, 158, 11, 0.11), transparent 58%),
        #f6f8f7;
}

.pvcatalog-canvas {
    min-height: 100vh;
}

.pvcatalog-canvas__content > :not(.pvcatalog-page) {
    width: min(980px, calc(100% - 28px));
    margin-right: auto;
    margin-left: auto;
}

.pvcatalog-canvas__content > :first-child:not(.pvcatalog-page) {
    margin-top: 0;
    padding-top: 24px;
}

.pvcatalog-page {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-x: clip;
    color: var(--pvc-ink);
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: var(--pvc-font-size, 14.7px);
    line-height: 1.36;
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(20, 184, 166, 0.16), transparent 62%),
        radial-gradient(760px 460px at 96% 4%, rgba(59, 130, 246, 0.13), transparent 60%),
        radial-gradient(720px 520px at 50% 108%, rgba(245, 158, 11, 0.11), transparent 58%),
        #f6f8f7;
}

.pvcatalog-page *,
.pvcatalog-page *::before,
.pvcatalog-page *::after {
    box-sizing: border-box;
}

.pvcatalog-page--route {
    margin: 0;
}

.pvcatalog-app {
    position: relative;
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 54px;
    user-select: none;
    touch-action: manipulation;
}

.pvcatalog-app button {
    touch-action: manipulation;
}

.pvcatalog-toolbar {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(240px, 480px) minmax(140px, 1fr);
    grid-template-areas: "brand search tools";
    gap: 12px;
    align-items: center;
    min-height: 74px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 20px;
    background: linear-gradient(160deg, var(--pvc-glass-strong), var(--pvc-glass));
    box-shadow: var(--pvc-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px) saturate(150%);
}

.pvcatalog-tools {
    position: relative;
    z-index: 1;
    grid-area: tools;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.pvcatalog-toolbar--no-search {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand tools";
}

.pvcatalog-toolbar--no-search.pvcatalog-toolbar--no-tools {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand";
}

.pvcatalog-toolbar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.42) 50%, transparent 68%);
    background-size: 260% 100%;
    background-position: 130% 0;
    animation: pvcatalog-flow 8s ease-in-out infinite;
}

.pvcatalog-brand,
.pvcatalog-search {
    position: relative;
    z-index: 1;
}

.pvcatalog-brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.pvcatalog-brand__mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: linear-gradient(140deg, #16233a, #0f766e 78%);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        0 8px 18px rgba(15, 118, 110, 0.28);
}

.pvcatalog-brand__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pvcatalog-brand__inner {
    display: inline-block;
    min-width: 0;
    vertical-align: bottom;
}

.pvcatalog-brand__text.is-marquee {
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.pvcatalog-brand__text.is-marquee .pvcatalog-brand__inner {
    animation: pvcatalog-marquee var(--pvc-marquee-duration, 9s) ease-in-out infinite alternate;
}

@keyframes pvcatalog-marquee {
    0%, 14% {
        transform: translateX(0);
    }
    86%, 100% {
        transform: translateX(var(--pvc-marquee-shift, -60px));
    }
}

.pvcatalog-app .pvcatalog-search {
    grid-area: search;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    align-items: center;
    justify-self: center;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.pvcatalog-app .pvcatalog-search:focus-within {
    border-color: rgba(15, 118, 110, 0.56);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16), 0 8px 20px rgba(15, 118, 110, 0.10);
}

.pvcatalog-search__icon {
    position: relative;
    justify-self: end;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(93, 107, 129, 0.75);
    border-radius: 50%;
    transition: border-color 160ms ease;
}

.pvcatalog-search__icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 7px;
    height: 2px;
    border-radius: 2px;
    background: rgba(93, 107, 129, 0.75);
    transform: rotate(45deg);
    transition: background 160ms ease;
}

.pvcatalog-search:focus-within .pvcatalog-search__icon {
    border-color: var(--pvc-teal);
}

.pvcatalog-search:focus-within .pvcatalog-search__icon::after {
    background: var(--pvc-teal);
}

.pvcatalog-app .pvcatalog-search input,
.pvcatalog-app .pvcatalog-search input[type="search"],
.pvcatalog-app .pvcatalog-search input[type="search"]:focus {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: var(--pvc-ink);
    box-shadow: none;
    font: inherit;
    line-height: 1.3;
}

.pvcatalog-app .pvcatalog-search input::-webkit-search-decoration,
.pvcatalog-app .pvcatalog-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.pvcatalog-app button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    font-family: inherit;
    text-transform: none;
}

.pvcatalog-app .pvcatalog-clear {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-right: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--pvc-muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    box-shadow: none;
    transition: background 150ms ease, color 150ms ease;
}

.pvcatalog-app .pvcatalog-clear:hover,
.pvcatalog-app .pvcatalog-clear:focus-visible {
    background: rgba(15, 23, 42, 0.08);
    color: var(--pvc-ink);
    outline: 0;
}

.pvcatalog-font-menu {
    display: inline-flex;
}

.pvcatalog-app .pvcatalog-font-toggle,
.pvcatalog-app .pvcatalog-info-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(240, 253, 250, 0.96), rgba(224, 242, 254, 0.72));
    color: var(--pvc-teal);
    cursor: pointer;
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: transform 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.pvcatalog-app .pvcatalog-font-toggle:focus,
.pvcatalog-app .pvcatalog-info-toggle:focus,
.pvcatalog-app .pvcatalog-font-button:focus,
.pvcatalog-app .pvcatalog-clear:focus {
    outline: 0;
    text-decoration: none;
}

.pvcatalog-app .pvcatalog-font-toggle:focus:not(:focus-visible),
.pvcatalog-app .pvcatalog-info-toggle:focus:not(:focus-visible) {
    border-color: rgba(15, 118, 110, 0.18);
    background: linear-gradient(150deg, rgba(240, 253, 250, 0.96), rgba(224, 242, 254, 0.72));
    color: var(--pvc-teal);
    transform: none;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.pvcatalog-app .pvcatalog-font-button:focus:not(:focus-visible) {
    background: rgba(15, 118, 110, 0.10);
    color: var(--pvc-teal);
    transform: none;
    box-shadow: none;
}

.pvcatalog-app .pvcatalog-clear:focus:not(:focus-visible) {
    background: transparent;
    color: var(--pvc-muted);
    box-shadow: none;
}

.pvcatalog-app .pvcatalog-font-toggle:hover,
.pvcatalog-app .pvcatalog-font-toggle:focus-visible {
    background: linear-gradient(140deg, var(--pvc-teal), var(--pvc-teal-bright));
    border-color: rgba(15, 118, 110, 0.55);
    color: #fff;
    outline: 0;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.26);
}

.pvcatalog-font-menu.is-open .pvcatalog-font-toggle {
    background: linear-gradient(140deg, #16233a, #334155);
    border-color: rgba(22, 35, 58, 0.55);
    color: #fff;
}

.pvcatalog-font-controls {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px) saturate(150%);
}

.pvcatalog-font-menu.is-open .pvcatalog-font-controls {
    display: inline-flex;
    animation: pvcatalog-pop 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pvcatalog-font-menu {
    position: relative;
}

.pvcatalog-app .pvcatalog-font-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.10);
    color: var(--pvc-teal);
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
    transition: transform 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.pvcatalog-app .pvcatalog-font-button:hover,
.pvcatalog-app .pvcatalog-font-button:focus-visible {
    background: linear-gradient(140deg, var(--pvc-teal), var(--pvc-teal-bright));
    color: #fff;
    outline: 0;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.26);
}

.pvcatalog-app .pvcatalog-font-button:active {
    transform: scale(0.94);
}

.pvcatalog-font-size {
    min-width: 56px;
    color: var(--pvc-muted);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.pvcatalog-app .pvcatalog-info-toggle {
    display: none;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-style: italic;
}

.pvcatalog-app .pvcatalog-info-toggle:hover,
.pvcatalog-app .pvcatalog-info-toggle:focus-visible {
    background: linear-gradient(140deg, var(--pvc-teal), var(--pvc-teal-bright));
    border-color: rgba(15, 118, 110, 0.55);
    color: #fff;
    outline: 0;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.26);
}

.pvcatalog-app .pvcatalog-info-toggle[aria-expanded="true"],
.pvcatalog-app .pvcatalog-info-toggle[aria-expanded="true"]:focus:not(:focus-visible) {
    background: linear-gradient(140deg, #16233a, #334155);
    border-color: rgba(22, 35, 58, 0.55);
    color: #fff;
}

.pvcatalog-font-menu.is-open .pvcatalog-font-toggle:focus:not(:focus-visible) {
    background: linear-gradient(140deg, #16233a, #334155);
    border-color: rgba(22, 35, 58, 0.55);
    color: #fff;
}

.pvcatalog-count {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    color: var(--pvc-muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.pvcatalog-count__dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.55);
}

.pvcatalog-document {
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--pvc-shadow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: hidden;
    /* Sin anclaje de scroll: si el navegador ancla la vista al centinela
       inferior, cada lote insertado arriba lo mantiene pegado a "Cargando..."
       y la carga se encadena sin parar hasta el final del catalogo. */
    overflow-anchor: none;
}

.pvcatalog-list {
    min-height: 58vh;
    background: transparent;
    transition: opacity 180ms ease;
    /* El plugin compensa el scroll manualmente al insertar bloques arriba;
       el anclaje nativo del navegador duplicaria la correccion y provoca saltos. */
    overflow-anchor: none;
}

.pvcatalog-document.is-jumping .pvcatalog-list,
.pvcatalog-document.is-jumping .pvcatalog-sentinel {
    opacity: 0.25;
}

.pvcatalog-sentinel--top {
    padding: 14px 24px;
    font-size: 12px;
}

.pvcatalog-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 6px;
    align-items: start;
    min-height: var(--pvc-row-min-height, 34px);
    padding: var(--pvc-row-pad-y, 6px) 18px var(--pvc-row-pad-y, 6px) calc(18px + var(--pvc-depth, 0) * 22px);
    border-bottom: 1px solid rgba(148, 163, 184, var(--pvc-row-border-alpha, 0.14));
    color: #16233a;
    font-size: var(--pvc-current-font-size, var(--pvc-font-size, 14.7px));
    line-height: 1.38;
    overflow-wrap: anywhere;
    content-visibility: auto;
    contain-intrinsic-size: auto var(--pvc-row-min-height, 34px);
    opacity: 0;
    transform: translateY(9px);
    animation: pvcatalog-row-in 480ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--pvc-delay, 0ms) both;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.pvcatalog-row.is-settled {
    animation: none;
    opacity: 1;
    transform: none;
}

.pvcatalog-row:hover {
    background: linear-gradient(90deg, rgba(204, 251, 241, 0.55), rgba(240, 253, 250, 0.35) 55%, transparent);
    box-shadow: inset 3px 0 0 rgba(20, 184, 166, 0.55);
}

.pvcatalog-row mark {
    padding: 0 2px;
    border-radius: 4px;
    background: rgba(250, 204, 21, 0.45);
    color: inherit;
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.14);
}

.pvcatalog-row__icon {
    display: inline-grid;
    place-items: start center;
    min-width: 28px;
    color: var(--pvc-gold);
    font-size: calc(var(--pvc-current-font-size, var(--pvc-font-size, 14.7px)) + 1px);
    line-height: 1.3;
}

.pvcatalog-row__text {
    min-width: 0;
    max-width: 100%;
}

.pvcatalog-row--title,
.pvcatalog-row--year,
.pvcatalog-row--month {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    padding: var(--pvc-row-title-pad-y, 10px) 18px calc(var(--pvc-row-title-pad-y, 10px) * 0.72);
    font-weight: 700;
    content-visibility: visible;
    contain-intrinsic-size: none;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.pvcatalog-row--title .pvcatalog-row__text,
.pvcatalog-row--year .pvcatalog-row__text,
.pvcatalog-row--month .pvcatalog-row__text {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.pvcatalog-row--title {
    min-height: 36px;
    color: var(--pvc-teal);
    font-size: calc(var(--pvc-current-font-size, var(--pvc-font-size, 14.7px)) + 3px);
    line-height: 1.28;
    text-align: center;
    letter-spacing: 0.015em;
}

.pvcatalog-row--title .pvcatalog-row__text::after {
    content: "";
    display: block;
    width: 68px;
    height: 3px;
    margin: 7px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.0), rgba(20, 184, 166, 0.65), rgba(245, 158, 11, 0.55), rgba(245, 158, 11, 0.0));
}

.pvcatalog-row--year {
    position: sticky;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 76px);
    z-index: 4;
    background: linear-gradient(90deg, rgba(240, 253, 250, 0.97), rgba(255, 255, 255, 0.95) 55%, rgba(240, 253, 250, 0.97));
    color: var(--pvc-teal);
    border-top: 1px solid rgba(20, 184, 166, 0.20);
    border-bottom: 1px solid rgba(20, 184, 166, 0.20);
    letter-spacing: 0.05em;
    /* Sin backdrop-filter: los encabezados pegajosos con desenfoque se
       recomponen en cada frame del scroll y sobrecargan la CPU en Chromium. */
}

.pvcatalog-row--month {
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.85), rgba(255, 247, 237, 0.55));
    color: var(--pvc-gold);
    letter-spacing: 0.04em;
    box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.45);
}

.pvcatalog-row--note {
    color: var(--pvc-muted);
}

.pvcatalog-empty,
.pvcatalog-sentinel {
    margin: 0;
    padding: 18px 24px 24px;
    color: var(--pvc-muted);
    text-align: center;
    font-weight: 800;
}

.pvcatalog-empty {
    padding-top: 42px;
    padding-bottom: 42px;
    font-size: 15px;
}

.pvcatalog-empty::before {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    border: 3px solid rgba(93, 107, 129, 0.35);
    border-radius: 50%;
    background: linear-gradient(45deg, transparent 45%, rgba(93, 107, 129, 0.35) 45%, rgba(93, 107, 129, 0.35) 55%, transparent 55%);
}

.pvcatalog-app.is-done .pvcatalog-sentinel {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 11px;
    color: rgba(93, 107, 129, 0.85);
}

.pvcatalog-app.is-loading .pvcatalog-sentinel::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 9px;
    border: 2px solid rgba(15, 118, 110, 0.22);
    border-top-color: var(--pvc-teal);
    border-radius: 50%;
    vertical-align: -2px;
    animation: pvcatalog-spin 720ms linear infinite;
}

.pvcatalog-skeleton {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 6px;
    align-items: center;
    min-height: var(--pvc-row-min-height, 34px);
    padding: var(--pvc-row-pad-y, 6px) 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.pvcatalog-skeleton__dot,
.pvcatalog-skeleton__bar {
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.16) 25%, rgba(148, 163, 184, 0.30) 46%, rgba(148, 163, 184, 0.16) 62%);
    background-size: 220% 100%;
    animation: pvcatalog-shimmer 1300ms ease-in-out infinite;
}

.pvcatalog-skeleton__dot {
    width: 16px;
    height: 16px;
    justify-self: center;
}

.pvcatalog-skeleton__bar {
    height: 12px;
    width: var(--pvc-skeleton-width, 62%);
}

.pvcatalog-app .pvcatalog-top,
.pvcatalog-app .pvcatalog-top:focus {
    appearance: none;
    -webkit-appearance: none;
    position: fixed;
    left: 14px;
    left: calc(14px + env(safe-area-inset-left));
    bottom: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 70;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 118, 110, 0.22);
    border-radius: 999px;
    outline: 0;
    background: rgba(255, 255, 255, 0.94);
    color: var(--pvc-teal);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: opacity 200ms ease, transform 200ms ease, background 160ms ease;
}

.pvcatalog-app .pvcatalog-top.is-visible,
.pvcatalog-app .pvcatalog-top.is-visible:focus {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.pvcatalog-app .pvcatalog-top:hover,
.pvcatalog-app .pvcatalog-top:focus-visible {
    background: rgba(240, 253, 250, 0.98);
    border-color: rgba(15, 118, 110, 0.45);
    outline: 0;
}

.pvcatalog-top__arrow {
    width: 11px;
    height: 11px;
    margin-top: 4px;
    border-top: 2.5px solid var(--pvc-teal);
    border-left: 2.5px solid var(--pvc-teal);
    border-radius: 2px;
    transform: rotate(45deg);
}

.pvcatalog-rail {
    position: fixed;
    left: 10px;
    left: calc(10px + env(safe-area-inset-left));
    top: 50%;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 60vh;
    margin: 0;
    padding: 12px 8px;
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px) saturate(150%);
    touch-action: none;
}

.pvcatalog-rail[hidden] {
    display: none;
}

.pvcatalog-rail.is-dragging {
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 18px 38px rgba(15, 118, 110, 0.20);
}

.pvcatalog-rail:focus-visible {
    outline: 2px solid rgba(15, 118, 110, 0.55);
    outline-offset: 2px;
}

.pvcatalog-rail__dash {
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.32);
    pointer-events: none;
}

.pvcatalog-rail__dash:nth-child(4n+1) {
    width: 16px;
    background: rgba(100, 116, 139, 0.45);
}

.pvcatalog-rail__thumb {
    position: absolute;
    left: 50%;
    top: 12px;
    width: 22px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pvc-teal), var(--pvc-teal-bright));
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.45), 0 0 0 3px rgba(20, 184, 166, 0.16);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: top 160ms ease-out;
}

.pvcatalog-rail.is-dragging .pvcatalog-rail__thumb {
    transition: none;
    box-shadow: 0 2px 10px rgba(15, 118, 110, 0.55), 0 0 0 5px rgba(20, 184, 166, 0.22);
}

.pvcatalog-rail-label {
    position: fixed;
    left: 44px;
    left: calc(44px + env(safe-area-inset-left));
    z-index: 30;
    max-width: min(62vw, 340px);
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.70);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.90);
    color: var(--pvc-teal);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
    transition: opacity 180ms ease;
}

.pvcatalog-rail-label.is-visible {
    opacity: 1;
}

@keyframes pvcatalog-flow {
    0%, 46% {
        background-position: 130% 0;
    }
    70%, 100% {
        background-position: -30% 0;
    }
}

@keyframes pvcatalog-row-in {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pvcatalog-pop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pvcatalog-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pvcatalog-shimmer {
    from {
        background-position: 120% 0;
    }
    to {
        background-position: -120% 0;
    }
}

@media print {
    .pvcatalog-page {
        display: none;
    }
}

@media (max-width: 860px) {
    .pvcatalog-app {
        width: min(100%, calc(100% - 16px));
        padding-top: 8px;
    }

    .pvcatalog-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand tools"
            "search search";
        gap: 10px;
        min-height: 0;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .pvcatalog-toolbar::after {
        display: none;
    }

    .pvcatalog-brand {
        grid-area: brand;
    }

    .pvcatalog-brand__mark {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .pvcatalog-app .pvcatalog-search {
        min-height: 44px;
    }

    .pvcatalog-app .pvcatalog-search input {
        min-height: 42px;
    }

    .pvcatalog-tools {
        gap: 8px;
    }

    .pvcatalog-app .pvcatalog-info-toggle {
        display: inline-grid;
    }

    .pvcatalog-toolbar--no-search {
        grid-template-areas: "brand tools";
    }

    .pvcatalog-toolbar--no-search.pvcatalog-toolbar--no-tools {
        grid-template-areas: "brand";
    }

    .pvcatalog-count {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 40;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-width: 190px;
        max-width: min(88vw, 340px);
        padding: 13px 16px;
        border: 1px solid rgba(255, 255, 255, 0.78);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.97);
        color: var(--pvc-ink);
        font-size: 13px;
        white-space: nowrap;
        text-align: left;
        box-shadow: 0 20px 44px rgba(15, 23, 42, 0.20);
        backdrop-filter: blur(18px) saturate(150%);
    }

    .pvcatalog-count.is-open {
        display: inline-flex;
        animation: pvcatalog-pop 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .pvcatalog-count__dot {
        display: none;
    }

    .pvcatalog-count__items,
    .pvcatalog-count__updated {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pvcatalog-count__items::before {
        content: "📦";
        font-size: 14px;
    }

    .pvcatalog-count__updated {
        color: var(--pvc-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .pvcatalog-count__updated::before {
        content: "🕒";
        font-size: 14px;
    }

    .pvcatalog-app .pvcatalog-font-toggle,
    .pvcatalog-app .pvcatalog-info-toggle {
        width: 42px;
        height: 42px;
    }

    .pvcatalog-document {
        margin-top: 10px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.80);
    }

    .pvcatalog-row {
        grid-template-columns: 30px minmax(0, 1fr);
        padding-right: 14px;
        padding-left: calc(14px + var(--pvc-depth, 0) * 12px);
        font-size: var(--pvc-current-font-size, var(--pvc-font-size-mobile, 14px));
    }

    .pvcatalog-row--title,
    .pvcatalog-row--year,
    .pvcatalog-row--month {
        display: block;
        padding-right: 14px;
        padding-left: 14px;
        text-align: center;
    }

    .pvcatalog-row--month {
        box-shadow: none;
    }

    .pvcatalog-row--title {
        font-size: calc(var(--pvc-current-font-size, var(--pvc-font-size-mobile, 14px)) + 2px);
        line-height: 1.34;
    }

    .pvcatalog-row--year,
    .pvcatalog-row--month {
        font-size: calc(var(--pvc-current-font-size, var(--pvc-font-size-mobile, 14px)) + 1px);
        line-height: 1.34;
    }

    .pvcatalog-row--title .pvcatalog-row__text,
    .pvcatalog-row--year .pvcatalog-row__text,
    .pvcatalog-row--month .pvcatalog-row__text {
        white-space: normal;
    }

    .pvcatalog-row--year {
        top: calc(var(--wp-admin--admin-bar--height, 0px) + 112px);
    }

    .pvcatalog-app .pvcatalog-top,
    .pvcatalog-app .pvcatalog-top:focus {
        width: 42px;
        height: 42px;
    }

    .pvcatalog-rail {
        left: 3px;
        left: calc(3px + env(safe-area-inset-left));
        height: 52vh;
        padding: 12px 6px;
        background: rgba(255, 255, 255, 0.55);
    }

    .pvcatalog-rail__dash {
        width: 10px;
    }

    .pvcatalog-rail__dash:nth-child(4n+1) {
        width: 14px;
    }

    .pvcatalog-rail__thumb {
        width: 18px;
        height: 5px;
    }

    .pvcatalog-rail-label {
        left: 32px;
        left: calc(32px + env(safe-area-inset-left));
        font-size: 11px;
    }

    /* Ahorro de GPU/bateria en moviles: los desenfoques de fondo (backdrop-filter)
       se recomponen en cada frame al hacer scroll bajo elementos fijos y calientan
       los equipos modestos; se reemplazan por fondos casi opacos. */
    .pvcatalog-toolbar,
    .pvcatalog-document,
    .pvcatalog-row--year,
    .pvcatalog-rail,
    .pvcatalog-rail-label,
    .pvcatalog-font-controls,
    .pvcatalog-count {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .pvcatalog-toolbar {
        background: rgba(255, 255, 255, 0.97);
    }

    .pvcatalog-document {
        background: rgba(255, 255, 255, 0.95);
    }

    .pvcatalog-rail {
        background: rgba(255, 255, 255, 0.92);
    }

    .pvcatalog-rail-label,
    .pvcatalog-font-controls {
        background: rgba(255, 255, 255, 0.98);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pvcatalog-toolbar::after,
    .pvcatalog-brand__text.is-marquee .pvcatalog-brand__inner,
    .pvcatalog-row,
    .pvcatalog-skeleton__dot,
    .pvcatalog-skeleton__bar,
    .pvcatalog-font-menu.is-open .pvcatalog-font-controls,
    .pvcatalog-count.is-open,
    .pvcatalog-app.is-loading .pvcatalog-sentinel::after {
        animation: none;
    }

    .pvcatalog-row {
        opacity: 1;
        transform: none;
    }

    .pvcatalog-row,
    .pvcatalog-clear,
    .pvcatalog-search,
    .pvcatalog-top,
    .pvcatalog-rail__thumb,
    .pvcatalog-rail-label,
    .pvcatalog-list,
    .pvcatalog-font-toggle,
    .pvcatalog-font-button,
    .pvcatalog-info-toggle {
        transition: none;
    }
}

/* ===== Temas de lectura (2.3.0): claro / sepia / oscuro ===== */

.pvcatalog-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(15, 118, 110, 0.28);
    background: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 180ms ease, background 180ms ease;
}

.pvcatalog-theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.pvcatalog-theme-toggle:focus-visible {
    outline: 2px solid var(--pvc-teal-bright);
    outline-offset: 2px;
}

/* Sepia: tono papel calido tipo lector, sin tocar la estructura. */
.pvcatalog-app[data-pvc-theme="sepia"] {
    --pvc-ink: #453421;
    --pvc-muted: #8a7452;
    --pvc-glass: rgba(247, 238, 216, 0.86);
    --pvc-glass-strong: rgba(251, 244, 226, 0.96);
    --pvc-teal: #8a5a18;
    --pvc-teal-bright: #b7791f;
    --pvc-gold: #92400e;
}

body.pvc-theme-sepia,
body.pvcatalog-canvas-body.pvc-theme-sepia {
    background:
        radial-gradient(900px 520px at 8% -6%, rgba(214, 190, 140, 0.5), transparent 60%),
        radial-gradient(900px 560px at 96% 4%, rgba(226, 205, 160, 0.42), transparent 58%),
        linear-gradient(170deg, #f6ecd6, #efe2c4) !important;
}

.pvcatalog-app[data-pvc-theme="sepia"] .pvcatalog-search input,
.pvcatalog-app[data-pvc-theme="sepia"] .pvcatalog-search input[type="search"] {
    background: rgba(251, 244, 226, 0.92);
    color: var(--pvc-ink);
    border-color: rgba(138, 90, 24, 0.35);
}

.pvcatalog-app[data-pvc-theme="sepia"] .pvcatalog-theme-toggle {
    background: rgba(251, 244, 226, 0.92);
    border-color: rgba(138, 90, 24, 0.4);
}

.pvcatalog-app[data-pvc-theme="sepia"] .pvcatalog-row mark {
    background: rgba(183, 121, 31, 0.28);
    color: inherit;
}

/* Oscuro: fondo nocturno con texto claro y acentos teal/ambar vivos. */
.pvcatalog-app[data-pvc-theme="oscuro"] {
    --pvc-ink: #e8e4da;
    --pvc-muted: #9aa6b5;
    --pvc-glass: rgba(21, 30, 43, 0.86);
    --pvc-glass-strong: rgba(26, 37, 52, 0.95);
    --pvc-teal: #2dd4bf;
    --pvc-teal-bright: #5eead4;
    --pvc-gold: #fbbf24;
    --pvc-shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.45);
    --pvc-shadow-strong: 0 26px 64px rgba(0, 0, 0, 0.55);
}

body.pvc-theme-oscuro,
body.pvcatalog-canvas-body.pvc-theme-oscuro {
    background:
        radial-gradient(900px 520px at 8% -6%, rgba(20, 184, 166, 0.16), transparent 60%),
        radial-gradient(900px 560px at 96% 4%, rgba(251, 191, 36, 0.10), transparent 58%),
        linear-gradient(170deg, #0b1220, #101a2a) !important;
}

.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-search input,
.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-search input[type="search"],
.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-search input[type="search"]:focus {
    background: rgba(15, 23, 36, 0.9);
    color: var(--pvc-ink);
    border-color: rgba(45, 212, 191, 0.35);
}

.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-theme-toggle,
.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-font-toggle,
.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-info-toggle {
    background: rgba(15, 23, 36, 0.9);
    color: var(--pvc-ink);
    border-color: rgba(45, 212, 191, 0.35);
}

.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-font-controls {
    background: rgba(21, 30, 43, 0.97);
    border-color: rgba(45, 212, 191, 0.3);
    color: var(--pvc-ink);
}

.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-count {
    color: var(--pvc-muted);
}

.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-row mark {
    background: rgba(251, 191, 36, 0.30);
    color: #fff7e0;
}

.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-sentinel,
.pvcatalog-app[data-pvc-theme="oscuro"] .pvcatalog-empty {
    color: var(--pvc-muted);
}

/* ===== 2.4.0: tintado COMPLETO del listado (documento, filas y riel).
   El atributo vive en .pvcatalog-page (y en .pvcatalog-app), asi que todo
   el interior — no solo la barra — cambia con el tema. ===== */

/* --- Fondo de la pagina del catalogo --- */
.pvcatalog-page[data-pvc-theme="sepia"] {
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(214, 190, 140, 0.42), transparent 62%),
        radial-gradient(760px 460px at 96% 4%, rgba(226, 205, 160, 0.36), transparent 60%),
        #f4e9d3;
}

.pvcatalog-page[data-pvc-theme="oscuro"] {
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(20, 184, 166, 0.14), transparent 62%),
        radial-gradient(760px 460px at 96% 4%, rgba(251, 191, 36, 0.08), transparent 60%),
        #0d1420;
}

/* --- Hoja del documento --- */
.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-document {
    border-color: rgba(138, 90, 24, 0.28);
    background: rgba(250, 243, 224, 0.97);
    box-shadow: 0 26px 64px rgba(90, 62, 20, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-document {
    border-color: rgba(45, 212, 191, 0.16);
    background: rgba(17, 25, 38, 0.97);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* --- Filas del listado --- */
.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-row {
    color: #453421;
    border-bottom-color: rgba(138, 90, 24, 0.16);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-row {
    color: #dde4ee;
    border-bottom-color: rgba(148, 163, 184, 0.12);
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-row:hover {
    background: linear-gradient(90deg, rgba(214, 178, 110, 0.30), rgba(240, 224, 190, 0.18) 55%, transparent);
    box-shadow: inset 3px 0 0 rgba(138, 90, 24, 0.55);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-row:hover {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.14), rgba(45, 212, 191, 0.05) 55%, transparent);
    box-shadow: inset 3px 0 0 rgba(45, 212, 191, 0.55);
}

/* --- Encabezados pegajosos (año) y meses --- */
.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-row--year {
    background: linear-gradient(90deg, rgba(240, 224, 190, 0.98), rgba(250, 243, 224, 0.96) 55%, rgba(240, 224, 190, 0.98));
    color: #8a5a18;
    border-top-color: rgba(138, 90, 24, 0.28);
    border-bottom-color: rgba(138, 90, 24, 0.28);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-row--year {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.22), rgba(17, 25, 38, 0.96) 55%, rgba(13, 148, 136, 0.22));
    color: #5eead4;
    border-top-color: rgba(45, 212, 191, 0.28);
    border-bottom-color: rgba(45, 212, 191, 0.28);
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-row--month {
    background: linear-gradient(90deg, rgba(224, 190, 130, 0.40), rgba(240, 224, 190, 0.22));
    color: #92400e;
    box-shadow: inset 3px 0 0 rgba(146, 64, 14, 0.5);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-row--month {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0.05));
    color: #fbbf24;
    box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.5);
}

/* --- Esqueletos de carga --- */
.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-skeleton {
    border-bottom-color: rgba(148, 163, 184, 0.08);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-skeleton__dot,
.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-skeleton__bar {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 25%, rgba(148, 163, 184, 0.24) 46%, rgba(148, 163, 184, 0.12) 62%);
    background-size: 220% 100%;
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-skeleton__dot,
.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-skeleton__bar {
    background: linear-gradient(90deg, rgba(138, 90, 24, 0.14) 25%, rgba(138, 90, 24, 0.28) 46%, rgba(138, 90, 24, 0.14) 62%);
    background-size: 220% 100%;
}

/* --- Riel de secciones (lineas guia) --- */
.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-rail__dash {
    background: rgba(138, 90, 24, 0.35);
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-rail__dash:nth-child(4n+1) {
    background: rgba(138, 90, 24, 0.55);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-rail__dash {
    background: rgba(148, 163, 184, 0.35);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-rail__dash:nth-child(4n+1) {
    background: rgba(148, 163, 184, 0.55);
}

/* --- Boton volver arriba --- */
.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-app .pvcatalog-top {
    background: rgba(26, 37, 52, 0.95);
    border-color: rgba(45, 212, 191, 0.35);
    color: #dde4ee;
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-app .pvcatalog-top {
    background: rgba(250, 243, 224, 0.96);
    border-color: rgba(138, 90, 24, 0.4);
    color: #453421;
}

/* --- Marcas de busqueda en sepia --- */
.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-row mark {
    background: rgba(183, 121, 31, 0.30);
    color: inherit;
}

/* ===== 2.5.0: metricas detras del boton i tambien en escritorio ===== */

.pvcatalog-tools {
    position: relative;
}

/* info-toggle siempre visible (antes solo en movil) */
.pvcatalog-app .pvcatalog-info-toggle {
    display: inline-grid;
}

.pvcatalog-count {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 190px;
    max-width: min(88vw, 340px);
    padding: 13px 16px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--pvc-ink);
    font-size: 13px;
    white-space: nowrap;
    text-align: left;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.20);
    backdrop-filter: blur(18px) saturate(150%);
}

.pvcatalog-count.is-open {
    display: inline-flex;
    animation: pvcatalog-pop 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pvcatalog-count__dot {
    display: none;
}

.pvcatalog-count__items,
.pvcatalog-count__updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pvcatalog-count__items::before {
    content: "📦";
    font-size: 14px;
}

.pvcatalog-count__updated {
    color: var(--pvc-muted);
    font-size: 12px;
    font-weight: 700;
}

.pvcatalog-count__updated::before {
    content: "🕒";
    font-size: 14px;
}

/* ===== 2.5.0: la X del buscador solo aparece cuando hay texto ===== */

.pvcatalog-app .pvcatalog-search input:placeholder-shown ~ .pvcatalog-clear {
    opacity: 0;
    pointer-events: none;
}

.pvcatalog-app .pvcatalog-clear {
    transition: opacity 140ms ease, background 150ms ease, color 150ms ease;
}

/* ===== 2.5.0: iconos del buscador y riel adaptados a cada tema ===== */

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-search__icon {
    border-color: rgba(138, 90, 24, 0.7);
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-search__icon::after {
    background: rgba(138, 90, 24, 0.7);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-search__icon,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-search__icon,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-search__icon {
    border-color: rgba(154, 166, 181, 0.75);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-search__icon::after,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-search__icon::after,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-search__icon::after {
    background: rgba(154, 166, 181, 0.75);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-clear,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-clear,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-clear {
    color: rgba(154, 166, 181, 0.9);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-clear:hover,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-clear:hover,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-clear:hover {
    background: rgba(148, 163, 184, 0.18);
    color: #fff;
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-rail {
    border-color: rgba(138, 90, 24, 0.3);
    background: rgba(250, 243, 224, 0.85);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-rail,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-rail,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-rail {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(21, 30, 43, 0.82);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-rail.is-dragging,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-rail.is-dragging,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-rail.is-dragging {
    background: rgba(26, 37, 52, 0.95);
}

/* Ventanita de metricas (i) en temas */
.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-count {
    border-color: rgba(138, 90, 24, 0.35);
    background: rgba(251, 244, 226, 0.98);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-count,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-count,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-count {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(23, 32, 45, 0.98);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}

/* Botones Aa / i / tema en los temas oscuros nuevos */
.pvcatalog-app[data-pvc-theme="gris"] .pvcatalog-theme-toggle,
.pvcatalog-app[data-pvc-theme="gris"] .pvcatalog-font-toggle,
.pvcatalog-app[data-pvc-theme="gris"] .pvcatalog-info-toggle,
.pvcatalog-app[data-pvc-theme="medianoche"] .pvcatalog-theme-toggle,
.pvcatalog-app[data-pvc-theme="medianoche"] .pvcatalog-font-toggle,
.pvcatalog-app[data-pvc-theme="medianoche"] .pvcatalog-info-toggle {
    background: rgba(15, 23, 36, 0.9);
    color: var(--pvc-ink);
    border-color: rgba(148, 163, 184, 0.3);
}

.pvcatalog-app[data-pvc-theme="gris"] .pvcatalog-font-controls,
.pvcatalog-app[data-pvc-theme="medianoche"] .pvcatalog-font-controls {
    background: rgba(23, 32, 45, 0.97);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--pvc-ink);
}

.pvcatalog-app[data-pvc-theme="gris"] .pvcatalog-search input,
.pvcatalog-app[data-pvc-theme="gris"] .pvcatalog-search input[type="search"],
.pvcatalog-app[data-pvc-theme="gris"] .pvcatalog-search input[type="search"]:focus,
.pvcatalog-app[data-pvc-theme="medianoche"] .pvcatalog-search input,
.pvcatalog-app[data-pvc-theme="medianoche"] .pvcatalog-search input[type="search"],
.pvcatalog-app[data-pvc-theme="medianoche"] .pvcatalog-search input[type="search"]:focus {
    background: transparent;
    color: var(--pvc-ink);
}

/* ===== 2.5.0: TEMA GRIS (dim estilo X.com, azul grisaceo suave) ===== */

.pvcatalog-app[data-pvc-theme="gris"] {
    --pvc-ink: #e7e9ea;
    --pvc-muted: #8b98a5;
    --pvc-glass: rgba(30, 39, 50, 0.88);
    --pvc-glass-strong: rgba(35, 45, 58, 0.96);
    --pvc-teal: #4cc9be;
    --pvc-teal-bright: #7fdbd2;
    --pvc-gold: #e0b35a;
    --pvc-shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.35);
    --pvc-shadow-strong: 0 26px 64px rgba(0, 0, 0, 0.45);
}

body.pvc-theme-gris,
body.pvcatalog-canvas-body.pvc-theme-gris {
    background:
        radial-gradient(900px 520px at 8% -6%, rgba(76, 201, 190, 0.10), transparent 60%),
        radial-gradient(900px 560px at 96% 4%, rgba(224, 179, 90, 0.07), transparent 58%),
        linear-gradient(170deg, #15202b, #1a2734) !important;
}

.pvcatalog-page[data-pvc-theme="gris"] {
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(76, 201, 190, 0.10), transparent 62%),
        radial-gradient(760px 460px at 96% 4%, rgba(224, 179, 90, 0.06), transparent 60%),
        #15202b;
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-document {
    border-color: rgba(139, 152, 165, 0.18);
    background: rgba(25, 34, 45, 0.97);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-row {
    color: #e1e6ea;
    border-bottom-color: rgba(139, 152, 165, 0.14);
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-row:hover {
    background: linear-gradient(90deg, rgba(76, 201, 190, 0.12), rgba(76, 201, 190, 0.04) 55%, transparent);
    box-shadow: inset 3px 0 0 rgba(76, 201, 190, 0.55);
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-row--year {
    background: linear-gradient(90deg, rgba(76, 201, 190, 0.16), rgba(25, 34, 45, 0.96) 55%, rgba(76, 201, 190, 0.16));
    color: #7fdbd2;
    border-top-color: rgba(76, 201, 190, 0.25);
    border-bottom-color: rgba(76, 201, 190, 0.25);
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-row--month {
    background: linear-gradient(90deg, rgba(224, 179, 90, 0.12), rgba(224, 179, 90, 0.04));
    color: #e0b35a;
    box-shadow: inset 3px 0 0 rgba(224, 179, 90, 0.5);
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-row mark {
    background: rgba(224, 179, 90, 0.30);
    color: #fff6e0;
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-skeleton__dot,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-skeleton__bar {
    background: linear-gradient(90deg, rgba(139, 152, 165, 0.14) 25%, rgba(139, 152, 165, 0.26) 46%, rgba(139, 152, 165, 0.14) 62%);
    background-size: 220% 100%;
}

.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-app .pvcatalog-top {
    background: rgba(35, 45, 58, 0.95);
    border-color: rgba(76, 201, 190, 0.35);
    color: #e1e6ea;
}

/* ===== 2.5.0: TEMA MEDIANOCHE (negro profundo AMOLED) ===== */

.pvcatalog-app[data-pvc-theme="medianoche"] {
    --pvc-ink: #ececec;
    --pvc-muted: #8f97a3;
    --pvc-glass: rgba(12, 12, 14, 0.92);
    --pvc-glass-strong: rgba(18, 18, 21, 0.97);
    --pvc-teal: #2dd4bf;
    --pvc-teal-bright: #6ceee0;
    --pvc-gold: #fbbf24;
    --pvc-shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.6);
    --pvc-shadow-strong: 0 26px 64px rgba(0, 0, 0, 0.7);
}

body.pvc-theme-medianoche,
body.pvcatalog-canvas-body.pvc-theme-medianoche {
    background:
        radial-gradient(900px 520px at 8% -6%, rgba(45, 212, 191, 0.08), transparent 60%),
        linear-gradient(170deg, #000000, #08090c) !important;
}

.pvcatalog-page[data-pvc-theme="medianoche"] {
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(45, 212, 191, 0.08), transparent 62%),
        #000000;
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-document {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(10, 11, 13, 0.98);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-row {
    color: #e6e6e6;
    border-bottom-color: rgba(148, 163, 184, 0.10);
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-row:hover {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.12), rgba(45, 212, 191, 0.04) 55%, transparent);
    box-shadow: inset 3px 0 0 rgba(45, 212, 191, 0.6);
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-row--year {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.16), rgba(10, 11, 13, 0.97) 55%, rgba(45, 212, 191, 0.16));
    color: #6ceee0;
    border-top-color: rgba(45, 212, 191, 0.3);
    border-bottom-color: rgba(45, 212, 191, 0.3);
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-row--month {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.03));
    color: #fbbf24;
    box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.5);
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-row mark {
    background: rgba(251, 191, 36, 0.32);
    color: #fff7e0;
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-skeleton__dot,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-skeleton__bar {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.10) 25%, rgba(148, 163, 184, 0.20) 46%, rgba(148, 163, 184, 0.10) 62%);
    background-size: 220% 100%;
}

.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-app .pvcatalog-top {
    background: rgba(18, 18, 21, 0.96);
    border-color: rgba(45, 212, 191, 0.35);
    color: #ececec;
}

/* ===== 2.5.1: el color base del app SIGUE a las variables del tema.
   El titulo (marca) y todo texto heredaban el color del contenedor padre,
   donde las variables del tema no aplican; con esta regla, TODOS los temas
   (viejos y nuevos) heredan su tinta correcta. ===== */

.pvcatalog-app[data-pvc-theme] {
    color: var(--pvc-ink);
}

/* ===== 2.5.1: barra superior y pildora del buscador tematizadas ===== */

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-toolbar {
    border-color: rgba(138, 90, 24, 0.3);
    box-shadow: var(--pvc-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-toolbar,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-toolbar,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-toolbar {
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: var(--pvc-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-toolbar::after,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-toolbar::after,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-toolbar::after {
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.07) 50%, transparent 68%);
    background-size: 260% 100%;
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-app .pvcatalog-search {
    border-color: rgba(138, 90, 24, 0.3);
    background: rgba(251, 244, 226, 0.85);
    box-shadow: inset 0 1px 3px rgba(90, 62, 20, 0.10), 0 4px 12px rgba(90, 62, 20, 0.06);
}

.pvcatalog-page[data-pvc-theme="sepia"] .pvcatalog-app .pvcatalog-search:focus-within {
    border-color: rgba(138, 90, 24, 0.6);
    background: #fbf4e2;
    box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.18), 0 8px 20px rgba(90, 62, 20, 0.10);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-app .pvcatalog-search,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-app .pvcatalog-search,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-app .pvcatalog-search {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 36, 0.72);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pvcatalog-page[data-pvc-theme="oscuro"] .pvcatalog-app .pvcatalog-search:focus-within,
.pvcatalog-page[data-pvc-theme="gris"] .pvcatalog-app .pvcatalog-search:focus-within,
.pvcatalog-page[data-pvc-theme="medianoche"] .pvcatalog-app .pvcatalog-search:focus-within {
    border-color: var(--pvc-teal);
    background: rgba(15, 23, 36, 0.95);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.16), 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* ===== 2.5.1: TEMA MENTA (claro verdoso, descanso visual) ===== */

.pvcatalog-app[data-pvc-theme="menta"] {
    --pvc-ink: #1d3a31;
    --pvc-muted: #5f7d72;
    --pvc-glass: rgba(236, 249, 243, 0.82);
    --pvc-glass-strong: rgba(243, 252, 247, 0.94);
    --pvc-teal: #0f766e;
    --pvc-teal-bright: #14b8a6;
    --pvc-gold: #8a6d1d;
}

body.pvc-theme-menta,
body.pvcatalog-canvas-body.pvc-theme-menta {
    background:
        radial-gradient(900px 520px at 8% -6%, rgba(52, 211, 153, 0.20), transparent 60%),
        radial-gradient(900px 560px at 96% 4%, rgba(20, 184, 166, 0.14), transparent 58%),
        linear-gradient(170deg, #eefbf4, #e2f5eb) !important;
}

.pvcatalog-page[data-pvc-theme="menta"] {
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(52, 211, 153, 0.18), transparent 62%),
        radial-gradient(760px 460px at 96% 4%, rgba(20, 184, 166, 0.12), transparent 60%),
        #ecf9f1;
}

.pvcatalog-page[data-pvc-theme="menta"] .pvcatalog-document {
    border-color: rgba(16, 122, 87, 0.18);
    background: rgba(250, 254, 252, 0.96);
}

.pvcatalog-page[data-pvc-theme="menta"] .pvcatalog-row {
    color: #1d3a31;
    border-bottom-color: rgba(16, 122, 87, 0.12);
}

.pvcatalog-page[data-pvc-theme="menta"] .pvcatalog-row--year {
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.20), rgba(250, 254, 252, 0.96) 55%, rgba(52, 211, 153, 0.20));
    color: #0f766e;
    border-top-color: rgba(16, 122, 87, 0.25);
    border-bottom-color: rgba(16, 122, 87, 0.25);
}

.pvcatalog-page[data-pvc-theme="menta"] .pvcatalog-row--month {
    background: linear-gradient(90deg, rgba(163, 217, 165, 0.35), rgba(236, 249, 243, 0.4));
    color: #3f6212;
    box-shadow: inset 3px 0 0 rgba(77, 124, 15, 0.45);
}

/* ===== 2.5.1: TEMA CELESTE (claro azulado frio, tipo papel) ===== */

.pvcatalog-app[data-pvc-theme="celeste"] {
    --pvc-ink: #1e3a5f;
    --pvc-muted: #64748b;
    --pvc-glass: rgba(235, 244, 252, 0.82);
    --pvc-glass-strong: rgba(243, 249, 254, 0.94);
    --pvc-teal: #0369a1;
    --pvc-teal-bright: #0ea5e9;
    --pvc-gold: #92610e;
}

body.pvc-theme-celeste,
body.pvcatalog-canvas-body.pvc-theme-celeste {
    background:
        radial-gradient(900px 520px at 8% -6%, rgba(56, 189, 248, 0.20), transparent 60%),
        radial-gradient(900px 560px at 96% 4%, rgba(129, 140, 248, 0.12), transparent 58%),
        linear-gradient(170deg, #edf6fd, #e1eef9) !important;
}

.pvcatalog-page[data-pvc-theme="celeste"] {
    background:
        radial-gradient(680px 420px at 8% -4%, rgba(56, 189, 248, 0.18), transparent 62%),
        radial-gradient(760px 460px at 96% 4%, rgba(129, 140, 248, 0.10), transparent 60%),
        #ebf4fc;
}

.pvcatalog-page[data-pvc-theme="celeste"] .pvcatalog-document {
    border-color: rgba(3, 105, 161, 0.16);
    background: rgba(250, 253, 255, 0.96);
}

.pvcatalog-page[data-pvc-theme="celeste"] .pvcatalog-row {
    color: #1e3a5f;
    border-bottom-color: rgba(3, 105, 161, 0.12);
}

.pvcatalog-page[data-pvc-theme="celeste"] .pvcatalog-row--year {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.18), rgba(250, 253, 255, 0.96) 55%, rgba(56, 189, 248, 0.18));
    color: #0369a1;
    border-top-color: rgba(3, 105, 161, 0.24);
    border-bottom-color: rgba(3, 105, 161, 0.24);
}

.pvcatalog-page[data-pvc-theme="celeste"] .pvcatalog-row--month {
    background: linear-gradient(90deg, rgba(129, 140, 248, 0.18), rgba(235, 244, 252, 0.4));
    color: #4f46e5;
    box-shadow: inset 3px 0 0 rgba(79, 70, 229, 0.4);
}
