/* === MERGED: reader.css === */
/* JUFbook Reader / Zen Mode */
body.reader-page {
    --reader-bg: #F6F5F2;
    --reader-surface: #ECEAE6;
    --reader-surface-strong: #FFFFFF;
    --reader-text: #282E37;
    --reader-muted: #5B6376;
    --reader-border: #D9D6D0;
    --reader-accent: #3B4256;
    --reader-shadow: 0 16px 44px rgba(40, 46, 55, 0.08);
    --reader-width: 700px;
    --reader-font-size: 19.5px;
    --reader-line-height: 1.84;
    --reader-font-family: var(--font-reading, 'SolaimanLipi', serif);
    background: var(--reader-bg);
    color: var(--reader-text);
    transition: background-color .25s ease, color .25s ease;
}

body.reader-page[data-reader-theme="sepia"] {
    --reader-bg: #EFE8D8;
    --reader-surface: #EFE8D8;
    --reader-surface-strong: #F6F5F2;
    --reader-text: #282E37;
    --reader-muted: #5B6376;
    --reader-border: #D9D6D0;
    --reader-accent: #3B4256;
    --reader-shadow: 0 16px 44px rgba(40, 46, 55, 0.10);
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme]),
body.reader-page[data-reader-theme="dark"] {
    --reader-bg: #23262B;
    --reader-surface: #2C3037;
    --reader-surface-strong: #343A44;
    --reader-text: #ECE8E1;
    --reader-muted: #A09B94;
    --reader-border: #3A3F47;
    --reader-accent: #C9D4EC;
    --reader-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.reader-page .site-main {
    max-width: none;
    padding: 0;
}

.reader-progress-rail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 11000;
    background: transparent;
    pointer-events: none;
}

.reader-progress-fill {
    height: 100%;
    width: 0;
    background: var(--reader-accent);
    transition: width .12s linear;
}

.reader-shell {
    width: min(100%, 1180px);
    margin: 18px auto 92px;
    padding: 0 20px;
}

.reader-toolbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    margin-bottom: 30px;
    background: color-mix(in srgb, var(--reader-surface-strong) 92%, transparent);
    border: 1px solid var(--reader-border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .06);
    backdrop-filter: blur(14px);
}

.reader-toolbar-group,
.reader-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.reader-toolbar-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.reader-toolbar-title strong {
    color: var(--reader-text);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.reader-toolbar-title small {
    color: var(--reader-muted);
    font-size: 11px;
}

.reader-icon-btn,
.reader-text-btn {
    border: 1px solid var(--reader-border);
    background: var(--reader-surface);
    color: var(--reader-text);
    min-height: 38px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 500;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.reader-icon-btn { min-width: 38px; padding: 7px 10px; }
.reader-text-btn { padding: 7px 12px; }
.reader-icon-btn:hover,
.reader-text-btn:hover { transform: translateY(-1px); border-color: var(--reader-accent); }
.reader-icon-btn[aria-pressed="true"] { background: var(--reader-accent); color: var(--on-accent, #F6F5F2); border-color: var(--reader-accent); }

.reader-stage {
    max-width: calc(var(--reader-width) + 144px);
    margin: 0 auto;
    transition: max-width .25s ease;
}

.reader-chapter-head {
    text-align: center;
    padding: 8px 12px 32px;
}

.reader-overline {
    color: var(--reader-accent);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
}

.reader-chapter-head h1 {
    margin: 7px 0 8px;
    color: var(--reader-text);
    font-family: var(--font-heading-editorial);
    font-size: clamp(29px, 3vw, 34px);
    line-height: 1.35;
}

.reader-chapter-meta {
    display: flex;
    justify-content: center;
    gap: 10px 18px;
    flex-wrap: wrap;
    color: var(--reader-muted);
    font-size: 12px;
}

.reader-audio-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin: 0 auto 28px;
    background: var(--reader-surface);
    border: 1px solid var(--reader-border);
    border-radius: 16px;
}

.reader-audio-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--reader-accent);
    color: var(--on-accent, #F6F5F2);
}

.reader-audio-card audio { width: 100%; min-width: 0; }

.reader-content-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 8px 0 36px;
}

#reader-content-body {
    font-family: var(--reader-font-family);
    font-size: var(--reader-font-size);
    line-height: var(--reader-line-height);
    color: var(--reader-text);
    text-align: start;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
    transition: font-size .18s ease, line-height .18s ease, color .25s ease;
}

#reader-content-body p, #reader-content-body li { color: var(--reader-text); }
#reader-content-body p { margin: 0 0 1.2em; }
#reader-content-body p:last-child { margin-bottom: 0; }
#reader-content-body h2,
#reader-content-body h3,
#reader-content-body h4 {
    color: var(--reader-text);
    font-family: var(--font-heading-editorial);
    line-height: 1.45;
    margin: 1.65em 0 .65em;
}
#reader-content-body blockquote {
    margin: 1.4em 0;
    padding: .25em 1.15em;
    border-left: 3px solid var(--reader-accent);
    color: var(--reader-muted);
}
#reader-content-body ul,
#reader-content-body ol { padding-left: 1.6em; margin: 0 0 1.2em; }
#reader-content-body li { margin-bottom: .45em; }
#reader-content-body a { color: var(--reader-accent); text-underline-offset: 3px; }
#reader-content-body .juf-content-image { margin: 1.8em auto; text-align: center; }
#reader-content-body .juf-content-image img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; }
#reader-content-body .juf-content-image figcaption { margin-top: 9px; color: var(--reader-muted); font-family: var(--font-ui); font-size: .72em; line-height: 1.55; }
#reader-content-body .juf-image-credit{font-style:italic;opacity:.82}
#reader-content-body .ql-align-center { text-align: center; }
#reader-content-body .ql-align-right { text-align: right; }
#reader-content-body .ql-align-justify { text-align: start; }

.reader-bottom-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
    padding-top: 22px;
}

.reader-bottom-nav .reader-nav-next { justify-self: end; }
.reader-bottom-nav .reader-nav-center { color: var(--reader-accent); font-weight: 500; text-decoration: none; }
.reader-nav-disabled { color: var(--reader-muted); opacity: .5; }

.reader-settings-popover {
    position: fixed;
    inset: auto 24px 24px auto;
    z-index: 12000;
    width: min(360px, calc(100vw - 32px));
    background: var(--reader-surface-strong);
    color: var(--reader-text);
    border: 1px solid var(--reader-border);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
    padding: 18px;
    transform: translateY(14px) scale(.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.reader-settings-popover.is-open { opacity: 1; transform: none; pointer-events: auto; }
.reader-settings-head { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px; }
.reader-settings-head strong { font-family:var(--font-heading);font-size:18px; }
.reader-setting-row { margin-top: 14px; }
.reader-setting-row label { display:block;color:var(--reader-muted);font-size:12px;font-weight:500;margin-bottom:7px; }
.reader-setting-row select,
.reader-setting-row input[type="range"] {
    width: 100%;
}
.reader-setting-row select {
    min-height: 40px;
    border-radius: 9px;
    border: 1px solid var(--reader-border);
    background: var(--reader-surface);
    color: var(--reader-text);
    padding: 7px 10px;
    font-family: var(--font-ui);
}
.reader-setting-inline { display:flex;align-items:center;gap:8px; }
.reader-setting-inline output { min-width:54px;text-align:right;color:var(--reader-muted);font-size:12px; }
.reader-theme-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:8px; }
.reader-theme-btn { padding:10px 5px;border:1px solid var(--reader-border);background:var(--reader-surface);color:var(--reader-text);border-radius:10px;cursor:pointer;font-family:var(--font-ui);font-weight:500; }
.reader-theme-btn.is-active { border-color:var(--reader-accent);box-shadow:inset 0 0 0 1px var(--reader-accent); }
.reader-reset-btn { width:100%;margin-top:16px;padding:10px;border-radius:10px;border:1px solid var(--reader-border);background:transparent;color:var(--reader-muted);cursor:pointer;font-family:var(--font-ui);font-weight:500; }

.reader-toc-overlay {
    position: fixed;
    inset: 0;
    z-index: 12500;
    background: rgba(40, 46, 55, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.reader-toc-overlay.is-open { opacity: 1; pointer-events: auto; }
.reader-toc-drawer {
    position: absolute;
    top: 0;
    left: 0;
    width: min(420px, 88vw);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--reader-surface-strong);
    border-right: 1px solid var(--reader-border);
    transform: translateX(-100%);
    transition: transform .24s ease;
    box-shadow: 18px 0 50px rgba(0, 0, 0, .18);
}
.reader-toc-overlay.is-open .reader-toc-drawer { transform: none; }
.reader-toc-head { padding:18px 18px 14px;border-bottom:1px solid var(--reader-border);display:flex;justify-content:space-between;gap:12px;align-items:center; }
.reader-toc-head strong { font-family:var(--font-heading);font-size:19px; }
.reader-toc-list { overflow:auto;padding:10px;list-style:none;margin:0; }
.reader-toc-list a { display:flex;gap:12px;align-items:flex-start;text-decoration:none;color:var(--reader-text);padding:11px 12px;border-radius:10px;font-family:var(--font-ui); }
.reader-toc-list a:hover { background:var(--reader-surface); }
.reader-toc-list a.is-current { background:color-mix(in srgb, var(--reader-accent) 12%, var(--reader-surface));color:var(--reader-accent);font-weight:500; }
.reader-toc-number { min-width:28px;color:var(--reader-muted);font-size:12px; }

.reader-resume-toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 11900;
    transform: translate(-50%, 16px);
    opacity: 0;
    pointer-events: none;
    background: var(--reader-surface-strong);
    color: var(--reader-text);
    border: 1px solid var(--reader-border);
    border-radius: 999px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, .18);
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 500;
    transition: opacity .22s ease, transform .22s ease;
}
.reader-resume-toast.is-visible { opacity:1;transform:translate(-50%,0); }

body.reader-page[data-reader-theme="dark"] .juf-header,
body.reader-page[data-reader-theme="dark"] .juf-footer-cream { color: var(--reader-text); }
body.reader-page[data-reader-theme="dark"] .juf-nav a,
body.reader-page[data-reader-theme="dark"] .footer-col-cream h4,
body.reader-page[data-reader-theme="dark"] .footer-col-cream a,
body.reader-page[data-reader-theme="dark"] .footer-tagline-text,
body.reader-page[data-reader-theme="dark"] .footer-contact-mail,
body.reader-page[data-reader-theme="dark"] .footer-copyright-cream { color: var(--reader-text) !important; }
body.reader-page[data-reader-theme="dark"] .juf-footer-cream { background: #2C3037; border-color: var(--reader-border); }

body.reader-page.reader-zen .juf-header,
body.reader-page.reader-zen .juf-footer-cream,
body.reader-page.reader-zen .juf-announcement-bar { display: none !important; }
body.reader-page.reader-zen .reader-shell { margin-top: 12px; }
body.reader-page.reader-zen .reader-toolbar { top: 8px; }
body.reader-page.reader-zen .reader-content-card { box-shadow: none; border-color: transparent; background: transparent; }
body.reader-page.reader-zen .reader-chapter-head { padding-top: 18px; }

@media (max-width: 760px) {
    .reader-shell { padding: 0 12px; margin-top: 10px; }
    .reader-toolbar { border-radius: 13px; padding: 8px; margin-bottom: 22px; }
    .reader-toolbar-title { display:none; }
    .reader-toolbar-actions { gap:6px; }
    .reader-text-btn { padding-inline: 10px; }
    .reader-content-card { border-radius: 17px; padding: 27px 20px; box-shadow: none; }
    #reader-content-body { text-align: start; }
    .reader-bottom-nav { grid-template-columns:1fr 1fr; }
    .reader-bottom-nav .reader-nav-center { grid-column:1 / -1; grid-row:2; justify-self:center; }
    .reader-settings-popover { inset:auto 10px 10px 10px;width:auto;border-radius:16px;max-height:80vh;overflow:auto; }
}

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

/* V5: personal bookmarks and highlights */
body.reader-page.reader-annotations-enabled #reader-content-body {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

.reader-annotations-overlay {
    position: fixed;
    inset: 0;
    z-index: 12600;
    background: rgba(40, 46, 55, .36);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.reader-annotations-overlay.is-open { opacity: 1; pointer-events: auto; }
.reader-annotations-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(430px, 90vw);
    height: 100%;
    overflow: auto;
    background: var(--reader-surface-strong);
    color: var(--reader-text);
    border-left: 1px solid var(--reader-border);
    box-shadow: -18px 0 50px rgba(0, 0, 0, .17);
    transform: translateX(100%);
    transition: transform .24s ease;
}
.reader-annotations-overlay.is-open .reader-annotations-drawer { transform: none; }
.reader-annotations-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: var(--reader-surface-strong);
    border-bottom: 1px solid var(--reader-border);
}
.reader-annotations-head strong { font-family: var(--font-heading-editorial); font-size: 19px; }
.reader-annotations-subtitle { margin-top: 2px; color: var(--reader-muted); font-size: 11.5px; }
.reader-annotation-section { padding: 17px 18px; border-bottom: 1px solid var(--reader-border); }
.reader-annotation-title { display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:13px;font-weight:600;margin-bottom:10px; }
.reader-annotation-title > span:last-child { color: var(--reader-muted); font-size: 11px; }
.reader-annotation-hint { color:var(--reader-muted);font-size:11.5px;line-height:1.6;margin:0 0 10px; }
.reader-annotation-list { display:grid;gap:9px; }
.reader-annotation-card { display:grid;grid-template-columns:1fr auto;gap:8px;align-items:stretch;border:1px solid var(--reader-border);border-radius:11px;background:var(--reader-surface);overflow:hidden; }
.reader-annotation-jump { border:0;background:transparent;color:var(--reader-text);font-family:var(--font-ui);font-size:12px;line-height:1.55;text-align:left;padding:10px 11px;cursor:pointer;min-width:0; }
.reader-annotation-jump:hover { color:var(--reader-accent); }
.reader-annotation-jump small { display:block;color:var(--reader-muted);font-size:10.5px;margin-top:3px; }
.reader-annotation-delete { border:0;border-left:1px solid var(--reader-border);background:transparent;color:var(--reader-muted);font-family:var(--font-ui);font-size:10.5px;font-weight:500;padding:0 10px;cursor:pointer; }
.reader-annotation-delete:hover { color:#5B6376; }
.reader-annotation-empty { color:var(--reader-muted);font-size:12px;line-height:1.65;margin:2px 0; }
.reader-highlight-card[data-style="amber"] { border-left:3px solid #D9D6D0; }
.reader-highlight-card[data-style="mint"] { border-left:3px solid #2E7A4F; }
.reader-highlight-card[data-style="rose"] { border-left:3px solid #D9D6D0; }

.reader-selection-menu {
    position: fixed;
    z-index: 12900;
    transform: translate(-50%, -100%) translateY(-7px);
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid var(--reader-border);
    border-radius: 999px;
    background: var(--reader-surface-strong);
    color: var(--reader-text);
    box-shadow: 0 12px 35px rgba(0, 0, 0, .18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
}
.reader-selection-menu.is-visible { opacity:1;pointer-events:auto;transform:translate(-50%,-100%) translateY(-10px); }
.reader-selection-menu > span { font-size:10.5px;font-weight:600;color:var(--reader-muted);padding-left:2px; }
.reader-highlight-choice { width:22px;height:22px;border-radius:50%;border:2px solid var(--reader-surface-strong);outline:1px solid var(--reader-border);cursor:pointer; }
.reader-highlight-choice.is-amber { background:#E4E6EC; }
.reader-highlight-choice.is-mint { background:#2E7A4F; }
.reader-highlight-choice.is-rose { background:#E4E6EC; }

.reader-saved-highlight {
    color: inherit;
    padding: .03em .04em;
    border-radius: .16em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition: box-shadow .2s ease, filter .2s ease;
}
.reader-saved-highlight[data-highlight-style="amber"] { background:rgba(40, 46, 55, .68); }
.reader-saved-highlight[data-highlight-style="mint"] { background:rgba(217, 214, 208, .68); }
.reader-saved-highlight[data-highlight-style="rose"] { background:rgba(217, 214, 208, .68); }
.reader-saved-highlight.is-focus { box-shadow:0 0 0 3px color-mix(in srgb,var(--reader-accent) 35%,transparent);filter:saturate(1.12); }
body.reader-page[data-reader-theme="dark"] .reader-saved-highlight[data-highlight-style="amber"] { background:rgba(160, 155, 148, .48); }
body.reader-page[data-reader-theme="dark"] .reader-saved-highlight[data-highlight-style="mint"] { background:rgba(160, 155, 148, .52); }
body.reader-page[data-reader-theme="dark"] .reader-saved-highlight[data-highlight-style="rose"] { background:rgba(160, 155, 148, .52); }

@media (max-width: 760px) {
    .reader-annotations-drawer { width:min(390px,94vw); }
    .reader-selection-menu { max-width: calc(100vw - 20px); }
}

/* V24 Phase 6 — book-like part-aware reader */
.reader-part-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 10px;
    padding: 5px 9px;
    border: 1px solid var(--reader-border);
    border-radius: 999px;
    color: var(--reader-muted);
    background: color-mix(in srgb, var(--reader-surface) 84%, transparent);
    font: 700 11px/1.2 var(--font-ui);
}

.reader-audio-player {
    grid-template-columns: 48px minmax(135px, .85fr) minmax(240px, 1.7fr);
    gap: 14px;
    align-items: center;
    padding: 13px 15px;
}
.reader-audio-play {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding-left: 3px;
    background: var(--reader-accent);
    color: var(--on-accent, #F6F5F2);
    cursor: pointer;
    font-size: 17px;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--reader-accent) 24%, transparent);
}
.reader-audio-copy { min-width:0; display:grid; gap:1px; }
.reader-audio-copy span { color:var(--reader-muted);font:500 9.5px/1.3 var(--font-ui);text-transform:uppercase;letter-spacing:normal; }
.reader-audio-copy strong { color:var(--reader-text);font:500 13px/1.45 var(--font-ui);white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.reader-audio-copy small { color:var(--reader-muted);font-size:10px; }
.reader-audio-controls { min-width:0;display:grid;gap:7px; }
.reader-audio-controls > input[type="range"] { width:100%;accent-color:var(--reader-accent); }
.reader-audio-control-row { display:flex;align-items:center;gap:12px;justify-content:space-between;color:var(--reader-muted);font:500 10px/1 var(--font-ui); }
.reader-audio-control-row select { border:1px solid var(--reader-border);background:var(--reader-surface);color:var(--reader-text);border-radius:7px;padding:4px 6px;font:500 10px var(--font-ui); }
.reader-audio-speed-label,.reader-audio-volume-label { display:flex;align-items:center;gap:6px; }
.reader-audio-volume-label input { width:70px;accent-color:var(--reader-accent); }

.reader-toc-summary { font-size:11px;color:var(--reader-muted);margin-top:3px; }
.reader-toc-part-tabs { display:flex;gap:7px;overflow-x:auto;padding:10px 12px 9px;border-bottom:1px solid var(--reader-border);scrollbar-width:none; }
.reader-toc-part-tabs::-webkit-scrollbar { display:none; }
.reader-toc-part-tab { flex:0 0 auto;max-width:220px;border:1px solid var(--reader-border);background:var(--reader-surface);color:var(--reader-muted);border-radius:999px;padding:7px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:500 10.5px/1.2 var(--font-ui);cursor:pointer; }
.reader-toc-part-tab.is-active { background:var(--reader-accent);border-color:var(--reader-accent);color:var(--on-accent, #F6F5F2); }
.reader-toc-parts { min-height:0;overflow:auto; }
.reader-toc-part { display:none; }
.reader-toc-part.is-active { display:block; }
.reader-toc-part-heading { padding:13px 18px 4px;display:grid;gap:2px; }
.reader-toc-part-heading span { color:var(--reader-accent);font:600 10px/1.2 var(--font-ui);text-transform:uppercase; }
.reader-toc-part-heading strong { color:var(--reader-text);font:500 13px/1.45 var(--font-ui); }
.reader-toc-part .reader-toc-list { overflow:visible; }

.reader-mobile-nav { display:none; }

@media (max-width: 760px) {
    body.reader-page { padding-bottom: 70px; }
    .reader-shell { margin-bottom: 36px; }
    .reader-audio-player { grid-template-columns:44px minmax(0,1fr);padding:12px; }
    .reader-audio-play { width:42px;height:42px; }
    .reader-audio-controls { grid-column:1 / -1; }
    .reader-audio-control-row { gap:8px; }
    .reader-audio-volume-label { display:none; }
    .reader-bottom-nav { display:none; }
    .reader-mobile-nav {
        position:fixed;
        left:10px;
        right:10px;
        bottom:max(10px, env(safe-area-inset-bottom));
        z-index:11850;
        display:grid;
        grid-template-columns:54px 1fr 54px;
        align-items:center;
        min-height:52px;
        padding:5px;
        border:1px solid var(--reader-border);
        border-radius:15px;
        background:color-mix(in srgb,var(--reader-surface-strong) 94%,transparent);
        box-shadow:0 12px 35px rgba(0, 0, 0, .16);
        backdrop-filter:blur(14px);
    }
    .reader-mobile-nav a,.reader-mobile-nav span,.reader-mobile-nav button {
        min-height:42px;border:0;background:transparent;color:var(--reader-text);display:flex;align-items:center;justify-content:center;text-decoration:none;border-radius:11px;font:600 18px/1 var(--font-ui);
    }
    .reader-mobile-nav button { gap:7px;font-size:12px;cursor:pointer; }
    .reader-mobile-nav button span { min-height:0;font-size:11px;display:inline; }
    .reader-mobile-nav a:hover,.reader-mobile-nav button:hover { background:var(--reader-surface);color:var(--reader-accent); }
    .reader-mobile-nav > span { opacity:.35; }
    .reader-resume-toast { bottom:78px; }
    .reader-toc-drawer { width:min(420px,94vw); }
}

/* V24 Phase 8 — visible YouTube provider inside Zen Reader */
.reader-audio-youtube{display:block;padding:18px}.reader-audio-youtube .reader-audio-copy{margin-bottom:12px}.reader-youtube-frame{position:relative;width:100%;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#3B4256}.reader-youtube-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Phase30.29 — complete Reader identity, advanced TOC and reading preferences */
body.reader-page {
    --reader-paragraph-spacing: 1.2em;
}
.reader-identity-strip {
    display:grid;
    grid-template-columns:88px minmax(0,1fr) minmax(150px,auto);
    gap:16px;
    align-items:center;
    margin:0 auto 26px;
    padding:12px 14px;
    max-width:960px;
    background:var(--reader-surface-strong);
    border:1px solid var(--reader-border);
    border-radius:18px;
    box-shadow:0 10px 28px rgba(40, 46, 55, .06);
}
.reader-identity-cover{display:block;width:72px;text-decoration:none}.reader-identity-cover .reader-identity-book-cover{width:72px!important;height:98px!important;min-height:0!important;border-radius:9px;overflow:hidden;box-shadow:0 8px 18px rgba(0, 0, 0, .12)}
.reader-identity-cover .juf-jacket-content,.reader-identity-cover .juf-jacket-spine,.reader-identity-cover .juf-jacket-shine{pointer-events:none}
.reader-identity-copy{min-width:0;display:grid;gap:3px}.reader-identity-label{color:var(--reader-accent);font:600 9.5px/1.2 var(--font-ui);text-transform:uppercase;letter-spacing:normal}.reader-identity-copy>strong{font:400 clamp(17px,2vw,22px)/1.35 var(--font-book-title);color:var(--reader-text)}.reader-identity-copy>span:not(.reader-identity-label),.reader-identity-copy>small{color:var(--reader-muted);font-size:11.5px}.reader-identity-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px}.reader-identity-actions a{color:var(--reader-accent);font:600 11px/1.2 var(--font-ui);text-decoration:none}.reader-identity-actions a:hover{text-decoration:underline}
.reader-identity-author{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center;color:inherit;text-decoration:none;min-width:0}.reader-identity-avatar{grid-row:1/3;width:48px;height:48px;border-radius:50%;overflow:hidden;display:block}.reader-identity-avatar .juf-author-art-avatar,.reader-identity-avatar .juf-author-circle-img{width:48px!important;height:48px!important;display:block;object-fit:cover;border-radius:50%}.reader-identity-author small{color:var(--reader-muted);font-size:9.5px}.reader-identity-author strong{font:500 12px/1.35 var(--font-ui-system);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}

#reader-content-body p{margin-bottom:var(--reader-paragraph-spacing)}
body.reader-page[data-reader-align="left"] #reader-content-body{text-align:left}
body.reader-page[data-reader-align="justify"] #reader-content-body{text-align:start}
body.reader-page[data-reader-contrast="high"]{--reader-text:#282E37;--reader-muted:#5B6376;--reader-border:#D9D6D0}
body.reader-page[data-reader-theme="dark"][data-reader-contrast="high"]{--reader-text:#fff;--reader-muted:#A09B94;--reader-border:#3A3F47}
body.reader-page.reader-highlight-links #reader-content-body a{background:color-mix(in srgb,var(--reader-accent) 14%,transparent);text-decoration-thickness:2px;font-weight:500}
body.reader-page.reader-hide-images #reader-content-body .juf-content-image,body.reader-page.reader-hide-images #reader-content-body img{display:none!important}
body.reader-page.reader-text-spacing #reader-content-body{letter-spacing:normal;word-spacing:.12em}body.reader-page.reader-text-spacing #reader-content-body p{line-height:calc(var(--reader-line-height) + .18)}
body.reader-page.reader-dyslexia #reader-content-body{font-family:'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif;letter-spacing:normal;word-spacing:.08em}
body.reader-page.reader-pause-animations *,body.reader-page.reader-pause-animations *::before,body.reader-page.reader-pause-animations *::after{animation-play-state:paused!important;transition-duration:0s!important;scroll-behavior:auto!important}
.reader-setting-checks{display:grid;gap:8px;margin-top:14px;padding:12px;border:1px solid var(--reader-border);border-radius:11px;background:var(--reader-surface)}.reader-setting-checks label{display:flex;gap:8px;align-items:center;color:var(--reader-text);font:500 11.5px/1.4 var(--font-ui)}.reader-setting-checks input{accent-color:var(--reader-accent)}

.reader-toc-part{display:block;border-bottom:1px solid var(--reader-border)}.reader-toc-part[open]{background:color-mix(in srgb,var(--reader-surface) 58%,transparent)}.reader-toc-part-heading{cursor:pointer;list-style:none;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;gap:8px!important;align-items:center;padding:12px 18px!important}.reader-toc-part-heading::-webkit-details-marker{display:none}.reader-toc-part-heading::before{content:'›';color:var(--reader-accent);font:900 18px/1 var(--font-ui);transform:rotate(0deg);transition:transform .16s ease}.reader-toc-part[open]>.reader-toc-part-heading::before{transform:rotate(90deg)}.reader-toc-part-heading span{grid-column:2;color:var(--reader-accent)!important}.reader-toc-part-heading strong{grid-column:2}.reader-toc-part-heading small{grid-column:3;grid-row:1/3;color:var(--reader-muted);font:500 10px/1.2 var(--font-ui)}
.reader-toc-part .reader-toc-list{padding-bottom:8px}.reader-toc-list a{align-items:flex-start}.reader-toc-chapter-copy{min-width:0;display:grid;gap:3px;flex:1}.reader-toc-chapter-copy>strong{font:500 12.5px/1.45 var(--font-ui);color:inherit}.reader-toc-chapter-copy>small{font:600 9.5px/1.35 var(--font-ui);color:var(--reader-muted)}.reader-toc-chapter-copy>i{height:3px;background:color-mix(in srgb,var(--reader-border) 70%,transparent);border-radius:999px;overflow:hidden;display:block}.reader-toc-chapter-copy>i>b{display:block;height:100%;background:var(--reader-accent);border-radius:inherit}

@media (max-width:760px){
    .reader-toolbar-title{display:none}.reader-toolbar{margin-bottom:12px}.reader-toolbar-actions{margin-left:auto;gap:5px}.reader-toolbar-actions .reader-icon-btn,.reader-toolbar-actions .reader-text-btn{min-width:44px;min-height:44px;padding:6px 8px}.reader-toolbar-actions #reader-progress-label{display:none}
    .reader-identity-strip{grid-template-columns:62px minmax(0,1fr);margin-bottom:18px;padding:10px;gap:10px}.reader-identity-cover{width:56px}.reader-identity-cover .reader-identity-book-cover{width:56px!important;height:78px!important}.reader-identity-author{grid-column:1/-1;border-top:1px solid var(--reader-border);padding-top:9px;grid-template-columns:38px minmax(0,1fr)}.reader-identity-avatar,.reader-identity-avatar .juf-author-art-avatar,.reader-identity-avatar .juf-author-circle-img{width:38px!important;height:38px!important}.reader-identity-author strong{max-width:none}
    .reader-chapter-head{text-align:left;padding-left:4px;padding-right:4px}.reader-chapter-meta{justify-content:flex-start}.reader-content-card{padding:clamp(22px,6vw,32px) clamp(16px,5vw,24px)}
    .reader-settings-popover{inset:auto 8px 76px 8px;width:auto;max-height:76vh;overflow:auto}
}

@media (prefers-reduced-motion:reduce){.reader-toc-part-heading::before{transition:none}}

/* Build 247 — explicit empty Reader content state. */
.reader-content-empty{
    display:grid;
    gap:8px;
    padding:clamp(22px,4vw,34px);
    border:1px dashed var(--reader-border);
    border-radius:16px;
    background:var(--reader-surface-soft,var(--reader-surface));
    color:var(--reader-muted);
    text-align:center;
}
.reader-content-empty strong{font-family:var(--font-heading);font-size:clamp(19px,3vw,23px);font-weight:500;color:var(--reader-text)}
.reader-content-empty p{margin:0 auto;max-width:620px;color:var(--reader-muted);font-size:.92em;line-height:1.7}
.reader-content-empty a{justify-self:center;margin-top:4px;color:var(--reader-accent);font-family:var(--font-ui);font-size:13px;font-weight:600;text-decoration:none;border-bottom:1px solid currentColor}

/* Build 403 — Unified Dynamic Reader Shell & Template 1 (Literature Prose & Poetry) */
.reader-template-breadcrumb{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    margin:0 0 14px;
    padding:8px 14px;
    border:1px solid var(--reader-border);
    border-radius:12px;
    background:var(--reader-surface-soft,var(--reader-surface));
    font:600 12px/1.4 var(--font-ui);
    color:var(--reader-muted);
}
.reader-template-breadcrumb a{
    color:var(--reader-muted);
    text-decoration:none;
    transition:color .16s ease;
}
.reader-template-breadcrumb a:hover{
    color:var(--reader-accent);
    text-decoration:underline;
}
.reader-template-breadcrumb a.is-current{
    color:var(--reader-accent);
    font-weight:700;
}
.reader-template-breadcrumb span[aria-hidden="true"]{
    opacity:.65;
}
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] .reader-chapter-head{
    text-align:center;
}
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] .reader-chapter-meta{
    justify-content:center;
}
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] .reader-content-card{
    max-width:min(var(--reader-width), 680px);
    margin-inline:auto;
    border-top:3px solid var(--reader-accent);
}
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] #reader-content-body{
    text-align:center!important;
    max-width:520px;
    margin:0 auto;
    line-height:calc(var(--reader-line-height) + 0.24);
}
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] #reader-content-body p,
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] #reader-content-body .reader-poetry-stanza{
    text-align:center!important;
    margin:0 auto calc(var(--reader-paragraph-spacing) * 1.35);
    padding-bottom:10px;
    border-bottom:1px dashed color-mix(in srgb,var(--reader-border) 68%,transparent);
    white-space:pre-line;
}
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] #reader-content-body section > p:last-child,
.reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] #reader-content-body section > .reader-poetry-stanza:last-child{
    border-bottom:none;
    padding-bottom:0;
}
@media (max-width:760px){
    .reader-template-breadcrumb{
        font-size:11.5px;
        padding:7px 11px;
        margin-bottom:10px;
    }
    .reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] #reader-content-body{
        max-width:100%;
    }
}

/* Build 404 — Template 2 (History) & Template 3 (Knowledge) Blocks */
.reader-meta-chip-filled{
    background:color-mix(in srgb,var(--reader-accent) 10%,var(--reader-surface));
    color:var(--reader-text)!important;
    border:1px solid color-mix(in srgb,var(--reader-accent) 22%,var(--reader-border));
    padding:2px 10px;
    border-radius:999px;
    font-weight:500;
}
.reader-shell[data-reader-template="history"] #reader-content-body > section,
.reader-shell[data-reader-template="knowledge"] #reader-content-body > section{
    display:flex;
    flex-direction:column;
    gap:24px;
}
.reader-tpl-section{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.reader-tpl-h2{
    font-family:var(--font-heading);
    font-weight:600;
    font-size:clamp(20px,2.5vw,24px);
    line-height:1.45;
    color:var(--reader-text);
    margin:0;
}
.reader-tpl-step-num{
    color:#3B4256;
    font-weight:700;
}
body.reader-page[data-reader-theme="dark"] .reader-tpl-step-num{
    color:#C9D4EC;
}
.reader-tpl-box{
    border-radius:16px;
    padding:18px 20px;
    display:flex;
    flex-direction:column;
    gap:10px;
}
.reader-tpl-tint-box{
    background:color-mix(in srgb,var(--reader-border) 42%,var(--reader-surface));
    border:1px solid var(--reader-border);
}
.reader-tpl-card-box{
    background:var(--reader-surface);
    border:1px solid var(--reader-border);
    border-radius:12px;
    padding:14px 16px;
    transition:outline-color .2s ease,box-shadow .2s ease;
}
.reader-glossary-box.is-glossary-active{
    outline:2px solid #3B4256;
    box-shadow:0 0 0 4px rgba(59, 66, 86, .14);
}
.reader-learn-list ul,
.reader-remember-list ul{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    gap:8px;
}
.reader-learn-list li,
.reader-remember-list li{
    position:relative;
    padding-left:24px;
    line-height:1.75;
}
.reader-learn-list li::before{
    content:'✓';
    position:absolute;
    left:0;
    top:0;
    color:#3B4256;
    font-weight:700;
}
.reader-remember-list li::before{
    content:'•';
    position:absolute;
    left:4px;
    top:0;
    color:#3B4256;
    font-weight:700;
}
.reader-glossary-term{
    border-bottom:2px dotted #3B4256;
    cursor:pointer;
    font-weight:500;
}
body.reader-page[data-reader-theme="dark"] .reader-glossary-term{
    border-bottom-color:#C9D4EC;
}
.reader-did-you-know{
    background:var(--reader-surface);
    border:1px solid var(--reader-border);
    border-left:4px solid #3B4256;
    border-radius:12px;
    padding:15px 18px;
}
.reader-did-you-know-title{
    font-size:17px!important;
    color:#3B4256!important;
}
body.reader-page[data-reader-theme="dark"] .reader-did-you-know{
    border-left-color:#C9D4EC;
}
body.reader-page[data-reader-theme="dark"] .reader-did-you-know-title{
    color:#C9D4EC!important;
}
.reader-timeline-list{
    list-style:none;
    margin:4px 0 0 8px;
    padding:0 0 0 22px;
    border-left:2px solid var(--reader-border);
    display:flex;
    flex-direction:column;
    gap:18px;
}
.reader-timeline-item{
    position:relative;
    margin:0;
}
.reader-tl-dot{
    position:absolute;
    left:-29px;
    top:7px;
    width:12px;
    height:12px;
    border-radius:50%;
    background:#3B4256;
}
body.reader-page[data-reader-theme="dark"] .reader-tl-dot{
    background:#C9D4EC;
}
.reader-tl-copy strong{
    display:block;
    color:#3B4256;
    font-size:.92em;
    margin-bottom:2px;
}
body.reader-page[data-reader-theme="dark"] .reader-tl-copy strong{
    color:#C9D4EC;
}
.reader-cause-flow{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
.reader-cause-cell{
    background:var(--reader-surface);
    border:1px solid var(--reader-border);
    border-radius:12px;
    padding:12px 14px;
    line-height:1.65;
}
.reader-cause-cell strong{
    display:block;
    color:#3B4256;
    margin-bottom:4px;
}
body.reader-page[data-reader-theme="dark"] .reader-cause-cell strong{
    color:#C9D4EC;
}
.reader-figures-list{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    gap:12px;
}
.reader-figure-card{
    display:grid;
    grid-template-columns:46px minmax(0,1fr);
    gap:12px;
    align-items:center;
    padding:12px 14px;
    border:1px solid var(--reader-border);
    border-radius:12px;
    background:var(--reader-surface);
}
.reader-figure-avatar{
    width:46px;
    height:46px;
    border-radius:50%;
    background:color-mix(in srgb,var(--reader-accent) 14%,var(--reader-surface));
    border:1px solid var(--reader-border);
    color:var(--reader-accent);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
}
.reader-figure-copy strong{
    display:block;
    color:var(--reader-text);
    margin-bottom:2px;
}
.reader-fact-grid{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.reader-fact-cell{
    background:var(--reader-surface);
    border:1px solid var(--reader-border);
    border-radius:12px;
    padding:12px 14px;
    line-height:1.6;
}
.reader-fact-cell strong{
    display:block;
    font-size:.82em;
    color:var(--reader-muted);
    font-weight:600;
    margin-bottom:2px;
}
.reader-table-wrap{
    overflow-x:auto;
    border:1px solid var(--reader-border);
    border-radius:12px;
    background:var(--reader-surface);
}
.reader-table{
    width:100%;
    min-width:320px;
    border-collapse:collapse;
    font-size:.92em;
}
.reader-table th,
.reader-table td{
    padding:10px 12px;
    border-bottom:1px solid var(--reader-border);
    text-align:left;
    vertical-align:top;
}
.reader-table thead tr{
    background:color-mix(in srgb,var(--reader-border) 42%,var(--reader-surface));
}
.reader-table tbody tr:last-child td{
    border-bottom:none;
}
.reader-steps-list{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    gap:12px;
}
.reader-step-item{
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    gap:12px;
    align-items:flex-start;
}
.reader-step-badge{
    width:34px;
    height:34px;
    border-radius:50%;
    background:#3B4256;
    color:#fff;
    font-weight:700;
    font-size:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-top:2px;
}
.reader-qa-list{
    display:grid;
    gap:10px;
}
.reader-tpl-sources{
    border-top:1px solid var(--reader-border);
    padding-top:16px;
    margin-top:8px;
    font-size:.86em;
    color:var(--reader-muted);
    line-height:1.7;
}
.reader-tpl-sources-title{
    font-family:var(--font-heading);
    font-size:16px;
    font-weight:600;
    color:var(--reader-text);
    margin:0 0 6px;
}
.reader-tpl-sources-list ul,
.reader-tpl-sources-list ol{
    margin:0;
    padding-left:20px;
    display:grid;
    gap:4px;
}
.reader-sources-verified{
    margin:8px 0 0!important;
    font-weight:600;
    color:var(--reader-muted);
}
@media (max-width:760px){
    .reader-cause-flow{
        grid-template-columns:1fr;
    }
    .reader-fact-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .reader-tpl-box{
        padding:15px 16px;
    }
}

/* Build 405 — Phase E Responsive Desktop 4-Col Fact Grid, Related Cards & Article Polish */
@media (min-width:860px){
    .reader-fact-grid{
        grid-template-columns:repeat(4,minmax(0,1fr));
    }
}
@media (max-width:350px){
    .reader-fact-grid{
        grid-template-columns:1fr;
    }
}
.reader-fact-grid-section > p{
    font-size:.84em;
    color:var(--reader-muted);
    margin:4px 0 0!important;
}
.reader-related-links{
    display:grid;
    gap:10px;
}
.reader-related-item{
    border:1px solid var(--reader-border);
    border-radius:12px;
    background:var(--reader-surface);
    padding:12px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.reader-related-item a{
    color:var(--reader-text);
    text-decoration:none;
    font-weight:600;
    flex:1;
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.reader-related-item a::after{
    content:'→';
    color:#3B4256;
    font-weight:700;
    margin-left:8px;
}
.reader-related-item a:hover{
    color:var(--reader-accent);
}
.reader-shell[data-reader-template="history"] .juf-content-image,
.reader-shell[data-reader-template="knowledge"] .juf-content-image{
    margin:14px 0;
    border:1px solid var(--reader-border);
    border-radius:16px;
    overflow:hidden;
    background:var(--reader-surface);
}
.reader-shell[data-reader-template="history"] .juf-content-image figcaption,
.reader-shell[data-reader-template="knowledge"] .juf-content-image figcaption{
    padding:10px 14px;
    font-size:.84em;
    color:var(--reader-muted);
    border-top:1px solid var(--reader-border);
    line-height:1.55;
}

/* Build 419 & 420 — Reader Chapter Header Spacing & Illustrated Historical Figure Cards */
body.reader-page .reader-chapter-head {
    max-width: min(66ch, 720px) !important;
    margin: 4px auto 6px !important;
    padding: 18px 0 24px !important;
    text-align: left !important;
    border-bottom: 1px solid color-mix(in srgb, var(--reader-border) 72%, transparent) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
}

body.reader-page .reader-part-kicker {
    margin: 0 0 12px !important;
}

body.reader-page .reader-chapter-head h1 {
    margin: 0 0 14px !important;
    color: var(--reader-text) !important;
    font: 400 clamp(24px, 5.6vw, 33px)/1.45 var(--font-book-title) !important;
    letter-spacing: -0.005em !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

body.reader-page .reader-title-nowrap {
    white-space: nowrap !important;
}

body.reader-page .reader-chapter-subtitle {
    margin: 0 0 18px !important;
    color: var(--reader-muted) !important;
    font: 400 clamp(16px, 2.1vw, 18.5px)/1.68 var(--font-reading, var(--font-ui-system)) !important;
    max-width: 64ch !important;
}

body.reader-page .reader-chapter-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 10px 12px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    color: var(--reader-muted) !important;
    font: 500 13.5px/1.4 var(--font-ui-system) !important;
}

body.reader-page .reader-meta-chip-filled {
    display: inline-flex !important;
    align-items: center !important;
    background: color-mix(in srgb, var(--reader-accent) 10%, var(--reader-surface)) !important;
    color: var(--reader-text) !important;
    border: 1px solid color-mix(in srgb, var(--reader-accent) 24%, var(--reader-border)) !important;
    padding: 5px 13px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    margin-right: 4px !important;
}

body.reader-page .reader-meta-item {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

body.reader-page .reader-meta-sep {
    color: var(--reader-muted) !important;
    opacity: 0.55 !important;
    font-weight: 700 !important;
    user-select: none !important;
}

body.reader-page .reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] .reader-chapter-head {
    text-align: center !important;
    align-items: center !important;
}

body.reader-page .reader-shell[data-reader-template="literature"][data-reader-variant="poetry"] .reader-chapter-meta {
    justify-content: center !important;
}

/* Fix left indentation on list-based dynamic blocks & style illustrated figure cards */
body.reader-page #reader-content-body .reader-figures-list,
body.reader-page #reader-content-body .reader-cause-flow,
body.reader-page #reader-content-body .reader-fact-grid,
body.reader-page #reader-content-body .reader-steps-list {
    padding-left: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

body.reader-page #reader-content-body .reader-figures-list {
    display: grid !important;
    gap: 14px !important;
}

body.reader-page #reader-content-body .reader-figure-card {
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 14px 18px !important;
    border: 1px solid var(--reader-border) !important;
    border-radius: 16px !important;
    background: var(--reader-surface) !important;
}

body.reader-page #reader-content-body .reader-figure-avatar.has-figure-img {
    width: 88px !important;
    height: 88px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: block !important;
    flex-shrink: 0 !important;
}

body.reader-page #reader-content-body .reader-figure-avatar.has-figure-img img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
}

body.reader-page #reader-content-body .reader-figure-copy {
    font-size: 0.95em !important;
    line-height: 1.62 !important;
    color: var(--reader-text) !important;
    margin: 0 !important;
}

body.reader-page #reader-content-body .reader-figure-copy strong {
    display: block !important;
    font-size: 1.05em !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--reader-text) !important;
    margin: 0 0 4px !important;
}

@media (max-width: 760px) {
    body.reader-page .reader-chapter-head {
        max-width: none !important;
        margin: 2px 0 4px !important;
        padding: 16px clamp(16px, 5vw, 22px) 22px !important;
    }
    body.reader-page .reader-chapter-head h1 {
        font-size: clamp(23.5px, 6.2vw, 27.5px) !important;
        line-height: 1.44 !important;
        margin: 0 0 12px !important;
    }
    body.reader-page .reader-chapter-subtitle {
        font-size: 16px !important;
        line-height: 1.66 !important;
        margin: 0 0 16px !important;
    }
    body.reader-page .reader-chapter-meta {
        gap: 9px 10px !important;
        font-size: 13px !important;
    }
    body.reader-page:not(.reader-zen) .reader-content-card {
        padding: 18px clamp(16px, 5vw, 22px) 24px !important;
    }
    body.reader-page #reader-content-body .reader-figure-card {
        grid-template-columns: 78px minmax(0, 1fr) !important;
        gap: 14px !important;
        padding: 13px 14px !important;
        border-radius: 14px !important;
    }
    body.reader-page #reader-content-body .reader-figure-avatar.has-figure-img {
        width: 78px !important;
        height: 78px !important;
        border-radius: 12px !important;
    }
}

/* Build 422 — High-Standard Editorial Oil Portrait & Readable Bio Cards (প্রধান নেতৃত্ব / যাঁরা ছিলেন এই গল্পে) */
body.reader-page #reader-content-body .reader-figures-section {
    background: color-mix(in srgb, var(--reader-surface) 58%, #E4E6EC) !important;
    border: 1px solid color-mix(in srgb, var(--reader-border) 92%, #D9D6D0) !important;
    border-radius: 18px !important;
    padding: 20px 20px 22px !important;
    margin: 8px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    box-shadow: 0 6px 20px rgba(40, 46, 55, 0.04) !important;
}

body.reader-page #reader-content-body .reader-figures-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 2px 4px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--reader-border) 68%, transparent) !important;
}

body.reader-page #reader-content-body .reader-figures-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #3B4256 !important;
    flex-shrink: 0 !important;
}

body.reader-page #reader-content-body .reader-figures-heading {
    margin: 0 !important;
    color: #3B4256 !important;
    font-family: var(--font-heading-editorial) !important;
    font-size: clamp(19px, 2.3vw, 21.5px) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

body.reader-page #reader-content-body .reader-figures-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 15px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    align-items: stretch !important;
}

body.reader-page #reader-content-body .reader-figure-card {
    display: grid !important;
    grid-template-columns: 98px minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: center !important;
    text-align: left !important;
    padding: 14px 16px !important;
    margin: 0 !important;
    background: color-mix(in srgb, var(--reader-surface) 92%, #FFFFFF) !important;
    border: 1px solid color-mix(in srgb, var(--reader-border) 85%, #D9D6D0) !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 14px rgba(40, 46, 55, 0.04) !important;
}

body.reader-page #reader-content-body .reader-figure-card:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
}

body.reader-page #reader-content-body .reader-figure-portrait {
    width: 98px !important;
    height: 130px !important;
    max-width: 98px !important;
    aspect-ratio: 3 / 4 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 !important;
    background: #E4E6EC !important;
    box-shadow: 0 5px 14px rgba(40, 46, 55, 0.14) !important;
    flex-shrink: 0 !important;
}

body.reader-page #reader-content-body .reader-figure-portrait img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
}

body.reader-page #reader-content-body .reader-figure-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: left !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 6px !important;
}

body.reader-page #reader-content-body .reader-figure-head {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px 10px !important;
    width: 100% !important;
    margin: 0 !important;
}

body.reader-page #reader-content-body .reader-figure-name {
    display: inline-block !important;
    font-family: var(--font-heading-editorial) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.32 !important;
    color: var(--reader-text) !important;
    margin: 0 !important;
    text-align: left !important;
}

body.reader-page #reader-content-body .reader-figure-years {
    display: inline-flex !important;
    align-items: center !important;
    font-family: var(--font-ui-system) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #3B4256 !important;
    background: color-mix(in srgb, var(--reader-accent) 12%, var(--reader-surface)) !important;
    border: 1px solid color-mix(in srgb, var(--reader-accent) 24%, var(--reader-border)) !important;
    padding: 2px 9px !important;
    border-radius: 999px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

body.reader-page #reader-content-body .reader-figure-role {
    display: block !important;
    font-family: var(--font-reading, "SolaimanLipi", serif) !important;
    font-size: 16.2px !important;
    line-height: 1.64 !important;
    color: var(--reader-text) !important;
    opacity: 0.92 !important;
    margin: 0 !important;
    text-align: left !important;
    max-width: none !important;
}

body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figures-section {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
}

body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figure-card {
    background: #343A44 !important;
    border-color: #3A3F47 !important;
}

body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figures-icon,
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figures-heading {
    color: #C9D4EC !important;
}

body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figure-years {
    color: #C9D4EC !important;
    background: rgba(201, 212, 236, 0.14) !important;
    border-color: rgba(201, 212, 236, 0.3) !important;
}

@media (max-width: 720px) {
    body.reader-page #reader-content-body .reader-figures-section {
        padding: 16px 14px 18px !important;
        border-radius: 16px !important;
        gap: 13px !important;
    }
    body.reader-page #reader-content-body .reader-figures-list {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    body.reader-page #reader-content-body .reader-figure-card,
    body.reader-page #reader-content-body .reader-figure-card:last-child:nth-child(odd) {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: none !important;
        grid-template-columns: 90px minmax(0, 1fr) !important;
        gap: 14px !important;
        padding: 13px 14px !important;
        border-radius: 14px !important;
        margin: 0 !important;
    }
    body.reader-page #reader-content-body .reader-figure-portrait {
        width: 90px !important;
        height: 120px !important;
        max-width: 90px !important;
        border-radius: 10px !important;
        margin: 0 !important;
    }
    body.reader-page #reader-content-body .reader-figure-name {
        font-size: 17.5px !important;
    }
    body.reader-page #reader-content-body .reader-figure-role {
        font-size: 15.8px !important;
        line-height: 1.62 !important;
    }
}

/* Build 427 — Warm Cream Top Toolbar (No Stark White), Pulled Up Under Header & All 8 Reader Tools Always Visible */
body.reader-page .reader-identity-strip {
    display: none !important;
}
body.reader-page .reader-shell {
    margin-top: 4px !important;
}
body.reader-page .reader-toolbar {
    top: 2px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    background: color-mix(in srgb, #ECEAE6 94%, #ECEAE6) !important;
    border: 1px solid #D9D6D0 !important;
    box-shadow: 0 4px 14px rgba(40, 46, 55, 0.05) !important;
}
body.reader-page .reader-toolbar .reader-icon-btn,
body.reader-page .reader-toolbar .reader-text-btn {
    background: #ECEAE6 !important;
    border: 1px solid #D9D6D0 !important;
    color: #3B4256 !important;
    box-shadow: none !important;
}
body.reader-page .reader-toolbar .reader-icon-btn:hover,
body.reader-page .reader-toolbar .reader-text-btn:hover {
    background: #E4E6EC !important;
    border-color: #D9D6D0 !important;
}
body.reader-page .reader-toolbar .reader-icon-btn[aria-pressed="true"],
body.reader-page .reader-toolbar .reader-text-btn[aria-pressed="true"] {
    background: #3B4256 !important;
    border-color: #3B4256 !important;
    color: #F6F5F2 !important;
}
body.reader-page[data-reader-theme="sepia"] .reader-toolbar {
    background: #EFE8D8 !important;
    border-color: #D9D6D0 !important;
}
body.reader-page[data-reader-theme="sepia"] .reader-toolbar .reader-icon-btn,
body.reader-page[data-reader-theme="sepia"] .reader-toolbar .reader-text-btn {
    background: #EFE8D8 !important;
    border-color: #D9D6D0 !important;
    color: #282E37 !important;
}
html[data-theme="dark"] body.reader-page:not([data-reader-theme]) .reader-toolbar,
body.reader-page[data-reader-theme="dark"] .reader-toolbar {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important;
}
html[data-theme="dark"] body.reader-page:not([data-reader-theme]) .reader-toolbar .reader-icon-btn,
html[data-theme="dark"] body.reader-page:not([data-reader-theme]) .reader-toolbar .reader-text-btn,
body.reader-page[data-reader-theme="dark"] .reader-toolbar .reader-icon-btn,
body.reader-page[data-reader-theme="dark"] .reader-toolbar .reader-text-btn {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
    color: #ECE8E1 !important;
}
body.reader-page .reader-template-breadcrumb {
    max-width: min(66ch, 720px) !important;
    margin: 0 auto 10px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    font: 600 12.5px/1.4 var(--font-ui) !important;
    color: var(--reader-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}
body.reader-page .reader-template-breadcrumb a {
    flex: 0 0 auto;
    white-space: nowrap;
}
body.reader-page .reader-template-breadcrumb a.is-current {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--reader-accent) !important;
    font-weight: 700 !important;
}
body.reader-page .reader-chapter-head {
    max-width: min(66ch, 720px) !important;
    margin: 0 auto 18px !important;
    padding: 4px 0 16px !important;
    text-align: left !important;
    border-bottom: 1px solid color-mix(in srgb, var(--reader-border) 75%, transparent) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
}
body.reader-page .reader-part-kicker {
    margin: 0 0 8px !important;
}
body.reader-page .reader-chapter-head h1 {
    margin: 0 0 10px !important;
    color: var(--reader-text) !important;
    font: 400 clamp(24px, 5.5vw, 33px)/1.36 var(--font-book-title) !important;
    letter-spacing: -0.005em !important;
}
body.reader-page .reader-chapter-subtitle {
    margin: 0 0 14px !important;
    color: var(--reader-muted) !important;
    font: 400 clamp(15.5px, 2vw, 18px)/1.58 var(--font-reading, var(--font-ui-system)) !important;
    max-width: 64ch !important;
}
body.reader-page .reader-chapter-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px 8px !important;
    font-size: 12.5px !important;
    line-height: 1.38 !important;
    margin: 0 !important;
}
body.reader-page .reader-meta-chip-filled {
    padding: 3px 10px !important;
    font-size: 12px !important;
    margin-right: 2px !important;
}
body.reader-page .reader-hero-figure {
    width: 100% !important;
    max-width: min(66ch, 720px) !important;
    margin: 0 auto 20px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
body.reader-page .reader-hero-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7.8;
    max-height: 330px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #D9D6D0;
    box-shadow: 0 8px 24px rgba(40, 46, 55, 0.08);
    background: #E4E6EC;
}
body.reader-page .reader-hero-frame img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin: 0 !important;
    border-radius: 0 !important;
}
body.reader-page .reader-hero-caption {
    margin: 7px 2px 0 !important;
    font-family: var(--font-bn-serif, 'Noto Serif Bengali', serif);
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    color: var(--reader-muted, #5B6376) !important;
    text-align: left;
}
body.reader-page[data-reader-theme="dark"] .reader-hero-frame {
    border-color: rgba(217, 214, 208, 0.18);
    background: #2C3037;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}
body.reader-page[data-reader-theme="dark"] .reader-hero-caption {
    color: #A09B94 !important;
}
body.reader-page.reader-hide-images .reader-hero-figure {
    display: none !important;
}
@media (max-width: 760px) {
    body.reader-page .reader-shell {
        margin-top: 2px !important;
    }
    body.reader-page .reader-toolbar {
        padding: 5px 6px !important;
        margin-top: 0 !important;
        margin-bottom: 12px !important;
        border-radius: 12px !important;
        gap: 4px !important;
        justify-content: space-between !important;
    }
    body.reader-page .reader-toolbar-group {
        flex: 0 0 auto !important;
        gap: 4px !important;
    }
    body.reader-page .reader-toolbar-actions {
        flex: 1 1 auto !important;
        justify-content: flex-end !important;
        margin-left: 0 !important;
        gap: 3.5px !important;
        min-width: 0 !important;
    }
    body.reader-page .reader-toolbar .reader-icon-btn {
        width: 34px !important;
        min-width: 34px !important;
        height: 35px !important;
        min-height: 35px !important;
        padding: 0 !important;
        border-radius: 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 12.5px !important;
        flex: 0 0 auto !important;
    }
    body.reader-page .reader-toolbar .reader-icon-btn svg {
        width: 17px !important;
        height: 17px !important;
    }
    body.reader-page .reader-toolbar .reader-text-btn {
        height: 35px !important;
        min-height: 35px !important;
        min-width: 0 !important;
        padding: 0 9px !important;
        border-radius: 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }
    body.reader-page .reader-template-breadcrumb {
        max-width: none !important;
        padding: 0 clamp(16px, 5vw, 22px) !important;
        margin: 0 0 8px !important;
        font-size: 11.8px !important;
        gap: 5px !important;
    }
    body.reader-page .reader-chapter-head {
        max-width: none !important;
        margin: 0 0 16px !important;
        padding: 2px clamp(16px, 5vw, 22px) 16px !important;
    }
    body.reader-page .reader-chapter-head h1 {
        font-size: clamp(23px, 6vw, 27px) !important;
        line-height: 1.36 !important;
        margin: 0 0 9px !important;
    }
    body.reader-page .reader-chapter-subtitle {
        font-size: 15.5px !important;
        line-height: 1.56 !important;
        margin: 0 0 13px !important;
    }
    body.reader-page .reader-chapter-meta {
        gap: 6px 7px !important;
        font-size: 12px !important;
    }
    body.reader-page .reader-meta-chip-filled {
        padding: 2px 9px !important;
        font-size: 11.5px !important;
    }
    body.reader-page .reader-hero-figure {
        max-width: none !important;
        padding: 0 clamp(16px, 5vw, 22px) !important;
        margin: 0 0 16px !important;
    }
    body.reader-page .reader-hero-frame {
        aspect-ratio: 16 / 8.2;
        max-height: 205px;
        border-radius: 11px;
    }
    body.reader-page .reader-hero-caption {
        font-size: 0.78rem !important;
        margin-top: 6px !important;
    }
}
@media (max-width: 370px) {
    body.reader-page .reader-toolbar .reader-icon-btn {
        width: 31px !important;
        min-width: 31px !important;
        height: 32px !important;
        min-height: 32px !important;
    }
    body.reader-page .reader-toolbar .reader-text-btn {
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 7px !important;
        font-size: 11.2px !important;
    }
    body.reader-page .reader-toolbar-actions {
        gap: 2.5px !important;
    }
}

/* Build 428 — Sleek Warm-Cream Mobile Bottom Pill Dock & Editorial TOC Drawer */
body.reader-page .reader-toc-drawer,
body.reader-page .reader-annotations-drawer,
body.reader-page .reader-settings-popover {
    background: #ECEAE6 !important;
    border-color: #D9D6D0 !important;
    color: #282E37 !important;
}
body.reader-page[data-reader-theme="sepia"] .reader-toc-drawer,
body.reader-page[data-reader-theme="sepia"] .reader-annotations-drawer,
body.reader-page[data-reader-theme="sepia"] .reader-settings-popover {
    background: #EFE8D8 !important;
    border-color: #D9D6D0 !important;
    color: #282E37 !important;
}
html[data-theme="dark"] body.reader-page:not([data-reader-theme]) .reader-toc-drawer,
html[data-theme="dark"] body.reader-page:not([data-reader-theme]) .reader-annotations-drawer,
html[data-theme="dark"] body.reader-page:not([data-reader-theme]) .reader-settings-popover,
body.reader-page[data-reader-theme="dark"] .reader-toc-drawer,
body.reader-page[data-reader-theme="dark"] .reader-annotations-drawer,
body.reader-page[data-reader-theme="dark"] .reader-settings-popover {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
    color: #ECE8E1 !important;
}

/* TOC Drawer Header & Eyebrow */
body.reader-page .reader-toc-head {
    padding: 16px 18px 14px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--reader-border) 85%, transparent) !important;
    align-items: flex-start !important;
    gap: 12px !important;
}
body.reader-page .reader-toc-head-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
}
body.reader-page .reader-toc-eyebrow {
    font: 700 10.5px/1.2 var(--font-ui) !important;
    color: #3B4256 !important;
    letter-spacing: 0.02em !important;
}
body.reader-page[data-reader-theme="dark"] .reader-toc-eyebrow {
    color: #C9D4EC !important;
}
body.reader-page .reader-toc-head strong {
    font: 600 18px/1.36 var(--font-heading-editorial) !important;
    color: var(--reader-text) !important;
}
body.reader-page .reader-toc-summary {
    font: 600 11.5px/1.3 var(--font-ui) !important;
    color: var(--reader-muted) !important;
    margin-top: 2px !important;
}
body.reader-page .reader-toc-close-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--reader-bg) 85%, #E4E6EC) !important;
    border: 1px solid color-mix(in srgb, var(--reader-border) 95%, transparent) !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
}

/* Sleek Search Pill inside TOC */
body.reader-page .juf-toc-search {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px 10px !important;
    margin: 0 !important;
}
body.reader-page .juf-toc-search-icon {
    position: absolute !important;
    left: 29px !important;
    top: 50% !important;
    transform: translateY(-42%) !important;
    color: var(--reader-muted) !important;
    pointer-events: none !important;
    opacity: 0.78 !important;
}
body.reader-page .juf-toc-search input {
    width: 100% !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 8px 14px 8px 36px !important;
    border-radius: 999px !important;
    border: 1px solid #D9D6D0 !important;
    background: rgba(246, 245, 242, 0.78) !important;
    color: var(--reader-text) !important;
    font: 500 13.5px/1.35 var(--font-ui) !important;
    box-shadow: inset 0 1px 2px rgba(40, 46, 55, 0.03) !important;
}
body.reader-page[data-reader-theme="dark"] .juf-toc-search input {
    background: #2C3037 !important;
    border-color: #3A3F47 !important;
    color: #ECE8E1 !important;
}
body.reader-page .juf-toc-search input:focus {
    border-color: #2C3243 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 66, 86, 0.12) !important;
}

/* Part Heading & Chapter Cards in TOC */
body.reader-page .reader-toc-part.is-single-part > .reader-toc-part-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 18px 6px !important;
    cursor: default !important;
}
body.reader-page .reader-toc-part.is-single-part > .reader-toc-part-heading::before {
    display: none !important;
}
body.reader-page .reader-toc-part-heading strong {
    font: 600 13px/1.35 var(--font-ui) !important;
    color: var(--reader-muted) !important;
}
body.reader-page .reader-toc-part-heading small {
    background: color-mix(in srgb, var(--reader-border) 55%, transparent) !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font: 600 10.5px/1.3 var(--font-ui) !important;
    color: var(--reader-muted) !important;
}
body.reader-page .reader-toc-list {
    padding: 6px 12px 18px !important;
    display: grid !important;
    gap: 6px !important;
}
body.reader-page .reader-toc-list a {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 11px !important;
    align-items: center !important;
    padding: 11px 12px !important;
    border-radius: 12px !important;
    border: 1px solid transparent !important;
    transition: background .16s ease, border-color .16s ease !important;
}
body.reader-page .reader-toc-list a:hover {
    background: rgba(217, 214, 208, 0.55) !important;
    border-color: #D9D6D0 !important;
}
body.reader-page .reader-toc-list a.is-current {
    background: #E4E6EC !important;
    border: 1px solid #D9D6D0 !important;
    border-left: 3.5px solid #3B4256 !important;
    box-shadow: 0 4px 12px rgba(40, 46, 55, 0.05) !important;
}
body.reader-page[data-reader-theme="dark"] .reader-toc-list a.is-current {
    background: #343A44 !important;
    border-color: #3A3F47 !important;
    border-left-color: #C9D4EC !important;
}
body.reader-page .reader-toc-number {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 8px !important;
    background: rgba(91, 99, 118, 0.13) !important;
    color: var(--reader-text) !important;
    font: 700 13px/1 var(--font-ui) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
body.reader-page .reader-toc-list a.is-current .reader-toc-number {
    background: #3B4256 !important;
    color: #F6F5F2 !important;
}
body.reader-page[data-reader-theme="dark"] .reader-toc-list a.is-current .reader-toc-number {
    background: #C9D4EC !important;
    color: #23262B !important;
}
body.reader-page .reader-toc-chapter-copy > strong {
    font: 600 13.8px/1.42 var(--font-ui) !important;
    color: var(--reader-text) !important;
}
body.reader-page .reader-toc-chapter-copy > small {
    font: 500 11px/1.38 var(--font-ui) !important;
    color: var(--reader-muted) !important;
}
body.reader-page .toc-state-reading {
    color: #3B4256 !important;
    font-weight: 700 !important;
}
body.reader-page[data-reader-theme="dark"] .toc-state-reading {
    color: #C9D4EC !important;
}
body.reader-page .toc-state-done {
    color: #2E7A4F !important;
    font-weight: 700 !important;
}
body.reader-page .toc-bookmark-tag {
    display: inline-block !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    background: rgba(59, 66, 86, 0.12) !important;
    color: #3B4256 !important;
    font-weight: 700 !important;
    font-size: 10px !important;
}

/* Mobile Bottom Pill Dock (.reader-mobile-nav) */
@media (max-width: 760px) {
    body.reader-page {
        padding-bottom: 78px !important;
    }
    body.reader-page::after {
        content: "";
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(36px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(to top, var(--reader-bg) 55%, transparent);
        pointer-events: none;
        z-index: 11800;
    }
    body.reader-page .reader-mobile-nav {
        position: fixed !important;
        left: 14px !important;
        right: 14px !important;
        max-width: 356px !important;
        margin: 0 auto !important;
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
        z-index: 11850 !important;
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        align-items: center !important;
        gap: 6px !important;
        min-height: 46px !important;
        padding: 5px 6px !important;
        border-radius: 999px !important;
        background: color-mix(in srgb, #ECEAE6 96%, #ECEAE6) !important;
        border: 1px solid #D9D6D0 !important;
        box-shadow: 0 10px 28px rgba(40, 46, 55, 0.15) !important;
        backdrop-filter: blur(14px) !important;
    }
    body.reader-page[data-reader-theme="sepia"] .reader-mobile-nav {
        background: #EFE8D8 !important;
        border-color: #D9D6D0 !important;
    }
    html[data-theme="dark"] body.reader-page:not([data-reader-theme]) .reader-mobile-nav,
    body.reader-page[data-reader-theme="dark"] .reader-mobile-nav {
        background: #2C3037 !important;
        border-color: #3A3F47 !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42) !important;
    }
    body.reader-page .reader-mobile-nav .reader-mnav-btn {
        min-height: 36px !important;
        height: 36px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        background: #ECEAE6 !important;
        border: 1px solid #D9D6D0 !important;
        color: #3B4256 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        font: 600 12.5px/1 var(--font-ui) !important;
        text-decoration: none !important;
    }
    body.reader-page .reader-mobile-nav .reader-mnav-btn small {
        font: 600 12px/1 var(--font-ui) !important;
        color: inherit !important;
    }
    body.reader-page .reader-mobile-nav .reader-mnav-next:not(.is-disabled) {
        background: #3B4256 !important;
        border-color: #3B4256 !important;
        color: #F6F5F2 !important;
    }
    body.reader-page .reader-mobile-nav .reader-mnav-btn.is-disabled {
        opacity: 0.38 !important;
        background: transparent !important;
        border-color: transparent !important;
    }
    body.reader-page .reader-mobile-nav .reader-mnav-center {
        min-height: 36px !important;
        height: 36px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        background: transparent !important;
        border: 0 !important;
        color: var(--reader-text) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        font: 700 13px/1 var(--font-ui) !important;
        cursor: pointer !important;
    }
    body.reader-page .reader-mobile-nav .reader-mnav-center span {
        font: 700 13px/1 var(--font-ui) !important;
    }
    body.reader-page .reader-mobile-nav .reader-mnav-count {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 2px 7px !important;
        border-radius: 999px !important;
        background: rgba(59, 66, 86, 0.13) !important;
        color: #3B4256 !important;
        font: 700 11px/1.2 var(--font-ui) !important;
    }
    body.reader-page[data-reader-theme="dark"] .reader-mobile-nav .reader-mnav-btn {
        background: #2C3037 !important;
        border-color: #3A3F47 !important;
        color: #ECE8E1 !important;
    }
    body.reader-page[data-reader-theme="dark"] .reader-mobile-nav .reader-mnav-next:not(.is-disabled) {
        background: #C9D4EC !important;
        border-color: #C9D4EC !important;
        color: #23262B !important;
    }
    body.reader-page[data-reader-theme="dark"] .reader-mobile-nav .reader-mnav-count {
        background: rgba(201, 212, 236, 0.18) !important;
        color: #C9D4EC !important;
    }
}


/* ==========================================================================
   BUILD 435 — MEDIUM.COM EDITORIAL PARAGRAPH SPACING & READING RHYTHM
   (`1793084548197.jpeg`)
   Ensures every split paragraph in `read.php` (`#reader-content-body p`) has
   authentic Medium.com editorial breathing room (`1.38em` default bottom
   margin, scaling dynamically with `--reader-paragraph-spacing` from the
   Reader Settings slider) and comfortable line-height across mobile & desktop.
   ========================================================================== */
body.reader-page {
    --reader-paragraph-spacing: 1.38em;
}

body.reader-page .reader-shell:not([data-reader-variant="poetry"]) #reader-content-body p {
    margin-top: 0 !important;
    margin-bottom: var(--reader-paragraph-spacing, 1.38em) !important;
}

body.reader-page .reader-shell:not([data-reader-variant="poetry"]) #reader-content-body p:last-child {
    margin-bottom: 0 !important;
}

body.reader-page #reader-content-body .reader-tpl-section.reader-tpl-prose {
    gap: 0 !important;
}

body.reader-page #reader-content-body .reader-tpl-section.reader-tpl-prose > .reader-tpl-h2 {
    margin-bottom: 0.72em !important;
}

/* Phase 3 & Build 465: Modern Simple Quiz Deep-Link Paragraph Highlight & Return Bar in Reader */
.juf-reader-quiz-return-bar,
.juf-reader-quiz-cta-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    margin: 12px auto 18px;
    max-width: min(66ch, 720px);
    border-radius: 12px;
    background: #EFE8D8;
    border: 1px solid #D9D6D0;
    border-left: 4px solid #7A6130;
    color: #282E37;
}
body.reader-page[data-reader-theme="dark"] .juf-reader-quiz-return-bar,
body.reader-page[data-reader-theme="dark"] .juf-reader-quiz-cta-card,
html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) .juf-reader-quiz-return-bar,
html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) .juf-reader-quiz-cta-card {
    background: #3A3528;
    border-color: #3A3F47;
    border-left-color: #D8C08C;
    color: #ECE8E1;
}
.juf-reader-quiz-cta-card {
    background: #ECEAE6;
    border-color: #D9D6D0;
    border-left: 4px solid #3B4256;
    margin: 22px auto 18px;
}
.juf-reader-quiz-return-copy,
.juf-reader-quiz-cta-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 520px;
}
.juf-reader-quiz-kicker {
    font: 700 12px/1.35 var(--font-ui);
    color: #7A6130;
}
body.reader-page[data-reader-theme="dark"] .juf-reader-quiz-kicker {
    color: #D8C08C;
}
.juf-reader-quiz-return-copy strong,
.juf-reader-quiz-cta-copy strong {
    font: 700 15.5px/1.42 var(--font-heading-editorial);
}
.juf-reader-quiz-cta-copy p {
    margin: 0;
    font: 400 13.8px/1.55 var(--font-body);
    opacity: 0.88;
}
.juf-reader-quiz-return-actions,
.juf-reader-quiz-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.juf-reader-quiz-back-btn,
.juf-reader-quiz-jump-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 10px;
    font: 600 13px/1.2 var(--font-ui);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #3B4256;
    background: #3B4256;
    color: #F6F5F2;
}
.juf-reader-quiz-jump-btn {
    background: #F6F5F2;
    color: #282E37;
    border-color: #D9D6D0;
}
body.reader-page[data-reader-theme="dark"] .juf-reader-quiz-jump-btn {
    background: #23262B;
    color: #ECE8E1;
    border-color: #3A3F47;
}
.juf-anchor-para.juf-quiz-target-highlight,
#reader-content-body p.juf-quiz-target-highlight {
    background: #EFE8D8 !important;
    box-shadow: -4px 0 0 #7A6130 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    scroll-margin-top: 110px !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
}
body.reader-page[data-reader-theme="dark"] .juf-anchor-para.juf-quiz-target-highlight,
body.reader-page[data-reader-theme="dark"] #reader-content-body p.juf-quiz-target-highlight,
html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) .juf-anchor-para.juf-quiz-target-highlight {
    background: #3A3528 !important;
    box-shadow: -4px 0 0 #D8C08C !important;
    color: #ECE8E1 !important;
}

/* ==========================================================================
   BUILD 532: SIMPLE, NATURAL EDITORIAL COLORS & SEAMLESS DARK MODE (`read.php`)
   Matches the original non-bulky, natural book-like presentation of
   `1000169450.jpg` & `1000169448.jpg` in Light/Sepia/PDF modes and fixes all
   Dark Mode card/step/fact backgrounds (`1793677464323.jpeg` & `1000170758.jpg`).
   ========================================================================== */

:root {
  --juf-reader-natural-accent: #8B4513;
  --juf-reader-natural-accent-soft: rgba(139, 69, 19, 0.10);
  --juf-reader-natural-accent-border: rgba(139, 69, 19, 0.22);
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]),
body.reader-page[data-reader-theme="dark"] {
  --juf-reader-natural-accent: #C9D4EC;
  --juf-reader-natural-accent-soft: rgba(201, 212, 236, 0.14);
  --juf-reader-natural-accent-border: rgba(201, 212, 236, 0.28);
}

/* 1. Clean, Natural Section Headings (`h2.reader-tpl-h2`) & Inline Step Numbers (`১.`, `২.`) */
body.reader-page #reader-content-body .reader-tpl-h2,
body.reader-page #reader-content-body .reader-tpl-prose h2.reader-tpl-h2 {
  color: var(--reader-text) !important;
  font-weight: 600 !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

body.reader-page #reader-content-body .reader-tpl-step-num {
  color: var(--juf-reader-natural-accent) !important;
  font-weight: 700 !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* 2. Natural In-Paragraph Bold Text (No bulky pill boxes around bold words) */
body.reader-page #reader-content-body .reader-tpl-prose p strong,
body.reader-page #reader-content-body .reader-tpl-prose p b,
body.reader-page #reader-content-body .reader-tpl-prose li strong,
body.reader-page #reader-content-body .reader-tpl-prose li b {
  color: var(--reader-text) !important;
  font-weight: 700 !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body .reader-tpl-prose :is(p, li) :is(strong, b),
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-tpl-prose :is(p, li) :is(strong, b) {
  color: #C9D4EC !important;
  background: transparent !important;
  padding: 0 !important;
}

/* 3. "এই পাঠে তুমি জানবে" & "মনে রাখো" — Soft Warm Tint Box (No heavy borders or gradients) */
body.reader-page #reader-content-body .reader-tpl-tint-box,
body.reader-page #reader-content-body .reader-history-learn-box,
body.reader-page #reader-content-body .reader-remember-box {
  background: color-mix(in srgb, var(--reader-border) 42%, var(--reader-surface)) !important;
  border: 1px solid var(--reader-border) !important;
  border-radius: 16px !important;
  padding: 18px 20px !important;
  box-shadow: none !important;
  color: var(--reader-text) !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body :is(.reader-tpl-tint-box, .reader-history-learn-box, .reader-remember-box),
body.reader-page[data-reader-theme="dark"] #reader-content-body :is(.reader-tpl-tint-box, .reader-history-learn-box, .reader-remember-box) {
  background: #343A44 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

body.reader-page #reader-content-body .reader-learn-list li::before,
body.reader-page #reader-content-body .reader-remember-list li::before {
  color: var(--juf-reader-natural-accent) !important;
  background: transparent !important;
  border: 0 !important;
  font-weight: 700 !important;
}

/* 4. "সময়রেখা" (Timeline) — Open, Box-Free Vertical Line on Page Paper */
body.reader-page #reader-content-body .reader-timeline-list {
  border-left: 2px solid var(--reader-border) !important;
  padding: 0 0 0 22px !important;
  margin: 4px 0 0 8px !important;
  gap: 18px !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body .reader-timeline-list,
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-timeline-list {
  border-left-color: #3A3F47 !important;
}

body.reader-page #reader-content-body .reader-timeline-item {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

body.reader-page #reader-content-body .reader-tl-dot {
  position: absolute !important;
  left: -29px !important;
  top: 7px !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: var(--juf-reader-natural-accent) !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.reader-page #reader-content-body .reader-tl-copy {
  color: var(--reader-text) !important;
  line-height: 1.72 !important;
}

body.reader-page #reader-content-body .reader-tl-copy strong {
  display: block !important;
  color: var(--juf-reader-natural-accent) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 0.94em !important;
  font-weight: 700 !important;
  margin: 0 0 2px 0 !important;
}

/* 5. "প্রধান নেতৃত্ব" / "যাঁরা ছিলেন এই গল্পে" — Warm Editorial Portrait Cards */
body.reader-page #reader-content-body .reader-figures-section {
  background: color-mix(in srgb, var(--reader-surface) 58%, #E4E6EC) !important;
  border: 1px solid color-mix(in srgb, var(--reader-border) 92%, #D9D6D0) !important;
  border-radius: 18px !important;
  padding: 20px 20px 22px !important;
  box-shadow: 0 6px 20px rgba(40, 46, 55, 0.04) !important;
}

body.reader-page #reader-content-body .reader-figures-icon,
body.reader-page #reader-content-body .reader-figures-heading {
  color: var(--juf-reader-natural-accent) !important;
}

body.reader-page #reader-content-body .reader-figure-card {
  background: color-mix(in srgb, var(--reader-surface) 92%, #FFFFFF) !important;
  border: 1px solid color-mix(in srgb, var(--reader-border) 85%, #D9D6D0) !important;
  border-radius: 15px !important;
  box-shadow: 0 4px 14px rgba(40, 46, 55, 0.04) !important;
}

body.reader-page #reader-content-body .reader-figure-name {
  color: var(--reader-text) !important;
  font-weight: 700 !important;
}

body.reader-page #reader-content-body .reader-figure-years {
  color: var(--juf-reader-natural-accent) !important;
  background: var(--juf-reader-natural-accent-soft) !important;
  border: 1px solid var(--juf-reader-natural-accent-border) !important;
  font-weight: 600 !important;
  padding: 2px 9px !important;
  border-radius: 999px !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body .reader-figures-section,
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figures-section {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body .reader-figure-card,
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figure-card {
  background: #343A44 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body .reader-figure-name,
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-figure-name {
  color: #ECE8E1 !important;
}

/* 6. "কেন হলো, কী হলো" (`.reader-cause-cell`), "এক নজরে" (`.reader-fact-cell`), "কঠিন শব্দ" (`.reader-glossary-box`), "প্রশ্ন ও উত্তর" (`.reader-qa-card`) */
body.reader-page #reader-content-body .reader-cause-cell,
body.reader-page #reader-content-body .reader-fact-cell,
body.reader-page #reader-content-body .reader-tpl-card-box,
body.reader-page #reader-content-body .reader-qa-card,
body.reader-page #reader-content-body .reader-glossary-box {
  background: var(--reader-surface) !important;
  border: 1px solid var(--reader-border) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  color: var(--reader-text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body :is(.reader-cause-cell, .reader-fact-cell, .reader-tpl-card-box, .reader-qa-card, .reader-glossary-box, .reader-table-wrap, .reader-related-item, .reader-map-frame figure),
body.reader-page[data-reader-theme="dark"] #reader-content-body :is(.reader-cause-cell, .reader-fact-cell, .reader-tpl-card-box, .reader-qa-card, .reader-glossary-box, .reader-table-wrap, .reader-related-item, .reader-map-frame figure) {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
  box-shadow: none !important;
}

body.reader-page #reader-content-body .reader-cause-cell strong,
body.reader-page #reader-content-body .reader-fact-cell strong {
  display: block !important;
  color: var(--juf-reader-natural-accent) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  margin: 0 0 4px 0 !important;
}

body.reader-page #reader-content-body .reader-glossary-box li strong,
body.reader-page #reader-content-body .reader-glossary-items strong {
  color: var(--juf-reader-natural-accent) !important;
  background: transparent !important;
  padding: 0 !important;
}

/* 7. "ধাপে ধাপে বুঝি" (`.reader-step-item`) — Box-Free Natural Row (Fixes `1793677464323.jpeg`) */
body.reader-page #reader-content-body .reader-step-item {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  color: var(--reader-text) !important;
}

body.reader-page #reader-content-body .reader-step-badge {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: var(--juf-reader-natural-accent) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 2px !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body .reader-step-badge,
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-step-badge {
  background: #C9D4EC !important;
  color: #23262B !important;
}

body.reader-page #reader-content-body .reader-step-copy {
  color: var(--reader-text) !important;
  line-height: 1.72 !important;
}

body.reader-page #reader-content-body .reader-step-copy strong {
  color: var(--juf-reader-natural-accent) !important;
  background: transparent !important;
  padding: 0 !important;
  font-weight: 700 !important;
}

/* 8. "জানো কি?" (`.reader-did-you-know`) — Simple Surface Card with Left Accent Bar */
body.reader-page #reader-content-body .reader-did-you-know {
  background: var(--reader-surface) !important;
  border: 1px solid var(--reader-border) !important;
  border-left: 4px solid var(--juf-reader-natural-accent) !important;
  border-radius: 12px !important;
  padding: 15px 18px !important;
  color: var(--reader-text) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.reader-page:not([data-reader-theme="paper"]):not([data-reader-theme="sepia"]):not([data-reader-theme="pdf"]) #reader-content-body .reader-did-you-know,
body.reader-page[data-reader-theme="dark"] #reader-content-body .reader-did-you-know {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  border-left-color: #C9D4EC !important;
  color: #ECE8E1 !important;
}

body.reader-page #reader-content-body .reader-did-you-know-title {
  color: var(--juf-reader-natural-accent) !important;
}


/* === MERGED: audiobook-library.css === */
/* JUFbook final Audiobook Library — music-dashboard composition with existing player/data. */
.audiobook-page .site-main{padding-top:0;background:#ECEAE6}
.audiobook-page .audio-hub-hero-v2{width:min(1220px,calc(100% - 40px));margin:28px auto 22px;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.72fr);gap:28px;align-items:center;padding:clamp(26px,4vw,46px);border:1px solid #D9D6D0;border-radius:28px;background:linear-gradient(135deg,#ECEAE6 0%,#E4E6EC 100%);box-shadow:0 18px 52px rgba(59, 66, 86, .08);overflow:hidden;position:relative}
.audiobook-page .audio-hub-hero-v2:before{content:"";position:absolute;width:360px;height:360px;border-radius:50%;right:-100px;top:-180px;border:1px solid rgba(59, 66, 86, .12)}
.audiobook-page .audio-hub-hero-copy{position:relative;z-index:2;min-width:0}
.audiobook-page .audio-hub-hero-copy .page-section-title{font-size:clamp(36px,4.7vw,58px);line-height:1.08;color:var(--juf-ink-soft);max-width:650px;margin:7px 0 14px}
.audiobook-page .audio-hub-hero-copy>p{max-width:640px;color:#5B6376;line-height:1.8;margin:0}
.audiobook-page .audio-hub-count{position:absolute;right:22px;bottom:18px;z-index:3;display:grid;justify-items:end;font:500 26px/1 var(--font-heading);color:var(--juf-header-footer)}
.audiobook-page .audio-hub-count span{font:500 9px/1.3 var(--font-ui-system);color:#5B6376;margin-top:4px}
.audiobook-page .audio-hub-featured{position:relative;z-index:2;min-height:260px;border:1px solid #D9D6D0;border-radius:23px;background:rgba(236, 234, 230, .8);padding:18px;display:grid;grid-template-columns:132px minmax(0,1fr);gap:18px;align-items:center;box-shadow:0 18px 42px rgba(59, 66, 86, .10)}
.audiobook-page .audio-hub-featured-cover{display:block;width:132px;aspect-ratio:2/3;overflow:hidden;border-radius:13px;box-shadow:0 16px 30px rgba(40, 46, 55, .14)}
.audiobook-page .audio-hub-featured-cover .juf-book-jacket{width:100%!important;height:100%!important;min-height:0!important}
.audiobook-page .audio-hub-featured-copy{min-width:0;display:grid;gap:7px}
.audiobook-page .audio-hub-featured-copy>span{font-size:9.5px;font-weight:600;color:#282E37;letter-spacing:.1em}
.audiobook-page .audio-hub-featured-copy h2{font:400 21px/1.3 var(--font-book-title);color:var(--juf-ink-soft);margin:0}
.audiobook-page .audio-hub-featured-author{display:flex;align-items:center;gap:8px;text-decoration:none;color:#5B6376;font-size:12px;font-weight:500}
.audiobook-page .audio-hub-featured-author>span:first-child{width:34px;height:34px;border-radius:50%;overflow:hidden;flex:0 0 34px}
.audiobook-page .audio-hub-featured-author>span:first-child>*{width:100%!important;height:100%!important;border-radius:50%!important}
.audiobook-page .audio-hub-featured-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.audiobook-page .audio-hub-featured-actions button,.audiobook-page .audio-hub-featured-actions a{min-height:42px;border-radius:999px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;font:600 11px var(--font-ui-system);text-decoration:none;cursor:pointer}
.audiobook-page .audio-hub-featured-actions button{border:0;background:#3B4256;color:#fff}
.audiobook-page .audio-hub-featured-actions a{border:1px solid #D9D6D0;color:var(--juf-header-footer);background:#ECEAE6}
.audiobook-page .audio-hub-featured-empty{grid-template-columns:1fr;text-align:center;place-items:center;color:#5B6376}
.audiobook-page .audio-wave-art{width:min(250px,80%);height:90px;display:flex;align-items:center;justify-content:center;gap:7px}
.audiobook-page .audio-wave-art i{display:block;width:7px;border-radius:999px;background:#3B4256;height:28px;opacity:.72}
.audiobook-page .audio-wave-art i:nth-child(2),.audiobook-page .audio-wave-art i:nth-child(6){height:48px}.audiobook-page .audio-wave-art i:nth-child(3),.audiobook-page .audio-wave-art i:nth-child(5){height:70px}.audiobook-page .audio-wave-art i:nth-child(4){height:86px;background:#3B4256}
.audiobook-page .audio-hub-featured-empty strong{font:500 18px var(--font-heading);color:#282E37}.audiobook-page .audio-hub-featured-empty p{font-size:12px;max-width:330px;margin:0}

.audiobook-page .audio-collection-shelf{width:min(1220px,calc(100% - 40px));margin:0 auto 20px;padding:18px 0 4px}
.audiobook-page .audio-shelf-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px}.audiobook-page .audio-shelf-heading span{font-size:9.5px;color:#282E37;font-weight:600}.audiobook-page .audio-shelf-heading h2{font:500 25px var(--font-heading);margin:3px 0 0}.audiobook-page .audio-shelf-heading>a{font-size:11px;color:var(--juf-header-footer);font-weight:600;text-decoration:none}
.audiobook-page .audio-collection-cards{display:flex;gap:12px;overflow-x:auto;padding:3px 2px 13px;scroll-snap-type:x proximity}
.audiobook-page .audio-collection-card{flex:0 0 275px;scroll-snap-align:start;min-height:104px;display:grid;grid-template-columns:78px minmax(0,1fr);gap:12px;align-items:center;border:1px solid #D9D6D0;border-radius:18px;background:#ECEAE6;padding:11px;text-decoration:none;color:#282E37;box-shadow:0 8px 24px rgba(40, 46, 55, .04)}
.audiobook-page .audio-collection-card.is-active{border-color:#3B4256;box-shadow:0 10px 28px rgba(59, 66, 86, .10)}
.audiobook-page .audio-collection-card-art{width:78px;height:78px;border-radius:13px;overflow:hidden;background:var(--juf-surface-muted);display:grid;place-items:center}.audiobook-page .audio-collection-card-art img{width:100%;height:100%;object-fit:cover}.audiobook-page .audio-collection-card-art i{font-style:normal;font:600 16px var(--font-brand);color:var(--juf-header-footer)}
.audiobook-page .audio-collection-card-copy{display:grid;gap:4px;min-width:0}.audiobook-page .audio-collection-card-copy small{font-size:8px;font-weight:600;color:#282E37}.audiobook-page .audio-collection-card-copy strong{font:500 15px/1.35 var(--font-heading)}.audiobook-page .audio-collection-card-copy em{font-style:normal;font-size:10.5px;color:#5B6376;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.audiobook-page .audio-filter-bar{width:min(1220px,calc(100% - 40px));margin:0 auto 18px;display:grid;grid-template-columns:minmax(260px,1.7fr) repeat(4,minmax(120px,.75fr)) auto;gap:8px;padding:10px;border:1px solid #D9D6D0;border-radius:16px;background:#ECEAE6;box-shadow:0 8px 24px rgba(40, 46, 55, .035)}
.audiobook-page .audio-filter-bar input,.audiobook-page .audio-filter-bar select{min-width:0;min-height:44px;border:1px solid #D9D6D0;border-radius:10px;background:#fff;color:#282E37;padding:0 11px;font:inherit;font-size:12px}.audiobook-page .audio-filter-bar button{border:0;border-radius:10px;background:var(--juf-header-footer);color:#fff;padding:0 16px;font-weight:600;cursor:pointer}

.audiobook-page .audio-dashboard-layout{width:min(1220px,calc(100% - 40px));margin:0 auto 72px;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.audiobook-page .audio-dashboard-main{min-width:0;background:#ECEAE6;border:1px solid #D9D6D0;border-radius:22px;padding:18px;box-shadow:0 12px 36px rgba(40, 46, 55, .045)}
.audiobook-page .audio-library-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;padding:2px 3px 14px;border-bottom:1px solid #D9D6D0}.audiobook-page .audio-library-heading span{font-size:9px;font-weight:600;color:#282E37}.audiobook-page .audio-library-heading h2{font:500 26px var(--font-heading);margin:2px 0 0}.audiobook-page .audio-library-heading>strong{font-size:11px;color:#5B6376}
.audiobook-page .audio-library-table-head,.audiobook-page .audio-library-row{grid-template-columns:30px minmax(250px,1.6fr) minmax(125px,.72fr) 88px 78px}
.audiobook-page .audio-library-table-head{padding:10px 10px 8px;color:#5B6376;font-size:9px;font-weight:600;letter-spacing:.06em}
.audiobook-page .audio-library-row{min-height:88px;padding:10px;border-bottom:1px solid #D9D6D0;transition:background .2s ease,transform .2s ease}.audiobook-page .audio-library-row:hover{background:#ECEAE6;transform:translateX(2px)}
.audiobook-page .audio-row-cover{width:52px;height:70px;border-radius:8px;overflow:hidden}.audiobook-page .audio-row-cover .juf-book-jacket{width:100%!important;height:100%!important;min-height:0!important}.audiobook-page .audio-row-book{grid-template-columns:52px minmax(0,1fr);gap:11px}
.audiobook-page .audio-row-copy h3{font:400 18px/1.35 var(--font-book-title);margin:0 0 7px}.audiobook-page .audio-row-copy h3 a{color:var(--juf-ink-soft);text-decoration:none}
.audiobook-page .audio-row-author{display:flex;align-items:center;gap:7px;color:#5B6376;text-decoration:none;font-size:10.5px}.audiobook-page .audio-row-author-avatar{width:25px;height:25px;flex:0 0 25px;border-radius:50%;overflow:hidden}.audiobook-page .audio-row-author-avatar>*{width:100%!important;height:100%!important;border-radius:50%!important}
.audiobook-page .audio-row-voice strong{font-size:10.5px;color:var(--juf-header-footer)}.audiobook-page .audio-row-voice span,.audiobook-page .audio-row-voice small,.audiobook-page .audio-row-stats{font-size:9.5px;color:#5B6376}
.audiobook-page .audio-inline-play{width:42px;height:42px;border-radius:50%;background:#3346A8;color:#fff;border:0;display:grid;place-items:center;text-decoration:none;cursor:pointer;box-shadow:0 6px 16px rgba(51, 70, 168, .16)}
.audiobook-page .audio-row-actions>a:not(.audio-inline-play){font-size:9.5px;color:var(--juf-header-footer);text-decoration:none;font-weight:600}
.audiobook-page .audio-empty-state{margin:28px auto!important;min-height:300px;display:flex;flex-direction:column;justify-content:center}

.audiobook-page .audio-player-panel{position:sticky;top:92px;border:1px solid #D9D6D0;border-radius:24px;background:linear-gradient(160deg,var(--juf-header-footer),#3B4256);color:var(--bg-cream);padding:18px;box-shadow:0 22px 52px rgba(40, 46, 55, .18);overflow:hidden}
.audiobook-page .audio-player-panel:before{content:"";position:absolute;width:220px;height:220px;border-radius:50%;border:1px solid rgba(255, 255, 255, .08);right:-92px;top:-105px}.audiobook-page .audio-player-panel>*{position:relative;z-index:2}
.audiobook-page .audio-player-art{aspect-ratio:1/1;width:100%;max-height:300px;border-radius:18px;background:linear-gradient(145deg,#3B4256,#D9D6D0);display:grid;place-items:center;overflow:hidden;margin-bottom:13px;border:1px solid rgba(255, 255, 255, .12)}
.audiobook-page .audio-player-art>span{font:600 34px var(--font-brand);letter-spacing:.12em;color:#F6F5F2}.audiobook-page .audio-player-art img{width:100%;height:100%;object-fit:cover}
.audiobook-page .audio-player-provider{font-size:9px;font-weight:600;color:#F6F5F2;letter-spacing:.09em}.audiobook-page .audio-player-panel h2{font:400 20px/1.35 var(--font-book-title);color:#fff;margin:6px 0 3px}.audiobook-page .audio-player-panel>p{color:#F6F5F2;font-size:11.5px;margin:0 0 4px}.audiobook-page .audio-player-narrator{color:#5B6376!important}
.audiobook-page .juf-player-timeline{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;margin:15px 0 10px;font-size:9px;color:#F6F5F2}.audiobook-page .juf-player-timeline input{width:100%;accent-color:#3B4256}
.audiobook-page .juf-player-controls{display:flex;align-items:center;justify-content:center;gap:12px;margin:12px 0}.audiobook-page .juf-player-controls button{width:40px;height:40px;border:1px solid rgba(255, 255, 255, .15);border-radius:50%;background:rgba(255, 255, 255, .07);color:#fff;cursor:pointer}.audiobook-page .juf-player-controls .juf-main-play{width:54px;height:54px;background:#ECEAE6;color:var(--juf-header-footer);border-color:#D9D6D0}.audiobook-page .juf-player-tools{display:flex;align-items:center;justify-content:space-between;gap:10px}.audiobook-page .juf-player-tools label{font-size:10px;color:#F6F5F2}.audiobook-page .juf-player-tools select{border:1px solid rgba(255, 255, 255, .15);background:var(--juf-header-footer);color:#fff;border-radius:8px;padding:5px}.audiobook-page .juf-player-tools button{border:0;background:transparent;color:#fff;font-size:16px;cursor:pointer}
.audiobook-page .audio-player-mobile-toggle{display:none}

@media(max-width:1120px){.audiobook-page .audio-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.audiobook-page .audio-filter-bar input{grid-column:span 2}.audiobook-page .audio-dashboard-layout{grid-template-columns:minmax(0,1fr) 310px}.audiobook-page .audio-library-table-head,.audiobook-page .audio-library-row{grid-template-columns:28px minmax(220px,1.5fr) minmax(115px,.7fr) 76px 68px}}
@media(max-width:900px){
 .audiobook-page .audio-hub-hero-v2{grid-template-columns:1fr}
 .audiobook-page .audio-hub-count{display:none}
 .audiobook-page .audio-dashboard-layout{display:block;margin-bottom:112px}
 .audiobook-page .audio-library-table-head{display:none}
 .audiobook-page .audio-library-row{grid-template-columns:28px minmax(0,1fr) 76px 64px}
 .audiobook-page .audio-row-voice{display:none}
 .audiobook-page .audio-player-panel{position:fixed;z-index:120;left:10px;right:10px;bottom:10px;top:auto;max-height:78px;border-radius:18px;padding:10px 62px 10px 12px;transition:max-height .25s ease,padding .25s ease}
 .audiobook-page .audio-player-mobile-toggle{display:block;position:absolute;right:10px;top:10px;border:0;background:transparent;color:#F6F5F2;font-size:11px;font-weight:600;cursor:pointer}
 .audiobook-page .audio-player-panel .audio-player-video-stage,.audiobook-page .audio-player-panel .audio-player-art,.audiobook-page .audio-player-panel .juf-player-timeline,.audiobook-page .audio-player-panel .juf-player-tools,.audiobook-page .audio-player-panel>p.audio-player-narrator{display:none}
 .audiobook-page .audio-player-panel h2{font-size:14px;margin:2px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:58%}.audiobook-page .audio-player-panel>p{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:58%}
 .audiobook-page .audio-player-panel .juf-player-controls{position:absolute;right:70px;top:12px;margin:0;gap:4px}.audiobook-page .audio-player-panel .juf-player-controls button:not(.juf-main-play){display:none}.audiobook-page .audio-player-panel .juf-player-controls .juf-main-play{width:44px;height:44px}
 .audiobook-page .audio-player-panel.is-expanded{max-height:min(84vh,680px);padding:14px;overflow:auto}.audiobook-page .audio-player-panel.is-expanded .audio-player-video-stage{display:block}.audiobook-page .audio-player-panel.is-expanded .audio-player-art{display:grid;max-width:210px;margin:8px auto 12px}.audiobook-page .audio-player-panel.is-expanded .juf-player-timeline{display:grid}.audiobook-page .audio-player-panel.is-expanded .juf-player-tools{display:flex}.audiobook-page .audio-player-panel.is-expanded>p.audio-player-narrator{display:block}.audiobook-page .audio-player-panel.is-expanded .juf-player-controls{position:static;margin:10px 0}.audiobook-page .audio-player-panel.is-expanded .juf-player-controls button:not(.juf-main-play){display:inline-block}.audiobook-page .audio-player-panel.is-expanded h2{text-align:center;font-size:18px;max-width:none}.audiobook-page .audio-player-panel.is-expanded>p{text-align:center;max-width:none}
}
@media(max-width:720px){
 .audiobook-page .audio-hub-hero-v2,.audiobook-page .audio-collection-shelf,.audiobook-page .audio-filter-bar,.audiobook-page .audio-dashboard-layout{width:calc(100% - 24px);margin-left:12px;margin-right:12px}
 .audiobook-page .audio-hub-hero-v2{padding:20px 16px;border-radius:22px}.audiobook-page .audio-hub-hero-copy .page-section-title{font-size:32px}.audiobook-page .audio-hub-featured{grid-template-columns:92px minmax(0,1fr);min-height:0;padding:13px}.audiobook-page .audio-hub-featured-cover{width:92px}.audiobook-page .audio-hub-featured-copy h2{font-size:18px}
 .audiobook-page .audio-filter-bar{grid-template-columns:1fr 1fr}.audiobook-page .audio-filter-bar input,.audiobook-page .audio-filter-bar button{grid-column:1/-1}
 .audiobook-page .audio-dashboard-main{padding:12px;border-radius:18px}.audiobook-page .audio-library-row{grid-template-columns:minmax(0,1fr) 58px;gap:9px}.audiobook-page .audio-row-index,.audiobook-page .audio-row-stats{display:none}.audiobook-page .audio-row-book{grid-template-columns:48px minmax(0,1fr)}.audiobook-page .audio-row-cover{width:48px;height:64px}.audiobook-page .audio-row-actions{justify-items:end}.audiobook-page .audio-collection-card{flex-basis:225px}
}
@media(max-width:430px){
 .audiobook-page .audio-hub-featured{grid-template-columns:76px minmax(0,1fr)}.audiobook-page .audio-hub-featured-cover{width:76px}.audiobook-page .audio-hub-featured-actions a{display:none}.audiobook-page .audio-hub-featured-actions button{width:100%}
 .audiobook-page .audio-filter-bar{grid-template-columns:1fr}.audiobook-page .audio-filter-bar input,.audiobook-page .audio-filter-bar button{grid-column:auto}.audiobook-page .audio-library-heading{align-items:flex-start;flex-direction:column;gap:4px}.audiobook-page .audio-library-row{padding:9px 6px}.audiobook-page .audio-row-actions>a:not(.audio-inline-play){display:none}.audiobook-page .audio-player-panel{left:6px;right:6px;bottom:6px}
}
@media(prefers-reduced-motion:reduce){.audiobook-page .audio-library-row,.audiobook-page .audio-player-panel{transition:none!important}}
.audiobook-page .audio-hub-featured-actions .audio-inline-play{width:auto;height:auto;box-shadow:none}
.audiobook-page .audio-collection-hero-cover{width:78px;height:78px;border-radius:20px;overflow:hidden;margin:0 0 16px;border:1px solid rgba(59, 66, 86, .14);background:#ECEAE6;box-shadow:0 12px 28px rgba(59, 66, 86, .10)}
.audiobook-page .audio-collection-hero-cover img{width:100%;height:100%;object-fit:cover;display:block}
@media(max-width:620px){.audiobook-page .audio-collection-hero-cover{width:62px;height:62px;border-radius:16px;margin-bottom:12px}}


/* === MERGED: premium.css === */
/* JUFbook Premium — Phase 24 plan-first responsive editorial page.
   Premium catalogue/search intentionally lives in books.php?access=premium. */
.premium-page {
    --premium-ink: #3B4256;
    --premium-muted: #3B4256;
    --premium-line: rgba(59, 66, 86, .16);
    --premium-soft: #ECEAE6;
    --premium-card: #ECEAE6;
    --premium-teal: #3B4256;
    --premium-teal-dark: #3B4256;
    --premium-gold: #B79A68;
}
.premium-page .site-main { padding-top: 0; }
.premium-page :where(.premium-hero,.premium-active-pass,.premium-section,.premium-library-callout,.premium-trust-section,.premium-faq,.premium-pass-muted) { max-width: 1180px; margin-inline: auto; }

.premium-hero {
    display: grid;
    grid-template-columns: minmax(0,1.18fr) minmax(290px,.82fr);
    gap: clamp(28px,4vw,58px);
    align-items: center;
    margin-top: 24px;
    padding: clamp(34px,5vw,58px);
    border: 1px solid var(--premium-line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 88% 12%,rgba(59, 66, 86, .11),transparent 31%),
        linear-gradient(135deg,#ECEAE6 0%,#ECEAE6 100%);
    box-shadow: 0 18px 42px rgba(40, 46, 55, .055);
}
.premium-hero-copy { min-width: 0; }
.premium-eyebrow,
.premium-section-heading>span,
.premium-faq-intro>span,
.premium-library-callout>div>span,
.premium-active-pass>div>span,
.premium-pass-muted>div>span {
    display: inline-block;
    color: var(--premium-gold);
    font-size: 10px;
    font-weight:600;
    letter-spacing:normal;
    text-transform: uppercase;
}
.premium-hero h1 {
    max-width: 700px;
    margin: 10px 0 12px;
    color: var(--premium-ink);
    font-size: clamp(38px,5vw,62px);
    line-height: 1.08;
    letter-spacing: -.025em;
}
.premium-hero-copy>p {
    max-width: 680px;
    margin: 0;
    color: var(--premium-muted);
    font-size: 14px;
    line-height: 1.76;
}
.premium-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.premium-primary-btn,.premium-secondary-btn,.premium-active-pass>a,.premium-pass-muted>a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border-radius: 12px;
    font-size: 12px;
    font-weight:600;
    text-decoration: none;
    transition: transform .16s ease,background .16s ease,border-color .16s ease;
}
.premium-primary-btn,.premium-active-pass>a { background: var(--premium-teal); color: #fff; border: 1px solid var(--premium-teal); }
.premium-secondary-btn,.premium-pass-muted>a { background: rgba(236, 234, 230, .86); color: var(--premium-ink); border: 1px solid var(--premium-line); }
.premium-primary-btn:hover,.premium-primary-btn:focus-visible,.premium-active-pass>a:hover,.premium-active-pass>a:focus-visible { background: var(--premium-teal-dark); }
.premium-primary-btn:focus-visible,.premium-secondary-btn:focus-visible,.premium-active-pass>a:focus-visible,.premium-pass-muted>a:focus-visible { outline: 3px solid rgba(51, 70, 168, .17); outline-offset: 2px; }
.premium-hero-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.premium-hero-trust span { padding: 6px 9px; border: 1px solid var(--premium-line); border-radius: 999px; background: rgba(236, 234, 230, .68); color: #5B6376; font-size: 10.5px; font-weight:500; }

.premium-hero-panel {
    padding: 18px;
    border: 1px solid rgba(59, 66, 86, .18);
    border-radius: 22px;
    background: rgba(236, 234, 230, .82);
    box-shadow: 0 12px 28px rgba(40, 46, 55, .05);
}
.premium-pass-preview { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 14px; padding: 18px; border-radius: 17px; background: var(--premium-teal); color: #fff; }
.premium-pass-preview span { grid-column: 1/-1; font-size: 9.5px; font-weight:600; letter-spacing:normal; opacity: .78; }
.premium-pass-preview strong { font-family: var(--font-brand); font-size: 42px; line-height: 1; }
.premium-pass-preview small { padding-bottom: 4px; font-size: 10.5px; opacity: .82; }
.premium-scope-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 9px; }
.premium-scope-grid div { padding: 13px 14px; border: 1px solid var(--premium-line); border-radius: 14px; background: #fff; }
.premium-scope-grid span { display: block; color: var(--premium-muted); font-size: 10px; }
.premium-scope-grid strong { display: block; margin-top: 4px; color: var(--premium-ink); font-size: 22px; }
.premium-hero-panel>p { margin: 12px 3px 1px; color: var(--premium-muted); font-size: 10.5px; line-height: 1.55; }

.premium-active-pass,.premium-pass-muted {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid var(--premium-line);
    border-radius: 18px;
    background: var(--premium-card);
}
.premium-active-pass h2,.premium-pass-muted h2 { margin: 3px 0 3px; color: var(--premium-ink); font-size: 21px; }
.premium-active-pass p,.premium-pass-muted p { margin: 0; color: var(--premium-muted); font-size: 11.5px; line-height: 1.55; }

.premium-section { margin-top: 52px; }
.premium-section-heading { max-width: 780px; margin-bottom: 20px; }
.premium-section-heading h2,.premium-library-callout h2,.premium-faq h2 { margin: 5px 0 7px; color: var(--premium-ink); font-size: clamp(28px,3.2vw,40px); line-height: 1.16; letter-spacing: -.015em; }
.premium-section-heading p,.premium-library-callout p,.premium-faq-intro p { margin: 0; color: var(--premium-muted); font-size: 12.5px; line-height: 1.68; }

.premium-plan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; align-items: stretch; }
.premium-plan-grid-count-1 { grid-template-columns: minmax(0,520px); justify-content: center; }
.premium-plan-grid-count-2 { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 820px; }
.premium-plan-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--premium-line);
    border-radius: 20px;
    background: var(--premium-card);
    box-shadow: 0 10px 26px rgba(40, 46, 55, .045);
}
.premium-plan-card.is-featured { border-color: rgba(59, 66, 86, .42); box-shadow: 0 13px 32px rgba(59, 66, 86, .08); }
.premium-plan-topline { display: flex; min-height: 26px; align-items: center; justify-content: space-between; gap: 8px; }
.premium-plan-duration { color: var(--premium-gold); font-size: 10.5px; font-weight:600; letter-spacing:normal; }
.premium-plan-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; background: #ECEAE6; color: var(--premium-teal-dark); font-size: 9px; font-weight:600; }
.premium-plan-card h3 { margin: 9px 0 5px; color: var(--premium-ink); font-size: 24px; line-height: 1.22; }
.premium-plan-card>p { min-height: 42px; margin: 0; color: var(--premium-muted); font-size: 11.5px; line-height: 1.58; }
.premium-plan-price { display: flex; align-items: end; gap: 8px; margin: 18px 0 10px; }
.premium-plan-price strong { color: var(--premium-ink); font-size: 31px; line-height: 1; }
.premium-plan-price span { color: var(--premium-muted); font-size: 9.5px; }
.premium-plan-access-type { display: inline-flex; align-self: flex-start; min-height: 28px; align-items: center; padding: 0 9px; border-radius: 999px; background: var(--premium-soft); color: #5B6376; font-size: 10px; font-weight:500; }
.premium-plan-card ul { display: grid; gap: 8px; margin: 16px 0 20px; padding: 0; list-style: none; }
.premium-plan-card li { position: relative; padding-left: 20px; color: #282E37; font-size: 11.5px; line-height: 1.48; }
.premium-plan-card li::before { content: '✓'; position: absolute; left: 0; color: var(--premium-teal); font-weight:600; }
.premium-plan-card>a,.premium-plan-disabled { margin-top: auto; }
.premium-plan-card>a { display: flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 12px; background: var(--premium-teal); color: #fff; font-size: 12px; font-weight:600; text-decoration: none; }
.premium-plan-card>a:hover,.premium-plan-card>a:focus-visible { background: var(--premium-teal-dark); }
.premium-plan-card>a:focus-visible { outline: 3px solid rgba(59, 66, 86, .17); outline-offset: 2px; }
.premium-plan-disabled { display: flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px dashed var(--premium-line); border-radius: 12px; color: var(--premium-muted); font-size: 10.5px; text-align: center; }

.premium-comparison-section { margin-top: 44px; }
.premium-comparison-wrap { overflow-x: auto; border: 1px solid var(--premium-line); border-radius: 18px; background: var(--premium-card); scrollbar-width: thin; }
.premium-comparison-wrap:focus-visible { outline: 3px solid rgba(59, 66, 86, .17); outline-offset: 2px; }
.premium-comparison-table { width: 100%; min-width: 620px; border-collapse: collapse; color: var(--premium-ink); font-size: 11.5px; }
.premium-comparison-table th,.premium-comparison-table td { padding: 14px 16px; border-bottom: 1px solid rgba(59, 66, 86, .11); text-align: center; }
.premium-comparison-table thead th { background: #ECEAE6; font-size: 11px; }
.premium-comparison-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 150px; background: #F6F5F2; text-align: left; }
.premium-comparison-table tbody tr:last-child th,.premium-comparison-table tbody tr:last-child td { border-bottom: 0; }

.premium-how-grid,.premium-trust-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.premium-how-grid article,.premium-trust-grid article { padding: 18px; border: 1px solid var(--premium-line); border-radius: 17px; background: #F6F5F2; }
.premium-how-grid span,.premium-trust-grid article>span { color: var(--premium-gold); font-family: var(--font-brand); font-size: 10px; font-weight:600; letter-spacing:normal; }
.premium-how-grid h3,.premium-trust-grid h3 { margin: 8px 0 5px; color: var(--premium-ink); font-size: 16px; }
.premium-how-grid p,.premium-trust-grid p { margin: 0; color: var(--premium-muted); font-size: 11px; line-height: 1.62; }

.premium-library-callout {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 28px;
    align-items: center;
    margin-top: 52px;
    padding: clamp(24px,4vw,38px);
    border: 1px solid rgba(59, 66, 86, .22);
    border-radius: 22px;
    background: linear-gradient(135deg,#ECEAE6 0%,#ECEAE6 100%);
}
.premium-library-callout h2 { max-width: 760px; font-size: clamp(25px,3vw,35px); }
.premium-library-callout p { max-width: 820px; }
.premium-library-callout>a { white-space: nowrap; }

.premium-trust-section { margin-top: 52px; }
.premium-trust-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.premium-policy-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.premium-policy-links a { display: inline-flex; min-height: 34px; align-items: center; padding: 0 11px; border: 1px solid var(--premium-line); border-radius: 999px; background: #fff; color: var(--premium-ink); font-size: 10.5px; font-weight:500; text-decoration: none; }
.premium-policy-links a:hover,.premium-policy-links a:focus-visible { border-color: rgba(59, 66, 86, .42); color: var(--premium-teal-dark); }

.premium-faq { display: grid; grid-template-columns: minmax(230px,.72fr) minmax(0,1.28fr); gap: 42px; margin-top: 54px; margin-bottom: 70px; }
.premium-faq-intro { align-self: start; }
.premium-faq-list { border-top: 1px solid var(--premium-line); }
.premium-faq-list details { border-bottom: 1px solid var(--premium-line); }
.premium-faq-list summary { position: relative; cursor: pointer; list-style: none; padding: 15px 34px 15px 0; color: var(--premium-ink); font-size: 13px; font-weight:600; }
.premium-faq-list summary::-webkit-details-marker { display: none; }
.premium-faq-list summary::after { content: '+'; position: absolute; right: 2px; top: 50%; width: 24px; height: 24px; transform: translateY(-50%); display: grid; place-items: center; border: 1px solid var(--premium-line); border-radius: 50%; color: var(--premium-teal); font:600 15px/1 var(--font-ui-system); transition: transform .18s ease; }
.premium-faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.premium-faq-list p { max-width: 780px; margin: -2px 34px 15px 0; color: var(--premium-muted); font-size: 11.8px; line-height: 1.68; }
.premium-faq-list a { color: var(--premium-teal-dark); }

.premium-reveal-item { transition: opacity .42s ease var(--premium-delay,0ms),transform .42s ease var(--premium-delay,0ms); }
.premium-reveal-pending { opacity: 0; transform: translateY(10px); }

@media (max-width: 980px) {
    .premium-hero { grid-template-columns: 1fr; }
    .premium-hero-panel { max-width: 620px; }
    .premium-plan-grid,.premium-plan-grid-count-2 { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: none; }
    .premium-how-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .premium-trust-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .premium-library-callout { grid-template-columns: 1fr; }
    .premium-library-callout>a { justify-self: start; }
}

@media (max-width: 720px) {
    .premium-hero { gap: 20px; margin-top: 12px; padding: 24px 17px; border-radius: 20px; }
    .premium-hero h1 { margin-top: 7px; font-size: 32px; }
    .premium-hero-copy>p { font-size: 12.2px; line-height: 1.62; }
    .premium-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 17px; }
    .premium-primary-btn,.premium-secondary-btn { min-height: 42px; padding: 0 11px; font-size: 10.8px; text-align: center; }
    .premium-hero-trust { gap: 6px; margin-top: 14px; }
    .premium-hero-trust span { padding: 5px 7px; font-size: 9px; }
    .premium-hero-panel { padding: 11px; border-radius: 17px; }
    .premium-pass-preview { padding: 14px; border-radius: 13px; }
    .premium-pass-preview strong { font-size: 34px; }
    .premium-scope-grid div { padding: 10px 11px; }
    .premium-scope-grid strong { font-size: 19px; }
    .premium-hero-panel>p { font-size: 9.5px; }

    .premium-active-pass,.premium-pass-muted { align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px; border-radius: 15px; }
    .premium-active-pass>a,.premium-pass-muted>a { width: 100%; }
    .premium-section,.premium-library-callout,.premium-trust-section { margin-top: 34px; }
    .premium-section-heading { margin-bottom: 13px; }
    .premium-section-heading h2,.premium-faq h2 { font-size: 27px; }
    .premium-section-heading p,.premium-library-callout p,.premium-faq-intro p { font-size: 11.3px; line-height: 1.58; }

    .premium-plan-grid,.premium-plan-grid-count-1,.premium-plan-grid-count-2 { grid-template-columns: 1fr; max-width: none; }
    .premium-plan-card { padding: 17px; border-radius: 17px; }
    .premium-plan-card h3 { font-size: 21px; }
    .premium-plan-card>p { min-height: 0; }
    .premium-plan-price { margin-top: 15px; }
    .premium-plan-price strong { font-size: 27px; }
    .premium-plan-card ul { margin-bottom: 16px; }

    .premium-comparison-section { margin-top: 30px; }
    .premium-comparison-table { min-width: 560px; font-size: 10.5px; }
    .premium-comparison-table th,.premium-comparison-table td { padding: 12px; }

    .premium-how-grid,.premium-trust-grid { grid-template-columns: 1fr; gap: 8px; }
    .premium-how-grid article,.premium-trust-grid article { padding: 14px; border-radius: 14px; }
    .premium-how-grid h3,.premium-trust-grid h3 { font-size: 14px; }
    .premium-how-grid p,.premium-trust-grid p { font-size: 10.5px; }

    .premium-library-callout { gap: 16px; padding: 20px 17px; border-radius: 18px; }
    .premium-library-callout h2 { font-size: 25px; }
    .premium-library-callout>a { width: 100%; }
    .premium-policy-links { gap: 6px; }
    .premium-policy-links a { flex: 1 1 auto; justify-content: center; }

    .premium-faq { grid-template-columns: 1fr; gap: 14px; margin-top: 38px; margin-bottom: 50px; }
    .premium-faq-list summary { padding: 13px 32px 13px 0; font-size: 11.8px; }
    .premium-faq-list p { margin-right: 0; font-size: 11px; }
}

@media (max-width: 390px) {
    .premium-hero-actions { grid-template-columns: 1fr; }
    .premium-hero h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .premium-page * { scroll-behavior: auto !important; }
    .premium-reveal-item { transition: none; }
    .premium-reveal-pending { opacity: 1; transform: none; }
}


/* === MERGED: jufbook-minimal-chrome.css === */
/*
 * JUFbook public chrome — research-led editorial minimal system
 * Authority for the standard public header/footer. Loaded after legacy/page CSS.
 * Direction: warm paper canvas, ink text, one rust action accent, hairline structure,
 * restrained elevation, compact footer. No decorative gradients or dark chrome.
 */

body.juf-minimal-chrome .juf-header-v24 {
    padding: 6px 0 !important;
    background: var(--bg-cream) !important;
    border-bottom: 1px solid var(--juf-tan) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* The staff shortcut also appears on light public headers. */
body.juf-minimal-chrome .juf-admin-link-v24{
    background:#ECEAE6;
    border-color:#D9D6D0;
    color:#3B4256!important;
}

body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
    min-height: 58px;
    grid-template-columns: minmax(126px, 166px) 1fr;
    gap: 28px;
}

body.juf-minimal-chrome .juf-brand-wordmark-v24 {
    width: 128px;
    height: 42px;
}

body.juf-minimal-chrome .juf-nav-v24 { gap: 22px; }
body.juf-minimal-chrome .juf-nav-primary-v24 { gap: 2px; }
body.juf-minimal-chrome .juf-nav-actions-v24 { gap: 8px; }

body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24 {
    min-height: 38px;
    padding: 7px 11px;
    border-radius: 0;
    background: transparent !important;
    color: var(--juf-ink-soft) !important;
    font-family: var(--font-ui) !important;
    font-size: 13.5px;
    font-weight: 600;
}

body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24:hover,
body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24:focus-visible {
    color: var(--accent-rust) !important;
    background: transparent !important;
}

body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24.is-active {
    color: var(--text-main) !important;
    background: transparent !important;
}

body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24.is-active::after {
    display: block !important;
    left: 50%;
    bottom: 3px;
    width: 18px;
    height: 2px;
    background: var(--accent-rust) !important;
}

body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24 {
    min-height: 36px;
    margin-inline: 2px;
    padding-inline: 13px;
    border: 1px solid var(--juf-border) !important;
    border-radius: 999px;
    background: transparent !important;
    color: var(--juf-ink-soft) !important;
}

body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24:hover,
body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24:focus-visible,
body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24.is-active {
    border-color: var(--accent-rust) !important;
    background: transparent !important;
    color: var(--accent-rust) !important;
}

body.juf-minimal-chrome .juf-header-icon-btn-v24,
body.juf-minimal-chrome .juf-header-logout-v24 button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--juf-border) !important;
    background: var(--juf-surface-paper) !important;
    color: var(--juf-ink-soft) !important;
    box-shadow: none !important;
}

body.juf-minimal-chrome .juf-header-icon-btn-v24:hover,
body.juf-minimal-chrome .juf-header-icon-btn-v24:focus-visible,
body.juf-minimal-chrome .juf-header-logout-v24 button:hover,
body.juf-minimal-chrome .juf-header-logout-v24 button:focus-visible {
    border-color: var(--accent-rust) !important;
    background: var(--juf-surface-paper) !important;
    color: var(--accent-rust) !important;
    transform: none !important;
}

body.juf-minimal-chrome .juf-login-btn-v24 {
    min-height: 40px;
    padding-inline: 17px;
    border: 1px solid var(--accent-rust);
    background: var(--accent-rust) !important;
    color: var(--on-accent, #F6F5F2) !important;
    box-shadow: none !important;
}

body.juf-minimal-chrome .juf-login-btn-v24:hover,
body.juf-minimal-chrome .juf-login-btn-v24:focus-visible {
    border-color: var(--juf-rust-hover);
    background: var(--juf-rust-hover) !important;
}

body.juf-minimal-chrome .juf-user-chip-v24 {
    min-height: 40px;
    border-color: var(--juf-border) !important;
    background: var(--juf-surface-paper) !important;
    color: var(--juf-ink-soft) !important;
}
body.juf-minimal-chrome .juf-user-chip-v24:hover,
body.juf-minimal-chrome .juf-user-chip-v24:focus-visible,
body.juf-minimal-chrome .juf-user-chip-v24.is-active {
    border-color: var(--accent-rust) !important;
    background: var(--juf-surface-paper) !important;
}
body.juf-minimal-chrome .juf-user-avatar-v24 {
    background: var(--juf-surface-muted) !important;
    color: var(--juf-ink-soft) !important;
}
body.juf-minimal-chrome .juf-user-copy-v24 small { color: var(--text-muted) !important; }
body.juf-minimal-chrome .juf-user-copy-v24 strong { color: var(--juf-ink-soft) !important; }

body.juf-minimal-chrome .juf-menu-v24 {
    border: 1px solid var(--juf-border) !important;
    background: var(--juf-surface-paper) !important;
    box-shadow: none !important;
}
body.juf-minimal-chrome .juf-menu-v24 span { background: var(--juf-ink-soft) !important; }

/* Compact editorial footer: flat paper surface + hairline, no gradient or decorative flare. */
body.juf-minimal-chrome .juf-footer-essential-v31 {
    margin-top: 46px !important;
    padding: 24px 0 12px !important;
    overflow: visible;
    background: var(--juf-light-surface) !important;
    color: var(--text-muted) !important;
    border-top: 1px solid var(--juf-tan) !important;
}
body.juf-minimal-chrome .juf-footer-essential-v31::before { display: none !important; }

body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-top-v31 {
    grid-template-columns: minmax(300px, .95fr) minmax(0, 1.25fr) !important;
    align-items: center !important;
    gap: clamp(28px, 5vw, 68px) !important;
    padding-bottom: 16px !important;
}

body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-brand-v31 {
    gap: 16px;
}
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-logo-v24 img {
    width: 118px !important;
    max-height: 48px !important;
}
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-kicker-v24 {
    margin-bottom: 3px !important;
    color: var(--juf-ink-soft) !important;
    font-family: var(--font-heading) !important;
    font-size: 14px !important;
    font-weight: 600;
}
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-tagline-v24 {
    max-width: 330px !important;
    color: var(--text-muted) !important;
    font-family: var(--font-ui) !important;
    font-size: 11.5px !important;
    line-height: 1.55 !important;
}

body.juf-minimal-chrome .juf-footer-essential-links-v31 {
    gap: 6px 18px;
}
body.juf-minimal-chrome .juf-footer-essential-links-v31 a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    color: var(--text-muted) !important;
    font: 600 11.5px/1.4 var(--font-ui) !important;
}
body.juf-minimal-chrome .juf-footer-essential-links-v31 a:hover,
body.juf-minimal-chrome .juf-footer-essential-links-v31 a:focus-visible {
    color: var(--accent-rust) !important;
}

body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-bottom-v31 {
    padding-top: 10px !important;
    border-top: 1px solid var(--juf-tan) !important;
}
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-bottom-v31 p,
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-socials-v24 a {
    color: var(--text-muted) !important;
    font-family: var(--font-ui) !important;
    font-size: 10.5px !important;
}
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-socials-v24 { gap: 12px; }
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-socials-v24 a:hover,
body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-socials-v24 a:focus-visible {
    color: var(--accent-rust) !important;
}

@media (max-width: 1100px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        grid-template-columns: minmax(112px, 145px) 1fr;
        gap: 14px;
    }
    body.juf-minimal-chrome .juf-brand-wordmark-v24 { width: 116px; }
    body.juf-minimal-chrome .juf-nav-v24 { gap: 10px; }
    body.juf-minimal-chrome .juf-nav-primary-v24 .juf-nav-link-v24 {
        padding-inline: 8px;
        font-size: 13px;
    }
}

@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 { min-height: 50px; }
    body.juf-minimal-chrome .juf-menu-v24 {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
    body.juf-minimal-chrome .juf-nav-v24 {
        top: calc(100% + 1px);
        padding: 12px;
        border: 1px solid var(--juf-tan) !important;
        border-radius: 14px;
        background: var(--juf-surface-paper) !important;
        box-shadow: 0 16px 36px rgba(40, 46, 55, .08) !important;
    }
    body.juf-minimal-chrome .juf-nav-primary-v24 {
        padding-bottom: 8px;
        border-bottom-color: var(--juf-tan) !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24,
    body.juf-minimal-chrome .juf-header-icon-btn-v24,
    body.juf-minimal-chrome .juf-admin-link-v24,
    body.juf-minimal-chrome .juf-user-chip-v24,
    body.juf-minimal-chrome .juf-header-logout-v24 button {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding: 10px 11px;
        border-radius: 8px;
        border-color: transparent !important;
        background: transparent !important;
        color: var(--juf-ink-soft) !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24:hover,
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24:focus-visible,
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24.is-active,
    body.juf-minimal-chrome .juf-header-icon-btn-v24:hover,
    body.juf-minimal-chrome .juf-header-icon-btn-v24:focus-visible,
    body.juf-minimal-chrome .juf-user-chip-v24:hover,
    body.juf-minimal-chrome .juf-user-chip-v24:focus-visible,
    body.juf-minimal-chrome .juf-user-chip-v24.is-active,
    body.juf-minimal-chrome .juf-header-logout-v24 button:hover,
    body.juf-minimal-chrome .juf-header-logout-v24 button:focus-visible {
        background: var(--juf-light-surface) !important;
        color: var(--accent-rust) !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24 {
        border: 1px solid var(--juf-border) !important;
        background: transparent !important;
    }
    body.juf-minimal-chrome .juf-login-btn-v24 {
        width: 100%;
        min-height: 44px;
        margin-top: 4px;
        justify-content: center;
        border-radius: 8px;
        background: var(--accent-rust) !important;
        color: var(--on-accent, #F6F5F2) !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24.is-active::after { display: none !important; }

    body.juf-minimal-chrome .juf-footer-essential-v31 {
        padding: 21px 0 11px !important;
    }
    body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-top-v31 {
        gap: 14px !important;
        padding-bottom: 14px !important;
    }
}

@media (max-width: 640px) {
    body.juf-minimal-chrome .juf-header-v24 .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    body.juf-minimal-chrome .juf-brand-symbol-v24 {
        width: 34px;
        height: 40px;
    }
    body.juf-minimal-chrome .juf-footer-essential-v31 {
        margin-top: 34px !important;
        padding: 18px 0 10px !important;
    }
    body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-brand-v31 {
        align-items: flex-start;
        gap: 12px;
    }
    body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-logo-v24 img {
        width: 96px !important;
        max-height: 40px !important;
    }
    body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-kicker-v24 { font-size: 13px !important; }
    body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-tagline-v24 { font-size: 11px !important; }
    body.juf-minimal-chrome .juf-footer-essential-links-v31 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 12px;
        width: 100%;
    }
    body.juf-minimal-chrome .juf-footer-essential-links-v31 a {
        min-height: 34px;
        white-space: normal;
    }
    body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-bottom-v31 {
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.juf-minimal-chrome .juf-header-v24 *,
    body.juf-minimal-chrome .juf-footer-v24 * {
        transition: none !important;
    }
}


/* 2026-09-16 — Login CTA aligned to the flat canonical interaction system. */
body.juf-minimal-chrome .juf-login-btn-v24 {
    min-height: 44px !important;
    padding-inline: 22px !important;
    border-radius: 999px !important;
    border: 1px solid var(--accent-rust) !important;
    background: var(--accent-rust) !important;
    color: var(--on-accent, #F6F5F2) !important;
    box-shadow: none !important;
    font: 700 13px/1 var(--font-ui-system) !important;
    letter-spacing: .005em !important;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease !important;
}
body.juf-minimal-chrome .juf-login-btn-v24:hover,
body.juf-minimal-chrome .juf-login-btn-v24:focus-visible {
    border-color: var(--accent-rust) !important;
    background: var(--accent-rust) !important;
    color: var(--on-accent, #F6F5F2) !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}
body.juf-minimal-chrome .juf-login-btn-v24 span[aria-hidden="true"] {
    display: inline-block !important;
    margin-left: 2px !important;
}
@media (max-width: 900px) {
    body.juf-minimal-chrome .juf-login-btn-v24 {
        min-height: 42px !important;
        padding-inline: 18px !important;
    }
}


/* Build 116 — Phase 19 footer responsive baseline. */
@media (max-width:640px) {
  body.juf-minimal-chrome .juf-footer-essential-v31{margin-top:30px!important;padding:17px 0 10px!important}
  body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-top-v31{gap:12px!important;padding-bottom:12px!important}
  body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-tagline-v24{font-size:11.5px!important;line-height:1.5!important}
  body.juf-minimal-chrome .juf-footer-essential-links-v31 a{min-height:36px;font-size:11.5px!important}
  body.juf-minimal-chrome .juf-footer-essential-v31 .juf-footer-essential-bottom-v31 p{font-size:10px!important;line-height:1.45!important}
}


/* ==========================================================================
   BUILD 368 — SMART SCROLL-HIDE / SCROLL-REVEAL HEADER (HEADROOM BEHAVIOR)
   1. On `read.php` (`body.reader-page`), the global header stays `position: relative`
      so the dedicated `.reader-toolbar` owns the top edge.
   2. On all other pages (`index.php` Home, `books.php` Boi, `authors.php` /
      `author.php` Jiboni, `audiobooks.php`, `writings.php`, `profile.php`, etc.),
      the header is `position: sticky; top: 0` and automatically slides up out
      of sight (`.is-header-scroll-hidden`) when scrolling down, then immediately
      slides back into view the moment the user scrolls up even slightly!
   ========================================================================== */
:root {
    --juf-smart-header-offset: 68px;
}
html body.juf-header-hidden {
    --juf-smart-header-offset: 0px;
}

html body:not(.reader-page) .juf-header-modern,
html body:not(.reader-page) .juf-header-v24,
html body.juf-minimal-chrome:not(.reader-page) .juf-header-modern,
html body.juf-minimal-chrome:not(.reader-page) .juf-header-v24,
html body.juf-homepage .juf-header-v24 {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    transform: translate3d(0, 0, 0);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1) !important;
    will-change: transform;
}

html body:not(.reader-page) .juf-header-modern.is-header-scroll-hidden,
html body:not(.reader-page) .juf-header-v24.is-header-scroll-hidden,
html body.juf-minimal-chrome:not(.reader-page) .juf-header-modern.is-header-scroll-hidden,
html body.juf-minimal-chrome:not(.reader-page) .juf-header-v24.is-header-scroll-hidden,
html body.juf-homepage .juf-header-v24.is-header-scroll-hidden {
    transform: translate3d(0, -104%, 0) !important;
    pointer-events: none !important;
}

/* Keep sticky sub-navs and sidebars smoothly synchronized with header visibility */
html body .person-nav {
    top: var(--juf-smart-header-offset, 0px) !important;
    transition: top 0.42s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
html body .person-reader-sidebar {
    top: calc(var(--juf-smart-header-offset, 0px) + var(--person-nav-height, 54px) + 18px) !important;
    transition: top 0.42s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
html body .profile-overview-side,
html body .checkout-summary {
    top: calc(var(--juf-smart-header-offset, 0px) + 18px) !important;
    transition: top 0.42s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
html body .profile-hub-section {
    scroll-margin-top: calc(var(--juf-smart-header-offset, 0px) + 24px) !important;
}


/* === MERGED: jufbook-2d-minimal-system.css === */
/*
 * JUFbook 2D Minimal System — authoritative public visual layer.
 * Loaded last after legacy/page styles. It preserves content artwork (uploaded
 * covers, portraits and auth illustrations) while standardising every UI
 * surface to the approved warm-paper / premium black-white / rust system.
 */
:root {
    --bg: #F6F5F2;
    --surface: #FFFFFF;
    --border: #D9D6D0;
    --text-primary: #282E37;
    --text-muted: #5B6376;
    --accent: #3B4256;
    --accent-hover: #2C3243;
    --accent-on: #F6F5F2;
    --bg-cream: var(--bg) !important;
    --text-main: var(--text-primary) !important;
    --juf-ink-soft: var(--text-primary) !important;
    --juf-border: var(--border) !important;
    --juf-tan: var(--border) !important;
    --juf-light-surface: var(--bg) !important;
    --juf-surface-white: var(--surface) !important;
    --juf-logo-black: #2C3243;
    --juf-logo-white: #FFFFFF;
    --juf-shadow-rest: 0 6px 18px rgba(40, 46, 55, .055);
    --juf-shadow-hover: 0 10px 24px rgba(40, 46, 55, .075);
    --juf-shadow-modal: 0 18px 42px rgba(40, 46, 55, .10);
    --juf-radius-sm: 8px;
    --juf-radius-md: 12px;
    --juf-radius-lg: 18px;
    --juf-radius-pill: 999px;
}

html { color-scheme: light; background: var(--bg-cream); }
body.juf-2d-minimal {
    background: var(--bg-cream) !important;
    color: var(--text-main) !important;
    font-family: var(--font-reading, 'SolaimanLipi', serif);
    text-rendering: optimizeLegibility;
}
body.juf-2d-minimal:not(.person-profile-page):not(.reader-page) :where(h1,h2,h3,.section-title,.book-title,.author-name,.juf-jacket-title,.hero-slide-title,.juf-catalog-title,.premium-book-title) {
    color: var(--text-main) !important;
    font-family: var(--font-heading) !important;
}
body.juf-2d-minimal:not(.person-profile-page) :where(h4,h5,h6,label,button,input,select,textarea,nav,.meta,.eyebrow,.kicker,.badge,.pill) {
    font-family: var(--font-ui) !important;
}
body.juf-2d-minimal :where(p,li) {
    color: var(--text-main);
}
body.juf-2d-minimal :where(small,.muted,.meta,.subtitle,.description,.caption,time) {
    color: var(--text-muted);
}
body.juf-2d-minimal a { text-underline-offset: 3px; }
body.juf-2d-minimal :where(.read-more,.view-all,.section-link,.juf-section-link,a[data-brand-action]) {
    color: var(--accent-rust) !important;
}

/* Flat page/section surfaces. Content media is deliberately excluded. */
body.juf-2d-minimal :where(
    .juf-books-hero,.juf-search-hero,.category-index-hero,.category-archive-hero,
    .premium-hero,.juf-authors-hero,.juf-authors-hero-stage,.juf-featured-author-stage,
    .juf-author-new-book-stage,.audio-hub-hero,.audio-hub-hero-v2,.profile-hub-hero,
    .home-reading-gateway,.newsletter-premium-wrapper,.newsletter-luxury,
    .reading-room-block,.reader-settings-panel,.reader-sidebar,.reader-topbar,
    .juf-search-empty,.juf-search-panel,.juf-account-card,.profile-section,
    .details-panel,.book-details-card,.author-bio-card,.review-form-card
) {
    background-color: var(--juf-light-surface) !important;
    background-image: none !important;
    border-color: var(--juf-border) !important;
    box-shadow: none !important;
}

/* White editorial cards. Avoid touching image/cover/portrait canvases. */
body.juf-2d-minimal :where(
    .testimonial-card-white,.review-card,.review-item,.juf-review-card,
    .pastel-card:not(.home-author-discovery-card):not(.juf-author-category-card),.author-card,.author-info-card,.featured-author-copy,
    .audio-list-card,.audio-track-card,.audio-dark-card,.audio-collection-card,
    .search-result-card,.juf-search-result,.category-card,.category-item,
    .premium-plan-card,.premium-feature-card,.premium-book-card,
    .box-panel:not(.admin-panel),.content-card,.info-card,.stat-card,
    .modal-content,.dialog-card,.dropdown-menu,.juf-popover,
    .juf-reader-card,.reader-card,.account-panel,.profile-card
) {
    background-color: var(--juf-surface-panel) !important;
    background-image: none !important;
    border: 1px solid var(--juf-border) !important;
    box-shadow: var(--juf-shadow-rest) !important;
    color: var(--text-main) !important;
}
body.juf-2d-minimal :where(
    .testimonial-card-white,.review-card,.review-item,.juf-review-card,
    .pastel-card,.author-card,.audio-list-card,.audio-track-card,
    .search-result-card,.category-card,.premium-plan-card,.premium-book-card
):hover {
    box-shadow: var(--juf-shadow-hover) !important;
}

/* Homepage editorial features: fixed, flat 2D colour blocks. */
body.juf-2d-minimal.juf-homepage :where(.hero-cinematic-stage,.hero-stage,.authors-feature-card,.author-feature-banner) {
    background-color: var(--juf-light-surface) !important;
    background-image: none !important;
    border-color: var(--juf-border) !important;
}
body.juf-2d-minimal.juf-homepage :where(.genre-graphic-card:not(.home-book-category-card),.genre-dark-box:not(.home-book-category-card)),
body.juf-2d-minimal :where(.genre-graphic-card:not(.home-book-category-card),.genre-dark-box:not(.home-book-category-card)) {
    background: var(--surface, #ECEAE6) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--juf-border) !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(.genre-graphic-card:not(.home-book-category-card),.genre-dark-box:not(.home-book-category-card)) :where(h3,h4,strong,.genre-title) {
    color: var(--text-main) !important;
}
body.juf-2d-minimal :where(.genre-graphic-card,.genre-dark-box) :where(p,small,span:not(.genre-dot):not(.genre-count)) {
    color: var(--juf-tan) !important;
}
body.juf-2d-minimal :where(.genre-graphic-card,.genre-dark-box)::before,
body.juf-2d-minimal :where(.genre-graphic-card,.genre-dark-box)::after {
    opacity: .16 !important;
}

/* Forms and utilities: black/white/warm neutral, rust only for primary action. */
body.juf-2d-minimal :where(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {
    background: var(--juf-surface-panel) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--juf-border) !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(input,select,textarea):focus {
    border-color: var(--accent-rust) !important;
    outline: 2px solid color-mix(in srgb, var(--accent-rust) 18%, transparent) !important;
    outline-offset: 1px;
}
body.juf-2d-minimal :where(.btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,.newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,.premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32) {
    background: var(--accent-rust) !important;
    background-image: none !important;
    border-color: var(--accent-rust) !important;
    color: var(--on-accent, #F6F5F2) !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(.btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,.newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,.premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32):hover {
    background: var(--juf-rust-hover) !important;
    border-color: var(--juf-rust-hover) !important;
    transform: none !important;
}
body.juf-2d-minimal :where(.btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn) {
    background: var(--juf-surface-panel) !important;
    border: 1px solid var(--juf-border) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(.btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn):hover {
    background: var(--juf-surface-panel) !important;
    border-color: var(--accent-rust) !important;
    color: var(--accent-rust) !important;
    transform: none !important;
}

/* Status colour remains functional and deliberately limited. */
body.juf-2d-minimal :where(.badge-premium,.premium-badge,.tag-premium) { background: color-mix(in srgb,var(--accent-rust) 10%,var(--juf-surface-white)) !important; color: var(--accent-rust) !important; border-color: color-mix(in srgb,var(--accent-rust) 28%,var(--juf-border)) !important; }
body.juf-2d-minimal :where(.badge-success,.status-published,.is-success) { color: var(--juf-success-green) !important; }
body.juf-2d-minimal :where(.badge-warning,.status-pending) { color: var(--status-warning) !important; }
body.juf-2d-minimal :where(.badge-danger,.status-rejected,.is-error) { color: var(--status-danger) !important; }

/* Book objects are the deliberate depth exception to the flat 2D interface.
   Keep covers physically readable as books, while the surrounding UI stays flat. */
body.juf-2d-minimal :where(.showcase-card-item,.juf-catalog-cover-link,.premium-book-cover,.juf-search-book) > .juf-book-jacket {
    border: 1px solid var(--juf-border) !important;
    border-left-width: 3px !important;
    border-radius: 5px 7px 7px 4px !important;
    box-shadow: var(--juf-shadow-hover) !important;
    transform: translateZ(0);
    transition: transform .18s ease, box-shadow .18s ease !important;
}
body.juf-2d-minimal :where(.showcase-card-item,.juf-catalog-cover-link,.premium-book-cover) > .juf-book-jacket::before {
    content: "" !important;
    position: absolute !important;
    z-index: 7 !important;
    pointer-events: none !important;
    top: 4px !important;
    right: -1px !important;
    bottom: 5px !important;
    width: 3px !important;
    border-radius: 0 5px 5px 0 !important;
    background: var(--juf-tan) !important;
    opacity: .58 !important;
}
body.juf-2d-minimal .juf-book-jacket-generated {
    box-shadow: var(--juf-shadow-hover) !important;
}
body.juf-2d-minimal .juf-book-jacket-generated::after,
body.juf-2d-minimal .juf-jacket-shine { opacity: .10 !important; }
body.juf-2d-minimal .juf-cover-paper-grain { opacity: .06 !important; }
body.juf-2d-minimal .juf-book-jacket-generated .juf-jacket-spine {
    display: block !important;
    background: color-mix(in srgb,var(--text-main) 22%,transparent) !important;
}
body.juf-2d-minimal .showcase-card-item:hover > .juf-book-jacket,
body.juf-2d-minimal .juf-catalog-book-card:hover .juf-catalog-cover-link > .juf-book-jacket,
body.juf-2d-minimal .premium-book-card:hover .premium-book-cover > .juf-book-jacket {
    transform: translateY(-3px) !important;
    box-shadow: var(--juf-shadow-modal) !important;
}
body.juf-2d-minimal .juf-search-book > .juf-book-jacket {
    border-left-width: 2px !important;
    box-shadow: var(--juf-shadow-rest) !important;
}

/* Authors: real/uploaded portrait stays intact; surrounding medallion is monochrome editorial. */
body.juf-2d-minimal :where(.juf-author-art-avatar,.author-portrait-frame,.juf-author-hero-portrait) {
    background-color: var(--juf-surface-panel) !important;
    border-color: var(--juf-border) !important;
    box-shadow: none !important;
}
body.juf-2d-minimal .author-vector-bg { opacity: .05 !important; }

/* Audiobook player: premium black & white, not brown/gradient. */
body.juf-2d-minimal.audiobook-page :where(.audio-player-panel,.audio-player-shell,.audio-sticky-player) {
    background: var(--surface, #ECEAE6) !important;
    background-image: none !important;
    color: var(--text-main) !important;
    border-color: var(--juf-border) !important;
    box-shadow: none !important;
}
body.juf-2d-minimal.audiobook-page :where(.audio-player-panel,.audio-player-shell,.audio-sticky-player) :where(h2,h3,strong) { color: var(--text-main) !important; }
body.juf-2d-minimal.audiobook-page :where(.audio-player-panel,.audio-player-shell,.audio-sticky-player) :where(p,small,span) { color: var(--juf-tan); }
body.juf-2d-minimal.audiobook-page .audio-player-art { background: var(--juf-surface-panel) !important; }

/* Reader remains paper-first; dark reading theme still works when explicitly chosen. */
body.juf-2d-minimal.reader-page { background: var(--reader-bg, #F6F5F2) !important; color: var(--reader-text, #282E37) !important; }
body.juf-2d-minimal.reader-page :where(.reader-main,.reader-content,.reader-article) { background: var(--reader-bg, #F6F5F2) !important; color: var(--reader-text, #282E37) !important; }
body.juf-2d-minimal.reader-page .reader-content { font-family: var(--reader-font-family,var(--font-reader)) !important; }

/* Login/auth and checkout: preserve supplied illustration, simplify every UI surface around it. */
body.juf-2d-minimal :where(.reader-auth-form-side-v27,.juf-checkout-form-v32,.juf-checkout-summary-v32,.checkout-form-panel) {
    background: var(--juf-surface-panel) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(.reader-auth-form-side-v27,.juf-checkout-form-v32,.juf-checkout-summary-v32) :where(h1,h2,h3,strong,label) { color: var(--text-main) !important; }
body.juf-2d-minimal :where(.reader-auth-form-side-v27,.juf-checkout-form-v32,.juf-checkout-summary-v32) :where(p,small) { color: var(--text-muted) !important; }
body.juf-2d-minimal .juf-checkout-page-v32 { background: var(--bg-cream) !important; background-image: none !important; }
body.juf-2d-minimal .juf-checkout-visual-v32::after { background: rgba(40, 46, 55, .08) !important; }
body.juf-2d-minimal .juf-checkout-plan-art-v32 { background: var(--text-main) !important; }

/* Animation is retained, but interface motion stays flat and restrained. */
body.juf-2d-minimal :where(button,a,.card,.pastel-card,.testimonial-card-white,.genre-dark-box,.genre-graphic-card) {
    transition-duration: .18s !important;
}
body.juf-2d-minimal :where(button,a,.card,.pastel-card,.testimonial-card-white,.genre-dark-box,.genre-graphic-card):hover {
    filter: none !important;
}

@media (max-width: 768px) {
    body.juf-2d-minimal :where(.testimonial-card-white,.review-card,.pastel-card,.audio-list-card,.search-result-card,.premium-book-card) {
        box-shadow: none !important;
    }
}

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


/* ==========================================================================
   High-contrast monochrome text authority — 2026-09-14
   User rule: light/white surfaces use premium black text; dark/black surfaces
   use white text. Hierarchy is expressed with size/weight/opacity, not pale
   brown, rust, blue or grey text. Brand rust remains a surface/action colour.
   ========================================================================== */
:root {
    --juf-text-black: #2C3243;
    --juf-text-white: #FFFFFF;
}

/* Light surfaces: all readable copy is black (Reader & Biography pages use semantic hierarchy). */
body.juf-2d-minimal:not(.reader-page):not(.person-profile-page),
body.juf-2d-minimal:not(.reader-page):not(.person-profile-page) :where(
    h1,h2,h3,h4,h5,h6,p,small,strong,em,b,i,label,legend,summary,
    .section-title,.page-section-title,.book-title,.author-name,
    .meta,.muted,.subtitle,.description,.caption,.eyebrow,.kicker,
    .section-kicker,.section-overline,.juf-section-overline,
    .juf-home-section-kicker,.juf-catalog-kicker,.juf-search-group-head span,
    .juf-catalog-author,.juf-catalog-card-foot span,.juf-catalog-card-foot a,
    .juf-author-discovery-head p,.juf-author-genre-card>span,
    .premium-renewal-note,.premium-hero-proof span,
    .audio-row-author,.audio-row-voice,.audio-row-stats,
    .category-index-card p,.category-index-card .category-card-count,
    .book-details-info>p,.book-details-meta>span,
    .approved-review-empty,.juf-summary-toggle,
    .checkout-product-type,.checkout-status-link,
    .juf-public-empty-state,.juf-public-empty-state>.juf-public-empty-icon,
    .juf-active-filter-note,.juf-active-filter-note a,
    .read-more,.view-all,.section-link,.juf-section-link,a[data-brand-action]
) {
    color: var(--juf-text-black) !important;
}

/* Keep hierarchy without introducing low-contrast colours. */
body.juf-2d-minimal :where(
    p,small,.meta,.muted,.subtitle,.description,.caption,time,
    .juf-catalog-author,.audio-row-author,.audio-row-voice,.audio-row-stats,
    .category-index-card p,.book-details-info>p,.approved-review-empty
) {
    opacity: 1;
}
body.juf-2d-minimal :where(.eyebrow,.kicker,.section-kicker,.section-overline,.juf-section-overline,.juf-home-section-kicker) {
    opacity: 1;
}

/* Links on light surfaces stay black; distinction comes from underline/weight. */
body.juf-2d-minimal a:not(.btn-primary):not(.primary-btn):not(.cta-primary):not(.juf-primary-btn):not(.newsletter-luxury-btn):not(.newsletter-premium-btn):not(.search-btn):not(.juf-search-submit):not(.premium-cta):not(.reader-auth-submit-v27):not(.juf-checkout-pay-v32) {
    color: var(--juf-text-black);
}
body.juf-2d-minimal :where(.read-more,.view-all,.section-link,.juf-section-link,a[data-brand-action]) {
    text-decoration-color: currentColor !important;
}

/* Primary/solid dark actions: white text. */
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,
    .premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32,
    .audio-hub-listen-btn,.juf-catalog-empty a:first-child,
    .juf-public-empty-state>div:last-child>a:first-child
),
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,
    .premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32,
    .audio-hub-listen-btn,.juf-catalog-empty a:first-child,
    .juf-public-empty-state>div:last-child>a:first-child
) :where(span,strong,small,svg) {
    color: var(--juf-text-white) !important;
}

/* Secondary actions remain black on white even on hover. */
body.juf-2d-minimal :where(.btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn),
body.juf-2d-minimal :where(.btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn):hover {
    color: var(--juf-text-black) !important;
}

/* Dark content surfaces: every text descendant is white. */
body.juf-2d-minimal :where(
    .genre-graphic-card,.genre-dark-box,
    .juf-book-discovery-card,.juf-book-discovery-reset.is-active,.juf-book-discovery-reset:hover,.juf-book-discovery-reset:focus-visible,
    .audio-player-panel,.audio-player-shell,.audio-sticky-player,
    .juf-search-audio-grid>a,.juf-player-bar,.juf-player-shell,
    .profile-premium-pass-v26,.juf-checkout-plan-art-v32
),
body.juf-2d-minimal :where(
    .genre-graphic-card,.genre-dark-box,
    .juf-book-discovery-card,.juf-book-discovery-reset.is-active,.juf-book-discovery-reset:hover,.juf-book-discovery-reset:focus-visible,
    .audio-player-panel,.audio-player-shell,.audio-sticky-player,
    .juf-search-audio-grid>a,.juf-player-bar,.juf-player-shell,
    .profile-premium-pass-v26,.juf-checkout-plan-art-v32
) :where(h1,h2,h3,h4,h5,h6,p,small,strong,span,em,a,label,button) {
    color: var(--juf-text-white) !important;
    opacity: 1;
}

/* Light pills/statuses use black text; colour may remain in the background/border. */
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
) {
    color: var(--juf-text-black) !important;
}

/* Inputs/placeholders: black copy on white; placeholders are black at reduced opacity. */
body.juf-2d-minimal :where(input,select,textarea) { color: var(--juf-text-black) !important; }
body.juf-2d-minimal :where(input,textarea)::placeholder { color: var(--muted) !important; opacity: 1; }

/* ========================================================================== 
   Homepage book-grid normalization — 2026-09-15
   Keep Books Showcase + New Releases on one 5-column desktop rhythm.
   New Releases is a 5 x 2 shelf (10 books) and all homepage covers use
   the same 2:3 book proportion so one section never looks oversized.
   ========================================================================== */
body.juf-2d-minimal.juf-homepage .home-new-releases .home-new-release-grid,
body.juf-2d-minimal.juf-homepage #showcase .grid-5-col {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 26px 20px !important;
    align-items: start;
}

body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .showcase-card-item {
    min-width: 0;
    display: flex !important;
    flex-direction: column;
}

body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .showcase-card-item > .juf-book-jacket {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2 / 3 !important;
    border-radius: 8px !important;
}

body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .book-under-meta {
    display: grid;
    align-content: start;
    min-height: 70px;
    margin-top: 10px !important;
}

body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .book-under-title {
    min-height: 21px;
    font-size: 14.5px !important;
    line-height: 1.35 !important;
}

body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .book-under-author {
    min-height: 18px;
    margin-top: 2px !important;
    font-size: 11.5px !important;
    line-height: 1.4 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .book-rating-gold {
    margin-top: 4px !important;
}

@media (max-width: 1180px) {
    body.juf-2d-minimal.juf-homepage .home-new-releases .home-new-release-grid,
    body.juf-2d-minimal.juf-homepage #showcase .grid-5-col {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    body.juf-2d-minimal.juf-homepage .home-new-releases .home-new-release-grid,
    body.juf-2d-minimal.juf-homepage #showcase .grid-5-col {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 22px 16px !important;
    }
}

@media (max-width: 620px) {
    body.juf-2d-minimal.juf-homepage .home-new-releases .home-new-release-grid,
    body.juf-2d-minimal.juf-homepage #showcase .grid-5-col {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px 12px !important;
    }
    body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .book-under-meta {
        min-height: 64px;
        margin-top: 8px !important;
    }
    body.juf-2d-minimal.juf-homepage :where(.home-new-releases,#showcase) .book-under-title {
        font-size: 14px !important;
    }
}

/* ========================================================================
   Touch interaction stability
   Touch browsers can synthesize :hover during a tap. Older public card/button
   rules used translate/scale hover lifts, so a tap could move the target a few
   pixels immediately before navigation and feel like a shake. Keep hover lift
   feedback for real hover-capable pointers only; coarse/touch input remains
   spatially stable while preserving color/focus feedback and accessibility.
   ======================================================================== */
@media (hover: none), (pointer: coarse) {
    body.juf-2d-minimal :where(
        .pastel-card,
        .genre-dark-box,
        .author-circle-unit,
        .showcase-card-item,
        .audio-pill-card,
        .home-reading-primary,
        .home-reading-secondary,
        .btn-hero-cinematic-primary,
        .slider-ctrl-btn,
        .author-nav-arrow,
        .btn-primary,
        .primary-btn,
        .cta-primary,
        .juf-primary-btn,
        .btn-secondary,
        .secondary-btn,
        .cta-secondary,
        .juf-secondary-btn,
        .outline-btn,
        .premium-primary-btn,
        .premium-secondary-btn,
        .juf-login-btn-v24,
        .search-submit-btn,
        .audio-primary-play,
        .audio-inline-play,
        .audio-new-play,
        .audio-category-chip,
        .audio-collection-card
    ):is(:hover,:active) {
        transform: none !important;
    }

    /* Entrance reveal remains as a restrained fade on touch; the card itself
       no longer translates/scales after first paint. */
    body.juf-2d-minimal :where(.anim-card,.showcase-card-item) {
        transform: none !important;
    }

    body.juf-2d-minimal .genre-dark-box:hover::before {
        transform: none !important;
    }

    body.juf-2d-minimal .author-circle-unit:hover .author-circle-disc {
        transform: none !important;
    }

    body.juf-2d-minimal :where(
        .showcase-card-item,
        .juf-catalog-cover-link,
        .premium-book-cover,
        .juf-search-book
    ):hover > .juf-book-jacket,
    body.juf-2d-minimal .juf-catalog-book-card:hover .juf-catalog-cover-link > .juf-book-jacket,
    body.juf-2d-minimal .premium-book-card:hover .premium-book-cover > .juf-book-jacket {
        transform: translateZ(0) !important;
    }
}

/* ========================================================================
   Build 272 — Final public scroll-performance authority
   Long Home/Books/Authors pages previously kept many cards and book covers in
   compositor-ready states (`will-change`, 3D transforms and scroll-triggered
   reveal transitions). On Android/coarse pointers that can create dozens of
   GPU layers and repaint work while the user is simply scrolling vertically.

   Desktop hover/motion remains unchanged. Touch/mobile keeps the approved
   visual layout, but removes motion-only compositing that has no value during
   finger scrolling.
   ======================================================================== */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
    body.juf-2d-minimal:not(.reader-page) :where(
        .anim-card,
        .showcase-card-item,
        .pastel-card,
        .audio-pill-card
    ) {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        will-change: auto !important;
    }

    body.juf-2d-minimal:not(.reader-page) :where(
        .juf-book-jacket,
        .hero-slide-item,
        .home-author-discovery-image,
        .juf-author-directory-card,
        .juf-author-directory-avatar
    ) {
        will-change: auto !important;
    }

    /* Static depth/shadow is sufficient on touch. Removing the permanent 3D
       layer from every catalogue cover avoids a large compositor-layer stack. */
    body.juf-2d-minimal:not(.reader-page) :where(
        .showcase-card-item,
        .juf-catalog-cover-link,
        .premium-book-cover,
        .juf-search-book
    ) > .juf-book-jacket {
        transform: none !important;
        backface-visibility: visible !important;
        transition: none !important;
    }

    body.juf-2d-minimal:not(.reader-page) {
        --juf-book-shadow-rest:
            0 11px 18px rgba(40, 46, 55, .13),
            0 4px 8px rgba(40, 46, 55, .075),
            -2px 3px 5px rgba(40, 46, 55, .04),
            inset -1px 0 rgba(255, 255, 255, .20);
        --juf-book-shadow-hover: var(--juf-book-shadow-rest);
    }
}

/* Once a desktop reveal has completed, relinquish compositor hints. Keeping
   `will-change` forever costs memory and can make long pages progressively
   heavier even after all cards are already visible. */
body.juf-2d-minimal .anim-card.in-view {
    will-change: auto !important;
}



/* BUILD 352 — Community Writings & Member Button Contrast Guard */
body.juf-2d-minimal :where(
    .juf-public-writings-cta,
    .juf-writing-reader-write-link,
    .juf-public-writings-tabs a[aria-current="page"],
    .juf-user-writings-status-pills a[aria-current="page"],
    .juf-social-quick-post-btn,
    .juf-home-writings-post-btn,
    .juf-writings-search-bar button,
    .juf-user-writings-search button,
    .juf-social-btn-post,
    .reader-public > a
),
body.juf-2d-minimal :where(
    .juf-public-writings-cta,
    .juf-writing-reader-write-link,
    .juf-public-writings-tabs a[aria-current="page"],
    .juf-user-writings-status-pills a[aria-current="page"],
    .juf-social-quick-post-btn,
    .juf-home-writings-post-btn,
    .juf-writings-search-bar button,
    .juf-user-writings-search button,
    .juf-social-btn-post,
    .reader-public > a
) :where(span, strong, small, svg) {
    color: #FFFFFF !important;
    opacity: 1 !important;
}


/* === MERGED: jufbook-senior-mobile-cleanup.css === */
/*
 * JUFbook Senior Mobile Cleanup — 2026-09-13
 * Final public density/readability layer. Loaded after the canonical 2D system.
 * Uses only approved design tokens; real covers/portraits remain untouched.
 */

/* ---------- Global hierarchy / colour discipline ---------- */
body.juf-2d-minimal .section-overline-label,
body.juf-2d-minimal :where(.premium-eyebrow,.audio-shelf-heading>div>span,.audio-library-heading span) {
  color: var(--accent-rust) !important;
}
body.juf-2d-minimal :where(.section-overline-label,.premium-eyebrow) {
  font-family: var(--font-ui) !important;
  font-weight: 500 !important;
  letter-spacing:normal !important;
  text-transform: none !important;
}
body.juf-2d-minimal :where(.page-section-title,.hero-slide-title,.premium-hero h1) {
  color: var(--text-main) !important;
}
body.juf-2d-minimal :where(.hero-slide-desc,.premium-hero-copy>p,.audio-hub-hero-copy>p,.category-index-hero p) {
  color: var(--text-muted) !important;
}
body.juf-2d-minimal :where(.btn-hero-cinematic-primary,.premium-primary-btn,.audio-inline-play,.juf-author-search-row button,.premium-filter-bar>button,.audio-filter-bar>button) {
  background: var(--accent-rust) !important;
  border-color: var(--accent-rust) !important;
  color: var(--on-accent, #F6F5F2) !important;
  box-shadow: none !important;
}
body.juf-2d-minimal :where(.btn-hero-cinematic-secondary,.premium-secondary-btn) {
  background: var(--juf-surface-panel) !important;
  border: 1px solid var(--juf-border) !important;
  color: var(--text-main) !important;
  box-shadow: none !important;
}

/* ---------- Authors: compact hero, visible portrait, simpler discovery ---------- */
.authors-page .juf-authors-cinematic-hero {
  background: var(--juf-light-surface) !important;
  border-color: var(--juf-border) !important;
  box-shadow: none !important;
}
.authors-page .juf-author-hero-portrait-card {
  background: var(--juf-surface-panel) !important;
  border: 1px solid var(--juf-border) !important;
  box-shadow: var(--juf-shadow-rest) !important;
}
.authors-page .juf-author-hero-visual,
.authors-page .juf-author-hero-portrait-card {
  visibility: visible !important;
}
.authors-page .juf-author-hero-slide.is-active .juf-author-hero-portrait-card {
}
.authors-page .juf-author-discovery-head>p { color: var(--text-muted) !important; }
.authors-page .juf-author-genre-card {
  background: var(--juf-surface-panel) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--juf-border) !important;
  box-shadow: none !important;
}
.authors-page .juf-author-genre-card::after { opacity: .18 !important; }
.authors-page .juf-author-genre-card>span { color: var(--accent-rust) !important; }
.authors-page .juf-author-genre-card strong { color: var(--text-main) !important; }
.authors-page .juf-author-genre-card small { color: var(--text-muted) !important; }
.authors-page .juf-author-filter-more { min-width: 0; }
.authors-page .juf-author-filter-more>summary {
  list-style: none;
  cursor: pointer;
  font: 500 13px/1.35 var(--font-ui-system);
  color: var(--text-main);
}
.authors-page .juf-author-filter-more>summary::-webkit-details-marker { display:none; }
@media (min-width: 641px) {
  .authors-page .juf-author-filter-more>summary { display:none; }
  .authors-page .juf-author-filter-more>.juf-author-filter-row { display:flex !important; }
}

/* ---------- Premium: remove repeated/technical copy from primary hierarchy ---------- */
.premium-page .premium-hero {
  background: var(--juf-light-surface) !important;
  background-image: none !important;
  border-color: var(--juf-border) !important;
  box-shadow: none !important;
}
.premium-page .premium-renewal-note {
  display:inline-flex;
  width:max-content;
  margin: 0 0 14px !important;
  padding: 6px 10px;
  border: 1px solid var(--juf-border);
  border-radius: var(--juf-radius-pill);
  background: var(--juf-surface-panel);
  color: var(--accent-rust) !important;
  font-size: 12px !important;
  font-weight: 500;
  line-height: 1.2 !important;
}
.premium-page .premium-hero-proof { margin-top:18px; padding-top:14px; }
.premium-page .premium-hero-proof span { color:var(--text-muted) !important; }
.premium-page .premium-pass-muted {
  padding: 16px 18px !important;
  background: var(--juf-surface-panel) !important;
  border-color: var(--juf-border) !important;
  border-style: solid !important;
  box-shadow: none !important;
}
.premium-page .premium-pass-muted h2 { font-size: 22px !important; margin: 3px 0 4px !important; }
.premium-page .premium-filter-more { min-width:0; }
.premium-page .premium-filter-more>summary,
.audiobook-page .audio-filter-more>summary {
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:42px;
  padding:0 12px;
  border:1px solid var(--juf-border);
  border-radius:var(--juf-radius-md);
  background:var(--juf-surface-panel);
  color:var(--text-main);
  font:700 12.5px/1 var(--font-ui);
}
.premium-page .premium-filter-more>summary::-webkit-details-marker,
.audiobook-page .audio-filter-more>summary::-webkit-details-marker { display:none; }
.premium-page .premium-filter-more>summary::after,
.audiobook-page .audio-filter-more>summary::after { content:"+"; color:var(--accent-rust); font-size:18px; }
.premium-page .premium-filter-more[open]>summary::after,
.audiobook-page .audio-filter-more[open]>summary::after { content:"−"; }
.premium-page .premium-filter-fields,
.audiobook-page .audio-filter-fields { display:grid; gap:8px; }
@media (min-width: 721px) {
  .premium-page .premium-filter-bar,
  .audiobook-page .audio-filter-bar {
    grid-template-columns:minmax(260px,1fr) 150px auto !important;
  }
  .premium-page .premium-filter-more,
  .audiobook-page .audio-filter-more { grid-column:2; grid-row:1; }
  .premium-page .premium-filter-more[open],
  .audiobook-page .audio-filter-more[open] { grid-column:1/-1; grid-row:2; }
  .premium-page .premium-filter-more[open]>.premium-filter-fields { grid-template-columns:repeat(3,minmax(0,1fr)); padding-top:8px; }
  .audiobook-page .audio-filter-more[open]>.audio-filter-fields { grid-template-columns:repeat(4,minmax(0,1fr)); padding-top:8px; }
  .premium-page .premium-filter-bar>button,
  .audiobook-page .audio-filter-bar>button { grid-column:3; grid-row:1; min-height:42px; }
}
.premium-page .premium-trust-grid article {
  background: var(--juf-surface-panel) !important;
  border:1px solid var(--juf-border);
  box-shadow:none !important;
}

/* ---------- Audiobook: one clean search row + collapsible advanced filters ---------- */
.audiobook-page .audio-hub-hero-v2 {
  background:var(--juf-light-surface) !important;
  background-image:none !important;
  border-color:var(--juf-border) !important;
  box-shadow:none !important;
}
.audiobook-page .audio-hub-featured,
.audiobook-page .audio-collection-card {
  background:var(--juf-surface-panel) !important;
  border-color:var(--juf-border) !important;
  box-shadow:none !important;
}
.audiobook-page .audio-filter-more { min-width:0; }
.audiobook-page .audio-row-copy h3 a { color:var(--text-main) !important; }
.audiobook-page .audio-row-author,
.audiobook-page .audio-row-voice,
.audiobook-page .audio-row-stats { color:var(--text-muted) !important; }

/* ---------- Categories: light 2D cards, readable contrast ---------- */
.category-index-hero {
  background:var(--juf-light-surface) !important;
  background-image:none !important;
  border-color:var(--juf-border) !important;
}
.category-index-card {
  min-height:150px;
  justify-content:flex-start;
  background:var(--juf-surface-panel) !important;
  color:var(--text-main) !important;
  border:1px solid var(--juf-border) !important;
  box-shadow:none !important;
}
.category-index-card::before {
  width:72px !important;
  height:72px !important;
  right:14px !important;
  top:14px !important;
  background:var(--juf-surface-muted) !important;
  opacity:.14 !important;
  filter:none !important;
  z-index:0 !important;
}
.category-index-card .category-card-icon {
  position:relative !important;
  left:auto !important;
  top:auto !important;
  z-index:1;
  width:34px;
  height:34px;
  margin-bottom:22px;
  border:1px solid var(--juf-border) !important;
  background:var(--juf-light-surface) !important;
  color:var(--text-main) !important;
}
.category-index-card h2 { position:relative; z-index:1; color:var(--text-main) !important; }
.category-index-card p { position:relative; z-index:1; color:var(--text-muted) !important; }
.category-index-card .category-card-count {
  position:relative;
  z-index:1;
  border:0 !important;
  background:transparent !important;
  color:var(--accent-rust) !important;
  padding:0 !important;
  margin-top:8px !important;
  font-weight:500;
}
.category-index-card:hover { transform:none !important; box-shadow:var(--juf-shadow-rest) !important; }

/* ---------- Book details: compact content flow ---------- */
.book-details-page .book-details-hero {
  background:var(--juf-surface-panel) !important;
  border-color:var(--juf-border) !important;
  box-shadow:none !important;
}
.book-details-page .book-details-info>p {
  color:var(--muted, #5B6376);
}
.book-details-page .book-details-meta { flex-wrap:wrap; }
.book-details-page .book-details-meta>span {
  background:var(--juf-light-surface) !important;
  color:var(--text-muted) !important;
  border:1px solid var(--juf-border) !important;
  border-radius:var(--juf-radius-pill) !important;
  padding:5px 9px !important;
  font:700 11px/1.2 var(--font-ui) !important;
}
.book-details-page .book-details-meta>.book-meta-premium-pill,
.book-details-page .book-details-meta>.book-community-rating-pill { color:var(--accent-rust) !important; }
.book-details-page .book-details-meta>.book-meta-access.is-unlocked { color:var(--juf-success-green) !important; }
.book-details-page .juf-details-author-card {
  background:var(--juf-light-surface) !important;
  border-color:var(--juf-border) !important;
  box-shadow:none !important;
}
.juf-book-summary-card,
.book-community-panel,
.juf-reader-review-form-card,
.juf-book-publication-card {
  background:var(--juf-surface-panel) !important;
  border-color:var(--juf-border) !important;
  box-shadow:none !important;
}
/* Summary truncation is owned by the Book Detail component and enabled only by JS. */
.juf-summary-toggle {
  margin-top:10px;
  padding:0;
  border:0;
  background:transparent !important;
  color:var(--accent-rust) !important;
  font:800 12px/1.3 var(--font-ui);
  cursor:pointer;
}
.juf-summary-toggle[hidden] { display:none !important; }
.book-community-panel { padding:18px !important; gap:18px !important; }
.book-community-score-number { font-size:34px !important; }
.approved-review-empty { padding:14px !important; color:var(--text-muted) !important; }
.juf-reader-review-form-card { padding:18px !important; }
.juf-book-publication-card { padding:18px !important; }

/* ---------- Universal search: search first, no oversized mobile poster ---------- */
.juf-search-page .juf-search-hero {
  background:var(--juf-light-surface) !important;
  border-color:var(--juf-border) !important;
  box-shadow:none !important;
}

/* ---------- Mobile density ---------- */
@media (max-width: 720px) {
  body.juf-2d-minimal:not(.person-profile-page) .site-main { padding-left:12px; padding-right:12px; }
  body.juf-2d-minimal .page-section-title { line-height:1.18 !important; }
  body.juf-2d-minimal .section-overline-label { font-size:10px !important; }

  /* Authors hero: portrait always visible; no thumbnail clutter. */
  .authors-page .juf-authors-cinematic-hero {
    min-height:420px !important;
    height:420px !important;
    margin:14px 0 30px !important;
    border-radius:20px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-item {
    padding:28px 18px 72px !important;
    grid-template-columns:minmax(0,1fr) 96px !important;
    gap:14px !important;
    align-items:center !important;
    align-content:center !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-info { min-width:0; }
  .authors-page .juf-authors-cinematic-hero .hero-slide-title {
    font-size:clamp(31px,10vw,40px) !important;
    line-height:1.08 !important;
    margin-bottom:8px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-author { font-size:12px !important; }
  .authors-page .juf-authors-cinematic-hero .hero-slide-desc {
    -webkit-line-clamp:2 !important;
    font-size:12px !important;
    line-height:1.65 !important;
    margin:12px 0 15px !important;
  }
  .authors-page .juf-author-hero-visual {
    display:block !important;
    width:96px !important;
    min-width:96px !important;
    opacity:1 !important;
    visibility:visible !important;
    z-index:6 !important;
  }
  .authors-page .juf-author-hero-portrait-card {
    display:block !important;
    width:92px !important;
    height:130px !important;
    border-radius:12px !important;
  }
  .authors-page .juf-author-thumb-queue { display:none !important; }
  .authors-page .juf-author-hero-arrows { right:14px !important; bottom:14px !important; }
  .authors-page .juf-authors-cinematic-hero .hero-slide-actions { gap:10px !important; }
  .authors-page .juf-authors-cinematic-hero .hero-slide-actions .btn-hero-cinematic-secondary {
    border:0 !important;
    background:transparent !important;
    color:var(--accent-rust) !important;
    padding:9px 2px !important;
  }
  .authors-page .juf-authors-by-genre { margin-top:0 !important; }
  .authors-page .juf-author-discovery-head { align-items:end !important; gap:8px !important; }
  .authors-page .juf-author-discovery-head>p { font-size:10px !important; }
  .authors-page .juf-author-genre-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px !important; }
  .authors-page .juf-author-genre-card { min-height:92px !important; padding:13px !important; border-radius:14px !important; }
  .authors-page .juf-author-genre-card strong { font-size:15px !important; line-height:1.3 !important; }
  .authors-page .juf-author-genre-card small { font-size:9.5px !important; }
  .authors-page .juf-author-filter-panel { padding:9px !important; border-radius:14px !important; }
  .authors-page .juf-author-search-row { gap:7px !important; }
  .authors-page .juf-author-search-row input { min-height:42px !important; }
  .authors-page .juf-author-search-row button { min-height:42px !important; padding:0 15px !important; }
  .authors-page .juf-author-filter-more { margin-top:8px; }
  .authors-page .juf-author-filter-more>.juf-author-filter-row {
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    padding-top:8px;
  }
  .authors-page .juf-author-filter-row label { min-width:0; }
  .authors-page .juf-author-filter-row label span { font-size:9px !important; }
  .authors-page .juf-author-filter-row select { min-height:40px !important; }
  .authors-page .juf-author-clear-filter { grid-column:1/-1; }
  .authors-page .juf-author-alphabet {
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    white-space:nowrap !important;
    scrollbar-width:none;
    padding-bottom:4px;
  }
  .authors-page .juf-author-alphabet::-webkit-scrollbar { display:none; }
  .authors-page .juf-authors-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
  .authors-page .juf-author-directory-card { min-height:176px !important; padding:14px 9px !important; border-radius:16px !important; }
  .authors-page .juf-author-directory-avatar { width:68px !important; height:68px !important; }
  .authors-page .juf-author-directory-name { font-size:14px !important; line-height:1.25 !important; }
  .authors-page .juf-author-directory-en,
  .authors-page .juf-author-directory-role { display:none !important; }
  .authors-page .juf-author-directory-meta { font-size:9.5px !important; color:var(--text-muted) !important; }
  .authors-page .juf-author-new-book-story { padding-bottom:34px !important; }
  .authors-page .juf-author-new-book-stage { min-height:365px !important; border-radius:18px !important; background:var(--juf-light-surface) !important; }
  .authors-page .juf-author-new-book-slide { padding:24px 16px 58px !important; grid-template-columns:minmax(0,1fr) 98px !important; gap:14px !important; }
  .authors-page .juf-author-new-book-copy h2 { font-size:27px !important; }
  .authors-page .juf-author-new-book-desc { -webkit-line-clamp:2 !important; }
  .authors-page .juf-author-new-book-cover { width:92px !important; height:138px !important; filter:none !important; }

  /* Premium: short hero, filters tucked away, trust becomes compact. */
  .premium-page .premium-hero {
    grid-template-columns:1fr !important;
    gap:14px !important;
    min-height:0 !important;
    padding:24px 20px !important;
    border-radius:20px !important;
    margin:14px 0 24px !important;
  }
  .premium-page .premium-hero h1 { font-size:36px !important; margin-bottom:10px !important; }
  .premium-page .premium-hero-copy>p { font-size:13px !important; line-height:1.65 !important; }
  .premium-page .premium-hero-actions { margin-top:16px !important; }
  .premium-page .premium-hero-art { min-height:165px !important; }
  .premium-page .premium-book-stack-live { transform:translateX(-50%) scale(.64) !important; }
  .premium-page .premium-orbit-one { width:180px !important; height:180px !important; }
  .premium-page .premium-orbit-two { width:135px !important; height:135px !important; }
  .premium-page .premium-moon { width:48px !important; height:48px !important; }
  .premium-page .premium-hero-proof { margin-top:14px !important; }
  .premium-page .premium-section { margin:30px 0 !important; }
  .premium-page .premium-section-heading { margin-bottom:13px !important; }
  .premium-page .premium-section-heading h2 { font-size:28px !important; }
  .premium-page .premium-section-heading p { font-size:12px !important; line-height:1.6 !important; }
  .premium-page .premium-pass-muted { margin:24px 0 !important; }
  .premium-page .premium-filter-bar {
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px !important;
    padding:9px !important;
  }
  .premium-page .premium-filter-more { grid-column:1/-1; grid-row:2; }
  .premium-page .premium-filter-fields { grid-template-columns:1fr 1fr; padding-top:8px; }
  .premium-page .premium-filter-bar>button { grid-column:2; grid-row:1; min-height:42px !important; padding:0 14px !important; }
  .premium-page .premium-book-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px !important; }
  .premium-page .premium-book-copy>span { color:var(--text-muted) !important; }
  .premium-page .premium-trust-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; margin:32px 0 !important; padding-top:18px !important; }
  .premium-page .premium-trust-grid article { padding:12px !important; border-radius:14px !important; }
  .premium-page .premium-trust-grid h3 { font-size:13px !important; margin:5px 0 3px !important; }
  .premium-page .premium-trust-grid p { font-size:10px !important; line-height:1.5 !important; }
  .premium-page .premium-faq { gap:10px !important; margin:34px 0 46px !important; }
  .premium-page .premium-faq h2 { font-size:27px !important; }

  /* Audiobook: compact hero and only one visible search row until Filter opens. */
  .audiobook-page .audio-hub-hero-v2,
  .audiobook-page .audio-collection-shelf,
  .audiobook-page .audio-filter-bar,
  .audiobook-page .audio-dashboard-layout {
    width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
  .audiobook-page .audio-hub-hero-v2 {
    padding:20px 16px !important;
    border-radius:20px !important;
    gap:16px !important;
    margin-top:14px !important;
  }
  .audiobook-page .audio-hub-hero-copy .page-section-title { font-size:31px !important; }
  .audiobook-page .audio-hub-hero-copy>p { font-size:12.5px !important; line-height:1.65 !important; }
  .audiobook-page .audio-hub-featured { grid-template-columns:78px minmax(0,1fr) !important; padding:11px !important; }
  .audiobook-page .audio-hub-featured-cover { width:78px !important; }
  .audiobook-page .audio-hub-featured-copy h2 { font-size:17px !important; }
  .audiobook-page .audio-hub-featured-author span:last-child { font-size:11px !important; }
  .audiobook-page .audio-hub-count { display:none !important; }
  .audiobook-page .audio-collection-shelf { padding:14px 0 2px !important; }
  .audiobook-page .audio-shelf-heading h2 { font-size:24px !important; }
  .audiobook-page .audio-collection-card { flex-basis:210px !important; min-height:86px !important; grid-template-columns:64px minmax(0,1fr) !important; }
  .audiobook-page .audio-collection-card-art { width:64px !important; height:64px !important; }
  .audiobook-page .audio-filter-bar {
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px !important;
    padding:9px !important;
    border-radius:14px !important;
  }
  .audiobook-page .audio-filter-more { grid-column:1/-1; grid-row:2; }
  .audiobook-page .audio-filter-fields { grid-template-columns:1fr 1fr; padding-top:8px; }
  .audiobook-page .audio-filter-bar>button { grid-column:2; grid-row:1; min-height:44px !important; }
  .audiobook-page .audio-dashboard-main { padding:10px !important; }
  .audiobook-page .audio-library-heading { padding-bottom:10px !important; }
  .audiobook-page .audio-library-heading h2 { font-size:24px !important; }
  .audiobook-page .audio-library-row { min-height:78px !important; padding:8px 5px !important; }
  .audiobook-page .audio-row-book { grid-template-columns:46px minmax(0,1fr) !important; }
  .audiobook-page .audio-row-cover { width:46px !important; height:62px !important; }
  .audiobook-page .audio-row-voice,
  .audiobook-page .audio-row-stats { display:none !important; }
  .audiobook-page .audio-row-copy h3 { font-size:14px !important; }
  .audiobook-page .audio-row-author { font-size:10.5px !important; }
  .audiobook-page .audio-player-panel { box-shadow:0 -4px 16px rgba(40, 46, 55, .08) !important; }

  /* Categories: 2-column cards, no poster-like dark blocks. */
  .category-index-hero { padding:22px 18px !important; margin:14px 0 22px !important; border-radius:18px !important; }
  .category-index-hero .page-section-title { font-size:31px !important; }
  .category-index-hero p { font-size:12.5px !important; line-height:1.65 !important; }
  .category-index-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; margin-bottom:42px !important; }
  .category-index-card { min-height:126px !important; padding:14px !important; border-radius:15px !important; }
  .category-index-card .category-card-icon { width:30px !important; height:30px !important; margin-bottom:16px !important; }
  .category-index-card h2 { font-size:16px !important; margin-bottom:3px !important; }
  .category-index-card p { display:none !important; }
  .category-index-card .category-card-count { font-size:10px !important; }

  /* Book details: remove long stacked boxes and keep reading actions obvious. */
  .book-details-page { margin-top:18px !important; margin-bottom:42px !important; }
  .book-details-page .book-details-hero { padding:18px 14px !important; gap:16px !important; border-radius:18px !important; }
  .book-details-page .book-details-cover { flex:0 0 148px !important; max-width:148px !important; margin:0 auto !important; }
  .book-details-page .book-details-info { min-width:0 !important; width:100%; text-align:left !important; }
  .book-details-page .book-details-info h1 { font-size:31px !important; }
  .book-details-page .book-details-info h3 { font-size:14px !important; margin-bottom:10px !important; }
  .book-details-page .book-details-info>p {
    font-size:18px !important;
    line-height:1.75 !important;
    margin-bottom:12px !important;
    display:-webkit-box;
    -webkit-line-clamp:4;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .book-details-page .book-details-meta { justify-content:flex-start !important; margin-bottom:14px !important; gap:6px !important; }
  .book-details-page .book-details-meta>.book-meta-views { display:none !important; }
  .book-details-page .juf-details-author-card {
    flex:1 1 100% !important;
    min-height:0 !important;
    padding:14px 15px !important;
    display:grid !important;
    /* Portrait/column sizes are owned by the Book Details page stylesheet. */
    grid-template-rows:auto auto auto auto !important;
    gap:2px 12px !important;
    text-align:left !important;
    align-items:center !important;
    align-content:center !important;
  }
  .book-details-page .juf-details-author-avatar { margin:0 !important; grid-row:1/5 !important; align-self:center !important; }
  .book-details-page .juf-details-author-card>small { margin:0 !important; font-size:9.5px !important; line-height:1.3 !important; }
  .book-details-page .juf-details-author-card h3 { margin:0 !important; font-size:15.5px !important; line-height:1.35 !important; }
  .book-details-page .juf-details-author-card>span { font-size:10.5px !important; line-height:1.35 !important; }
  .book-details-page .juf-details-author-card p { display:none !important; }
  .book-details-page .juf-details-author-card>a { grid-column:2; font-size:11px !important; margin-top:4px !important; line-height:1.4 !important; display:inline-block; }
  .juf-book-summary-card { margin:20px 0 0 !important; padding:18px 16px !important; }
  .juf-book-reading-directory { margin-top:20px !important; }
  .book-community-panel { margin-top:20px !important; grid-template-columns:1fr !important; padding:15px !important; }
  .book-community-summary { gap:14px !important; }
  .book-community-score-number { font-size:30px !important; }
  .rating-distribution-row { font-size:10px !important; }
  .book-rating-action h3 { font-size:16px !important; }
  .approved-reader-reviews { margin-bottom:18px !important; }
  .approved-reviews-heading { margin-bottom:10px !important; }
  .juf-reader-review-form-card { padding:15px !important; }
  .juf-reader-review-form-card h3 { font-size:17px !important; margin-bottom:10px !important; }
  .juf-book-publication-card { margin:18px 0 !important; padding:15px !important; }

  /* Search page */
  .juf-search-page .juf-search-hero { padding:26px 16px !important; margin-top:18px !important; border-radius:20px !important; }
  .juf-search-page .juf-search-hero h1 { font-size:clamp(31px,9vw,38px) !important; line-height:1.12 !important; }
  .juf-search-page .juf-search-hero>p { font-size:13px !important; line-height:1.6 !important; }
  .juf-search-page .juf-search-start { margin-top:8px !important; }
  .juf-search-page .juf-search-start-label { font-size:11px !important; }

  /* Footer: legal utility, not a second content section. */
  .juf-footer-v24 { padding-top:22px !important; padding-bottom:14px !important; }
  .juf-footer-top-v24 { padding-bottom:12px !important; gap:12px !important; }
  .juf-footer-brand-v24 img { max-height:38px !important; }
  .juf-footer-tagline-v24 { font-size:11px !important; line-height:1.45 !important; }
  .juf-footer-links-v24 { gap:5px 14px !important; }
  .juf-footer-column-v24 a { min-height:34px !important; font-size:10.5px !important; }
  .juf-footer-bottom-v24 { padding-top:10px !important; font-size:9.5px !important; }
}

@media (max-width: 390px) {
  .authors-page .juf-authors-cinematic-hero { height:400px !important; min-height:400px !important; }
  .authors-page .juf-authors-cinematic-hero .hero-slide-item { grid-template-columns:minmax(0,1fr) 84px !important; }
  .authors-page .juf-author-hero-visual { width:84px !important; min-width:84px !important; }
  .authors-page .juf-author-hero-portrait-card { width:82px !important; height:116px !important; }
  .premium-page .premium-filter-fields,
  .audiobook-page .audio-filter-fields { grid-template-columns:1fr !important; }
  .premium-page .premium-trust-grid { grid-template-columns:1fr 1fr !important; }
  .category-index-grid { gap:8px !important; }
  .category-index-card { padding:12px !important; }
}

/* ---------- Homepage admin-copy parity + lighter editorial density — 2026-09-14 ---------- */
.juf-homepage .section-overline-label { display:none !important; }
.juf-homepage .page-section-title {
  font-size:clamp(22px,2vw,28px) !important;
  line-height:1.18 !important;
  letter-spacing:-.01em !important;
  margin-top:0 !important;
}
.juf-homepage .section-title-wrap-flex,
.juf-homepage .books-showcase-head {
  margin-bottom:14px !important;
  gap:12px !important;
}
.juf-homepage .home-authors-discovery,
.juf-homepage #audiobook,
.juf-homepage #genres,
.juf-homepage .home-new-releases,
.juf-homepage #authors,
.juf-homepage .home-testimonials {
  margin-bottom:32px !important;
}
.juf-homepage .hero-slide-title {
  font-size:clamp(34px,4vw,48px) !important;
  line-height:1.08 !important;
}
.juf-homepage .hero-slide-desc {
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
  max-width:600px !important;
  margin:10px 0 14px !important;
  font-size:13px !important;
  line-height:1.6 !important;
}
.juf-homepage .hero-slide-actions { gap:8px !important; }
.juf-homepage .hero-slide-actions a { min-height:38px !important; padding:9px 15px !important; font-size:12px !important; }
.juf-homepage .home-reading-gateway,
.juf-homepage .home-reading-gateway.has-continue {
  padding:10px 14px !important;
  min-height:0 !important;
  margin-bottom:26px !important;
  gap:10px !important;
}
.juf-homepage .home-reading-gateway-copy h2 { font-size:18px !important; line-height:1.25 !important; margin:2px 0 0 !important; }
.juf-homepage .home-reading-gateway-copy p { display:none !important; }
.juf-homepage .home-reading-gateway-kicker { font-size:9px !important; letter-spacing:normal !important; }
.juf-homepage .home-reading-gateway-actions a { min-height:36px !important; padding:8px 13px !important; font-size:11px !important; }

/* Discovery cards should read as shortcuts, not editorial essays. */
.juf-homepage .home-author-discovery-copy p { display:none !important; }
.juf-homepage .home-author-discovery-kicker { font-size:9px !important; }
.juf-homepage .home-author-discovery-copy h3 { font-size:18px !important; line-height:1.25 !important; }
.juf-homepage .sub-tabs-row { margin:8px 0 12px !important; }
.juf-homepage .sub-tab-item { padding:6px 10px !important; font-size:10px !important; }
.juf-homepage .genre-graphic-kicker { display:none !important; }
.juf-homepage .genre-graphic-copy h4 { font-size:15px !important; }
.juf-homepage .genre-graphic-copy > span { font-size:10px !important; }
.juf-homepage .section-view-all { font-size:10.5px !important; }
.juf-homepage .slider-ctrl-btn,
.juf-homepage .author-nav-arrow { width:32px !important; height:32px !important; }

/* Book metadata remains secondary to covers. */
.juf-homepage .book-under-title { font-size:13px !important; line-height:1.25 !important; }
.juf-homepage .book-under-author { font-size:10.5px !important; }
.juf-homepage .book-rating-gold { font-size:9px !important; }
.juf-homepage #authors .author-circle-title,
.juf-homepage #authors .home-author-bio { display:none !important; }
.juf-homepage #authors .author-circle-unit > small { font-size:9px !important; color:var(--text-muted) !important; }
.juf-homepage .testimonial-quote-text { font-size:14px !important; line-height:1.65 !important; }
.juf-homepage .newsletter-premium-wrapper { padding-top:24px !important; padding-bottom:24px !important; }
.juf-homepage .newsletter-premium-copy { margin-bottom:12px !important; }
.juf-homepage .newsletter-premium-subtitle { font-size:11.5px !important; line-height:1.5 !important; }

@media (max-width:720px) {
  .juf-homepage .page-section-title { font-size:20px !important; }
  .juf-homepage .hero-slide-title { font-size:clamp(27px,8.2vw,34px) !important; }
  .juf-homepage .hero-slide-author { font-size:11px !important; }
  .juf-homepage .hero-slide-desc { font-size:11px !important; line-height:1.5 !important; margin:7px 0 10px !important; }
  .juf-homepage .hero-slide-badge { font-size:9px !important; }
  .juf-homepage .hero-slide-actions a { min-height:34px !important; padding:7px 11px !important; font-size:10.5px !important; }
  .juf-homepage .home-authors-discovery,
  .juf-homepage #audiobook,
  .juf-homepage #genres,
  .juf-homepage .home-new-releases,
  .juf-homepage #authors,
  .juf-homepage .home-testimonials { margin-bottom:24px !important; }
  .juf-homepage .section-title-wrap-flex,
  .juf-homepage .books-showcase-head { margin-bottom:10px !important; align-items:center !important; }
  .juf-homepage .home-reading-gateway,
  .juf-homepage .home-reading-gateway.has-continue { padding:9px 10px !important; margin-bottom:18px !important; }
  .juf-homepage .home-reading-gateway-copy h2 { font-size:15px !important; }
  .juf-homepage .home-reading-gateway-kicker { font-size:8px !important; }
  .juf-homepage .home-reading-gateway-actions { gap:6px !important; }
  .juf-homepage .home-reading-gateway-actions a { min-height:32px !important; padding:6px 9px !important; font-size:9.5px !important; }
  .juf-homepage .home-author-discovery-copy h3 { font-size:15px !important; }
  .juf-homepage .home-author-discovery-kicker { font-size:8px !important; }
  .juf-homepage .sub-tabs-row { margin:6px 0 10px !important; }
  .juf-homepage .sub-tab-item { font-size:9px !important; padding:5px 8px !important; }
  .juf-homepage .testimonial-quote-text { font-size:12.5px !important; }
  .juf-homepage .newsletter-premium-wrapper { padding:18px 12px !important; }
}


/* === MERGED: jufbook-typography-hierarchy.css === */
/* JUFbook — professional typography hierarchy authority, 2026-09-14
   One page title, one section title, card titles beneath it. Decorative copy must not compete. */

body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main {
    font-size: 17px;
    line-height: 1.7;
}

body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(h1) {
    font-family: var(--font-heading-editorial);
    font-size: clamp(32px, 2.6vw, 36px) !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    letter-spacing: normal;
    margin-block: 0 14px;
}

body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(h2, .page-section-title) {
    font-family: var(--font-heading-editorial);
    font-size: clamp(25px, 2vw, 29px) !important;
    line-height: 1.28 !important;
    font-weight: 500 !important;
    letter-spacing: normal;
}

body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(h3) {
    font-family: var(--font-heading-editorial);
    font-size: clamp(20px, 1.55vw, 22px) !important;
    line-height: 1.32 !important;
    font-weight: 500 !important;
}

body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(p) {
    font-size: clamp(16.5px, 1.15vw, 18px);
    line-height: 1.72;
}

/* Repeated eyebrows were the main source of title competition. Hero-specific badges may use
   their own component class; generic section overlines are retired. */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .section-overline-label,
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .audio-shelf-heading > div > span,
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .audio-library-heading > div > span,
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .premium-section-heading > div > span,
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .premium-pass-muted > div > span,
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .premium-faq > div:first-child > span,
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .category-section-head > div > span,
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main .juf-search-group-head > div > span {
    display: none !important;
}

/* Heading blocks should breathe, but not create poster-like vertical weight. */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(
  .section-title-wrap-flex,
  .books-showcase-head,
  .juf-catalog-heading,
  .juf-author-discovery-head,
  .audio-shelf-heading,
  .audio-library-heading,
  .premium-section-heading,
  .juf-details-section-heading,
  .category-section-head,
  .juf-search-group-head
) {
    margin-bottom: 18px !important;
}

/* Supporting copy is subordinate to the single section name. */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(
  .juf-books-hero > div > p,
  .juf-search-hero > p,
  .premium-section-heading p,
  .premium-pass-muted p,
  .juf-author-discovery-head > p,
  .audio-hub-hero-copy > p,
  .category-index-hero > p,
  .category-archive-hero > div > p
) {
    max-width: 68ch;
    margin-top: 8px;
}

/* Section title-only treatment: result counts/actions sit opposite, never as a second headline. */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(
  .juf-catalog-heading,
  .juf-author-discovery-head,
  .audio-shelf-heading,
  .audio-library-heading,
  .premium-section-heading,
  .category-section-head,
  .juf-search-group-head
) > :first-child > h2 {
    margin: 0 !important;
}

/* Author identity card: repeated author name is metadata, not another section heading. */
.juf-author-profile-card-name {
    display: block;
    font-family: var(--font-heading-editorial);
    font-size: 18px;
    line-height: 1.32;
    font-weight: 500;
}

/* Keep slider book/author titles visually strong even though they are semantic H2s. */
.hero-slide-title {
    font-family: var(--font-display-literary) !important;
    font-size: clamp(34px, 3vw, 40px) !important;
    line-height: 1.16 !important;
    font-weight: 400 !important;
}

/* Search is a utility page: the field, not multiple labels, owns the visual focus. */
.juf-search-start {
    margin-top: 14px !important;
}
.juf-search-quick-links {
    width: 100%;
}

/* Compact empty-state copy: no second pseudo-heading. */
.home-section-empty strong,
.juf-public-empty-state strong,
.juf-catalog-empty strong,
.premium-empty strong,
.audio-empty-state strong {
    font-family: var(--font-ui);
    font-size: 16px !important;
    line-height: 1.4;
}

@media (max-width: 620px) {
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main {
        font-size: 16.5px;
        line-height: 1.68;
    }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(h1) {
        font-size: clamp(26px, 7.2vw, 30px) !important;
        line-height: 1.16 !important;
        margin-bottom: 10px;
    }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(h2, .page-section-title) {
        font-size: clamp(22px, 5.8vw, 25px) !important;
        line-height: 1.22 !important;
    }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(h3) {
        font-size: clamp(19px, 5vw, 21px) !important;
    }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(p) {
        font-size: clamp(16.5px, 4.4vw, 18px);
        line-height: 1.72;
    }
    .hero-slide-title {
        font-size: clamp(26px, 7.2vw, 30px) !important;
    }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(
      .section-title-wrap-flex,
      .books-showcase-head,
      .juf-catalog-heading,
      .juf-author-discovery-head,
      .audio-shelf-heading,
      .audio-library-heading,
      .premium-section-heading,
      .juf-details-section-heading,
      .category-section-head,
      .juf-search-group-head
    ) {
        margin-bottom: 14px !important;
    }
    .juf-author-profile-card-name { font-size: 18px; }
}


/* ===== 2026-09-14 Homepage search + reading-room polish =====
   One coherent search module, one clear reading-room title, compact actions. */
.juf-homepage .home-search-module {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 0 22px !important;
    padding: 8px !important;
    border: 1px solid rgba(40, 46, 55, .10) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .84) !important;
    box-shadow: 0 10px 28px rgba(40, 46, 55, .045) !important;
}
.juf-homepage .home-search-module .search-input-box {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 5px 6px 5px 13px !important;
    border: 1px solid rgba(40, 46, 55, .10) !important;
    border-radius: 14px !important;
    background: #ECEAE6 !important;
    box-shadow: none !important;
}
.juf-homepage .home-search-icon {
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-grid !important;
    place-items: center !important;
    color: var(--juf-text-strong,#282E37) !important;
}
.juf-homepage .home-search-icon svg {
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
}
.juf-homepage .home-search-module .search-input-box input {
    margin-left: 8px !important;
    min-width: 0 !important;
    font-size: 13px !important;
    color: var(--juf-text-strong,#282E37) !important;
    background: transparent !important;
}
.juf-homepage .home-search-module .search-input-box input::placeholder {
    color: #5B6376 !important;
    opacity: .82 !important;
}
.juf-homepage .home-search-module .search-submit-btn {
    min-height: 36px !important;
    padding: 7px 14px !important;
    border-radius: 11px !important;
    background: #3B4256 !important;
    color: #FFFFFF !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
.juf-homepage .home-search-module .search-submit-btn:hover,
.juf-homepage .home-search-module .search-submit-btn:focus-visible {
    background: #2C3243 !important;
    filter: none !important;
}
.juf-homepage .home-search-module .search-tags-nav {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 6px 0 10px !important;
    border-left: 1px solid rgba(40, 46, 55, .10) !important;
}
.juf-homepage .home-search-module .search-tags-nav a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
    padding: 6px 9px !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--juf-text-strong,#282E37) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}
.juf-homepage .home-search-module .search-tags-nav a:hover,
.juf-homepage .home-search-module .search-tags-nav a:focus-visible {
    background: #ECEAE6 !important;
}

.juf-homepage .home-reading-gateway,
.juf-homepage .home-reading-gateway.has-continue {
    grid-template-columns: 38px minmax(0,1fr) auto !important;
    gap: 12px 16px !important;
    min-height: 86px !important;
    margin: 0 0 28px !important;
    padding: 14px 16px !important;
    border: 1px solid rgba(40, 46, 55, .10) !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg,#ECEAE6 0%,#ECEAE6 100%) !important;
    box-shadow: 0 12px 30px rgba(40, 46, 55, .045) !important;
}
.juf-homepage .home-reading-gateway::before { display: none !important; }
.juf-homepage .home-reading-gateway-art {
    width: 34px !important;
    height: 34px !important;
    border: 1px solid rgba(40, 46, 55, .10) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, .68) !important;
    color: var(--juf-text-strong,#282E37) !important;
}
.juf-homepage .home-reading-gateway-art svg {
    width: 17px !important;
    height: 17px !important;
    stroke-width: 1.5 !important;
}
.juf-homepage .home-reading-gateway-copy h2 {
    margin: 0 !important;
    color: var(--juf-text-strong,#282E37) !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
}
.juf-homepage .home-reading-gateway-copy p {
    display: block !important;
    margin: 4px 0 0 !important;
    max-width: 620px !important;
    color: #5B6376 !important;
    font-size: 11.5px !important;
    line-height: 1.5 !important;
}
.juf-homepage .home-reading-gateway-kicker {
    display: block !important;
    margin: 0 0 3px !important;
    color: #5B6376 !important;
    font-size: 9.5px !important;
    font-weight: 500 !important;
    letter-spacing: .02em !important;
}
.juf-homepage .home-reading-gateway-actions {
    gap: 7px !important;
    flex-wrap: nowrap !important;
}
.juf-homepage .home-reading-gateway-actions a {
    min-height: 35px !important;
    padding: 7px 13px !important;
    border-radius: 11px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transform: none !important;
}
.juf-homepage .home-reading-primary {
    background: #3B4256 !important;
    color: #FFFFFF !important;
}
.juf-homepage .home-reading-primary:hover,
.juf-homepage .home-reading-primary:focus-visible {
    background: #2C3243 !important;
}
.juf-homepage .home-reading-secondary {
    border-color: rgba(40, 46, 55, .14) !important;
    background: rgba(255, 255, 255, .72) !important;
    color: var(--juf-text-strong,#282E37) !important;
}
.juf-homepage .home-reading-secondary:hover,
.juf-homepage .home-reading-secondary:focus-visible {
    border-color: rgba(40, 46, 55, .28) !important;
    background: #FFFFFF !important;
}
.juf-homepage .home-reading-gateway.has-continue {
    grid-template-columns: 52px minmax(0,1fr) auto !important;
}
.juf-homepage .home-reading-cover,
.juf-homepage .home-reading-cover .home-reading-cover-image,
.juf-homepage .home-reading-cover > .juf-book-jacket {
    width: 52px !important;
}
.juf-homepage .home-reading-cover .home-reading-cover-image,
.juf-homepage .home-reading-cover > .juf-book-jacket {
    min-height: 74px !important;
    border-radius: 7px !important;
}
.juf-homepage .home-reading-progress {
    height: 4px !important;
    margin-top: 7px !important;
    background: rgba(40, 46, 55, .10) !important;
}
.juf-homepage .home-reading-progress i { background: #3B4256 !important; }

@media (max-width: 860px) {
    .juf-homepage .home-search-module {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
        padding: 7px !important;
        border-radius: 17px !important;
    }
    .juf-homepage .home-search-module .search-tags-nav {
        justify-content: flex-start !important;
        gap: 3px !important;
        overflow-x: auto !important;
        padding: 2px 2px 0 !important;
        border-left: 0 !important;
    }
    .juf-homepage .home-reading-gateway,
    .juf-homepage .home-reading-gateway.has-continue {
        grid-template-columns: 36px minmax(0,1fr) !important;
        gap: 10px 12px !important;
        padding: 13px !important;
    }
    .juf-homepage .home-reading-gateway.has-continue { grid-template-columns: 48px minmax(0,1fr) !important; }
    .juf-homepage .home-reading-gateway-actions {
        grid-column: 1 / -1 !important;
        justify-content: flex-start !important;
        padding-left: 0 !important;
    }
}
@media (max-width: 430px) {
    .juf-homepage .home-search-module { margin-bottom: 16px !important; }
    .juf-homepage .home-search-module .search-input-box {
        min-height: 44px !important;
        padding-left: 11px !important;
    }
    .juf-homepage .home-search-module .search-submit-btn { min-height: 34px !important; padding-inline: 12px !important; }
    .juf-homepage .home-search-module .search-tags-nav a { min-height: 31px !important; padding: 5px 8px !important; font-size: 10px !important; }
    .juf-homepage .home-reading-gateway,
    .juf-homepage .home-reading-gateway.has-continue {
        min-height: 0 !important;
        margin-bottom: 20px !important;
        padding: 12px !important;
        border-radius: 17px !important;
    }
    .juf-homepage .home-reading-gateway-copy h2 { font-size: 17px !important; }
    .juf-homepage .home-reading-gateway-copy p { font-size: 10.5px !important; }
    .juf-homepage .home-reading-gateway-actions {
        display: flex !important;
        width: auto !important;
        gap: 6px !important;
    }
    .juf-homepage .home-reading-gateway-actions a { width: auto !important; min-height: 33px !important; padding: 6px 10px !important; font-size: 9.5px !important; }
}


/* ===== 2026-09-14 Homepage navigation deduplication polish =====
   Global header owns primary navigation; homepage search remains search-only. */
.juf-homepage .home-search-module {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 7px !important;
}
.juf-homepage .home-search-module .search-input-box {
    min-height: 44px !important;
}
.juf-homepage .home-search-module .search-tags-nav { display: none !important; }
.juf-homepage #genres { margin-bottom: 32px !important; }
.juf-homepage #genres .section-title-wrap-flex { margin-bottom: 12px !important; }
@media (max-width: 767px) {
    .juf-homepage .home-search-module {
        max-width: none !important;
        margin-bottom: 16px !important;
    }
    .juf-homepage #genres { margin-bottom: 24px !important; }
}

/* =====================================================================
   Authors directory — senior page polish (2026-09-14)
   Compact hierarchy, visible portrait hero, lighter genre/directory cards,
   and a restrained new-release strip. Loaded as the final public layer.
   ===================================================================== */
.authors-page .juf-authors-cinematic-hero {
  height: 400px !important;
  min-height: 400px !important;
  margin: 24px 0 56px !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, #ECEAE6 0%, #ECEAE6 56%, #E4E6EC 100%) !important;
  border: 1px solid rgba(40, 46, 55, .10) !important;
  box-shadow: 0 16px 34px rgba(40, 46, 55, .04) !important;
}
.authors-page .juf-authors-cinematic-hero .hero-slide-item {
  grid-template-columns: minmax(0,1fr) 260px !important;
  gap: 34px !important;
  padding: 46px 56px !important;
  align-items: center !important;
}
.authors-page .juf-authors-cinematic-hero .hero-slide-info {
  max-width: 620px !important;
  align-self: center !important;
}
.authors-page .juf-authors-cinematic-hero .hero-slide-title {
  font-size: clamp(38px, 4vw, 48px) !important;
  line-height: 1.08 !important;
  margin: 0 0 10px !important;
  color: var(--juf-text-strong,#282E37) !important;
}
.authors-page .juf-authors-cinematic-hero .hero-slide-author {
  margin: 0 0 14px !important;
  color: var(--juf-text-soft,#282E37) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}
.authors-page .juf-authors-cinematic-hero .hero-slide-author strong {
  color: var(--juf-text-strong,#282E37) !important;
  font-weight: 500 !important;
}
.authors-page .juf-authors-cinematic-hero .hero-slide-desc {
  max-width: 52ch !important;
  margin: 0 0 18px !important;
  color: var(--juf-text-soft,#282E37) !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.authors-page .juf-authors-cinematic-hero .hero-slide-actions {
  margin-top: 0 !important;
}
.authors-page .juf-author-hero-visual {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 260px !important;
  min-width: 260px !important;
  min-height: 300px !important;
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.authors-page .juf-author-hero-portrait-card {
  display: block !important;
  width: 210px !important;
  height: 286px !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, .74) !important;
  border: 1px solid rgba(40, 46, 55, .10) !important;
  box-shadow: 0 18px 36px rgba(40, 46, 55, .09) !important;
}
.authors-page .juf-author-hero-portrait-card > .juf-author-circle-img,
.authors-page .juf-author-hero-portrait-card > .juf-author-art-avatar,
.authors-page .juf-author-hero-portrait-card .juf-author-portrait-svg {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: 22px !important;
}
.authors-page .juf-author-thumb-queue { display: none !important; }
.authors-page .juf-author-hero-arrows {
  display: flex !important;
  left: auto !important;
  right: 28px !important;
  bottom: 24px !important;
  gap: 8px !important;
}
.authors-page .juf-author-hero-arrows .hero-cinematic-arrow-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(40, 46, 55, .12) !important;
  background: rgba(255, 255, 255, .86) !important;
  color: var(--juf-text-strong,#282E37) !important;
  box-shadow: 0 8px 18px rgba(40, 46, 55, .05) !important;
}

.authors-page .juf-authors-by-genre {
  padding-top: 0 !important;
  margin-bottom: 52px !important;
}
.authors-page .juf-author-discovery-head {
  margin-bottom: 16px !important;
  align-items: baseline !important;
}
.authors-page .juf-author-discovery-head .page-section-title {
  margin: 0 !important;
}
.authors-page .juf-author-genre-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 12px !important;
}
.authors-page .juf-author-genre-card {
  min-height: 92px !important;
  padding: 17px 18px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(40, 46, 55, .09) !important;
  background: #FFFFFF !important;
  box-shadow: 0 9px 22px rgba(40, 46, 55, .035) !important;
  justify-content: center !important;
  gap: 7px !important;
  transform: none !important;
}
.authors-page .juf-author-genre-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 26px rgba(40, 46, 55, .055) !important;
  border-color: rgba(40, 46, 55, .15) !important;
}
.authors-page .juf-author-genre-card::before,
.authors-page .juf-author-genre-card::after { display: none !important; }
.authors-page .juf-author-genre-card strong {
  color: var(--juf-text-strong,#282E37) !important;
  font-size: 17px !important;
  line-height: 1.3 !important;
}
.authors-page .juf-author-genre-card small {
  color: #5B6376 !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}

.authors-page .juf-author-discovery {
  padding-top: 0 !important;
  margin-bottom: 56px !important;
}
.authors-page .juf-author-filter-panel {
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.authors-page .juf-author-filter-more {
  width: fit-content !important;
  min-width: 0 !important;
}
.authors-page .juf-author-filter-more > summary {
  min-height: 36px !important;
  padding: 0 13px !important;
  border: 1px solid rgba(40, 46, 55, .11) !important;
  border-radius: 999px !important;
  background: #FFFFFF !important;
  color: var(--juf-text-strong,#282E37) !important;
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}
.authors-page .juf-author-filter-more[open] {
}
.authors-page .juf-author-filter-row {
  margin-top: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(40, 46, 55, .08) !important;
  border-radius: 16px !important;
  background: #FFFFFF !important;
}
.authors-page .juf-author-alphabet {
  margin: 0 0 18px !important;
  padding: 0 0 4px !important;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  scrollbar-width: none !important;
}
.authors-page .juf-author-alphabet::-webkit-scrollbar { display: none !important; }
.authors-page .juf-author-alphabet a {
  flex: 0 0 auto !important;
  min-width: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  border-radius: 9px !important;
  color: var(--juf-text-strong,#282E37) !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(40, 46, 55, .08) !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 11px !important;
}
.authors-page .juf-author-alphabet a.active {
  background: #3B4256 !important;
  color: #FFFFFF !important;
  border-color: #3B4256 !important;
}
.authors-page .juf-authors-grid-5 {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 14px !important;
}
.authors-page .juf-author-directory-card {
  min-height: 228px !important;
  padding: 20px 16px 18px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(40, 46, 55, .09) !important;
  background: #FFFFFF !important;
  box-shadow: 0 10px 24px rgba(40, 46, 55, .035) !important;
  transform: none !important;
}
.authors-page .juf-author-directory-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 30px rgba(40, 46, 55, .06) !important;
}
.authors-page .juf-author-directory-avatar {
  width: 104px !important;
  height: 104px !important;
  margin-bottom: 14px !important;
  background: #ECEAE6 !important;
}
.authors-page .juf-author-directory-name {
  color: var(--juf-text-strong,#282E37) !important;
  font-family: var(--font-heading) !important;
  font-size: 17px !important;
  line-height: 1.32 !important;
}
.authors-page .juf-author-directory-en {
  color: #5B6376 !important;
  font-size: 11px !important;
  margin-top: 4px !important;
}
.authors-page .juf-author-directory-role {
  color: #5B6376 !important;
  font-size: 11.5px !important;
  margin-top: 7px !important;
}
.authors-page .juf-author-directory-meta {
  color: var(--juf-text-body,#282E37) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  margin-top: 7px !important;
}

.authors-page .juf-author-new-book-story {
  padding: 0 0 48px !important;
}
.authors-page .juf-author-new-book-stage {
  min-height: 292px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(40, 46, 55, .10) !important;
  background: linear-gradient(135deg, #ECEAE6 0%, #ECEAE6 70%, #E4E6EC 100%) !important;
  box-shadow: 0 14px 30px rgba(40, 46, 55, .045) !important;
}
.authors-page .juf-author-new-book-stage::before {
  background: radial-gradient(circle at 84% 28%, rgba(40, 46, 55, .08), transparent 28%) !important;
}
.authors-page .juf-author-new-book-slide {
  padding: 30px 38px 48px !important;
  grid-template-columns: minmax(0,1fr) 170px !important;
  gap: 30px !important;
}
.authors-page .juf-author-new-book-copy {
  padding-bottom: 0 !important;
}
.authors-page .juf-author-new-book-copy h2 {
  font-size: clamp(30px,3vw,38px) !important;
  line-height: 1.12 !important;
  margin: 0 0 7px !important;
  color: var(--juf-text-strong,#282E37) !important;
}
.authors-page .juf-author-new-book-author {
  margin: 0 0 10px !important;
  color: var(--juf-text-soft,#282E37) !important;
  font-size: 12.5px !important;
}
.authors-page .juf-author-new-book-desc {
  max-width: 56ch !important;
  margin: 0 0 11px !important;
  color: var(--juf-text-soft,#282E37) !important;
  font-size: 12.5px !important;
  line-height: 1.65 !important;
  -webkit-line-clamp: 2 !important;
}
.authors-page .juf-author-new-book-meta {
  margin: 0 0 13px !important;
  gap: 6px !important;
}
.authors-page .juf-author-new-book-meta span {
  min-height: 24px !important;
  padding: 0 8px !important;
  background: rgba(255, 255, 255, .70) !important;
  border-color: rgba(40, 46, 55, .08) !important;
  color: var(--juf-text-body,#282E37) !important;
  font-size: 10px !important;
}
.authors-page .juf-author-new-book-cover {
  width: 150px !important;
  height: 225px !important;
  filter: drop-shadow(0 14px 20px rgba(40, 46, 55, .12)) !important;
  transform: none !important;
}
.authors-page .juf-author-new-book-cover:hover {
  transform: translateY(-2px) !important;
  filter: drop-shadow(0 16px 22px rgba(40, 46, 55, .15)) !important;
}
.authors-page .juf-author-new-book-dots {
  left: 38px !important;
  bottom: 18px !important;
}
.authors-page .juf-author-new-book-dots button.is-active {
  background: #3B4256 !important;
}
.authors-page .juf-author-new-book-arrows {
  right: 22px !important;
  bottom: 15px !important;
}
.authors-page .juf-author-new-book-arrows button {
  width: 34px !important;
  height: 34px !important;
  border-color: rgba(40, 46, 55, .10) !important;
  background: rgba(255, 255, 255, .90) !important;
  color: var(--juf-text-strong,#282E37) !important;
  box-shadow: 0 7px 16px rgba(40, 46, 55, .04) !important;
}

@media (max-width: 1050px) {
  .authors-page .juf-author-genre-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .authors-page .juf-authors-grid-5 { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width: 760px) {
  .authors-page .juf-authors-cinematic-hero {
    height: 360px !important;
    min-height: 360px !important;
    margin: 14px 0 40px !important;
    border-radius: 20px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-item {
    grid-template-columns: minmax(0,1fr) 104px !important;
    gap: 14px !important;
    padding: 28px 18px 62px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-title {
    font-size: 30px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-author { font-size: 11.5px !important; }
  .authors-page .juf-authors-cinematic-hero .hero-slide-desc {
    font-size: 12px !important;
    line-height: 1.58 !important;
    -webkit-line-clamp: 2 !important;
    margin-bottom: 14px !important;
  }
  .authors-page .juf-author-hero-visual {
    width: 104px !important;
    min-width: 104px !important;
    min-height: 150px !important;
  }
  .authors-page .juf-author-hero-portrait-card,
  .authors-page .juf-author-hero-portrait-card > .juf-author-circle-img,
  .authors-page .juf-author-hero-portrait-card > .juf-author-art-avatar,
  .authors-page .juf-author-hero-portrait-card .juf-author-portrait-svg {
    width: 98px !important;
    height: 138px !important;
    border-radius: 16px !important;
  }
  .authors-page .juf-author-hero-arrows { right: 16px !important; bottom: 14px !important; }
  .authors-page .juf-author-hero-arrows .hero-cinematic-arrow-btn { width: 32px !important; height: 32px !important; }

  .authors-page .juf-authors-by-genre { margin-bottom: 38px !important; }
  .authors-page .juf-author-genre-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
  .authors-page .juf-author-genre-card { min-height: 82px !important; padding: 14px !important; border-radius: 15px !important; }
  .authors-page .juf-author-genre-card strong { font-size: 15px !important; }
  .authors-page .juf-author-genre-card small { font-size: 10px !important; }

  .authors-page .juf-author-discovery { margin-bottom: 42px !important; }
  .authors-page .juf-authors-grid-5 { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
  .authors-page .juf-author-directory-card { min-height: 190px !important; padding: 15px 9px !important; border-radius: 16px !important; }
  .authors-page .juf-author-directory-avatar { width: 82px !important; height: 82px !important; margin-bottom: 10px !important; }
  .authors-page .juf-author-directory-name { font-size: 15px !important; }
  .authors-page .juf-author-directory-en { font-size: 9.5px !important; }
  .authors-page .juf-author-directory-role,
  .authors-page .juf-author-directory-meta { font-size: 10px !important; }
  .authors-page .juf-author-alphabet { margin-bottom: 14px !important; }

  .authors-page .juf-author-new-book-story { padding-bottom: 36px !important; }
  .authors-page .juf-author-new-book-stage { min-height: 280px !important; border-radius: 18px !important; }
  .authors-page .juf-author-new-book-slide {
    padding: 22px 16px 54px !important;
    grid-template-columns: minmax(0,1fr) 94px !important;
    gap: 14px !important;
  }
  .authors-page .juf-author-new-book-copy h2 { font-size: 24px !important; }
  .authors-page .juf-author-new-book-author,
  .authors-page .juf-author-new-book-desc { font-size: 11px !important; }
  .authors-page .juf-author-new-book-desc { -webkit-line-clamp: 2 !important; }
  .authors-page .juf-author-new-book-cover { width: 86px !important; height: 129px !important; }
  .authors-page .juf-author-new-book-dots { left: 16px !important; bottom: 18px !important; }
  .authors-page .juf-author-new-book-arrows { right: 14px !important; bottom: 14px !important; }
  .authors-page .juf-author-new-book-arrows button { width: 30px !important; height: 30px !important; }
}

/* Phase29 author directory senior polish — clearer search, complete alphabet navigation, editorial cards. */
.authors-page .juf-author-directory-heading {
  margin-bottom: 16px !important;
  align-items: end !important;
}
.authors-page .juf-author-directory-summary {
  margin: 5px 0 0 !important;
  color: #5B6376 !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
}
.authors-page .juf-author-filter-panel {
  margin-bottom: 18px !important;
}
.authors-page .juf-author-directory-tools {
  display: grid !important;
  grid-template-columns: minmax(260px, 460px) auto auto !important;
  gap: 9px !important;
  align-items: start !important;
}
.authors-page .juf-author-search-submit,
.authors-page .juf-author-filter-apply {
  min-height: 42px !important;
  padding: 0 17px !important;
  border: 1px solid #3B4256 !important;
  border-radius: 12px !important;
  background: #3B4256 !important;
  color: #FFFFFF !important;
  font: 700 12px/1 var(--font-ui) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease !important;
}
.authors-page .juf-author-search-submit:hover,
.authors-page .juf-author-filter-apply:hover {
  background: #2C3243 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(59, 66, 86, .14) !important;
}
.authors-page .juf-author-filter-more {
  width: auto !important;
  position: relative !important;
}
.authors-page .juf-author-filter-more > summary {
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  gap: 6px !important;
  white-space: nowrap !important;
  list-style: none !important;
}
.authors-page .juf-author-filter-more > summary::-webkit-details-marker { display:none !important; }
.authors-page .juf-author-filter-more[open] {
}
.authors-page .juf-author-filter-more[open] > summary {
}
.authors-page .juf-author-filter-row {
  display: grid !important;
  grid-template-columns: repeat(4,minmax(145px,1fr)) auto auto !important;
  gap: 10px !important;
  align-items: end !important;
  margin-top: 9px !important;
  padding: 14px !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(40, 46, 55, .025) !important;
}
.authors-page .juf-author-filter-row label { min-width:0 !important; }
.authors-page .juf-author-filter-row select {
  width: 100% !important;
  min-height: 38px !important;
  border-color: rgba(40, 46, 55, .12) !important;
  border-radius: 10px !important;
  background: #F6F5F2 !important;
}
.authors-page .juf-author-filter-apply {
  min-height: 38px !important;
  padding-inline: 14px !important;
}
.authors-page .juf-author-clear-filter {
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  margin: 0 !important;
  color: #5B6376 !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.authors-page .juf-author-clear-filter:hover { color:var(--juf-text-strong,#282E37) !important; }

.authors-page .juf-author-alphabet {
  display: grid !important;
  gap: 10px !important;
  margin: 0 0 22px !important;
  padding: 13px 14px !important;
  overflow: visible !important;
  border: 1px solid rgba(40, 46, 55, .075) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .62) !important;
}
.authors-page .juf-author-alphabet-group {
  display: grid !important;
  grid-template-columns: 58px minmax(0,1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}
.authors-page .juf-author-alphabet-label {
  padding-top: 7px !important;
  color: #5B6376 !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
  letter-spacing: .02em !important;
}
.authors-page .juf-author-alphabet-links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  min-width: 0 !important;
}
.authors-page .juf-author-alphabet a {
  min-width: 30px !important;
  height: 30px !important;
  padding: 0 7px !important;
  border-radius: 8px !important;
  background: #FFFFFF !important;
  border-color: rgba(40, 46, 55, .085) !important;
  box-shadow: 0 2px 7px rgba(40, 46, 55, .018) !important;
  font-size: 11px !important;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease !important;
}
.authors-page .juf-author-alphabet a:hover {
  transform: translateY(-1px) !important;
  border-color: #D9D6D0 !important;
  background: #ECEAE6 !important;
  color: var(--juf-text-body,#282E37) !important;
}
.authors-page .juf-author-alphabet a.active {
  background: #3B4256 !important;
  color: #FFFFFF !important;
  border-color: #3B4256 !important;
  box-shadow: none !important;
}

.authors-page .juf-authors-grid-5 {
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: 14px !important;
}
.authors-page .juf-author-directory-card {
  position: relative !important;
  min-height: 246px !important;
  padding: 20px 16px 17px !important;
  justify-content: flex-start !important;
  border-radius: 20px !important;
  border: 1px solid rgba(59, 66, 86, .115) !important;
  background: #ECEAE6 !important;
  box-shadow: 0 10px 26px rgba(40, 46, 55, .035) !important;
  overflow: hidden !important;
}
.authors-page .juf-author-directory-card::after {
  content: "›" !important;
  position: absolute !important;
  right: 13px !important;
  top: 13px !important;
  width: 27px !important;
  height: 27px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(59, 66, 86, .10) !important;
  border-radius: 50% !important;
  background: #ECEAE6 !important;
  color: #5B6376 !important;
  font-size: 17px !important;
  opacity: 0 !important;
  transform: translateX(-3px) !important;
  transition: opacity .18s ease, transform .18s ease !important;
}
.authors-page .juf-author-directory-card:hover {
  transform: translateY(-3px) !important;
  border-color: #D9D6D0 !important;
  box-shadow: 0 16px 34px rgba(40, 46, 55, .065) !important;
}
.authors-page .juf-author-directory-card:hover::after {
  opacity: 1 !important;
  transform: none !important;
}
.authors-page .juf-author-directory-avatar {
  width: 108px !important;
  height: 108px !important;
  margin-bottom: 13px !important;
  padding: 4px !important;
  border: 1px solid #D9D6D0 !important;
  background: linear-gradient(145deg,#ECEAE6,#ECEAE6) !important;
  box-shadow: inset 0 0 0 5px #ECEAE6 !important;
}
.authors-page .juf-author-directory-avatar .author-art-char,
.authors-page .juf-author-directory-avatar .author-art-ring {
  display: none !important;
}
.authors-page .juf-author-directory-avatar .juf-author-art-avatar {
  background: var(--avatar-paper,#E4E6EC) !important;
}
.authors-page .juf-author-directory-name {
  width: 100% !important;
  min-height: 25px !important;
  color: #282E37 !important;
  text-wrap: balance !important;
}
.authors-page .juf-author-directory-en {
  width: 100% !important;
  color: #5B6376 !important;
  margin-top: 2px !important;
}
.authors-page .juf-author-directory-role {
  width: 100% !important;
  min-height: 18px !important;
  margin-top: 8px !important;
  color: #5B6376 !important;
}
.authors-page .juf-author-directory-meta {
  width: 100% !important;
  margin-top: auto !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(59, 66, 86, .075) !important;
  color: #282E37 !important;
  line-height: 1.45 !important;
}

@media (max-width: 1050px) {
  .authors-page .juf-author-directory-tools { grid-template-columns: minmax(240px,1fr) auto auto !important; }
  .authors-page .juf-author-filter-row { grid-template-columns: repeat(2,minmax(150px,1fr)) auto auto !important; }
  .authors-page .juf-authors-grid-5 { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width: 760px) {
  .authors-page .juf-author-directory-heading { margin-bottom: 12px !important; }
  .authors-page .juf-author-directory-tools {
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 7px !important;
  }
  .authors-page .juf-author-search-submit { padding-inline: 13px !important; }
  .authors-page .juf-author-filter-more { grid-column: 1 / -1 !important; }
  .authors-page .juf-author-filter-more > summary { min-height: 36px !important; padding-inline: 11px !important; }
  .authors-page .juf-author-filter-more[open] > summary { }
  .authors-page .juf-author-filter-row { grid-template-columns: 1fr 1fr !important; padding: 11px !important; }
  .authors-page .juf-author-filter-apply,
  .authors-page .juf-author-clear-filter { width: 100% !important; }
  .authors-page .juf-author-alphabet { padding: 11px !important; gap: 9px !important; }
  .authors-page .juf-author-alphabet-group { grid-template-columns: 1fr !important; gap: 5px !important; }
  .authors-page .juf-author-alphabet-label { padding-top: 0 !important; }
  .authors-page .juf-author-alphabet-links { flex-wrap: nowrap !important; overflow-x: auto !important; padding-bottom: 2px !important; scrollbar-width: none !important; }
  .authors-page .juf-author-alphabet-links::-webkit-scrollbar { display:none !important; }
  .authors-page .juf-authors-grid-5 { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
  .authors-page .juf-author-directory-card { min-height: 210px !important; padding: 15px 10px 13px !important; border-radius: 17px !important; }
  .authors-page .juf-author-directory-avatar { width: 84px !important; height: 84px !important; margin-bottom: 10px !important; }
  .authors-page .juf-author-directory-card::after { display:none !important; }
}
@media (max-width: 420px) {
  .authors-page .juf-author-directory-tools { grid-template-columns: 1fr !important; }
  .authors-page .juf-author-search-submit { width:100% !important; }
  .authors-page .juf-author-filter-more { grid-column:auto !important; }
  .authors-page .juf-author-filter-row { grid-template-columns: 1fr !important; }
  .authors-page .juf-authors-grid-5 { gap: 8px !important; }
  .authors-page .juf-author-directory-card { min-height: 205px !important; padding-inline: 8px !important; }
  .authors-page .juf-author-directory-avatar { width: 78px !important; height: 78px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .authors-page .juf-author-search-submit,
  .authors-page .juf-author-filter-apply,
  .authors-page .juf-author-alphabet a,
  .authors-page .juf-author-directory-card,
  .authors-page .juf-author-directory-card::after { transition: none !important; }
}


/* === MERGED: jufbook-global-search.css === */
/* JUFbook global universal search — persistent on every standard public page. */
body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
    grid-template-columns: minmax(126px,166px) minmax(0,1fr) minmax(230px,300px) !important;
    grid-template-areas: "brand nav search";
    gap: 18px !important;
}
body.juf-minimal-chrome .juf-brand-v24 { grid-area: brand; }
body.juf-minimal-chrome .juf-nav-v24 { grid-area: nav; min-width:0; }
body.juf-minimal-chrome .juf-global-search-v40 {
    grid-area: search;
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0,1fr) 30px;
    align-items: center;
    min-width: 0;
    height: 40px;
    padding: 0 6px 0 11px;
    border: 1px solid var(--juf-border);
    border-radius: 999px;
    background: var(--juf-surface-panel);
    box-shadow: none;
    z-index: 12;
}
body.juf-minimal-chrome .juf-global-search-v40:focus-within {
    border-color: var(--text-main);
    box-shadow: 0 0 0 3px rgba(40, 46, 55, .05);
}
body.juf-minimal-chrome .juf-global-search-icon-v40 {
    width: 18px; height:18px; fill:none; stroke:var(--text-muted); stroke-width:1.8; stroke-linecap:round;
}
body.juf-minimal-chrome .juf-global-search-v40 input {
    min-width:0; width:100%; height:38px; padding:0 8px; border:0!important; outline:0!important;
    background:transparent!important; color:var(--text-main)!important; font:500 12.5px/1 var(--font-ui)!important;
}
body.juf-minimal-chrome .juf-global-search-v40 input::placeholder { color:var(--muted)!important; opacity:1; }
body.juf-minimal-chrome .juf-global-search-v40 > button {
    width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center;
    border:0; border-radius:50%; background:var(--accent, #3B4256)!important; color:var(--on-accent, #F6F5F2)!important; cursor:pointer;
}
body.juf-minimal-chrome .juf-global-search-v40 > button svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
body.juf-minimal-chrome .juf-global-search-v40 > button:hover,
body.juf-minimal-chrome .juf-global-search-v40 > button:focus-visible { background:var(--accent-hover, #2C3243)!important; color:var(--on-accent, #F6F5F2)!important; }
body.juf-minimal-chrome .juf-global-search-results-v40 {
    position:absolute!important; top:calc(100% + 8px); left:0; right:0; width:100%; max-height:min(62vh,430px); overflow:auto;
    padding:7px!important; border:1px solid var(--juf-border)!important; border-radius:16px!important;
    background:var(--juf-surface-panel)!important; box-shadow:0 18px 48px rgba(40, 46, 55, .12)!important;
}
body.juf-minimal-chrome .juf-global-search-results-v40 .juf-search-suggestion { border-radius:10px; }

/* Page-specific catalogue controls are filters only; universal text search lives in the header. */
.audio-filter-bar,
.premium-filter-bar,
.category-discovery-bar { align-items:end; }
.audio-filter-bar { grid-template-columns: minmax(180px,1fr) auto !important; }
.premium-filter-bar { grid-template-columns: minmax(180px,1fr) auto !important; }
.category-discovery-bar { grid-template-columns: repeat(5,minmax(110px,1fr)) auto auto !important; }
.juf-author-filter-panel { padding-top:0!important; }
.juf-author-filter-panel > input[type="hidden"] + .juf-author-filter-more,
.juf-author-filter-panel > .juf-author-filter-more { margin-top:0!important; }

.juf-search-results-intro { padding-top:34px; padding-bottom:8px; }
.juf-search-results-intro h1 { margin:0 0 6px; font-size:clamp(30px,4vw,44px); }
.juf-search-results-intro p { margin:0; color:var(--text-muted); font-size:14px; }

@media (max-width:1180px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        grid-template-columns: minmax(110px,140px) minmax(0,1fr) minmax(190px,240px) !important;
        gap:10px!important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24 { padding-inline:7px!important; font-size:12.5px!important; }
}
@media (max-width:900px) {
    /* Build 241: keep the two-row mobile header compact. The previous 9px
       bottom padding left a visibly empty strip under the universal search. */
    body.juf-minimal-chrome .juf-header-v24 { padding-bottom:3px!important; }
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        display:flex!important; flex-wrap:wrap; align-items:center; min-height:52px; gap:8px 12px!important;
    }
    body.juf-minimal-chrome .juf-brand-v24 { order:1; }
    body.juf-minimal-chrome .juf-menu-v24 { order:2; margin-left:auto; }
    body.juf-minimal-chrome .juf-global-search-v40 {
        order:3; flex:0 0 100%; width:100%; height:42px; grid-template-columns:20px minmax(0,1fr) 32px;
    }
    body.juf-minimal-chrome .juf-nav-v24 { order:4; top:calc(100% + 1px)!important; }
    body.juf-minimal-chrome .juf-global-search-v40 input { font-size:13px!important; }
    body.juf-minimal-chrome .juf-global-search-results-v40 { max-height:52vh; }
    .audio-filter-bar,
    .premium-filter-bar,
    .category-discovery-bar { grid-template-columns:1fr!important; }
}
@media (max-width:640px) {
    body.juf-minimal-chrome .juf-global-search-v40 { border-radius:14px; padding-left:10px; }
    .juf-search-results-intro { padding-top:24px; }
    .juf-search-results-intro h1 { font-size:30px; }
}


/* ===== 2026-09-14 header information-architecture polish =====
   Desktop order: Logo → navigation → Global Search → Login/account.
   Mobile: Logo + menu on row one; Global Search stays full-width on row two. */
@media (min-width: 901px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        display: grid !important;
        grid-template-columns: minmax(126px,166px) minmax(360px,1fr) minmax(270px,320px) auto !important;
        grid-template-areas: "brand primary search actions" !important;
        align-items: center !important;
        gap: 16px !important;
    }
    body.juf-minimal-chrome .juf-brand-v24 { grid-area: brand !important; }
    /* Let nav's two semantic groups participate directly in the header grid. */
    body.juf-minimal-chrome .juf-nav-v24 { display: contents !important; }
    body.juf-minimal-chrome .juf-nav-primary-v24 {
        grid-area: primary !important;
        min-width: 0;
        justify-self: start;
        flex-wrap: nowrap;
    }
    body.juf-minimal-chrome .juf-global-search-v40 {
        grid-area: search !important;
        width: 100%;
        max-width: 320px;
        justify-self: end;
    }
    body.juf-minimal-chrome .juf-nav-actions-v24 {
        grid-area: actions !important;
        justify-self: end;
        white-space: nowrap;
    }
}
@media (min-width: 901px) and (max-width: 1180px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        grid-template-columns: minmax(112px,140px) minmax(315px,1fr) minmax(210px,260px) auto !important;
        gap: 10px !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24 {
        padding-inline: 7px !important;
        font-size: 12.5px !important;
    }
}
@media (max-width: 900px) {
    /* Restore the menu panel; desktop display:contents must never leak into mobile. */
    body.juf-minimal-chrome .juf-nav-v24 {
        display: none !important;
        order: 4;
    }
    body.juf-minimal-chrome .juf-nav-v24.is-open { display: flex !important; }
    body.juf-minimal-chrome .juf-global-search-v40 { order: 3; }
}


/* 2026-09-14 — Header search + login premium polish
   Refine the header search field and primary login CTA so they feel cleaner,
   more modern, and more premium without changing IA or behavior. */
body.juf-minimal-chrome .juf-global-search-v40 {
    grid-template-columns: 22px minmax(0,1fr) 34px !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 7px 0 14px !important;
    border: 1px solid rgba(59, 66, 86, .18) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 245, 242, .96)) !important;
    box-shadow: 0 8px 18px rgba(40, 46, 55, .045), inset 0 1px 0 rgba(255, 255, 255, .72) !important;
}
body.juf-minimal-chrome .juf-global-search-v40:hover {
    border-color: rgba(59, 66, 86, .24) !important;
}
body.juf-minimal-chrome .juf-global-search-v40:focus-within {
    border-color: color-mix(in srgb, var(--accent-rust) 58%, #fff) !important;
    box-shadow: 0 0 0 3px rgba(59, 66, 86, .09), 0 10px 22px rgba(40, 46, 55, .055), inset 0 1px 0 rgba(255, 255, 255, .78) !important;
}
body.juf-minimal-chrome .juf-global-search-icon-v40 {
    width: 18px !important;
    height: 18px !important;
    stroke: #5B6376 !important;
    opacity: 1 !important;
}
body.juf-minimal-chrome .juf-global-search-v40 input {
    height: 44px !important;
    padding: 0 10px !important;
    font: 500 13px/1 var(--font-ui-system) !important;
    letter-spacing: 0 !important;
}
body.juf-minimal-chrome .juf-global-search-v40 input::placeholder {
    color: #5B6376 !important;
    opacity: 1 !important;
}
body.juf-minimal-chrome .juf-global-search-v40 > button {
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #3B4256, #3B4256) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(40, 46, 55, .18), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}
body.juf-minimal-chrome .juf-global-search-v40 > button svg {
    width: 17px !important;
    height: 17px !important;
    stroke-width: 2.05 !important;
}
body.juf-minimal-chrome .juf-global-search-v40 > button:hover,
body.juf-minimal-chrome .juf-global-search-v40 > button:focus-visible {
    background: linear-gradient(180deg, #2C3243, #2C3243) !important;
    transform: translateX(1px) !important;
    box-shadow: 0 8px 16px rgba(40, 46, 55, .22), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}
body.juf-minimal-chrome .juf-global-search-results-v40 {
    top: calc(100% + 10px) !important;
    border-radius: 18px !important;
    border-color: rgba(59, 66, 86, .14) !important;
    box-shadow: 0 22px 48px rgba(40, 46, 55, .12) !important;
}
@media (min-width: 901px) {
    body.juf-minimal-chrome .juf-global-search-v40 {
        max-width: 360px !important;
    }
}
@media (max-width: 900px) {
    body.juf-minimal-chrome .juf-global-search-v40 {
        min-height: 44px !important;
        height: 44px !important;
        grid-template-columns: 20px minmax(0,1fr) 32px !important;
        padding-left: 12px !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 input {
        height: 42px !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 > button {
        width: 32px !important;
        height: 32px !important;
    }
}


/* ==========================================================================
   BUILD 362 — DESKTOP HEADER 6-LINK NAVIGATION & GLOBAL SEARCH NON-OVERLAP FIX
   Prevents the 6th navigation item ("পাঠকের লেখা") from wrapping onto two lines
   or colliding with the left edge of `.juf-global-search-v40` when all nav items
   plus user/admin actions ("আপনার পাঠঘর", "অ্যাডমিন", notifications, theme, logout)
   are simultaneously visible on desktop (`image_46d7e0.png`, `image_46d8b5.png`).
   ========================================================================== */
@media (min-width: 901px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) minmax(180px, 240px) auto !important;
        grid-template-areas: "brand primary search actions" !important;
        align-items: center !important;
        gap: 12px !important;
    }
    body.juf-minimal-chrome .juf-brand-v24 {
        grid-area: brand !important;
        flex-shrink: 0 !important;
    }
    body.juf-minimal-chrome .juf-nav-primary-v24 {
        grid-area: primary !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        gap: 2px !important;
        min-width: max-content !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24 {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 7px 9px !important;
        font-size: 13.5px !important;
        line-height: 1.2 !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24 {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 6px 11px !important;
        font-size: 13px !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 {
        grid-area: search !important;
        width: 100% !important;
        min-width: 175px !important;
        max-width: 240px !important;
        justify-self: end !important;
    }
    body.juf-minimal-chrome .juf-nav-actions-v24 {
        grid-area: actions !important;
        display: inline-flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
        gap: 6px !important;
        white-space: nowrap !important;
    }
    body.juf-minimal-chrome .juf-user-chip-v24 {
        padding: 4px 10px 4px 5px !important;
        flex-shrink: 0 !important;
    }
    body.juf-minimal-chrome .juf-admin-link-v24 {
        padding: 0 11px !important;
        min-height: 36px !important;
        font-size: 12.5px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
}
@media (min-width: 1240px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        grid-template-columns: auto minmax(0, 1fr) minmax(205px, 260px) auto !important;
        gap: 14px !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 {
        max-width: 260px !important;
    }
}
@media (min-width: 901px) and (max-width: 1140px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        grid-template-columns: auto minmax(0, 1fr) minmax(155px, 195px) auto !important;
        gap: 8px !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24 {
        padding: 6px 6px !important;
        font-size: 12.5px !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-premium-nav-v24 {
        padding: 5px 9px !important;
        font-size: 12px !important;
    }
    body.juf-minimal-chrome .juf-user-copy-v24 small {
        display: none !important;
    }
}


/* ==========================================================================
   BUILD 363 — CRISP DESKTOP SEARCH SUGGESTION THUMBNAILS & HEADER GRID FIX
   1. Fixes blurry author/book thumbnails in `.juf-global-search-results-v40`
      (`image_47c571.png`, `image_47c930.png`) by sizing `.is-author` to exact
      `52px × 60px` (matching the 2x `104×120` / 4x `208×240` Lanczos + unsharp
      server-generated thumbnails) and `.is-book` / `.is-audio` to `46px × 64px`
      (matching the 2x `92×128` / 4x `184×256` thumbnails).
   2. Removes `transform: translateX(1px)` on `.juf-search-suggestion:hover` so
      Chrome/Edge on Windows never promotes suggestion rows to a subpixel GPU
      layer that blurs raster `<img>` thumbnails.
   3. Uses `grid-template-columns: auto max-content minmax(140px, 1fr) max-content !important`
      on `.juf-header-shell` at `@media (min-width: 901px)` so CSS Grid always
      allocates full `max-content` width to the 6 primary navigation items FIRST,
      making it impossible for "পাঠকের লেখা" to wrap or get overlapped by the search bar.
   ========================================================================== */
@media (min-width: 901px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        display: grid !important;
        grid-template-columns: auto max-content minmax(180px, 1fr) max-content !important;
        grid-template-areas: "brand primary search actions" !important;
        align-items: center !important;
        gap: 14px !important;
    }
    body.juf-minimal-chrome .juf-nav-primary-v24 {
        grid-area: primary !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        width: max-content !important;
        min-width: max-content !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24 {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 7px 8.5px !important;
        font-size: 13.5px !important;
        line-height: 1.2 !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 {
        grid-area: search !important;
        width: 100% !important;
        min-width: 170px !important;
        max-width: 280px !important;
        justify-self: end !important;
    }
}
@media (min-width: 1200px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        grid-template-columns: auto max-content minmax(220px, 1fr) max-content !important;
        gap: 18px !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 {
        max-width: 330px !important;
    }
}

/* Crisp Search Suggestion Thumbnails (Desktop & Mobile) */
body.juf-minimal-chrome .juf-global-search-v40 .juf-global-search-results-v40 {
    width: min(456px, calc(100vw - 24px)) !important;
    max-width: 456px !important;
}
.juf-search-suggestion {
    grid-template-columns: 54px minmax(0, 1fr) 20px !important;
    gap: 12px !important;
    min-height: 68px !important;
    padding: 7px 10px !important;
    transform: none !important;
    transition: background-color .15s ease !important;
}
.juf-search-suggestion:hover,
.juf-search-suggestion.is-active {
    transform: none !important;
}
.juf-search-suggestion-visual.is-book,
.juf-search-suggestion-visual.is-audio {
    width: 46px !important;
    height: 64px !important;
    border-radius: 7px !important;
}
.juf-search-suggestion-visual.is-author,
.authors-page .juf-author-search-suggestions .juf-search-suggestion-visual.is-author {
    width: 52px !important;
    height: 60px !important;
    border-radius: 11px !important;
    background: #ECEAE6 !important;
    border: 1px solid rgba(59, 66, 86, 0.16) !important;
}
html[data-theme="dark"] .juf-search-suggestion-visual.is-author,
html[data-theme="dark"] .authors-page .juf-author-search-suggestions .juf-search-suggestion-visual.is-author {
    background: #2C3037 !important;
    border-color: rgba(246, 245, 242, 0.14) !important;
}
.juf-search-suggestion-visual img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    image-rendering: -webkit-optimize-contrast;
    transform: none !important;
}

/* ==========================================================================
   Build 539 — Clean, Uncluttered Desktop & Mobile Search Results Dropdown
   Fixes (1000170792.jpg, 1000170793.jpg, 1000170794.jpg):
   1. Removes heavy grey card blocks (#ECEAE6) and beige 3rd-line highlight
      bars (em) from search suggestion items.
   2. Aligns desktop dropdown cleanly to the right edge of the header search
      bar (width: 396px) and full width (100%) on mobile.
   3. Keeps compact, crisp 2-line/3-line hierarchy with a sticky bottom
      "সব ফলাফল দেখুন →" bar so results never look cut off at the bottom.
   ========================================================================== */
html body.juf-minimal-chrome .juf-search-suggestions,
html body.juf-minimal-chrome .juf-global-search-results-v40,
html body .juf-author-search-suggestions {
    background: #FFFFFF !important;
    border: 1px solid rgba(40, 46, 55, 0.12) !important;
    border-radius: 16px !important;
    padding: 6px 8px 0 !important;
    box-shadow: 0 18px 44px rgba(23, 32, 51, 0.14) !important;
    max-height: min(68vh, 450px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

html[data-theme="dark"] body.juf-minimal-chrome .juf-search-suggestions,
html[data-theme="dark"] body.juf-minimal-chrome .juf-global-search-results-v40,
html[data-theme="dark"] body .juf-author-search-suggestions {
    background: #23262B !important;
    border-color: #3A3F47 !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42) !important;
}

@media (min-width: 901px) {
    html body.juf-minimal-chrome .juf-global-search-v40 {
        max-width: 280px !important;
    }
    html body.juf-minimal-chrome .juf-global-search-v40 .juf-global-search-results-v40 {
        left: auto !important;
        right: 0 !important;
        width: 396px !important;
        max-width: calc(100vw - 32px) !important;
    }
}

@media (max-width: 900px) {
    html body.juf-minimal-chrome .juf-global-search-v40 .juf-global-search-results-v40 {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: min(64vh, 410px) !important;
    }
}

html body .juf-search-suggestion-group-title {
    min-height: 24px !important;
    padding: 7px 8px 3px !important;
    margin-top: 2px !important;
    font: 700 11.5px/1.2 var(--font-ui-system, sans-serif) !important;
    color: #5B6376 !important;
    background: transparent !important;
    border-top: 1px solid rgba(40, 46, 55, 0.07) !important;
}

html body .juf-search-suggestion-group-title:first-child {
    border-top: 0 !important;
    margin-top: 0 !important;
    padding-top: 4px !important;
}

html[data-theme="dark"] body .juf-search-suggestion-group-title {
    color: #A09B94 !important;
    border-top-color: rgba(255, 255, 255, 0.07) !important;
}

html body .juf-search-suggestion,
html body.juf-2d-minimal .juf-search-suggestion {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 18px !important;
    gap: 11px !important;
    align-items: center !important;
    min-height: 56px !important;
    padding: 6px 8px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(40, 46, 55, 0.055) !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body .juf-search-suggestion,
html[data-theme="dark"] body.juf-2d-minimal .juf-search-suggestion {
    background: transparent !important;
    border-bottom-color: rgba(255, 255, 255, 0.055) !important;
}

html body .juf-search-suggestion:hover,
html body .juf-search-suggestion.is-active,
html body.juf-2d-minimal .juf-search-suggestion:hover,
html body.juf-2d-minimal .juf-search-suggestion.is-active {
    background: #F3F1EC !important;
}

html[data-theme="dark"] body .juf-search-suggestion:hover,
html[data-theme="dark"] body .juf-search-suggestion.is-active,
html[data-theme="dark"] body.juf-2d-minimal .juf-search-suggestion:hover,
html[data-theme="dark"] body.juf-2d-minimal .juf-search-suggestion.is-active {
    background: #2C3037 !important;
}

html body .juf-search-suggestion-visual.is-book,
html body .juf-search-suggestion-visual.is-audio {
    width: 38px !important;
    height: 52px !important;
    border-radius: 6px !important;
}

html body .juf-search-suggestion-visual.is-author,
html body .authors-page .juf-author-search-suggestions .juf-search-suggestion-visual.is-author {
    width: 42px !important;
    height: 48px !important;
    border-radius: 9px !important;
}

html body .juf-search-suggestion-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5px !important;
    min-width: 0 !important;
}

html body .juf-search-suggestion-copy strong {
    font: 700 13.5px/1.3 var(--font-heading, sans-serif) !important;
    color: #1E2430 !important;
    background: transparent !important;
}

html[data-theme="dark"] body .juf-search-suggestion-copy strong {
    color: #ECE8E1 !important;
}

html body .juf-search-suggestion-copy small {
    font: 500 12px/1.25 var(--font-ui-system, sans-serif) !important;
    color: #525B6C !important;
    background: transparent !important;
}

html[data-theme="dark"] body .juf-search-suggestion-copy small {
    color: #B4BCCB !important;
}

html body .juf-search-suggestion-copy em {
    font: 500 11px/1.25 var(--font-ui-system, sans-serif) !important;
    color: #747D8F !important;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
}

html[data-theme="dark"] body .juf-search-suggestion-copy em {
    color: #939CAD !important;
    background: transparent !important;
}

/* Sticky bottom "সব ফলাফল দেখুন →" bar so it is never cut off */
html body .juf-search-suggestion-all {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 40px !important;
    margin: 4px -8px 0 !important;
    padding: 8px 14px !important;
    border: 0 !important;
    border-top: 1px solid rgba(40, 46, 55, 0.10) !important;
    border-radius: 0 0 15px 15px !important;
    background: #FAF9F6 !important;
    color: #2845A8 !important;
    font: 700 13px/1.2 var(--font-ui-system, sans-serif) !important;
}

html[data-theme="dark"] body .juf-search-suggestion-all {
    background: #1E2126 !important;
    border-top-color: #3A3F47 !important;
    color: #93C5FD !important;
}


/* === MERGED: jufbook-typography-system.css === */
/* JUFbook — Public typography scale authority, Build 238.
   Font roles come from jufbook-font-role-system.css.
   This file controls restrained sizes/leading only; layout rules below are preserved. */

:root {
    --juf-font-ui: var(--font-ui-system, 'Noto Sans Bengali','Kalpurush','SolaimanLipi', sans-serif);
    --juf-font-heading: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif);
    --juf-font-reader: var(--font-reading, 'SolaimanLipi', serif);

    --juf-fs-display: clamp(2.125rem, 3vw, 2.5rem);    /* 34–40 */
    --juf-fs-h1: clamp(2rem, 2.6vw, 2.25rem);          /* 32–36 */
    --juf-fs-h2: clamp(1.5625rem, 2vw, 1.8125rem);     /* 25–29 */
    --juf-fs-h3: clamp(1.25rem, 1.55vw, 1.375rem);     /* 20–22 */
    --juf-fs-card: 1.125rem;                           /* 18 */
    --juf-fs-body: 1.0625rem;                          /* 17 */
    --juf-fs-lead: 1.125rem;                           /* 18 */
    --juf-fs-ui: .9375rem;                             /* 15 */
    --juf-fs-meta: .8125rem;                           /* 13 */
    --juf-fs-small: .78125rem;                         /* 12.5 */

    --juf-lh-display: 1.16;
    --juf-lh-heading: 1.28;
    --juf-lh-body: 1.72;
    --juf-lh-meta: 1.48;
}

html { font-size: 16px; }
body { font-family: var(--font-reading, 'SolaimanLipi', serif); font-size: var(--juf-fs-body); line-height: var(--juf-lh-body); }
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(p,li,dd,dt,figcaption,blockquote) { font-family: var(--font-reading, 'SolaimanLipi', serif); }

/* ---------- Semantic heading hierarchy ---------- */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(h1,h2,h3,h4,h5,h6,.page-section-title,.hero-slide-title,.book-title,.author-name,.juf-catalog-title,.book-under-title,.juf-author-profile-card-name) {
    font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important;
    letter-spacing: normal !important;
    text-wrap: balance;
}
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main h1 { font-size: var(--juf-fs-h1) !important; line-height: 1.2 !important; font-weight: 500 !important; }
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :where(h2,.page-section-title) { font-size: var(--juf-fs-h2) !important; line-height: 1.28 !important; font-weight: 500 !important; }
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main h3 { font-size: var(--juf-fs-h3) !important; line-height: 1.32 !important; font-weight: 500 !important; }
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main h4 { font-size: var(--juf-fs-card) !important; line-height: 1.38 !important; font-weight: 500 !important; }
body:not(.reader-page):not(.person-profile-page):not(.book-system-page):not(.writings-page) .site-main p:not(.testimonial-quote-text):not(.juf-review-lead-text) { font-size: var(--juf-fs-body) !important; line-height: var(--juf-lh-body) !important; }

/* Card metadata is interface text, rather than reading prose. Keep its semantic
   size after the generic paragraph authority, including populated audio rails. */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main :is(.audio-media-details p,.audio-media-duration,.audio-new-copy p) {
    font-size: var(--juf-fs-meta) !important;
    line-height: var(--juf-lh-meta) !important;
    font-family: var(--juf-font-ui) !important;
}

/* Hero/display titles remain literary, but no oversized poster typography. */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(.hero-slide-title,.premium-hero h1,.juf-books-hero h1,.juf-search-shell .site-main h1,.juf-authors-cinematic-hero .hero-slide-title) {
    font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important;
    font-size: var(--juf-fs-display) !important;
    line-height: var(--juf-lh-display) !important;
    font-weight: 500 !important;
    letter-spacing: normal !important;
}

/* ---------- Interface typography ---------- */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(
    button,input,select,textarea,label,summary,
    .juf-nav-link-v24,.juf-login-btn-v24,.juf-user-chip-v24,
    .btn-hero-cinematic-primary,.btn-hero-cinematic-secondary,
    .premium-primary-btn,.premium-secondary-btn,
    .section-view-all,.sub-tab-item,.juf-library-category-chip,
    .juf-author-alphabet a,.juf-filter-reset,.juf-active-filter-note
) { font-family: var(--juf-font-ui) !important; }

body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(input,select,textarea) { font-size: 1rem !important; line-height: 1.4 !important; }
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(button,.btn-hero-cinematic-primary,.btn-hero-cinematic-secondary,.premium-primary-btn,.premium-secondary-btn,.juf-login-btn-v24) {
    font-size: .875rem !important; line-height: 1.35 !important; font-weight: 500 !important;
}
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(.juf-nav-link-v24,.juf-global-search-v40 input,.juf-global-search-v40 button) {
    font-size: .875rem !important; font-weight: 500 !important;
}

/* ---------- Shared metadata and cards ---------- */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(
    .juf-catalog-author,.book-under-author,.juf-catalog-card-foot,
    .audio-media-details p,.audio-media-duration,.audio-row-author,.audio-row-meta,
    .premium-book-copy>p,.premium-library-heading>strong,
    .book-details-meta,.juf-author-profile-en,.juf-author-meta-chips,
    .approved-review-meta,.notification-card-meta,.profile-kicker,
    .juf-footer-bottom-v24,.juf-footer-tagline-v24
) {
    font-family: var(--juf-font-ui) !important;
    font-size: var(--juf-fs-meta) !important;
    line-height: var(--juf-lh-meta) !important;
}
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(
    .juf-catalog-title,.book-under-title,
    .audio-media-details h4,.premium-book-copy h3,.profile-card-copy h3
) {
    font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important;
    font-size: var(--juf-fs-card) !important;
    line-height: 1.34 !important;
    font-weight: 500 !important;
}

/* Small labels may be compact, but never micro-text. */
body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(
    .premium-eyebrow,.premium-plan-badge,.premium-plan-duration,.premium-plan-access-type,
    .premium-book-copy>span,.premium-unlocked-chip,
    .audio-media-kicker,.audio-player-provider,.audio-collection-card-copy small,
    .juf-author-discovery-kicker,.home-author-discovery-kicker,
    .book-meta-audio-pill,.book-meta-premium-pill,.book-meta-access,.book-meta-views,
    .notification-unread-dot,.notification-toolbar nav a span,
    .section-overline-label,.juf-search-suggestion span
) {
    font-family: var(--juf-font-ui) !important;
    font-size: var(--juf-fs-small) !important;
    line-height: 1.4 !important;
    letter-spacing: .02em !important;
}

/* ---------- Homepage ---------- */
.juf-homepage :where(.section-title-wrap-flex,.books-showcase-head) h2 { font-size: clamp(25px,2vw,29px) !important; }
.juf-homepage .hero-slide-author { font-family: var(--juf-font-ui) !important; font-size: .875rem !important; line-height: 1.5 !important; }
.juf-homepage .hero-slide-desc { font-family: var(--font-reading) !important; font-size: clamp(17.5px,1.25vw,18.5px) !important; line-height: 1.72 !important; max-width: 62ch; }
.juf-homepage .home-author-discovery-card.is-visual .home-author-discovery-copy h3 { font-size: 1.125rem !important; }
.juf-homepage .home-author-discovery-card.is-visual .home-author-discovery-copy p { font-size: .8125rem !important; line-height: 1.55 !important; }
.juf-homepage .audio-media-details h4 { font-size: .9375rem !important; }
.juf-homepage .audio-media-details p,.juf-homepage .audio-media-duration { font-size: .8125rem !important; }
.juf-homepage .genre-graphic-card :where(strong,h3) { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; font-size: .9375rem !important; line-height: 1.3 !important; }
.juf-homepage .genre-graphic-card :where(small,span) { font-family: var(--juf-font-ui) !important; font-size: .75rem !important; line-height: 1.4 !important; }
.juf-homepage .showcase-card-item .book-under-title { font-size: 1rem !important; }
.juf-homepage .showcase-card-item :where(.book-under-author,.book-rating-gold) { font-size: .8125rem !important; }
.juf-homepage .testimonial-card-white :where(p,.testimonial-text) { font-size: 1rem !important; line-height: 1.65 !important; }
.juf-homepage .newsletter-premium-wrapper :where(input,button) { font-size: .9375rem !important; }

/* ---------- Unified Books Library ---------- */
.juf-books-page .juf-library-hero p { font-family:var(--font-reading)!important; font-size: clamp(17.5px,1.25vw,18.5px) !important; line-height: 1.72 !important; }
.juf-books-page .juf-library-category-chip { font-size: .8125rem !important; }
.juf-books-page .juf-books-filter :where(label,select,input,button,a) { font-size: .875rem !important; }
.juf-books-page .juf-catalog-title { font-size: clamp(18px,1.45vw,21px) !important; }
.juf-books-page .juf-catalog-author { font-size: 15px !important; }
.juf-books-page .juf-catalog-card-foot { font-size: .75rem !important; }

/* ---------- Authors ---------- */
.authors-page .juf-authors-cinematic-hero .hero-slide-title { font-size: clamp(32px,3vw,38px) !important; }
.authors-page .juf-authors-cinematic-hero .hero-slide-author { font-size: .875rem !important; }
.authors-page .juf-authors-cinematic-hero .hero-slide-desc { font-family:var(--font-reading)!important; font-size: clamp(17.5px,1.25vw,18.5px) !important; line-height: 1.72 !important; }
.authors-page .juf-author-genre-card strong { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; font-size: 1.0625rem !important; }
.authors-page .juf-author-genre-card small { font-family: var(--juf-font-ui) !important; font-size: .8125rem !important; }
.authors-page .juf-author-search-row input { font-size: 1rem !important; }
.authors-page .juf-author-directory-name { font-size: clamp(17px,1.35vw,19px) !important; font-weight:500!important; }
.authors-page :where(.juf-author-directory-en,.juf-author-directory-role,.juf-author-directory-meta) { font-size: .8125rem !important; }
.authors-page .juf-author-new-book-author,.authors-page .juf-author-new-book-meta { font-size: .8125rem !important; }
.authors-page .juf-author-new-book-desc { font-size: .9375rem !important; line-height: 1.6 !important; }

/* ---------- Author detail ---------- */
.juf-author-profile-page .juf-author-profile-lead { font-size: 1rem !important; line-height: 1.68 !important; max-width: 68ch; }
.juf-author-profile-page .juf-author-profile-en { font-size: .875rem !important; }
.juf-author-profile-page .juf-author-bio-grid p { font-size: 1rem !important; line-height: 1.72 !important; }
.juf-author-profile-page .juf-author-bio-grid { max-width: 72ch; }

/* ---------- Audiobook ---------- */
.audiobook-page .audio-hub-hero-copy>p { font-size: 1rem !important; line-height: 1.65 !important; }
.audiobook-page .audio-collection-card-copy strong { font-size: .9375rem !important; }
.audiobook-page .audio-collection-card-copy :where(small,em) { font-size: .75rem !important; line-height: 1.4 !important; }
.audiobook-page .audio-library-table-head { font-size: .75rem !important; }
.audiobook-page :where(.audio-row-title,.audio-player-panel h2) { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; font-size: 1.0625rem !important; line-height: 1.35 !important; }
.audiobook-page :where(.audio-row-author,.audio-row-meta,.audio-player-panel>p,.audio-player-panel .juf-player-tools,.audio-player-panel .juf-player-timeline) { font-size: .8125rem !important; line-height: 1.45 !important; }

/* ---------- Premium ---------- */
.premium-page .premium-hero p { font-size: 1rem !important; line-height: 1.68 !important; }
.premium-page .premium-hero-proof span { font-size: .8125rem !important; }
.premium-page .premium-hero-proof strong { font-size: 1.25rem !important; }
.premium-page .premium-section-heading p,.premium-page .premium-pass-muted p { font-size: .9375rem !important; line-height: 1.65 !important; }
.premium-page .premium-plan-card h3 { font-size: 1.375rem !important; }
.premium-page .premium-plan-card>p,.premium-page .premium-plan-card li { font-size: .875rem !important; line-height: 1.58 !important; }
.premium-page .premium-plan-price span { font-size: .8125rem !important; }
.premium-page .premium-filter-bar :where(input,select,button) { font-size: .875rem !important; }
.premium-page .premium-book-copy h3 { font-size: 1.0625rem !important; }
.premium-page .premium-book-copy>p,.premium-page .premium-book-copy>div a { font-size: .8125rem !important; }
.premium-page .premium-trust-grid h3 { font-size: 1rem !important; }
.premium-page .premium-trust-grid p { font-size: .875rem !important; line-height: 1.6 !important; }
.premium-page .premium-faq-list summary { font-size: 1rem !important; }
.premium-page .premium-faq-list p { font-size: .9375rem !important; line-height: 1.68 !important; }

/* ---------- Search ---------- */
.juf-search-shell .juf-search-summary,.juf-search-shell .juf-search-empty p { font-size: 1rem !important; line-height: 1.62 !important; }
.juf-search-shell .juf-search-group h2 { font-size: 1.625rem !important; }
.juf-search-shell .juf-search-result-title { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; font-size: 1.0625rem !important; }
.juf-search-shell :where(.juf-search-result-meta,.juf-search-result-type) { font-size: .8125rem !important; line-height: 1.45 !important; }

/* ---------- Book details ---------- */

/* ---------- Account/profile/notifications/support ---------- */
:where(.profile-hub,.notification-page-shell,.support-page,.contact-page,.juf-policy-shell,.account-social-grid) p { font-size: 1rem !important; line-height: 1.66 !important; }
:where(.profile-hub,.notification-page-shell,.support-page,.contact-page,.juf-policy-shell) :where(.profile-hub-heading h2,.page-section-title,.support-page-head h1) { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; }
.profile-hub :where(.profile-card-copy h3,.profile-hub-section h3) { font-size: 1.0625rem !important; }
.profile-hub :where(.profile-kicker,.profile-card-copy small,.profile-history-list small) { font-size: .8125rem !important; }
.notification-page-shell .notification-card-copy>p { font-size: .9375rem !important; line-height: 1.6 !important; }
.notification-page-shell .notification-card-meta { font-size: .8125rem !important; }
.juf-policy-shell { max-width: 72ch; }
.juf-policy-shell :where(p,li) { font-size: 1rem !important; line-height: 1.75 !important; }

/* ---------- Auth ---------- */
.juf-reader-auth-page :where(.reader-auth-form-head-v27 h1,.reader-auth-form-head-v27 h2) { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; font-size: clamp(1.875rem,3vw,2.125rem) !important; line-height: 1.2 !important; }
.juf-reader-auth-page :where(.reader-auth-form-head-v27 p,.reader-auth-form-v27>p) { font-size: .9375rem !important; line-height: 1.6 !important; }
.juf-reader-auth-page .reader-auth-form-v27 label>span:first-child { font-size: .875rem !important; }
.juf-reader-auth-page .reader-auth-form-v27 :where(input,button) { font-size: 1rem !important; }
.juf-reader-auth-page :where(.reader-auth-legal-v27,.reader-auth-switch-v27) { font-size: .8125rem !important; line-height: 1.55 !important; }

/* ---------- Checkout / payment ---------- */
.checkout-page :where(.checkout-head h1,.juf-checkout-form-side-v32 h1) { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; font-size: clamp(1.875rem,3vw,2.25rem) !important; line-height: 1.2 !important; }
.checkout-page :where(.checkout-section h2,.juf-checkout-section-head-v32 h2) { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; font-size: 1.25rem !important; }
.checkout-page :where(.juf-checkout-field-v32>span:first-child,.checkout-field label) { font-size: .875rem !important; }
.checkout-page :where(input,select,textarea) { font-size: 1rem !important; }
.checkout-page :where(.juf-checkout-method-note-v32,.juf-checkout-digital-note-v32 small,.juf-checkout-summary-rows-v32>div,.juf-checkout-access-v32,.juf-checkout-secure-v32,.juf-checkout-legal-v32,.checkout-help-copy,.checkout-legal-copy,.checkout-footnote) {
    font-size: .8125rem !important; line-height: 1.55 !important;
}
.checkout-page .juf-checkout-product-copy-v32>strong { font-size: .9375rem !important; }
.checkout-page .juf-checkout-product-copy-v32>span { font-size: .75rem !important; }

/* ---------- Footer ---------- */
.juf-footer-v24 :where(a,p,span) { font-family: var(--juf-font-ui) !important; }
.juf-footer-v24 .juf-footer-kicker-v24 { font-size: .875rem !important; }
.juf-footer-v24 .juf-footer-tagline-v24 { font-size: .8125rem !important; line-height: 1.55 !important; }
.juf-footer-v24 .juf-footer-column-v24 a { font-size: .8125rem !important; }
.juf-footer-v24 .juf-footer-bottom-v24 p { font-size: .75rem !important; }

/* ---------- Reader ---------- */
/* Reader body/measure defaults are owned by reader.css and its responsive component. */
body.reader-page { font-family:var(--juf-font-ui)!important; }
body.reader-page #reader-content-body p { margin-bottom: var(--reader-paragraph-spacing, 1.38em); }
body.reader-page #reader-content-body :where(h2,h3,h4) { font-family: var(--font-heading-editorial, 'Kalpurush', 'SolaimanLipi', serif) !important; line-height: 1.4 !important; }
body.reader-page :where(.reader-toolbar-title strong,.reader-audio-copy strong,.reader-toc-part-heading strong) { font-size: .8125rem !important; }
body.reader-page :where(.reader-toolbar-title small,.reader-overline,.reader-chapter-meta,.reader-annotations-subtitle,.reader-annotation-title>span:last-child,.reader-annotation-hint,.reader-annotation-jump small,.reader-annotation-delete,.reader-selection-menu>span,.reader-audio-copy small,.reader-toc-summary,.reader-mobile-nav button span,.reader-identity-label,.reader-identity-copy>span:not(.reader-identity-label),.reader-identity-copy>small,.reader-identity-actions a,.reader-setting-checks label) {
    font-family: var(--juf-font-ui) !important;
    font-size: .75rem !important;
    line-height: 1.45 !important;
}
body.reader-page :where(.reader-text-btn,.reader-icon-btn,.reader-theme-btn,.reader-audio-control-row select) { font-family: var(--juf-font-ui) !important; font-size: .8125rem !important; }

/* ---------- Mobile ---------- */
@media (max-width: 620px) {
    :root {
        --juf-fs-display: clamp(2rem, 9vw, 2.25rem);   /* 32–36 */
        --juf-fs-h1: clamp(1.875rem, 8vw, 2.125rem);  /* 30–34 */
        --juf-fs-h2: clamp(1.4375rem, 6.4vw, 1.625rem); /* 23–26 */
        --juf-fs-h3: clamp(1.125rem, 5vw, 1.25rem);   /* 18–20 */
        --juf-fs-card: 1rem;
        --juf-fs-body: 1rem;
        --juf-fs-ui: .875rem;
        --juf-fs-meta: .8125rem;
        --juf-fs-small: .75rem;
    }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) .site-main { font-size: 1rem !important; line-height: 1.62 !important; }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page):not(.writings-page) .site-main p:not(.testimonial-quote-text):not(.juf-review-lead-text) { font-size: 1rem !important; line-height: 1.62 !important; }
    body:not(.reader-page):not(.person-profile-page):not(.book-system-page) :where(input,select,textarea) { font-size: 1rem !important; }
    .juf-homepage :where(.section-title-wrap-flex,.books-showcase-head) h2 { font-size: 1.5rem !important; }
    .juf-homepage .home-author-discovery-card.is-visual .home-author-discovery-copy p { font-size: .8125rem !important; }
    .juf-footer-v24 .juf-footer-tagline-v24,.juf-footer-v24 .juf-footer-column-v24 a { font-size: .8125rem !important; }
    body.reader-page { --reader-font-size: 1.125rem; --reader-line-height: 1.78; }
    body.reader-page #reader-content-body { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    body { text-rendering: optimizeLegibility; }
}

/* 2026-09-14 — Authors directory modern search toolbar final override */
.authors-page .juf-author-discovery {
  padding-top: clamp(34px, 4vw, 52px) !important;
}
.authors-page .juf-author-directory-heading {
  margin-bottom: 14px !important;
  align-items: flex-end !important;
}
.authors-page .juf-author-directory-heading .page-section-title {
  margin: 0 !important;
  font-size: clamp(1.75rem, 2.8vw, 2.2rem) !important;
  line-height: 1.15 !important;
  letter-spacing: normal !important;
}
.authors-page .juf-author-directory-summary {
  margin: 6px 0 0 !important;
  color: #5B6376 !important;
  font: 500 .8125rem/1.4 var(--font-ui) !important;
}
.authors-page .juf-author-filter-panel {
  margin: 0 0 16px !important;
  padding: 10px !important;
  border: 1px solid rgba(59, 66, 86, .105) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 10px 28px rgba(40, 46, 55, .035) !important;
  backdrop-filter: blur(8px) !important;
}
.authors-page .juf-author-directory-tools {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 104px 108px !important;
  gap: 8px !important;
  align-items: center !important;
}
.authors-page .juf-author-filter-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.authors-page .juf-author-search-submit {
  width: 104px !important;
  min-width: 104px !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 16px !important;
  border: 1px solid #3B4256 !important;
  border-radius: 13px !important;
  background: #3B4256 !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  font: 700 .8125rem/1 var(--font-ui) !important;
}
.authors-page .juf-author-search-submit:hover {
  background: #2C3243 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 18px rgba(59, 66, 86, .13) !important;
}
.authors-page .juf-author-filter-more {
  width: 108px !important;
  min-width: 108px !important;
  position: relative !important;
}
.authors-page .juf-author-filter-more > summary {
  width: 108px !important;
  min-width: 108px !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 1px solid #D9D6D0 !important;
  border-radius: 13px !important;
  background: #ECEAE6 !important;
  color: #282E37 !important;
  font: 700 .8125rem/1 var(--font-ui) !important;
  cursor: pointer !important;
  box-shadow: none !important;
  list-style: none !important;
}
.authors-page .juf-author-filter-more > summary:hover {
  border-color: #D9D6D0 !important;
  background: #ECEAE6 !important;
}
.authors-page .juf-author-filter-icon {
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 17px !important;
  display: inline-flex !important;
  color: #5B6376 !important;
}
.authors-page .juf-author-filter-more[open] {
  min-width: 0 !important;
}
.authors-page .juf-author-filter-more[open] > summary {
  min-width: 108px !important;
}
.authors-page .juf-author-filter-row {
  margin-top: 0 !important;
  padding: 12px !important;
  border: 1px solid rgba(59, 66, 86, .09) !important;
  border-radius: 14px !important;
  background: #F6F5F2 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .authors-page .juf-author-directory-heading .page-section-title {
    font-size: 1.8rem !important;
  }
  .authors-page .juf-author-filter-panel {
    padding: 8px !important;
    border-radius: 15px !important;
  }
  .authors-page .juf-author-directory-tools {
    grid-template-columns: minmax(0,1fr) 92px !important;
    gap: 7px !important;
  }
  .authors-page .juf-author-search-submit {
    min-height: 46px !important;
    height: 46px !important;
  }
  .authors-page .juf-author-search-submit {
    width: 92px !important;
    min-width: 92px !important;
    padding-inline: 12px !important;
  }
  .authors-page .juf-author-filter-more {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .authors-page .juf-author-filter-more > summary,
  .authors-page .juf-author-filter-more[open] > summary {
    min-width: 102px !important;
    height: 42px !important;
    min-height: 42px !important;
  }
  .authors-page .juf-author-filter-more[open] > summary {
  }
}
@media (max-width: 440px) {
  .authors-page .juf-author-directory-tools {
    grid-template-columns: 1fr !important;
  }
  .authors-page .juf-author-search-submit {
    width: 100% !important;
    min-width: 0 !important;
  }
  .authors-page .juf-author-filter-more,
  .authors-page .juf-author-filter-more > summary,
  .authors-page .juf-author-filter-more[open] > summary {
    min-width: 0 !important;
  }
  .authors-page .juf-author-filter-more[open] > summary { }
}

/* =========================================================
   2026-09-14 — Visual predictive search (Google/Gemini-style entity suggestions)
   Shared by the global header search and scoped Author search.
   ========================================================= */
.juf-search-suggestions {
  max-height: min(66vh, 520px) !important;
  padding: 8px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  border: 1px solid rgba(59, 66, 86, .13) !important;
  border-radius: 18px !important;
  background: rgba(246, 245, 242, .985) !important;
  box-shadow: 0 22px 54px rgba(40, 46, 55, .13) !important;
  text-align: left !important;
  scrollbar-width: thin !important;
  scrollbar-color: #E4E6EC transparent !important;
}
.juf-search-suggestions[hidden] { display: none !important; }
.juf-search-suggestion-group-title {
  display: flex !important;
  align-items: center !important;
  min-height: 26px !important;
  padding: 6px 9px 4px !important;
  color: #5B6376 !important;
  font: 500 12.5px/1.25 var(--font-ui-system) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
.juf-search-suggestion {
  display: grid !important;
  grid-template-columns: 46px minmax(0,1fr) 20px !important;
  gap: 11px !important;
  align-items: center !important;
  min-height: 62px !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #282E37 !important;
  text-decoration: none !important;
  transition: background .15s ease, transform .15s ease !important;
}
.juf-search-suggestion + .juf-search-suggestion { margin-top: 2px !important; }
.juf-search-suggestion:hover,
.juf-search-suggestion.is-active {
  background: #ECEAE6 !important;
  transform: translateX(1px) !important;
}
.juf-search-suggestion-visual {
  position: relative !important;
  width: 44px !important;
  height: 48px !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  flex: none !important;
  padding: 0 !important;
  border: 1px solid rgba(59, 66, 86, .10) !important;
  border-radius: 11px !important;
  background: linear-gradient(145deg,#ECEAE6,#E4E6EC) !important;
  color: #5B6376 !important;
  font: 800 1rem/1 var(--font-heading) !important;
}
.juf-search-suggestion-visual.is-book,
.juf-search-suggestion-visual.is-audio {
  width: 38px !important;
  height: 52px !important;
  justify-self: center !important;
  border-radius: 6px !important;
}
.juf-search-suggestion-visual.is-author {
  width: 44px !important;
  height: 52px !important;
  border-radius: 10px !important;
}
.juf-search-suggestion-visual.is-category {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: #ECEAE6 !important;
}
.juf-search-suggestion-visual img {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center top !important;
}
.juf-search-suggestion-visual.has-image .juf-search-suggestion-fallback { opacity: 0 !important; }
.juf-search-suggestion-fallback {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
}
.juf-search-suggestion-play {
  position: absolute !important;
  right: 3px !important;
  bottom: 3px !important;
  z-index: 4 !important;
  width: 17px !important;
  height: 17px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  border-radius: 50% !important;
  background: #3B4256 !important;
  color: #fff !important;
  font: 700 6px/1 var(--font-ui) !important;
  box-shadow: 0 2px 6px rgba(40, 46, 55, .16) !important;
}
.juf-search-suggestion-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
}
.juf-search-suggestion-copy strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #282E37 !important;
  font: 700 .86rem/1.34 var(--font-heading) !important;
}
.juf-search-suggestion-copy small,
.juf-search-suggestion-copy em {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-style: normal !important;
}
.juf-search-suggestion-copy small {
  color: #5B6376 !important;
  font: 500 .72rem/1.35 var(--font-ui) !important;
}
.juf-search-suggestion-copy em {
  color: #3B4256 !important;
  font: 600 .64rem/1.35 var(--font-ui) !important;
}
.juf-search-suggestion-arrow {
  display: grid !important;
  place-items: center !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #5B6376 !important;
  font: 500 1.15rem/1 var(--font-ui) !important;
}
.juf-search-suggestion:hover .juf-search-suggestion-arrow,
.juf-search-suggestion.is-active .juf-search-suggestion-arrow { color: #2C3243 !important; }
.juf-search-suggestion-all {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 40px !important;
  margin-top: 6px !important;
  padding: 0 11px !important;
  border-top: 1px solid rgba(59, 66, 86, .08) !important;
  border-radius: 9px !important;
  color: #282E37 !important;
  text-decoration: none !important;
  font: 750 .73rem/1.25 var(--font-ui) !important;
}
.juf-search-suggestion-all:hover,
.juf-search-suggestion-all.is-active { background: #ECEAE6 !important; color: #2C3243 !important; }
.juf-search-suggestion-all b { color: currentColor !important; font-size: .9rem !important; }
.juf-search-empty,
.juf-search-partial-note {
  padding: 13px 12px !important;
  color: #5B6376 !important;
  font: 500 .76rem/1.55 var(--font-ui) !important;
  white-space: normal !important;
}
.juf-search-empty.is-error { color: #3B4256 !important; }
.juf-search-partial-note {
  border-top: 1px solid rgba(59, 66, 86, .07) !important;
  font-size: .68rem !important;
}
.juf-search-skeletons { display: grid !important; gap: 5px !important; padding: 3px !important; }
.juf-search-skeleton-row {
  display: grid !important;
  grid-template-columns: 44px minmax(0,1fr) !important;
  gap: 11px !important;
  align-items: center !important;
  min-height: 58px !important;
  padding: 6px !important;
}
.juf-search-skeleton-row > i {
  width: 42px !important;
  height: 48px !important;
  border-radius: 9px !important;
  background: linear-gradient(100deg,#ECEAE6 25%,#ECEAE6 45%,#ECEAE6 65%) !important;
  background-size: 220% 100% !important;
  animation: juf-skeleton-sweep 1.35s ease-in-out infinite !important;
}
.juf-search-skeleton-row > span { display: grid !important; gap: 7px !important; padding: 0 !important; background: transparent !important; }
.juf-search-skeleton-row b,
.juf-search-skeleton-row em {
  display: block !important;
  height: 9px !important;
  border-radius: 999px !important;
  background: linear-gradient(100deg,#ECEAE6 25%,#ECEAE6 45%,#ECEAE6 65%) !important;
  background-size: 220% 100% !important;
  animation: juf-skeleton-sweep 1.35s ease-in-out infinite !important;
}
.juf-search-skeleton-row b { width: 58% !important; }
.juf-search-skeleton-row em { width: 38% !important; height: 7px !important; }

/* Author-page search owns a scoped profile suggestion panel. */
.authors-page .juf-author-search-suggestions {
  top: calc(100% + 9px) !important;
  left: -1px !important;
  right: -1px !important;
  min-width: min(520px, calc(100vw - 32px)) !important;
  max-width: 560px !important;
  z-index: 120 !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion {
  grid-template-columns: 44px minmax(0,1fr) 20px !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-visual.is-author {
  width: 42px !important;
  height: 50px !important;
}

/* Global header search remains compact but the opened panel can be wider than the input. */
body.juf-minimal-chrome .juf-global-search-v40 .juf-global-search-results-v40 {
  left: auto !important;
  right: 0 !important;
  width: min(430px, calc(100vw - 24px)) !important;
  max-width: 430px !important;
  padding: 8px !important;
}

@media (max-width: 760px) {
  .juf-search-suggestions { border-radius: 15px !important; padding: 6px !important; }
  .juf-search-suggestion { grid-template-columns: 42px minmax(0,1fr) 16px !important; gap: 9px !important; min-height: 58px !important; padding: 6px 7px !important; }
  .juf-search-suggestion-visual.is-book,
  .juf-search-suggestion-visual.is-audio { width: 34px !important; height: 48px !important; }
  .juf-search-suggestion-visual.is-author { width: 40px !important; height: 48px !important; }
  .juf-search-suggestion-copy strong { font-size: .82rem !important; }
  .juf-search-suggestion-copy small { font-size: .68rem !important; }
  .juf-search-suggestion-copy em { font-size: .61rem !important; }
  .authors-page .juf-author-search-suggestions {
    left: 0 !important;
    right: auto !important;
    width: min(520px, calc(100vw - 36px)) !important;
    min-width: 0 !important;
  }
  body.juf-minimal-chrome .juf-global-search-v40 .juf-global-search-results-v40 {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .juf-search-suggestion,
  .juf-search-skeleton-row > i,
  .juf-search-skeleton-row b,
  .juf-search-skeleton-row em { animation: none !important; transition: none !important; }
}
.juf-search-suggestion-visual.is-book:not(.has-image),
.juf-search-suggestion-visual.is-audio:not(.has-image) {
  background: linear-gradient(155deg, color-mix(in srgb,var(--suggest-color,#3B4256) 72%,#ECEAE6), color-mix(in srgb,var(--suggest-color,#3B4256) 88%,#3B4256)) !important;
  color: #F6F5F2 !important;
  border-color: color-mix(in srgb,var(--suggest-color,#3B4256) 72%,#3B4256) !important;
  box-shadow: inset 3px 0 rgba(255, 255, 255, .18), inset -1px 0 rgba(0, 0, 0, .12) !important;
}


/* 2026-09-15 — Mobile hero proportion polish
   Homepage: preserve current typography; enlarge/reposition the book cover.
   Authors: reduce oversized title and give the portrait proper hero weight.
   Desktop/tablet >=721px intentionally untouched. */
@media (max-width: 720px) {
  /* Homepage book hero — text stays as-is; image becomes a real hero visual. */
  .juf-homepage .hero-cinematic-stage {
    min-height: 216px !important;
    height: 216px !important;
    max-height: 216px !important;
    margin: 10px 0 22px !important;
    border-radius: 18px !important;
  }
  .juf-homepage .hero-cinematic-slider {
    min-height: 216px !important;
    height: 216px !important;
    max-height: 216px !important;
  }
  .juf-homepage .hero-slide-item {
    height: 216px !important;
    min-height: 216px !important;
    max-height: 216px !important;
    grid-template-columns: minmax(0,1fr) 106px !important;
    gap: 14px !important;
    align-items: center !important;
    align-content: center !important;
    padding: 16px 16px !important;
    text-align: left !important;
  }
  .juf-homepage .hero-slide-info {
    order: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: left !important;
  }
  .juf-homepage .hero-slide-visual {
    order: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    width: clamp(124px, 34vw, 146px) !important;
    min-width: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .juf-homepage .hero-slide-visual .hero-jacket {
    width: clamp(124px, 34vw, 146px) !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2 / 3 !important;
    border-radius: 8px !important;
    box-shadow: 0 14px 28px rgba(40, 46, 55, .14), 0 4px 9px rgba(40, 46, 55, .08) !important;
  }
  .juf-homepage .hero-slide-visual .hero-jacket .juf-book-cover-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  .juf-homepage .hero-thumb-queue { display: none !important; }
  .juf-homepage .hero-cinematic-arrows {
    left: 18px !important;
    right: auto !important;
    bottom: 16px !important;
    transform: none !important;
    display: flex !important;
  }
  .juf-homepage .hero-cinematic-arrow-btn {
    width: 38px !important;
    height: 38px !important;
  }

  /* Authors hero — professional mobile hierarchy: calmer title, larger portrait. */
  .authors-page .juf-authors-cinematic-hero {
    min-height: 390px !important;
    height: 390px !important;
    margin: 14px 0 34px !important;
    border-radius: 20px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-item {
    grid-template-columns: minmax(0,1fr) clamp(130px, 35vw, 150px) !important;
    gap: 14px !important;
    align-items: center !important;
    align-content: center !important;
    padding: 26px 18px 66px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-info {
    min-width: 0 !important;
    text-align: left !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-title {
    font-size: clamp(28px, 8.4vw, 34px) !important;
    line-height: 1.10 !important;
    letter-spacing: normal !important;
    margin: 0 0 9px !important;
    text-wrap: balance !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-author {
    font-size: 11.5px !important;
    line-height: 1.45 !important;
    margin-bottom: 8px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-desc {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    font-size: 11.5px !important;
    line-height: 1.58 !important;
    margin: 10px 0 14px !important;
  }
  .authors-page .juf-author-hero-visual {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    width: clamp(130px, 35vw, 150px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .authors-page .juf-author-hero-portrait-card {
    width: clamp(130px, 35vw, 150px) !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 28px rgba(40, 46, 55, .12), 0 4px 9px rgba(40, 46, 55, .07) !important;
  }
  .authors-page .juf-author-hero-portrait-card > .juf-author-circle-img,
  .authors-page .juf-author-hero-portrait-card > .juf-author-art-avatar,
  .authors-page .juf-author-hero-portrait-card .juf-author-portrait-svg {
    width: 100% !important;
    height: 100% !important;
    border-radius: 16px !important;
  }
  .authors-page .juf-author-hero-portrait-card > .juf-author-circle-img {
    object-fit: cover !important;
    object-position: center top !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-actions .btn-hero-cinematic-primary {
    min-height: 42px !important;
    padding: 9px 15px !important;
    font-size: 12px !important;
  }
  .authors-page .juf-author-hero-arrows {
    right: 16px !important;
    bottom: 15px !important;
  }
  .authors-page .juf-author-hero-arrows .hero-cinematic-arrow-btn {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 390px) {
  .juf-homepage .hero-slide-item {
    grid-template-columns: minmax(0,1fr) 118px !important;
    gap: 12px !important;
    padding-inline: 15px !important;
  }
  .juf-homepage .hero-slide-visual,
  .juf-homepage .hero-slide-visual .hero-jacket {
    width: 118px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-item {
    grid-template-columns: minmax(0,1fr) 126px !important;
    gap: 12px !important;
    padding-inline: 16px !important;
  }
  .authors-page .juf-author-hero-visual,
  .authors-page .juf-author-hero-portrait-card {
    width: 126px !important;
  }
  .authors-page .juf-authors-cinematic-hero .hero-slide-title {
    font-size: clamp(27px, 8vw, 31px) !important;
  }
}

/* 2026-09-15 — Authors directory mobile premium UX polish
   Desktop stays unchanged. Mobile becomes browse-first: compact genres,
   inline search + filter, language-tab alphabet, tighter premium cards. */
.authors-page .juf-author-alphabet-tabs { display:none; }
.authors-page .juf-author-new-book-section-head {
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:16px;
    margin:0 0 14px;
}
.authors-page .juf-author-new-book-section-head span {
    display:block;
    color:var(--accent-rust);
    font:500 12.5px/1.2 var(--font-ui-system);
    letter-spacing:normal;
}
.authors-page .juf-author-new-book-section-head h2 {
    margin:4px 0 0;
    font:500 26px/1.2 var(--font-heading);
}
.authors-page .juf-author-new-book-section-head p {
    margin:0;
    color:var(--text-muted);
    font-size:12px;
}

@media (max-width:760px) {
    .authors-page .juf-authors-by-genre {
        margin-top:4px !important;
        margin-bottom:34px !important;
    }
    .authors-page .juf-authors-by-genre .juf-author-discovery-head {
        margin-bottom:10px !important;
    }
    .authors-page .juf-author-genre-grid {
        display:flex !important;
        grid-template-columns:none !important;
        gap:10px !important;
        overflow-x:auto !important;
        overscroll-behavior-inline:contain;
        scroll-snap-type:x proximity;
        scrollbar-width:none;
        padding:2px 1px 8px !important;
    }
    .authors-page .juf-author-genre-grid::-webkit-scrollbar { display:none; }
    .authors-page .juf-author-genre-card {
        flex:0 0 154px !important;
        min-height:76px !important;
        padding:13px 14px !important;
        border-radius:16px !important;
        scroll-snap-align:start;
        box-shadow:0 8px 18px rgba(40, 46, 55, .035) !important;
    }
    .authors-page .juf-author-genre-card strong {
        font-size:15px !important;
        line-height:1.28 !important;
    }
    .authors-page .juf-author-genre-card small {
        margin-top:6px !important;
        font-size:10px !important;
    }

    .authors-page .juf-author-discovery {
        padding-top:6px !important;
    }
    .authors-page .juf-author-directory-heading {
        margin-bottom:10px !important;
        align-items:end !important;
    }
    .authors-page .juf-author-directory-heading .page-section-title {
        font-size:26px !important;
        line-height:1.15 !important;
    }
    .authors-page .juf-author-directory-summary {
        margin-top:4px !important;
        font-size:11px !important;
        line-height:1.45 !important;
    }
    .authors-page .juf-author-filter-panel {
        margin-bottom:12px !important;
        padding:0 !important;
        border:0 !important;
        background:transparent !important;
        box-shadow:none !important;
    }
    .authors-page .juf-author-directory-tools {
        grid-template-columns:minmax(0,1fr) 44px !important;
        gap:8px !important;
        align-items:start !important;
    }
    .authors-page .juf-author-search-submit { display:none !important; }
    .authors-page .juf-author-filter-more {
        grid-column:2 !important;
        width:44px !important;
        margin:0 !important;
    }
    .authors-page .juf-author-filter-more > summary {
        width:44px !important;
        min-width:44px !important;
        height:46px !important;
        min-height:46px !important;
        padding:0 !important;
        display:grid !important;
        place-items:center !important;
        border:1px solid rgba(59, 66, 86, .14) !important;
        border-radius:14px !important;
        background:#fff !important;
        box-shadow:0 7px 18px rgba(40, 46, 55, .03) !important;
        cursor:pointer;
    }
    .authors-page .juf-author-filter-more > summary > span:last-child { display:none !important; }
    .authors-page .juf-author-filter-icon {
        display:grid !important;
        place-items:center !important;
        width:18px;
        height:18px;
    }
    .authors-page .juf-author-filter-icon svg {
        width:18px;
        height:18px;
        fill:none;
        stroke:currentColor;
        stroke-width:1.7;
        stroke-linecap:round;
    }
    .authors-page .juf-author-filter-more[open] {
    }
    .authors-page .juf-author-filter-more[open] > summary {
    }
    .authors-page .juf-author-filter-row {
        grid-template-columns:1fr 1fr !important;
        gap:8px !important;
        margin:0 !important;
        padding:12px !important;
        border:1px solid rgba(59, 66, 86, .09) !important;
        border-radius:15px !important;
        background:#ECEAE6 !important;
        box-shadow:0 10px 24px rgba(40, 46, 55, .035) !important;
    }
    .authors-page .juf-author-filter-row label span { font-size:9.5px !important; }
    .authors-page .juf-author-filter-row select { min-height:40px !important; }
    .authors-page .juf-author-filter-apply,
    .authors-page .juf-author-clear-filter { min-height:40px !important; }

    .authors-page .juf-author-alphabet {
        display:block !important;
        margin:0 0 16px !important;
        padding:9px !important;
        border-radius:15px !important;
        overflow:hidden !important;
        background:rgba(255, 255, 255, .66) !important;
    }
    .authors-page .juf-author-alphabet-tabs {
        display:flex !important;
        gap:5px;
        margin-bottom:8px;
        padding:3px;
        border-radius:11px;
        background:#ECEAE6;
    }
    .authors-page .juf-author-alphabet-tabs button {
        flex:1;
        min-height:32px;
        border:0;
        border-radius:9px;
        background:transparent;
        color:#5B6376;
        font:500 12.5px/1 var(--font-ui-system);
        cursor:pointer;
    }
    .authors-page .juf-author-alphabet-tabs button.is-active {
        background:#fff;
        color:#282E37;
        box-shadow:0 3px 9px rgba(40, 46, 55, .055);
    }
    .authors-page .juf-author-alphabet-group {
        display:none !important;
        grid-template-columns:1fr !important;
        gap:0 !important;
    }
    .authors-page .juf-author-alphabet-group.is-alpha-active { display:grid !important; }
    .authors-page .juf-author-alphabet-label { display:none !important; }
    .authors-page .juf-author-alphabet-links {
        display:flex !important;
        flex-wrap:nowrap !important;
        overflow-x:auto !important;
        gap:5px !important;
        padding:1px 0 3px !important;
        scrollbar-width:none;
    }
    .authors-page .juf-author-alphabet-links::-webkit-scrollbar { display:none; }
    .authors-page .juf-author-alphabet a {
        flex:0 0 32px !important;
        min-width:32px !important;
        height:32px !important;
        padding:0 !important;
        border-radius:9px !important;
        font-size:11px !important;
    }

    .authors-page .juf-authors-grid-5 {
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:12px !important;
    }
    .authors-page .juf-author-directory-card {
        min-height:286px !important;
        padding:12px 10px 13px !important;
        border-radius:18px !important;
        box-shadow:0 10px 24px rgba(40, 46, 55, .035) !important;
    }
    .authors-page .juf-author-directory-avatar,
    .authors-page .juf-author-directory-avatar.has-photo,
    .authors-page .juf-author-directory-avatar.is-photo-missing {
        width:min(100%,124px) !important;
        height:152px !important;
        margin:0 auto 12px !important;
        border-radius:14px !important;
    }
    .authors-page .juf-author-directory-avatar > *,
    .authors-page .juf-author-directory-avatar .juf-author-art-avatar,
    .authors-page .juf-author-directory-avatar .juf-author-circle-img {
        border-radius:14px !important;
    }
    .authors-page .juf-author-directory-name {
        min-height:40px !important;
        font-size:15px !important;
        line-height:1.3 !important;
    }
    .authors-page .juf-author-directory-en {
        display:block !important;
        min-height:16px !important;
        margin-top:5px !important;
        font-size:9.5px !important;
        line-height:1.35 !important;
    }
    .authors-page .juf-author-directory-role { display:none !important; }
    .authors-page .juf-author-directory-meta {
        margin-top:9px !important;
        padding-top:0 !important;
        border-top:0 !important;
        font-size:10px !important;
        line-height:1.35 !important;
        color:#5B6376 !important;
    }

    .authors-page .juf-author-new-book-story { padding:6px 0 38px !important; }
    .authors-page .juf-author-new-book-section-head {
        align-items:end;
        margin-bottom:10px;
    }
    .authors-page .juf-author-new-book-section-head h2 { font-size:23px; }
    .authors-page .juf-author-new-book-section-head p { display:none; }
    .authors-page .juf-author-new-book-stage {
        min-height:330px !important;
        border-radius:18px !important;
    }
    .authors-page .juf-author-new-book-slide {
        padding:22px 16px 54px !important;
        grid-template-columns:minmax(0,1fr) 100px !important;
        gap:12px !important;
    }
    .authors-page .juf-author-new-book-copy h2 { font-size:25px !important; }
    .authors-page .juf-author-new-book-desc { -webkit-line-clamp:2 !important; }
    .authors-page .juf-author-new-book-cover {
        width:96px !important;
        height:144px !important;
        transform:none !important;
        filter:drop-shadow(0 10px 13px rgba(40, 46, 55, .10)) !important;
    }
}

@media (max-width:420px) {
    .authors-page .juf-author-directory-tools { grid-template-columns:minmax(0,1fr) 44px !important; }
    .authors-page .juf-author-filter-more { grid-column:2 !important; }
    .authors-page .juf-author-filter-more[open] { }
    .authors-page .juf-author-filter-row { grid-template-columns:1fr !important; }
    .authors-page .juf-author-genre-card { flex-basis:146px !important; }
    .authors-page .juf-author-directory-card { min-height:272px !important; padding-inline:9px !important; }
    .authors-page .juf-author-directory-avatar,
    .authors-page .juf-author-directory-avatar.has-photo,
    .authors-page .juf-author-directory-avatar.is-photo-missing {
        width:min(100%,116px) !important;
        height:142px !important;
    }
    .authors-page .juf-author-directory-name { font-size:14.5px !important; }
}


/* ==========================================================================
   BUILD 363 — CRISP DESKTOP SEARCH SUGGESTION THUMBNAILS & HEADER GRID FIX
   1. Fixes blurry author/book thumbnails in `.juf-global-search-results-v40`
      (`image_47c571.png`, `image_47c930.png`) by sizing `.is-author` to exact
      `52px × 60px` (matching the 2x `104×120` / 4x `208×240` Lanczos + unsharp
      server-generated thumbnails) and `.is-book` / `.is-audio` to `46px × 64px`
      (matching the 2x `92×128` / 4x `184×256` thumbnails).
   2. Removes `transform: translateX(1px)` on `.juf-search-suggestion:hover` so
      Chrome/Edge on Windows never promotes suggestion rows to a subpixel GPU
      layer that blurs raster `<img>` thumbnails.
   3. Uses `grid-template-columns: auto max-content minmax(140px, 1fr) max-content !important`
      on `.juf-header-shell` at `@media (min-width: 901px)` so CSS Grid always
      allocates full `max-content` width to the 6 primary navigation items FIRST,
      making it impossible for "পাঠকের লেখা" to wrap or get overlapped by the search bar.
   ========================================================================== */
@media (min-width: 901px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        display: grid !important;
        grid-template-columns: auto max-content minmax(180px, 1fr) max-content !important;
        grid-template-areas: "brand primary search actions" !important;
        align-items: center !important;
        gap: 14px !important;
    }
    body.juf-minimal-chrome .juf-nav-primary-v24 {
        grid-area: primary !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        width: max-content !important;
        min-width: max-content !important;
    }
    body.juf-minimal-chrome .juf-nav-v24 .juf-nav-link-v24 {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 7px 8.5px !important;
        font-size: 13.5px !important;
        line-height: 1.2 !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 {
        grid-area: search !important;
        width: 100% !important;
        min-width: 170px !important;
        max-width: 280px !important;
        justify-self: end !important;
    }
}
@media (min-width: 1200px) {
    body.juf-minimal-chrome .juf-header-v24 .juf-header-shell {
        grid-template-columns: auto max-content minmax(220px, 1fr) max-content !important;
        gap: 18px !important;
    }
    body.juf-minimal-chrome .juf-global-search-v40 {
        max-width: 330px !important;
    }
}

/* Crisp Search Suggestion Thumbnails (Desktop & Mobile) */
body.juf-minimal-chrome .juf-global-search-v40 .juf-global-search-results-v40 {
    width: min(456px, calc(100vw - 24px)) !important;
    max-width: 456px !important;
}
.juf-search-suggestion {
    grid-template-columns: 54px minmax(0, 1fr) 20px !important;
    gap: 12px !important;
    min-height: 68px !important;
    padding: 7px 10px !important;
    transform: none !important;
    transition: background-color .15s ease !important;
}
.juf-search-suggestion:hover,
.juf-search-suggestion.is-active {
    transform: none !important;
}
.juf-search-suggestion-visual.is-book,
.juf-search-suggestion-visual.is-audio {
    width: 46px !important;
    height: 64px !important;
    border-radius: 7px !important;
}
.juf-search-suggestion-visual.is-author,
.authors-page .juf-author-search-suggestions .juf-search-suggestion-visual.is-author {
    width: 52px !important;
    height: 60px !important;
    border-radius: 11px !important;
    background: #ECEAE6 !important;
    border: 1px solid rgba(59, 66, 86, 0.16) !important;
}
html[data-theme="dark"] .juf-search-suggestion-visual.is-author,
html[data-theme="dark"] .authors-page .juf-author-search-suggestions .juf-search-suggestion-visual.is-author {
    background: #2C3037 !important;
    border-color: rgba(246, 245, 242, 0.14) !important;
}
.juf-search-suggestion-visual img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    image-rendering: -webkit-optimize-contrast;
    transform: none !important;
}


/* === MERGED: auth-polish-v32.css === */
/* ==========================================================================
   JUFbook Authentication Polish v32 — 2026-09-14
   Shared reader/admin authentication family. UI-only; auth logic remains in PHP.
   ========================================================================== */

:root {
    --juf-auth-bg: #ECEAE6;
    --juf-auth-surface: #FFFFFF;
    --juf-auth-text: #3B4256;
    --juf-auth-muted: #3B4256;
    --juf-auth-border: #D9D6D0;
    --juf-auth-border-strong: #D9D6D0;
    --juf-auth-accent: #3B4256;
    --juf-auth-accent-hover: #2C3243;
    --juf-auth-accent-soft: #ECEAE6;
    --juf-auth-focus: rgba(59, 66, 86, .18);
    --juf-auth-shadow: 0 28px 72px rgba(40, 46, 55, .12);
    --juf-auth-font: 'Noto Sans Bengali','Kalpurush','SolaimanLipi', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Shared icon treatment. */
.juf-auth-field-icon-v32 svg,
.admin-auth-portal-badge-v31 svg,
.admin-auth-security-note-v32 svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.juf-auth-skip-v32 {
    position: fixed;
    z-index: 9999;
    left: 16px;
    top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #2C3243;
    color: #fff !important;
    font: 700 13px/1.2 var(--juf-auth-font);
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform .18s ease;
}
.juf-auth-skip-v32:focus { transform: translateY(0); }

/* --------------------------------------------------------------------------
   Reader login / register
   -------------------------------------------------------------------------- */
body.juf-reader-auth-page {
    min-height: 100vh;
    background: var(--juf-auth-bg) !important;
    color: var(--juf-auth-text) !important;
    font-family: var(--juf-auth-font) !important;
}
body.juf-reader-auth-page .site-main {
    width: 100%;
    max-width: none !important;
    min-height: 100vh;
    padding: clamp(20px, 4vh, 40px) clamp(18px, 3vw, 36px) !important;
    display: grid !important;
    align-items: center;
}
body.juf-reader-auth-page .reader-login-reference-v31 {
    width: min(1140px, 100%);
    margin: 0 auto;
}
body.juf-reader-auth-page .reader-auth-shell-v27 {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
    min-height: min(650px, calc(100vh - 64px));
    overflow: hidden;
    border: 1px solid var(--juf-auth-border) !important;
    border-radius: 24px !important;
    background: var(--juf-auth-surface) !important;
    box-shadow: var(--juf-auth-shadow) !important;
}
body.juf-reader-auth-page .reader-auth-story-v27 {
    position: relative;
    min-width: 0;
    min-height: 620px;
    background-color: #2F5D9E !important;
    background-image: url('../images/auth/reader-login-bg-1536.webp') !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: 39% center !important;
}
body.juf-reader-auth-page .reader-auth-story-label-v32 {
    position: absolute;
    right: 28px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 999px;
    background: rgba(40, 46, 55, .24);
    color: rgba(255, 255, 255, .96);
    font: 650 11px/1.2 var(--juf-auth-font);
    letter-spacing: .01em;
    backdrop-filter: blur(8px);
}
body.juf-reader-auth-page .reader-auth-panel-v27 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(38px, 4.4vw, 58px) clamp(38px, 4vw, 54px) !important;
    background: var(--juf-auth-surface) !important;
    color: var(--juf-auth-text) !important;
}
body.juf-reader-auth-page .reader-auth-panel-logo-v31 {
    display: block;
    width: 58px;
    margin: 0 auto 13px;
    text-decoration: none;
}
body.juf-reader-auth-page .reader-auth-panel-logo-v31 img {
    display: block;
    width: 58px;
    height: 68px;
    object-fit: contain;
    margin: auto;
}
body.juf-reader-auth-page .reader-auth-heading-v27 { text-align: center; }
body.juf-reader-auth-page .reader-auth-heading-v27 h2,
body.juf-reader-auth-page .reader-auth-heading-v27 #reader-auth-title {
    margin: 0 !important;
    color: #282E37 !important;
    font-family: var(--font-display-literary, 'Tiro Bangla','Kalpurush','SolaimanLipi', serif) !important;
    font-size: clamp(1.85rem, 2.7vw, 2.2rem) !important;
    line-height: 1.16 !important;
    font-weight: 500 !important;
    letter-spacing:normal;
}
body.juf-reader-auth-page .reader-auth-heading-v27 p {
    margin: 8px 0 0 !important;
    color: var(--juf-auth-muted) !important;
    font: 500 .875rem/1.55 var(--juf-auth-font) !important;
}
body.juf-reader-auth-page .reader-auth-alert-v27 {
    margin: 18px 0 -2px;
    padding: 11px 13px;
    border-radius: 9px !important;
    font: 500 .8125rem/1.55 'Noto Sans Bengali','Kalpurush','SolaimanLipi', var(--juf-auth-font) !important;
}
body.juf-reader-auth-page .reader-auth-alert-v27.is-error {
    border: 1px solid #D9D6D0 !important;
    background: #F6F5F2 !important;
    color: #3B4256 !important;
}
body.juf-reader-auth-page .reader-auth-alert-v27.is-success {
    border: 1px solid #2E7A4F !important;
    background: #E4E6EC !important;
    color: #2E7A4F !important;
}
body.juf-reader-auth-page .reader-auth-inline-help-v27 {
    margin: 10px 0 0;
    text-align: center;
    font: 600 .8125rem/1.45 'Noto Sans Bengali','Kalpurush','SolaimanLipi', var(--juf-auth-font) !important;
}
body.juf-reader-auth-page .reader-auth-inline-help-v27 a { color: var(--juf-auth-accent) !important; }
body.juf-reader-auth-page .reader-auth-form-v27 {
    display: grid;
    gap: 15px;
    margin-top: 25px;
}
body.juf-reader-auth-page .reader-auth-field-v27 {
    display: grid;
    gap: 7px;
    color: var(--juf-auth-text) !important;
    font-family: var(--juf-auth-font) !important;
    font-weight: 600 !important;
}
body.juf-reader-auth-page .reader-auth-field-v27 > span:first-child {
    color: var(--juf-auth-text) !important;
    font: 650 .8125rem/1.35 var(--juf-auth-font) !important;
}
body.juf-reader-auth-page .reader-auth-field-v27 > small {
    color: var(--juf-auth-muted) !important;
    font: 500 .75rem/1.45 'Noto Sans Bengali','Kalpurush','SolaimanLipi', var(--juf-auth-font) !important;
}
body.juf-reader-auth-page .reader-auth-input-wrap-v31 { position: relative; display: block; }
body.juf-reader-auth-page .reader-auth-field-icon-v31.juf-auth-field-icon-v32 {
    position: absolute;
    z-index: 2;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: #5B6376 !important;
    pointer-events: none;
}
body.juf-reader-auth-page .reader-auth-field-v27 input {
    box-sizing: border-box;
    width: 100%;
    min-height: 50px !important;
    padding: 11px 14px 11px 44px !important;
    border: 1px solid var(--juf-auth-border-strong) !important;
    border-radius: 9px !important;
    background: #FFF !important;
    color: var(--juf-auth-text) !important;
    font: 550 .9375rem/1.25 var(--juf-auth-font) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
body.juf-reader-auth-page .reader-auth-field-v27 input::placeholder {
    color: #5B6376 !important;
    opacity: 1;
    font-weight: 450 !important;
}
body.juf-reader-auth-page .reader-auth-field-v27 input:hover { border-color: #D9D6D0 !important; }
body.juf-reader-auth-page .reader-auth-field-v27 input:focus {
    border-color: var(--juf-auth-accent) !important;
    box-shadow: 0 0 0 4px var(--juf-auth-focus) !important;
}
body.juf-reader-auth-page .reader-auth-password-wrap-v27 input { padding-right: 72px !important; }
body.juf-reader-auth-page .reader-auth-password-wrap-v27 .juf-password-toggle {
    position: absolute;
    z-index: 3;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 56px;
    min-height: 36px;
    padding: 0 10px;
    border: 0 !important;
    border-radius: 7px !important;
    background: #ECEAE6 !important;
    color: #282E37 !important;
    font: 700 .75rem/1 var(--juf-auth-font) !important;
    cursor: pointer;
}
body.juf-reader-auth-page .reader-auth-password-wrap-v27 .juf-password-toggle:hover { background: #ECEAE6 !important; }
body.juf-reader-auth-page .juf-password-toggle:focus-visible,
body.juf-reader-auth-page .reader-auth-socials-v31 :where(a,button):focus-visible,
body.juf-reader-auth-page .reader-auth-row-v27 a:focus-visible,
body.juf-reader-auth-page .reader-auth-switch-v27 a:focus-visible {
    outline: 3px solid var(--juf-auth-focus) !important;
    outline-offset: 2px !important;
}
body.juf-reader-auth-page .reader-auth-row-v27 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 20px;
    margin-top: -3px;
}
body.juf-reader-auth-page .reader-auth-row-v27 a {
    color: #282E37 !important;
    font: 700 .75rem/1.35 var(--juf-auth-font) !important;
    text-decoration: none;
}
body.juf-reader-auth-page .reader-auth-row-v27 a:hover { color: var(--juf-auth-accent) !important; text-decoration: underline; }
body.juf-reader-auth-page .reader-auth-submit-v27 {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px !important;
    margin-top: 0;
    border: 1px solid var(--juf-auth-accent) !important;
    border-radius: 8px !important;
    background: var(--juf-auth-accent) !important;
    background-image: none !important;
    color: #FFF !important;
    font: 750 .9375rem/1 var(--juf-auth-font) !important;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(59, 66, 86, .15) !important;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
body.juf-reader-auth-page .reader-auth-submit-v27:hover {
    background: var(--juf-auth-accent-hover) !important;
    border-color: var(--juf-auth-accent-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 24px rgba(59, 66, 86, .18) !important;
}
body.juf-reader-auth-page .reader-auth-submit-v27:focus-visible {
    outline: 3px solid var(--juf-auth-focus) !important;
    outline-offset: 3px !important;
}
body.juf-reader-auth-page .reader-auth-divider-v31 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0;
    color: #5B6376 !important;
    font: 500 .6875rem/1.3 var(--juf-auth-font) !important;
}
body.juf-reader-auth-page .reader-auth-divider-v31::before,
body.juf-reader-auth-page .reader-auth-divider-v31::after { content: ''; height: 1px; flex: 1; background: #E4E6EC !important; }
body.juf-reader-auth-page .reader-auth-socials-v31 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.juf-reader-auth-page .reader-auth-socials-v31 :where(button,a) {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px !important;
    padding: 9px 12px;
    border: 1px solid var(--juf-auth-border) !important;
    border-radius: 8px !important;
    background: #FFF !important;
    color: #282E37 !important;
    font: 650 .8125rem/1.2 var(--juf-auth-font) !important;
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
body.juf-reader-auth-page .reader-auth-socials-v31 a:hover {
    border-color: #D9D6D0 !important;
    box-shadow: 0 5px 16px rgba(40, 46, 55, .08) !important;
    transform: translateY(-1px);
}
body.juf-reader-auth-page .reader-auth-socials-v31 button:disabled { cursor: not-allowed; opacity: .52 !important; background: #F6F5F2 !important; }
body.juf-reader-auth-page .reader-auth-legal-v27,
body.juf-reader-auth-page .reader-auth-switch-v27 {
    color: var(--juf-auth-muted) !important;
    font: 500 .8125rem/1.55 var(--juf-auth-font) !important;
    text-align: center;
}
body.juf-reader-auth-page .reader-auth-legal-v27 { margin: 0; }
body.juf-reader-auth-page .reader-auth-switch-v27 { margin: 20px 0 0; }
body.juf-reader-auth-page .reader-auth-legal-v27 a,
body.juf-reader-auth-page .reader-auth-switch-v27 a {
    color: #282E37 !important;
    font-weight: 600 !important;
    text-decoration: none;
}
body.juf-reader-auth-page .reader-auth-legal-v27 a:hover,
body.juf-reader-auth-page .reader-auth-switch-v27 a:hover { color: var(--juf-auth-accent) !important; text-decoration: underline; }

/* --------------------------------------------------------------------------
   Admin login — same book-door family, tighter security-focused chrome.
   -------------------------------------------------------------------------- */
body.juf-admin-auth-page-v27 {
    min-height: 100vh;
    margin: 0;
    padding: clamp(20px, 4vh, 40px) clamp(18px, 3vw, 36px) !important;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    background: var(--juf-auth-bg) !important;
    color: var(--juf-auth-text) !important;
    font-family: var(--juf-auth-font) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-page-wrap-v31 { width: min(1140px, 100%); margin: 0 auto; }
body.juf-admin-auth-page-v27 .admin-auth-shell-v27 {
    width: 100% !important;
    min-height: min(650px, calc(100vh - 64px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr) !important;
    overflow: hidden;
    border: 1px solid var(--juf-auth-border) !important;
    border-radius: 24px !important;
    background: var(--juf-auth-surface) !important;
    box-shadow: var(--juf-auth-shadow) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-visual-v27 {
    position: relative;
    min-width: 0;
    min-height: 620px;
    background-color: #3B4256 !important;
    background-image: url('../images/auth/admin-login-bg-1536.webp') !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: 35% center !important;
}
body.juf-admin-auth-page-v27 .admin-auth-visual-label-v32 {
    position: absolute;
    right: 28px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 999px;
    background: rgba(40, 46, 55, .26);
    color: rgba(255, 255, 255, .97) !important;
    font: 650 11px/1.2 var(--juf-auth-font) !important;
    letter-spacing: .01em;
    backdrop-filter: blur(8px);
}
body.juf-admin-auth-page-v27 .admin-auth-form-side-v27 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(38px, 4.4vw, 58px) clamp(38px, 4vw, 54px) !important;
    background: var(--juf-auth-surface) !important;
    color: var(--juf-auth-text) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-logo-v31 {
    display: block;
    width: 58px;
    margin: 0 auto 10px;
    text-decoration: none;
}
body.juf-admin-auth-page-v27 .admin-auth-logo-v31 img {
    display: block;
    width: 58px !important;
    height: 68px !important;
    object-fit: contain;
    margin: 0 auto;
}
body.juf-admin-auth-page-v27 .admin-auth-logo-v31 > span { display: none; }
body.juf-admin-auth-page-v27 .admin-auth-portal-badge-v31 {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    margin-bottom: 17px;
    padding: 5px 10px;
    border: 1px solid #D9D6D0 !important;
    border-radius: 999px !important;
    background: #F6F5F2 !important;
    color: #282E37 !important;
    font: 700 .6875rem/1 var(--juf-auth-font) !important;
    letter-spacing: .01em;
}
body.juf-admin-auth-page-v27 .admin-auth-portal-badge-v31 svg { width: 14px; height: 14px; color: var(--juf-auth-accent); }
body.juf-admin-auth-page-v27 .admin-auth-form-head-v27 { text-align: center; }
body.juf-admin-auth-page-v27 .admin-auth-form-head-v27 h1 {
    margin: 0 !important;
    color: var(--juf-auth-text) !important;
    font-family: var(--juf-auth-font) !important;
    font-size: clamp(1.8rem, 2.7vw, 2.15rem) !important;
    line-height: 1.16 !important;
    font-weight: 600 !important;
    letter-spacing:normal;
}
body.juf-admin-auth-page-v27 .admin-auth-form-head-v27 p {
    max-width: 360px;
    margin: 9px auto 0 !important;
    color: var(--juf-auth-muted) !important;
    font: 500 .8125rem/1.55 var(--juf-auth-font) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-notice-v27,
body.juf-admin-auth-page-v27 .admin-auth-alert-v27 {
    margin: 17px 0 -2px;
    padding: 11px 13px;
    border-radius: 9px !important;
    font: 500 .8125rem/1.55 'Noto Sans Bengali','Kalpurush','SolaimanLipi', var(--juf-auth-font) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-notice-v27 { border: 1px solid #2E7A4F !important; background: #E4E6EC !important; color: #2E7A4F !important; }
body.juf-admin-auth-page-v27 .admin-auth-alert-v27 { border: 1px solid #D9D6D0 !important; background: #F6F5F2 !important; color: #3B4256 !important; }
body.juf-admin-auth-page-v27 .admin-auth-form-v27 { display: grid; gap: 15px; margin-top: 25px; }
body.juf-admin-auth-page-v27 .admin-auth-form-v27 label {
    display: grid;
    gap: 7px;
    color: var(--juf-auth-text) !important;
    font-family: var(--juf-auth-font) !important;
    font-weight: 600 !important;
}
body.juf-admin-auth-page-v27 .admin-auth-form-v27 label > span:first-child {
    color: var(--juf-auth-text) !important;
    font: 650 .8125rem/1.35 var(--juf-auth-font) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-input-wrap-v31 { position: relative; display: block; }
body.juf-admin-auth-page-v27 .admin-auth-input-wrap-v31 > .juf-auth-field-icon-v32 {
    position: absolute;
    z-index: 2;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: #5B6376 !important;
    pointer-events: none;
}
body.juf-admin-auth-page-v27 .admin-auth-form-v27 input {
    box-sizing: border-box;
    width: 100%;
    min-height: 50px !important;
    padding: 11px 14px 11px 44px !important;
    border: 1px solid var(--juf-auth-border-strong) !important;
    border-radius: 9px !important;
    background: #FFF !important;
    color: var(--juf-auth-text) !important;
    font: 550 .9375rem/1.25 var(--juf-auth-font) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .16s ease, box-shadow .16s ease;
}
body.juf-admin-auth-page-v27 .admin-auth-form-v27 input::placeholder { color: #5B6376 !important; opacity: 1; font-weight: 450 !important; }
body.juf-admin-auth-page-v27 .admin-auth-form-v27 input:hover { border-color: #D9D6D0 !important; }
body.juf-admin-auth-page-v27 .admin-auth-form-v27 input:focus {
    border-color: var(--juf-auth-accent) !important;
    box-shadow: 0 0 0 4px var(--juf-auth-focus) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-password-wrap-v27 input { padding-right: 72px !important; }
body.juf-admin-auth-page-v27 .admin-auth-password-wrap-v27 .juf-password-toggle {
    position: absolute;
    z-index: 3;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 56px;
    min-height: 36px;
    padding: 0 10px;
    border: 0 !important;
    border-radius: 7px !important;
    background: #ECEAE6 !important;
    color: #282E37 !important;
    font: 700 .75rem/1 var(--juf-auth-font) !important;
    cursor: pointer;
}
body.juf-admin-auth-page-v27 .admin-auth-password-wrap-v27 .juf-password-toggle:hover { background: #ECEAE6 !important; }
body.juf-admin-auth-page-v27 .admin-auth-helper-row-v31 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -3px;
    color: var(--juf-auth-muted) !important;
    font: 550 .6875rem/1.4 var(--juf-auth-font) !important;
}
body.juf-admin-auth-page-v27 .admin-auth-helper-row-v31 span { color: var(--juf-auth-muted) !important; }
body.juf-admin-auth-page-v27 .admin-auth-helper-row-v31 a {
    color: #282E37 !important;
    font-weight: 500 !important;
    text-decoration: none;
}
body.juf-admin-auth-page-v27 .admin-auth-helper-row-v31 a:hover { color: var(--juf-auth-accent) !important; text-decoration: underline; }
body.juf-admin-auth-page-v27 .admin-auth-submit-v27 {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 50px !important;
    margin-top: 0;
    border: 1px solid var(--juf-auth-accent) !important;
    border-radius: 8px !important;
    background: var(--juf-auth-accent) !important;
    background-image: none !important;
    color: #FFF !important;
    font: 750 .9375rem/1 var(--juf-auth-font) !important;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(59, 66, 86, .15) !important;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
body.juf-admin-auth-page-v27 .admin-auth-submit-v27:hover {
    background: var(--juf-auth-accent-hover) !important;
    border-color: var(--juf-auth-accent-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 24px rgba(59, 66, 86, .18) !important;
}
body.juf-admin-auth-page-v27 :where(.admin-auth-submit-v27,.juf-password-toggle,.admin-auth-helper-row-v31 a,.admin-auth-public-return-v31):focus-visible {
    outline: 3px solid var(--juf-auth-focus) !important;
    outline-offset: 3px !important;
}
body.juf-admin-auth-page-v27 .admin-auth-security-note-v32 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding: 15px 0 0;
    border-top: 1px solid #D9D6D0;
    color: #5B6376 !important;
}
body.juf-admin-auth-page-v27 .admin-auth-security-note-v32 > svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--juf-auth-accent) !important; }
body.juf-admin-auth-page-v27 .admin-auth-security-note-v32 > span { display: grid; gap: 2px; color: #282E37 !important; }
body.juf-admin-auth-page-v27 .admin-auth-security-note-v32 strong { color: #282E37 !important; font: 650 .6875rem/1.25 var(--juf-auth-font) !important; }
body.juf-admin-auth-page-v27 .admin-auth-security-note-v32 small { color: #5B6376 !important; font: 500 .625rem/1.35 var(--juf-auth-font) !important; }
body.juf-admin-auth-page-v27 .admin-auth-protected-v31,
body.juf-admin-auth-page-v27 .admin-auth-benefits-v31 { display: none !important; }
body.juf-admin-auth-page-v27 .admin-auth-public-return-v31 {
    align-self: center;
    margin-top: 13px;
    color: #5B6376 !important;
    font: 650 .6875rem/1.35 var(--juf-auth-font) !important;
    text-decoration: none;
}
body.juf-admin-auth-page-v27 .admin-auth-public-return-v31:hover { color: var(--juf-auth-accent) !important; }

/* --------------------------------------------------------------------------
   Responsive behavior
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    body.juf-reader-auth-page .site-main { display: block !important; padding: 22px 18px !important; }
    body.juf-reader-auth-page .reader-auth-shell-v27,
    body.juf-admin-auth-page-v27 .admin-auth-shell-v27 {
        grid-template-columns: 1fr !important;
        max-width: 650px;
        min-height: 0;
        margin: auto;
    }
    body.juf-reader-auth-page .reader-auth-story-v27,
    body.juf-admin-auth-page-v27 .admin-auth-visual-v27 {
        min-height: 300px;
        background-size: cover !important;
        background-position: center 47% !important;
    }
    body.juf-reader-auth-page .reader-auth-story-v27 {
        background-image: url('../images/auth/reader-login-bg-768.webp') !important;
        background-position: center 47% !important;
    }
    body.juf-admin-auth-page-v27 .admin-auth-visual-v27 {
        background-image: url('../images/auth/admin-login-bg-768.webp') !important;
        background-position: 35% center !important;
    }
    body.juf-reader-auth-page .reader-auth-panel-v27,
    body.juf-admin-auth-page-v27 .admin-auth-form-side-v27 { padding: 38px 36px 40px !important; }
}

@media (max-width: 560px) {
    body.juf-reader-auth-page .site-main { padding: 0 !important; min-height: 100vh; align-items: stretch; }
    body.juf-admin-auth-page-v27 { padding: 0 !important; place-items: stretch; }
    body.juf-reader-auth-page .reader-login-reference-v31,
    body.juf-admin-auth-page-v27 .admin-auth-page-wrap-v31 { width: 100%; min-height: 100vh; }
    body.juf-reader-auth-page .reader-auth-shell-v27,
    body.juf-admin-auth-page-v27 .admin-auth-shell-v27 {
        width: 100% !important;
        max-width: none;
        min-height: 100vh;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    body.juf-reader-auth-page .reader-auth-story-v27,
    body.juf-admin-auth-page-v27 .admin-auth-visual-v27 {
        min-height: 210px;
    }
    body.juf-reader-auth-page .reader-auth-story-v27 { background-position: center 44% !important; }
    body.juf-admin-auth-page-v27 .admin-auth-visual-v27 { background-position: 35% center !important; }
    body.juf-reader-auth-page .reader-auth-story-label-v32,
    body.juf-admin-auth-page-v27 .admin-auth-visual-label-v32 { right: 16px; bottom: 14px; font-size: 10px !important; }
    body.juf-reader-auth-page .reader-auth-panel-v27,
    body.juf-admin-auth-page-v27 .admin-auth-form-side-v27 {
        justify-content: flex-start;
        padding: 30px 22px 34px !important;
    }
    body.juf-reader-auth-page .reader-auth-panel-logo-v31,
    body.juf-admin-auth-page-v27 .admin-auth-logo-v31 { width: 50px; margin-bottom: 9px; }
    body.juf-reader-auth-page .reader-auth-panel-logo-v31 img,
    body.juf-admin-auth-page-v27 .admin-auth-logo-v31 img { width: 50px !important; height: 59px !important; }
    body.juf-reader-auth-page .reader-auth-heading-v27 h2,
    body.juf-reader-auth-page .reader-auth-heading-v27 #reader-auth-title,
    body.juf-admin-auth-page-v27 .admin-auth-form-head-v27 h1 { font-size: 1.7rem !important; }
    body.juf-reader-auth-page .reader-auth-socials-v31 { grid-template-columns: 1fr; }
    body.juf-reader-auth-page .reader-auth-field-v27 input,
    body.juf-admin-auth-page-v27 .admin-auth-form-v27 input,
    body.juf-reader-auth-page .reader-auth-submit-v27,
    body.juf-admin-auth-page-v27 .admin-auth-submit-v27 { min-height: 50px !important; font-size: 1rem !important; }
}

@media (max-width: 380px) {
    body.juf-reader-auth-page .reader-auth-panel-v27,
    body.juf-admin-auth-page-v27 .admin-auth-form-side-v27 { padding-left: 18px !important; padding-right: 18px !important; }
    body.juf-reader-auth-page .reader-auth-story-v27,
    body.juf-admin-auth-page-v27 .admin-auth-visual-v27 { min-height: 185px; }
}

@media (prefers-reduced-motion: reduce) {
    .juf-auth-skip-v32,
    body.juf-reader-auth-page *,
    body.juf-admin-auth-page-v27 * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* 2026-09-14 — approved authentication background mapping
   Reader login = blue-violet book-door artwork.
   Admin login = mint editorial chair/tree artwork. */
body.juf-admin-auth-page-v27 .admin-auth-visual-label-v32 {
    border-color: rgba(40, 46, 55, .16) !important;
    background: rgba(255, 255, 255, .64) !important;
    color: #3B4256 !important;
    box-shadow: 0 6px 18px rgba(40, 46, 55, .07) !important;
    backdrop-filter: blur(8px) !important;
}


/* ============================================================================
   Build 615 — Modern Simple Auth UI (Fixes 1000171882.jpg)
   - Retires the heavy classic cartoon split/top banner (.reader-auth-story-v27,
     .admin-auth-visual-v27) in favor of a sleek, centered, modern single card.
   - Replaces classic Georgia serif headings with clean modern sans-serif.
   - Adds sleek 2-pill mode switcher (.juf-auth-mode-tabs), 12px rounded inputs,
     pill password toggle, modern #2D4B9A primary button, and 2-column side-by-side
     Google + Facebook buttons across all viewports.
   ============================================================================ */
body.juf-reader-auth-page .reader-auth-story-v27,
body.juf-admin-auth-page-v27 .admin-auth-visual-v27 {
    display: none !important;
}

body.juf-reader-auth-page .site-main,
body.juf-admin-auth-page-v27 {
    padding: clamp(16px, 4vw, 40px) 16px !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.juf-reader-auth-page .reader-login-reference-v31,
body.juf-admin-auth-page-v27 .admin-auth-page-wrap-v31 {
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
    min-height: 0 !important;
}

body.juf-reader-auth-page .reader-auth-shell-v27,
body.juf-admin-auth-page-v27 .admin-auth-shell-v27,
.juf-auth-recovery-card {
    display: block !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 440px !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    border: 1px solid rgba(35, 42, 54, 0.10) !important;
    background: #FFFFFF !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.03) !important;
    overflow: hidden !important;
}

body.juf-reader-auth-page .reader-auth-panel-v27,
body.juf-admin-auth-page-v27 .admin-auth-form-side-v27 {
    padding: 28px 24px 26px !important;
    background: transparent !important;
}

body.juf-reader-auth-page .reader-auth-panel-logo-v31,
body.juf-admin-auth-page-v27 .admin-auth-logo-v31 {
    width: 42px !important;
    margin: 0 auto 10px !important;
}

body.juf-reader-auth-page .reader-auth-panel-logo-v31 img,
body.juf-admin-auth-page-v27 .admin-auth-logo-v31 img {
    width: 42px !important;
    height: auto !important;
}

body.juf-reader-auth-page .reader-auth-heading-v27,
body.juf-admin-auth-page-v27 .admin-auth-form-head-v27 {
    margin-bottom: 14px !important;
    text-align: center !important;
}

body.juf-reader-auth-page .reader-auth-heading-v27 h2,
body.juf-reader-auth-page .reader-auth-heading-v27 #reader-auth-title,
body.juf-admin-auth-page-v27 .admin-auth-form-head-v27 h1,
.juf-auth-recovery-card h1 {
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 5px !important;
}

body.juf-reader-auth-page .reader-auth-heading-v27 p,
body.juf-admin-auth-page-v27 .admin-auth-form-head-v27 p,
.juf-auth-recovery-lead {
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
}

/* Sleek 2-Pill Mode Switcher (Sign In | Create Account) */
.juf-auth-mode-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 4px !important;
    margin: 0 0 18px !important;
    border-radius: 999px !important;
    background: #EEF0F4 !important;
    border: 1px solid rgba(35, 42, 54, 0.07) !important;
}

.juf-auth-mode-tab {
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #5B6376 !important;
    text-decoration: none !important;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease !important;
}

.juf-auth-mode-tab.is-active {
    background: #FFFFFF !important;
    color: #1E3A8A !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
}

/* Modern Rounded Inputs & Labels */
body.juf-reader-auth-page .reader-auth-form-v27,
body.juf-admin-auth-page-v27 .admin-auth-form-v27,
.juf-auth-recovery-form {
    gap: 13px !important;
}

body.juf-reader-auth-page .reader-auth-field-v27 > span:first-child,
body.juf-admin-auth-page-v27 .admin-auth-form-v27 label > span:first-child,
.juf-auth-recovery-field > label {
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

body.juf-reader-auth-page .reader-auth-field-v27 input,
body.juf-admin-auth-page-v27 .admin-auth-form-v27 input,
.juf-auth-recovery-field input {
    min-height: 46px !important;
    border-radius: 12px !important;
    border: 1.5px solid #D8DEE9 !important;
    background: #F8FAFC !important;
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease !important;
}

body.juf-reader-auth-page .reader-auth-field-v27 input:focus,
body.juf-admin-auth-page-v27 .admin-auth-form-v27 input:focus,
.juf-auth-recovery-field input:focus {
    background: #FFFFFF !important;
    border-color: #2D4B9A !important;
    box-shadow: 0 0 0 3.5px rgba(45, 75, 154, 0.13) !important;
    outline: none !important;
}

/* Modern Pill Password Toggle */
body.juf-reader-auth-page .juf-password-toggle,
body.juf-admin-auth-page-v27 .juf-password-toggle,
.juf-auth-recovery-password-wrap .juf-password-toggle {
    height: 30px !important;
    min-width: 54px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    right: 8px !important;
}

/* Modern Primary CTA Button */
body.juf-reader-auth-page .reader-auth-submit-v27,
body.juf-admin-auth-page-v27 .admin-auth-submit-v27,
.juf-auth-recovery-submit {
    min-height: 46px !important;
    border-radius: 12px !important;
    background: #2D4B9A !important;
    border: 1px solid #2D4B9A !important;
    color: #FFFFFF !important;
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 4px 12px rgba(45, 75, 154, 0.20) !important;
}

body.juf-reader-auth-page .reader-auth-submit-v27:hover,
body.juf-admin-auth-page-v27 .admin-auth-submit-v27:hover,
.juf-auth-recovery-submit:hover {
    background: #233B7E !important;
    border-color: #233B7E !important;
}

/* Side-by-side 2-Column Social Buttons on ALL Screens */
body.juf-reader-auth-page .reader-auth-divider-v31 {
    margin: 14px 0 12px !important;
}

body.juf-reader-auth-page .reader-auth-socials-v31 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

body.juf-reader-auth-page .reader-auth-socials-v31 :where(button, a) {
    min-height: 42px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    border: 1.5px solid #DDE2EC !important;
    background: #FFFFFF !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

body.juf-reader-auth-page .reader-auth-switch-v27 {
    margin-top: 16px !important;
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
}

body.juf-reader-auth-page .reader-auth-switch-v27 a {
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif !important;
    font-weight: 600 !important;
    color: #2D4B9A !important;
}


/* === MERGED: jufbook-deep-teal-accent.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 Almond / Charcoal Interaction System — sitewide interaction accent
   2026-09-15
   Primary: #282E37 | Hover: #23262B | Soft: #ECEAE6 | Border: #D9D6D0
   Premium secondary accent: #B79A68
   Scope: interactive controls, active states, CTAs and focus accents only.
   Book-cover artwork, status colors, official logo assets and semantic danger/warning colors remain untouched. */

:root {
    --juf-primary: #3B4256;
    --juf-primary-hover: #2C3243;
    --juf-primary-pressed: #2C3243;
    --juf-primary-soft: #E4E6EC;
    --juf-primary-border: #D9D6D0;
    --juf-premium-gold: #B79A68;
    --accent-rust: #3B4256 !important;
    --juf-rust-hover: #2C3243 !important;
    --reader-accent: #3B4256 !important;
    --juf-auth-accent: #3B4256 !important;
}

/* Primary public CTAs — consistent quiet premium teal. */
.juf-login-btn-v24,
.juf-homepage .juf-login-btn-v24,
.authors-page .juf-author-search-submit,
.premium-primary-btn,
.premium-plan-card > a,
.search-submit-btn,
.audio-primary-play,
.audiobook-page .audio-inline-play,
.audiobook-page .audio-new-play,
.juf-player-controls .juf-main-play,
.reader-page .reader-primary-action,
.btn-hero-cinematic-primary {
    background: #3346A8 !important;
    border-color: #3346A8 !important;
    color: #FFFFFF !important;
    box-shadow: 0 8px 18px rgba(51, 70, 168, .16) !important;
}

.juf-login-btn-v24:hover,
.juf-login-btn-v24:focus-visible,
.juf-homepage .juf-login-btn-v24:hover,
.juf-homepage .juf-login-btn-v24:focus-visible,
.authors-page .juf-author-search-submit:hover,
.authors-page .juf-author-search-submit:focus-visible,
.premium-primary-btn:hover,
.premium-primary-btn:focus-visible,
.premium-plan-card > a:hover,
.premium-plan-card > a:focus-visible,
.search-submit-btn:hover,
.search-submit-btn:focus-visible,
.audio-primary-play:hover,
.audio-primary-play:focus-visible,
.audiobook-page .audio-inline-play:hover,
.audiobook-page .audio-inline-play:focus-visible,
.audiobook-page .audio-new-play:hover,
.audiobook-page .audio-new-play:focus-visible,
.juf-player-controls .juf-main-play:hover,
.juf-player-controls .juf-main-play:focus-visible,
.btn-hero-cinematic-primary:hover,
.btn-hero-cinematic-primary:focus-visible {
    background: #263787 !important;
    border-color: #263787 !important;
    box-shadow: 0 10px 22px rgba(40, 46, 55, .20) !important;
}

/* Header search keeps dark submit affordance; focus uses the brand accent. */
body.juf-minimal-chrome .juf-global-search-v40:focus-within {
    border-color: #3346A8 !important;
    box-shadow: 0 0 0 3px rgba(59, 66, 86, .10), 0 10px 22px rgba(40, 46, 55, .05) !important;
}

/* Search suggestions and author search. */
.juf-search-suggestion-play,
.audiobook-page .audio-queue-track.is-active .audio-queue-number,
.audiobook-page .audio-category-chip.is-active > span {
    background: #3B4256 !important;
    color: #FFFFFF !important;
}
.juf-search-suggestion:hover .juf-search-suggestion-arrow,
.juf-search-suggestion.is-active .juf-search-suggestion-arrow,
.juf-search-suggestion-all.is-active,
.juf-search-suggestion-all:hover {
    color: #2C3243 !important;
}
.juf-search-suggestion-all.is-active,
.juf-search-suggestion-all:hover {
    background: #ECEAE6 !important;
}

/* Authors — active states should feel editorial, not loud. */
.authors-page .juf-featured-author-dots button.is-active,
.authors-page .juf-author-new-book-dots button.is-active {
    background: #3B4256 !important;
}
.authors-page .juf-author-thumb-card.is-active {
    border-color: #3B4256 !important;
    box-shadow: 0 8px 20px rgba(59, 66, 86, .20) !important;
}
.authors-page .juf-authors-empty-copy span,
.juf-authors-lead-copy > span {
    color: #282E37 !important;
}

/* Audiobook — play/selected controls and labels. */
.audiobook-page .audio-eyebrow,
.audiobook-page .audio-new-kicker,
.audio-collection-tagline,
.audio-shelf-heading span,
.audio-collection-card-copy small,
.audio-library-heading > div > span {
    color: #3B4256 !important;
}
.audio-collection-card:hover,
.audio-collection-card.is-active {
    border-color: #2C3243 !important;
}
.audiobook-page .audio-new-meta em {
    background: #ECEAE6 !important;
    color: #282E37 !important;
}

/* Premium page: teal for actions; antique gold remains a subtle premium marker. */
.premium-page .premium-eyebrow,
.premium-page .premium-plan-duration,
.premium-page .premium-book-copy > span,
.premium-page .premium-section-heading span,
.premium-page .premium-pass-muted span,
.premium-page .premium-faq > div:first-child span,
.premium-page .premium-trust-grid article > span {
    color: #282E37 !important;
}
.premium-page .premium-plan-badge,
.juf-premium-nav-v24 span[aria-hidden="true"],
.badge-premium,
.premium-badge,
.tag-premium {
    color: #282E37 !important;
    border-color: color-mix(in srgb, #7A6130 38%, var(--juf-border)) !important;
    background: color-mix(in srgb, #B79A68 12%, #FFFFFF) !important;
}

/* Selected tabs, pagination and common interactive accents. */
:is(.is-active,.active)[aria-current="page"],.category-pagination .active,.juf-author-pagination .active {
    border-color: #3B4256 !important;
}
input[type="range"] { accent-color: #3B4256; }

/* Auth screens — user/admin share one premium interaction color. */
.reader-auth-submit-v27,
.admin-auth-submit-v27,
.juf-admin-auth-page-v27 .admin-auth-submit-v27 {
    background: #3B4256 !important;
    border-color: #3B4256 !important;
    color: #FFFFFF !important;
    box-shadow: 0 9px 20px rgba(59, 66, 86, .17) !important;
}
.reader-auth-submit-v27:hover,
.reader-auth-submit-v27:focus-visible,
.admin-auth-submit-v27:hover,
.admin-auth-submit-v27:focus-visible {
    background: #2C3243 !important;
    border-color: #2C3243 !important;
}

/* Admin workspace — use the same primary accent, without changing semantic alerts. */
.admin-shell :is(.btn-primary,.admin-primary-button,.admin-submit-primary),.admin-dashboard-page .admin-dashboard-quickbar a:first-child {
    background: #3B4256 !important;
    border-color: #3B4256 !important;
    color: #FFFFFF !important;
}
.admin-dashboard-page .admin-dashboard-stat:first-child::before,
.admin-dashboard-page .admin-dashboard-attention-title > span {
    background: #3B4256 !important;
}
.admin-dashboard-page .admin-dashboard-attention-title > span {
    box-shadow: 0 0 0 5px #ECEAE6 !important;
}

/* Focus visibility remains strong and accessible across keyboard navigation. */
:where(a,button,input,select,textarea,summary):focus-visible {
    outline-color: #2C3243;
}

@media (prefers-reduced-motion: reduce) {
    .juf-login-btn-v24,
    .premium-primary-btn,
    .audio-primary-play,
    .authors-page .juf-author-search-submit { transition: none !important; }
}

/* ========================================================================
   JUFbook 2D Minimal Colour Authority — 2026-09-15
   Flat editorial surfaces, no glossy gradients, restrained depth, teal-led
   interaction system. Content artwork (covers, portraits, auth illustrations)
   remains untouched.
   ======================================================================== */
:root {
    --bg-cream: #F6F5F2 !important;
    --text-main: #282E37 !important;
    --text-muted: #5B6376 !important;
    --juf-primary: #3B4256 !important;
    --juf-primary-hover: #2C3243 !important;
    --juf-primary-pressed: #2C3243 !important;
    --juf-primary-soft: #E4E6EC !important;
    --juf-primary-border: #D9D6D0 !important;
    --juf-premium-gold: #B79A68 !important;
    --juf-surface-white: #FFFFFF !important;
    --juf-surface-paper: #ECEAE6 !important;
    --juf-light-surface: #ECEAE6 !important;
    --juf-border: #D9D6D0 !important;
    --juf-tan: #D9D6D0 !important;
    --accent-rust: #3B4256 !important;
    --juf-rust-hover: #2C3243 !important;
}

/* Flat primary actions: one solid colour, no gradient or glow. */
body.juf-2d-minimal :where(
    .juf-login-btn-v24,.btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .btn-hero-cinematic-primary,.premium-primary-btn,.premium-plan-card>a,
    .search-submit-btn,.juf-search-submit,.search-btn,
    .authors-page .juf-author-search-submit,
    .audio-primary-play,.audiobook-page .audio-inline-play,.audiobook-page .audio-new-play,
    .reader-auth-submit-v27,.juf-checkout-pay-v32,.newsletter-luxury-btn,.newsletter-premium-btn
) {
    background: #3346A8 !important;
    background-image: none !important;
    border: 1px solid #3346A8 !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
    filter: none !important;
}
body.juf-2d-minimal :where(
    .juf-login-btn-v24,.btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .btn-hero-cinematic-primary,.premium-primary-btn,.premium-plan-card>a,
    .search-submit-btn,.juf-search-submit,.search-btn,
    .authors-page .juf-author-search-submit,
    .audio-primary-play,.audiobook-page .audio-inline-play,.audiobook-page .audio-new-play,
    .reader-auth-submit-v27,.juf-checkout-pay-v32,.newsletter-luxury-btn,.newsletter-premium-btn
):hover {
    background: #263787 !important;
    border-color: #263787 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Header/search: flat 2D white field + teal action. */
body.juf-minimal-chrome .juf-global-search-v40 {
    background: #ECEAE6 !important;
    background-image: none !important;
    border-color: #D9D6D0 !important;
    box-shadow: none !important;
}
body.juf-minimal-chrome .juf-global-search-v40:focus-within {
    border-color: #2C3243 !important;
    box-shadow: 0 0 0 2px #ECEAE6 !important;
}
body.juf-minimal-chrome .juf-global-search-v40 > button {
    background: #3B4256 !important;
    background-image: none !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}
body.juf-minimal-chrome .juf-global-search-v40 > button:hover,
body.juf-minimal-chrome .juf-global-search-v40 > button:focus-visible {
    background: #2C3243 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Cards and panels: border-led, not shadow-led. */
body.juf-2d-minimal :where(
    .juf-author-directory-card,.juf-catalog-book-card,.premium-book-card,
    .audio-collection-card,
    .category-card,.category-item,.juf-author-genre-card,
    .review-card,.review-item,.testimonial-card-white,.pastel-card,
    .profile-card,.account-panel,.info-card,.stat-card,
    .premium-trust-grid article,.premium-faq details,
    .juf-search-result,.search-result-card,
    .content-card,.box-panel:not(.admin-panel)
) {
    background-color: #ECEAE6 !important;
    background-image: none !important;
    border-color: #D9D6D0 !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(
    .juf-author-directory-card,.juf-catalog-book-card,.premium-book-card,
    .audio-collection-card,.category-card,.juf-author-genre-card,
    .review-card,.testimonial-card-white,.pastel-card,.profile-card,.account-panel
):hover {
    border-color: #D9D6D0 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Hero/section surfaces: calm flat fills. */
body.juf-2d-minimal :where(
    .hero-cinematic-stage,.hero-stage,.juf-books-hero,.juf-search-hero,
    .juf-authors-hero,.juf-authors-hero-stage,.juf-featured-author-stage,
    .juf-author-new-book-stage,.premium-hero,.audio-hub-hero,.audio-hub-hero-v2,
    .home-reading-gateway,.reading-room-block,.profile-hub-hero
) {
    background-color: #ECEAE6 !important;
    background-image: none !important;
    border-color: #D9D6D0 !important;
    box-shadow: none !important;
}

/* Soft teal is reserved for selected/active utility states. */
body.juf-2d-minimal :where(
    .juf-search-suggestion.is-active,.juf-search-suggestion:hover,
    .juf-search-suggestion-all.is-active,.juf-search-suggestion-all:hover,
    .audio-category-chip.is-active,.juf-author-filter-chip.is-active,
    .category-chip.is-active,.filter-chip.is-active,.tab.is-active
) {
    background: #ECEAE6 !important;
    background-image: none !important;
    border-color: #D9D6D0 !important;
    color: #282E37 !important;
    box-shadow: none !important;
}

/* Secondary actions: paper surface + teal outline. */
body.juf-2d-minimal :where(
    .btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,
    .premium-secondary-btn,.juf-filter-toggle,.juf-author-filter-toggle
) {
    background: #ECEAE6 !important;
    background-image: none !important;
    border: 1px solid #D9D6D0 !important;
    color: #282E37 !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(
    .btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,
    .premium-secondary-btn,.juf-filter-toggle,.juf-author-filter-toggle
):hover {
    background: #ECEAE6 !important;
    border-color: #2C3243 !important;
    color: #282E37 !important;
    transform: none !important;
}

/* Premium is gold as a small semantic marker, never a large glossy surface. */
body.juf-2d-minimal :where(.badge-premium,.premium-badge,.tag-premium,.premium-plan-badge) {
    background: #EFE8D8 !important;
    background-image: none !important;
    border-color: #7A6130 !important;
    color: #7A6130 !important;
    box-shadow: none !important;
}

/* Forms: crisp flat fields. */
body.juf-2d-minimal :where(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {
    background: #ECEAE6 !important;
    background-image: none !important;
    border-color: #D9D6D0 !important;
    box-shadow: none !important;
}
body.juf-2d-minimal :where(input,select,textarea):focus {
    border-color: #2C3243 !important;
    outline: 2px solid #3346A8 !important;
    outline-offset: 1px !important;
    box-shadow: none !important;
}

/* Audiobook player: flat deep-teal/ink panel. */
body.juf-2d-minimal.audiobook-page :where(.audio-player-panel,.audio-player-shell,.audio-sticky-player,.juf-player-bar,.juf-player-shell) {
    background: #2C3243 !important;
    background-image: none !important;
    border-color: #2C3243 !important;
    box-shadow: none !important;
}
body.juf-2d-minimal.audiobook-page :where(.audio-player-panel,.audio-player-shell,.audio-sticky-player,.juf-player-bar,.juf-player-shell) :where(h1,h2,h3,strong,span:not(.juf-select-value):not(.juf-select *),p,small,label) {
    color: #FFFFFF !important;
}

/* Authentication/checkout chrome stays flat; supplied illustrations remain intact. */
body.juf-2d-minimal :where(.reader-auth-form-side-v27,.juf-checkout-form-v32,.juf-checkout-summary-v32,.checkout-form-panel) {
    background: #ECEAE6 !important;
    background-image: none !important;
    border-color: #D9D6D0 !important;
    box-shadow: none !important;
}

/* Navigation active state: small colour cue, not a filled glossy pill. */
body.juf-2d-minimal .juf-nav-link-v24.is-active {
    color: #3B4256 !important;
}
body.juf-2d-minimal .juf-nav-link-v24.is-active::after {
    background: #3B4256 !important;
}
body.juf-2d-minimal .juf-premium-nav-v24 {
    background: transparent !important;
    background-image: none !important;
    border-color: #D9D6D0 !important;
    box-shadow: none !important;
}

/* Footer and utility bars are flat editorial paper. */
body.juf-2d-minimal :where(.site-footer,.juf-footer,.footer-shell,.juf-mobile-filter-toolbar,.juf-books-mobile-toolbar) {
    background-image: none !important;
    box-shadow: none !important;
}

/* Keep physical book/portrait artwork as the only intentional depth exception. */
body.juf-2d-minimal :where(.showcase-card-item,.juf-catalog-cover-link,.premium-book-cover,.juf-search-book) > .juf-book-jacket {
    box-shadow: 0 8px 18px rgba(40, 46, 55, .10) !important;
}
body.juf-2d-minimal :where(.showcase-card-item,.juf-catalog-cover-link,.premium-book-cover,.juf-search-book) > .juf-book-jacket:hover {
    box-shadow: 0 10px 22px rgba(40, 46, 55, .12) !important;
}

@media (max-width: 768px) {
    body.juf-2d-minimal :where(
        .juf-author-directory-card,.juf-catalog-book-card,.premium-book-card,
        .audio-collection-card,.review-card,.pastel-card,.profile-card
    ) { box-shadow: none !important; }
}

/* 2026-09-15 — Predictive author search final premium fix
   Solid overlay, strict short-query relevance, aligned panel and brand-consistent clear control. */
.authors-page .juf-author-filter-panel {
    position: relative !important;
    z-index: auto !important;
}
.authors-page .juf-author-search-suggestions {
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    z-index: 1000 !important;
    padding: 7px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 16px !important;
    background: #ECEAE6 !important;
    background-image: none !important;
    opacity: 1 !important;
    box-shadow: 0 16px 34px rgba(40, 46, 55, .10) !important;
    isolation: isolate !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
.authors-page .juf-author-search-suggestions::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: -1 !important;
    border-radius: inherit !important;
    background: #ECEAE6 !important;
    pointer-events: none !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-group-title {
    color: #282E37 !important;
    padding: 6px 8px 5px !important;
    letter-spacing: .06em !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion {
    min-height: 60px !important;
    grid-template-columns: 46px minmax(0,1fr) 18px !important;
    gap: 10px !important;
    padding: 6px 8px !important;
    border-radius: 11px !important;
    background: #ECEAE6 !important;
    border: 0 !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion:hover,
.authors-page .juf-author-search-suggestions .juf-search-suggestion.is-active {
    background: #ECEAE6 !important;
    color: #282E37 !important;
    transform: none !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-visual.is-author {
    width: 44px !important;
    height: 52px !important;
    border-radius: 10px !important;
    border-color: #D9D6D0 !important;
    background: #ECEAE6 !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-copy strong {
    font-size: .86rem !important;
    color: #282E37 !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-copy small {
    font-size: .70rem !important;
    color: #5B6376 !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-copy em {
    font-size: .63rem !important;
    color: #282E37 !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-all {
    background: #ECEAE6 !important;
    color: #282E37 !important;
}
.authors-page .juf-author-search-suggestions .juf-search-suggestion-all:hover,
.authors-page .juf-author-search-suggestions .juf-search-suggestion-all.is-active {
    background: #ECEAE6 !important;
    color: #282E37 !important;
}
.authors-page .juf-author-alphabet {
    position: relative !important;
    z-index: 1 !important;
}
@media (max-width: 760px) {
    .authors-page .juf-author-search-suggestions {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: min(58vh, 390px) !important;
        border-radius: 14px !important;
        padding: 6px !important;
    }
}


/* === MERGED: buttons-unified-final.css === */
/* ==========================================================================
   Unified button system — final authority in the cascade.
   Fixes: (1) primary-button hover text/background contrast collision left by
   jufbook-2d-minimal-system.css vs jufbook-deep-teal-accent.css, (2) missing
   transitions, (3) missing :focus-visible rings, (4) inconsistent min tap
   target on mobile, (5) inconsistent radius between admin and public.
   Keeps the existing flat "2D Minimal" language: no gradients, no drop
   shadows on rest state — only a very small lift shadow on hover to signal
   interactivity, matching the depth already used elsewhere (e.g. admin
   control cards).
   ========================================================================== */

:root{
    --juf-btn-radius: 12px;
    --juf-btn-transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .1s ease;
}

/* ---------- Public site: primary (filled) buttons ---------- */
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,
    .premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32,
    .juf-login-btn-v24,.btn-hero-cinematic-primary,.premium-primary-btn,
    .premium-plan-card>a,.search-submit-btn,.authors-page .juf-author-search-submit,
    .audio-primary-play,.audiobook-page .audio-inline-play,.audiobook-page .audio-new-play,
    .juf-player-controls .juf-main-play,.reader-page .reader-primary-action
){
    background:#3346A8 !important;
    border:1px solid #3346A8 !important;
    color:#FFFFFF !important;
    border-radius:var(--juf-btn-radius) !important;
    min-height:44px;
    transition:var(--juf-btn-transition) !important;
    box-shadow:none !important;
}
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,
    .premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32,
    .juf-login-btn-v24,.btn-hero-cinematic-primary,.premium-primary-btn,
    .premium-plan-card>a,.search-submit-btn,.authors-page .juf-author-search-submit,
    .audio-primary-play,.audiobook-page .audio-inline-play,.audiobook-page .audio-new-play,
    .juf-player-controls .juf-main-play,.reader-page .reader-primary-action
):hover{
    /* Text stays white on hover — never dark-on-dark. This is the fix. */
    background:#263787 !important;
    border-color:#263787 !important;
    color:#FFFFFF !important;
    box-shadow:0 4px 12px rgba(51, 70, 168, .22) !important;
    transform:translateY(-1px);
}
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,
    .premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32,
    .juf-login-btn-v24,.btn-hero-cinematic-primary,.premium-primary-btn,
    .premium-plan-card>a,.search-submit-btn,.authors-page .juf-author-search-submit,
    .audio-primary-play,.audiobook-page .audio-inline-play,.audiobook-page .audio-new-play,
    .juf-player-controls .juf-main-play,.reader-page .reader-primary-action
):active{
    background:#263787 !important;
    border-color:#263787 !important;
    color:#FFFFFF !important;
    transform:translateY(0);
    box-shadow:none !important;
}
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,
    .premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32,
    .juf-login-btn-v24,.btn-hero-cinematic-primary,.premium-primary-btn,
    .premium-plan-card>a,.search-submit-btn,.authors-page .juf-author-search-submit,
    .btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,
    .premium-secondary-btn,.juf-filter-toggle,.juf-author-filter-toggle
):focus-visible{
    outline:2px solid #263787 !important;
    outline-offset:2px;
}
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,
    .newsletter-luxury-btn,.newsletter-premium-btn,.search-btn,.juf-search-submit,
    .premium-cta,.reader-auth-submit-v27,.juf-checkout-pay-v32,
    .juf-login-btn-v24,.btn-hero-cinematic-primary,.premium-primary-btn,
    .premium-plan-card>a,.search-submit-btn,.authors-page .juf-author-search-submit,
    .audio-primary-play,.audiobook-page .audio-inline-play,.audiobook-page .audio-new-play
):disabled,
body.juf-2d-minimal :where(
    .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn
).is-disabled{
    opacity:.55 !important;
    cursor:not-allowed !important;
    transform:none !important;
    box-shadow:none !important;
}

/* ---------- Public site: secondary (outline) buttons ---------- */
body.juf-2d-minimal :where(
    .btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,
    .premium-secondary-btn,.juf-filter-toggle,.juf-author-filter-toggle
){
    background:#ECEAE6 !important;
    border:1px solid #D9D6D0 !important;
    color:#282E37 !important;
    border-radius:var(--juf-btn-radius) !important;
    min-height:44px;
    transition:var(--juf-btn-transition) !important;
    box-shadow:none !important;
}
body.juf-2d-minimal :where(
    .btn-secondary,.secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn,
    .premium-secondary-btn,.juf-filter-toggle,.juf-author-filter-toggle
):hover{
    background:#ECEAE6 !important;
    border-color:#2C3243 !important;
    color:#282E37 !important;
    transform:translateY(-1px);
}

/* ---------- Admin panel buttons ---------- */
.admin-btn,
.admin-main .btn-save,
.admin-main .btn-action-tool,
.admin-settings-nav button{
    border-radius:var(--juf-btn-radius) !important;
    min-height:44px !important;
    transition:var(--juf-btn-transition) !important;
    cursor:pointer;
}
.admin-btn-primary,
.admin-main .btn-save{
    background:#3B4256 !important;
    border-color:#3B4256 !important;
    color:#F6F5F2 !important;
    box-shadow:none !important;
}
.admin-btn-primary:hover,
.admin-main .btn-save:hover{
    background:#2C3243 !important;
    border-color:#2C3243 !important;
    color:#F6F5F2 !important;
    box-shadow:0 4px 12px rgba(59, 66, 86, .18) !important;
    transform:translateY(-1px);
}
.admin-btn-primary:active,
.admin-main .btn-save:active{
    background:#2C3243 !important;
    border-color:#2C3243 !important;
    transform:translateY(0);
    box-shadow:none !important;
}
.admin-btn:not(.admin-btn-primary),
.admin-btn-secondary,
.admin-main .btn-action-tool,
.admin-settings-nav button{
    background:#FFFFFF !important;
    border-color:#D9D6D0 !important;
    color:#282E37 !important;
}
.admin-btn:not(.admin-btn-primary):hover,
.admin-btn-secondary:hover,
.admin-main .btn-action-tool:hover,
.admin-settings-nav button:hover{
    border-color:#2C3243 !important;
    color:#282E37 !important;
    background:#E4E6EC !important;
}
.admin-btn-danger{
    background:#F6F5F2 !important;
    border-color:#D9D6D0 !important;
    color:#B0392B !important;
}
.admin-btn-danger:hover{
    background:#ECEAE6 !important;
    border-color:#D9D6D0 !important;
    color:#5B6376 !important;
}
.admin-btn:focus-visible,
.admin-main .btn-save:focus-visible,
.admin-main .btn-action-tool:focus-visible,
.admin-settings-nav button:focus-visible{
    outline:2px solid #2C3243 !important;
    outline-offset:2px;
}
.admin-shell-body button:disabled{
    opacity:.55 !important;
    cursor:not-allowed !important;
    transform:none !important;
    box-shadow:none !important;
}

/* ---------- Small screens: keep every button a full, comfortable tap target ---------- */
@media (max-width:600px){
    body.juf-2d-minimal :where(
        .btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,.btn-secondary,
        .secondary-btn,.cta-secondary,.juf-secondary-btn,.outline-btn
    ){
        min-height:46px;
        padding-left:16px;
        padding-right:16px;
    }
    .admin-btn,.admin-main .btn-save,.admin-main .btn-action-tool{
        min-height:46px;
    }
}

@media (prefers-reduced-motion:reduce){
    body.juf-2d-minimal :where(.btn-primary,.primary-btn,.cta-primary,.juf-primary-btn,.btn-secondary,.secondary-btn),
    .admin-btn,.admin-main .btn-save,.admin-main .btn-action-tool{
        transition:none !important;
    }
}


/* === MERGED: jufbook-book-depth.css === */
/*
 * JUFbook Global Book Depth Authority — 2026-09-16
 * Scope: presentation only. No data, query, ordering, rendering-count or content changes.
 * Goal: one consistent premium printed-book shadow language everywhere a book cover is rendered.
 */

:root {
    --juf-book-shadow-rest:
        0 18px 27px rgba(40, 46, 55, .155),
        0 6px 11px rgba(40, 46, 55, .095),
        -4px 5px 8px rgba(40, 46, 55, .055),
        inset -1px 0 rgba(255, 255, 255, .24);
    --juf-book-shadow-hover:
        0 23px 34px rgba(40, 46, 55, .18),
        0 8px 13px rgba(40, 46, 55, .105),
        -4px 6px 9px rgba(40, 46, 55, .065),
        inset -1px 0 rgba(255, 255, 255, .26);
    --juf-book-shadow-compact:
        0 9px 15px rgba(40, 46, 55, .145),
        0 3px 7px rgba(40, 46, 55, .085),
        -2px 3px 5px rgba(40, 46, 55, .045),
        inset -1px 0 rgba(255, 255, 255, .20);
    --juf-book-shadow-compact-hover:
        0 12px 19px rgba(40, 46, 55, .17),
        0 4px 8px rgba(40, 46, 55, .09),
        -2px 4px 6px rgba(40, 46, 55, .05),
        inset -1px 0 rgba(255, 255, 255, .22);
}

/*
 * Final authority for GraphicEngine book objects. Repeated class specificity is
 * intentional: several historical page styles used !important; this central rule
 * must remain the single visible shadow authority without changing their layout.
 */
body .juf-book-jacket.juf-book-jacket.juf-book-jacket {
    box-shadow: var(--juf-book-shadow-rest) !important;
    transition-property: transform, box-shadow, filter !important;
    transition-duration: .22s !important;
    transition-timing-function: cubic-bezier(.2,.7,.2,1) !important;
}

body .juf-book-jacket.juf-book-jacket.juf-book-jacket:hover,
body a:hover > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body article:hover .juf-book-jacket.juf-book-jacket.juf-book-jacket {
    box-shadow: var(--juf-book-shadow-hover) !important;
}

/*
 * Compact book thumbnails keep the same direction and softness, scaled to their
 * physical size. This prevents Search/Reader/Profile/Checkout rows from becoming
 * visually heavy while still reading as the same JUFbook book object.
 */
body .juf-search-book > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .home-reading-cover > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .reader-identity-book-cover.reader-identity-book-cover,
body .juf-profile-cover-54.juf-profile-cover-54,
body .juf-profile-cover-62.juf-profile-cover-62,
body .juf-profile-cover-76.juf-profile-cover-76,
body .juf-profile-cover-82.juf-profile-cover-82,
body .juf-profile-cover-86.juf-profile-cover-86,
body .juf-profile-cover-92.juf-profile-cover-92,
body .juf-profile-cover-110.juf-profile-cover-110,
body .audio-row-cover > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .juf-checkout-cover-v32 .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .checkout-mini-cover .juf-book-jacket.juf-book-jacket.juf-book-jacket {
    box-shadow: var(--juf-book-shadow-compact) !important;
}

body .juf-search-book:hover > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .home-reading-cover:hover > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .reader-identity-cover:hover .reader-identity-book-cover.reader-identity-book-cover,
body .profile-cover-link:hover .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .audio-row-cover:hover > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .juf-checkout-cover-v32:hover .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .checkout-mini-cover:hover .juf-book-jacket.juf-book-jacket.juf-book-jacket {
    box-shadow: var(--juf-book-shadow-compact-hover) !important;
}

/* Medium artwork used in audiobook shelves/assistant cards uses a balanced tier. */
body .audio-hub-featured-cover .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .audio-new-cover .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .audio-cover-poster .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body .juf-ai-cover .juf-book-jacket.juf-book-jacket.juf-book-jacket {
    box-shadow:
        0 13px 21px rgba(40, 46, 55, .15),
        0 5px 9px rgba(40, 46, 55, .09),
        -3px 4px 7px rgba(40, 46, 55, .05),
        inset -1px 0 rgba(255, 255, 255, .22) !important;
}

/* Remove legacy parent shadows where they would stack with the cover shadow. */
body.authors-page .juf-author-new-book-cover {
    filter: none !important;
}
body.audiobook-page .audio-hub-featured-cover,
body.audiobook-page .audio-new-cover {
    box-shadow: none !important;
    filter: none !important;
    overflow: visible !important;
}
body.audiobook-page .audio-row-cover {
    box-shadow: none !important;
    overflow: visible !important;
    background: transparent !important;
}

/* Premium hero stack clips its child cover, so the parent carries the same depth. */
body.premium-page .premium-book-stack-live .premium-stack-book {
    box-shadow: var(--juf-book-shadow-rest) !important;
}
body.premium-page .premium-book-stack-live .premium-stack-book:hover {
    box-shadow: var(--juf-book-shadow-hover) !important;
}

/* Audio player artwork is a constrained player surface; retain the same tonal depth
   on the frame rather than forcing a 2:3 book outside the player geometry. */
body .audio-player-art {
    box-shadow:
        0 13px 21px rgba(40, 46, 55, .15),
        0 5px 9px rgba(40, 46, 55, .09) !important;
}
body .audio-player-art > .juf-book-jacket.juf-book-jacket.juf-book-jacket,
body.premium-page .premium-book-stack-live .premium-stack-book > .juf-book-jacket.juf-book-jacket.juf-book-jacket {
    box-shadow: none !important;
}

/* Accessibility and print: no decorative depth where motion/ink economy matters. */
@media (prefers-reduced-motion: reduce) {
    body .juf-book-jacket.juf-book-jacket.juf-book-jacket,
    body.premium-page .premium-book-stack-live .premium-stack-book {
        transition: none !important;
    }
}

@media print {
    body .juf-book-jacket.juf-book-jacket.juf-book-jacket,
    body.premium-page .premium-book-stack-live .premium-stack-book,
    body .audio-player-art {
        box-shadow: none !important;
        filter: none !important;
    }
}


/* === MERGED: jufbook-control-system.css === */
/* JUFbook unified discovery/control system — Build 97.
   Applies the user's compact modern search/filter interaction references to
   JUFbook's warm editorial brand without cloning the reference visuals. */
:root{
  --juf-control-h:44px;
  --juf-control-radius:12px;
  --juf-control-border:#D9D6D0;
  --juf-control-surface:#FFFFFF;
  --juf-control-surface-soft:#E4E6EC;
  --juf-control-text:#282E37;
  --juf-control-muted:#5B6376;
  --juf-control-accent:#3B4256;
  --juf-control-accent-strong:#2C3243;
  --juf-control-shadow:0 18px 44px rgba(40, 46, 55, .12);
}

/* Shared native controls */
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields,.admin-main .admin-filter-row)
:is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,button,a){box-sizing:border-box}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields)
:is(select,input:not([type=checkbox]):not([type=radio]):not([type=hidden])){
  min-height:var(--juf-control-h);border:1px solid var(--juf-control-border);border-radius:10px;
  background:var(--juf-control-surface);color:var(--juf-control-text);font:600 13px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);
  padding:0 13px;outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields)
:is(select,input):focus-visible{border-color:var(--juf-control-accent);box-shadow:0 0 0 3px rgba(59, 66, 86, .10)}

/* Toolbar, search, trigger and compact result copy */
.juf-control-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.juf-control-toolbar .juf-control-result{display:grid;gap:1px;margin-right:auto;min-width:0}
.juf-control-result strong{font:500 13px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);color:var(--juf-control-text)}
.juf-control-result span{font-size:11.5px;color:var(--juf-control-muted)}
.juf-control-search{position:relative;display:flex;align-items:center;min-width:min(390px,100%);height:var(--juf-control-h);border:1px solid var(--juf-control-border);border-radius:var(--juf-control-radius);background:var(--juf-control-surface);transition:border-color .16s ease,box-shadow .16s ease}
.juf-control-search:focus-within{border-color:var(--juf-control-accent);box-shadow:0 0 0 3px rgba(59, 66, 86, .10)}
.juf-control-search>svg,.juf-control-search>.juf-control-search-icon{position:absolute;left:14px;width:17px;height:17px;color:var(--adm-text-muted,#5B6376);pointer-events:none}
.juf-control-search input{width:100%;height:100%;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;padding:0 42px 0 42px!important;font:600 13px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)!important;color:var(--juf-control-text)!important}
.juf-control-search .juf-control-search-clear{position:absolute;right:6px;width:34px;height:34px;min-height:34px;border:0;border-radius:9px;background:transparent;color:var(--adm-text-muted,#5B6376);display:grid;place-items:center;cursor:pointer}
.juf-control-search .juf-control-search-clear:hover{background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37)}
.juf-control-search.has-submit input{padding-right:82px!important}
.juf-control-search.has-submit .juf-control-search-clear{right:40px}
.juf-control-search .juf-control-search-submit{position:absolute;right:5px;width:34px;height:34px;min-height:34px;border:0;border-radius:9px;background:var(--juf-control-accent);color:var(--on-accent,#F6F5F2);display:grid;place-items:center;cursor:pointer}
.juf-control-search .juf-control-search-submit:hover{background:var(--juf-control-accent-strong)}
.juf-control-search .juf-control-search-submit:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(59, 66, 86, .18)}
.juf-control-search .juf-control-search-submit svg,.juf-control-search .juf-control-search-clear svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.juf-books-filter .juf-books-search{flex:1 1 320px;max-width:520px}
.audio-filter-bar .audio-library-search{flex:1 1 340px;max-width:520px}

.juf-control-menu{position:relative;flex:0 0 auto}
.juf-control-menu>summary{list-style:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--juf-control-h);min-width:112px;padding:0 13px;border:1px solid var(--juf-control-border);border-radius:var(--juf-control-radius);background:var(--juf-control-surface);color:var(--juf-control-text);font:500 12.5px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);cursor:pointer;user-select:none;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease}
.juf-control-menu>summary::-webkit-details-marker{display:none}
.juf-control-menu>summary:hover{border-color:#D9D6D0;background:var(--surface,#ECEAE6)}
.juf-control-menu>summary:focus-visible{outline:0;border-color:var(--juf-control-accent);box-shadow:0 0 0 3px rgba(59, 66, 86, .13)}
.juf-control-menu[open]>summary{background:var(--juf-control-accent);border-color:var(--juf-control-accent);color:var(--on-accent,#F6F5F2);box-shadow:0 8px 20px rgba(59, 66, 86, .16)}
.juf-control-trigger-icon{width:17px;height:17px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.juf-control-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--soft,#E4E6EC);color:var(--adm-text,#282E37);font:600 10.5px/1 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.juf-control-menu[open] .juf-control-count{background:var(--surface,#fff);color:var(--ink,#282E37)}

.juf-control-popover{position:absolute;z-index:80;top:calc(100% + 9px);right:0;width:min(520px,calc(100vw - 32px));padding:16px;border:1px solid #D9D6D0;border-radius:16px;background:var(--juf-control-surface,#FFFFFF);box-shadow:var(--juf-control-shadow)}
.juf-control-menu.is-left .juf-control-popover{right:auto;left:0}
.juf-control-popover-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px;padding-bottom:11px;border-bottom:1px solid #D9D6D0}
.juf-control-popover-head strong{font:500 16px var(--font-heading,var(--font-ui),serif);color:var(--adm-text,#282E37)}
.juf-control-popover-head a{font-size:11.5px;font-weight:600;color:var(--juf-control-accent);text-decoration:none}
.juf-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.juf-control-field{display:grid;gap:5px;min-width:0}
.juf-control-field>span{font-size:10.5px;letter-spacing:.02em;font-weight:600;color:var(--adm-text-muted,#5B6376)}
.juf-control-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid #D9D6D0}
.juf-control-apply,.juf-control-reset{display:inline-flex;align-items:center;justify-content:center;min-height:42px;border-radius:10px;padding:0 15px;font:600 12px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);text-decoration:none;cursor:pointer}
.juf-control-apply{border:1px solid var(--juf-control-accent);background:var(--juf-control-accent);color:var(--on-accent,#F6F5F2)}
.juf-control-apply:hover{background:var(--juf-control-accent-strong)}
.juf-control-reset{border:1px solid #D9D6D0;background:var(--juf-control-surface,#fff);color:var(--adm-text-muted,#5B6376)}
.juf-control-reset:hover{background:var(--surface,#ECEAE6)}

/* Active-filter chips */
.juf-active-filter-strip{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0 0}
.juf-active-filter-strip[hidden]{display:none!important}
.juf-active-filter-chip{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:0 9px 0 10px;border:1px solid #D9D6D0;border-radius:999px;background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37);text-decoration:none;font:500 11px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.juf-active-filter-chip:hover{border-color:#D9D6D0;background:var(--juf-control-surface,#FFFFFF)}
.juf-active-filter-chip::after{content:'×';font-size:15px;line-height:1;color:var(--adm-text-muted,#5B6376)}
.juf-active-filter-clear{font-size:11px;font-weight:600;color:var(--juf-control-accent);text-decoration:none;margin-left:2px}

/* Existing discovery surfaces adopt the same geometry. */
.juf-author-directory-tools,.premium-filter-bar,.audio-filter-bar{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important}
.juf-author-filter-more,.premium-filter-more,.audio-filter-more{position:relative!important;margin:0!important}
.juf-author-filter-more>summary,.premium-filter-more>summary,.audio-filter-more>summary{
  min-height:var(--juf-control-h)!important;display:inline-flex!important;align-items:center!important;gap:8px!important;padding:0 13px!important;
  border:1px solid var(--juf-control-border)!important;border-radius:var(--juf-control-radius)!important;background:var(--juf-control-surface)!important;
  color:var(--juf-control-text)!important;font-weight:500!important;cursor:pointer!important;list-style:none!important;
}
.juf-author-filter-more>summary::-webkit-details-marker,.premium-filter-more>summary::-webkit-details-marker,.audio-filter-more>summary::-webkit-details-marker{display:none}
.juf-author-filter-more[open]>summary,.premium-filter-more[open]>summary,.audio-filter-more[open]>summary{background:var(--juf-control-accent)!important;border-color:var(--juf-control-accent)!important;color:var(--on-accent,#F6F5F2)!important}
.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields{position:absolute!important;z-index:78!important;top:calc(100% + 9px)!important;right:0!important;width:min(520px,calc(100vw - 32px))!important;padding:16px!important;border:1px solid #D9D6D0!important;border-radius:16px!important;background:var(--juf-control-surface,#FFFFFF)!important;box-shadow:var(--juf-control-shadow)!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important}
.juf-author-filter-row .juf-author-filter-apply,.juf-author-filter-row .juf-author-clear-filter{min-height:42px!important;border-radius:10px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;text-decoration:none!important}
.premium-search-field{height:var(--juf-control-h)!important;border-radius:var(--juf-control-radius)!important;border:1px solid var(--juf-control-border)!important;background:var(--juf-control-surface)!important;min-width:min(390px,100%)!important}
.premium-search-field input{height:100%!important;border:0!important;background:transparent!important;box-shadow:none!important;outline:0!important}
.premium-filter-bar>button,.audio-filter-bar>button,.juf-author-search-submit{min-height:var(--juf-control-h)!important;border-radius:var(--juf-control-radius)!important;padding:0 16px!important}
.premium-filter-reset{min-height:var(--juf-control-h)!important;display:inline-flex!important;align-items:center!important;padding:0 12px!important;border-radius:var(--juf-control-radius)!important}

/* Admin list/filter rows: same dimensions, warm professional surface. More
   complex Admin popovers are intentionally phased separately. */
.admin-main .admin-filter-row{gap:8px!important;align-items:center!important;padding:8px!important;border:1px solid #D9D6D0;border-radius:13px;background:var(--adm-surface,#F6F5F2);margin:12px 0 16px!important}
.admin-main .admin-filter-row :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:42px;border:1px solid #D9D6D0;border-radius:9px;background:var(--adm-surface,#FFFFFF);padding:0 11px;font:600 12.5px var(--font-ui);color:var(--adm-text,#282E37);min-width:150px}
.admin-main .admin-filter-row input[type=search],.admin-main .admin-filter-row input[name=q]{min-width:240px}
.admin-main .admin-filter-row :is(input,select):focus-visible{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .10)}
.admin-main .admin-filter-row :is(button,.admin-btn){min-height:42px!important;border-radius:9px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}

@media(max-width:760px){
  :root{--juf-control-h:44px}
  .juf-control-toolbar{align-items:stretch}
  .juf-control-result{flex:1 1 100%}
  .juf-control-search{min-width:0;flex:1 1 100%}
  .juf-control-menu{flex:1 1 auto}
  .juf-control-menu>summary{width:100%}
  .juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields{position:fixed!important;z-index:110!important;left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;width:auto!important;max-height:min(72vh,620px);overflow:auto;border-radius:18px!important;padding:16px!important;box-shadow:0 24px 70px rgba(40, 46, 55, .24)!important}
  .juf-control-grid,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields{grid-template-columns:1fr!important}
  .juf-control-actions{position:sticky;bottom:-16px;background:var(--juf-control-surface,#FFFFFF);padding-bottom:4px}
  .juf-author-directory-tools,.premium-filter-bar,.audio-filter-bar{align-items:stretch!important}
  .juf-author-filter-more,.premium-filter-more,.audio-filter-more{flex:1 1 auto!important}
  .juf-author-filter-more>summary,.premium-filter-more>summary,.audio-filter-more>summary{width:100%!important;justify-content:center!important}
  .premium-filter-bar>button,.audio-filter-bar>button,.juf-author-search-submit{min-width:96px}
  .admin-main .admin-filter-row{padding:8px;align-items:stretch!important}
  .admin-main .admin-filter-row :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,button){width:100%!important;min-width:0!important}
}

@media(prefers-reduced-motion:reduce){
  .juf-control-menu>summary,.juf-control-search,:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields){transition:none!important}
}

/* Page-specific specificity guards: older page polish files contain important
   grid declarations; this final shared layer intentionally owns filter panels. */
body.authors-page .juf-author-filter-more> .juf-author-filter-row,
body.premium-page .premium-filter-more> .premium-filter-fields,
body.audiobook-page .audio-filter-more> .audio-filter-fields{
  position:absolute!important;z-index:78!important;top:calc(100% + 9px)!important;right:0!important;left:auto!important;
  width:min(520px,calc(100vw - 32px))!important;padding:16px!important;border:1px solid #D9D6D0!important;border-radius:16px!important;
  background:var(--juf-control-surface,#FFFFFF)!important;box-shadow:var(--juf-control-shadow)!important;display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important;margin:0!important;
}
body.authors-page .juf-author-filter-more:not([open])>.juf-author-filter-row,
body.premium-page .premium-filter-more:not([open])>.premium-filter-fields,
body.audiobook-page .audio-filter-more:not([open])>.audio-filter-fields{display:none!important}
body.premium-page .premium-filter-fields .juf-control-actions,
body.audiobook-page .audio-filter-fields .juf-control-actions{grid-column:1/-1}
body.authors-page .juf-author-filter-row .juf-author-filter-apply{grid-column:auto}

@media(max-width:760px){
  body.authors-page .juf-author-filter-more> .juf-author-filter-row,
  body.premium-page .premium-filter-more> .premium-filter-fields,
  body.audiobook-page .audio-filter-more> .audio-filter-fields{
    position:fixed!important;z-index:110!important;left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;
    width:auto!important;max-height:min(72vh,620px)!important;overflow:auto!important;grid-template-columns:1fr!important;
    border-radius:18px!important;padding:16px!important;box-shadow:0 24px 70px rgba(40, 46, 55, .24)!important;
  }
}

/* Build 98 — Admin list/table control system. Progressive enhancement keeps
   every existing GET form functional without JavaScript, then upgrades it to
   the same compact search + filter interaction language used publicly. */
.admin-main .admin-control-bar{
  display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important;
  margin:12px 0 8px!important;padding:9px!important;border:1px solid #D9D6D0!important;
  border-radius:14px!important;background:var(--adm-surface,#F6F5F2)!important;box-shadow:0 1px 0 rgba(40, 46, 55, .02);
}
.admin-main .admin-control-search{
  position:relative;display:flex;align-items:center;flex:1 1 280px;min-width:min(360px,100%);height:44px;
  border:1px solid #D9D6D0;border-radius:11px;background:var(--adm-surface,#FFFFFF);transition:border-color .16s ease,box-shadow .16s ease;
}
.admin-main .admin-control-search:focus-within{border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .10)}
.admin-main .admin-control-search>svg{position:absolute;left:13px;width:17px;height:17px;color:var(--adm-text-muted,#5B6376);pointer-events:none}
.admin-main .admin-control-search>input{
  width:100%!important;height:100%!important;min-height:0!important;min-width:0!important;border:0!important;border-radius:11px!important;
  background:transparent!important;box-shadow:none!important;outline:0!important;padding:0 40px 0 39px!important;font-size:12.5px!important;
}
.admin-main .admin-control-search-clear{position:absolute;right:5px;width:34px!important;height:34px!important;min-height:34px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--adm-text-muted,#5B6376);font-size:18px;cursor:pointer}
.admin-main .admin-control-search-clear:hover{background:var(--surface,#ECEAE6)!important;color:var(--adm-text,#282E37)}
.admin-main .admin-filter-menu{position:relative;flex:0 0 auto}
.admin-main .admin-filter-menu>summary{height:44px;min-width:112px;border-radius:11px;font-size:12px}
.admin-main .admin-filter-panel{width:min(580px,calc(100vw - 48px));padding:16px}
.admin-main .admin-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.admin-main .admin-filter-field{display:grid!important;gap:5px!important;min-width:0!important;margin:0!important}
.admin-main .admin-filter-field>label,.admin-main label.admin-filter-field,.admin-main .admin-filter-field>span{font-size:11px!important;font-weight:600!important;color:var(--adm-text-muted,#5B6376)}
.admin-main .admin-filter-field :is(input:not([type=checkbox]):not([type=radio]),select){width:100%!important;min-width:0!important;min-height:42px!important;border:1px solid #D9D6D0!important;border-radius:9px!important;background:var(--adm-surface,#FFFFFF)!important;padding:0 11px!important;font:600 12.5px var(--font-ui)!important;color:var(--adm-text,#282E37)!important}
.admin-main .admin-filter-field :is(input,select):focus-visible{outline:0!important;border-color:var(--adm-text,#2C3243)!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .10)!important}
.admin-main .admin-filter-reset-link{border:0;background:transparent;color:#3B4256;font:600 11.5px var(--font-ui);cursor:pointer;padding:5px}
.admin-main .admin-filter-reset-link:hover{text-decoration:underline}
.admin-main .admin-control-legacy-submit{display:none!important}
.admin-active-filter-strip{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 15px}
.admin-active-filter-chip{display:inline-flex;align-items:center;gap:7px;min-height:31px;padding:0 9px 0 10px;border:1px solid #D9D6D0;border-radius:999px;background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37);text-decoration:none;font:500 10.8px var(--font-ui);max-width:100%}
.admin-active-filter-chip::after{content:'×';font-size:14px;color:var(--adm-text-muted,#5B6376)}.admin-active-filter-chip:hover{background:var(--adm-surface,#FFFFFF);border-color:#D9D6D0}
.admin-active-filter-clear{font:600 11px var(--font-ui);color:#3B4256;text-decoration:none;padding:6px}.admin-active-filter-clear:hover{text-decoration:underline}

/* Existing status/preset rails now read as one consistent compact filter tier. */
.admin-main :is(.community-filters,.juf-edit-filter){display:flex!important;align-items:center;gap:7px!important;flex-wrap:wrap!important;margin:10px 0 14px!important}
.admin-main :is(.community-filters,.juf-edit-filter)>a,
.admin-main .admin-filter-chip{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;padding:0 10px!important;border:1px solid #D9D6D0!important;border-radius:999px!important;background:var(--adm-surface,#FFFFFF)!important;color:var(--adm-text,#282E37)!important;text-decoration:none!important;font:500 11px var(--font-ui)!important;white-space:nowrap}
.admin-main :is(.community-filters,.juf-edit-filter)>a[aria-current="page"],
.admin-main :is(.community-filters,.juf-edit-filter)>a.is-active,
.admin-main .admin-filter-chip.is-active{background:#3B4256!important;border-color:#3B4256!important;color:#fff!important}
.admin-main :is(.community-filters,.juf-edit-filter)>a span{display:inline-grid;place-items:center;min-width:19px;height:19px;margin-left:6px;padding:0 5px;border-radius:999px;background:var(--surface,#ECEAE6);color:var(--adm-text-muted,#5B6376);font-size:9.5px}
.admin-main :is(.community-filters,.juf-edit-filter)>a[aria-current="page"] span{background:var(--adm-surface,#fff);color:var(--adm-text,#3B4256)}

/* Tables keep their existing data contract while sharing cleaner table chrome. */
.admin-main .admin-table-wrap{border:1px solid #D9D6D0!important;border-radius:14px!important;background:var(--adm-surface,#FFFFFF)!important;overflow:auto!important}
.admin-main .admin-table{width:100%;border-collapse:separate!important;border-spacing:0!important;background:var(--juf-control-surface,#FFFFFF)}
.admin-main .admin-table thead th{position:relative;background:var(--adm-surface,#ECEAE6)!important;color:var(--adm-text-muted,#5B6376)!important;border-bottom:1px solid #D9D6D0!important;padding:10px 12px!important;font-size:10.8px!important;letter-spacing:.015em;text-transform:none}
.admin-main .admin-table tbody td{padding:11px 12px!important;border-bottom:1px solid #D9D6D0!important;background:var(--adm-surface,#FFFFFF)!important}
.admin-main .admin-table tbody tr:last-child td{border-bottom:0!important}
.admin-main .admin-table tbody tr:hover td{background:var(--adm-surface,#F6F5F2)!important}
.admin-main .admin-table td .admin-btn{min-height:36px!important;padding:0 10px!important;font-size:11px!important;border-radius:8px!important}

/* Existing export surfaces get a compact professional menu rather than a row
   of equal-weight download buttons. */
.admin-export-menu{position:relative;display:inline-block}
.admin-export-menu>summary{list-style:none;display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:0 12px;border:1px solid #D9D6D0;border-radius:10px;background:var(--adm-surface,#FFFFFF);color:var(--adm-text,#282E37);font:500 12px var(--font-ui);cursor:pointer}
.admin-export-menu>summary::-webkit-details-marker{display:none}
.admin-export-menu[open]>summary{border-color:#3B4256;box-shadow:0 0 0 3px rgba(59, 66, 86, .10)}
.admin-export-panel{position:absolute;z-index:90;top:calc(100% + 7px);right:0;display:grid;gap:4px;min-width:190px;padding:7px;border:1px solid #D9D6D0;border-radius:12px;background:var(--adm-surface,#FFFFFF);box-shadow:var(--juf-control-shadow)}
.admin-export-panel a{display:flex;align-items:center;min-height:36px;padding:0 10px;border-radius:8px;color:var(--adm-text,#282E37);text-decoration:none;font:500 11.5px var(--font-ui)}
.admin-export-panel a:hover{background:var(--surface,#ECEAE6);color:var(--adm-text,#2C3243)}

@media(max-width:760px){
  .admin-main .admin-control-bar{align-items:stretch!important;padding:8px!important}
  .admin-main .admin-control-search{flex:1 1 100%;min-width:0}
  .admin-main .admin-filter-menu{flex:1 1 auto}
  .admin-main .admin-filter-menu>summary{width:100%}
  .admin-main .admin-filter-panel{position:fixed!important;z-index:120!important;left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;width:auto!important;max-height:min(72vh,620px);overflow:auto;border-radius:18px!important;box-shadow:0 24px 70px rgba(40, 46, 55, .24)!important}
  .admin-main .admin-filter-grid{grid-template-columns:1fr!important}
  .admin-main .admin-filter-actions{position:sticky;bottom:-16px;background:var(--adm-surface,#FFFFFF);padding-bottom:4px}
  .admin-active-filter-strip{margin-top:2px}
  .admin-export-panel{position:fixed;left:12px;right:12px;bottom:12px;top:auto;min-width:0}
  .admin-main .admin-table-wrap{border-radius:12px!important}
}

@media(prefers-reduced-motion:reduce){
  .admin-main .admin-control-search,.admin-main .admin-filter-menu>summary{transition:none!important}
}
.admin-main .admin-filter-row:has(> form.admin-control-bar){padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;align-items:center!important}
.admin-main .admin-filter-row:has(> form.admin-control-bar)>form.admin-control-bar{flex:1 1 360px;height:auto!important;min-height:0!important;align-content:flex-start!important;margin:0!important}
.admin-main .admin-control-legacy-actions,.admin-main .admin-control-legacy-holder{display:none!important}
.admin-row-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.admin-row-actions form{margin:0}
.admin-reader-status{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;font-size:10.5px;text-transform:capitalize}.admin-reader-status.is-active{background:var(--soft,#E4E6EC);color:var(--ok,#2E7A4F)}.admin-reader-status.is-disabled{background:var(--bg,#F6F5F2);color:var(--danger,#B0392B)}
@media(max-width:760px){.admin-main .admin-filter-row:has(> form.admin-control-bar){align-items:stretch!important}.admin-main .admin-filter-row:has(> form.admin-control-bar)>form.admin-control-bar,.admin-main form.admin-control-bar{flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:0!important;align-content:flex-start!important}.admin-main .admin-filter-row>div>a.admin-btn,.admin-main nav.admin-filter-row>a.admin-btn{width:auto!important;flex:1 1 auto!important}}

/* Build 99 — Control System Phase 3: form primitives.
   Shared visual/interaction language for native selects, toggles, checkboxes,
   ranges, file inputs and button states without changing field semantics. */

/* Selects keep native keyboard semantics while using one compact JUFbook affordance. */
.admin-main select:not([multiple]),
.juf-control-popover select:not([multiple]),
.reader-settings-popover select:not([multiple]),
.reader-review-report select:not([multiple]){
  -webkit-appearance:none;appearance:none;
  min-height:44px;
  padding-right:38px!important;
  background-image:
    linear-gradient(45deg,transparent 50%,#3B4256 50%),
    linear-gradient(135deg,#3B4256 50%,transparent 50%);
  background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;
  background-size:5px 5px,5px 5px;
  background-repeat:no-repeat;
}
.admin-main select:not([multiple]):disabled,
.juf-control-popover select:not([multiple]):disabled,
.reader-settings-popover select:not([multiple]):disabled{background-color:var(--surface,#ECEAE6)!important;color:var(--adm-text-muted,#5B6376)!important;cursor:not-allowed}

/* Checkbox/radio baseline. True settings switches use .toggle-label below;
   confirmation/destructive checkboxes remain visibly checkboxes. */
.admin-main input[type="checkbox"]:not(.juf-switch-input),
.admin-main input[type="radio"],
.reader-settings-popover input[type="checkbox"],
.juf-policy-check input[type="checkbox"]{
  width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;
  margin:0;accent-color:var(--juf-control-accent);cursor:pointer;vertical-align:middle;
}
.admin-main input[type="checkbox"]:focus-visible,
.admin-main input[type="radio"]:focus-visible,
.reader-settings-popover input[type="checkbox"]:focus-visible,
.juf-policy-check input[type="checkbox"]:focus-visible{
  outline:3px solid rgba(59, 66, 86, .16);outline-offset:2px;
}
.admin-main input[type="checkbox"]:disabled,
.admin-main input[type="radio"]:disabled,
.reader-settings-popover input[type="checkbox"]:disabled{cursor:not-allowed;opacity:.58}
.admin-main :is(.community-checkbox,.media-select,.draft-create-confirm,.featured-author-remove,.image-crop-toggle),
.reader-settings-popover .reader-setting-checks label,
.juf-policy-check{
  align-items:center;gap:10px;min-height:42px;
}
.reader-settings-popover .reader-setting-checks{display:grid;gap:7px;margin-top:13px}
.reader-settings-popover .reader-setting-checks label{
  display:flex;padding:8px 10px;border:1px solid color-mix(in srgb,var(--reader-border) 88%,transparent);border-radius:10px;
  background:var(--reader-surface);color:var(--reader-text);font:650 12px var(--font-ui);
}

/* Settings toggles are switches; confirmation checkboxes elsewhere are not. */
.admin-main .toggle-label{
  display:flex!important;align-items:center!important;gap:11px!important;min-height:44px!important;
  padding:8px 10px!important;border:1px solid #D9D6D0!important;border-radius:11px!important;background:var(--adm-surface,#FFFFFF)!important;
  color:var(--adm-text,#282E37)!important;font-weight:500!important;cursor:pointer!important;
}
.admin-main .toggle-label input[type="checkbox"]{
  -webkit-appearance:none!important;appearance:none!important;
  flex:0 0 42px!important;width:42px!important;height:24px!important;min-width:42px!important;min-height:24px!important;margin:0!important;
  border:1px solid #D9D6D0!important;border-radius:999px!important;background-color:#E4E6EC!important;
  background-image:radial-gradient(circle at 12px 50%,#FFF 0 8px,rgba(255, 255, 255, 0) 8.6px)!important;
  box-shadow:inset 0 1px 2px rgba(40, 46, 55, .12)!important;transition:background-color .16s ease,border-color .16s ease,background-position .16s ease!important;
  cursor:pointer!important;
}
.admin-main .toggle-label input[type="checkbox"]:checked{
  border-color:var(--juf-control-accent)!important;background-color:var(--juf-control-accent)!important;
  background-image:radial-gradient(circle at 29px 50%,#FFF 0 8px,rgba(255, 255, 255, 0) 8.6px)!important;
}
.admin-main .toggle-label input[type="checkbox"]:focus-visible{outline:0!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .16),inset 0 1px 2px rgba(40, 46, 55, .12)!important}
.admin-main .toggle-label input[type="checkbox"]:disabled{cursor:not-allowed!important;opacity:.58!important}
.admin-main .toggle-label:has(input:disabled){cursor:not-allowed!important;background:var(--surface,#ECEAE6)!important;color:var(--adm-text-muted,#5B6376)!important}

/* Range controls: same track/thumb geometry across Reader, audio and crop tools. */
.admin-main input[type="range"],
.reader-settings-popover input[type="range"],
.reader-page .reader-audio-player input[type="range"],
.audio-player-panel input[type="range"],
.juf-player-timeline input[type="range"],
.home-audio-seek{
  -webkit-appearance:none;appearance:none;width:100%;height:28px;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer;
}
.admin-main input[type="range"]::-webkit-slider-runnable-track,
.reader-settings-popover input[type="range"]::-webkit-slider-runnable-track,
.reader-page .reader-audio-player input[type="range"]::-webkit-slider-runnable-track,
.audio-player-panel input[type="range"]::-webkit-slider-runnable-track,
.juf-player-timeline input[type="range"]::-webkit-slider-runnable-track,
.home-audio-seek::-webkit-slider-runnable-track{height:5px;border-radius:999px;background:var(--soft,#E4E6EC)}
.admin-main input[type="range"]::-moz-range-track,
.reader-settings-popover input[type="range"]::-moz-range-track,
.reader-page .reader-audio-player input[type="range"]::-moz-range-track,
.audio-player-panel input[type="range"]::-moz-range-track,
.juf-player-timeline input[type="range"]::-moz-range-track,
.home-audio-seek::-moz-range-track{height:5px;border-radius:999px;background:var(--soft,#E4E6EC)}
.admin-main input[type="range"]::-webkit-slider-thumb,
.reader-settings-popover input[type="range"]::-webkit-slider-thumb,
.reader-page .reader-audio-player input[type="range"]::-webkit-slider-thumb,
.audio-player-panel input[type="range"]::-webkit-slider-thumb,
.juf-player-timeline input[type="range"]::-webkit-slider-thumb,
.home-audio-seek::-webkit-slider-thumb{
  -webkit-appearance:none;width:18px;height:18px;margin-top:-6.5px;border:2px solid #FFF;border-radius:50%;background:var(--juf-control-accent);box-shadow:0 1px 4px rgba(40, 46, 55, .24);
}
.admin-main input[type="range"]::-moz-range-thumb,
.reader-settings-popover input[type="range"]::-moz-range-thumb,
.reader-page .reader-audio-player input[type="range"]::-moz-range-thumb,
.audio-player-panel input[type="range"]::-moz-range-thumb,
.juf-player-timeline input[type="range"]::-moz-range-thumb,
.home-audio-seek::-moz-range-thumb{
  width:16px;height:16px;border:2px solid #FFF;border-radius:50%;background:var(--juf-control-accent);box-shadow:0 1px 4px rgba(40, 46, 55, .24);
}
.admin-main input[type="range"]:focus-visible,
.reader-settings-popover input[type="range"]:focus-visible,
.reader-page .reader-audio-player input[type="range"]:focus-visible,
.audio-player-panel input[type="range"]:focus-visible,
.juf-player-timeline input[type="range"]:focus-visible,
.home-audio-seek:focus-visible{outline:3px solid rgba(59, 66, 86, .16);outline-offset:2px;border-radius:999px}

/* Visible admin file inputs use one upload control. Hidden rich-editor pickers stay hidden. */
.admin-main input[type="file"]:not([hidden]){
  width:100%!important;min-height:50px!important;padding:5px 7px!important;border:1px dashed #D9D6D0!important;border-radius:11px!important;
  background:var(--bg,#F6F5F2)!important;color:var(--adm-text-muted,#5B6376)!important;font:650 12px var(--font-ui)!important;cursor:pointer!important;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease!important;
}
.admin-main input[type="file"]:not([hidden])::file-selector-button{
  min-height:38px;margin-right:10px;padding:0 13px;border:1px solid #D9D6D0;border-radius:8px;background:var(--adm-surface,#FFF);color:var(--adm-text,#282E37);
  font:600 11.5px var(--font-ui);cursor:pointer;transition:background .16s ease,border-color .16s ease,color .16s ease;
}
.admin-main input[type="file"]:not([hidden]):hover{border-color:#D9D6D0!important;background:var(--adm-surface,#FFFFFF)!important}
.admin-main input[type="file"]:not([hidden]):hover::file-selector-button{border-color:#D9D6D0;background:var(--surface,#ECEAE6);color:var(--adm-text,#2C3243)}
.admin-main input[type="file"]:not([hidden]):focus-visible{outline:0!important;border-color:var(--adm-text,#2C3243)!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .13)!important}
.admin-main input[type="file"].is-dragging:not([hidden]){border-color:#3B4256!important;background:var(--soft,#E4E6EC)!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .10)!important}
.admin-main input[type="file"]:disabled:not([hidden]){opacity:.58;cursor:not-allowed!important;background:var(--surface,#ECEAE6)!important}
.juf-file-status{display:block;margin-top:5px;color:var(--adm-text-muted,#5B6376);font:650 10.8px var(--font-ui);overflow-wrap:anywhere}
.juf-file-status.has-file{color:var(--adm-text,#282E37);font-weight:600}

/* Button hierarchy, focus and disabled states. No page-specific action is recoloured. */
.admin-main .admin-btn,
.admin-main button:not(.admin-control-search-clear):not(.admin-filter-reset-link),
.juf-control-apply,.juf-control-reset,
.reader-settings-popover button{
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .12s ease;
}
.admin-main .admin-btn:hover:not(:disabled),
.admin-main button:hover:not(:disabled),
.juf-control-apply:hover,.juf-control-reset:hover,
.reader-settings-popover button:hover:not(:disabled){transform:translateY(-1px)}
.admin-main .admin-btn:active:not(:disabled),
.admin-main button:active:not(:disabled),
.juf-control-apply:active,.juf-control-reset:active,
.reader-settings-popover button:active:not(:disabled){transform:translateY(0)}
.admin-main :is(.admin-btn,button):focus-visible,
.juf-control-apply:focus-visible,.juf-control-reset:focus-visible,
.reader-settings-popover button:focus-visible{
  outline:0!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .16)!important;
}
.admin-main :is(.admin-btn,button):disabled,
.admin-main .admin-btn[aria-disabled="true"],
.juf-control-apply:disabled,.juf-control-reset:disabled,
.reader-settings-popover button:disabled{
  opacity:.52!important;cursor:not-allowed!important;transform:none!important;box-shadow:none!important;filter:saturate(.55)!important;
}

/* Compact icon buttons keep a dependable touch/focus target. */
.admin-main :is(.admin-menu-toggle,.admin-control-search-clear),
.reader-page .reader-icon-btn,
.audio-player-panel :is(#juf-prev-track,#juf-main-play,#juf-next-track,#juf-mute),
.juf-control-search-clear{
  min-width:42px;min-height:42px;touch-action:manipulation;
}
.admin-main :is(.admin-menu-toggle,.admin-control-search-clear):focus-visible,
.reader-page .reader-icon-btn:focus-visible,
.audio-player-panel :is(#juf-prev-track,#juf-main-play,#juf-next-track,#juf-mute):focus-visible,
.juf-control-search-clear:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(51, 70, 168, .16)}

@media(max-width:760px){
  .admin-main input[type="file"]:not([hidden]){min-height:54px!important}
  .admin-main input[type="file"]:not([hidden])::file-selector-button{min-height:42px}
  .admin-main .toggle-label{min-height:48px!important}
}
@media(prefers-reduced-motion:reduce){
  .admin-main .toggle-label input[type="checkbox"],
  .admin-main input[type="file"]:not([hidden]),
  .admin-main .admin-btn,.admin-main button,.reader-settings-popover button{transition:none!important}
}

/* Build 100 — Control System Phase 4: form groups, validation, editor chrome,
   bulk-selection feedback and shared confirmation UX. */

/* Field-group rhythm and help/error hierarchy. */
.admin-main :is(.form-group,.juf-admin-field,.support-compose>label,.draft-create-grid>label,.image-change-grid form>label),
.contact-field,
.reader-review-report form>label{
  display:grid;gap:7px;min-width:0;
}
.admin-main :is(.form-group,.juf-admin-field)>label,
.admin-main .support-compose>label,
.contact-field>label,
.reader-review-report form>label{
  color:var(--adm-text,#282E37);font-weight:600;font-size:12.5px;line-height:1.45;
}
.admin-main :is(.form-group,.juf-admin-field) small,
.admin-main .admin-help,
.admin-main .admin-helper,
.contact-field small,
.juf-field-help{
  color:var(--adm-text-muted,#5B6376);font-size:11.25px;line-height:1.55;font-weight:550;
}

/* Date/time controls follow the same control geometry without replacing native pickers. */
.admin-main input:is([type="date"],[type="datetime-local"],[type="time"],[type="month"]),
.contact-field input:is([type="date"],[type="datetime-local"],[type="time"],[type="month"]),
.reader-review-report input:is([type="date"],[type="datetime-local"],[type="time"]){
  min-height:var(--juf-control-h)!important;border:1px solid var(--juf-control-border)!important;border-radius:10px!important;
  background:var(--juf-control-surface)!important;color:var(--juf-control-text)!important;padding:0 12px!important;
  color-scheme:light;
}
.admin-main input:is([type="date"],[type="datetime-local"],[type="time"],[type="month"]):focus-visible,
.contact-field input:is([type="date"],[type="datetime-local"],[type="time"],[type="month"]):focus-visible{
  outline:0!important;border-color:var(--juf-control-accent)!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .13)!important;
}

/* Long-form text fields: readable defaults, bounded resizing and clear invalid state. */
.admin-main textarea:not([hidden]),
.contact-field textarea,
.reader-review-report textarea{
  width:100%;box-sizing:border-box;min-height:108px;resize:vertical;border:1px solid var(--juf-control-border);border-radius:10px;
  background:var(--juf-control-surface);color:var(--juf-control-text);padding:11px 12px;line-height:1.65;outline:none;
}
.admin-main textarea:not([hidden]):focus-visible,
.contact-field textarea:focus-visible,
.reader-review-report textarea:focus-visible{
  border-color:var(--juf-control-accent);box-shadow:0 0 0 3px rgba(59, 66, 86, .13);
}
:is(.admin-main,.contact-page,.reader-review-report) :is(input,select,textarea).juf-field-invalid,
:is(.admin-main,.contact-page,.reader-review-report) :is(input,select,textarea)[aria-invalid="true"]{
  border-color:var(--danger,#B0392B)!important;box-shadow:0 0 0 3px rgba(91, 99, 118, .11)!important;
}
.juf-field-error{display:block;margin-top:5px;color:var(--adm-text-muted,#5B6376);font:500 11px/1.45 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.juf-char-counter{display:block;margin-top:5px;text-align:right;color:var(--adm-text-muted,#5B6376);font:650 10.5px/1.3 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);font-variant-numeric:tabular-nums}
.juf-char-counter.is-near-limit{color:var(--adm-text-muted,#5B6376);font-weight:600}.juf-char-counter.is-at-limit{color:var(--adm-text-muted,#5B6376);font-weight:600}

/* Notice hierarchy across Admin and the main public form surfaces. */
:where(.admin-message-success,.admin-notice-success,.admin-alert.success,.alert-success,.contact-alert.success,.notification-flash.success,.profile-hub-notice.is-success){
  border:1px solid #E4E6EC!important;border-left:4px solid #2E7A4F!important;border-radius:11px!important;background:var(--soft,#E4E6EC)!important;color:var(--ok,#2E7A4F)!important;padding:11px 13px!important;
}
:where(.admin-message-error,.admin-notice-error,.admin-alert.error,.alert-error,.contact-alert.error,.notification-flash.error,.profile-hub-notice.is-error){
  border:1px solid #D9D6D0!important;border-left:4px solid #B0392B!important;border-radius:11px!important;background:var(--bg,#F6F5F2)!important;color:var(--danger,#B0392B)!important;padding:11px 13px!important;
}
:where(.admin-message-warning,.admin-notice-warning,.alert-warning){
  border:1px solid #D9D6D0!important;border-left:4px solid #3B4256!important;border-radius:11px!important;background:var(--bg,#F6F5F2)!important;color:var(--adm-text,#282E37)!important;padding:11px 13px!important;
}

/* Rich-editor toolbar stays native/local but adopts the shared compact control language. */
.admin-main .juf-rich-editor-shell{border-radius:12px;min-width:0}
.admin-main .juf-editor-toolbar{
  gap:6px!important;padding:8px!important;border-color:#D9D6D0!important;background:var(--surface,#ECEAE6)!important;border-radius:11px 11px 0 0!important;
}
.admin-main .juf-editor-toolbar :is(button,select){
  min-height:38px!important;min-width:38px!important;border:1px solid #D9D6D0!important;border-radius:8px!important;background:var(--adm-surface,#FFFFFF)!important;color:var(--adm-text,#282E37)!important;
}
.admin-main .juf-editor-toolbar button:hover{background:var(--surface,#ECEAE6)!important;border-color:#D9D6D0!important}
.admin-main .juf-editor-toolbar :is(button,select):focus-visible{outline:0!important;border-color:var(--adm-text,#2C3243)!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .14)!important}
.admin-main .juf-editor-toolbar select{min-width:122px!important;padding-inline:10px 32px!important}
.admin-main .juf-rich-editor{border-color:#D9D6D0!important;background:var(--adm-surface,#FFFFFF)!important;border-radius:0 0 11px 11px!important;line-height:1.75}
.admin-main .juf-rich-editor:focus{outline:0!important;border-color:var(--adm-text,#2C3243)!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .10)!important}

/* Bulk-selection action bar for Media Library review flow. */
.admin-main .media-selection.juf-bulk-action-bar{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid #D9D6D0;border-radius:13px;background:var(--adm-surface,#FFFFFF);box-shadow:0 10px 28px rgba(40, 46, 55, .08);
}
.admin-main .media-selection.juf-bulk-action-bar>p{margin:0 auto 0 0;min-width:220px}
.juf-bulk-selection-status{display:inline-flex;align-items:center;min-height:34px;padding:0 10px;border-radius:999px;background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37);font:600 11px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.juf-bulk-selection-tools{display:flex;gap:7px;flex-wrap:wrap}
.juf-bulk-selection-tools button{min-height:38px!important}

/* Shared public confirmation dialog. Admin keeps its existing dialog logic, but
   both surfaces now share the same visual grammar. */
.juf-confirm-dialog,.admin-dialog{
  width:min(92vw,460px);max-width:460px;border:1px solid #D9D6D0!important;border-radius:18px!important;background:var(--adm-surface,#FFFFFF)!important;color:var(--adm-text,#282E37)!important;
  padding:0!important;box-shadow:0 28px 80px rgba(40, 46, 55, .28)!important;
}
.juf-confirm-dialog::backdrop,.admin-dialog::backdrop{background:rgba(40, 46, 55, .58);backdrop-filter:blur(2px)}
.juf-confirm-dialog-inner{padding:22px}
.juf-confirm-dialog h2,.admin-dialog h2{margin:0 0 8px;font-size:19px;line-height:1.35;color:var(--adm-text,#282E37)}
.juf-confirm-dialog p,.admin-dialog p{margin:0;color:var(--adm-text-muted,#5B6376);line-height:1.65;font-size:13px}
.juf-confirm-dialog-actions,.admin-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}
.juf-confirm-dialog-actions button{min-height:42px;padding:0 15px;border-radius:10px;font:600 12px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);cursor:pointer}
.juf-confirm-cancel{border:1px solid #D9D6D0;background:var(--juf-control-surface,#FFF);color:var(--adm-text-muted,#5B6376)}.juf-confirm-cancel:hover{background:var(--surface,#ECEAE6)}
.juf-confirm-submit{border:1px solid #B0392B;background:#B0392B;color:#FFF}.juf-confirm-submit:hover{background:#2C3243}
.juf-confirm-dialog-actions button:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(59, 66, 86, .16)}

@media(max-width:760px){
  .admin-main .juf-editor-toolbar{flex-wrap:nowrap!important;overflow-x:auto!important;overscroll-behavior-inline:contain;padding-bottom:10px!important}
  .admin-main .juf-editor-toolbar :is(button,select){flex:0 0 auto}
  .admin-main .media-selection.juf-bulk-action-bar>p{flex:1 1 100%}
  .juf-bulk-selection-tools,.juf-confirm-dialog-actions,.admin-dialog-actions{width:100%}
  .juf-bulk-selection-tools button,.juf-confirm-dialog-actions button,.admin-dialog-actions button{flex:1 1 0}
  .juf-confirm-dialog-inner{padding:19px}
}
@media(prefers-reduced-motion:reduce){
  .juf-confirm-dialog,.admin-dialog,.admin-main .juf-editor-toolbar :is(button,select){scroll-behavior:auto!important;transition:none!important}
}


/* Build 101 — Control System Phase 5: navigation states, pagination, tabs and empty-result surfaces. */

/* One pagination language across public discovery and Admin workspaces. Existing
   routes/query builders remain authoritative; this layer only standardizes state. */
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination),
.admin-main :is(.admin-pagination,.juf-admin-pagination){
  display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;
  width:100%;margin:26px 0;padding:0;background:transparent;
}
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>a,
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>.active,
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>[aria-current="page"],
.admin-main :is(.admin-pagination,.juf-admin-pagination)>a,
.admin-main :is(.admin-pagination,.juf-admin-pagination)>.juf-pagination-page{
  display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:0 11px;
  border:1px solid #D9D6D0;border-radius:10px;background:var(--adm-surface,#FFFFFF);color:var(--adm-text,#282E37);text-decoration:none;
  font:500 11.5px/1 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);white-space:nowrap;box-sizing:border-box;
  transition:border-color .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease,transform .12s ease;
}
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>a:hover,
.admin-main :is(.admin-pagination,.juf-admin-pagination)>a:hover{
  border-color:#D9D6D0;background:var(--surface,#ECEAE6);color:var(--adm-text,#2C3243);transform:translateY(-1px);
}
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>a:focus-visible,
.admin-main :is(.admin-pagination,.juf-admin-pagination)>a:focus-visible{
  outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .14);
}
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>.active,
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>[aria-current="page"],
.admin-main :is(.admin-pagination,.juf-admin-pagination)>[aria-current="page"],
.admin-main :is(.admin-pagination,.juf-admin-pagination)>.is-active{
  border-color:#3B4256;background:#3B4256;color:#FFF;box-shadow:none;pointer-events:none;
}
:is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>.juf-pagination-summary,
.admin-main :is(.admin-pagination,.juf-admin-pagination)>.juf-pagination-summary{
  color:var(--adm-text-muted,#5B6376);font:650 11px/1.4 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);padding:0 5px;font-variant-numeric:tabular-nums;
}
:is(.juf-control-pagination,.category-pagination)>span[aria-hidden="true"]{
  min-width:auto;height:auto;padding:0 2px;border:0;background:transparent;color:var(--adm-text-muted,#5B6376);
}
.admin-main .juf-pagination-pages{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
.admin-main .juf-pagination-pages .juf-pagination-page{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:0 10px;border:1px solid #D9D6D0;border-radius:10px;background:var(--adm-surface,#FFFFFF);color:var(--adm-text,#282E37);text-decoration:none;font:500 11.5px/1 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.admin-main .juf-pagination-pages .juf-pagination-page[aria-current="page"]{background:#3B4256;border-color:#3B4256;color:#FFF;pointer-events:none}
.admin-main .juf-pagination-pages .juf-pagination-ellipsis{display:inline-grid;place-items:center;min-width:24px;min-height:40px;color:var(--adm-text-muted,#5B6376);font-weight:600}

/* Admin workbench/media/commerce state rails share geometry while keeping each
   page's existing destination/action contract. */
.admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs){
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:14px 0 20px;padding:6px;
  border:1px solid #D9D6D0;border-radius:13px;background:var(--surface,#ECEAE6);overflow-x:auto;scrollbar-width:thin;
}
.admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs)>a{
  display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 11px;border:1px solid transparent;
  border-radius:9px;background:transparent;color:var(--adm-text,#282E37);text-decoration:none;font:600 11.5px/1 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);white-space:nowrap;
}
.admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs)>a:hover{background:var(--adm-surface,#FFFFFF);border-color:#D9D6D0;color:var(--adm-text,#2C3243)}
.admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs)>a:focus-visible{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .13)}
.admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs)>a.is-active,
.admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs)>a[aria-current="page"]{
  background:#3B4256;border-color:#3B4256;color:#FFF;
}

/* Public collection/part rails retain their page identity but use the same
   focus, current-state and mobile overflow fundamentals. */
:is(.juf-author-collection-tabs,.juf-author-alphabet-tabs,.juf-part-tabs){scrollbar-width:thin}
:is(.juf-author-collection-tabs,.juf-author-alphabet-tabs,.juf-part-tabs) :is(a,button):focus-visible{
  outline:0;box-shadow:0 0 0 3px rgba(59, 66, 86, .14);border-color:var(--adm-text,#2C3243)!important;
}

/* Empty/result states: compact, calm and consistent instead of page-specific
   oversized blanks. Copy and recovery actions remain page-owned. */
:is(.juf-public-empty-state,.juf-author-empty,.juf-catalog-empty,.juf-search-empty-compact,.audio-empty-state,.premium-empty,.profile-hub-empty),
.admin-main :is(.admin-empty,.audio-admin-empty,.admin-dashboard-inline-empty){
  box-sizing:border-box;border:1px dashed #D9D6D0;border-radius:15px;background:var(--bg,#F6F5F2);color:var(--adm-text-muted,#5B6376);
  text-align:center;padding:24px 18px;min-height:104px;
}
:is(.juf-public-empty-state,.juf-author-empty,.juf-catalog-empty,.juf-search-empty-compact,.audio-empty-state,.premium-empty,.profile-hub-empty) :is(h2,h3,strong),
.admin-main :is(.admin-empty,.audio-admin-empty,.admin-dashboard-inline-empty) :is(h2,h3,strong){color:var(--adm-text,#282E37)}
:is(.juf-public-empty-state,.juf-author-empty,.juf-catalog-empty,.juf-search-empty-compact,.audio-empty-state,.premium-empty,.profile-hub-empty) p,
.admin-main :is(.admin-empty,.audio-admin-empty,.admin-dashboard-inline-empty) p{max-width:620px;margin:7px auto 0;line-height:1.65}

@media(max-width:760px){
  :is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination),
  .admin-main :is(.admin-pagination,.juf-admin-pagination){gap:6px;margin:20px 0}
  :is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>a,
  :is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>.active,
  .admin-main :is(.admin-pagination,.juf-admin-pagination)>a,
  .admin-main .juf-pagination-pages .juf-pagination-page{min-width:42px;min-height:42px;padding:0 10px}
  :is(.juf-control-pagination,.audio-pagination,.premium-pagination)>.juf-pagination-summary,
  .admin-main :is(.admin-pagination,.juf-admin-pagination)>.juf-pagination-summary{flex:1 0 100%;order:3;text-align:center}
  .admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs){flex-wrap:nowrap;justify-content:flex-start;overscroll-behavior-inline:contain;padding:5px;scroll-snap-type:x proximity}
  .admin-main :is(.juf-content-workbench-tabs,.commerce-tabs,.media-tabs)>a{min-height:42px;scroll-snap-align:start}
  :is(.juf-public-empty-state,.juf-author-empty,.juf-catalog-empty,.juf-search-empty-compact,.audio-empty-state,.premium-empty,.profile-hub-empty),
  .admin-main :is(.admin-empty,.audio-admin-empty,.admin-dashboard-inline-empty){padding:20px 15px;min-height:92px}
}
@media(prefers-reduced-motion:reduce){
  :is(.juf-control-pagination,.category-pagination,.audio-pagination,.premium-pagination)>a,
  .admin-main :is(.admin-pagination,.juf-admin-pagination)>a{transition:none;transform:none!important}
}


/* Build 102 — Control System Phase 6: residual navigation, disclosure, feedback and async-state consistency. */

/* Residual pagers that were still outside the Phase 5 shared class now inherit
   the same geometry without changing their route/query logic. */
.notification-pagination.juf-control-pagination{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;width:100%;margin:26px 0}
.notification-pagination.juf-control-pagination>.juf-pagination-summary{color:var(--adm-text-muted,#5B6376);font:650 11px/1.4 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);padding:0 5px;font-variant-numeric:tabular-nums}

/* Compact state rails: retain page-owned colors/content while aligning touch,
   focus and current-state semantics. */
:is(.juf-author-book-filters,.notification-toolbar nav,.community-filters){scrollbar-width:thin;overscroll-behavior-inline:contain}
:is(.juf-author-book-filters,.notification-toolbar nav,.community-filters) a{min-height:38px;box-sizing:border-box}
:is(.juf-author-book-filters,.notification-toolbar nav,.community-filters) a:focus-visible{outline:0!important;box-shadow:0 0 0 3px rgba(59, 66, 86, .14)!important;border-color:var(--adm-text,#2C3243)!important}
:is(.juf-author-book-filters,.notification-toolbar nav) a[aria-current="page"],.community-filters a[aria-current="page"]{font-weight:600}

/* Native disclosures keep native keyboard behavior. Only trigger consistency is
   standardized; content layout, open state and business actions remain page-owned. */
.admin-main details:not(.admin-nav-group):not(.admin-nav-subgroup)>summary,
:is(.premium-faq-list,.juf-author-bio-details,.reader-review-report,.profile-history-details)>summary{cursor:pointer}
.admin-main details:not(.admin-nav-group):not(.admin-nav-subgroup)>summary:focus-visible,
:is(.premium-faq-list,.juf-author-bio-details,.reader-review-report,.profile-history-details)>summary:focus-visible{outline:0;border-radius:8px;box-shadow:0 0 0 3px rgba(59, 66, 86, .14)}

/* Feedback/status surfaces not covered by Phase 4 now use the same calm hierarchy. */
:where(.reader-auth-alert-v27.is-success,.juf-author-follow-message,.book-community-message){border:1px solid #E4E6EC!important;border-left:4px solid #2E7A4F!important;border-radius:11px!important;background:var(--soft,#E4E6EC)!important;color:var(--ok,#2E7A4F)!important;padding:10px 12px!important}
:where(.reader-auth-alert-v27.is-error){border:1px solid #D9D6D0!important;border-left:4px solid #B0392B!important;border-radius:11px!important;background:var(--bg,#F6F5F2)!important;color:var(--danger,#B0392B)!important;padding:10px 12px!important}
:where(.review-existing-notice,.juf-ai-notice){border:1px solid #D9D6D0!important;border-left:4px solid #3B4256!important;border-radius:11px!important;background:var(--bg,#F6F5F2)!important;color:var(--adm-text-muted,#5B6376)!important;padding:10px 12px!important}

/* Breadcrumb and async-state polish. */
.admin-breadcrumb [aria-current="page"]{color:var(--adm-text-muted,#5B6376);font-weight:500}
.juf-submit-pending{cursor:progress!important}
form[aria-busy="true"] :is(button[type="submit"],input[type="submit"]){cursor:progress}
[aria-busy="true"].pagination-numbers,[aria-busy="true"].juf-control-pagination{cursor:progress}

/* Homepage Author filter is intentionally not redesigned; only accessible
   active/focus/touch state is normalized. */
#author-filter-tabs .sub-tab-item{min-height:40px}
#author-filter-tabs .sub-tab-item:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(59, 66, 86, .14)}
#author-filter-tabs .sub-tab-item[aria-pressed="true"]{font-weight:600}

@media(max-width:760px){
  :is(.juf-author-book-filters,.notification-toolbar nav,.community-filters){overflow-x:auto;flex-wrap:nowrap!important}
  :is(.juf-author-book-filters,.notification-toolbar nav,.community-filters) a{min-height:42px;white-space:nowrap}
  #author-filter-tabs .sub-tab-item{min-height:42px}
}
@media(prefers-reduced-motion:reduce){
  .juf-submit-pending:after{animation:none!important}
}


/* Build 103 — Control System Phase 7: compact row actions, status/badge families,
   table empty states and the final public Support pager. Business actions and
   eligibility stay page-owned; this layer standardizes presentation only. */

/* Status metadata keeps semantic color differences but shares one compact shape. */
.admin-main :is(.admin-status-pill,.community-status,.bulk-row-status,.juf-rights-pill,.juf-provider-pill,.juf-import-status,.juf-state-badge,.juf-review-pills span,.admin-reader-status){
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:26px;
  max-width:100%;padding:4px 9px;border:1px solid #D9D6D0;border-radius:999px;background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37);
  font:500 10.75px/1.25 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);text-decoration:none;white-space:nowrap;
}
.admin-main .juf-state-badge.is-success,
.admin-main .admin-reader-status.is-active,
.admin-main .juf-rights-pill.is-cleared{background:var(--soft,#E4E6EC);border-color:#E4E6EC;color:var(--ok,#2E7A4F)}
.admin-main .juf-state-badge.is-warning,
.admin-main .community-status.is-warning,
.admin-main .juf-rights-pill.is-pending{background:var(--surface,#ECEAE6);border-color:#D9D6D0;color:var(--adm-text,#282E37)}
.admin-main .juf-state-badge.is-danger{background:var(--bg,#F6F5F2);border-color:#D9D6D0;color:var(--adm-text-muted,#5B6376)}
.admin-main .juf-state-badge.is-neutral,
.admin-main .admin-reader-status.is-disabled{background:var(--adm-surface,#ECEAE6);border-color:#D9D6D0;color:var(--adm-text-muted,#5B6376)}
.admin-main a.community-status:hover{border-color:#D9D6D0;color:var(--adm-text,#282E37);background:var(--juf-control-surface,#FFFFFF)}
.admin-main a.community-status:focus-visible{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .13)}

/* Row actions are visible, explicit and wrap safely; destructive controls are
   never hidden behind a menu. Links and button actions receive equal geometry. */
.admin-main .juf-compact-row-actions{gap:5px;min-width:max-content}
.admin-main .juf-compact-row-actions form{display:inline-flex;margin:0}
.admin-main .juf-row-action{
  -webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 9px;
  border:1px solid #D9D6D0;border-radius:8px;background:var(--adm-surface,#FFFFFF);color:var(--adm-text,#282E37);text-decoration:none;
  font:500 10.75px/1 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);cursor:pointer;white-space:nowrap;
}
.admin-main .juf-row-action:hover{border-color:#D9D6D0;background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37)}
.admin-main .juf-row-action:focus-visible{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .13)}
.admin-main .juf-row-action.is-secondary{color:#2F5D9E}
.admin-main .juf-row-action.is-danger{border-color:#D9D6D0;background:var(--bg,#F6F5F2);color:var(--adm-text-muted,#5B6376)}
.admin-main .juf-row-action.is-danger:hover{border-color:#D9D6D0;background:var(--bg,#F6F5F2);color:var(--adm-text-muted,#5B6376)}

/* Dense admin tables get a shared no-results cell rather than page-specific inline styles. */
.admin-main .admin-table-empty{padding:24px 16px!important;text-align:center!important;color:var(--adm-text-muted,#5B6376)!important;background:var(--bg,#F6F5F2)!important;font-weight:650!important}

/* The Reader Support page was the last public previous/next pager outside the
   shared control class. Its route/history semantics remain unchanged. */
.support-page-links.juf-control-pagination{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;margin:22px 0}
.support-page-links.juf-control-pagination>.juf-pagination-summary{color:var(--adm-text-muted,#5B6376);font:650 11px/1.4 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);padding:0 5px;font-variant-numeric:tabular-nums}

@media(max-width:760px){
  .admin-main .juf-compact-row-actions{min-width:0;justify-content:flex-start}
  .admin-main .juf-row-action{min-height:40px;padding:0 11px}
  .admin-main :is(.admin-status-pill,.community-status,.bulk-row-status,.juf-rights-pill,.juf-provider-pill,.juf-import-status,.juf-state-badge,.juf-review-pills span,.admin-reader-status){min-height:28px}
  .support-page-links.juf-control-pagination>.juf-pagination-summary{flex:1 0 100%;order:3;text-align:center}
}
@media(prefers-reduced-motion:reduce){
  .admin-main .juf-row-action{transition:none!important}
}


/* Build 104 — Control System Phase 8: legacy Admin utility surfaces, state rails,
   metadata blocks and first-admin setup. Data, permissions and mutation rules stay page-owned. */

/* Small utility/import forms should look like the rest of the Admin rather than
   retaining old inline white-card/button styling. */
.admin-main .juf-utility-head{align-items:flex-end;margin-bottom:18px}
.admin-main .juf-utility-head h2{margin:.2rem 0 3px}
.admin-main .juf-utility-panel{max-width:760px;padding:22px}
.admin-main .juf-utility-copy{margin:0;line-height:1.75}
.admin-main .juf-utility-form{display:grid;gap:14px;margin-top:18px}
.admin-main .juf-utility-form input[type="file"]{width:100%;margin:0!important}
.admin-main .juf-utility-submit{justify-self:start;min-width:160px}

/* State/filter rails that predate the shared control system retain their routes,
   but now use the same touch/focus/current-state language. */
.admin-main .juf-admin-state-rail{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:14px 0 18px;padding:5px;border:1px solid #D9D6D0;border-radius:13px;background:var(--surface,#ECEAE6);overflow-x:auto;scrollbar-width:thin}
.admin-main .juf-admin-state-rail>a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 11px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--adm-text,#282E37);text-decoration:none;font:600 11.5px/1 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);white-space:nowrap}
.admin-main .juf-admin-state-rail>a:hover{background:var(--adm-surface,#FFFFFF);border-color:#D9D6D0;color:var(--adm-text,#2C3243)}
.admin-main .juf-admin-state-rail>a:focus-visible{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .13)}
.admin-main .juf-admin-state-rail>a[aria-current="page"],.admin-main .juf-admin-state-rail>a.is-active{background:#3B4256;border-color:#3B4256;color:#FFF}
.admin-main .juf-edit-meta .juf-state-badge{padding:4px 9px}

/* Repeated metadata blocks/cards get predictable rhythm and wrap long values. */
.admin-main .juf-integration-credential{margin-bottom:16px;overflow-wrap:anywhere;padding-bottom:12px;border-bottom:1px solid #D9D6D0}
.admin-main .juf-integration-credential:last-child{margin-bottom:0;padding-bottom:0;border-bottom:0}
.admin-main .juf-featured-author-form{padding:20px;display:grid;gap:14px}

/* Standalone first-admin setup cannot use the authenticated Admin shell, but it
   follows the same warm editorial geometry without inline presentation styles. */
.juf-setup-page{margin:0;min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37)}
.juf-setup-card{width:min(100%,480px);box-sizing:border-box;padding:30px;border:1px solid #D9D6D0;border-radius:18px;background:var(--juf-control-surface,#FFFFFF);box-shadow:0 18px 50px rgba(40, 46, 55, .09)}
.juf-setup-kicker{margin-bottom:5px;color:var(--adm-text-muted,#5B6376);font:600 11px/1.35 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);letter-spacing:.08em;text-transform:uppercase}
.juf-setup-card h1{margin:0 0 8px;color:var(--adm-text,#282E37);font-size:28px;line-height:1.2}
.juf-setup-copy{margin:0 0 18px;color:var(--adm-text-muted,#5B6376);line-height:1.65}
.juf-setup-form{display:grid;gap:13px}
.juf-setup-field{display:grid;gap:6px;color:var(--adm-text,#282E37);font:500 12px/1.35 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.juf-setup-field input{box-sizing:border-box;width:100%;min-height:46px;padding:0 12px;border:1px solid #D9D6D0;border-radius:10px;background:var(--juf-control-surface,#FFF);color:var(--adm-text,#282E37);font:500 14px/1.4 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.juf-setup-field input:focus{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .14)}
.juf-setup-submit{-webkit-appearance:none;appearance:none;display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin-top:6px;padding:0 16px;border:1px solid #3B4256;border-radius:10px;background:#3B4256;color:#FFF;text-decoration:none;font:600 13px/1 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);cursor:pointer}
.juf-setup-submit:hover{background:#2C3243;border-color:var(--adm-text,#2C3243)}.juf-setup-submit:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(59, 66, 86, .16)}
.juf-setup-message{margin:0 0 16px;padding:11px 13px;border:1px solid #D9D6D0;border-left-width:4px;border-radius:11px;line-height:1.55}
.juf-setup-message.is-error{border-color:#D9D6D0;border-left-color:var(--danger,#B0392B);background:var(--bg,#F6F5F2);color:var(--danger,#B0392B)}
.juf-setup-message.is-success{border-color:#E4E6EC;border-left-color:var(--ok,#2E7A4F);background:var(--soft,#E4E6EC);color:var(--ok,#2E7A4F)}

@media(max-width:760px){
  .admin-main .juf-utility-head{align-items:stretch;flex-direction:column}
  .admin-main .juf-utility-head>.admin-btn{width:100%}
  .admin-main .juf-utility-panel{padding:18px}
  .admin-main .juf-utility-submit{width:100%}
  .admin-main .juf-admin-state-rail{flex-wrap:nowrap;justify-content:flex-start;overscroll-behavior-inline:contain}
  .admin-main .juf-admin-state-rail>a{min-height:42px;scroll-snap-align:start}
  .admin-main .juf-featured-author-form{padding:16px}
  .juf-setup-page{padding:16px}.juf-setup-card{padding:22px}.juf-setup-card h1{font-size:24px}
}
@media(prefers-reduced-motion:reduce){.juf-setup-submit,.admin-main .juf-admin-state-rail>a{transition:none!important}}


/* Build 105 — Control System Phase 9: Reader Account/Privacy and Admin
   diagnostic/observability surfaces. Workflows, permissions and data stay page-owned. */

/* Reader Account & Privacy: move the old page-local style block into the shared
   control layer and align panel/field/action states with the warm editorial UI. */
.juf-account-shell{max-width:860px;margin-top:42px;margin-bottom:70px}
.juf-account-title{margin:4px 0 10px}
.juf-account-intro{color:var(--adm-text-muted,#5B6376);line-height:1.8;margin:0 0 26px;max-width:72ch}
.juf-account-notice{margin:0 0 16px;padding:11px 13px;border:1px solid #D9D6D0;border-left-width:4px;border-radius:11px;line-height:1.55}
.juf-account-notice.is-success{border-color:#E4E6EC;border-left-color:var(--ok,#2E7A4F);background:var(--soft,#E4E6EC);color:var(--ok,#2E7A4F)}
.juf-account-notice.is-error{border-color:#D9D6D0;border-left-color:var(--danger,#B0392B);background:var(--bg,#F6F5F2);color:var(--danger,#B0392B)}
.juf-account-panel{background:var(--juf-control-surface,#FFF);border:1px solid #D9D6D0;border-radius:18px;padding:22px;margin-bottom:18px}
.juf-account-panel.is-danger{margin-bottom:0;background:var(--bg,#F6F5F2);border-color:#D9D6D0}
.juf-account-panel-title{font-family:var(--font-heading);font-size:20px;line-height:1.35;margin:0 0 8px;color:var(--adm-text,#282E37)}
.juf-account-panel-title.is-danger{color:var(--danger,#B0392B)}
.juf-account-panel-copy{color:var(--adm-text-muted,#5B6376);line-height:1.7;margin:0 0 14px}
.juf-account-panel-copy.is-danger{color:var(--adm-text-muted,#5B6376);line-height:1.75}
.account-profile-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.account-profile-grid label,.account-password-grid label,.account-session-revoke label,.account-social-disconnect label,.account-danger-form label{font-size:12.5px;font-weight:500;color:var(--adm-text,#282E37)}
.account-profile-grid input,.account-password-grid input,.account-session-revoke input,.account-social-disconnect input,.account-danger-form input{width:100%;box-sizing:border-box;min-height:44px;margin-top:5px;padding:10px 11px;border:1px solid #D9D6D0;border-radius:9px;background:var(--juf-control-surface,#FFF);color:var(--adm-text,#282E37)}
.account-profile-grid input:focus,.account-password-grid input:focus,.account-session-revoke input:focus,.account-social-disconnect input:focus,.account-danger-form input:focus{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .14)}
.account-password-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end}.account-password-grid>div{grid-column:1/-1}
.account-session-revoke{margin-top:18px;padding-top:18px;border-top:1px solid #D9D6D0;display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,.72fr);gap:18px;align-items:end}
.account-session-revoke p{color:var(--adm-text-muted,#5B6376);line-height:1.65;margin:6px 0 0}.account-session-revoke form{display:grid;gap:10px}
.account-social-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.account-social-card{border:1px solid #D9D6D0;border-radius:12px;padding:14px;display:grid;gap:9px;background:var(--juf-control-surface,#FFFFFF)}
.account-social-card>div{display:flex;justify-content:space-between;gap:10px;align-items:center}.account-social-card span{font-size:11px;color:var(--adm-text-muted,#5B6376)}.account-social-card small{color:var(--adm-text-muted,#5B6376);overflow-wrap:anywhere}
.account-social-card>a{justify-self:start;text-decoration:none;border:1px solid #D9D6D0;border-radius:8px;padding:8px 11px;color:var(--adm-text,#282E37);font-weight:600}.account-social-card>a:focus-visible{outline:0;border-color:var(--adm-text,#2C3243);box-shadow:0 0 0 3px rgba(59, 66, 86, .14)}
.account-social-disconnect{display:grid;gap:8px}.account-social-disconnect button{justify-self:start;border:1px solid #D9D6D0;background:var(--bg,#F6F5F2);color:var(--danger,#B0392B);border-radius:8px;padding:8px 11px;font-weight:600;cursor:pointer}
.account-social-note,.account-danger-note{font-size:13px;line-height:1.65;margin:14px 0 0;color:var(--adm-text-muted,#5B6376)}.account-social-note a,.account-danger-note a{color:#3B4256;font-weight:600}.account-danger-note{color:#3B4256;margin-bottom:14px}
.juf-account-action{cursor:pointer;text-decoration:none!important;display:inline-flex;align-items:center;justify-content:center;min-height:42px;box-sizing:border-box}
.account-danger-form{display:grid;gap:10px;max-width:520px}.account-danger-form input{border-color:#D9D6D0}.account-delete-confirm{text-transform:uppercase}
.juf-account-danger-action{-webkit-appearance:none;appearance:none;justify-self:start;min-height:42px;border:1px solid #B0392B;background:#B0392B;color:#FFF;padding:0 16px;border-radius:9px;font-weight:600;cursor:pointer}
.juf-account-danger-action:hover{background:#B0392B;border-color:var(--danger,#B0392B)}.juf-account-danger-action:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(91, 99, 118, .18)}

/* Reusable Admin head/copy/helper patterns for diagnostic and observability pages. */
.admin-main .juf-admin-page-copy{margin:0;color:var(--adm-text-muted);line-height:1.65;max-width:78ch}
.admin-main .juf-admin-panel-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap}
.admin-main .juf-admin-panel-head h2{margin:0 0 6px}
.admin-main .juf-admin-head-actions{display:flex;gap:8px;flex-wrap:wrap}.admin-main .juf-admin-head-actions .admin-btn{text-decoration:none}
.admin-main .juf-admin-status-rail{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;font-size:12px}
.admin-main .juf-admin-inline-notice{margin-top:14px}
.admin-main .juf-admin-helper{color:var(--adm-text-muted);line-height:1.55}
.admin-main .juf-form-span-2{grid-column:span 2}.admin-main .juf-form-submit-end{display:flex;align-items:end}

/* Audit Log preset rail and detail viewer. Presets keep existing query semantics. */
.admin-main .juf-admin-quick-rail{display:flex;gap:7px;flex-wrap:wrap;margin:14px 0 18px}
.admin-main .juf-admin-quick-rail .admin-btn[aria-current="page"]{background:#3B4256;border-color:#3B4256;color:#FFF}
.admin-main .juf-audit-detail-panel{padding:18px;margin-bottom:18px}.admin-main .juf-admin-detail-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.admin-main .juf-admin-detail-head h2{margin:0 0 5px}.admin-main .juf-admin-detail-head p{margin:0;color:var(--adm-text-muted)}
.admin-main .juf-admin-detail-stats,.admin-main .juf-admin-detail-meta{margin-top:14px}.admin-main .juf-admin-stat-value{font-size:16px}.admin-main .juf-admin-stat-value.is-code{font-size:12px;word-break:break-all}
.admin-main .juf-break-word{word-break:break-word}.admin-main .juf-audit-diff-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:14px}
.admin-main .juf-audit-json{white-space:pre-wrap;overflow:auto;background:var(--surface,#ECEAE6);border:1px solid var(--adm-border);padding:12px;border-radius:10px;max-height:320px;overflow-wrap:anywhere}

/* AI Assistant diagnostics and analytics use shared card/table/feedback chrome. */
.admin-main .juf-ai-overview{padding:22px;margin-bottom:18px}.admin-main .juf-ai-diagnostic-form{margin-top:14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.admin-main .juf-ai-stat-grid{margin-bottom:18px}.admin-main .juf-admin-table-panel{padding:20px;margin-bottom:18px}.admin-main .juf-admin-table-panel:last-of-type{margin-bottom:0}
.admin-main .juf-admin-table-panel>h3{margin:0 0 14px}.admin-main .juf-admin-table-panel .admin-table-wrap{margin:0}

@media(max-width:760px){
  .juf-account-shell{margin-top:28px;margin-bottom:52px}.juf-account-panel{padding:18px}.account-profile-grid,.account-password-grid,.account-social-grid,.account-session-revoke{grid-template-columns:1fr}.account-profile-grid>div{grid-column:1}.account-session-revoke{align-items:stretch}
  .juf-account-action,.juf-account-danger-action,.account-social-disconnect button,.account-social-card>a{min-height:42px}
  .admin-main .juf-admin-panel-head,.admin-main .juf-admin-detail-head{align-items:stretch;flex-direction:column}.admin-main .juf-admin-head-actions{width:100%}.admin-main .juf-admin-head-actions .admin-btn{flex:1 1 auto}
  .admin-main .juf-admin-quick-rail{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;padding-bottom:3px}.admin-main .juf-admin-quick-rail .admin-btn{white-space:nowrap;min-height:42px}
  .admin-main .juf-form-span-2{grid-column:span 1}.admin-main .juf-form-submit-end .admin-btn{width:100%}.admin-main .juf-ai-diagnostic-form{align-items:stretch}.admin-main .juf-ai-diagnostic-form .admin-btn{flex:1 1 160px}
}
@media(prefers-reduced-motion:reduce){.juf-account-danger-action,.account-social-card>a,.admin-main .juf-admin-quick-rail .admin-btn{transition:none!important}}


/* Build 107 — Public Discovery Final Polish / Phase 11
   Scoped Books search now shares the same compact predictive-search geometry as
   Authors while preserving category/author/filter context. */
@media(max-width:760px){
  .juf-books-filter .juf-books-search{max-width:none;flex-basis:100%}
}


/* Build 116 — Phase 19: shared responsive discovery foundation.
   Root-level repair for public search/filter controls across Books, Authors and
   Audiobooks. Native controls remain in the document as no-JS form fallbacks. */
:root{
  --juf-control-mobile-h:46px;
  --juf-control-sheet-radius:20px;
  --juf-control-backdrop:rgba(40, 46, 55, .38);
  --juf-on-dark:#F6F5F2;
  --juf-on-dark-muted:#E4E6EC;
  --juf-focus-ring:0 0 0 3px rgba(59, 66, 86, .16);
}

/* Search icon + native search-decoration repair. */
.juf-control-search>svg.juf-control-search-icon{
  top:50%;
  transform:translateY(-50%);
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
:is(.juf-control-search,.juf-global-search-v40) input[type="search"]{
  -webkit-appearance:none;
  appearance:none;
}
:is(.juf-control-search,.juf-global-search-v40) input[type="search"]::-webkit-search-cancel-button,
:is(.juf-control-search,.juf-global-search-v40) input[type="search"]::-webkit-search-decoration,
:is(.juf-control-search,.juf-global-search-v40) input[type="search"]::-webkit-search-results-button,
:is(.juf-control-search,.juf-global-search-v40) input[type="search"]::-webkit-search-results-decoration{
  -webkit-appearance:none;
  appearance:none;
  display:none;
}
.juf-control-search,.juf-control-toolbar,.juf-author-directory-tools,.audio-filter-bar,.premium-filter-bar{min-width:0;max-width:100%}
.juf-control-search .juf-control-search-clear[hidden]{display:none!important}
.juf-control-search :is(.juf-control-search-clear,.juf-control-search-submit){top:50%;transform:translateY(-50%)}

/* Legacy pseudo-icons were creating duplicate list/plus affordances. The
   canonical SVG filter icon + active-count badge is now the only trigger UI. */
.audio-filter-more>summary::before,
.audio-filter-more>summary::after,
.premium-filter-more>summary::before,
.premium-filter-more>summary::after,
.juf-author-filter-more>summary::before,
.juf-author-filter-more>summary::after{display:none!important;content:none!important}

/* Progressive branded select. The native select stays form-submittable and is
   only visually hidden after JS enhancement. */
.juf-select{position:relative;min-width:0;width:100%;font-family:var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif)}
.juf-select-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  min-width:1px!important;
  min-height:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
.juf-select-trigger{
  width:100%;height:var(--juf-control-h);min-height:var(--juf-control-h);display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:0 12px 0 13px;border:1px solid var(--juf-control-border);border-radius:10px;background:var(--juf-control-surface);color:var(--juf-control-text);
  font:500 13px/1.2 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);text-align:left;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.juf-select-trigger:hover{border-color:#D9D6D0;background:var(--surface,#ECEAE6)}
.juf-select-trigger:focus-visible,.juf-select.is-open .juf-select-trigger{outline:0;border-color:var(--juf-control-accent);box-shadow:var(--juf-focus-ring)}
.juf-select-chevron{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s ease}
.juf-select.is-open .juf-select-chevron{transform:rotate(180deg)}
.juf-select-list{
  position:absolute;z-index:125;left:0;right:0;top:calc(100% + 6px);max-height:min(260px,42vh);overflow:auto;padding:6px;border:1px solid #D9D6D0;border-radius:12px;
  background:var(--juf-control-surface,#FFFFFF);box-shadow:0 18px 42px rgba(40, 46, 55, .16);overscroll-behavior:contain;
}
.juf-select-list[hidden]{display:none!important}
.juf-select-option{width:100%;min-height:40px;display:flex;align-items:center;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--adm-text,#282E37);font:650 12.5px/1.35 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);text-align:left;cursor:pointer}
.juf-select-option:hover,.juf-select-option:focus-visible{outline:0;background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37)}
.juf-select-option[aria-selected="true"]{background:var(--soft,#E4E6EC);color:var(--adm-text,#282E37);font-weight:600}
.juf-select-option:disabled{opacity:.5;cursor:not-allowed}

/* Build 128 — browser-QA specificity hardening. Older page styles target every
   button inside filter bars; enhanced select buttons must remain one shared,
   warm-editorial control on Books, Authors and Audiobooks. */
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-trigger{
  width:100%;height:var(--juf-control-h);min-height:var(--juf-control-h);grid-column:auto;
  padding:0 12px 0 13px;border:1px solid var(--juf-control-border);border-radius:10px;
  background:var(--juf-control-surface);color:var(--juf-control-text);
  font:500 13px/1.2 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);text-align:left;
}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-trigger:hover{
  border-color:#D9D6D0;background:var(--juf-control-surface-soft,#ECEAE6);color:var(--juf-control-text);
}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option{
  width:100%;min-height:40px;grid-column:auto;padding:8px 10px;border:0;border-radius:8px;
  background:transparent;color:var(--adm-text,#282E37);font:650 12.5px/1.35 var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);text-align:left;
}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option:hover,
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option:focus-visible{
  background:var(--surface,#ECEAE6);color:var(--adm-text,#282E37);
}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option[aria-selected="true"]{
  background:var(--soft,#E4E6EC);color:var(--adm-text,#282E37);font-weight:600;
}

/* Primary/secondary filter actions and search submits are also shared controls.
   Legacy catalogue styles must not recolour the same action black/brown on one
   page and teal on another. */
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-control-actions .juf-control-apply{
  min-height:42px;border:1px solid var(--juf-control-accent);border-radius:10px;
  background:var(--juf-control-accent);color:var(--on-accent,#F6F5F2);padding:0 15px;font:600 12px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);
}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-control-actions .juf-control-apply:hover{
  border-color:var(--juf-control-accent-strong);background:var(--juf-control-accent-strong);color:#fff;
}
:is(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-control-actions .juf-control-reset{
  min-height:42px;border:1px solid #D9D6D0;border-radius:10px;background:var(--juf-control-surface,#fff);color:var(--adm-text-muted,#5B6376);padding:0 15px;
}
:is(.juf-books-filter,.audio-filter-bar,.premium-filter-bar,.juf-author-filter-panel) .juf-control-search .juf-control-search-submit{
  width:34px;height:34px;min-height:34px;padding:0;border:0;border-radius:9px;
  background:var(--juf-control-accent);color:var(--on-accent,#F6F5F2);
}
:is(.juf-books-filter,.audio-filter-bar,.premium-filter-bar,.juf-author-filter-panel) .juf-control-search .juf-control-search-submit:hover{
  background:var(--juf-control-accent-strong);color:#fff;
}

/* Public popovers stay compact and anchored on desktop. */
.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields,.juf-control-popover{align-content:start}
.juf-author-filter-row .juf-control-actions,.premium-filter-fields .juf-control-actions,.audio-filter-fields .juf-control-actions{grid-column:1/-1}

/* Mobile bottom sheet: smaller controls, real backdrop, no page-level overflow. */
.juf-filter-backdrop{position:fixed;inset:0;z-index:108;border:0;padding:0;background:var(--juf-control-backdrop);opacity:0;visibility:hidden;transition:opacity .16s ease,visibility .16s ease}
.juf-filter-backdrop.is-visible{opacity:1;visibility:visible}
body.juf-filter-sheet-open{overflow:hidden}
@media(max-width:760px){
  :root{--juf-control-h:var(--juf-control-mobile-h)}
  .juf-control-toolbar{gap:8px}
  .juf-control-search{height:var(--juf-control-mobile-h);border-radius:13px}
  .juf-control-search input{font-size:12.5px!important;padding-left:40px!important}
  .juf-control-search .juf-control-search-clear,.juf-control-search .juf-control-search-submit{width:34px;height:34px;min-height:34px;border-radius:10px}
  .juf-control-search.has-submit input{padding-right:78px!important}
  .juf-control-search.has-submit .juf-control-search-clear{right:39px}
  .juf-author-filter-more>summary,.premium-filter-more>summary,.audio-filter-more>summary,.juf-control-menu>summary{min-height:44px!important;height:44px!important;border-radius:12px!important;padding:0 12px!important}
  .juf-author-filter-row,.premium-filter-fields,.audio-filter-fields,.juf-control-popover{
    z-index:110!important;left:10px!important;right:10px!important;bottom:10px!important;top:auto!important;width:auto!important;max-height:min(68dvh,560px)!important;
    padding:12px!important;border-radius:var(--juf-control-sheet-radius)!important;gap:9px!important;overflow:auto!important;overscroll-behavior:contain!important;
    box-shadow:0 26px 72px rgba(40, 46, 55, .26)!important;
  }
  .juf-control-grid,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields{grid-template-columns:1fr!important}
  .juf-control-field{gap:4px}
  .juf-control-field>span{font-size:10.5px}
  .juf-select-trigger{height:44px;min-height:44px;font-size:12.5px}
  .juf-select-list{position:relative;top:auto;margin-top:6px;max-height:min(220px,34dvh);box-shadow:none;border-radius:10px;background:var(--bg,#F6F5F2)}
  .juf-select-option{min-height:42px;font-size:12.5px}
  .juf-control-actions{position:sticky;bottom:-12px;z-index:3;margin:4px -2px -2px;padding:10px 2px 2px;background:linear-gradient(180deg,rgba(236, 234, 230, .76),#FFFFFF 28%);gap:8px}
  .juf-control-apply,.juf-control-reset{min-height:42px;flex:1 1 0}
  .juf-active-filter-strip{gap:6px;margin-top:8px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px;overscroll-behavior-inline:contain}
  .juf-active-filter-chip{white-space:nowrap;flex:0 0 auto;min-height:30px}
}
@media(max-width:390px){
  .juf-author-filter-row,.premium-filter-fields,.audio-filter-fields,.juf-control-popover{left:8px!important;right:8px!important;bottom:8px!important;padding:11px!important}
  .juf-control-search>svg,.juf-control-search>.juf-control-search-icon{left:12px;width:16px;height:16px}
  .juf-control-search input{padding-left:37px!important}
}

/* Build 128 — short landscape viewport acceptance. Width alone does not
   identify phones/tablets: a desktop-style absolute popover can be clipped on
   844×390/915×412 mobile landscape. Use a centered, two-column modal sheet in
   that narrow-height range while leaving normal desktop/tablet layouts intact. */
@media (min-width:761px) and (max-width:1024px) and (max-height:520px){
  .juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields,
  body.authors-page .juf-author-filter-more>.juf-author-filter-row,
  body.premium-page .premium-filter-more>.premium-filter-fields,
  body.audiobook-page .audio-filter-more>.audio-filter-fields{
    position:fixed!important;z-index:110!important;left:50%!important;right:auto!important;top:auto!important;bottom:8px!important;
    width:min(640px,calc(100vw - 24px))!important;max-height:calc(100dvh - 16px)!important;overflow:auto!important;
    transform:translateX(-50%)!important;border-radius:16px!important;padding:12px!important;gap:9px!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;overscroll-behavior:contain!important;
    box-shadow:0 24px 64px rgba(40, 46, 55, .24)!important;
  }
  .juf-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .juf-control-actions{position:sticky;bottom:-12px;z-index:3;grid-column:1/-1;margin-top:4px;padding:9px 2px 2px;background:linear-gradient(180deg,rgba(236, 234, 230, .76),#FFFFFF 28%)}
}
@media(prefers-reduced-motion:reduce){
  .juf-select-trigger,.juf-select-chevron,.juf-filter-backdrop{transition:none!important}
}

@media (max-width: 767px) { :root { --juf-control-h: 46px; } }

/* ========================================================================
   Build 247 — dark-mode control contract
   Keep the control system responsible for its own dark surfaces so mobile
   listboxes/sheets never fall back to the legacy white light-mode rules.
   ======================================================================== */
html[data-theme="dark"] {
  --juf-control-surface:#2C3037;
  --juf-control-surface-soft:#343A44;
  --juf-control-border:#3A3F47;
  --juf-control-text:#ECE8E1;
  --juf-control-muted:#A09B94;
  --juf-control-accent:#C9D4EC;
  --juf-control-accent-strong:#C9D4EC;
  --juf-control-backdrop:rgba(40, 46, 55, .64);
  --juf-control-shadow:0 24px 68px rgba(0, 0, 0, .42);
  --juf-focus-ring:0 0 0 3px rgba(201, 212, 236, .22);
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-toolbar,.juf-author-filter-panel) {
  color:var(--juf-control-text)!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-menu>summary,.juf-author-filter-more>summary,.premium-filter-more>summary,.audio-filter-more>summary) {
  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-menu>summary,.juf-author-filter-more>summary,.premium-filter-more>summary,.audio-filter-more>summary):hover,
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-menu>summary,.juf-author-filter-more>summary,.premium-filter-more>summary,.audio-filter-more>summary):focus-visible {
  background:#2C3037!important;
  border-color:#9CA1B4!important;
  color:#FFFFFF!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) {
  background:#23262B!important;
  border-color:#3A3F47!important;
  color:#ECE8E1!important;
  box-shadow:var(--juf-control-shadow)!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover-head,.juf-control-actions) {
  border-color:#3A3F47!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-control-popover-head strong {
  color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-field>span,.juf-author-filter-row label>span,.premium-filter-fields label>span,.audio-filter-fields label>span,.juf-control-result span,.juf-control-count) {
  color:#A09B94!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-control-result strong {
  color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-trigger,
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-trigger {
  background:#2C3037!important;
  border-color:#3A3F47!important;
  color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-trigger:hover,
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-trigger:hover {
  background:#2C3037!important;
  border-color:#3A3F47!important;
  color:#FFFFFF!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-trigger:focus-visible,
html[data-theme="dark"] body.juf-minimal-chrome .juf-select.is-open .juf-select-trigger {
  background:#2C3037!important;
  border-color:#DDE5F5!important;
  color:#FFFFFF!important;
  box-shadow:var(--juf-focus-ring)!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-list {
  background:#23262B!important;
  border-color:#3A3F47!important;
  box-shadow:0 18px 44px rgba(0, 0, 0, .38)!important;
  color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-option,
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option {
  background:transparent!important;
  color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-option:hover,
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-option:focus-visible,
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option:hover,
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option:focus-visible {
  background:#2C3037!important;
  color:#FFFFFF!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-select-option[aria-selected="true"],
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) .juf-select .juf-select-option[aria-selected="true"] {
  background:#343A44!important;
  color:#FFFFFF!important;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) :where(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  background:#2C3037!important;
  border-color:#3A3F47!important;
  color:#ECE8E1!important;
  color-scheme:dark;
}
html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) :where(input,textarea)::placeholder {
  color:#A09B94!important;
  opacity:1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-control-actions {
  background:transparent!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-control-reset,
html[data-theme="dark"] body.juf-minimal-chrome .juf-author-clear-filter {
  background:#2C3037!important;
  border-color:#3A3F47!important;
  color:#ECE8E1!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-control-apply,
html[data-theme="dark"] body.juf-minimal-chrome .juf-author-filter-apply {
  background:#C9D4EC!important;
  border-color:#C9D4EC!important;
  color:#23262B!important;
}
html[data-theme="dark"] body.juf-minimal-chrome .juf-filter-backdrop {
  background:rgba(35, 38, 43, .68)!important;
}
@media(max-width:760px){
  html[data-theme="dark"] body.juf-minimal-chrome .juf-select-list {
    background:#23262B!important;
    border-color:#3A3F47!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] body.juf-minimal-chrome .juf-control-actions {
    background:linear-gradient(180deg,rgba(35, 38, 43, .76),#23262B 28%)!important;
    padding-bottom:max(4px,env(safe-area-inset-bottom))!important;
  }
  html[data-theme="dark"] body.juf-minimal-chrome :where(.juf-control-popover,.juf-author-filter-row,.premium-filter-fields,.audio-filter-fields) {
    border-color:#3A3F47!important;
    box-shadow:0 28px 80px rgba(0, 0, 0, .52)!important;
  }
}

/* Build 249 — Search focus-ring cleanup.
   Keep focus visible through the search shell border, but never draw the old
   cyan/teal rectangular browser/global outline over the rounded control. */
body.juf-minimal-chrome .juf-control-search input:focus,
body.juf-minimal-chrome .juf-control-search input:focus-visible,
body.juf-minimal-chrome .juf-author-directory-search input:focus,
body.juf-minimal-chrome .juf-author-directory-search input:focus-visible {
  outline: 0 !important;
  outline-offset: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.juf-minimal-chrome .juf-control-search:focus-within,
body.juf-minimal-chrome .juf-author-directory-search:focus-within {
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  border-color: #3346A8 !important;
}
body.juf-minimal-chrome .juf-control-search :is(.juf-control-search-clear,.juf-control-search-submit):focus-visible,
body.juf-minimal-chrome .juf-author-directory-search :is(.juf-control-search-clear,.juf-control-search-submit):focus-visible {
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

/* ========================================================================
   Build 273 — focused public catalogue filters
   Books: keep three true filters together and separate sorting semantically.
   Authors: the source now exposes only বিভাগ + ধরন + দেশ.
   ======================================================================== */
.juf-control-sort-section{
  display:grid;
  grid-template-columns:minmax(70px,auto) minmax(0,1fr);
  align-items:end;
  gap:10px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #D9D6D0;
}
.juf-control-section-label{
  align-self:center;
  font:600 10.5px var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif);
  letter-spacing:.02em;
  color:var(--adm-text-muted,#5B6376);
}
.juf-control-sort-section .juf-control-field{min-width:0}
html[data-theme="dark"] body.juf-minimal-chrome .juf-control-sort-section{border-color:#3A3F47!important}
html[data-theme="dark"] body.juf-minimal-chrome .juf-control-section-label{color:#A09B94!important}
@media(max-width:760px){
  .juf-control-sort-section{grid-template-columns:1fr;gap:4px;margin-top:9px;padding-top:10px}
}


/* ============================================================================
   Build 433 — Upgraded Interactive Filter System Across All Pages (`books.php`,
   `authors.php`, `audiobooks.php`, `premium.php` — Fixes `1000169489.jpg` &
   `1000169488.jpg`: prevents long Bengali option labels from overflowing button
   borders in 2-column dropdown grids, auto-spans long options (`is-wide-option`)
   with `grid-auto-flow: dense`, sizes dropdown trays to exact 4-row multiples so
   pills are never sliced in half, preserves compact multi-pill rows for inline
   segmented pills, and pins the sticky bottom `.juf-control-actions` bar so the
   apply button is always 100% visible)
   ============================================================================ */

/* 1. Warm Ivory-Cream Popover & Bottom-Sheet Surface + Drag Handle + Close Button */
html:not([data-theme="dark"]):not([data-theme="pdf"]) body :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields),
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.authors-page .juf-author-filter-more > .juf-author-filter-row,
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.premium-page .premium-filter-more > .premium-filter-fields,
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.audiobook-page .audio-filter-more > .audio-filter-fields {
  background: #F6F5F2 !important;
  border: 1px solid #D9D6D0 !important;
  box-shadow: 0 22px 58px rgba(40, 46, 55, 0.18) !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields),
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list {
  scrollbar-width: thin !important;
  scrollbar-color: #E4E6EC transparent !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::-webkit-scrollbar,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::-webkit-scrollbar-track,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list::-webkit-scrollbar-track {
  background: transparent !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::-webkit-scrollbar-thumb,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list::-webkit-scrollbar-thumb {
  background: #E4E6EC !important;
  border-radius: 999px !important;
}

.juf-control-popover-head {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 4px !important;
  padding-bottom: 9px !important;
  border-bottom: 1px solid #D9D6D0 !important;
}

.juf-control-popover-head strong {
  font: 700 17.5px/1.2 var(--font-heading-editorial, 'Kalpurush', serif) !important;
  color: #282E37 !important;
  margin-right: auto !important;
}

.juf-control-popover-head a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #3B4256 !important;
  font: 600 12px/1 var(--font-ui-system) !important;
  text-decoration: none !important;
}

.juf-control-popover-head .juf-filter-sheet-close {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font: 600 14px/1 var(--font-ui-system) !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.juf-control-popover-head .juf-filter-sheet-close:hover {
  background: #2C3243 !important;
  border-color: #2C3243 !important;
  color: #F6F5F2 !important;
}

/* 2. Crisp Editorial Section Labels & Grid Spanning */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) :is(.juf-control-field, label) {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) :is(.juf-control-field > span:not(.sr-only), label > span:not(.sr-only)),
.juf-control-sort-section > .juf-control-section-label {
  font: 700 12px/1.25 var(--font-ui-system) !important;
  color: #282E37 !important;
  letter-spacing: 0.01em !important;
}

.juf-control-grid .juf-control-field.is-pill-field,
.juf-control-grid .juf-control-field.is-dropdown-field,
.juf-author-filter-row > label.is-pill-field,
.juf-author-filter-row > label.is-dropdown-field,
.audio-filter-fields > .juf-control-field.is-pill-field,
.audio-filter-fields > .juf-control-field.is-dropdown-field {
  grid-column: 1 / -1 !important;
}

.juf-control-sort-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 5px !important;
  margin-top: 8px !important;
  padding-top: 9px !important;
  border-top: 1px solid #D9D6D0 !important;
}

.juf-control-sort-section > .juf-control-section-label {
  align-self: flex-start !important;
}

/* 3. Fix Centered Trigger Bug & Upgrade Multi-Option Dropdowns (`ঘরানা`, `বিভাগ`, `দেশ`, `কণ্ঠশিল্পী`) */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-trigger {
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 0 10px 0 13px !important;
  border-radius: 12px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  font: 600 13.5px/1.25 var(--font-ui-system) !important;
  text-align: left !important;
  box-shadow: none !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-trigger:hover,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-open .juf-select-trigger {
  background: #ECEAE6 !important;
  border-color: #2C3243 !important;
  color: #282E37 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-value {
  flex: 1 1 auto !important;
  text-align: left !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-chevron {
  width: 25px !important;
  height: 25px !important;
  flex: 0 0 25px !important;
  padding: 4.5px !important;
  border-radius: 50% !important;
  background: #E4E6EC !important;
  color: #282E37 !important;
  box-sizing: border-box !important;
}

/* 2-Column Tactile Chip Grid With Dense Packing & Auto Full-Width Spanning for Long Labels.
   Exact 4-row height (4 * 38px + 3 * 6px + 2 * 8px = 186px) prevents slicing the 5th row in half. */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select > .juf-select-list:not([hidden]) {
  position: relative !important;
  z-index: 1 !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 6px !important;
  padding: 8px !important;
  border-radius: 13px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  box-shadow: inset 0 1px 3px rgba(40, 46, 55, 0.05) !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: dense !important;
  gap: 6px !important;
  max-height: 186px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

/* 4. 1-Tap Inline Segmented Filter Pills (`.juf-select.is-inline-pills`) for <=6 Option Filters */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-inline-pills > .juf-select-trigger {
  display: none !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-inline-pills > .juf-select-list {
  position: static !important;
  z-index: 1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  max-height: none !important;
  overflow: visible !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-inline-pills.is-pills-count-3 > .juf-select-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

/* Shared Option Pill Styling — Wraps Safely, Never Spills Outside Borders */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option {
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 38px !important;
  height: auto !important;
  padding: 6px 11px !important;
  border-radius: 10px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  font: 600 13px/1.28 var(--font-ui-system) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  overflow: hidden !important;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select .juf-select-option {
  width: 100% !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select .juf-select-option.is-wide-option {
  grid-column: 1 / -1 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option:hover,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option:focus-visible {
  background: #E4E6EC !important;
  border-color: #3346A8 !important;
  color: #282E37 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option[aria-selected="true"] {
  background: #3B4256 !important;
  border-color: #3B4256 !important;
  color: #F6F5F2 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(59, 66, 86, 0.14) !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option[aria-selected="true"]::before {
  content: "✓";
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

/* Unified Action Bar Across Books, Authors & Audiobooks */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-top: 6px !important;
  padding-top: 10px !important;
  border-top: 1px solid #D9D6D0 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-apply, .juf-author-filter-apply) {
  width: auto !important;
  flex: 1 1 auto !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  background: #3B4256 !important;
  border: 1px solid #3B4256 !important;
  color: #F6F5F2 !important;
  font: 700 13.5px/1 var(--font-ui-system) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  cursor: pointer !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-reset, .juf-author-clear-filter) {
  width: auto !important;
  flex: 0 0 auto !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  font: 600 13px/1 var(--font-ui-system) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-decoration: none !important;
}

/* 5. Mobile Bottom-Sheet Polish: Pinned Sticky Footer + Balanced Sheet Height */
@media (max-width: 760px) {
  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields),
  body.authors-page .juf-author-filter-more > .juf-author-filter-row,
  body.premium-page .premium-filter-more > .premium-filter-fields,
  body.audiobook-page .audio-filter-more > .audio-filter-fields,
  body.juf-page-books .juf-books-filter .juf-control-menu > .juf-control-popover,
  body.juf-books-page .juf-books-filter .juf-control-menu > .juf-control-popover {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    max-height: min(86dvh, 680px) !important;
    padding: 10px 15px 0 !important;
    border-radius: 22px !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::before {
    content: "" !important;
    display: block !important;
    width: 38px !important;
    height: 4px !important;
    margin: 0 auto 2px !important;
    border-radius: 999px !important;
    background: #E4E6EC !important;
    grid-column: 1 / -1 !important;
  }

  /* Sticky bottom action bar flush with sheet bottom so the apply button is never cut off */
  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    margin: 4px -15px 0 !important;
    padding: 10px 15px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: #F6F5F2 !important;
    border-top: 1px solid #D9D6D0 !important;
    box-shadow: 0 -8px 20px rgba(40, 46, 55, 0.06) !important;
  }

  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-apply, .juf-author-filter-apply) {
    width: auto !important;
    flex: 1 1 auto !important;
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-reset, .juf-author-clear-filter) {
    width: auto !important;
    flex: 0 0 auto !important;
    min-width: 96px !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* 6. Dark Mode Harmonization for Build 433 Filter Pills, Dropdowns & Sticky Footer */
html[data-theme="dark"] body :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) {
  background: #23262B !important;
  border-color: #3A3F47 !important;
}

html[data-theme="dark"] .juf-control-popover-head {
  border-bottom-color: #3A3F47 !important;
}

html[data-theme="dark"] .juf-control-popover-head strong {
  color: #ECE8E1 !important;
}

html[data-theme="dark"] .juf-control-popover-head a,
html[data-theme="dark"] .juf-control-popover-head .juf-filter-sheet-close {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-trigger,
html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select > .juf-select-list:not([hidden]),
html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-chevron {
  background: #2C3037 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option[aria-selected="true"] {
  background: #C9D4EC !important;
  border-color: #C9D4EC !important;
  color: #23262B !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions {
  background: #23262B !important;
  border-top-color: #3A3F47 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-reset, .juf-author-clear-filter) {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-apply, .juf-author-filter-apply) {
  background: #C9D4EC !important;
  border-color: #C9D4EC !important;
  color: #23262B !important;
}


/* ============================================================================
   Build 437 — Universal Custom Select System (Public + Admin `.is-compact-dropdown`),
   Modernized Auth Recovery Cards, Diagnostic Health Rows & Admin Arrange Tools
   ============================================================================ */

/* 1. Compact Anchored Custom Dropdown (`.juf-select.is-compact-dropdown`) for
      Public Forms/Toolbars (`writings.php`, `contact.php`, `takedown.php`, `details.php`,
      `read.php`) and All Admin Form/Table Selects (`.admin-main`) */
.juf-select.is-compact-dropdown {
  position: relative !important;
  width: 100%;
  min-width: 0;
  display: block;
}

.juf-select.is-compact-dropdown.is-auto-width {
  width: auto !important;
  min-width: 110px;
  display: inline-block !important;
}

.juf-select.is-compact-dropdown > .juf-select-trigger {
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 0 10px 0 13px !important;
  border-radius: 10px !important;
  background: var(--adm-surface, var(--juf-control-surface, #FFFFFF)) !important;
  border: 1px solid var(--adm-border, var(--juf-control-border, #D9D6D0)) !important;
  color: var(--adm-text, var(--juf-control-text, #282E37)) !important;
  font: 600 13px/1.25 var(--font-ui-system, "Noto Sans Bengali", "Kalpurush", sans-serif) !important;
  text-align: left !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.juf-select.is-compact-dropdown > .juf-select-trigger:hover,
.juf-select.is-compact-dropdown.is-open > .juf-select-trigger {
  border-color: #2C3243 !important;
  background: var(--adm-surface-soft, #F6F5F2) !important;
}

.juf-select.is-compact-dropdown > .juf-select-trigger.juf-field-invalid {
  border-color: #B0392B !important;
  box-shadow: 0 0 0 3px rgba(91, 99, 118, 0.12) !important;
}

.juf-select.is-compact-dropdown > .juf-select-trigger > .juf-select-value {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-align: left !important;
}

.juf-select.is-compact-dropdown > .juf-select-trigger > .juf-select-chevron {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  padding: 4px !important;
  border-radius: 50% !important;
  background: rgba(91, 99, 118, 0.14) !important;
  color: currentColor !important;
  box-sizing: border-box !important;
}

.juf-select.is-compact-dropdown > .juf-select-list:not([hidden]) {
  position: absolute !important;
  z-index: 320 !important;
  top: calc(100% + 5px) !important;
  left: 0 !important;
  right: 0 !important;
  min-width: max(100%, 190px) !important;
  max-height: 248px !important;
  margin-top: 0 !important;
  padding: 6px !important;
  border-radius: 12px !important;
  background: var(--adm-surface, #F6F5F2) !important;
  border: 1px solid var(--adm-border, #D9D6D0) !important;
  box-shadow: 0 18px 44px rgba(40, 46, 55, 0.18) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

.juf-select.is-compact-dropdown > .juf-select-list > .juf-select-option {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 36px !important;
  height: auto !important;
  padding: 7px 11px !important;
  border-radius: 8px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--adm-text, #282E37) !important;
  font: 500 13px/1.35 var(--font-ui-system, "Noto Sans Bengali", "Kalpurush", sans-serif) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  text-align: left !important;
  white-space: normal !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.juf-select.is-compact-dropdown > .juf-select-list > .juf-select-option:hover,
.juf-select.is-compact-dropdown > .juf-select-list > .juf-select-option:focus-visible {
  background: var(--adm-surface-soft, #ECEAE6) !important;
  color: var(--adm-text, #282E37) !important;
}

.juf-select.is-compact-dropdown > .juf-select-list > .juf-select-option[aria-selected="true"] {
  background: #3B4256 !important;
  color: #F6F5F2 !important;
  font-weight: 700 !important;
}

.juf-select.is-compact-dropdown > .juf-select-list > .juf-select-option[aria-selected="true"]::before {
  content: "✓";
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

/* Specific pill geometry inside `.juf-writings-search-bar` */
.juf-writings-search-bar > .juf-select.is-compact-dropdown > .juf-select-trigger {
  min-height: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  padding: 0 10px 0 14px !important;
  background: #FFFFFF !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
}

@media (max-width: 680px) {
  .juf-writings-search-bar > .juf-select.is-compact-dropdown {
    grid-column: 1 / 2 !important;
  }
  .juf-writings-search-bar > .juf-select.is-compact-dropdown > .juf-select-trigger {
    min-height: 38px !important;
    height: 38px !important;
    font-size: 12.5px !important;
  }
}

/* 2. Unified Auth Recovery & Utility Card System (`forgot_password.php`,
      `reset_password.php`, `resend_verification.php`, `verify_email.php`) */
.juf-auth-recovery-shell {
  min-height: 64vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 56px;
}

.juf-auth-recovery-card {
  width: 100%;
  max-width: 470px;
  background: #F6F5F2;
  border: 1px solid #D9D6D0;
  border-radius: 22px;
  padding: clamp(26px, 5vw, 40px);
  box-shadow: 0 16px 44px rgba(40, 46, 55, 0.06);
  box-sizing: border-box;
}

.juf-auth-recovery-card .page-section-title {
  font-size: 24px;
  margin: 6px 0 12px;
  text-align: center;
  color: #282E37;
}

.juf-auth-recovery-copy {
  font-size: 13.5px;
  line-height: 1.72;
  color: #5B6376;
  text-align: center;
  margin: 0 0 20px;
}

.juf-auth-recovery-alert {
  padding: 12px 14px;
  border-radius: 11px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.juf-auth-recovery-alert.is-success {
  background: #E4E6EC;
  border: 1px solid #E4E6EC;
  border-left: 4px solid #2E7A4F;
  color: #2E7A4F;
}

.juf-auth-recovery-alert.is-error {
  background: #F6F5F2;
  border: 1px solid #D9D6D0;
  border-left: 4px solid #B0392B;
  color: #B0392B;
}

.juf-auth-recovery-alert a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.juf-auth-recovery-field {
  margin-bottom: 16px;
  text-align: left;
}

.juf-auth-recovery-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #282E37;
}

.juf-auth-recovery-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #D9D6D0;
  border-radius: 10px;
  background: #FFFFFF;
  color: #282E37;
  font: 500 14px/1.35 var(--font-ui-system, "Noto Sans Bengali", sans-serif);
  box-sizing: border-box;
}

.juf-auth-recovery-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.juf-auth-recovery-password-wrap input {
  padding-right: 68px;
}

.juf-auth-recovery-password-wrap .juf-password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #D9D6D0;
  background: #ECEAE6;
  color: #282E37;
  font: 600 11.5px/1 var(--font-ui-system, "Noto Sans Bengali", sans-serif);
  cursor: pointer;
}

.juf-auth-recovery-submit {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.juf-auth-recovery-back {
  text-align: center;
  margin: 18px 0 0;
  font-size: 13px;
}

.juf-auth-recovery-back a {
  color: var(--accent-rust, #3B4256);
  font-weight: 700;
  text-decoration: none;
}

/* 3. Admin Diagnostic Check Rows (`admin/system_health.php` & `admin/live_test.php`)
      & Admin Arrange / Composition / Rights Surfaces */
.juf-diag-row {
  border-radius: 12px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.juf-diag-row.is-pass {
  background: #E4E6EC;
}

.juf-diag-row.is-warn {
  background: #F6F5F2;
}

.juf-diag-row.is-fail {
  background: #F6F5F2;
}

.juf-diag-row > strong {
  font-weight: 700;
}

.juf-diag-row.is-pass > strong {
  color: #2E7A4F;
}

.juf-diag-row.is-warn > strong {
  color: #7F520C;
}

.juf-diag-row.is-fail > strong {
  color: #B0392B;
}

.juf-diag-row > span {
  color: #5B6376;
  word-break: break-word;
}

.juf-diag-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
}

.juf-diag-pill.is-pass {
  background: #E4E6EC;
  color: #2E7A4F;
}

.juf-diag-pill.is-warn {
  background: #F6F5F2;
  color: #7F520C;
}

.juf-diag-pill.is-fail {
  background: #ECEAE6;
  color: #B0392B;
}

.juf-diag-pill.is-neutral {
  background: #ECEAE6;
  color: #5B6376;
}

.admin-main .juf-rights-claim-body {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 13.5px;
  padding: 12px 14px;
  background: var(--adm-surface-soft, #F6F5F2);
  border: 1px solid var(--adm-border, #D9D6D0);
  border-radius: 10px;
  color: var(--adm-text, #282E37);
}

.admin-main .juf-arrange-diff {
  margin-top: 12px;
  padding: 14px 18px;
}

.admin-main .juf-arrange-diff > summary {
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
}

.admin-main .juf-arrange-diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.admin-main .juf-arrange-diff-grid label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 12.5px;
}

.admin-main .juf-arrange-diff-grid textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  padding: 10px;
  border-radius: 10px;
}

.admin-main .juf-bio-intro-proposal {
  padding: 14px 16px;
  margin-top: 10px;
  border-radius: 12px;
  background: var(--adm-surface-soft, #F6F5F2);
  border: 1px solid var(--adm-border, #D9D6D0);
}

.admin-main .juf-bio-intro-proposal h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

@media (max-width: 760px) {
  .juf-diag-row {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .admin-main .juf-arrange-diff-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ============================================================================
   Build 438 — Upload Thumbnail Previews, Rich Media Dialog, Drop-Up Audio Speed
   Select, Searchable Multi-Select Box & Dark-Mode Callout Surfaces
   ============================================================================ */

/* Drop-up custom select for sticky bottom audio player (`#juf-playback-rate`) */
.juf-select.is-compact-dropdown.is-dropup-select > .juf-select-list:not([hidden]) {
  top: auto !important;
  bottom: calc(100% + 6px) !important;
  min-width: 112px !important;
}

.juf-player-tools .juf-select.is-compact-dropdown > .juf-select-trigger {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 8px 0 11px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

.juf-editor-toolbar .juf-select.is-compact-dropdown {
  width: auto !important;
  min-width: 132px !important;
}

.juf-editor-toolbar .juf-select.is-compact-dropdown > .juf-select-trigger {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 8px 0 11px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

/* File upload live thumbnail preview + clear button */
.juf-file-status.has-file {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 10px !important;
  border-radius: 10px !important;
}

.juf-file-preview-thumb {
  width: 34px !important;
  height: 34px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  flex: 0 0 34px !important;
}

.juf-file-clear-btn {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid #D9D6D0 !important;
  background: #FFFFFF !important;
  color: #282E37 !important;
  font: 700 13px/1 var(--font-ui-system, sans-serif) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.juf-file-clear-btn:hover {
  background: #B0392B !important;
  border-color: #B0392B !important;
  color: #FFFFFF !important;
}

/* Rich Text Editor Image Upload & Link Dialog */
.juf-confirm-dialog.juf-rich-media-dialog {
  width: min(460px, calc(100vw - 28px)) !important;
  padding: 22px !important;
  border-radius: 18px !important;
}

.juf-rich-dialog-form {
  display: grid !important;
  gap: 12px !important;
}

.juf-rich-dialog-form h3 {
  margin: 0 0 2px !important;
  font-size: 17px !important;
}

.juf-rich-dialog-preview {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: var(--adm-surface-soft, #ECEAE6) !important;
  border: 1px solid var(--adm-border, #D9D6D0) !important;
}

.juf-rich-dialog-preview img {
  width: 52px !important;
  height: 52px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  flex: 0 0 52px !important;
}

.juf-rich-dialog-preview span {
  font-size: 12.5px !important;
  color: var(--adm-text-muted, #5B6376) !important;
  word-break: break-word !important;
}

.juf-rich-dialog-field {
  display: grid !important;
  gap: 5px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.juf-rich-dialog-field input {
  width: 100% !important;
  min-height: 40px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  border: 1px solid var(--adm-border, #D9D6D0) !important;
  background: var(--adm-surface, #FFFFFF) !important;
  color: var(--adm-text, #282E37) !important;
  box-sizing: border-box !important;
}

/* Searchable Multi-Select Box (`admin/audio_collections.php`, `admin/authors.php`) */
.admin-main .admin-multi-select-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--adm-border, #D9D6D0);
  border-radius: 12px;
  background: var(--adm-surface-soft, #F6F5F2);
}

.admin-main .admin-multi-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-main .admin-multi-search {
  flex: 1 1 180px !important;
  min-height: 38px !important;
  padding: 6px 12px !important;
  border-radius: 9px !important;
}

.admin-main .admin-multi-options {
  background: var(--adm-surface, #FFFFFF);
  border: 1px solid var(--adm-border, #D9D6D0);
  border-radius: 10px;
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.admin-main .admin-multi-options label.is-checked {
  background: rgba(59, 66, 86, 0.08);
  border-radius: 8px;
  font-weight: 600;
}

/* Theme-aware Admin Callouts & Secondary Category Pills */
.admin-main .juf-admin-info-callout {
  padding: 12px 15px;
  border-radius: 11px;
  border: 1px solid var(--adm-border, #D9D6D0);
  background: var(--adm-surface-soft, #F6F5F2);
  color: var(--adm-text, #282E37);
  font-size: 12.75px;
}

.admin-main .juf-admin-info-callout.is-dashed {
  border-style: dashed;
}

.admin-main .juf-secondary-cat-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 11px !important;
  border: 1px solid var(--adm-border, #D9D6D0) !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  background: var(--adm-surface, #FFFFFF) !important;
  color: var(--adm-text, #282E37) !important;
  cursor: pointer !important;
}


/* ==========================================================================
   BUILD 446 — DARK MODE PARITY FOR PUBLIC NOTICES, FLASH ALERTS & DIALOGS
   Fixes light-grey notice boxes (e.g. .review-existing-notice in 1000169843.jpg)
   ========================================================================== */
html[data-theme="dark"] :where(.review-existing-notice, .juf-ai-notice, .alert-warning) {
  background: #343A44 !important;
  border: 1px solid #3A3F47 !important;
  border-left: 4px solid #C9D4EC !important;
  color: #ECE8E1 !important;
}
html[data-theme="dark"] :where(.reader-auth-alert-v27.is-success, .juf-author-follow-message, .book-community-message, .alert-success, .contact-alert.success, .notification-flash.success, .profile-hub-notice.is-success, .juf-review-flash) {
  background: rgba(111, 203, 147, 0.12) !important;
  border: 1px solid rgba(111, 203, 147, 0.32) !important;
  border-left: 4px solid #6FCB93 !important;
  color: #ECE8E1 !important;
}
html[data-theme="dark"] :where(.reader-auth-alert-v27.is-error, .alert-error, .contact-alert.error, .notification-flash.error, .profile-hub-notice.is-error) {
  background: rgba(240, 144, 127, 0.12) !important;
  border: 1px solid rgba(240, 144, 127, 0.32) !important;
  border-left: 4px solid #F0907F !important;
  color: #ECE8E1 !important;
}
html[data-theme="dark"] .juf-confirm-dialog {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}
html[data-theme="dark"] .juf-confirm-dialog h2 { color: #ECE8E1 !important; }
html[data-theme="dark"] .juf-confirm-dialog p { color: #A09B94 !important; }
html[data-theme="dark"] .juf-confirm-cancel {
  background: #343A44 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

/* ==========================================================================
   Build 507 — Admin Filter Sheet, Field Labels & Reset/Apply Button Fix
   Fixes Screenshot 1000170560.jpg:
   1. Hides redundant legacy submit button (.admin-control-legacy-submit)
      with higher specificity than .admin-main .admin-filter-row :is(..., button).
   2. Protects .admin-filter-panel buttons (.admin-filter-reset-link,
      .juf-filter-sheet-close, .juf-control-reset, .juf-control-apply) from the
      (0,5,1) width:100% rule so Reset never crushes Apply into a narrow pill.
   3. Styles .juf-control-field-label inside .admin-filter-panel so every
      filter dropdown or segmented pill group has a clear label.
   ========================================================================== */
html body .admin-main .admin-filter-row button.admin-control-legacy-submit,
html body .admin-main form.admin-control-bar > button.admin-control-legacy-submit,
html body .admin-main .admin-control-legacy-submit {
  display: none !important;
}

html body .admin-main .admin-filter-panel .juf-control-popover-head,
html body .admin-main .admin-filter-row .admin-filter-panel .juf-control-popover-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
}

html body .admin-main .admin-filter-panel .juf-control-popover-head strong {
  margin-right: auto !important;
}

html body .admin-main .admin-filter-panel .juf-control-popover-head button.admin-filter-reset-link,
html body .admin-main .admin-filter-row .admin-filter-panel .juf-control-popover-head button.admin-filter-reset-link {
  width: auto !important;
  min-width: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  flex: 0 0 auto !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

html body .admin-main .admin-filter-panel .juf-control-popover-head button.juf-filter-sheet-close,
html body .admin-main .admin-filter-row .admin-filter-panel .juf-control-popover-head button.juf-filter-sheet-close {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  flex: 0 0 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

html body .admin-main .admin-filter-panel .juf-control-field,
html body .admin-main .admin-filter-row .admin-filter-panel .juf-control-field {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: 100% !important;
  grid-column: 1 / -1 !important;
}

html body .admin-main .admin-filter-panel .juf-control-field-label {
  display: block !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--adm-text, #282E37) !important;
  margin-bottom: 2px !important;
}

html body .admin-main .admin-filter-panel .juf-control-actions,
html body .admin-main .admin-filter-row .admin-filter-panel .juf-control-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

html body .admin-main .admin-filter-panel .juf-control-actions button.juf-control-reset,
html body .admin-main .admin-filter-row .admin-filter-panel .juf-control-actions button.juf-control-reset {
  flex: 1 1 0% !important;
  width: auto !important;
  min-width: 100px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
}

html body .admin-main .admin-filter-panel .juf-control-actions button.juf-control-apply,
html body .admin-main .admin-filter-row .admin-filter-panel .juf-control-actions button.juf-control-apply {
  flex: 1.25 1 0% !important;
  width: auto !important;
  min-width: 120px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 20px !important;
  border-radius: 12px !important;
}







/* ==========================================================================
   BUILD 510: COMPLETE ADMIN MOBILE CARDS, FORMS & 2-COLUMN BUTTON GRID SYSTEM
   Uses `html body.admin-shell-body .admin-main` specificity to beat all
   `html:not([data-theme="dark"]) .admin-main` rules across all 70 Admin pages.
   ========================================================================== */

/* single-column layout when either Category / Author Category form or list is hidden */
.admin-main .category-admin-layout:has(> [hidden]),
.admin-main .author-category-admin-layout:has(> [hidden]) {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* Ensure status chips (like 'Visible' in Categories) have a crisp pill background */
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .admin-status-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    background: var(--adm-surface-soft, #ECEAE6) !important;
    border: 1px solid var(--adm-border, #D9D6D0) !important;
    color: var(--adm-sidebar-active, #3B4256) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

@media (max-width: 767px) {
    /* 1. Unwrap outer panel & table-wrap boxes with high specificity so EVERY table card
          (Categories, Author Categories, Dashboard Top Books, Authors, Audiobooks, Users, etc.)
          sits directly on the warm-stone canvas at 100% full width just like Books! */
    html body.admin-shell-body .admin-main :is(
        section,
        .admin-panel,
        .admin-card,
        .admin-card-lite,
        .admin-dashboard-recent-books,
        .category-admin-list,
        .juf-admin-author-table-card,
        .juf-rbac-card
    ):has(:is(table[data-mobile-cards], table.admin-table, table.juf-admin-audio-table, table.simple-admin-table, table.juf-rbac-table)) {
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    html body.admin-shell-body .admin-main :is(
        .admin-table-wrap,
        [data-table-container],
        .juf-compact-topbooks-table,
        .juf-admin-table-scroll
    ) {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    /* Keep section headings above unwrapped mobile card lists cleanly spaced */
    html body.admin-shell-body .admin-main :is(
        section,
        .admin-panel,
        .admin-card,
        .admin-card-lite,
        .admin-dashboard-recent-books,
        .category-admin-list
    ):has(table[data-mobile-cards]) > :is(.admin-panel-heading, .admin-section-head, .juf-compact-section-head, .admin-card-head, header, h2, h3, p) {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    /* 2. Unified Large Card Box for every table row (tr) matching Books (1000170573.jpg) */
    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) {
        display: block !important;
        width: 100% !important;
        border: 0 !important;
        background: transparent !important;
    }

    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) thead {
        display: none !important;
    }

    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        width: 100% !important;
    }

    html:not([data-theme="dark"]) body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody tr {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 16px !important;
        border: 1px solid var(--adm-border, #D9D6D0) !important;
        border-radius: 16px !important;
        background: #FFFFFF !important;
        box-shadow: 0 4px 14px rgba(24, 21, 18, 0.05) !important;
        box-sizing: border-box !important;
    }

    html[data-theme="dark"] body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody tr {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 16px !important;
        border: 1px solid var(--adm-border, #3A3F47) !important;
        border-radius: 16px !important;
        background: var(--adm-surface, #2C3037) !important;
        box-sizing: border-box !important;
    }

    /* 3. Unified Spacious Data Rows (td) with 92px Left Label + Right Value Grid */
    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td {
        display: grid !important;
        grid-template-columns: 92px minmax(0, 1fr) !important;
        column-gap: 12px !important;
        row-gap: 3px !important;
        align-items: start !important;
        width: 100% !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-bottom: 1px solid var(--adm-sidebar-hover, #D9D6D0) !important;
        font-size: 13.5px !important;
        line-height: 1.45 !important;
        text-align: left !important;
        box-sizing: border-box !important;
        background: transparent !important;
    }

    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td::before {
        content: attr(data-label) !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        align-self: start !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        color: var(--adm-text-muted, #5B6376) !important;
        padding-right: 4px !important;
    }

    /* Fix Category row alignment in Categories (1000170582.jpg): hide redundant square icon box on mobile so title aligns vertically with all rows below */
    html body.admin-shell-body .admin-main table[data-mobile-cards] .category-admin-name {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html body.admin-shell-body .admin-main table[data-mobile-cards] .category-admin-icon {
        display: none !important;
    }

    html body.admin-shell-body .admin-main table[data-mobile-cards] .category-admin-name > span {
        display: grid !important;
        gap: 2px !important;
    }

    /* Top Checkbox Select Strip inside Book / Author / Chapter / User cards */
    html:not([data-theme="dark"]) body.admin-shell-body .admin-main table[data-mobile-cards] tbody td[data-label="✓"],
    html:not([data-theme="dark"]) body.admin-shell-body .admin-main table[data-mobile-cards] tbody td[data-label="Select"],
    html:not([data-theme="dark"]) body.admin-shell-body .admin-main table[data-mobile-cards] tbody td:first-child:has(> input[type="checkbox"]) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 12px !important;
        margin: 0 0 6px !important;
        border-radius: 10px !important;
        background: var(--adm-surface-soft, #ECEAE6) !important;
        border: 1px solid var(--adm-border, #D9D6D0) !important;
    }

    html body.admin-shell-body .admin-main table[data-mobile-cards] tbody td[data-label="✓"]::before,
    html body.admin-shell-body .admin-main table[data-mobile-cards] tbody td[data-label="Select"]::before,
    html body.admin-shell-body .admin-main table[data-mobile-cards] tbody td:first-child:has(> input[type="checkbox"])::before {
        content: "Select" !important;
        font-size: 12px !important;
        font-weight: 700 !important;
    }

    /* 4. Unified Bottom Action Bar (2-Column Side-by-Side Grid + Warm-Stone Edit Button Like Books!) */
    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td:is(
        [data-label="Action"],
        [data-label="Actions"],
        [data-label="অ্যাকশন"],
        :last-child:has(a, button, form)
    ) {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        border-bottom: 0 !important;
        padding-top: 14px !important;
        padding-bottom: 2px !important;
        margin-top: 2px !important;
        gap: 8px !important;
    }

    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td:is(
        [data-label="Action"],
        [data-label="Actions"],
        [data-label="অ্যাকশন"],
        :last-child:has(a, button, form)
    )::before {
        display: none !important;
        content: none !important;
    }

    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td :is(
        .admin-row-actions,
        .juf-compact-row-actions,
        .category-admin-actions,
        .author-category-actions,
        .juf-admin-author-actions
    ) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: stretch !important;
    }

    /* Direct action children without wrapper div */
    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td:is(
        [data-label="Action"],
        [data-label="Actions"],
        [data-label="অ্যাকশন"],
        :last-child
    ):not(:has(.admin-row-actions, .juf-compact-row-actions, .category-admin-actions, .author-category-actions, .juf-admin-author-actions)):has(> a, > button, > form) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        align-items: stretch !important;
    }

    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td :is(
        .admin-row-actions,
        .juf-compact-row-actions,
        .category-admin-actions,
        .author-category-actions,
        .juf-admin-author-actions
    ) > :is(a, button, form, details) {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    /* Odd last button spans full width (just like 'Duplicate' in 1000170573.jpg!) */
    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td :is(
        .admin-row-actions,
        .juf-compact-row-actions,
        .category-admin-actions,
        .author-category-actions,
        .juf-admin-author-actions
    ) > :is(a, button, form, details):last-child:nth-child(odd),
    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td:is(
        [data-label="Action"],
        [data-label="Actions"],
        [data-label="অ্যাকশন"],
        :last-child
    ):not(:has(.admin-row-actions, .juf-compact-row-actions, .category-admin-actions, .author-category-actions, .juf-admin-author-actions)) > :is(a, button, form):last-child:nth-child(odd) {
        grid-column: 1 / -1 !important;
    }

    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td :is(
        .admin-row-actions,
        .juf-compact-row-actions,
        .category-admin-actions,
        .author-category-actions,
        .juf-admin-author-actions
    ) :is(a, button, .button, .admin-btn, .juf-row-action) {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 40px !important;
        height: auto !important;
        padding: 8px 12px !important;
        border-radius: 10px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* 5. Fit All Button Groups in Edit Book (1000170575.jpg & 1000170577.jpg), Categories (1000170580.jpg), and Forms into 2-Column Grids! */

    /* 5A. Top Quickbar Actions (+ Add Book | Chapters | + Add Quiz / + Add Author | Backup in 1000170580.jpg) */
    html body.admin-shell-body .admin-main .juf-admin-quickbar-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    html body.admin-shell-body .admin-main .juf-admin-quickbar-actions > .juf-admin-qbtn {
        flex: 1 1 calc(33.33% - 6px) !important;
        min-width: 96px !important;
        justify-content: center !important;
        text-align: center !important;
        min-height: 36px !important;
        padding: 6px 10px !important;
        box-sizing: border-box !important;
    }

    /* 5B. Page Tab Switchers (All Books / + Add Book, Category Library / + New Category, Basic Mode / Advanced Mode, etc.) */
    html body.admin-shell-body .admin-main :is(
        [data-book-tab-pills],
        [data-author-tab-pills],
        [data-category-tab-pills],
        [data-author-cat-tab-pills],
        .juf-form-mode-switch,
        .juf-shortcut-btn-pair
    ) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    html body.admin-shell-body .admin-main :is(
        [data-book-tab-pills],
        [data-author-tab-pills],
        [data-category-tab-pills],
        [data-author-cat-tab-pills],
        .juf-form-mode-switch,
        .juf-shortcut-btn-pair
    ) > :is(a, button) {
        width: 100% !important;
        min-height: 40px !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
    }

    /* 5C. Edit Book Top Links (Manage Chapters | Import Chapters CSV / Preview ↗ in 1000170575.jpg) & Content Links (Book Content Import | Manage Parts / Manage Chapters in 1000170577.jpg) */
    html body.admin-shell-body .admin-main :is(
        .juf-fast-publish-links,
        .content-workspace-links
    ) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    html body.admin-shell-body .admin-main :is(
        .juf-fast-publish-links,
        .content-workspace-links
    ) > :is(a, button) {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 40px !important;
        padding: 8px 10px !important;
        font-size: 12.5px !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    html body.admin-shell-body .admin-main :is(
        .juf-fast-publish-links,
        .content-workspace-links
    ) > :is(a, button):last-child:nth-child(odd) {
        grid-column: 1 / -1 !important;
    }

    /* 5D. Edit Book Bottom Save/Publish Bar (Save Draft | Save & Add Chapters / Submit Review | Publish Now / Update Book in 1000170575.jpg & 1000170577.jpg) */
    html body.admin-shell-body .admin-main .juf-fast-save-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    html body.admin-shell-body .admin-main .juf-fast-save-actions > :is(button, a) {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    html body.admin-shell-body .admin-main .juf-fast-save-actions > :is(button, a):last-child:nth-child(odd) {
        grid-column: 1 / -1 !important;
    }

    /* 5E. Unwrap Double-Bordered Inner Panels Inside Edit Book (#book-details > .content-workspace-panel in 1000170575.jpg & 1000170577.jpg) */
    html body.admin-shell-body .admin-main #book-details {
        padding: 16px 14px !important;
    }

    html body.admin-shell-body .admin-main #book-details .content-workspace-panel {
        padding: 4px 0 8px !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* 5F. Make Standalone Form Submit Buttons (like 'Create Category' in 1000170580.jpg) Full-Width on Mobile */
    html body.admin-shell-body .admin-main :is(
        .category-admin-editor form > button[type="submit"],
        .author-category-editor form > button[type="submit"],
        .admin-card-lite form > button[type="submit"],
        .juf-rbac-card form > button[type="submit"]
    ) {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center !important;
        text-align: center !important;
        margin-top: 8px !important;
    }
}



/* ==========================================================================
   BUILD 511: COLOR-CODED SYSTEM HEALTH & DIAGNOSTICS (CRITICAL vs WARNING vs PASSED)
   Makes Critical (Red), Warning (Amber/Yellow), and Passed (Emerald Green)
   100% visually distinct in both Light Mode and Dark Mode.
   ========================================================================== */

/* Top 5 KPI Summary Cards */
html body.admin-shell-body .admin-main .juf-health-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 14px 0 14px !important;
}

@media (max-width: 767px) {
    html body.admin-shell-body .admin-main .juf-health-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    html body.admin-shell-body .admin-main .juf-health-kpi-grid > .juf-health-kpi-wide {
        grid-column: 1 / -1 !important;
    }
}

html body.admin-shell-body .admin-main .juf-health-kpi {
    padding: 14px 16px !important;
    border-radius: 14px !important;
    display: grid !important;
    gap: 4px !important;
    box-sizing: border-box !important;
}

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-critical {
    background: var(--adm-danger-bg, #F8E4E0) !important;
    border: 1.5px solid var(--adm-danger, #B0392B) !important;
    border-left: 6px solid var(--adm-danger, #B0392B) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-critical span { color: var(--adm-danger, #B0392B) !important; font-weight: 700 !important; }
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-critical strong { color: var(--adm-danger, #B0392B) !important; font-size: 16px !important; font-weight: 800 !important; }

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-warning {
    background: var(--adm-warn-bg, #F5EBD6) !important;
    border: 1.5px solid var(--adm-warn, #7F520C) !important;
    border-left: 6px solid var(--adm-warn, #7F520C) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-warning span { color: var(--adm-warn, #7F520C) !important; font-weight: 700 !important; }
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-warning strong { color: var(--adm-warn, #7F520C) !important; font-size: 16px !important; font-weight: 800 !important; }

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-passed,
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi.is-zero {
    background: var(--adm-ok-bg, #E4F1E9) !important;
    border: 1.5px solid var(--adm-ok, #2E7A4F) !important;
    border-left: 6px solid var(--adm-ok, #2E7A4F) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi:is(.is-passed, .is-zero) span { color: var(--adm-ok, #2E7A4F) !important; font-weight: 700 !important; }
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-kpi:is(.is-passed, .is-zero) strong { color: var(--adm-ok, #2E7A4F) !important; font-size: 16px !important; font-weight: 800 !important; }

/* 4-Button Filter Bar (2x2 Grid on Mobile) */
html body.admin-shell-body .admin-main .juf-health-filter-bar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 0 18px !important;
}

@media (max-width: 767px) {
    html body.admin-shell-body .admin-main .juf-health-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

html body.admin-shell-body .admin-main .juf-health-filter-btn {
    min-height: 42px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border: 1.5px solid var(--adm-border, #D9D6D0) !important;
    background: #FFFFFF !important;
    color: var(--adm-text, #282E37) !important;
    transition: all 0.15s ease !important;
}

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-filter-btn.is-critical-tab {
    border-color: var(--adm-danger, #B0392B) !important;
    background: var(--adm-danger-bg, #F8E4E0) !important;
    color: var(--adm-danger, #B0392B) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-filter-btn.is-warning-tab {
    border-color: var(--adm-warn, #7F520C) !important;
    background: var(--adm-warn-bg, #F5EBD6) !important;
    color: var(--adm-warn, #7F520C) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-filter-btn.is-passed-tab {
    border-color: var(--adm-ok, #2E7A4F) !important;
    background: var(--adm-ok-bg, #E4F1E9) !important;
    color: var(--adm-ok, #2E7A4F) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-filter-btn.is-active {
    background: var(--adm-sidebar-active, #3B4256) !important;
    border-color: var(--adm-text, #282E37) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(26, 23, 20, 0.15) !important;
}

/* Health Section Groups & Group Headers */
html body.admin-shell-body .admin-main .juf-health-groups-wrap {
    display: grid !important;
    gap: 22px !important;
    margin-bottom: 24px !important;
}

html body.admin-shell-body .admin-main .juf-health-group {
    display: grid !important;
    gap: 12px !important;
}

html body.admin-shell-body .admin-main .juf-health-group[hidden] {
    display: none !important;
}

html body.admin-shell-body .admin-main .juf-health-group-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
}

html body.admin-shell-body .admin-main .juf-health-group-head h3 {
    margin: 0 0 3px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}

html body.admin-shell-body .admin-main .juf-health-group-head p {
    margin: 0 !important;
    font-size: 12.5px !important;
}

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-critical {
    background: var(--adm-danger-bg, #F8E4E0) !important;
    border: 1.5px solid var(--adm-danger, #B0392B) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-critical h3 { color: var(--adm-danger, #B0392B) !important; }
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-critical p { color: var(--adm-danger, #B0392B) !important; }

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-warning {
    background: var(--adm-warn-bg, #F5EBD6) !important;
    border: 1.5px solid var(--adm-warn, #7F520C) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-warning h3 { color: var(--adm-warn, #7F520C) !important; }
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-warning p { color: var(--adm-warn, #7F520C) !important; }

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-passed {
    background: var(--adm-ok-bg, #E4F1E9) !important;
    border: 1.5px solid var(--adm-ok, #2E7A4F) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-passed h3 { color: var(--adm-ok, #2E7A4F) !important; }
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-health-group-head.is-passed p { color: var(--adm-ok, #2E7A4F) !important; }

/* Individual Diagnostic Cards (.juf-diag-row) */
html body.admin-shell-body .admin-main .juf-diag-list {
    display: grid !important;
    gap: 10px !important;
}

html body.admin-shell-body .admin-main .juf-diag-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 15px 16px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

html body.admin-shell-body .admin-main .juf-diag-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
}

html body.admin-shell-body .admin-main .juf-diag-head > strong {
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

html body.admin-shell-body .admin-main .juf-diag-row > span {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    word-break: break-word !important;
}

/* Status Pill Badges inside every Diagnostic Card (CRITICAL / WARNING / PASSED) */
html body.admin-shell-body .admin-main .juf-diag-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

html body.admin-shell-body .admin-main .juf-diag-badge.is-fail {
    background: var(--adm-danger, #B0392B) !important;
    color: #FFFFFF !important;
    border: 1px solid var(--adm-danger, #B0392B) !important;
}

html body.admin-shell-body .admin-main .juf-diag-badge.is-warn {
    background: var(--adm-warn, #7F520C) !important;
    color: #FFFFFF !important;
    border: 1px solid var(--adm-warn, #7F520C) !important;
}

html body.admin-shell-body .admin-main .juf-diag-badge.is-pass {
    background: var(--adm-ok, #2E7A4F) !important;
    color: #FFFFFF !important;
    border: 1px solid var(--adm-ok, #2E7A4F) !important;
}

/* Light Mode Diagnostic Row Surfaces */
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-fail {
    background: var(--adm-danger-bg, #F8E4E0) !important;
    border: 1.5px solid var(--adm-danger, #B0392B) !important;
    border-left: 6px solid var(--adm-danger, #B0392B) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-fail :is(strong, .juf-diag-head > strong) {
    color: var(--adm-danger, #B0392B) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-fail > span {
    color: var(--adm-text, #282E37) !important;
}

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-warn {
    background: var(--adm-warn-bg, #F5EBD6) !important;
    border: 1.5px solid var(--adm-warn, #7F520C) !important;
    border-left: 6px solid var(--adm-warn, #7F520C) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-warn :is(strong, .juf-diag-head > strong) {
    color: var(--adm-warn, #7F520C) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-warn > span {
    color: var(--adm-text, #282E37) !important;
}

html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-pass {
    background: #FFFFFF !important;
    border: 1px solid var(--adm-ok, #2E7A4F) !important;
    border-left: 6px solid var(--adm-ok, #2E7A4F) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-pass :is(strong, .juf-diag-head > strong) {
    color: var(--adm-ok, #2E7A4F) !important;
}
html:not([data-theme="dark"]) body.admin-shell-body .admin-main .juf-diag-row.is-pass > span {
    color: var(--adm-text, #282E37) !important;
}

/* Dark Mode Diagnostic Row Surfaces */
html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-fail {
    background: var(--adm-danger-bg, #3E2523) !important;
    border: 1.5px solid var(--adm-danger, #F0907F) !important;
    border-left: 6px solid var(--adm-danger, #F0907F) !important;
}
html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-fail :is(strong, .juf-diag-head > strong),
html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-fail > span {
    color: var(--adm-danger, #F0907F) !important;
}

html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-warn {
    background: var(--adm-warn-bg, #3A2F1A) !important;
    border: 1.5px solid var(--adm-warn, #E0B35C) !important;
    border-left: 6px solid var(--adm-warn, #E0B35C) !important;
}
html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-warn :is(strong, .juf-diag-head > strong),
html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-warn > span {
    color: var(--adm-warn, #E0B35C) !important;
}

html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-pass {
    background: var(--adm-ok-bg, #1F3A2C) !important;
    border: 1px solid var(--adm-ok, #6FCB93) !important;
    border-left: 6px solid var(--adm-ok, #6FCB93) !important;
}
html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-pass :is(strong, .juf-diag-head > strong),
html[data-theme="dark"] body.admin-shell-body .admin-main .juf-diag-row.is-pass > span {
    color: var(--adm-ok, #6FCB93) !important;
}



/* ==========================================================================
   BUILD 512: AUTHORS CARD ALIGNMENT & DIRECT ACTION CELL GRID OVERRIDE
   ========================================================================== */
@media (max-width: 767px) {
    /* Align Author name flush left in mobile cards on authors.php (1000170600.jpg) */
    html body.admin-shell-body .admin-main table[data-mobile-cards] .juf-admin-author-cell {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html body.admin-shell-body .admin-main table[data-mobile-cards] .juf-admin-author-cell > :is(span, img) {
        display: none !important;
    }

    html body.admin-shell-body .admin-main table[data-mobile-cards] .juf-admin-author-cell > div {
        display: grid !important;
        gap: 2px !important;
    }

    /* Override `td > * { grid-column: 2 !important; justify-self: start !important; }` for action cells */
    html body.admin-shell-body .admin-main :is(table[data-mobile-cards], table.admin-table) tbody td:is(
        [data-label="Action"],
        [data-label="Actions"],
        [data-label="অ্যাকশন"],
        .juf-admin-author-actions,
        .admin-row-actions,
        :last-child:has(> a, > button, > form)
    ) > * {
        grid-column: auto !important;
        justify-self: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* === MERGED: jufbook-font-role-system.css === */
/* JUFbook — Final Public Typography Role System, Build 238
   Biography/Profile typography is the visual reference for the public site.
   No layout, colour, card, image or motion rules belong in this file. */

:root {
    --font-display-literary: 'Lora', 'Tiro Bangla', 'Kalpurush', 'SolaimanLipi', Georgia, serif;
    --font-heading-editorial: 'Lora', 'Kalpurush', 'SolaimanLipi', Georgia, serif;
    --font-reading: 'Lora', 'SolaimanLipi', Georgia, serif;
    --font-ui-system: 'Plus Jakarta Sans', 'Noto Sans Bengali', 'Kalpurush', 'SolaimanLipi', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-editorial-en: 'Lora', 'Plus Jakarta Sans', Georgia, serif;

    /* Existing component aliases — one system, no competing font map. */
    --font-display: var(--font-display-literary);
    --font-book-title: var(--font-display-literary);
    --font-author: var(--font-heading-editorial);
    --font-heading: var(--font-heading-editorial);
    --font-body: var(--font-reading);
    --font-ui: var(--font-ui-system);
    --juf-font-ui: var(--font-ui-system);
    --juf-font-heading: var(--font-heading-editorial);
    --juf-font-reader: var(--font-reading);
}

/* Public prose inherits the literary reading face. Reader/Profile keep their scoped contracts. */
body:not(.reader-page):not(.person-profile-page) {
    font-family: var(--font-reading);
}
body:not(.reader-page):not(.person-profile-page) :where(p, li, dd, dt, figcaption, blockquote) {
    font-family: var(--font-reading);
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

/* Bengali text should never gain artificial tracking or uppercase treatment. */
body:not(.reader-page):not(.person-profile-page) :where(h1,h2,h3,h4,h5,h6,p,a,button,label,span,strong,small) {
    letter-spacing: normal;
    text-transform: none;
}

/* Literary page / hero titles. Ordinary catalogue headings remain restrained by the size layer. */
body:not(.reader-page):not(.person-profile-page) :is(
    .hero-slide-title,
    .juf-authors-hero-copy h1,
    .juf-authors-cinematic-hero .hero-slide-title,
    .juf-library-hero h1,
    .juf-books-hero h1,
    .juf-details-book-title,
    .audio-hub-hero h1
) {
    font-family: var(--font-display-literary) !important;
    font-weight: 400 !important;
    font-synthesis: none;
}

/* General public page/section/subsection headings. */
body:not(.reader-page):not(.person-profile-page) :is(
    .site-main h1,
    .site-main h2,
    .site-main h3,
    .page-section-title,
    .section-title-wrap-flex h2,
    .books-showcase-head h2,
    .juf-search-group-head h2,
    .juf-catalog-heading h2,
    .juf-author-books-header h2,
    .approved-reviews-heading h2,
    .audio-music-section-head h2,
    .audio-shelf-heading h2,
    .audio-library-heading h2,
    .premium-how-grid h2,
    .premium-faq-list h2,
    .category-section-title,
    .category-section-head h2,
    .profile-hub-heading h2,
    .profile-p3-title h2,
    .profile-side-premium h2,
    .juf-details-section-heading h2
) {
    font-family: var(--font-heading-editorial) !important;
    font-weight: 500 !important;
    font-synthesis: none;
}

/* Book titles — Tiro Bangla Regular/Medium only. */
body:not(.reader-page):not(.person-profile-page) :is(
    .juf-jacket-title,
    .book-title,
    .juf-catalog-title,
    .book-under-title,
    .juf-details-book-title,
    .juf-search-book > span > strong,
    .premium-book-copy h3,
    .audio-media-details h4,
    .audio-row-copy h3,
    .audio-player-meta h2,
    .juf-search-audio-grid strong,
    .checkout-summary-copy h2,
    .profile-card-copy h3,
    .profile-shelf-card-v25 h3,
    .profile-listening-card h3,
    .profile-review-list h3
) {
    font-family: var(--font-book-title) !important;
    font-weight: 400 !important;
    font-synthesis: none !important;
}

/* Person names in discovery/directory components — refined Tiro Bangla literary serif with warm medium ink body (never thin/spidery and never heavy sans bold). */
body:not(.reader-page):not(.person-profile-page) :is(
    .juf-author-directory-name,
    .juf-author-profile-card-name,
    .home-author-discovery-copy h3,
    .profile-follow-strip h3,
    .juf-search-author-grid strong,
    .juf-related-authors-row strong
) {
    font-family: var(--font-display-literary, 'Tiro Bangla', 'SolaimanLipi', 'Kalpurush', serif) !important;
    font-weight: 500 !important;
    font-synthesis: none !important;
    -webkit-text-stroke: 0.12px currentColor;
}

/* Book author lines are secondary to titles. */
body:not(.reader-page):not(.person-profile-page) :is(
    .hero-slide-author,
    .juf-catalog-author,
    .book-under-author,
    .juf-details-byline a,
    .audio-row-author,
    .audio-detail-author a,
    .juf-search-book > span > small,
    .juf-author-new-book-author
) {
    font-family: var(--font-reading) !important;
    font-weight: 700 !important;
    font-synthesis: none;
}

/* Long reading / descriptive copy. */
body:not(.reader-page):not(.person-profile-page) :is(
    .hero-slide-desc,
    .juf-library-hero p,
    .juf-books-hero p,
    .juf-search-hero p,
    .juf-authors-lead-copy p,
    .juf-author-new-book-desc,
    .juf-details-summary,
    .juf-details-description,
    .book-summary,
    .book-introduction,
    .review-text,
    .testimonial-text,
    .testimonial-quote-text,
    .approved-review-card > p,
    .review-content,
    .review-body,
    .reader-review-text,
    .comment-text,
    .comment-body,
    .profile-review-list blockquote,
    .profile-hub-identity .reader-bio,
    .profile-side-premium p
) {
    font-family: var(--font-reading) !important;
    font-weight: 400 !important;
    font-synthesis: none;
}

/* English editorial person-name support. */
body:not(.reader-page) :is(
    .juf-author-directory-en,
    .juf-author-profile-en,
    .person-english,
    .profile-person-en
) {
    font-family: var(--font-editorial-en) !important;
    font-weight: 400 !important;
}

/* Public system UI. */
body:not(.reader-page):not(.person-profile-page) :is(
    button,input,select,textarea,label,summary,time,
    .juf-nav-link-v24,.juf-login-btn-v24,.juf-user-chip-v24,
    .juf-notification-badge-v24,.hero-slide-badge,.section-overline-label,
    .premium-plan-badge,.badge-premium,.premium-badge,.tag-premium,
    .book-meta-audio-pill,.book-meta-premium-pill,.book-meta-access,.book-meta-views,
    .juf-author-meta-chips,.juf-author-directory-role,.juf-author-directory-meta,
    .juf-catalog-card-foot,.book-rating-gold,
    .approved-review-meta,.testimonial-reader-meta,.juf-active-filter-chip,
    .juf-control-count,.juf-filter-reset,.juf-control-apply,.juf-control-reset,
    .juf-library-category-chip,.juf-author-alphabet a,.sub-tab-item,
    .section-view-all,.juf-search-group-head a,.juf-search-book em,
    .juf-search-author-grid :is(small,em),.juf-search-audio-grid :is(small,em),
    .juf-search-category-grid span,.profile-heading-link,.profile-side-heading,
    .profile-identity-meta,.profile-kicker,.profile-card-topline,
    .profile-reading-position,.profile-last-read,.profile-status-chip,.profile-rating-chip
) {
    font-family: var(--font-ui-system) !important;
}

body:not(.reader-page):not(.person-profile-page) :is(
    .juf-control-bar,.juf-control-menu,.juf-control-popover,.juf-books-filter,
    .juf-author-filter,.audio-filter-bar,.home-search-module,.juf-global-search-v40
) :is(button,input,select,label,summary,a) {
    font-family: var(--font-ui-system) !important;
}

/* Weight discipline: hierarchy comes from family/size/space, not black weight. */
body:not(.reader-page):not(.person-profile-page) :is(
    button,.juf-nav-link-v24,.juf-control-apply,.juf-control-reset,.juf-filter-reset,
    .section-view-all,.profile-heading-link,.profile-text-action,.profile-quiet-action
) { font-weight: 500 !important; }
body:not(.reader-page):not(.person-profile-page) :is(
    .badge-premium,.premium-badge,.tag-premium,.juf-active-filter-chip,time,
    .juf-author-directory-role,.juf-author-directory-meta
) { font-weight: 400 !important; }

/* Keep metadata/UI aliases aligned even inside legacy card CSS. */
:is(.book-card,.juf-catalog-card,.juf-search-book,.audio-media-card) {
    --font-ui-system:'Plus Jakarta Sans','Noto Sans Bengali','Kalpurush','SolaimanLipi',system-ui,sans-serif;
}


/* Final specificity safeguards: semantic literary titles must beat generic site h1/h2 rules. */
body:not(.reader-page):not(.person-profile-page) .site-main :is(
    .hero-slide-title,
    .juf-authors-hero-copy h1,
    .juf-authors-cinematic-hero .hero-slide-title,
    .juf-library-hero h1,
    .juf-books-hero h1,
    .juf-details-book-title,
    .audio-hub-featured-copy h2,
    .audio-new-copy h3,
    .audio-row-copy h3,
    .audio-player-meta h2,
    .profile-card-copy h3,
    .profile-shelf-card-v25 h3,
    .profile-listening-card h3,
    .profile-review-list-overview h3
) {
    font-family: var(--font-display-literary) !important;
    font-weight: 400 !important;
    font-synthesis: none !important;
}


/* === MERGED: search-intelligence.css === */
/* JUFbook Search Intelligence + compact results UI — 2026-09-14 */
.juf-search-shell .juf-search-page{padding:28px 0 64px}
.juf-search-shell .juf-search-results-intro{margin-top:0;margin-bottom:18px;padding-top:0;padding-bottom:0}
.juf-search-shell .juf-search-results-intro h1{font-size:clamp(32px,2.7vw,36px)!important;line-height:1.12;margin:0 0 8px!important;color:var(--text-main)!important}
.juf-search-shell .juf-search-results-intro p{margin:0!important;max-width:760px;color:var(--text-muted)!important;font-family:var(--font-reading);font-size:17.5px;line-height:1.7}
.juf-search-shell .juf-search-query-summary strong{color:var(--text-main)!important;font-weight:500}
.juf-search-shell .juf-search-start-compact{margin-top:12px!important;padding-top:0!important;padding-bottom:0!important}
.juf-search-shell .juf-search-start-compact p{margin:0;padding:14px 16px;border:1px solid var(--juf-border);border-radius:14px;background:var(--juf-surface-panel);color:var(--text-muted);font-size:13px;line-height:1.6;max-width:760px}
.juf-search-shell .juf-search-group{margin-top:28px!important;padding-top:24px!important;border-top:1px solid var(--juf-tan)!important}
.juf-search-shell .juf-search-group:first-of-type{margin-top:20px!important}
.juf-search-shell .juf-search-group-head{margin-bottom:14px!important;align-items:center!important}
.juf-search-shell .juf-search-group-head h2{font-size:25px!important;line-height:1.25;margin:0!important;color:var(--text-main)!important}
.juf-search-shell .juf-search-group-head a{font-size:12px!important;color:var(--text-main)!important;text-decoration:none!important;border-bottom:1px solid var(--juf-border)!important}
.juf-search-shell .juf-search-book,
.juf-search-shell .juf-search-author-grid>a,
.juf-search-shell .juf-search-audio-grid>a,
.juf-search-shell .juf-search-category-grid>a{background:var(--juf-surface-panel)!important;border:1px solid var(--juf-border)!important;box-shadow:0 8px 22px rgba(40, 46, 55, .035)!important}
.juf-search-shell .juf-search-empty-compact{display:flex;align-items:flex-start;gap:14px;max-width:720px;margin:22px 0 0;padding:20px 22px;border:1px solid var(--juf-border);border-radius:18px;background:var(--juf-surface-panel);box-shadow:0 8px 24px rgba(40, 46, 55, .035)}
.juf-search-shell .juf-search-empty-compact>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:var(--juf-light-surface);color:var(--text-main);font-size:18px}
.juf-search-shell .juf-search-empty-compact strong{display:block;color:var(--text-main);font:500 18px/1.4 var(--font-heading-editorial);margin:1px 0 4px}
.juf-search-shell .juf-search-empty-compact p{margin:0;color:var(--text-muted);font-size:13px;line-height:1.6}
.juf-search-shell .juf-search-empty-compact a{display:inline-flex;margin-top:10px;color:var(--text-main)!important;font-weight:500;font-size:12px;text-decoration:none;border-bottom:1px solid var(--juf-border)}
@media(max-width:767px){
  .juf-search-shell .juf-search-page{padding:22px 0 48px}
  .juf-search-shell .juf-search-results-intro{margin-bottom:14px}
  .juf-search-shell .juf-search-results-intro h1{font-size:28px!important}
  .juf-search-shell .juf-search-results-intro p{font-size:13px}
  .juf-search-shell .juf-search-group{margin-top:22px!important;padding-top:18px!important}
  .juf-search-shell .juf-search-group-head h2{font-size:22px!important}
  .juf-search-shell .juf-search-empty-compact{padding:17px 16px;border-radius:16px}
  .juf-search-shell .juf-search-empty-compact strong{font-size:16px}
}


/* === MERGED: jufbook-book-card-editorial-meta.css === */
/*
 * Build 263 — Unified one-line editorial book metadata
 * Home + Books Library share one compact title/author rhythm.
 * Titles stay readable at a proper size, never reserve a fake second line,
 * and long outliers truncate cleanly instead of making neighboring cards jump.
 */

/* Shared metadata alignment */
.juf-homepage :where(#showcase,.home-new-releases) .book-under-meta,
.juf-books-page .juf-catalog-book-meta{
    text-align:left !important;
}

/* Give the cover and the title a deliberate editorial breath.
 * Build 265: Homepage gets a slightly deeper cover-to-title separation than the Library;
 * Books page remains on the approved Build 263 rhythm. */
.juf-homepage :where(#showcase,.home-new-releases) .book-under-meta{
    margin-top:21px !important;
    padding:0 1px !important;
}
.juf-books-page .juf-catalog-book-meta{
    padding-top:13px !important;
}

/* One-line title contract — same visual size on Home and Books. */
.juf-homepage :where(#showcase,.home-new-releases) .book-under-title,
.juf-books-page .juf-catalog-title{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    overflow:hidden !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
    color:var(--text-main) !important;
    font-family:var(--font-display-literary,'Tiro Bangla','Kalpurush','SolaimanLipi',serif) !important;
    font-size:16px !important;
    font-weight:500 !important;
    line-height:1.28 !important;
    -webkit-line-clamp:unset !important;
    -webkit-box-orient:unset !important;
}

/* Author sits directly under the title; no two-line title placeholder gap. */
.juf-homepage :where(#showcase,.home-new-releases) .book-under-author,
.juf-books-page .juf-catalog-author{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    margin-top:4px !important;
    overflow:hidden !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
    color:var(--text-muted) !important;
    font-family:var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif) !important;
    font-size:11.75px !important;
    font-weight:400 !important;
    line-height:1.32 !important;
}

/* Only genuine ratings appear; placeholders/dividers/category tails stay absent. */
.juf-homepage :where(#showcase,.home-new-releases) .book-rating-gold,
.juf-books-page .juf-catalog-card-foot.has-rating{
    display:block !important;
    min-height:0 !important;
    margin-top:4px !important;
    padding:0 !important;
    border:0 !important;
    color:#A8741A !important;
    font-family:var(--font-ui-system,'Noto Sans Bengali','Kalpurush','SolaimanLipi',sans-serif) !important;
    font-size:10.5px !important;
    font-weight:500 !important;
    line-height:1.25 !important;
}
.juf-books-page .juf-catalog-card-foot.has-rating span{
    color:inherit !important;
    font-weight:500 !important;
}

.juf-books-page .juf-catalog-badges:empty{display:none !important}
.juf-books-page .juf-catalog-badges:not(:empty){margin-bottom:5px !important;min-height:0 !important}

@media (max-width:620px){
    .juf-homepage :where(#showcase,.home-new-releases) .book-under-meta,
    .juf-books-page .juf-catalog-book-meta{
        padding-left:1px !important;
        padding-right:1px !important;
    }

    /* Homepage: slightly more cover→title breathing room on phones. */
    .juf-homepage :where(#showcase,.home-new-releases) .book-under-meta{
        margin-top:21px !important;
    }
    .juf-books-page .juf-catalog-book-meta{
        padding-top:13px !important;
    }

    .juf-homepage :where(#showcase,.home-new-releases) .book-under-title,
    .juf-books-page .juf-catalog-title{
        min-height:0 !important;
        font-size:15.5px !important;
        line-height:1.28 !important;
        white-space:nowrap !important;
        text-overflow:ellipsis !important;
    }

    .juf-homepage :where(#showcase,.home-new-releases) .book-under-author,
    .juf-books-page .juf-catalog-author{
        margin-top:4px !important;
        min-height:0 !important;
        font-size:11.75px !important;
        line-height:1.32 !important;
    }

    .juf-homepage :where(#showcase,.home-new-releases) .book-rating-gold,
    .juf-books-page .juf-catalog-card-foot.has-rating{
        margin-top:4px !important;
        font-size:10.25px !important;
    }
}

@media (max-width:370px){
    /* Do not shrink titles into tiny labels on narrow phones. */
    .juf-homepage :where(#showcase,.home-new-releases) .book-under-title,
    .juf-books-page .juf-catalog-title{
        font-size:15px !important;
    }
    .juf-homepage :where(#showcase,.home-new-releases) .book-under-author,
    .juf-books-page .juf-catalog-author{
        font-size:11.25px !important;
    }
}

html[data-theme="dark"] .juf-homepage :where(#showcase,.home-new-releases) .book-rating-gold,
html[data-theme="dark"] .juf-books-page .juf-catalog-card-foot.has-rating{
    color:#D8C08C !important;
}


/* === MERGED: jufbook-search-filter-consistency.css === */
/* Build 258 — Books + Biography search/filter consistency.
   One compact discovery-control language across both public directories. */

/* Shared row: search field + one square filter trigger. */
body.authors-page .juf-author-filter-panel,
body.juf-page-books .juf-library-filter-wrap,
body.juf-books-page .juf-library-filter-wrap {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.authors-page .juf-author-directory-tools,
body.juf-page-books .juf-books-filter.juf-control-toolbar,
body.juf-books-page .juf-books-filter.juf-control-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 48px !important;
    grid-template-areas: "search filter" !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.authors-page .juf-author-directory-search,
body.juf-page-books .juf-books-filter .juf-books-search,
body.juf-books-page .juf-books-filter .juf-books-search {
    grid-area: search !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .88) !important;
    box-shadow: none !important;
}

body.authors-page .juf-author-directory-search:focus-within,
body.juf-page-books .juf-books-filter .juf-books-search:focus-within,
body.juf-books-page .juf-books-filter .juf-books-search:focus-within {
    border-color: rgba(59, 66, 86, .50) !important;
    box-shadow: 0 0 0 2px rgba(59, 66, 86, .06) !important;
}

body.authors-page .juf-author-directory-search input,
body.juf-page-books .juf-books-filter .juf-books-search input,
body.juf-books-page .juf-books-filter .juf-books-search input {
    height: 100% !important;
    padding-left: 44px !important;
    padding-right: 52px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
}

body.authors-page .juf-author-directory-search > .juf-control-search-icon,
body.juf-page-books .juf-books-filter .juf-books-search > .juf-control-search-icon,
body.juf-books-page .juf-books-filter .juf-books-search > .juf-control-search-icon {
    left: 15px !important;
    width: 19px !important;
    height: 19px !important;
}

body.authors-page .juf-author-directory-search .juf-control-search-submit,
body.juf-page-books .juf-books-filter .juf-books-search .juf-control-search-submit,
body.juf-books-page .juf-books-filter .juf-books-search .juf-control-search-submit {
    right: 5px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: #3B4256 !important;
    color: #fff !important;
}

/* Filter trigger is identical on Books and Biography. */
body.authors-page .juf-author-filter-more,
body.juf-page-books .juf-books-filter .juf-control-menu,
body.juf-books-page .juf-books-filter .juf-control-menu {
    grid-area: filter !important;
    width: 48px !important;
    min-width: 48px !important;
    margin: 0 !important;
    position: relative !important;
}

body.authors-page .juf-author-filter-more > summary,
body.juf-page-books .juf-books-filter .juf-control-menu > summary,
body.juf-books-page .juf-books-filter .juf-control-menu > summary {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid #D9D6D0 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .90) !important;
    color: #282E37 !important;
    box-shadow: none !important;
    list-style: none !important;
}
body.authors-page .juf-author-filter-more > summary::-webkit-details-marker,
body.juf-page-books .juf-books-filter .juf-control-menu > summary::-webkit-details-marker,
body.juf-books-page .juf-books-filter .juf-control-menu > summary::-webkit-details-marker { display:none !important; }

body.authors-page .juf-author-filter-more > summary > span:not(.juf-author-filter-icon):not(.juf-control-count),
body.juf-page-books .juf-books-filter .juf-control-menu > summary > span:not(.juf-control-count),
body.juf-books-page .juf-books-filter .juf-control-menu > summary > span:not(.juf-control-count) {
    display:none !important;
}

body.authors-page .juf-author-filter-icon,
body.juf-page-books .juf-books-filter .juf-control-trigger-icon,
body.juf-books-page .juf-books-filter .juf-control-trigger-icon {
    width: 19px !important;
    height: 19px !important;
    margin: 0 !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

body.authors-page .juf-author-filter-more[open] > summary,
body.juf-page-books .juf-books-filter .juf-control-menu[open] > summary,
body.juf-books-page .juf-books-filter .juf-control-menu[open] > summary {
    background: #3B4256 !important;
    border-color: #3B4256 !important;
    color: #fff !important;
}

/* Count badge can remain without changing trigger geometry. */
body.authors-page .juf-author-filter-more > summary .juf-control-count,
body.juf-page-books .juf-books-filter .juf-control-menu > summary .juf-control-count,
body.juf-books-page .juf-books-filter .juf-control-menu > summary .juf-control-count {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    display: grid !important;
    place-items: center !important;
    border: 2px solid #D9D6D0 !important;
    border-radius: 999px !important;
    background: #3B4256 !important;
    color: #fff !important;
    font-size: 9px !important;
    line-height: 1 !important;
}

/* Books already repeats result count in the catalogue heading; remove the
   duplicate toolbar copy so the control stays as light as Biography. */
body.juf-page-books .juf-books-filter .juf-control-result,
body.juf-books-page .juf-books-filter .juf-control-result {
    display: none !important;
}

/* Popovers keep their page-specific fields but share placement/shape. */
body.authors-page .juf-author-filter-more > .juf-author-filter-row,
body.juf-page-books .juf-books-filter .juf-control-menu > .juf-control-popover,
body.juf-books-page .juf-books-filter .juf-control-menu > .juf-control-popover {
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    border-radius: 16px !important;
}

/* Mobile: same 44px geometry on both pages, no alternate stacked toolbar. */
@media (max-width: 760px) {
    body.authors-page .juf-author-directory-tools,
    body.juf-page-books .juf-books-filter.juf-control-toolbar,
    body.juf-books-page .juf-books-filter.juf-control-toolbar {
        grid-template-columns: minmax(0,1fr) 48px !important;
        grid-template-areas: "search filter" !important;
        gap: 8px !important;
    }

    body.authors-page .juf-author-directory-search,
    body.juf-page-books .juf-books-filter .juf-books-search,
    body.juf-books-page .juf-books-filter .juf-books-search,
    body.authors-page .juf-author-filter-more > summary,
    body.juf-page-books .juf-books-filter .juf-control-menu > summary,
    body.juf-books-page .juf-books-filter .juf-control-menu > summary {
        height: 46px !important;
        min-height: 46px !important;
    }

    body.authors-page .juf-author-filter-more,
    body.juf-page-books .juf-books-filter .juf-control-menu,
    body.juf-books-page .juf-books-filter .juf-control-menu,
    body.authors-page .juf-author-filter-more > summary,
    body.juf-page-books .juf-books-filter .juf-control-menu > summary,
    body.juf-books-page .juf-books-filter .juf-control-menu > summary {
        width: 48px !important;
        min-width: 48px !important;
    }

    body.authors-page .juf-author-directory-search .juf-control-search-submit,
    body.juf-page-books .juf-books-filter .juf-books-search .juf-control-search-submit,
    body.juf-books-page .juf-books-filter .juf-books-search .juf-control-search-submit {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        border-radius: 11px !important;
    }

    body.authors-page .juf-author-filter-more > .juf-author-filter-row,
    body.juf-page-books .juf-books-filter .juf-control-menu > .juf-control-popover,
    body.juf-books-page .juf-books-filter .juf-control-menu > .juf-control-popover {
        position: fixed !important;
        top: auto !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        width: auto !important;
        max-height: min(72vh,620px) !important;
        overflow: auto !important;
    }
}

/* Dark mode uses the same geometry and low-weight contrast. */
html[data-theme="dark"] body.authors-page .juf-author-directory-search,
html[data-theme="dark"] body.juf-page-books .juf-books-filter .juf-books-search,
html[data-theme="dark"] body.juf-books-page .juf-books-filter .juf-books-search,
html[data-theme="dark"] body.authors-page .juf-author-filter-more > summary,
html[data-theme="dark"] body.juf-page-books .juf-books-filter .juf-control-menu > summary,
html[data-theme="dark"] body.juf-books-page .juf-books-filter .juf-control-menu > summary {
    background: #23262B !important;
    border-color: #3A3F47 !important;
    color: #ECE8E1 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-search input,
html[data-theme="dark"] body.juf-page-books .juf-books-filter .juf-books-search input,
html[data-theme="dark"] body.juf-books-page .juf-books-filter .juf-books-search input {
    color: #ECE8E1 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-directory-search input::placeholder,
html[data-theme="dark"] body.juf-page-books .juf-books-filter .juf-books-search input::placeholder,
html[data-theme="dark"] body.juf-books-page .juf-books-filter .juf-books-search input::placeholder {
    color: #A09B94 !important;
}
html[data-theme="dark"] body.authors-page .juf-author-filter-more[open] > summary,
html[data-theme="dark"] body.juf-page-books .juf-books-filter .juf-control-menu[open] > summary,
html[data-theme="dark"] body.juf-books-page .juf-books-filter .juf-control-menu[open] > summary {
    background: #C9D4EC !important;
    border-color: #C9D4EC !important;
    color: #23262B !important;
}
html[data-theme="dark"] body :is(.juf-author-filter-more,.juf-control-menu) > summary .juf-control-count {
    border-color: #3A3F47 !important;
}


/* Build 259 — mobile rhythm correction.
   Restore the Books toolbar to the same content gutter as the hero,
   discovery rail and catalogue. Build 258 intentionally removed the wrapper
   chrome, but removing its container padding made the search row visibly wider
   than the rest of the page. */
body.juf-page-books .juf-library-filter-wrap,
body.juf-books-page .juf-library-filter-wrap {
    padding-inline: 0 !important;
    margin-top: 10px !important;
}

@media (max-width: 820px) {
    body.juf-page-books .juf-library-filter-wrap,
    body.juf-books-page .juf-library-filter-wrap {
        padding-inline: 14px !important;
        margin-top: 10px !important;
    }
}

@media (max-width: 620px) {
    body.juf-page-books .juf-library-filter-wrap,
    body.juf-books-page .juf-library-filter-wrap {
        padding-inline: 14px !important;
        margin-top: 9px !important;
    }
}

/* Build 260 — Books mobile editorial rhythm.
   The discovery rail, search/filter controls and first catalogue row are three
   separate reading zones. Give each zone deliberate breathing room instead of
   letting the covers visually attach to the toolbar. No extra labels, boxes or
   decorative rules are added; spacing alone carries the hierarchy. */
body.juf-page-books .juf-book-discovery + .juf-library-filter-wrap,
body.juf-books-page .juf-book-discovery + .juf-library-filter-wrap {
    margin-top: 24px !important;
}
body.juf-page-books .juf-books-results,
body.juf-books-page .juf-books-results {
    margin-top: 40px !important;
}

@media (max-width: 820px) {
    body.juf-page-books .juf-book-discovery + .juf-library-filter-wrap,
    body.juf-books-page .juf-book-discovery + .juf-library-filter-wrap {
        margin-top: 20px !important;
    }
    body.juf-page-books .juf-books-results,
    body.juf-books-page .juf-books-results {
        margin-top: 34px !important;
    }
}

@media (max-width: 620px) {
    body.juf-page-books .juf-book-discovery + .juf-library-filter-wrap,
    body.juf-books-page .juf-book-discovery + .juf-library-filter-wrap {
        margin-top: 18px !important;
    }
    body.juf-page-books .juf-books-results,
    body.juf-books-page .juf-books-results {
        margin-top: 32px !important;
    }
}

@media (max-width: 380px) {
    body.juf-page-books .juf-book-discovery + .juf-library-filter-wrap,
    body.juf-books-page .juf-book-discovery + .juf-library-filter-wrap {
        margin-top: 16px !important;
    }
    body.juf-page-books .juf-books-results,
    body.juf-books-page .juf-books-results {
        margin-top: 28px !important;
    }
}

/* Build 261 — Books mobile editorial composition.
   Build 260 added raw space, but on small screens the catalogue still felt
   compressed because the category rail, utility controls and covers had no
   visible editorial hand-off. Restore a restrained result heading on mobile,
   then distribute negative space around the three content zones. */
@media (max-width: 620px) {
    body.juf-page-books .juf-book-discovery,
    body.juf-books-page .juf-book-discovery {
        margin-top: 20px !important;
    }

    body.juf-page-books .juf-book-discovery-head,
    body.juf-books-page .juf-book-discovery-head {
        margin-bottom: 12px !important;
    }

    body.juf-page-books .juf-book-discovery-track.juf-library-categories,
    body.juf-books-page .juf-book-discovery-track.juf-library-categories {
        padding-bottom: 10px !important;
    }

    body.juf-page-books .juf-book-discovery + .juf-library-filter-wrap,
    body.juf-books-page .juf-book-discovery + .juf-library-filter-wrap {
        margin-top: 26px !important;
    }

    body.juf-page-books .juf-library-filter-wrap,
    body.juf-books-page .juf-library-filter-wrap {
        padding-inline: 14px !important;
    }

    /* A small result header creates the missing editorial transition between
       utility controls and the book shelf. It replaces arbitrary blank space. */
    body.juf-page-books .juf-books-results,
    body.juf-books-page .juf-books-results {
        margin-top: 30px !important;
        padding-inline: 14px !important;
    }

    body.juf-page-books .juf-catalog-heading,
    body.juf-books-page .juf-catalog-heading {
        display: flex !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        gap: 12px !important;
        margin: 0 0 20px !important;
        padding: 0 !important;
        border: 0 !important;
    }

    body.juf-page-books .juf-catalog-heading h2,
    body.juf-books-page .juf-catalog-heading h2 {
        margin: 0 !important;
        font-size: 22px !important;
        font-weight: 500 !important;
        line-height: 1.25 !important;
    }

    body.juf-page-books .juf-catalog-heading > p,
    body.juf-books-page .juf-catalog-heading > p {
        display: block !important;
        flex: 0 0 auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #5B6376 !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        line-height: 1.35 !important;
        white-space: nowrap !important;
    }

    body.juf-page-books .juf-book-catalog-grid,
    body.juf-books-page .juf-book-catalog-grid {
        row-gap: 32px !important;
    }
}

@media (max-width: 380px) {
    body.juf-page-books .juf-book-discovery + .juf-library-filter-wrap,
    body.juf-books-page .juf-book-discovery + .juf-library-filter-wrap {
        margin-top: 22px !important;
    }

    body.juf-page-books .juf-books-results,
    body.juf-books-page .juf-books-results {
        margin-top: 26px !important;
        padding-inline: 12px !important;
    }

    body.juf-page-books .juf-catalog-heading,
    body.juf-books-page .juf-catalog-heading {
        display: flex !important;
        margin-bottom: 18px !important;
    }

    body.juf-page-books .juf-catalog-heading h2,
    body.juf-books-page .juf-catalog-heading h2 {
        font-size: 20px !important;
    }

    body.juf-page-books .juf-catalog-heading > p,
    body.juf-books-page .juf-catalog-heading > p {
        display: block !important;
        font-size: 11px !important;
    }
}


/* ============================================================================
   Build 433 — Upgraded Interactive Filter System Across All Pages (`books.php`,
   `authors.php`, `audiobooks.php`, `premium.php` — Fixes `1000169489.jpg` &
   `1000169488.jpg`: prevents long Bengali option labels from overflowing button
   borders in 2-column dropdown grids, auto-spans long options (`is-wide-option`)
   with `grid-auto-flow: dense`, sizes dropdown trays to exact 4-row multiples so
   pills are never sliced in half, preserves compact multi-pill rows for inline
   segmented pills, and pins the sticky bottom `.juf-control-actions` bar so the
   apply button is always 100% visible)
   ============================================================================ */

/* 1. Warm Ivory-Cream Popover & Bottom-Sheet Surface + Drag Handle + Close Button */
html:not([data-theme="dark"]):not([data-theme="pdf"]) body :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields),
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.authors-page .juf-author-filter-more > .juf-author-filter-row,
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.premium-page .premium-filter-more > .premium-filter-fields,
html:not([data-theme="dark"]):not([data-theme="pdf"]) body.audiobook-page .audio-filter-more > .audio-filter-fields {
  background: #F6F5F2 !important;
  border: 1px solid #D9D6D0 !important;
  box-shadow: 0 22px 58px rgba(40, 46, 55, 0.18) !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields),
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list {
  scrollbar-width: thin !important;
  scrollbar-color: #E4E6EC transparent !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::-webkit-scrollbar,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::-webkit-scrollbar-track,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list::-webkit-scrollbar-track {
  background: transparent !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::-webkit-scrollbar-thumb,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-select-list::-webkit-scrollbar-thumb {
  background: #E4E6EC !important;
  border-radius: 999px !important;
}

.juf-control-popover-head {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 4px !important;
  padding-bottom: 9px !important;
  border-bottom: 1px solid #D9D6D0 !important;
}

.juf-control-popover-head strong {
  font: 700 17.5px/1.2 var(--font-heading-editorial, 'Kalpurush', serif) !important;
  color: #282E37 !important;
  margin-right: auto !important;
}

.juf-control-popover-head a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #3B4256 !important;
  font: 600 12px/1 var(--font-ui-system) !important;
  text-decoration: none !important;
}

.juf-control-popover-head .juf-filter-sheet-close {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font: 600 14px/1 var(--font-ui-system) !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.juf-control-popover-head .juf-filter-sheet-close:hover {
  background: #2C3243 !important;
  border-color: #2C3243 !important;
  color: #F6F5F2 !important;
}

/* 2. Crisp Editorial Section Labels & Grid Spanning */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) :is(.juf-control-field, label) {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) :is(.juf-control-field > span:not(.sr-only), label > span:not(.sr-only)),
.juf-control-sort-section > .juf-control-section-label {
  font: 700 12px/1.25 var(--font-ui-system) !important;
  color: #282E37 !important;
  letter-spacing: 0.01em !important;
}

.juf-control-grid .juf-control-field.is-pill-field,
.juf-control-grid .juf-control-field.is-dropdown-field,
.juf-author-filter-row > label.is-pill-field,
.juf-author-filter-row > label.is-dropdown-field,
.audio-filter-fields > .juf-control-field.is-pill-field,
.audio-filter-fields > .juf-control-field.is-dropdown-field {
  grid-column: 1 / -1 !important;
}

.juf-control-sort-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 5px !important;
  margin-top: 8px !important;
  padding-top: 9px !important;
  border-top: 1px solid #D9D6D0 !important;
}

.juf-control-sort-section > .juf-control-section-label {
  align-self: flex-start !important;
}

/* 3. Fix Centered Trigger Bug & Upgrade Multi-Option Dropdowns (`ঘরানা`, `বিভাগ`, `দেশ`, `কণ্ঠশিল্পী`) */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-trigger {
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 0 10px 0 13px !important;
  border-radius: 12px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  font: 600 13.5px/1.25 var(--font-ui-system) !important;
  text-align: left !important;
  box-shadow: none !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-trigger:hover,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-open .juf-select-trigger {
  background: #ECEAE6 !important;
  border-color: #2C3243 !important;
  color: #282E37 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-value {
  flex: 1 1 auto !important;
  text-align: left !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-chevron {
  width: 25px !important;
  height: 25px !important;
  flex: 0 0 25px !important;
  padding: 4.5px !important;
  border-radius: 50% !important;
  background: #E4E6EC !important;
  color: #282E37 !important;
  box-sizing: border-box !important;
}

/* 2-Column Tactile Chip Grid With Dense Packing & Auto Full-Width Spanning for Long Labels.
   Exact 4-row height (4 * 38px + 3 * 6px + 2 * 8px = 186px) prevents slicing the 5th row in half. */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select > .juf-select-list:not([hidden]) {
  position: relative !important;
  z-index: 1 !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 6px !important;
  padding: 8px !important;
  border-radius: 13px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  box-shadow: inset 0 1px 3px rgba(40, 46, 55, 0.05) !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: dense !important;
  gap: 6px !important;
  max-height: 186px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

/* 4. 1-Tap Inline Segmented Filter Pills (`.juf-select.is-inline-pills`) for <=6 Option Filters */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-inline-pills > .juf-select-trigger {
  display: none !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-inline-pills > .juf-select-list {
  position: static !important;
  z-index: 1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  max-height: none !important;
  overflow: visible !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-inline-pills.is-pills-count-3 > .juf-select-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

/* Shared Option Pill Styling — Wraps Safely, Never Spills Outside Borders */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option {
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 38px !important;
  height: auto !important;
  padding: 6px 11px !important;
  border-radius: 10px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  font: 600 13px/1.28 var(--font-ui-system) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  overflow: hidden !important;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select .juf-select-option {
  width: 100% !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select .juf-select-option.is-wide-option {
  grid-column: 1 / -1 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option:hover,
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option:focus-visible {
  background: #E4E6EC !important;
  border-color: #3346A8 !important;
  color: #282E37 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option[aria-selected="true"] {
  background: #3B4256 !important;
  border-color: #3B4256 !important;
  color: #F6F5F2 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(59, 66, 86, 0.14) !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option[aria-selected="true"]::before {
  content: "✓";
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

/* Unified Action Bar Across Books, Authors & Audiobooks */
:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-top: 6px !important;
  padding-top: 10px !important;
  border-top: 1px solid #D9D6D0 !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-apply, .juf-author-filter-apply) {
  width: auto !important;
  flex: 1 1 auto !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  background: #3B4256 !important;
  border: 1px solid #3B4256 !important;
  color: #F6F5F2 !important;
  font: 700 13.5px/1 var(--font-ui-system) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  cursor: pointer !important;
}

:is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-reset, .juf-author-clear-filter) {
  width: auto !important;
  flex: 0 0 auto !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #ECEAE6 !important;
  border: 1px solid #D9D6D0 !important;
  color: #282E37 !important;
  font: 600 13px/1 var(--font-ui-system) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  text-decoration: none !important;
}

/* 5. Mobile Bottom-Sheet Polish: Pinned Sticky Footer + Balanced Sheet Height */
@media (max-width: 760px) {
  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields),
  body.authors-page .juf-author-filter-more > .juf-author-filter-row,
  body.premium-page .premium-filter-more > .premium-filter-fields,
  body.audiobook-page .audio-filter-more > .audio-filter-fields,
  body.juf-page-books .juf-books-filter .juf-control-menu > .juf-control-popover,
  body.juf-books-page .juf-books-filter .juf-control-menu > .juf-control-popover {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    max-height: min(86dvh, 680px) !important;
    padding: 10px 15px 0 !important;
    border-radius: 22px !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields)::before {
    content: "" !important;
    display: block !important;
    width: 38px !important;
    height: 4px !important;
    margin: 0 auto 2px !important;
    border-radius: 999px !important;
    background: #E4E6EC !important;
    grid-column: 1 / -1 !important;
  }

  /* Sticky bottom action bar flush with sheet bottom so the apply button is never cut off */
  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    margin: 4px -15px 0 !important;
    padding: 10px 15px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: #F6F5F2 !important;
    border-top: 1px solid #D9D6D0 !important;
    box-shadow: 0 -8px 20px rgba(40, 46, 55, 0.06) !important;
  }

  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-apply, .juf-author-filter-apply) {
    width: auto !important;
    flex: 1 1 auto !important;
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-reset, .juf-author-clear-filter) {
    width: auto !important;
    flex: 0 0 auto !important;
    min-width: 96px !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* 6. Dark Mode Harmonization for Build 433 Filter Pills, Dropdowns & Sticky Footer */
html[data-theme="dark"] body :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) {
  background: #23262B !important;
  border-color: #3A3F47 !important;
}

html[data-theme="dark"] .juf-control-popover-head {
  border-bottom-color: #3A3F47 !important;
}

html[data-theme="dark"] .juf-control-popover-head strong {
  color: #ECE8E1 !important;
}

html[data-theme="dark"] .juf-control-popover-head a,
html[data-theme="dark"] .juf-control-popover-head .juf-filter-sheet-close {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-trigger,
html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select.is-dropdown-select > .juf-select-list:not([hidden]),
html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-chevron {
  background: #2C3037 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields, .juf-books-filter) .juf-select .juf-select-option[aria-selected="true"] {
  background: #C9D4EC !important;
  border-color: #C9D4EC !important;
  color: #23262B !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions {
  background: #23262B !important;
  border-top-color: #3A3F47 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-reset, .juf-author-clear-filter) {
  background: #2C3037 !important;
  border-color: #3A3F47 !important;
  color: #ECE8E1 !important;
}

html[data-theme="dark"] :is(.juf-control-popover, .juf-author-filter-row, .premium-filter-fields, .audio-filter-fields) .juf-control-actions :is(.juf-control-apply, .juf-author-filter-apply) {
  background: #C9D4EC !important;
  border-color: #C9D4EC !important;
  color: #23262B !important;
}

