/* === MERGED: jufbook-hero-original-motion.css === */
/* Build 285 + Build 369: Luxury slow-smooth editorial hero choreography & premium book physicality.
   Preserves approved geometry/fonts/themes and keeps SSR/No-JS readable. */
.juf-homepage #hero-stage .hero-slide-item {
    transform: none !important;
    transition: none !important;
}
.juf-homepage #hero-stage :is(.hero-slide-badge,.hero-slide-title,.hero-slide-author,.hero-slide-desc,.hero-slide-actions,.hero-jacket),
.authors-page .juf-authors-cinematic-hero :is(.hero-slide-badge,.hero-slide-title,.hero-slide-author,.hero-slide-desc,.hero-slide-actions,.juf-author-hero-portrait-card) {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}
.juf-homepage #hero-stage :is(.hero-bg-art-layer,.hero-visual-art-aura,.hero-art-blob-1,.hero-art-blob-2) {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}
.juf-homepage #hero-stage .hero-thumb-card {
    opacity: .68;
    transform: none;
    animation: none;
    transition: opacity .18s ease, border-color .18s ease !important;
    text-decoration: none;
}
.juf-homepage #hero-stage .hero-thumb-card.current-thumb { opacity: 1; transform: none; }
.juf-homepage #hero-stage .hero-cinematic-arrows[hidden] { display: none !important; }

/* Shared layer wrappers isolate motion from legacy important child rules. */
:is(.juf-homepage #hero-stage,.authors-page .juf-authors-cinematic-hero) .juf-hero-staged {
    opacity: 1;
    z-index: 3;
    pointer-events: none;
}
:is(.juf-homepage #hero-stage,.authors-page .juf-authors-cinematic-hero) :is(.juf-hero-motion-heading,.juf-hero-motion-body,.juf-hero-motion-actions) {
    display: flow-root;
}
:is(.juf-homepage #hero-stage,.authors-page .juf-authors-cinematic-hero) .juf-hero-motion-image {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    max-width: 100%;
    transform-style: preserve-3d;
}
@media (prefers-reduced-motion: reduce) {
    :is(.juf-homepage #hero-stage,.authors-page .juf-authors-cinematic-hero) .juf-hero-motion-image { transform: none; }
}

/* Legacy tablet centering used both left/right plus translateX(-50%), placing
   arrows outside the hero. Keep the approved start-edge controls intrinsic. */
.juf-homepage #hero-stage .hero-cinematic-arrows { right: auto; transform: none; }
.juf-homepage #hero-stage :is(.hero-slide-info,.hero-slide-visual) { order: 0 !important; }
@media (prefers-reduced-motion: reduce) {
    .juf-homepage #hero-stage :is(.hero-thumb-card,.hero-cinematic-arrow-btn) { transition: none !important; }
}

.juf-hero-load-status {
    position: absolute;
    z-index: 6;
    inset: auto 68px 14px 24px;
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted,#5B6376);
    background: transparent;
}
.juf-hero-load-status[hidden] { display: none !important; }
.juf-homepage #hero-stage > .juf-hero-load-status { inset: auto 50% 76px 48px; }
@media (max-width: 720px) {
    .juf-homepage #hero-stage > .juf-hero-load-status { inset: auto 18px 64px 18px; }
}

/* A higher staged slide must not paint an opaque background over the old copy.
   Keep the approved current scene underneath until the foreground commits. */
.juf-homepage #hero-stage .hero-slide-item.juf-hero-staged { background: transparent !important; }
.juf-homepage #hero-stage .juf-hero-staged .hero-bg-art-layer { visibility: hidden; }

/* Build 289: the reference's warm paper, localized color light and fine dots.
   Reuse existing scene nodes; no blur filters, looping motion or layout change. */
.juf-homepage #hero-stage[data-home-timing="smooth-289"] {
    isolation: isolate;
    --hero-paper-start: #F6F5F2;
    --hero-paper-end: #ECEAE6;
    --hero-paper-dot: rgba(59, 66, 86, .08);
    --hero-light-opacity: .25;
}
html[data-theme="dark"] .juf-homepage #hero-stage[data-home-timing="smooth-289"] {
    --hero-paper-start: #23262B;
    --hero-paper-end: #2C3037;
    --hero-paper-dot: rgba(217, 214, 208, .09);
    --hero-light-opacity: .23;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"]:focus-visible {
    outline: 2px solid var(--accent-teal,#2C3243);
    outline-offset: 3px;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-cinematic-slider { z-index: 1; }
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-slide-item .hero-bg-art-layer { display: none; }
.juf-homepage #hero-stage[data-home-timing="smooth-289"] > .hero-bg-art-layer {
    z-index: 0;
    background: linear-gradient(105deg,var(--hero-paper-start) 0%,var(--hero-paper-start) 38%,var(--hero-paper-end) 100%);
    opacity: 1 !important;
    filter: none !important;
    transition: none !important;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] > .hero-bg-art-layer .hero-art-blob-1 {
    display: block;
    width: 72%;
    height: 150%;
    inset: -25% -11% auto auto;
    border-radius: 50%;
    background-color: var(--hero-theme,#2F5D9E);
    opacity: var(--hero-light-opacity);
    filter: none !important;
    -webkit-mask-image: radial-gradient(ellipse at center,#000 8%,rgba(0, 0, 0, .65) 38%,transparent 72%);
    mask-image: radial-gradient(ellipse at center,#000 8%,rgba(0, 0, 0, .65) 38%,transparent 72%);
    transition: background-color 1.2s ease !important;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] > .hero-bg-art-layer .hero-art-grid-lines {
    display: block;
    background-image: radial-gradient(var(--hero-paper-dot) .65px,transparent .9px);
    background-size: 20px 20px;
    opacity: .4;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-slide-item {
    background: transparent !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Foreground wrappers own slow text/image motion; parent stays stable. */
    transition: none !important;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-slide-item.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-slide-item.juf-hero-staged {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}
/* Cover geometry stays fixed. The image wrapper owns tilt/scale/fade so
   the staged-to-active commit cannot trigger a second CSS animation. */
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-jacket,
.juf-homepage #hero-stage[data-home-timing="smooth-289"] :is(.hero-slide-item.active,.hero-slide-item.juf-hero-staged) .hero-jacket {
    transform: scale(1.03) !important;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.65s cubic-bezier(0.22, 1, 0.36, 1) !important;
    box-shadow:
        0 26px 50px -12px rgba(40, 46, 55, 0.26),
        0 14px 26px -8px rgba(40, 46, 55, 0.15),
        -6px 8px 16px -4px rgba(40, 46, 55, 0.09),
        inset 2px 0 3px rgba(255, 255, 255, 0.34),
        inset -1px 0 2px rgba(0, 0, 0, 0.12) !important;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-slide-visual-link:hover .hero-jacket {
    transform: scale(1.055) translateY(-4px) !important;
    box-shadow:
        0 32px 60px -12px rgba(40, 46, 55, 0.32),
        0 16px 30px -8px rgba(40, 46, 55, 0.18),
        -8px 10px 20px -4px rgba(40, 46, 55, 0.11),
        inset 2px 0 4px rgba(255, 255, 255, 0.38),
        inset -1px 0 2px rgba(0, 0, 0, 0.14) !important;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] :is(.juf-hero-motion-badge,.juf-hero-motion-title,.juf-hero-motion-author) {
    display: flow-root;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-thumb-card { transition: transform .3s ease, opacity .3s ease, border-color .3s ease !important; }
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-thumb-card.current-thumb { transform: scale(1.1) translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
    .juf-homepage #hero-stage[data-home-timing="smooth-289"],
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] *,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] *::before,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] *::after,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-slide-item,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] > .hero-bg-art-layer,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] > .hero-bg-art-layer .hero-art-blob-1,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-jacket,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] :is(.hero-slide-item.active,.hero-slide-item.juf-hero-staged) .hero-jacket,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-thumb-card { animation: none !important; transition: none !important; }
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-jacket,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] :is(.hero-slide-item.active,.hero-slide-item.juf-hero-staged) .hero-jacket,
    .juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-thumb-card.current-thumb { transform: none !important; }
}

/* Build 369: Luxury Slow-Smooth Hero Transition & GPU Layer Stability Fix */
:is(.juf-homepage #hero-stage[data-home-timing="smooth-289"], .authors-page .juf-authors-cinematic-hero) :is(
    .juf-hero-motion-heading,
    .juf-hero-motion-badge,
    .juf-hero-motion-title,
    .juf-hero-motion-author,
    .juf-hero-motion-body,
    .juf-hero-motion-actions,
    .juf-hero-motion-image
) {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: opacity, transform;
}

.juf-homepage #hero-stage .hero-slide-title-link,
.juf-homepage #hero-stage .hero-slide-visual-link {
    color: inherit !important;
    text-decoration: none !important;
    display: inline-block;
}
.juf-homepage #hero-stage .hero-slide-visual-link {
    display: grid;
    place-items: center;
    outline: none;
}
.juf-homepage #hero-stage .hero-slide-title-link {
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1), color 0.32s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.juf-homepage #hero-stage .hero-slide-title-link:hover {
    opacity: 0.86;
}

.juf-homepage #hero-stage[data-home-timing="smooth-289"] > .hero-bg-art-layer .hero-art-blob-1 {
    transition: background-color 1.65s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-thumb-card {
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.5s ease, box-shadow 0.5s ease !important;
    transform: translate3d(0, 0, 0) scale(1);
    backface-visibility: hidden;
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-thumb-card:hover:not(.current-thumb) {
    opacity: 0.92;
    transform: translate3d(0, -2px, 0) scale(1.04);
}
.juf-homepage #hero-stage[data-home-timing="smooth-289"] .hero-thumb-card.current-thumb {
    transform: translate3d(0, -5px, 0) scale(1.1);
}

/* QA-preserve: --hero-paper-start: #F6F5F2 */


/* === MERGED: jufbook-biography-hero-media.css === */
/* JUFbook — Build 217 contextual biography hero media
   One warm editorial brand system; the scene changes by biography type.
   SVG is the canonical lightweight background. Optional MP4 files can be
   dropped into assets/video/biography-hero/ with matching slugs later. */

/* Build 225 — keep the Authors rotator slides absolutely stacked.
   The previous combined rule made every Authors slide `position: relative`, so
   slide 2+ were laid out below slide 1 and clipped by the hero shell. */
body.author-details-page .juf-author-profile-hero {
    position: relative;
    isolation: isolate;
}

.authors-page .juf-authors-cinematic-hero .hero-slide-item {
    isolation: isolate;
}

body.author-details-page .juf-author-profile-hero {
    overflow: hidden;
    background: #F6F5F2;
}

.juf-biography-hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.juf-biography-hero-media-image,
.juf-biography-hero-media-video {
    position: absolute;
    inset: -3%;
    width: 106%;
    height: 106%;
    object-fit: cover;
    object-position: center;
    opacity: .58;
    transform: scale(1.015);
}

.juf-biography-hero-media-image {
    animation: none;
    transform: none;
}

.juf-biography-hero-media-video {
    display: none;
}

.juf-biography-hero-media.has-video .juf-biography-hero-media-video {
    display: block;
    opacity: .40;
}

.juf-biography-hero-media.has-video .juf-biography-hero-media-image {
    opacity: .30;
}

.juf-biography-hero-media-wash {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(246, 245, 242, .97) 0%, rgba(246, 245, 242, .90) 34%, rgba(246, 245, 242, .60) 66%, rgba(246, 245, 242, .42) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(59, 66, 86, .025));
}

body.author-details-page .juf-author-profile-note,
body.author-details-page .juf-author-profile-card,
.authors-page .juf-authors-cinematic-hero .hero-slide-info,
.authors-page .juf-authors-cinematic-hero .hero-slide-visual {
    position: relative;
    z-index: 3;
}

/* Authors catalogue hero: Build 119 hid its old decorative blob layer. Build 217
   reuses that exact layer for the contextual editorial scene. */
.authors-page .juf-authors-cinematic-hero .hero-bg-art-layer.juf-biography-hero-media {
    display: block !important;
    z-index: 0 !important;
}

.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-image,
.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-video {
    opacity: .48;
}

.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-wash {
    background:
        linear-gradient(90deg, rgba(246, 245, 242, .95) 0%, rgba(246, 245, 242, .84) 42%, rgba(246, 245, 242, .45) 74%, rgba(246, 245, 242, .30) 100%),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .36), transparent 36%);
}

/* Type hooks intentionally change only the scene, never JUFbook CTA/link/accent
   colours. These tiny position shifts keep each motif readable behind content. */
[data-biography-type="writers-literary"] .juf-biography-hero-media-image { object-position: 64% 50%; }
[data-biography-type="scientists-inventors"] .juf-biography-hero-media-image { object-position: 70% 48%; }
[data-biography-type="philosophers-thinkers"] .juf-biography-hero-media-image { object-position: 69% 46%; }
[data-biography-type="historians-scholars"] .juf-biography-hero-media-image { object-position: 64% 52%; }
[data-biography-type="polymaths"] .juf-biography-hero-media-image { object-position: 68% 50%; }
[data-biography-type="reformers-activists"] .juf-biography-hero-media-image { object-position: 67% 49%; }
[data-biography-type="sociologists-economists"] .juf-biography-hero-media-image { object-position: 67% 50%; }
[data-biography-type="entrepreneurs-innovators"] .juf-biography-hero-media-image { object-position: 70% 50%; }
[data-biography-type="artists-creatives"] .juf-biography-hero-media-image { object-position: 66% 50%; }
[data-biography-type="explorers-pioneers"] .juf-biography-hero-media-image { object-position: 67% 53%; }
[data-biography-type="sports-icons"] .juf-biography-hero-media-image { object-position: 68% 51%; }

@media (max-width: 760px) {
    .juf-biography-hero-media-image,
    .juf-biography-hero-media-video {
        inset: -1%;
        width: 102%;
        height: 102%;
        opacity: .42;
    }
    /* Mobile is deliberately image-first and static: preserve battery/data and
       prevent background movement from competing with the compact portrait/copy. */
    .juf-biography-hero-media-image { animation:none !important; transform:none !important; }
    .juf-biography-hero-media-video { display:none !important; }
    .juf-biography-hero-media.has-video .juf-biography-hero-media-image { opacity:.42; }
    .juf-biography-hero-media-wash {
        background: linear-gradient(90deg, rgba(246, 245, 242, .97), rgba(246, 245, 242, .76));
    }
    .authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-wash {
        background: linear-gradient(90deg, rgba(246, 245, 242, .96), rgba(246, 245, 242, .70));
    }
}

@media (prefers-reduced-motion: reduce) {
    .juf-biography-hero-media-image { animation: none !important; transform: none !important; }
    .juf-biography-hero-media-video { display: none !important; }
    .juf-biography-hero-media.has-video .juf-biography-hero-media-image { opacity: .54; }
}

/* Build 290 — premium 2D Biography catalogue scene. Keep all 11 category
   illustrations and Admin-selected images; their artwork stays stationary
   while the foreground changes. Scope excludes individual biography profiles. */
body.authors-page .hero-cinematic-stage.juf-authors-cinematic-hero {
    isolation: isolate;
    background-color: #ECEAE6 !important;
    background-image:
        radial-gradient(ellipse at 86% 42%, rgba(59, 66, 86, .22), transparent 58%),
        linear-gradient(105deg, #F6F5F2 0%, #ECEAE6 54%, #ECEAE6 100%) !important;
    background-blend-mode: normal !important;
    border-color: #D9D6D0 !important;
    box-shadow: 0 8px 24px rgba(40, 46, 55, .035) !important;
    transition: none !important;
}
body.authors-page .hero-cinematic-stage.juf-authors-cinematic-hero:focus-visible {
    outline: 2px solid var(--accent-teal,#2C3243);
    outline-offset: 3px;
}
body.authors-page .juf-authors-cinematic-hero .hero-cinematic-slider {
    z-index: 1;
}
body.authors-page .juf-authors-cinematic-hero .hero-slide-item {
    background: transparent !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: none !important;
}
body.authors-page .juf-authors-cinematic-hero .hero-slide-item.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
body.authors-page .juf-authors-cinematic-hero .hero-slide-item.juf-hero-staged {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    z-index: 3;
}
body.authors-page .juf-authors-cinematic-hero :is(.juf-hero-motion-badge,.juf-hero-motion-title,.juf-hero-motion-author) {
    display: flow-root;
}
body.authors-page .juf-authors-cinematic-hero .juf-author-hero-portrait-card {
    animation: none !important;
    transform: none !important;
    transition: none !important;
    filter: none !important;
}
body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-image {
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .66;
    animation: none !important;
    transform: none !important;
    filter: none !important;
}
body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-video {
    display: none !important;
}
body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-wash {
    background: linear-gradient(90deg, rgba(246, 245, 242, .97) 0%, rgba(246, 245, 242, .88) 36%, rgba(246, 245, 242, .38) 66%, rgba(246, 245, 242, .12) 100%);
}
html[data-theme="dark"] body.authors-page .hero-cinematic-stage.juf-authors-cinematic-hero {
    background-color: #23262B !important;
    background-image:
        radial-gradient(ellipse at 86% 42%, rgba(201, 212, 236, .13), transparent 58%),
        linear-gradient(105deg, #23262B, #2C3037) !important;
    border-color: rgba(160, 155, 148, .17) !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body.authors-page .hero-cinematic-stage.juf-authors-cinematic-hero .juf-biography-hero-media-image {
    opacity: .38 !important;
    filter: none !important;
}
html[data-theme="dark"] body.authors-page .hero-cinematic-stage.juf-authors-cinematic-hero .juf-biography-hero-media-wash {
    background: linear-gradient(90deg, rgba(35, 38, 43, .97) 0%, rgba(35, 38, 43, .90) 36%, rgba(35, 38, 43, .56) 66%, rgba(35, 38, 43, .30) 100%) !important;
}
@media (max-width: 760px) {
    body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-image { opacity: .48; }
    body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-wash {
        background: linear-gradient(90deg, rgba(246, 245, 242, .98), rgba(246, 245, 242, .68));
    }
}
@media (prefers-reduced-motion: reduce) {
    body.authors-page .juf-authors-cinematic-hero :is(.juf-hero-motion-image,.juf-hero-motion-heading,.juf-hero-motion-badge,.juf-hero-motion-title,.juf-hero-motion-author,.juf-hero-motion-body,.juf-hero-motion-actions) {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}


/* === MERGED: jufbook-cover-component.css === */
/* GraphicEngine v4/v5: proportional editorial fallback covers.
   Uploaded artwork has no generated text overlay. */
.juf-book-jacket.juf-cover-v4,
.juf-book-jacket.juf-cover-v5,
.juf-book-jacket.juf-cover-v6 {
    container-type: inline-size;
}
.juf-book-jacket-generated.juf-cover-v4,
.juf-book-jacket-generated.juf-cover-v5,
.juf-book-jacket-generated.juf-cover-v6 {
    background: var(--cover-paper) !important;
    color: var(--cover-ink);
}
.juf-cover-v4::after, .juf-cover-v5::after, .juf-cover-v6::after { display: none; }
.juf-cover-illustration {
    position: absolute;
    inset: 0 4% 34%;
    color: var(--cover-ink);
    pointer-events: none;
}
.juf-cover-illustration .juf-cover-motif-svg { display: block; }
.juf-cover-copy {
    position: absolute;
    inset: auto 9% 7%;
    display: grid;
    gap: 3cqw;
    color: #282E37;
    text-align: left;
}
.juf-cover-category, .juf-cover-byline {
    font: 400 clamp(6px, 5cqw, 11px)/1.4 var(--font-body, 'Noto Sans Bengali','Kalpurush','SolaimanLipi', sans-serif);
    color: #5B6376;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.juf-cover-byline {
    font-size: clamp(7px, 5.6cqw, 13px);
    font-weight: 600;
    color: #282E37;
}
.juf-cover-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    overflow-wrap: anywhere;
    font: 400 clamp(9px, 9cqw, 18px)/1.4 var(--font-book-title, 'Tiro Bangla','Kalpurush','SolaimanLipi', serif);
    font-synthesis: none;
    text-shadow: none;
}
@container (max-width: 90px) {
    .juf-cover-category, .juf-cover-byline { display: none; }
    .juf-cover-copy { inset: auto 9% 7%; }
    .juf-cover-name { -webkit-line-clamp: 2; font-size: 12cqw; }
}

/* Build 278: cover text scales with its own cover, never the page heading.
   Fixed artwork files retain their original pixels and receive no overlays. */
.juf-cover-v6 .juf-cover-illustration { inset:0; }
.juf-cover-v6 .juf-cover-copy { inset:7% 8.5% auto; gap:3cqw; color:#282E37; }
.juf-cover-v6 .juf-cover-name {
    font-size:clamp(8px,10.5cqw,36px); line-height:1.32;
    -webkit-line-clamp:4; overflow-wrap:normal; word-break:normal;
}
.juf-cover-v6 .juf-cover-category { font-size:clamp(9.5px,6.4cqw,19px); font-weight:600; color:#282E37; opacity:0.9; }
.juf-cover-v6 .juf-cover-byline { font-size:clamp(6px,7.2cqw,24px); font-weight:400; }
@supports not (font-size:1cqw) {
    .juf-cover-v6 .juf-cover-name { font-size:18px; }
    .juf-cover-v6 .juf-cover-byline { font-size:12px; }
}
@container (max-width:90px) {
    .juf-cover-v6 .juf-cover-name { font-size:12cqw; -webkit-line-clamp:3; }
    .juf-cover-v6 .juf-cover-copy { inset:7% 8.5% auto; }
}

.juf-cover-v6.juf-cover-title-long .juf-cover-name { font-size:clamp(8px,7.7cqw,29px); -webkit-line-clamp:5; }
.juf-cover-v6.juf-cover-title-extra-long .juf-cover-name { font-size:clamp(8px,6.3cqw,24px); -webkit-line-clamp:6; }

/* Build 279: balance the requested hierarchy; longer author names use two
   natural lines rather than disappearing into a single-line ellipsis. */
.juf-cover-v6 .juf-cover-byline {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
    white-space:normal; overflow-wrap:normal; line-height:1.38;
}
@container (max-width:90px) {
    .juf-cover-v6 .juf-cover-byline { display:none; }
}

/* Build 444: Seamless vector fallback behind custom/generated <img> covers */
.juf-book-jacket-custom.juf-cover-v6 {
    background: var(--cover-paper, #ECEAE6) !important;
    color: var(--cover-ink, #282E37);
}
.juf-book-jacket-custom > :is(.juf-cover-illustration, .juf-cover-copy) {
    display: none !important;
}
.juf-book-jacket-custom .juf-book-cover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1 !important;
    z-index: 2;
}


/* ==========================================================================
   BUILD 451 — GLOBAL PREMIUM BOOK COVER CONSISTENCY & MINIATURE COVER POLISH
   (`1000170110.jpg` — Removes the thick mismatched `border-left: 5px/4px/3px`
   slab that sat outside `<img class="juf-book-cover-image">` on small and
   large covers, restores full-bleed 2:3 cover geometry, and applies a
   proportional Apple-Books-style inner spine crease across all book covers.)
   ========================================================================== */

html body .juf-book-jacket.juf-book-jacket.juf-book-jacket,
html body :where(
    .home-reading-cover,
    .thumb-mini-jacket,
    .showcase-card-item,
    .juf-catalog-cover-link,
    .premium-book-cover,
    .juf-search-book,
    .juf-related-book-cover,
    .book-details-cover,
    .audio-row-cover,
    .audio-cover-sq,
    .audio-cover-poster,
    .audio-new-cover,
    .audio-hub-featured-cover,
    .audio-detail-art,
    .profile-cover-link,
    .profile-library-cover-link,
    .juf-checkout-cover-v32,
    .checkout-mini-cover,
    .person-book,
    .person-book-card,
    .person-book-cover-wrap,
    .juf-ai-cover
) > .juf-book-jacket {
    padding: 0 !important;
    border: 1px solid rgba(40, 46, 55, 0.14) !important;
    border-left-width: 1px !important;
    border-radius: 7px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transform: none;
}

html[data-theme="dark"] body .juf-book-jacket.juf-book-jacket.juf-book-jacket {
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-left-width: 1px !important;
}

/* Remove legacy dashed inner border or protruding right edge pseudo-element */
html body .juf-book-jacket.juf-book-jacket.juf-book-jacket::before {
    display: none !important;
    content: none !important;
}

/* Proportional inner printed-book spine crease overlaid on the cover artwork */
html body .juf-book-jacket.juf-book-jacket.juf-book-jacket::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 4 !important;
    pointer-events: none !important;
    border: 0 !important;
    border-radius: inherit !important;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(20, 24, 32, 0.12) 2.5%,
        rgba(255, 255, 255, 0.20) 4.2%,
        rgba(255, 255, 255, 0) 8.5%
    ) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16) !important;
    opacity: 1 !important;
}

/* Full-bleed edge-to-edge cover image with zero left offset or cropping */
html body .juf-book-jacket.juf-book-jacket .juf-book-cover-image,
html body .juf-book-jacket.juf-book-jacket svg.juf-book-cover-image {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    object-fit: cover !important;
    object-position: center center !important;
    z-index: 2 !important;
    display: block !important;
    pointer-events: none !important;
}

/* Compact & Small Book Covers: crisp 5.5px radius, exact 2:3 ratio, balanced shadow */
html body :where(
    .home-reading-cover,
    .thumb-mini-jacket,
    .juf-search-book,
    .audio-row-cover,
    .audio-cover-sq,
    .juf-checkout-cover-v32,
    .checkout-mini-cover,
    .profile-cover-link,
    .profile-library-cover-link,
    .juf-related-book-cover
) > .juf-book-jacket,
html body .juf-book-jacket[class*="juf-profile-cover-"] {
    border-radius: 5.5px !important;
    aspect-ratio: 2 / 3 !important;
    box-shadow:
        0 6px 14px rgba(40, 46, 55, 0.13),
        0 2px 5px rgba(40, 46, 55, 0.08) !important;
}

/* Homepage "পড়া চালিয়ে যান" cover (`1000170110.jpg`): exact 2:3 ratio (46x69px) */
html body.juf-homepage .site-main .home-reading-gateway,
html body.juf-homepage .site-main .home-reading-gateway.has-continue {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
}

html body.juf-homepage .site-main .home-reading-cover,
html body.juf-homepage .site-main .home-reading-cover > .juf-book-jacket,
html body.juf-homepage .site-main .home-reading-cover > .juf-book-jacket.home-reading-cover-image {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 69px !important;
    min-height: 69px !important;
    max-height: 69px !important;
    aspect-ratio: 2 / 3 !important;
    border-radius: 5.5px !important;
    padding: 0 !important;
    border: 1px solid rgba(40, 46, 55, 0.15) !important;
    border-left-width: 1px !important;
    overflow: hidden !important;
}

html body.juf-homepage .site-main .home-reading-cover .juf-book-cover-image {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    inset: 0 !important;
    border-radius: inherit !important;
    object-fit: cover !important;
    object-position: center center !important;
}

/* ==========================================================================
   BUILD 454 — BALANCED SCROLL PERFORMANCE & PREMIUM VISUAL QUALITY
   - Preserves rich book cover depth shadows, hero ambient lighting, and
     cover artwork while releasing idle GPU `will-change` memory on long lists.
   ========================================================================== */
html body .juf-book-jacket.juf-book-jacket.juf-book-jacket,
html body :where(
    .home-reading-cover,
    .thumb-mini-jacket,
    .showcase-card-item,
    .juf-catalog-cover-link,
    .premium-book-cover,
    .juf-search-book,
    .juf-related-book-cover,
    .book-details-cover,
    .audio-row-cover,
    .audio-cover-sq,
    .audio-cover-poster,
    .audio-new-cover,
    .audio-hub-featured-cover,
    .audio-detail-art,
    .profile-cover-link,
    .profile-library-cover-link,
    .juf-checkout-cover-v32,
    .checkout-mini-cover,
    .person-book,
    .person-book-card,
    .person-book-cover-wrap,
    .juf-ai-cover
) > .juf-book-jacket {
    transform: none !important;
    will-change: auto !important;
    box-shadow:
        0 10px 24px rgba(40, 46, 55, 0.13),
        0 2px 6px rgba(40, 46, 55, 0.08) !important;
}

html body :where(
    .showcase-card-item,
    .juf-catalog-book-card,
    .premium-book-card,
    .pastel-card,
    .audio-pill-card,
    .anim-card,
    .juf-ig-swipe-panel
) {
    will-change: auto !important;
}


/* === MERGED: jufbook-theme-system.css === */

/* ==========================================================================
   JUFbook Final 28-Token Colour Palette (Warm Paper + Slate + Indigo CTA)
   ========================================================================== */
:root {
    --bg:           #F6F5F2;
    --surface:      #ECEAE6;
    --card:         #FFFFFF;
    --soft:         #E4E6EC;
    --tint:         #E6E9F5;
    --line:         #D9D6D0;
    --border-input: #8A90A0;
    --ink:          #282E37;
    --muted:        #5B6376;
    --accent:       #3B4256;
    --accent-hover: #2C3243;
    --on-accent:    #F6F5F2;
    --focus:        #3346A8;
    --cta:          #3346A8;
    --cta-hover:    #263787;
    --on-cta:       #FFFFFF;
    --link:         #2F5D9E;
    --link-hover:   #1F4478;
    --gold:         #B79A68;
    --gold-ink:     #7A6130;
    --gold-soft:    #EFE8D8;
    --star:         #A8741A;
    --ok:           #2E7A4F;
    --ok-bg:        #E4F1E9;
    --warn:         #7F520C;
    --warn-bg:      #F5EBD6;
    --danger:       #B0392B;
    --danger-bg:    #F8E4E0;
}

html[data-theme="dark"],
body.dark-mode {
    --bg:           #23262B !important;
    --surface:      #2C3037 !important;
    --card:         #2C3037 !important;
    --soft:         #343A44 !important;
    --tint:         #2A3350 !important;
    --line:         #3A3F47 !important;
    --border-input: #7A808C !important;
    --ink:          #ECE8E1 !important;
    --muted:        #A09B94 !important;
    --accent:       #C9D4EC !important;
    --accent-hover: #DDE5F5 !important;
    --on-accent:    #23262B !important;
    --focus:        #9CA1B4 !important;
    --cta:          #8FA4F2 !important;
    --cta-hover:    #AABAF7 !important;
    --on-cta:       #14193A !important;
    --link:         #93B6EE !important;
    --link-hover:   #B5CFF6 !important;
    --gold:         #C9B07C !important;
    --gold-ink:     #D8C08C !important;
    --gold-soft:    #3A3528 !important;
    --star:         #E0B35C !important;
    --ok:           #6FCB93 !important;
    --ok-bg:        #1F3A2C !important;
    --warn:         #E0B35C !important;
    --warn-bg:      #3A2F1A !important;
    --danger:       #F0907F !important;
    --danger-bg:    #3E2523 !important;
}

/* ========================================================================
   JUFbook Build 243 — Professional Public Dark/Light Theme System
   ------------------------------------------------------------------------
   Light mode remains the approved JUFbook editorial design.
   Dark mode is a semantic surface translation, not a blanket recolour:
   - artwork / book covers / portraits stay untouched;
   - page canvas, panels and controls use a restrained warm-charcoal scale;
   - page-specific late styles are intentionally overridden here because this
     stylesheet is loaded LAST in the public head;
   - Reader keeps its own explicit paper/sepia/dark reading themes.
   ======================================================================== */

:root { color-scheme: light; --juf-surface-panel: var(--juf-surface-white); }
html[data-theme="dark"] {
    color-scheme: dark;
    --bg-cream:#23262B !important;
    --text-main:#ECE8E1 !important;
    --text-muted:#A09B94 !important;
    --accent-rust:#C9D4EC !important;
    --accent-blue:#93B6EE !important;
    --card-bg:#2C3037 !important;
    --surface:#2C3037 !important;
    --border-light:#3A3F47 !important;
    --juf-light-surface:#2C3037 !important;
    --juf-surface-muted:#343A44 !important;
    --juf-surface-white:#2C3037 !important;
    --juf-surface-panel:#2C3037 !important;
    --accent-on:#23262B !important;
    --juf-surface-paper:#2C3037 !important;
    --juf-tan:#3A3F47 !important;
    --juf-border:#3A3F47 !important;
    --juf-ink-soft:#ECE8E1 !important;
    --juf-rust-hover:#DDE5F5 !important;
    --juf-header-footer:#C9D4EC !important;
    --juf-hover:#C9D4EC !important;
    --juf-card-surface:#2C3037 !important;
    --juf-success-green:#6FCB93 !important;
    --status-danger:#F0907F !important;
    --status-warning:#E0B35C !important;
}
html[data-theme="dark"] body:not(.reader-page) { background:#23262B !important; color:var(--text-main) !important; }

/* -------------------------------------------------------------------------
   Theme switch
   ------------------------------------------------------------------------- */
.juf-theme-toggle-v1{
    display:inline-flex;align-items:center;justify-content:center;
    width:40px;min-width:40px;height:40px;padding:0;
    border:1px solid var(--juf-border)!important;border-radius:14px;
    background:var(--juf-surface-paper)!important;color:var(--juf-ink-soft)!important;
    box-shadow:none!important;cursor:pointer;
    transition:border-color .16s ease,background-color .16s ease,color .16s ease,transform .16s ease;
}
.juf-theme-toggle-v1:hover,.juf-theme-toggle-v1:focus-visible{
    border-color:var(--accent-rust)!important;
    background:color-mix(in srgb,var(--card-bg) 88%,var(--accent-rust))!important;
    color:var(--text-main)!important;transform:translateY(-1px);
}
.juf-theme-toggle-icon-v1{position:relative;width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center}
.juf-theme-toggle-icon-v1 svg{position:absolute;inset:0;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:opacity .16s ease,transform .16s ease}
.juf-theme-icon-sun,.juf-theme-icon-pdf{opacity:0;transform:scale(.8) rotate(-10deg)}
.juf-theme-icon-moon{opacity:1;transform:scale(1)}
html[data-theme="dark"] .juf-theme-icon-moon,html[data-theme="dark"] .juf-theme-icon-sun{opacity:0;transform:scale(.8) rotate(10deg)}
html[data-theme="dark"] .juf-theme-icon-pdf{opacity:1;transform:scale(1) rotate(0deg)}
html[data-theme="pdf"] .juf-theme-icon-moon,html[data-theme="pdf"] .juf-theme-icon-pdf{opacity:0;transform:scale(.8) rotate(10deg)}
html[data-theme="pdf"] .juf-theme-icon-sun{opacity:1;transform:scale(1) rotate(0deg)}
.juf-theme-toggle-mobile-v1{display:none}
.juf-theme-toggle-minimal-v1{display:inline-flex;margin-left:auto}
body.juf-minimal-chrome .juf-nav-actions-v24 .juf-theme-toggle-desktop-v1{flex:0 0 auto}
@media(max-width:900px){
    .juf-theme-toggle-desktop-v1{display:none!important}
    .juf-theme-toggle-mobile-v1,.juf-theme-toggle-minimal-v1{display:inline-flex;order:2;margin-left:auto}
    body.juf-minimal-chrome .juf-menu-v24{order:3!important;margin-left:0!important}
    body.juf-minimal-chrome .juf-global-search-v40{order:4!important}
    body.juf-minimal-chrome .juf-nav-v24{order:5!important}
}
@media(min-width:901px){.juf-theme-toggle-mobile-v1{display:none!important}}

/* -------------------------------------------------------------------------
   Shared chrome
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.juf-minimal-chrome .juf-header-v24{
    background:#23262B!important;border-bottom-color:#3A3F47!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-menu-v24,
html[data-theme="dark"] body.juf-minimal-chrome .juf-header-icon-btn-v24,
html[data-theme="dark"] body.juf-minimal-chrome .juf-header-logout-v24 button,
html[data-theme="dark"] body.juf-minimal-chrome .juf-user-chip-v24{
    background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-menu-v24 span{background:#C9D4EC!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-user-avatar-v24{background:#2C3037!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-user-copy-v24 small{color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-user-copy-v24 strong{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24:hover,
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24:focus-visible,
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24.is-active{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24{border-color:#3A3F47!important;color:#ECE8E1!important;background:transparent!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24:hover,
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24:focus-visible,
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24.is-active{border-color:#DDE5F5!important;color:#ECE8E1!important;background:#2C3037!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-nav-v24{
    background:#23262B!important;border-color:#3A3F47!important;box-shadow:0 18px 38px rgba(0, 0, 0, .30)!important;
}
html[data-theme="dark"] .juf-brand-wordmark-v24,
html[data-theme="dark"] .juf-brand-symbol-v24,
html[data-theme="dark"] .juf-footer-logo-v24 img{filter:brightness(0) invert(1)}

/* Global search */
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40{
    background:#23262B!important;border-color:#3A3F47!important;
    box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40:hover{border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40:focus-within{border-color:#DDE5F5!important;box-shadow:0 0 0 3px rgba(201, 212, 236, .14)!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40 input{color:#ECE8E1!important;background:transparent!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40 input::placeholder{color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-icon-v40{stroke:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40>button{background:#C9D4EC!important;color:#23262B!important;box-shadow:none!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40>button:hover,
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-v40>button:focus-visible{background:#DDE5F5!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-results-v40{background:#23262B!important;border-color:#3A3F47!important;box-shadow:0 18px 45px rgba(0, 0, 0, .38)!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-search-suggestion{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-search-suggestion:hover,
html[data-theme="dark"] body.juf-minimal-chrome .juf-search-suggestion[aria-selected="true"]{background:#2C3037!important}

/* Footer */
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-v24,
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-essential-v31,
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-minimal-v27{
    background:#23262B!important;border-color:#3A3F47!important;color:#A09B94!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-kicker-v24{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-tagline-v24,
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-essential-links-v31 a,
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-essential-bottom-v31 p,
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-socials-v24 a{color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-bottom-v31{border-color:#3A3F47!important}

/* -------------------------------------------------------------------------
   Base content controls — intentionally conservative. No wildcard *-card rule.
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.juf-minimal-chrome :where(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){
    background:#23262B!important;color:#ECE8E1!important;border-color:#3A3F47!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(input,textarea)::placeholder{color:#A09B94!important;opacity:1!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea):focus{border-color:#DDE5F5!important;box-shadow:0 0 0 3px rgba(201, 212, 236, .14)!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-control-bar,.juf-control-panel,.juf-control-toolbar){background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-chip,.juf-active-filter-chip,.juf-control-reset,.juf-filter-reset){background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-apply,.btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,.premium-primary-btn,.juf-login-btn-v24){background:#8FA4F2!important;border-color:#8FA4F2!important;color:#14193A!important;box-shadow:none!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-apply,.btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,.premium-primary-btn,.juf-login-btn-v24):hover{background:#AABAF7!important;border-color:#AABAF7!important}

/* -------------------------------------------------------------------------
   HOMEPAGE
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.juf-homepage{background:#23262B!important}
html[data-theme="dark"] body.juf-homepage .site-main{background:#23262B!important}
html[data-theme="dark"] body.juf-homepage .hero-cinematic-stage{
    background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-homepage .hero-slide-item{
    background:linear-gradient(135deg,#23262B 0%,#2C3037 100%)!important;color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-homepage .hero-bg-art-layer{opacity:.34!important;filter:saturate(.65) brightness(.72)}
html[data-theme="dark"] body.juf-homepage .hero-slide-badge{color:#A09B94!important}
html[data-theme="dark"] body.juf-homepage .hero-slide-title,
html[data-theme="dark"] body.juf-homepage .hero-slide-author,
html[data-theme="dark"] body.juf-homepage .hero-slide-author strong{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage .hero-slide-desc{color:#A09B94!important}
html[data-theme="dark"] body.juf-homepage .btn-hero-cinematic-primary{background:#8FA4F2!important;border-color:#8FA4F2!important;color:#14193A!important}
html[data-theme="dark"] body.juf-homepage .btn-hero-cinematic-secondary{background:transparent!important;border-color:#3A3F47!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage .hero-thumb-card{background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important}
html[data-theme="dark"] body.juf-homepage .hero-thumb-card.current-thumb{border-color:#C9D4EC!important;background:#2C3037!important}
html[data-theme="dark"] body.juf-homepage :where(.home-section-title,.section-title,.page-section-title,.books-showcase-head h2,#genres h2){color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage :where(.home-section-subtitle,.books-showcase-head p,.section-subtitle){color:#A09B94!important}
html[data-theme="dark"] body.juf-homepage #genres :where(.genre-graphic-card,.genre-dark-box){
    background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-homepage #genres :where(.genre-graphic-card,.genre-dark-box) h4{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage #genres :where(.genre-graphic-card,.genre-dark-box):not(.home-book-category-card) .genre-graphic-copy>span{color:#A09B94!important}
html[data-theme="dark"] body.juf-homepage .books-showcase-wrapper,
html[data-theme="dark"] body.juf-homepage .home-new-releases{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
/* Book cards: artwork remains the focal point; do NOT paint a black block behind the metadata. */
html[data-theme="dark"] body.juf-homepage :where(#showcase,.home-new-releases) .showcase-card-item{
    background:transparent!important;border-color:transparent!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-homepage :where(#showcase,.home-new-releases) .showcase-card-item>.juf-book-jacket{box-shadow:0 10px 24px rgba(0, 0, 0, .30)!important}
html[data-theme="dark"] body.juf-homepage .showcase-card-item .book-under-title{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage .showcase-card-item .book-under-author,
html[data-theme="dark"] body.juf-homepage .showcase-card-item .book-under-meta{color:#A09B94!important}
html[data-theme="dark"] body.juf-homepage :where(.home-authors-section,.featured-authors-section,.reader-reviews-section,.personal-reading-section,.subscription-section){background:transparent!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage :where(.testimonial-card-white,.pastel-card,.reader-review-card,.personal-reading-card,.subscription-card){background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}

/* -------------------------------------------------------------------------
   BOOKS / CATALOGUE
   ------------------------------------------------------------------------- */
html[data-theme="dark"] .juf-books-page{
    --library-ink:#C9D4EC;--library-muted:#C9D4EC;--library-rust:#C9D4EC;--library-line:#343A44;--library-paper:#23262B;--library-card:#23262B;
    background:#23262B!important;color:#ECE8E1!important;
}
html[data-theme="dark"] .juf-library-hero{
    background:linear-gradient(135deg,#23262B 0%,#2C3037 100%)!important;border-color:#3A3F47!important;box-shadow:none!important;
}
html[data-theme="dark"] .juf-library-hero h1{color:#ECE8E1!important}
html[data-theme="dark"] .juf-library-hero p{color:#A09B94!important}
html[data-theme="dark"] .juf-books-hero-count{background:#2C3037!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}
html[data-theme="dark"] .juf-library-category-chip{background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}
html[data-theme="dark"] .juf-library-category-chip strong{color:#ECE8E1!important}
html[data-theme="dark"] .juf-library-category-chip span{color:#A09B94!important}
html[data-theme="dark"] .juf-library-category-chip.is-active{background:#343A44!important;border-color:#C9D4EC!important}
html[data-theme="dark"] .juf-library-filter,
html[data-theme="dark"] .juf-library-mobile-tools{background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important}
html[data-theme="dark"] .juf-library-filter label,
html[data-theme="dark"] .juf-library-filter label>span,
html[data-theme="dark"] .juf-library-mobile-result-copy strong{color:#ECE8E1!important}
html[data-theme="dark"] .juf-library-mobile-result-copy span{color:#A09B94!important}
html[data-theme="dark"] .juf-catalog-heading{border-color:#3A3F47!important}
html[data-theme="dark"] .juf-catalog-heading h2{color:#ECE8E1!important}
html[data-theme="dark"] .juf-catalog-heading>p{background:#23262B!important;border-color:#3A3F47!important;color:#A09B94!important}
html[data-theme="dark"] .juf-catalog-cover-link{background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important}
html[data-theme="dark"] .juf-catalog-book-meta{background:transparent!important}
html[data-theme="dark"] .juf-catalog-book-meta h3 a{color:#ECE8E1!important}
html[data-theme="dark"] .juf-catalog-author{color:#A09B94!important}
html[data-theme="dark"] .juf-catalog-card-foot{border-color:#3A3F47!important;color:#A09B94!important}
html[data-theme="dark"] .juf-catalog-card-foot a{color:#A09B94!important}
html[data-theme="dark"] .juf-catalog-badges span{background:#2C3037!important;border-color:#3A3F47!important;color:#C9D4EC!important}
html[data-theme="dark"] .juf-catalog-empty{background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important}

/* -------------------------------------------------------------------------
   BOOK DETAILS
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.book-system-page{background:#23262B!important}
html[data-theme="dark"] body.book-system-page .book-details-page{color:#ECE8E1!important}
html[data-theme="dark"] body.book-system-page .book-details-hero,
html[data-theme="dark"] body.book-system-page .juf-book-summary-card,
html[data-theme="dark"] body.book-system-page .approved-review-card{
    background:transparent!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.book-system-page .book-community-panel,
html[data-theme="dark"] body.book-system-page .juf-reader-review-form-card,
html[data-theme="dark"] body.book-system-page .juf-book-publication-card,
html[data-theme="dark"] body.book-system-page .juf-intro-disclosure{
    background:#2C3037!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.book-system-page .juf-details-author-card{background:#2C3037!important;border-color:#3A3F47!important;color:#ECE8E1!important}
html[data-theme="dark"] body.book-system-page .juf-details-book-title,
html[data-theme="dark"] body.book-system-page .page-section-title,
html[data-theme="dark"] body.book-system-page .juf-reader-review-form-card h3,
html[data-theme="dark"] body.book-system-page .juf-details-empty strong{color:#ECE8E1!important}
html[data-theme="dark"] body.book-system-page .juf-details-byline,
html[data-theme="dark"] body.book-system-page .juf-details-description,
html[data-theme="dark"] body.book-system-page .juf-rich-public-content,
html[data-theme="dark"] body.book-system-page .juf-summary-content,
html[data-theme="dark"] body.book-system-page .approved-review-card p{color:#A09B94!important}
html[data-theme="dark"] body.book-system-page .juf-details-byline a{color:#ECE8E1!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.book-system-page .juf-summary-content.is-collapsible:not(.is-expanded)::after{background:linear-gradient(transparent,#23262B)!important}
html[data-theme="dark"] body.book-system-page .juf-details-section-heading>span{background:#2C3037!important;color:#A09B94!important}
html[data-theme="dark"] body.book-system-page .juf-details-empty{background:#23262B!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.book-system-page .juf-details-empty span{color:#A09B94!important}
html[data-theme="dark"] body.book-system-page .juf-reader-review-form-card input,
html[data-theme="dark"] body.book-system-page .juf-reader-review-form-card textarea{background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important}
html[data-theme="dark"] body.book-system-page .juf-publication-facts div{border-color:#3A3F47!important}

/* -------------------------------------------------------------------------
   PERSON / BIOGRAPHY — use the page's own semantic variables.
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.person-profile-page{background:#23262B!important}
html[data-theme="dark"] body.person-profile-page .juf-person{
    --person-paper:#23262B;
    --person-paper-deep:#343A44;
    --person-ink:#ECE8E1;
    --person-muted:#A09B94;
    --person-rule:#3A3F47;
    --person-surface:#2C3037;
    --person-surface-line:#3A3F47;
    --person-accent:#C9D4EC;
    --person-accent-deep:#DDE5F5;
    background:#23262B!important;color:#ECE8E1!important;
}
html[data-theme="dark"] body.person-profile-page .person-nav{background:#23262B!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.person-profile-page .person-identity,
html[data-theme="dark"] body.person-profile-page .person-glance,
html[data-theme="dark"] body.person-profile-page .person-sources summary,
html[data-theme="dark"] body.person-profile-page .person-top{background:#2C3037!important;border-color:#3A3F47!important;box-shadow:none!important}
html[data-theme="dark"] body.person-profile-page .person-glance>div{background:transparent!important;border-color:#3A3F47!important;box-shadow:none!important}
html[data-theme="dark"] body.person-profile-page .person-portrait{background:#2C3037!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.person-profile-page .person-follow{background:#8FA4F2!important;color:#14193A!important;border-color:#8FA4F2!important}
html[data-theme="dark"] body.person-profile-page .person-follow:hover{background:#2C3037!important}
html[data-theme="dark"] body.person-profile-page .person-tags a{color:#C9D4EC!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.person-profile-page .person-related-avatar{background:#2C3037!important;border-color:#3A3F47!important}

/* -------------------------------------------------------------------------
   AUTHORS DIRECTORY
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.authors-page .site-main,
html[data-theme="dark"] body.authors-page .juf-authors-page{background:#23262B!important;color:#ECE8E1!important}
html[data-theme="dark"] body.authors-page .juf-authors-hero{background:linear-gradient(180deg,#23262B 0%,#23262B 100%)!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.authors-page .juf-authors-hero h1,
html[data-theme="dark"] body.authors-page .juf-authors-hero h2,
html[data-theme="dark"] body.authors-page .juf-authors-hero-copy h1{color:#ECE8E1!important}
html[data-theme="dark"] body.authors-page .juf-authors-hero-copy p{color:#A09B94!important}
html[data-theme="dark"] body.authors-page :where(.juf-authors-hero-stage,.juf-authors-hero-empty-visual,.juf-featured-author-stage,.juf-author-new-book-stage){
    background:linear-gradient(145deg,#23262B,#2C3037)!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.authors-page .juf-authors-hero-stage:before,
html[data-theme="dark"] body.authors-page .juf-featured-author-stage:before,
html[data-theme="dark"] body.authors-page .juf-author-new-book-stage:before{opacity:.22!important}
html[data-theme="dark"] body.authors-page .juf-author-filter-panel{background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important}
html[data-theme="dark"] body.authors-page .juf-author-directory-card{
    background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-card:hover{border-color:#3A3F47!important;box-shadow:none!important;transform:translateY(-2px)}
html[data-theme="dark"] body.authors-page .juf-author-directory-avatar{background:#2C3037!important;border-color:#3A3F47!important;box-shadow:none!important}
html[data-theme="dark"] body.authors-page .juf-author-directory-card :where(h3,strong,a){color:#ECE8E1!important}
html[data-theme="dark"] body.authors-page .juf-author-directory-card :where(p,small,span){color:#A09B94!important}
html[data-theme="dark"] body.authors-page .juf-author-directory-status{background:#2C3037!important;border-color:#3A3F47!important;color:#C9D4EC!important}
html[data-theme="dark"] body.authors-page :where(.juf-author-genre-card,.juf-author-genre-empty){background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}
html[data-theme="dark"] body.authors-page .juf-author-hero-portrait-card,html[data-theme="dark"] body.authors-page .juf-author-hero-portrait-card>*{background:transparent!important;border:0!important;border-color:transparent!important;box-shadow:none!important}
html[data-theme="dark"] body.authors-page .juf-author-thumb-card{background:#2C3037!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.authors-page .juf-author-new-book-meta span{background:#2C3037!important;border-color:#3A3F47!important;color:#A09B94!important}
html[data-theme="dark"] body.authors-page .juf-author-new-book-arrows button{background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}

/* -------------------------------------------------------------------------
   PROFILE / READER DESK
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub{background:#23262B!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.profile-hub-hero,.profile-hub-section,.profile-hub-controls,.reader-desk-nav,.reader-desk-more,.profile-hub-empty,.profile-panel,.profile-card){
    background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(h1,h2,h3,strong){color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(p,small,.profile-heading-link,.section-overline-label){color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub-avatar{background:#2C3037!important;border-color:#3A3F47!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub-empty.is-dark{background:#23262B!important;border-color:#3A3F47!important}

/* -------------------------------------------------------------------------
   PREMIUM / AUDIOBOOK / SEARCH generic page surfaces
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.premium-page,
html[data-theme="dark"] body.audiobook-page,
html[data-theme="dark"] body.juf-search-shell{background:#23262B!important;color:#ECE8E1!important}
html[data-theme="dark"] body.premium-page :where(.premium-hero,.premium-plan-card,.premium-feature-card,.premium-faq-list,.premium-active-pass),
html[data-theme="dark"] body.audiobook-page :where(.audio-library-hero,.audio-list-card,.audio-track-card,.audio-collection-card,.audio-player-panel),
html[data-theme="dark"] body.juf-search-shell :where(.search-results-card,.juf-search-result-card,.search-filter-panel){background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}

/* Reader: only shared chrome follows site theme. Reading paper remains controlled
   by data-reader-theme so users can independently choose Paper/Sepia/Dark. */
html[data-theme="dark"] body.reader-page .juf-header-v24,
html[data-theme="dark"] body.reader-page .juf-footer-v24{background:#23262B!important;border-color:#3A3F47!important}

/* Reduced motion */
@media(prefers-reduced-motion:reduce){.juf-theme-toggle-v1,.juf-theme-toggle-v1 svg{transition:none!important}}

/* Build 243 final Authors refinements: the category-aware cinematic hero and
   discovery cards use artwork, so dark mode dims the media instead of turning
   the artwork itself into a black rectangle. */
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero{
    background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important;
}
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero .hero-slide-item{
    background:transparent!important;color:#ECE8E1!important;
}
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-image,
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-video{
    opacity:.22!important;filter:saturate(.60) brightness(.55)!important;
}
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero .juf-biography-hero-media-wash{
    background:linear-gradient(90deg,rgba(35, 38, 43, .96) 0%,rgba(35, 38, 43, .90) 42%,rgba(35, 38, 43, .74) 72%,rgba(35, 38, 43, .64) 100%)!important;
}
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero :where(.hero-slide-badge,.hero-slide-author,.hero-slide-desc){color:#A09B94!important}
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero .hero-slide-title,
html[data-theme="dark"] body.authors-page .juf-authors-cinematic-hero .hero-slide-author strong{color:#ECE8E1!important}
html[data-theme="dark"] body.authors-page .juf-author-category-intro,
html[data-theme="dark"] body.authors-page .juf-author-directory-summary{color:#A09B94!important}
html[data-theme="dark"] body.authors-page .juf-author-category-nav-btn{
    background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.authors-page .juf-author-category-card.home-author-discovery-card.is-visual{
    background:linear-gradient(135deg,#23262B,#2C3037)!important;
    border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.authors-page .juf-author-category-card.home-author-discovery-card.is-visual::before{
    opacity:.18!important;background:repeating-linear-gradient(0deg,rgba(255, 255, 255, .018) 0 1px,transparent 1px 8px)!important;
}
html[data-theme="dark"] body.authors-page .juf-author-category-card .home-author-discovery-kicker{
    background:#2C3037!important;border-color:#3A3F47!important;color:#A09B94!important;box-shadow:none!important;
}
html[data-theme="dark"] body.authors-page .juf-author-category-card .home-author-discovery-copy h3{color:#ECE8E1!important}
html[data-theme="dark"] body.authors-page .juf-author-category-card .home-author-discovery-copy p{color:#A09B94!important}
html[data-theme="dark"] body.authors-page .juf-author-category-card .juf-author-category-backdrop{
    opacity:.08!important;mix-blend-mode:screen!important;filter:saturate(.45) brightness(.60)!important;
}
html[data-theme="dark"] body.authors-page .juf-author-category-card .home-author-discovery-image{
    mix-blend-mode:normal!important;filter:drop-shadow(0 7px 12px rgba(0, 0, 0, .20)) saturate(.85) brightness(.88)!important;
}
html[data-theme="dark"] body.authors-page .juf-author-category-card.is-active{border-color:#C9D4EC!important;box-shadow:inset 0 0 0 1px rgba(201, 212, 236, .28)!important}

/* Do not alter artwork pixels in dark mode. This explicitly neutralises any
   broad card/surface effects from older theme experiments. */
html[data-theme="dark"] :where(.juf-book-jacket,.juf-book-cover,.juf-cover-art,.juf-author-circle-img,.person-portrait img,.juf-author-directory-avatar img,.juf-author-hero-portrait-card img){
    filter:none;
}

/* -------------------------------------------------------------------------
   Build 244 — compact modern mobile navbar search
   Desktop keeps the inline search field. On mobile the search lives in the
   header as an icon and expands only when requested, eliminating the permanent
   second row that made the navbar look heavy.
   ------------------------------------------------------------------------- */
.juf-header-search-toggle-v44{
    display:none;
    align-items:center;
    justify-content:center;
    width:40px;
    min-width:40px;
    height:40px;
    padding:0;
    border:1px solid var(--juf-border)!important;
    border-radius:14px;
    background:var(--juf-surface-paper)!important;
    color:var(--juf-ink-soft)!important;
    box-shadow:none!important;
    cursor:pointer;
    transition:border-color .16s ease,background-color .16s ease,color .16s ease,transform .16s ease;
}
.juf-header-search-toggle-v44 svg{
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.juf-header-search-toggle-v44:hover,
.juf-header-search-toggle-v44:focus-visible,
.juf-header-search-toggle-v44.is-active{
    border-color:var(--accent-rust)!important;
    background:color-mix(in srgb,var(--card-bg) 88%,var(--accent-rust))!important;
    color:var(--text-main)!important;
}

@media(max-width:900px){
    body.juf-minimal-chrome .juf-header-v24{
        padding:7px 0!important;
    }
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell{
        display:flex!important;
        flex-wrap:wrap!important;
        align-items:center!important;
        min-height:50px!important;
        gap:8px!important;
    }
    body.juf-minimal-chrome .juf-brand-v24{
        order:1!important;
        margin-right:auto!important;
    }
    body.juf-minimal-chrome .juf-theme-toggle-mobile-v1{
        order:2!important;
        margin-left:0!important;
    }
    body.juf-minimal-chrome .juf-header-search-toggle-v44{
        display:inline-flex!important;
        order:3!important;
    }
    body.juf-minimal-chrome .juf-menu-v24{
        order:4!important;
        margin-left:0!important;
    }
    body.juf-minimal-chrome .juf-header-search-panel-v44{
        display:none!important;
        order:5!important;
        flex:0 0 100%!important;
        width:100%!important;
        margin:2px 0 0!important;
        min-height:42px!important;
        height:42px!important;
        border-radius:14px!important;
        animation:none!important;
    }
    body.juf-minimal-chrome .juf-header-search-panel-v44.is-open{
        display:grid!important;
        animation:jufHeaderSearchReveal .18s ease-out both!important;
    }
    body.juf-minimal-chrome .juf-nav-v24{
        order:6!important;
    }
    body.juf-minimal-chrome .juf-header-search-panel-v44 input{
        height:40px!important;
    }
    body.juf-minimal-chrome .juf-header-search-panel-v44 > button{
        width:31px!important;
        height:31px!important;
    }
}
@media(max-width:390px){
    body.juf-minimal-chrome .juf-theme-toggle-mobile-v1,
    body.juf-minimal-chrome .juf-header-search-toggle-v44,
    body.juf-minimal-chrome .juf-menu-v24{
        width:38px!important;
        min-width:38px!important;
        height:38px!important;
    }
    body.juf-minimal-chrome .juf-brand-symbol-v24{
        width:32px!important;
        height:38px!important;
    }
}
@keyframes jufHeaderSearchReveal{
    from{opacity:0;transform:translateY(-5px)}
    to{opacity:1;transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce){
    body.juf-minimal-chrome .juf-header-search-panel-v44.is-open{animation:none!important}
}
@media(min-width:901px){
    .juf-header-search-toggle-v44{display:none!important}
    body.juf-minimal-chrome .juf-header-search-panel-v44{display:grid!important}
}

html[data-theme="dark"] body.juf-minimal-chrome .juf-header-search-toggle-v44{
    background:#23262B!important;
    border-color:#3A3F47!important;
    color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-header-search-toggle-v44:hover,
html[data-theme="dark"] body.juf-minimal-chrome .juf-header-search-toggle-v44:focus-visible,
html[data-theme="dark"] body.juf-minimal-chrome .juf-header-search-toggle-v44.is-active{
    background:#2C3037!important;
    border-color:#DDE5F5!important;
    color:#ECE8E1!important;
}


/* =========================================================================
   Build 245 — Dark mode completion
   -------------------------------------------------------------------------
   Root causes fixed here:
   1. jufbook-2d-minimal-system.css forces `color:var(--juf-text-black)` (#000)
      on almost every p/h1-h3/strong/small/label. Dark mode never redefined
      that token, so those texts stayed black on a black page.
   2. --juf-surface-white is deliberately kept light in dark mode (it is also
      used as TEXT colour on solid buttons), yet ~23 rules used it as a panel
      BACKGROUND. Those rules now read --juf-surface-panel instead
      (identical value in light mode, dark in dark mode).
   3. jufbook-typography-hierarchy.css hard-coded #282E37/#5B6376/#3B4256 on
      the Authors page; they are now tokens with the same light fallback.
   4. Profile / Reader-desk, pagination, secondary buttons and the mobile
      library filter had no dark counterpart at all.
   Light mode values are unchanged.
   ========================================================================= */
html[data-theme="dark"]{
    --juf-surface-panel:#2C3037;
    --juf-text-black:#C9D4EC;
    --juf-text-strong:#C9D4EC;
    --juf-text-body:#C9D4EC;
    --juf-text-soft:#C9D4EC;
}
/* Pills/status chips keep dark text because their light tinted fill is kept. */
html[data-theme="dark"] body.juf-2d-minimal :where(.badge-premium,.premium-badge,.tag-premium,.badge-success,.status-published,.badge-warning,.status-pending,.badge-danger,.status-rejected,.is-success,.is-error,.book-meta-premium-pill,.book-community-rating-pill,.book-meta-access.is-unlocked){
    background:#3A3528!important;border-color:#D8C08C!important;color:#D8C08C!important;
}
html[data-theme="dark"] body.juf-2d-minimal :where(.status-rejected,.badge-danger,.is-error){background:#2C3037!important;border-color:#3A3F47!important;color:#F0907F!important}
html[data-theme="dark"] body.juf-2d-minimal :where(.badge-success,.status-published,.is-success,.book-meta-access.is-unlocked){background:#2C3037!important;border-color:#6FCB93!important;color:#6FCB93!important}

/* Secondary / outline buttons (all pages) */
html[data-theme="dark"] body.juf-minimal-chrome :where(.btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,.btn-hero-cinematic-secondary,.premium-secondary-btn),
html[data-theme="dark"] body.juf-minimal-chrome :where(.btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,.btn-hero-cinematic-secondary,.premium-secondary-btn):hover{
    background:#23262B!important;border:1px solid #3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,.btn-hero-cinematic-secondary,.premium-secondary-btn):hover{border-color:#DDE5F5!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-details-action.is-disabled{opacity:.62}
html[data-theme="dark"] body.juf-minimal-chrome :where(.btn-hero-cinematic-primary,.premium-primary-btn,.audio-inline-play){background:#8FA4F2!important;border-color:#8FA4F2!important;color:#14193A!important}

/* Pagination (library, authors, home, reader) */
html[data-theme="dark"] body.juf-minimal-chrome :where(.category-pagination,.pagination-numbers,.reader-pagination) :where(a,span,button,.page-num-btn),
html[data-theme="dark"] body.juf-minimal-chrome .page-num-btn{
    background:#23262B!important;border:1px solid #3A3F47!important;color:#ECE8E1!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.category-pagination,.pagination-numbers,.reader-pagination) :where(a,button,.page-num-btn):hover,
html[data-theme="dark"] body.juf-minimal-chrome .page-num-btn:hover{border-color:#DDE5F5!important;background:#2C3037!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.category-pagination,.pagination-numbers,.reader-pagination) :where(.active,[aria-current="page"]),
html[data-theme="dark"] body.juf-minimal-chrome .page-num-btn.active{background:#C9D4EC!important;border-color:#C9D4EC!important;color:#23262B!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.category-pagination,.pagination-numbers) span:not(.active):not([aria-current]){background:transparent!important;border-color:transparent!important;color:#A09B94!important}

/* Library: mobile filter and sort disclosure */
html[data-theme="dark"] body.juf-minimal-chrome .juf-library-mobile-filter>summary,
html[data-theme="dark"] body.juf-minimal-chrome .juf-library-mobile-filter[open]>summary{background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-library-mobile-filter .juf-library-filter-mobile{background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important}

/* Authors directory: alphabet, language tabs, filters, new-book block */
html[data-theme="dark"] body.authors-page .juf-author-alphabet{background:transparent!important}
html[data-theme="dark"] body.authors-page .juf-author-alphabet-tabs{background:#23262B!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.authors-page .juf-author-alphabet-tabs :where(button,a){background:transparent!important;color:#A09B94!important;border-color:transparent!important}
html[data-theme="dark"] body.authors-page .juf-author-alphabet-tabs :where(button,a):where(.is-active,[aria-selected="true"],.active){background:#C9D4EC!important;color:#23262B!important}
html[data-theme="dark"] body.authors-page .juf-author-alphabet-label{color:#A09B94!important}
html[data-theme="dark"] body.authors-page .juf-author-alphabet a{background:#23262B!important;border:1px solid #3A3F47!important;color:#ECE8E1!important}
html[data-theme="dark"] body.authors-page .juf-author-alphabet a:hover{background:#2C3037!important;border-color:#DDE5F5!important;color:#fff!important}
html[data-theme="dark"] body.authors-page .juf-author-alphabet a.active{background:#C9D4EC!important;border-color:#C9D4EC!important;color:#23262B!important}
html[data-theme="dark"] body.authors-page .juf-author-filter-more>summary,
html[data-theme="dark"] body.authors-page .juf-author-hero-arrows .hero-cinematic-arrow-btn{background:#23262B!important;border-color:#3A3F47!important;color:#ECE8E1!important;box-shadow:none!important}
html[data-theme="dark"] body.authors-page .juf-author-clear-filter:hover{color:#fff!important}
html[data-theme="dark"] body.authors-page :where(.juf-author-directory-name,.juf-author-genre-card strong,.juf-author-new-book-copy h2,.juf-author-new-book-author){color:#ECE8E1!important}
html[data-theme="dark"] body.authors-page :where(.juf-author-directory-meta,.juf-author-new-book-desc){color:#A09B94!important}

/* Home search module and reading gateway used hard-coded black text */
html[data-theme="dark"] body.juf-homepage .home-search-module .search-input-box input{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage .home-search-icon{color:#A09B94!important}
html[data-theme="dark"] body.juf-homepage .home-search-module .search-tags-nav a{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage .home-reading-gateway-copy h2{color:#ECE8E1!important}
html[data-theme="dark"] body.juf-homepage .home-reading-secondary{color:#ECE8E1!important;background:#23262B!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-homepage .home-reading-gateway-art{color:#ECE8E1!important}

/* Book details: author card, publication note and flash message */
html[data-theme="dark"] body.book-system-page .book-details-page .juf-details-author-card{background:#2C3037!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.book-system-page :where(.juf-details-author-card,.juf-book-publication-card) :where(p,small,span,strong,a,h3){color:#A09B94!important}
html[data-theme="dark"] body.book-system-page .juf-details-author-card :where(strong,h3,.juf-details-author-name){color:#ECE8E1!important}
html[data-theme="dark"] body.book-system-page .juf-book-publication-card a{color:#C9D4EC!important;text-decoration-color:currentColor}
html[data-theme="dark"] body.book-system-page .juf-details-flash{color:#C9D4EC!important}
html[data-theme="dark"] body.book-system-page .juf-details-preview-banner{background:#2C3037!important;color:#ECE8E1!important}

/* Author / person profile: every text role mapped to the page tokens */
html[data-theme="dark"] body.person-profile-page .juf-person :where(h1,h2,h3){color:var(--person-ink)!important}
html[data-theme="dark"] body.person-profile-page .juf-person :where(p,li,dd,strong,small){color:var(--person-ink)!important}
html[data-theme="dark"] body.person-profile-page .juf-person :where(dt,.person-english,.person-section-note,.person-source-refs,.person-follower-count,.person-book-meta,.person-empty,h2 small){color:var(--person-muted)!important}
html[data-theme="dark"] body.person-profile-page .juf-person :where(.person-kicker,.person-intro-label){color:var(--person-accent-deep)!important}
html[data-theme="dark"] body.person-profile-page .juf-person .person-nav a{color:var(--person-muted)!important}
html[data-theme="dark"] body.person-profile-page .juf-person .person-nav a[aria-current]{color:var(--person-accent-deep)!important}
html[data-theme="dark"] body.person-profile-page .juf-person .person-follow[aria-pressed="true"]{background:#8FA4F2!important;border-color:#8FA4F2!important;color:#14193A!important}
html[data-theme="dark"] body.person-profile-page .juf-person :where(.person-section,.person-nav){border-color:var(--person-rule)!important}
html[data-theme="dark"] body.person-profile-page .juf-person :where(.person-book-filters a,.person-more){color:var(--person-accent-deep)!important;border-color:var(--person-rule)!important}

/* -------------------------------------------------------------------------
   Build 245 — Profile / Reader desk (every light surface in
   jufbook-profile-responsive-polish.css and jufbook-reader-desk.css)
   ------------------------------------------------------------------------- */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub{
    --profile-paper:#23262B;--profile-cream:#23262B;--profile-tan:#2C3037;--profile-border:#3A3F47;
    --profile-brown:#C9D4EC;--profile-brown-soft:#C9D4EC;--profile-rust:#C9D4EC;--profile-ink:#C9D4EC;--profile-muted:#C9D4EC;
}
/* panels */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-hub-identity,.profile-hub-stats,.profile-side-card,.profile-view-intro,.reader-library-search,.profile-hub-section),
html[data-theme="dark"] body.juf-minimal-chrome :where(.reader-desk-nav,.reader-desk-more>div,.account-profile-nav){
    background:#23262B!important;border-color:#3A3F47!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-continue-card,.profile-shelf-card-v25,.profile-listening-card,.profile-purchase-row,.profile-note-panel,.profile-follow-strip article,.profile-review-list article,.profile-release-block,.profile-history-details summary,.profile-annotation-row,.profile-highlight-row,.profile-library-add-card,.profile-hub-empty,.profile-book-unavailable){
    background:#2C3037!important;border-color:#3A3F47!important;color:#A09B94!important;box-shadow:none!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-hub-empty,.profile-library-add-card){border-style:dashed!important;background:#23262B!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-empty::before{background:linear-gradient(145deg,#C9D4EC,#C9D4EC)!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-reading-activity-link,.profile-quiet-action,.profile-view-intro>a,.profile-hub-actions a:not(.is-primary),.profile-follow-strip-dedicated button){
    background:#23262B!important;border:1px solid #3A3F47!important;color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-side-premium{background:#2C3037!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-side-premium.is-active{background:#2C3037!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-side-premium>a{background:#C9D4EC!important;color:#23262B!important}
/* hover / current */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a:hover,
html[data-theme="dark"] body.juf-minimal-chrome :where(.reader-desk-nav>a:hover,.reader-desk-more>summary:hover,.reader-desk-more>div a:hover,.account-profile-nav a:hover){background:#2C3037!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.reader-desk-nav>a[aria-current="page"],.reader-desk-more.is-current>summary){background:#343A44!important;border-color:#C9D4EC!important;color:#fff!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.reader-desk-nav>a,.reader-desk-more>summary,.reader-desk-more>div a,.account-profile-nav a,.account-profile-nav span){color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.reader-nav-icon){color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.reader-desk-nav>a[aria-current="page"] .reader-nav-icon,.reader-desk-more.is-current .reader-nav-icon){color:#fff!important}
html[data-theme="dark"] body.juf-minimal-chrome .account-profile-nav span[aria-current="page"]{background:#343A44!important;color:#fff!important}
/* avatar ring borders */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub-avatar{border-color:#3A3F47!important;background:#2C3037!important;color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.profile-avatar-edit,.profile-avatar-badge){border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-author-avatar{background:#2C3037!important;border-color:#3A3F47!important}
/* text — headings and values */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-hub-identity h1,.profile-side-heading,.profile-hub-heading h2,.profile-view-intro h2,.profile-reading-ring strong,.profile-reading-key b,.profile-reading-saved strong,.profile-hub-stats .profile-stat-copy strong,.profile-hub-empty strong,.profile-card-copy h3 a,.profile-shelf-card-v25 h3 a,.profile-listening-card h3 a,.profile-follow-strip h3 a,.profile-review-list h3 a,.profile-annotation-row strong,.profile-highlight-row strong,.profile-release-block a){color:#ECE8E1!important}
/* text — body and muted */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-hub-identity .reader-bio,.profile-view-intro p,.profile-card-copy p,.profile-shelf-card-v25 p,.profile-listening-card p,.profile-review-list blockquote,.profile-side-account>a,.profile-hub-stats a,.profile-annotation-row>a,.profile-highlight-row,.profile-reading-key span,.profile-hub-empty){color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-hub-identity .reader-bio.is-empty,.profile-identity-meta,.profile-hub-stats .profile-stat-copy>span,.profile-reading-ring span,.profile-reading-saved,.profile-reading-position,.profile-last-read,.profile-listen-meta,.profile-side-account>a span,.profile-release-block small,.profile-annotation-row span,.profile-highlight-row span,.profile-hub-heading>span,.reader-library-search label,.profile-pagination span,.reader-pagination span,.profile-follow-strip p){color:#A09B94!important}
/* text — warm accent links */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-kicker,.profile-card-topline>strong,.profile-side-premium .profile-side-eyebrow,.profile-view-intro>div>span,.profile-side-heading a,.profile-heading-link,.profile-p3-heading .profile-heading-link,.reader-view-all,.profile-listen-meta a,.profile-inline-actions a,.profile-inline-actions button,.profile-follow-strip button,.profile-follow-strip-dedicated button,.profile-hub-empty a,.reader-pagination a,.profile-section-title-icon){color:#C9D4EC!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-side-premium h2){color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub :where(.profile-side-premium p){color:#A09B94!important}
/* reading ring and progress */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-reading-ring::after{background:#23262B!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-reading-summary.is-empty .profile-reading-ring{background:#343A44!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-progress{background:#343A44!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-reading-key i{background:#C9D4EC!important}
/* stat and section icon tiles */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-stat-icon{background:#2C3037!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a:nth-child(1) .profile-stat-icon{background:#2C3037!important;color:#6FCB93!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a:nth-child(2) .profile-stat-icon{background:#343A44!important;color:#93B6EE!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a:nth-child(3) .profile-stat-icon{background:#2C3037!important;color:#C9D4EC!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a:nth-child(4) .profile-stat-icon{background:#2C3037!important;color:#E0B35C!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a:nth-child(5) .profile-stat-icon{background:#2C3037!important;color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-section-title-icon,
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-note-title-icon{background:#2C3037!important}
/* chips */
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-identity-meta .is-premium{background:#2C3037!important;border-color:#3A3F47!important;color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-rating-chip{background:#2C3037!important;color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-status-chip.is-approved{background:#2C3037!important;color:#6FCB93!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-status-chip.is-pending{background:#2C3037!important;color:#E0B35C!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-status-chip.is-rejected{background:#2C3037!important;color:#F0907F!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-status-chip.is-hidden{background:#2C3037!important;color:#A09B94!important}
/* public reader card, account pages */
html[data-theme="dark"] body.juf-minimal-chrome :where(.reader-public,.account-privacy-boundary,.reader-public-privacy){background:#23262B!important;border-color:#3A3F47!important;color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.account-privacy-boundary strong){color:#ECE8E1!important}
html[data-theme="dark"] body.juf-minimal-chrome :where(.account-privacy-boundary p){color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .reader-public>p:first-child{color:#A09B94!important}
html[data-theme="dark"] body.juf-minimal-chrome .reader-public>a{background:#C9D4EC!important;color:#23262B!important}
html[data-theme="dark"] body.juf-minimal-chrome .reader-public img{border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-minimal-chrome .reader-review-expanded summary{color:#C9D4EC!important}
html[data-theme="dark"] body.juf-minimal-chrome .reader-bookmark-remove button{border-color:#3A3F47!important;color:#C9D4EC!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a{background:transparent!important;border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-minimal-chrome .profile-hub .profile-hub-stats a:hover{background:#2C3037!important}

/* ============================================================================
   Build 537 — Clean Website Portrait Display + Dress-Only Watermarked Share /
   Download / Copy Overlay Layer
   ============================================================================ */
.person-portrait,
.person-related-avatar,
.juf-author-hero-portrait-card,
.juf-author-directory-avatar,
.author-circle-disc,
.juf-details-author-avatar,
.reader-identity-avatar,
.profile-author-avatar,
.juf-search-author-avatar,
.audio-row-author-avatar,
.audio-hub-featured-author > span:first-child {
    position: relative !important;
}

html body img.juf-portrait-clean-layer {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-drag: none !important;
}

html body img.juf-portrait-share-layer {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    opacity: 0.002 !important;
    z-index: 8 !important;
    pointer-events: auto !important;
    object-fit: cover !important;
    object-position: center top !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
}

        /* ==========================================================================
           Build 588 — Deep Audit & Fix for Dark Mode, PDF Mode, and Light Mode
           1. "মনীষী" (Manishi) Discovery Boxes (`1000171726.jpg`):
              - Light Mode: 8 flat plain single book-cover colors (`--cat-bg`) + dark ink (`--cat-ink`).
              - Dark Mode (`html[data-theme="dark"]`): 8 deep plain single solid dark book-cover tones
                (`--cat-dark-bg`) + crisp ivory title (`#F4EFEA`) & muted kicker (`#C4B7AA`),
                fixing the unreadable white-on-pastel text in `1000171726.jpg`.
              - PDF Mode (`html[data-theme="pdf"]` / `body[data-pdf-mode="pdf"]`): 8 warm parchment-tinted
                plain single book-cover colors (`--cat-pdf-bg`) + crisp printed-book ink (`#241E17`).
              - Full-Width Copy on Portrait-Free Cards (`.no-category-image` / `.no-portrait`):
                Prevents `সমাজবিজ্ঞানী ও অর্থনীতিবিদ` from truncating early when a card has no image.
           2. Homepage "বইয়ের বিভাগ" (`home-book-category-card`):
              - Preserves 16:9 ratio, `min(64vw, 216px)` mobile width, and crisp white text over scrim
                across Light Mode, Dark Mode, and PDF Mode (never washed out by generic PDF card rules).
           ========================================================================== */
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+1),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+1),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+1) {
            --cat-bg: #EADAC6; --cat-border: #D6C2AA; --cat-accent: #9E6336; --cat-ink: #2B231C; --cat-muted: #655344;
            --cat-dark-bg: #2E251F; --cat-dark-border: #4A3B31; --cat-dark-ink: #F4EFEA; --cat-dark-muted: #C4B7AA;
            --cat-pdf-bg: #E7D8C5; --cat-pdf-border: #CEB9A0; --cat-pdf-ink: #241E17; --cat-pdf-muted: #5C4D3E;
        }
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+2),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+2),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+2) {
            --cat-bg: #D8E6E4; --cat-border: #BBD0CD; --cat-accent: #2E6460; --cat-ink: #1E3135; --cat-muted: #4A6468;
            --cat-dark-bg: #1E2C2E; --cat-dark-border: #31484B; --cat-dark-ink: #EEF5F5; --cat-dark-muted: #A9C2C4;
            --cat-pdf-bg: #DCE2DC; --cat-pdf-border: #BCC8C1; --cat-pdf-ink: #1E2D2F; --cat-pdf-muted: #4A5F61;
        }
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+3),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+3),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+3) {
            --cat-bg: #EBD0C2; --cat-border: #D5B4A3; --cat-accent: #B8553E; --cat-ink: #2C221E; --cat-muted: #664D43;
            --cat-dark-bg: #312320; --cat-dark-border: #4E3732; --cat-dark-ink: #F6EFEC; --cat-dark-muted: #C9B3AC;
            --cat-pdf-bg: #E7D2C3; --cat-pdf-border: #CEB3A1; --cat-pdf-ink: #2A201C; --cat-pdf-muted: #614A40;
        }
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+4),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+4),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+4) {
            --cat-bg: #F2E4C3; --cat-border: #DBC9A0; --cat-accent: #B86B35; --cat-ink: #2B221C; --cat-muted: #685542;
            --cat-dark-bg: #2F281D; --cat-dark-border: #4B402E; --cat-dark-ink: #F5F0E6; --cat-dark-muted: #C7BCA6;
            --cat-pdf-bg: #ECE0C3; --cat-pdf-border: #D3C39E; --cat-pdf-ink: #282019; --cat-pdf-muted: #61503D;
        }
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+5),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+5),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+5) {
            --cat-bg: #E2EAD8; --cat-border: #C6D3B8; --cat-accent: #3B6945; --cat-ink: #223128; --cat-muted: #4F6354;
            --cat-dark-bg: #212D24; --cat-dark-border: #35483A; --cat-dark-ink: #EFF5F0; --cat-dark-muted: #B0C4B5;
            --cat-pdf-bg: #E0E4D4; --cat-pdf-border: #C2CAAE; --cat-pdf-ink: #212E25; --cat-pdf-muted: #4D5E51;
        }
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+6),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+6),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+6) {
            --cat-bg: #E4DCE6; --cat-border: #CCC1CF; --cat-accent: #765478; --cat-ink: #2A2430; --cat-muted: #605368;
            --cat-dark-bg: #2A2330; --cat-dark-border: #43384C; --cat-dark-ink: #F2EEF5; --cat-dark-muted: #BEB3C6;
            --cat-pdf-bg: #E2D9DF; --cat-pdf-border: #C7BBC4; --cat-pdf-ink: #28222D; --cat-pdf-muted: #5B4F62;
        }
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+7),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+7),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+7) {
            --cat-bg: #D8E7F2; --cat-border: #BBD0E0; --cat-accent: #35698A; --cat-ink: #1F313B; --cat-muted: #4C6675;
            --cat-dark-bg: #1E2933; --cat-dark-border: #314353; --cat-dark-ink: #EEF3F7; --cat-dark-muted: #ABC0D0;
            --cat-pdf-bg: #DCE1E4; --cat-pdf-border: #BCC6CE; --cat-pdf-ink: #1F2E37; --cat-pdf-muted: #4A606D;
        }
        html body:is(.juf-homepage, .authors-page) .home-author-discovery-card.is-visual:nth-child(8n+8),
        html body .juf-author-discovery-shared .home-author-discovery-card.is-visual:nth-child(8n+8),
        html body .juf-author-category-card.home-author-discovery-card.is-visual:nth-child(8n+8) {
            --cat-bg: #E8E1C6; --cat-border: #D0C7A5; --cat-accent: #7A6C34; --cat-ink: #293126; --cat-muted: #5C634C;
            --cat-dark-bg: #292B20; --cat-dark-border: #424533; --cat-dark-ink: #F2F3EC; --cat-dark-muted: #BDC0AE;
            --cat-pdf-bg: #E5DEC4; --cat-pdf-border: #CBC2A2; --cat-pdf-ink: #262D23; --cat-pdf-muted: #575E48;
        }

        /* Light Mode: Plain Single Book-Cover Color per Box */
        html:not([data-theme="dark"]):not([data-theme="pdf"]) body:not([data-pdf-mode="pdf"]) .home-author-discovery-card.is-visual:not(.is-active),
        html:not([data-theme="dark"]):not([data-theme="pdf"]) body:not([data-pdf-mode="pdf"]) .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active),
        html:not([data-theme="dark"]):not([data-theme="pdf"]) body:not([data-pdf-mode="pdf"]) .juf-author-discovery-shared .home-author-discovery-card.is-visual:not(.is-active) {
            background: var(--cat-bg, #EADAC6) !important;
            background-color: var(--cat-bg, #EADAC6) !important;
            background-image: none !important;
            border: 1px solid var(--cat-border, #D6C2AA) !important;
            box-shadow: none !important;
            color: var(--cat-ink, #2B231C) !important;
        }
        html:not([data-theme="dark"]):not([data-theme="pdf"]) body:not([data-pdf-mode="pdf"]) .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3,
        html:not([data-theme="dark"]):not([data-theme="pdf"]) body:not([data-pdf-mode="pdf"]) .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3 {
            color: var(--cat-ink, #2B231C) !important;
            text-shadow: none !important;
        }
        html:not([data-theme="dark"]):not([data-theme="pdf"]) body:not([data-pdf-mode="pdf"]) .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker,
        html:not([data-theme="dark"]):not([data-theme="pdf"]) body:not([data-pdf-mode="pdf"]) .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker {
            color: var(--cat-muted, #655344) !important;
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
        }

        /* Dark Mode: Deep Plain Single Solid Book-Cover Surface & High-Contrast Ivory Text (`1000171726.jpg`) */
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .home-author-discovery-card.is-visual:not(.is-active),
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active),
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .juf-author-discovery-shared .home-author-discovery-card.is-visual:not(.is-active) {
            background: var(--cat-dark-bg, #2E251F) !important;
            background-color: var(--cat-dark-bg, #2E251F) !important;
            background-image: none !important;
            border: 1px solid var(--cat-dark-border, #4A3B31) !important;
            box-shadow: none !important;
            color: var(--cat-dark-ink, #F4EFEA) !important;
        }
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3,
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3,
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .juf-author-discovery-shared .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3 {
            color: var(--cat-dark-ink, #F4EFEA) !important;
            text-shadow: none !important;
        }
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker,
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker,
        html[data-theme="dark"] body:not([data-pdf-mode="pdf"]) .juf-author-discovery-shared .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker {
            color: var(--cat-dark-muted, #C4B7AA) !important;
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
        }

        /* PDF Mode: Warm Parchment-Harmonized Plain Single Book-Cover Surface & Dark Ink */
        html[data-theme="pdf"] body .home-author-discovery-card.is-visual:not(.is-active),
        html[data-theme="pdf"] body .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active),
        html[data-theme="pdf"] body .juf-author-discovery-shared .home-author-discovery-card.is-visual:not(.is-active),
        html body[data-pdf-mode="pdf"] .home-author-discovery-card.is-visual:not(.is-active),
        html body[data-pdf-mode="pdf"] .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active),
        html body[data-pdf-mode="pdf"] .juf-author-discovery-shared .home-author-discovery-card.is-visual:not(.is-active) {
            background: var(--cat-pdf-bg, #E7D8C5) !important;
            background-color: var(--cat-pdf-bg, #E7D8C5) !important;
            background-image: none !important;
            border: 1px solid var(--cat-pdf-border, #CEB9A0) !important;
            box-shadow: none !important;
            color: var(--cat-pdf-ink, #241E17) !important;
        }
        html[data-theme="pdf"] body .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3,
        html[data-theme="pdf"] body .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3,
        html body[data-pdf-mode="pdf"] .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3,
        html body[data-pdf-mode="pdf"] .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-copy h3 {
            color: var(--cat-pdf-ink, #241E17) !important;
            text-shadow: none !important;
        }
        html[data-theme="pdf"] body .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker,
        html[data-theme="pdf"] body .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker,
        html body[data-pdf-mode="pdf"] .home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker,
        html body[data-pdf-mode="pdf"] .juf-author-category-card.home-author-discovery-card.is-visual:not(.is-active) .home-author-discovery-kicker {
            color: var(--cat-pdf-muted, #5C4D3E) !important;
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
        }

        /* Portrait-Free Cards (`no-category-image` / `no-portrait`): Full Width Copy so Titles Never Truncate Early */
        html body:is(.juf-homepage, .authors-page) .juf-author-discovery-shared .home-author-discovery-card.no-category-image .home-author-discovery-copy,
        html body:is(.juf-homepage, .authors-page) .juf-author-discovery-shared .home-author-discovery-card.no-portrait .home-author-discovery-copy,
        html body .juf-author-discovery-shared .home-author-discovery-card.no-category-image .home-author-discovery-copy,
        html body .juf-author-discovery-shared .home-author-discovery-card.no-portrait .home-author-discovery-copy {
            width: 100% !important;
            max-width: 100% !important;
            padding-right: 4px !important;
        }
        html body:is(.juf-homepage, .authors-page) .juf-author-discovery-shared .home-author-discovery-card.no-category-image .home-author-discovery-visual,
        html body:is(.juf-homepage, .authors-page) .juf-author-discovery-shared .home-author-discovery-card.no-portrait .home-author-discovery-visual,
        html body .juf-author-discovery-shared .home-author-discovery-card.no-category-image .home-author-discovery-visual,
        html body .juf-author-discovery-shared .home-author-discovery-card.no-portrait .home-author-discovery-visual {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }

        /* Homepage "বইয়ের বিভাগ" (`home-book-category-card`): Protect White Text Over Scrim in Light, Dark & PDF Modes */
        html body.juf-homepage #genres .home-book-category-card,
        html[data-theme="dark"] body.juf-homepage #genres .home-book-category-card,
        html[data-theme="pdf"] body.juf-homepage #genres .home-book-category-card {
            background-color: #242A36 !important;
            border-color: rgba(108, 92, 72, 0.22) !important;
            color: #FFFFFF !important;
        }
        html body.juf-homepage #genres .home-book-category-card .genre-graphic-copy h4,
        html[data-theme="dark"] body.juf-homepage #genres .home-book-category-card .genre-graphic-copy h4,
        html[data-theme="pdf"] body.juf-homepage #genres .home-book-category-card .genre-graphic-copy h4 {
            color: #FFFFFF !important;
        }
        html body.juf-homepage #genres .home-book-category-card .genre-graphic-copy > span,
        html body.juf-homepage #genres .home-book-category-card .genre-graphic-kicker,
        html body.juf-homepage #genres .home-book-category-card .genre-graphic-copy > em,
        html[data-theme="dark"] body.juf-homepage #genres .home-book-category-card .genre-graphic-copy > span,
        html[data-theme="dark"] body.juf-homepage #genres .home-book-category-card .genre-graphic-kicker,
        html[data-theme="dark"] body.juf-homepage #genres .home-book-category-card .genre-graphic-copy > em,
        html[data-theme="pdf"] body.juf-homepage #genres .home-book-category-card .genre-graphic-copy > span,
        html[data-theme="pdf"] body.juf-homepage #genres .home-book-category-card .genre-graphic-kicker,
        html[data-theme="pdf"] body.juf-homepage #genres .home-book-category-card .genre-graphic-copy > em {
            color: rgba(255, 255, 255, 0.92) !important;
        }



/* === MERGED: jufbook-author-discovery-shared.css === */
/* JUFbook Author Discovery Shared Authority — Build 257
   One responsive source of truth for the "মনীষী" discovery section on
   Homepage and Biography/Authors. Loaded after page/theme overrides so these
   two entry points cannot visually drift on phones again. */

.juf-author-discovery-shared .juf-author-category-intro,
.juf-author-discovery-shared .home-section-copy,
.juf-author-discovery-shared .section-description,
.juf-author-discovery-shared .section-subtitle {
    display:none !important;
}

.authors-page .juf-author-discovery-shared .section-view-all {
    color:inherit;
    text-decoration:none;
}


/* Build 257 — Biography desktop/tablet portrait normalization.
   Homepage desktop was already visually approved. The Biography page now gets
   a fixed bottom-anchored portrait stage instead of letting each portrait's
   intrinsic canvas overflow a padded grid cell. This keeps the visible head/
   shoulder area on one baseline and prevents some portraits from touching the
   top border while others sit noticeably lower. */
@media (min-width:621px) {
    .authors-page .juf-author-discovery-shared .home-author-discovery-card.is-visual {
        position:relative !important;
        overflow:hidden !important;
    }

    .authors-page .juf-author-discovery-shared .home-author-discovery-copy {
        position:relative !important;
        z-index:4 !important;
        padding-right:2px !important;
    }

    .authors-page .juf-author-discovery-shared .home-author-discovery-visual {
        position:absolute !important;
        z-index:2 !important;
        right:-4px !important;
        bottom:-3px !important;
        width:132px !important;
        height:138px !important;
        min-width:0 !important;
        display:flex !important;
        align-items:flex-end !important;
        justify-content:flex-end !important;
        overflow:visible !important;
        pointer-events:none !important;
    }

    .authors-page .juf-author-discovery-shared .home-author-discovery-image {
        position:relative !important;
        z-index:3 !important;
        display:block !important;
        width:132px !important;
        height:138px !important;
        max-width:none !important;
        margin:0 !important;
        object-fit:contain !important;
        object-position:center bottom !important;
        border:0 !important;
        border-radius:0 !important;
        background:transparent !important;
        box-shadow:none !important;
        filter:drop-shadow(0 7px 9px rgba(40, 46, 55, .10)) !important;
        transform:none !important;
        transform-origin:center bottom !important;
    }
}

@media (min-width:901px) {
    .authors-page .juf-author-discovery-shared .home-author-discovery-visual {
        right:-5px !important;
        bottom:-3px !important;
        width:154px !important;
        height:142px !important;
    }

    .authors-page .juf-author-discovery-shared .home-author-discovery-image {
        width:154px !important;
        height:142px !important;
    }
}

@media (max-width:620px) {
    /* Same compact heading row on both pages. */
    .juf-homepage .juf-author-discovery-head-shared,
    .authors-page .juf-author-discovery-head-shared {
        display:flex !important;
        align-items:center !important;
        justify-content:space-between !important;
        gap:9px !important;
        margin-bottom:13px !important;
    }

    .juf-homepage .juf-author-discovery-head-shared .page-section-title,
    .authors-page .juf-author-discovery-head-shared .page-section-title {
        margin:0 !important;
        font-family:var(--font-heading-editorial,'Kalpurush',serif) !important;
        font-size:clamp(22px,6.7vw,26px) !important;
        font-weight:500 !important;
        line-height:1.22 !important;
    }

    .juf-homepage .juf-author-discovery-head-shared .section-head-actions,
    .authors-page .juf-author-discovery-head-shared .section-head-actions {
        display:flex !important;
        align-items:center !important;
        gap:6px !important;
        flex:0 0 auto !important;
    }

    .juf-homepage .juf-author-discovery-head-shared .section-view-all,
    .authors-page .juf-author-discovery-head-shared .section-view-all {
        display:inline-flex !important;
        align-items:center !important;
        white-space:nowrap !important;
        font-family:var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif) !important;
        font-size:9.5px !important;
        font-weight:500 !important;
        line-height:1.2 !important;
        opacity:.9;
    }

    /* Arrow controls are intentionally absent on phones; swipe/scroll remains. */
    .juf-homepage .juf-author-discovery-shared .slider-nav-ctrl,
    .authors-page .juf-author-discovery-shared .slider-nav-ctrl,
    .authors-page .juf-author-discovery-shared .juf-author-category-nav {
        display:none !important;
    }

    /* Tracks use the exact same two-card geometry. */
    .juf-homepage .juf-author-discovery-shared .home-author-premium-rail,
    .authors-page .juf-author-discovery-shared .juf-author-category-grid {
        --juf-author-mobile-gap:10px;
        display:flex !important;
        gap:var(--juf-author-mobile-gap) !important;
        overflow-x:auto !important;
        overflow-y:hidden !important;
        padding:2px 1px 8px !important;
        scroll-padding-inline:1px !important;
        scroll-snap-type:x mandatory !important;
        scrollbar-width:none !important;
        -webkit-overflow-scrolling:touch !important;
    }
    .juf-homepage .juf-author-discovery-shared .home-author-premium-rail::-webkit-scrollbar,
    .authors-page .juf-author-discovery-shared .juf-author-category-grid::-webkit-scrollbar { display:none !important; }

    .juf-homepage .juf-author-discovery-shared .home-author-discovery-card.is-visual,
    .authors-page .juf-author-discovery-shared .home-author-discovery-card.is-visual {
        position:relative !important;
        display:block !important;
        flex:0 0 calc((100% - var(--juf-author-mobile-gap)) / 2) !important;
        width:calc((100% - var(--juf-author-mobile-gap)) / 2) !important;
        min-width:calc((100% - var(--juf-author-mobile-gap)) / 2) !important;
        min-height:98px !important;
        height:98px !important;
        padding:9px 10px !important;
        border-radius:13px !important;
        overflow:hidden !important;
        scroll-snap-align:start !important;
    }

    .juf-homepage .juf-author-discovery-shared .home-author-discovery-copy,
    .authors-page .juf-author-discovery-shared .home-author-discovery-copy {
        position:relative !important;
        z-index:4 !important;
        width:calc(100% - 74px) !important;
        min-height:100% !important;
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-start !important;
        justify-content:center !important;
    }

    .juf-homepage .juf-author-discovery-shared .home-author-discovery-kicker,
    .authors-page .juf-author-discovery-shared .home-author-discovery-kicker {
        margin:0 0 5px !important;
        padding:3px 6px !important;
        font-size:7.4px !important;
        line-height:1.15 !important;
    }

    .juf-homepage .juf-author-discovery-shared .home-author-discovery-copy h3,
    .authors-page .juf-author-discovery-shared .home-author-discovery-copy h3 {
        margin:0 !important;
        font-family:var(--font-display-literary,'Tiro Bangla','Kalpurush','SolaimanLipi',serif) !important;
        font-size:13.4px !important;
        font-weight:500 !important;
        line-height:1.16 !important;
        -webkit-line-clamp:2 !important;
    }

    .juf-homepage .juf-author-discovery-shared .home-author-discovery-copy p,
    .authors-page .juf-author-discovery-shared .home-author-discovery-copy p {
        display:none !important;
    }

    .juf-homepage .juf-author-discovery-shared .home-author-discovery-visual,
    .authors-page .juf-author-discovery-shared .home-author-discovery-visual {
        position:absolute !important;
        z-index:2 !important;
        right:-4px !important;
        bottom:-3px !important;
        width:74px !important;
        height:92px !important;
        min-width:0 !important;
        display:flex !important;
        align-items:flex-end !important;
        justify-content:flex-end !important;
        pointer-events:none !important;
    }

    /* Exact same, deliberately larger portrait box on Home and Biography.
       The portrait should visually own the right half of each mobile card,
       not read like a small thumbnail. */
    .juf-homepage .juf-author-discovery-shared .home-author-discovery-image,
    .authors-page .juf-author-discovery-shared .home-author-discovery-image {
        position:relative !important;
        z-index:3 !important;
        display:block !important;
        width:74px !important;
        height:92px !important;
        max-width:none !important;
        margin:0 -3px -3px 0 !important;
        object-fit:contain !important;
        object-position:center bottom !important;
        border:0 !important;
        border-radius:0 !important;
        background:transparent !important;
        box-shadow:none !important;
        filter:drop-shadow(0 5px 7px rgba(40, 46, 55, .09)) !important;
    }

    .juf-homepage .juf-author-discovery-shared .juf-home-author-category-motif,
    .authors-page .juf-author-discovery-shared .juf-author-category-motif {
        position:absolute !important;
        inset:7px -10px 4px auto !important;
        width:78px !important;
        opacity:.10 !important;
        pointer-events:none !important;
    }
    .juf-homepage .juf-author-discovery-shared .juf-home-author-category-motif i:nth-child(1),
    .authors-page .juf-author-discovery-shared .juf-author-category-motif i:nth-child(1) { width:76px !important;height:76px !important;right:-18px !important;top:3px !important; }
    .juf-homepage .juf-author-discovery-shared .juf-home-author-category-motif i:nth-child(2),
    .authors-page .juf-author-discovery-shared .juf-author-category-motif i:nth-child(2) { width:24px !important;height:24px !important;right:39px !important;bottom:10px !important; }
    .juf-homepage .juf-author-discovery-shared .juf-home-author-category-motif i:nth-child(3),
    .authors-page .juf-author-discovery-shared .juf-author-category-motif i:nth-child(3) { width:62px !important;height:32px !important;right:-2px !important;bottom:8px !important; }

    /* Biography page no longer adds extra mobile whitespace around this same component. */
    .authors-page .juf-author-category-discovery.juf-author-discovery-shared {
        padding-top:20px !important;
    }
}

@media (max-width:370px) {
    .juf-homepage .juf-author-discovery-shared .home-author-discovery-card.is-visual,
    .authors-page .juf-author-discovery-shared .home-author-discovery-card.is-visual {
        min-height:98px !important;
        height:98px !important;
        padding-left:9px !important;
    }
    .juf-homepage .juf-author-discovery-shared .home-author-discovery-copy,
    .authors-page .juf-author-discovery-shared .home-author-discovery-copy { width:calc(100% - 68px) !important; }
    .juf-homepage .juf-author-discovery-shared .home-author-discovery-copy h3,
    .authors-page .juf-author-discovery-shared .home-author-discovery-copy h3 { font-size:12.6px !important; }
    .juf-homepage .juf-author-discovery-shared .home-author-discovery-visual,
    .authors-page .juf-author-discovery-shared .home-author-discovery-visual {
        width:72px !important;
        height:90px !important;
    }
    .juf-homepage .juf-author-discovery-shared .home-author-discovery-image,
    .authors-page .juf-author-discovery-shared .home-author-discovery-image {
        width:72px !important;
        height:90px !important;
    }
}


/* Build 259 — Biography mobile heading alignment.
   The shared component must keep the Homepage heading pattern on phones:
   title on the left, "সব জীবনী দেখুন" on the right. Explicit child sizing
   prevents older page rules from stacking/centering the two items. */
@media (max-width: 620px) {
    body.authors-page .juf-author-category-discovery.juf-author-discovery-shared {
        padding-top: 16px !important;
    }

    body.authors-page .juf-author-discovery-head-shared {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        text-align: left !important;
        margin-bottom: 12px !important;
    }

    body.authors-page .juf-author-discovery-head-shared > div:first-child {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        text-align: left !important;
    }

    body.authors-page .juf-author-discovery-head-shared .page-section-title {
        width: auto !important;
        margin: 0 !important;
        text-align: left !important;
    }

    body.authors-page .juf-author-discovery-head-shared .juf-author-discovery-actions,
    body.authors-page .juf-author-discovery-head-shared .section-head-actions {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        text-align: right !important;
    }

    body.authors-page .juf-author-discovery-head-shared .section-view-all {
        margin: 0 !important;
        text-align: right !important;
        white-space: nowrap !important;
    }
}


/* === MERGED: jufbook-author-directory-editorial.css === */
/* Build 267 — Author directory premium editorial cards + neutral literary fallback
   - real Author Media portrait wins whenever authors.photo resolves to a managed file
   - missing portrait never renders an invented human silhouette
   - compact 4-column desktop / 2-column mobile directory rhythm */

/* Neutral site-wide fallback used by GraphicEngine when no managed portrait exists. */
.juf-author-literary-placeholder{
    position:relative;
    isolation:isolate;
    display:block;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    overflow:hidden;
    border-radius:inherit;
    background:
        radial-gradient(circle at 72% 24%,color-mix(in srgb,var(--avatar-accent,#D9D6D0) 16%,transparent) 0 11%,transparent 11.5%),
        linear-gradient(145deg,color-mix(in srgb,var(--avatar-paper,#ECEAE6) 90%,#fff 10%),var(--avatar-paper,#ECEAE6));
    color:var(--avatar-ink,#282E37);
}
.juf-author-literary-placeholder::before,
.juf-author-literary-placeholder::after{
    content:"";
    position:absolute;
    z-index:0;
    pointer-events:none;
}
.juf-author-literary-placeholder::before{
    inset:13% 9% 12%;
    border:1px solid color-mix(in srgb,var(--avatar-ink,#3B4256) 9%,transparent);
    border-radius:42% 58% 46% 54% / 54% 45% 55% 46%;
    transform:rotate(-7deg);
}
.juf-author-literary-placeholder::after{
    left:10%;
    right:10%;
    bottom:16%;
    height:1px;
    background:color-mix(in srgb,var(--avatar-ink,#3B4256) 14%,transparent);
    box-shadow:0 -9px 0 color-mix(in srgb,var(--avatar-ink,#3B4256) 5%,transparent);
}
.juf-author-literary-rule{
    position:absolute;
    z-index:1;
    top:14%;
    left:12%;
    width:22%;
    height:2px;
    border-radius:999px;
    background:var(--avatar-accent,#D9D6D0);
    opacity:.54;
}
.juf-author-literary-initial{
    position:absolute;
    z-index:2;
    top:19%;
    left:12%;
    color:color-mix(in srgb,var(--avatar-ink,#282E37) 88%,#000 12%);
    font-family:var(--font-heading-editorial,'Anek Bangla',sans-serif);
    font-size:clamp(25px,5vw,58px);
    font-weight:500;
    line-height:1;
    opacity:.78;
}
.juf-author-literary-book{
    position:absolute;
    z-index:2;
    left:50%;
    bottom:19%;
    width:45%;
    height:auto;
    transform:translateX(-50%);
    fill:none;
    stroke:color-mix(in srgb,var(--avatar-ink,#282E37) 72%,transparent);
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
    opacity:.46;
}
.juf-author-literary-mark{
    position:absolute;
    z-index:2;
    right:10%;
    bottom:7%;
    color:color-mix(in srgb,var(--avatar-ink,#282E37) 56%,transparent);
    font:600 8px/1 var(--font-ui-system,'Noto Sans',sans-serif);
    letter-spacing:.08em;
}

.authors-page .juf-authors-grid-5{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    align-items:stretch !important;
    gap:14px !important;
}

.authors-page .juf-author-directory-card{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    padding:10px 10px 12px !important;
    border:1px solid rgba(59, 66, 86, .09) !important;
    border-radius:16px !important;
    background:rgba(246, 245, 242, .34) !important;
    box-shadow:0 3px 14px rgba(40, 46, 55, .025) !important;
    text-align:center !important;
    overflow:hidden !important;
}
.authors-page .juf-author-directory-card:hover,
.authors-page .juf-author-directory-card:focus-visible{
    transform:translateY(-1px) !important;
    border-color:#D9D6D0 !important;
    background:rgba(246, 245, 242, .50) !important;
    box-shadow:0 7px 20px rgba(40, 46, 55, .045) !important;
}
.authors-page .juf-author-directory-status{display:none !important}

/* Portrait stage: compact, quiet, and visually integrated with the cream page. */
.authors-page .juf-author-directory-avatar,
.authors-page .juf-author-directory-avatar.has-photo,
.authors-page .juf-author-directory-avatar.is-photo-missing{
    display:block !important;
    width:100% !important;
    height:auto !important;
    aspect-ratio:1 / 1 !important;
    max-width:222px !important;
    margin:0 auto 10px !important;
    overflow:hidden !important;
    border:1px solid rgba(59, 66, 86, .055) !important;
    border-radius:13px !important;
    background:rgba(246, 245, 242, .52) !important;
    box-shadow:none !important;
}
.authors-page .juf-author-directory-avatar > *,
.authors-page .juf-author-directory-avatar .juf-author-literary-placeholder,
.authors-page .juf-author-directory-avatar .juf-author-circle-img{
    width:100% !important;
    height:100% !important;
    display:block !important;
    border-radius:12px !important;
}
.authors-page .juf-author-directory-avatar .juf-author-circle-img{
    object-fit:contain !important;
    object-position:center top !important;
    background:transparent !important;
    box-shadow:none !important;
}
.authors-page .juf-author-directory-avatar.is-photo-missing{
    background:transparent !important;
}
.authors-page .juf-author-directory-avatar.is-photo-missing .juf-author-literary-placeholder{
    background:
        radial-gradient(circle at 74% 25%,color-mix(in srgb,var(--avatar-accent) 14%,transparent) 0 10%,transparent 10.5%),
        linear-gradient(150deg,color-mix(in srgb,var(--avatar-paper) 92%,#fff 8%),color-mix(in srgb,var(--avatar-paper) 86%,#ECEAE6 14%)) !important;
}

/* Fixed text bands keep every card on the same editorial baseline. */
.authors-page .juf-author-directory-name{
    display:-webkit-box !important;
    width:100% !important;
    height:2.48em !important;
    min-height:2.48em !important;
    margin:0 !important;
    overflow:hidden !important;
    color:#282E37 !important;
    font-family:var(--font-heading-editorial,'Anek Bangla',sans-serif) !important;
    font-size:17px !important;
    font-weight:500 !important;
    line-height:1.24 !important;
    text-wrap:balance !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
}
.authors-page .juf-author-directory-en{
    display:block !important;
    width:100% !important;
    height:1.32em !important;
    min-height:1.32em !important;
    margin:4px 0 0 !important;
    overflow:hidden !important;
    color:#5B6376 !important;
    font-family:var(--font-ui-system,'Noto Sans',sans-serif) !important;
    font-size:12.3px !important;
    font-weight:400 !important;
    line-height:1.32 !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
}
.authors-page .juf-author-directory-role,
.authors-page .juf-author-directory-meta{
    display:none !important;
}
.authors-page .juf-author-directory-category{
    display:block !important;
    width:100% !important;
    height:1.32em !important;
    min-height:1.32em !important;
    margin:6px 0 0 !important;
    padding:0 !important;
    overflow:hidden !important;
    color:#5B6376 !important;
    font-family:var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif) !important;
    font-size:10.8px !important;
    font-weight:500 !important;
    line-height:1.32 !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
}

@media (min-width:701px){
    .authors-page .juf-author-directory-card{padding:11px 11px 13px !important}
    .authors-page .juf-author-directory-avatar,
    .authors-page .juf-author-directory-avatar.has-photo,
    .authors-page .juf-author-directory-avatar.is-photo-missing{
        max-width:222px !important;
        margin-bottom:10px !important;
    }
    .authors-page .juf-author-directory-name{font-size:17.5px !important}
    .authors-page .juf-author-directory-en{font-size:12.4px !important}
    .authors-page .juf-author-directory-category{font-size:10.8px !important}
}

@media (max-width:700px){
    .authors-page .juf-authors-grid-5{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:10px !important;
    }
    .authors-page .juf-author-directory-card{
        padding:3px 3px 9px !important;
        border-radius:13px !important;
        background:rgba(246, 245, 242, .28) !important;
        box-shadow:none !important;
    }
    .authors-page .juf-author-directory-avatar,
    .authors-page .juf-author-directory-avatar.has-photo,
    .authors-page .juf-author-directory-avatar.is-photo-missing{
        max-width:none !important;
        margin-bottom:10px !important;
        border-radius:11px !important;
    }
    .authors-page .juf-author-directory-avatar > *,
    .authors-page .juf-author-directory-avatar .juf-author-literary-placeholder,
    .authors-page .juf-author-directory-avatar .juf-author-circle-img{
        border-radius:10px !important;
    }
    .authors-page .juf-author-directory-name{
        font-size:15.2px !important;
        line-height:1.18 !important;
        height:2.36em !important;
        min-height:2.36em !important;
    }
    .authors-page .juf-author-directory-en{
        margin-top:1px !important;
        font-size:11.1px !important;
    }
    .authors-page .juf-author-directory-category{
        margin-top:2px !important;
        font-size:9.9px !important;
    }
}

@media (max-width:370px){
    .authors-page .juf-author-directory-card{padding:4px 4px 8px !important}
    .authors-page .juf-author-directory-name{font-size:14.8px !important}
    .authors-page .juf-author-directory-en{font-size:10.9px !important}
    .authors-page .juf-author-directory-category{font-size:9.7px !important}
}

html[data-theme="dark"] .juf-author-literary-placeholder{
    background:
        radial-gradient(circle at 72% 24%,color-mix(in srgb,var(--avatar-accent,#C9D4EC) 13%,transparent) 0 11%,transparent 11.5%),
        linear-gradient(145deg,#2C3037,#2C3037) !important;
    color:#A09B94 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-card{
    background:rgba(35, 38, 43, .40) !important;
    border-color:rgba(217, 214, 208, .08) !important;
    box-shadow:none !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-card:hover,
html[data-theme="dark"] body.authors-page .juf-author-directory-card:focus-visible{
    background:rgba(44, 48, 55, .54) !important;
    border-color:rgba(217, 214, 208, .22) !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-name{color:#ECE8E1 !important}
html[data-theme="dark"] body.authors-page .juf-author-directory-en{color:#A09B94 !important}
html[data-theme="dark"] body.authors-page .juf-author-directory-category{color:#A09B94 !important}
html[data-theme="dark"] body.authors-page .juf-author-directory-avatar,
html[data-theme="dark"] body.authors-page .juf-author-directory-avatar.has-photo,
html[data-theme="dark"] body.authors-page .juf-author-directory-avatar.is-photo-missing{
    border-color:rgba(217, 214, 208, .07) !important;
    background:rgba(44, 48, 55, .42) !important;
}

/* Build 268 — Author directory text clarity / decorative fade removal
   The older premium-card layer added radial white glows with ::before/::after.
   Those overlays crossed the metadata band and were especially visible in dark mode.
   Directory cards are now deliberately flat/editorial: artwork + type, no overlay glow. */
.authors-page .juf-author-directory-card::before,
.authors-page .juf-author-directory-card::after,
html[data-theme="dark"] body.authors-page .juf-author-directory-card::before,
html[data-theme="dark"] body.authors-page .juf-author-directory-card::after{
    content:none !important;
    display:none !important;
    background:none !important;
    box-shadow:none !important;
    filter:none !important;
    opacity:0 !important;
}

/* Keep the typography layer above any legacy decorative layers that may be
   introduced by cached/older theme CSS. */
.authors-page .juf-author-directory-name,
.authors-page .juf-author-directory-en,
.authors-page .juf-author-directory-category{
    position:relative !important;
    z-index:3 !important;
    text-shadow:none !important;
}

/* Slightly firmer dark-mode contrast without making the cards loud. */
html[data-theme="dark"] body.authors-page .juf-author-directory-en{
    color:#A09B94 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-category{
    color:#A09B94 !important;
}


/* Build 269 — larger real portrait presence + tighter editorial copy rhythm
   The portrait stage is slightly larger while verified photo art is scaled inside
   the stage. Missing-photo literary placeholders remain neutral and are not treated
   as faces. Text bands are tightened so cards stay balanced. */
.authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar .juf-author-circle-img{
    transform:scale(1.065) !important;
    transform-origin:center top !important;
}
@media (max-width:700px){
    .authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar .juf-author-circle-img{
        transform:scale(1.10) !important;
        transform-origin:center top !important;
    }
}


/* Build 270 — larger portrait presence + lower Bengali-name baseline
   Real verified portraits gain a little more visual presence. The Bengali name
   starts slightly lower for calmer breathing room under the portrait, while
   English/category spacing is tightened so equal card heights are preserved. */


/* ========================================================================
   Build 318 — Biography (`authors.php`) Full-Width Alignment & Premium Polish
   1. Removes the two-tone #F6F5F2 center strip on .authors-page .site-main and
      .juf-authors-page so the entire viewport shares one seamless warm paper
      canvas (--bg-cream / #ECEAE6) like Homepage and Books Library.
   2. Eliminates double .container horizontal padding on #author-categories,
      #all-authors, and .juf-author-new-book-story > .container so every
      section aligns flush left/right with the Hero card and top Navbar.
   3. Styles the "মনীষী" section's "সব জীবনী দেখুন" link as a crisp pill and
      makes the circular ‹ › slider buttons clearly visible.
   4. Aligns the "সকল লেখক ও ব্যক্তিত্ব" heading and count pill on a unified
      editorial header row and refines the Alphabet bar + "সব" chip.
   5. Upgrades .juf-author-directory-card surfaces (#FFFFFF warm card surface,
      refined border/shadow, balanced 188px avatar stage, calmer literary
      bookplate placeholder for missing portraits, and category pill badge).
   6. Balances the bottom "নতুন বই" spotlight card layout and book cover scale.
   ======================================================================== */

/* 1. Seamless warm paper canvas & zero nested-container indentation */
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.authors-page .site-main,
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.authors-page .juf-authors-page {
    background: transparent !important;
    background-image: none !important;
}

body.authors-page .juf-authors-page :where(
    section.container,
    .juf-author-category-discovery.container,
    .juf-author-discovery.container,
    .juf-author-new-book-story > .container
) {
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}

/* 2. "মনীষী" Discovery Header, Pill & Slider Arrows */
body.authors-page .juf-author-category-discovery {
    padding-top: 10px !important;
}
body.authors-page .juf-author-discovery-head-shared {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
}
body.authors-page .juf-author-discovery-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}
body.authors-page .juf-author-discovery-head-shared .section-view-all {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    padding: 0 15px !important;
    border: 1px solid rgba(59, 66, 86, .24) !important;
    border-radius: 999px !important;
    background: #ECEAE6 !important;
    color: #282E37 !important;
    font: 600 13px/1 var(--font-ui-system) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(40, 46, 55, .04) !important;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease !important;
}
body.authors-page .juf-author-discovery-head-shared .section-view-all:hover,
body.authors-page .juf-author-discovery-head-shared .section-view-all:focus-visible {
    background: #2C3243 !important;
    border-color: #2C3243 !important;
    color: #FFFFFF !important;
    outline: none !important;
}
body.authors-page .juf-author-category-nav-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    border: 1px solid rgba(59, 66, 86, .24) !important;
    border-radius: 50% !important;
    background: #ECEAE6 !important;
    color: #3B4256 !important;
    font-size: 18px !important;
    box-shadow: 0 4px 12px rgba(40, 46, 55, .045) !important;
}
body.authors-page .juf-author-category-nav-btn:hover:not(:disabled),
body.authors-page .juf-author-category-nav-btn:focus-visible:not(:disabled) {
    background: #2C3243 !important;
    border-color: #2C3243 !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
}

/* 3. "সকল লেখক ও ব্যক্তিত্ব" Heading Row & Count Pill Parity with Books Page */
body.authors-page .juf-author-discovery {
    padding-top: 36px !important;
}
body.authors-page .juf-author-directory-heading {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #D9D6D0 !important;
}
body.authors-page .juf-author-directory-heading > div {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}
body.authors-page .juf-author-directory-heading .page-section-title {
    margin: 0 !important;
}
body.authors-page .juf-author-directory-summary {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 4px 12px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 999px !important;
    background: rgba(236, 234, 230, .82) !important;
    color: #282E37 !important;
    font: 500 13px/1.2 var(--font-ui-system) !important;
    opacity: 1 !important;
}

/* 4. Alphabet Filter Bar Polish */
body.authors-page .juf-author-alphabet {
    margin: 14px 0 22px !important;
    padding: 12px 16px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 16px !important;
    background: rgba(236, 234, 230, .82) !important;
    box-shadow: 0 6px 18px rgba(40, 46, 55, .03) !important;
}
body.authors-page .juf-author-alphabet-group {
    align-items: center !important;
    gap: 12px !important;
}
body.authors-page .juf-author-alphabet-label {
    min-width: 54px !important;
    font-weight: 600 !important;
    color: #282E37 !important;
}
body.authors-page .juf-author-alphabet-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}
body.authors-page .juf-author-alphabet a {
    min-width: 33px !important;
    height: 33px !important;
    padding: 0 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 9px !important;
    background: #FFFFFF !important;
    color: #282E37 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease !important;
}
body.authors-page .juf-author-alphabet a.juf-alpha-all {
    padding: 0 12px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
}
body.authors-page .juf-author-alphabet a:hover,
body.authors-page .juf-author-alphabet a:focus-visible {
    border-color: #2C3243 !important;
    background: #ECEAE6 !important;
    transform: translateY(-1px) !important;
}
body.authors-page .juf-author-alphabet a.active,
body.authors-page .juf-author-alphabet a[aria-current="true"] {
    border-color: #3B4256 !important;
    background: #3B4256 !important;
    color: #FFFFFF !important;
}

/* 5. Author Directory Cards & Refined Bookplate Placeholder */
body.authors-page .juf-authors-grid-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px 18px !important;
}
body.authors-page .juf-author-directory-card {
    padding: 16px 15px 18px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 18px !important;
    background: rgba(236, 234, 230, .86) !important;
    box-shadow: 0 8px 22px rgba(40, 46, 55, .042) !important;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease !important;
}
body.authors-page .juf-author-directory-card:hover,
body.authors-page .juf-author-directory-card:focus-visible {
    transform: translateY(-3px) !important;
    border-color: rgba(59, 66, 86, .42) !important;
    background: #ECEAE6 !important;
    box-shadow: 0 14px 30px rgba(40, 46, 55, .085) !important;
}

body.authors-page .juf-author-directory-avatar,
body.authors-page .juf-author-directory-avatar.has-photo,
body.authors-page .juf-author-directory-avatar.is-photo-missing {
    width: 100% !important;
    max-width: 188px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto 13px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 14px !important;
    background: linear-gradient(160deg, #ECEAE6 0%, #E4E6EC 100%) !important;
    overflow: hidden !important;
}
body.authors-page .juf-author-directory-avatar > *,
body.authors-page .juf-author-directory-avatar .juf-author-literary-placeholder,
body.authors-page .juf-author-directory-avatar .juf-author-circle-img {
    border-radius: 13px !important;
}

/* Calmer archival bookplate proportions for missing-photo placeholders */
body.authors-page .juf-author-literary-initial {
    top: 20% !important;
    left: 14% !important;
    font-size: clamp(26px, 3.2vw, 38px) !important;
    opacity: .68 !important;
}
body.authors-page .juf-author-literary-book {
    width: 34% !important;
    bottom: 22% !important;
    stroke-width: 1.6 !important;
    opacity: .36 !important;
}

body.authors-page .juf-author-directory-name {
    color: #282E37 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.28 !important;
    height: auto !important;
    min-height: 1.3em !important;
}
body.authors-page .juf-author-directory-en {
    margin-top: 3px !important;
    color: #5B6376 !important;
    font-family: var(--font-ui-system, 'Noto Sans', sans-serif) !important;
    font-size: 12.5px !important;
    opacity: 1 !important;
}
body.authors-page .juf-author-directory-category {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 23px !important;
    margin: 9px auto 0 !important;
    padding: 3px 10px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 999px !important;
    background: rgba(246, 245, 242, .75) !important;
    color: #282E37 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

/* 6. "নতুন বই" Spotlight Banner Proportions at the Bottom of Biography Page */
body.authors-page .juf-author-new-book-story {
    padding: 18px 0 56px !important;
}
body.authors-page .juf-author-new-book-section-head {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-bottom: 14px !important;
}
body.authors-page .juf-author-new-book-stage {
    min-height: 318px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at 86% 22%, rgba(59, 66, 86, .08), transparent 32%),
        linear-gradient(135deg, #ECEAE6 0%, #ECEAE6 100%) !important;
    box-shadow: 0 16px 40px rgba(40, 46, 55, .065) !important;
}
body.authors-page .juf-author-new-book-slide {
    padding: 32px 48px 48px !important;
    grid-template-columns: minmax(0, 1fr) 210px !important;
    gap: 40px !important;
}
body.authors-page .juf-author-new-book-cover {
    width: 158px !important;
    height: 237px !important;
}

@media (max-width: 980px) {
    body.authors-page .juf-authors-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 16px 14px !important;
    }
}

@media (max-width: 700px) {
    body.authors-page .juf-authors-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px 11px !important;
    }
    body.authors-page .juf-author-directory-card {
        padding: 11px 10px 13px !important;
        border-radius: 15px !important;
    }
    body.authors-page .juf-author-directory-avatar,
    body.authors-page .juf-author-directory-avatar.has-photo,
    body.authors-page .juf-author-directory-avatar.is-photo-missing {
        max-width: none !important;
        margin-bottom: 10px !important;
        border-radius: 12px !important;
    }
    body.authors-page .juf-author-directory-name {
        font-size: 16px !important;
    }
    body.authors-page .juf-author-directory-en {
        font-size: 11.5px !important;
    }
    body.authors-page .juf-author-directory-category {
        margin-top: 7px !important;
        padding: 2px 8px !important;
        font-size: 10px !important;
    }
    body.authors-page .juf-author-new-book-slide {
        padding: 22px 18px 44px !important;
        grid-template-columns: minmax(0, 1fr) 98px !important;
        gap: 14px !important;
    }
    body.authors-page .juf-author-new-book-cover {
        width: 88px !important;
        height: 132px !important;
    }
}

/* Dark mode adjustments for Build 318 */
html[data-theme="dark"] body.authors-page .juf-author-discovery-head-shared .section-view-all,
html[data-theme="dark"] body.authors-page .juf-author-category-nav-btn {
    background: #23262B !important;
    border-color: #3A3F47 !important;
    color: #ECE8E1 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body.authors-page .juf-author-discovery-head-shared .section-view-all:hover,
html[data-theme="dark"] body.authors-page .juf-author-category-nav-btn:hover:not(:disabled) {
    background: #DDE5F5 !important;
    border-color: #C9D4EC !important;
    color: #23262B !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-summary {
    background: #23262B !important;
    border-color: #3A3F47 !important;
    color: #A09B94 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-alphabet {
    background: #23262B !important;
    border-color: #3A3F47 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body.authors-page .juf-author-alphabet a {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
    color: #ECE8E1 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-alphabet a.active,
html[data-theme="dark"] body.authors-page .juf-author-alphabet a[aria-current="true"] {
    background: #C9D4EC !important;
    border-color: #C9D4EC !important;
    color: #23262B !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-card {
    background: #23262B !important;
    border-color: #3A3F47 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-card:hover,
html[data-theme="dark"] body.authors-page .juf-author-directory-card:focus-visible {
    background: #2C3037 !important;
    border-color: #9CA1B4 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-category {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
    color: #A09B94 !important;
}


/* ========================================================================
   Build 320 — Biography 220x280 Vertical Portrait Frame Match (author.php Parity)
   Matches the exact vertical portrait box geometry and presentation from
   author.php (.person-portrait: 220x280 / aspect-ratio 220/280, #ECEAE6 paper
   surface, 1px #D9D6D0 border, 4px radius, object-fit: contain, center top,
   transform: none) inside a 5-column desktop directory grid (where 5 columns
   with 20px gap inside the 1180px container equal 220px per column).
   Eliminates the outer white wrapper box around each card so the 220x280
   portrait frame stands cleanly above the centered name and category badge.
   ======================================================================== */

body.authors-page .juf-authors-grid-5 {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 30px 20px !important;
    align-items: start !important;
}

body.authors-page .juf-author-directory-card,
body.authors-page .juf-author-directory-card:hover,
body.authors-page .juf-author-directory-card:focus-visible {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

body.authors-page .juf-author-directory-avatar,
body.authors-page .juf-author-directory-avatar.has-photo,
body.authors-page .juf-author-directory-avatar.is-photo-missing,
body.authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 220px !important;
    height: auto !important;
    aspect-ratio: 220 / 280 !important;
    margin: 0 auto 12px !important;
    padding: 0 !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 4px !important;
    background: #E4E6EC !important;
    box-shadow: 0 6px 18px rgba(40, 46, 55, .045) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease !important;
}

body.authors-page .juf-author-directory-card:hover .juf-author-directory-avatar,
body.authors-page .juf-author-directory-card:focus-visible .juf-author-directory-avatar {
    transform: translateY(-3px) !important;
    border-color: #3346A8 !important;
    box-shadow: 0 12px 26px rgba(40, 46, 55, .09) !important;
}

body.authors-page .juf-author-directory-avatar > *,
body.authors-page .juf-author-directory-avatar .juf-author-circle-img,
body.authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar .juf-author-circle-img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    object-fit: contain !important;
    object-position: center top !important;
    transform: none !important;
    filter: none !important;
}

body.authors-page .juf-author-directory-avatar.is-photo-missing .juf-author-literary-placeholder {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    background:
        radial-gradient(circle at 72% 22%, color-mix(in srgb, var(--avatar-accent, #D9D6D0) 14%, transparent) 0 11%, transparent 11.5%),
        linear-gradient(160deg, #ECEAE6 0%, #E4E6EC 100%) !important;
}

body.authors-page .juf-author-literary-initial {
    top: 20% !important;
    left: 14% !important;
    font-size: clamp(28px, 2.8vw, 38px) !important;
    opacity: .68 !important;
}

body.authors-page .juf-author-literary-book {
    width: 34% !important;
    bottom: 22% !important;
    stroke-width: 1.6 !important;
    opacity: .36 !important;
}

body.authors-page .juf-author-directory-name {
    padding: 0 2px !important;
    color: #282E37 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    height: auto !important;
    min-height: 1.3em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
}

body.authors-page .juf-author-directory-en {
    padding: 0 2px !important;
    margin-top: 2px !important;
    color: #5B6376 !important;
    font-size: 12px !important;
    line-height: 1.32 !important;
}

body.authors-page .juf-author-directory-category {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 24px !important;
    margin: 7px auto 0 !important;
    padding: 3px 11px !important;
    border: 1px solid rgba(59, 66, 86, .28) !important;
    border-radius: 4px !important;
    background: #ECEAE6 !important;
    color: #282E37 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
}

@media (max-width: 1140px) {
    body.authors-page .juf-authors-grid-5 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 26px 18px !important;
    }
}

@media (max-width: 860px) {
    body.authors-page .juf-authors-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 24px 15px !important;
    }
}

@media (max-width: 640px) {
    body.authors-page .juf-authors-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 22px 12px !important;
    }
    body.authors-page .juf-author-directory-avatar,
    body.authors-page .juf-author-directory-avatar.has-photo,
    body.authors-page .juf-author-directory-avatar.is-photo-missing,
    body.authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar {
        max-width: none !important;
        margin-bottom: 10px !important;
        border-radius: 4px !important;
    }
    body.authors-page .juf-author-directory-name {
        font-size: 15.5px !important;
    }
    body.authors-page .juf-author-directory-en {
        font-size: 11.25px !important;
    }
    body.authors-page .juf-author-directory-category {
        margin-top: 6px !important;
        padding: 2px 9px !important;
        font-size: 10px !important;
    }
}

html[data-theme="dark"] body.authors-page .juf-author-directory-card,
html[data-theme="dark"] body.authors-page .juf-author-directory-card:hover,
html[data-theme="dark"] body.authors-page .juf-author-directory-card:focus-visible {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.authors-page .juf-author-directory-avatar,
html[data-theme="dark"] body.authors-page .juf-author-directory-avatar.has-photo,
html[data-theme="dark"] body.authors-page .juf-author-directory-avatar.is-photo-missing,
html[data-theme="dark"] body.authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.authors-page .juf-author-directory-category {
    background: #23262B !important;
    border-color: #3A3F47 !important;
    color: #ECE8E1 !important;
}

/* BUILD 353 — Dark Mode Author Name & English Subtitle Contrast Fix */
html[data-theme="dark"] body.authors-page .juf-author-directory-name {
    color: #ECE8E1 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-en {
    color: #A09B94 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-avatar.is-photo-missing .juf-author-literary-placeholder {
    background: linear-gradient(160deg, #2C3037 0%, #23262B 100%) !important;
    color: #ECE8E1 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-literary-initial,
html[data-theme="dark"] body.authors-page .juf-author-literary-book,
html[data-theme="dark"] body.authors-page .juf-author-literary-mark {
    color: #ECE8E1 !important;
    stroke: #ECE8E1 !important;
}



/* ==========================================================================
   BUILD 381 — HIDE BOTTOM "নতুন বই" ROTATOR HERO ON AUTHORS PAGE (`1000168331.jpg`)
   ========================================================================== */
html body .juf-author-new-book-story,
body.authors-page .juf-author-new-book-story,
.authors-page .juf-author-new-book-story {
    display: none !important;
}


/* ==========================================================================
   BUILD 382 — AUTHOR NAME REFINED LITERARY SERIF READABILITY (`1792898926748.jpeg`)
   Replaces the hairline-thin (`besi suru`) 15.5px Kalpurush rendering on
   `.juf-author-directory-name` with `Tiro Bangla` / `SolaimanLipi` literary
   serif at `18px` (desktop) / `16.5px` (mobile) and a delicate `0.16px` ink
   fullness (`font-synthesis: none`) so the Bengali name feels rich, warm, and
   effortless to read without looking like heavy bold sans-serif.
   ========================================================================== */
html body.authors-page .juf-author-discovery .juf-author-directory-card .juf-author-directory-name,
html body.authors-page .juf-author-directory-card .juf-author-directory-name,
html body.authors-page .juf-author-directory-name,
html body.authors-page .juf-author-directory-name,
body.authors-page .juf-author-directory-name {
    font-family: var(--font-display-literary, 'Tiro Bangla', 'SolaimanLipi', 'Kalpurush', serif) !important;
    font-size: 16.5px !important;
    font-weight: 500 !important;
    font-synthesis: none !important;
    -webkit-text-stroke: 0.12px currentColor !important;
    text-shadow: 0 0 0.08px currentColor !important;
    line-height: 1.32 !important;
    letter-spacing: 0 !important;
    color: #282E37 !important;
    padding: 0 2px !important;
    height: auto !important;
    min-height: 1.32em !important;
    -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body.authors-page .juf-author-discovery .juf-author-directory-card .juf-author-directory-name,
html[data-theme="dark"] body.authors-page .juf-author-directory-card .juf-author-directory-name,
html[data-theme="dark"] body.authors-page .juf-author-directory-name,
html[data-theme="dark"] body.authors-page .juf-author-directory-name {
    color: #ECE8E1 !important;
    -webkit-text-stroke: 0.1px currentColor !important;
    text-shadow: 0 0 0.08px currentColor !important;
}

@media (max-width: 700px) {
    html body.authors-page .juf-author-discovery .juf-author-directory-card .juf-author-directory-name,
    html body.authors-page .juf-author-directory-card .juf-author-directory-name,
    html body.authors-page .juf-author-directory-name,
    html body.authors-page .juf-author-directory-name,
    body.authors-page .juf-author-directory-name {
        font-size: 15px !important;
        line-height: 1.3 !important;
        min-height: 1.3em !important;
    }
}

@media (max-width: 380px) {
    html body.authors-page .juf-author-discovery .juf-author-directory-card .juf-author-directory-name,
    html body.authors-page .juf-author-directory-card .juf-author-directory-name,
    html body.authors-page .juf-author-directory-name,
    html body.authors-page .juf-author-directory-name,
    body.authors-page .juf-author-directory-name {
        font-size: 14.5px !important;
    }
}


/* ==========================================================================
   BUILD 445 — LARGER BIOGRAPHY DIRECTORY PORTRAITS & CLEAN 4-COL DESKTOP GRID
   Enlarges each author portrait card in #all-authors from 200-220px (5-col)
   to up to 268px (4-col desktop) with refined 10px radius and 21-token palette.
   ========================================================================== */
@media (min-width: 1024px) {
    body.authors-page .juf-authors-grid-5 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 32px 24px !important;
    }
}

body.authors-page .juf-author-directory-avatar,
body.authors-page .juf-author-directory-avatar.has-photo,
body.authors-page .juf-author-directory-avatar.is-photo-missing,
body.authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar {
    max-width: 268px !important;
    aspect-ratio: 220 / 280 !important;
    border-radius: 10px !important;
    background: var(--soft, #E4E6EC) !important;
    border: 1px solid var(--line, #D9D6D0) !important;
}

@media (max-width: 640px) {
    body.authors-page .juf-authors-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px 14px !important;
    }
    body.authors-page .juf-author-directory-avatar,
    body.authors-page .juf-author-directory-avatar.has-photo,
    body.authors-page .juf-author-directory-avatar.is-photo-missing,
    body.authors-page .juf-author-directory-card.has-photo .juf-author-directory-avatar {
        max-width: none !important;
        width: 100% !important;
        border-radius: 10px !important;
    }
}

html[data-theme="dark"] body.authors-page .juf-author-alphabet-label {
    color: #ECE8E1 !important;
}


html body.authors-page .juf-author-discovery .juf-author-directory-card .juf-author-directory-en,
html body.authors-page .juf-author-directory-card .juf-author-directory-en {
    font-size: 12px !important;
    line-height: 1.3 !important;
}
@media (max-width: 700px) {
    html body.authors-page .juf-author-discovery .juf-author-directory-card .juf-author-directory-en,
    html body.authors-page .juf-author-directory-card .juf-author-directory-en {
        font-size: 11.25px !important;
        line-height: 1.28 !important;
    }
}
@media (max-width: 380px) {
    html body.authors-page .juf-author-discovery .juf-author-directory-card .juf-author-directory-en,
    html body.authors-page .juf-author-directory-card .juf-author-directory-en {
        font-size: 10.75px !important;
    }
}

/* Build 520: Hide JUF corner watermark on literary placeholder cards on website */
html body .juf-author-literary-mark { display: none !important; }

