/* ==========================================================================
   بنفسج — picture frames of the old bnfsj.net, and «معرض بنفسج»
   --------------------------------------------------------------------------
   Every image box on the site takes the SHAPE the old magazine gave that
   section — its thumbnails were cut to fixed sizes per block (/thumb/WxH/),
   read off bnfsj.net on 2026-09-27:

     hero slider ............ 1070×450      حضور امرأة · أسرة ...... 330×180
     سيدتي · ديكور ........... 320×180      فلسطينيات · فكر ........ 700×310
     قصتي · بنفسجيات · إنفو.. 320×330      سلاسل .................. 430×220
     مدونات (كبير/صغير) ..... 700×345 / 265×150   باختصار ............ 265×265
     قسم (غلاف/بطاقة) ....... 1120×500 / 328×180
     نرشح لك ................ 252×180      الأكثر قراءة ........... 86×70

   Loaded after main.css and pages.css on purpose: a frame here wins over the
   theme's own heights. The image always fills its frame (object-fit: cover)
   and the editor's focus point (inline object-position) still decides the
   crop. Square graphics (قصتي, إنفوجرافيك, باختصار) are never forced into a
   landscape box on the homepage.
   ========================================================================== */

:root {
    --bn-r-hero: 1070 / 450;
    --bn-r-card: 330 / 180;
    --bn-r-wide: 16 / 9;
    --bn-r-pano: 700 / 310;
    --bn-r-series: 430 / 220;
    --bn-r-tile: 320 / 330;
    --bn-r-square: 1 / 1;
    --bn-r-lead: 700 / 345;
    --bn-r-small: 265 / 150;
    --bn-r-cat-lead: 1120 / 500;
    --bn-r-cat-card: 328 / 180;
    --bn-r-related: 252 / 180;
    --bn-r-thumb: 86 / 70;
    --bn-r-reel: 9 / 16;
    --bn-r-album: 4 / 3;
}

/* One frame, any shape. */
.bn-frame {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--bg-section, #f5f0ed);
}

.bn-frame > img,
.bn-frame > video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bn-frame--tile { aspect-ratio: var(--bn-r-tile); }
.bn-frame--square { aspect-ratio: var(--bn-r-square); }
.bn-frame--wide { aspect-ratio: var(--bn-r-wide); }
.bn-frame--reel { aspect-ratio: var(--bn-r-reel); }
.bn-frame--album { aspect-ratio: var(--bn-r-album); }

/* ── hero slider: 1070×450 ─────────────────────────────────────────────── */
.hero-slider .hero-slide,
.hero-slide {
    aspect-ratio: var(--bn-r-hero);
    min-height: 0;
}

/* On a phone the old cut is too low to carry a headline over it, so the
   picture keeps its shape and the headline moves under it. */
@media (max-width: 600px) {
    .hero-slider .hero-slide,
    .hero-slide {
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        background: var(--bg-dark, #1a1229);
    }

    .hero-slide__media {
        position: relative;
        inset: auto;
        aspect-ratio: var(--bn-r-hero);
    }

    .hero-slide__overlay {
        display: none;
    }

    .hero-slide__content {
        position: static;
        padding: 12px 14px 30px;
    }
}

/* ── حضور امرأة (53): 330×180 ─────────────────────────────────────────── */
.wv-hero__media {
    flex: 0 0 auto;
    aspect-ratio: var(--bn-r-card);
    min-height: 0;
    max-height: none;
}

.wv-card__img {
    flex: 0 0 42%;
    align-self: flex-start;
    aspect-ratio: var(--bn-r-card);
    min-height: 0;
    height: auto;
}

@media (max-width: 760px) {
    .wv-hero__media,
    .wv-card__img {
        aspect-ratio: var(--bn-r-card);
        min-height: 0;
    }
}

/* ── شبكة + تبويبات (54) — «لكِ»: 320×180 ─────────────────────────────── */
.lt-card__img,
.lifestyle-tabs__grid .lt-card__img {
    aspect-ratio: var(--bn-r-wide);
    min-height: 0;
    height: auto;
}

/* ── فكر (55): 700×310 ────────────────────────────────────────────────── */
.longread-card__media {
    aspect-ratio: var(--bn-r-pano);
    height: auto;
    min-height: 0;
}

.longread-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── فلسطينيات (57): 700×310 ──────────────────────────────────────────── */
.palest__hero {
    aspect-ratio: var(--bn-r-pano);
    min-height: 0;
    align-self: start;
}

.palest__row-img {
    aspect-ratio: var(--bn-r-card);
    height: auto;
}

@media (max-width: 760px) {
    .palest__hero {
        min-height: 0;
    }
}

/* ── سلاسل (58): 430×220 ──────────────────────────────────────────────── */
.series-card-featured__cover {
    aspect-ratio: var(--bn-r-series);
    min-height: 0;
    height: auto;
}

.series-other__cover {
    width: 110px;
    height: auto;
    aspect-ratio: var(--bn-r-series);
}

@media (max-width: 760px) {
    .series-card-featured__cover {
        aspect-ratio: var(--bn-r-series);
        min-height: 0;
    }

    .series-other__cover {
        width: 96px;
        height: auto;
    }
}

/* ── صناديق التصنيف (63 · 65) — حضور امرأة 330×180، سيدتي/ديكور 320×180 ─ */
.spotlight-box--double .spotlight-card__media {
    aspect-ratio: var(--bn-r-card);
}

.spotlight-box--single .spotlight-card__media {
    aspect-ratio: var(--bn-r-wide);
}

/* ── كارد كبير + 4 (66) — مدونات القديمة: 700×345 + 265×150 ─────────── */
.featquad__big .spotlight-card__media {
    aspect-ratio: var(--bn-r-lead);
}

.featquad__grid .spotlight-card .spotlight-card__media,
.featquad__grid .spotlight-card:not(:first-child) .spotlight-card__media {
    aspect-ratio: var(--bn-r-small);
}

/* ── شبكة أفقية (64): 330×180 ─────────────────────────────────────────── */
.dark-card__media {
    height: auto;
    aspect-ratio: var(--bn-r-card);
    align-self: flex-start;
}

@media (max-width: 760px) {
    .dark-card__media {
        width: 132px;
        height: auto;
    }
}

/* ── صفحة القسم / الوسم / البحث / الكاتب: 1120×500 + 328×180 ──────────── */
.cover-hero {
    aspect-ratio: var(--bn-r-cat-lead);
    min-height: 0;
}

@media (max-width: 600px) {
    .cover-hero {
        aspect-ratio: auto;
        min-height: clamp(220px, 58vw, 300px);
    }
}

.post-card__media {
    aspect-ratio: var(--bn-r-cat-card);
}

.post-card--featured .post-card__media {
    aspect-ratio: var(--bn-r-cat-lead);
    min-height: 0;
}

/* ==========================================================================
   إبداعات بنفسج (59) — one tile per sub-section, 320×330
   ========================================================================== */
.bn-tiles__grid {
    display: grid;
    grid-template-columns: repeat(var(--bn-tiles, 3), minmax(0, 1fr));
    gap: var(--space-6, 24px);
}

.bn-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-subtle, #efeae4);
}

.bn-tile__head {
    margin: 0 0 2px;
    font: 700 var(--text-lg, 18px)/1.3 var(--devlo-font, var(--font-heading));
    color: var(--secondary, #6b5b8a);
}

.bn-tile__head a {
    color: inherit;
    text-decoration: none;
}

.bn-tile__head a:hover,
.bn-tile__head a:focus-visible {
    color: var(--primary-700, #d46a9a);
}

/* «ظاهرة كاملة» (owner, 2026-10-06): the whole piece is shown, never
   cropped. The picture is contained; its blurred copy fills the margins. */
.bn-frame--whole > img {
    position: relative;
    z-index: 1;
    object-fit: contain;
}

.bn-frame--whole > .bn-frame__backdrop {
    position: absolute;
    inset: -12px;
    z-index: 0;
    width: calc(100% + 24px);
    height: calc(100% + 24px);
    object-fit: cover;
    filter: blur(14px) saturate(1.1);
    opacity: 0.55;
}

.bn-tile__media > img:not(.bn-frame__backdrop) {
    transition: transform 0.5s var(--ease-out, ease);
}

.bn-tile__media:hover > img:not(.bn-frame__backdrop) {
    transform: scale(1.03);
}

.bn-tile__title {
    font: 600 var(--text-sm, 14px)/1.6 var(--devlo-font, var(--font-body));
    color: var(--text-primary, #2d2a33);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bn-tile__title:hover,
.bn-tile__title:focus-visible {
    color: var(--primary-700, #d46a9a);
}

@media (max-width: 900px) {
    .bn-tiles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .bn-tiles__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   بطاقات مربّعة (56) — «باختصار»: 265×265
   ========================================================================== */
.bn-squares__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-5, 20px);
}

.bn-square {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary, #2d2a33);
}

.bn-square__media img {
    transition: transform 0.5s var(--ease-out, ease);
}

.bn-square:hover .bn-square__media img,
.bn-square:focus-visible .bn-square__media img {
    transform: scale(1.03);
}

.bn-square__title {
    font: 600 var(--text-sm, 14px)/1.6 var(--devlo-font, var(--font-body));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bn-square:hover .bn-square__title {
    color: var(--primary-700, #d46a9a);
}

@media (max-width: 900px) {
    .bn-squares__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   معرض بنفسج (1118) — صور · فيديو · ريلز
   ========================================================================== */
.bnm-band .sec-head {
    flex-wrap: wrap;
    gap: 14px;
}

.bnm-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-listen, #f3f0f7);
    border: 1px solid var(--border-listen, rgba(107, 91, 138, 0.14));
    border-radius: 999px;
}

.bnm-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--secondary-700, #4a3d6b);
    font: 600 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.bnm-tab:hover {
    background: rgba(107, 91, 138, 0.08);
}

.bnm-tab.is-active {
    background: var(--secondary, #6b5b8a);
    color: #fff;
}

.bnm-tab:focus-visible {
    outline: 2px solid var(--primary, #f285b5);
    outline-offset: 2px;
}

.bnm-panel[hidden] {
    display: none;
}

.bnm-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-5, 20px);
}

.bnm-album,
.bnm-video {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    text-align: start;
    text-decoration: none;
    color: var(--text-primary, #2d2a33);
    font: inherit;
    cursor: pointer;
}

.bnm-album img,
.bnm-video img,
.bnm-reel img {
    transition: transform 0.5s var(--ease-out, ease);
}

.bnm-album:hover img,
.bnm-video:hover img,
.bnm-reel:hover img {
    transform: scale(1.04);
}

.bnm-album:focus-visible,
.bnm-video:focus-visible,
.bnm-reel:focus-visible {
    outline: 2px solid var(--primary, #f285b5);
    outline-offset: 3px;
}

.bnm-card__title {
    font: 600 var(--text-md, 16px)/1.5 var(--devlo-font, var(--font-body));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bnm-album:hover .bnm-card__title,
.bnm-video:hover .bnm-card__title {
    color: var(--primary-700, #d46a9a);
}

.bnm-card__meta {
    font-size: var(--text-xs, 12px);
    color: var(--text-muted, #6f6878);
}

.bnm-album__count,
.bnm-video__len {
    position: absolute;
    bottom: 10px;
    inset-inline-start: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(26, 18, 41, 0.72);
    color: #fff;
    font: 600 var(--text-xs, 12px)/1.4 var(--devlo-font, var(--font-body));
}

.bnm-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(242, 133, 181, 0.92);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 10px 26px -10px rgba(26, 18, 41, 0.6);
    transition: transform 0.25s ease;
}

.bnm-play--sm {
    width: 44px;
    height: 44px;
    font-size: 14px;
}

.bnm-video:hover .bnm-play,
.bnm-reel:hover .bnm-play {
    transform: scale(1.08);
}

/* reels: a rail of 9:16 posters that scrolls sideways on narrow screens */
.bnm-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 5 * 16px) / 6);
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}

.bnm-reel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    text-align: start;
    font: inherit;
    color: var(--text-primary, #2d2a33);
    cursor: pointer;
    scroll-snap-align: start;
}

.bnm-reel__media {
    border-radius: 14px;
}

.bnm-reel__title {
    font: 600 var(--text-sm, 14px)/1.5 var(--devlo-font, var(--font-body));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bnm-panel__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--secondary, #6b5b8a);
    font: 600 var(--text-sm, 14px)/1.4 var(--devlo-font, var(--font-body));
    text-decoration: none;
}

.bnm-panel__all:hover {
    color: var(--primary-700, #d46a9a);
}

@media (max-width: 1000px) {
    .bnm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bnm-rail {
        grid-auto-columns: 38%;
    }
}

@media (max-width: 560px) {
    .bnm-grid {
        gap: 14px;
    }

    .bnm-rail {
        grid-auto-columns: 46%;
    }

    .bnm-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .bnm-tab {
        flex: 1;
        justify-content: center;
        padding: 0 10px;
    }
}

/* ── the viewer ───────────────────────────────────────────────────────── */
.bnm-locked,
.bnm-locked body {
    overflow: hidden;
}

.bnm-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    justify-items: center;
    padding: 12px 16px 20px;
    background: rgba(12, 8, 20, 0.94);
    color: #fff;
}

.bnm-viewer[hidden] {
    display: none;
}

.bnm-viewer__bar {
    width: min(100%, 1100px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
}

.bnm-viewer__count {
    font: 600 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
    opacity: 0.8;
}

.bnm-viewer__btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.bnm-viewer__btn:hover,
.bnm-viewer__btn:focus-visible {
    background: rgba(242, 133, 181, 0.85);
    outline: none;
}

.bnm-viewer__stage {
    width: min(100%, 1100px, calc((100vh - 170px) * 16 / 9));
    aspect-ratio: 16 / 9;
    background: #000;
}

.bnm-viewer.is-reel .bnm-viewer__stage {
    width: min(100%, 440px, calc((100vh - 170px) * 9 / 16));
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
}

.bnm-viewer__media {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

video.bnm-viewer__media {
    object-fit: contain;
}

.bnm-viewer__title {
    max-width: min(100%, 760px);
    margin: 12px 0 0;
    font: 600 var(--text-md, 16px)/1.6 var(--devlo-font, var(--font-body));
    text-align: center;
}

.bnm-viewer__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.bnm-viewer__nav--prev {
    right: 16px;
}

.bnm-viewer__nav--next {
    left: 16px;
}

.bnm-viewer__nav[hidden] {
    display: none;
}

@media (max-width: 600px) {
    .bnm-viewer {
        padding: 8px 0 14px;
    }

    .bnm-viewer.is-reel .bnm-viewer__stage {
        border-radius: 0;
    }

    .bnm-viewer__nav {
        top: auto;
        bottom: 14px;
        transform: none;
    }

    .bnm-viewer__title {
        padding: 0 64px;
        font-size: var(--text-sm, 14px);
    }
}

/* An album in the viewer: the picture whole, at its own shape, and a strip
   of thumbnails under it (owner, 2026-10-06: albums open in place). */
.bnm-viewer.is-album .bnm-viewer__stage {
    width: min(100%, 1100px);
    height: calc(100vh - 250px);
    aspect-ratio: auto;
    background: transparent;
}

img.bnm-viewer__media {
    object-fit: contain;
    background: transparent;
}

.bnm-viewer__thumbs {
    display: flex;
    gap: 8px;
    max-width: min(100%, 900px);
    margin-top: 12px;
    padding: 2px 16px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.bnm-viewer__thumbs[hidden] {
    display: none;
}

.bnm-viewer__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.bnm-viewer__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bnm-viewer__thumb:hover,
.bnm-viewer__thumb:focus-visible {
    opacity: 0.9;
    outline: none;
}

.bnm-viewer__thumb.is-active {
    opacity: 1;
    border-color: var(--primary, #e98bb7);
}

@media (max-width: 600px) {
    .bnm-viewer.is-album .bnm-viewer__stage {
        height: calc(100vh - 230px);
    }
}

/* ── the media archive (/all_videos) on its dark stage ────────────────── */
.bnm-tabs--dark {
    margin: 4px 0 26px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.bnm-tabs--dark .bnm-tab {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.bnm-tabs--dark .bnm-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.bnm-tabs--dark .bnm-tab.is-active {
    background: var(--primary, #f285b5);
    color: #fff;
}

.bnm-archive .bnm-card__title,
.bnm-archive .bnm-reel__title,
.bnm-archive .bnm-album,
.bnm-archive .bnm-video,
.bnm-archive .bnm-reel {
    color: #fff;
}

.bnm-archive .bnm-card__meta {
    color: rgba(255, 255, 255, 0.62);
}

.bnm-archive__grid {
    margin-top: 8px;
}

.bnm-reels-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.bnm-archive__lead {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    width: 100%;
    margin: 0 0 34px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    text-align: start;
    font: inherit;
    cursor: pointer;
}

.bnm-archive__lead:focus-visible {
    outline: 2px solid var(--primary, #f285b5);
    outline-offset: 4px;
}

.bnm-archive__lead-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bnm-archive__lead-kicker {
    color: var(--primary-300, #f5a6c8);
    font: 600 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
}

.bnm-archive__lead-title {
    font: 700 clamp(22px, 2.4vw, 30px)/1.35 var(--devlo-font, var(--font-heading));
}

@media (max-width: 1000px) {
    .bnm-reels-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bnm-archive__lead {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 560px) {
    .bnm-reels-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* ── one album (/photos/{id}) ─────────────────────────────────────────── */
.bn-album {
    padding: var(--space-8, 32px) 0 var(--space-12, 48px);
    background: var(--bg-main, #faf8f6);
}

.bn-crumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    font-size: var(--text-sm, 14px);
    color: var(--text-muted, #6f6878);
}

.bn-crumbs a {
    color: var(--secondary, #6b5b8a);
    text-decoration: none;
}

.bn-crumbs a:hover {
    color: var(--primary-700, #d46a9a);
}

.bn-album__head {
    max-width: 820px;
    margin: 0 auto 26px;
    text-align: center;
}

.bn-album__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-700, #d46a9a);
    font: 600 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
}

.bn-album__title {
    margin: 12px 0 8px;
    font: 700 clamp(24px, 3vw, 34px)/1.35 var(--devlo-font, var(--font-heading));
    color: var(--text-primary, #2d2a33);
}

.bn-album__date {
    color: var(--text-muted, #6f6878);
    font-size: var(--text-sm, 14px);
}

.bn-album__desc {
    margin: 14px 0 0;
    font: 400 var(--text-md, 16px)/1.9 var(--devlo-font, var(--font-body));
    color: var(--text-secondary, #5c5568);
}

.bn-album__thread {
    list-style: none;
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    gap: 26px;
}

.bn-album__figure {
    margin: 0;
}

.bn-album__open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: var(--bg-section, #f5f0ed);
    cursor: zoom-in;
}

.bn-album__open img {
    display: block;
    width: 100%;
    height: auto;
}

.bn-album__num {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(26, 18, 41, 0.7);
    color: #fff;
    font: 600 var(--text-xs, 12px)/1.4 var(--devlo-font, var(--font-body));
}

.bn-album__caption {
    margin-top: 10px;
    font: 400 var(--text-sm, 14px)/1.8 var(--devlo-font, var(--font-body));
    color: var(--text-secondary, #5c5568);
}

.bn-album__share {
    max-width: 820px;
    margin: 30px auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light, #ece7e2);
}

.bn-album__share-label {
    font: 600 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
    color: var(--text-secondary, #5c5568);
    margin-inline-end: 6px;
}

.bn-album__share-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-medium, #ddd6cf);
    border-radius: 50%;
    background: var(--bg-surface, #fff);
    color: var(--secondary, #6b5b8a);
    text-decoration: none;
    cursor: pointer;
}

.bn-album__share-btn:hover,
.bn-album__share-btn.is-copied {
    background: var(--secondary, #6b5b8a);
    color: #fff;
}

.bn-album__stage {
    width: min(100%, 1200px);
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
}

.bn-album__big {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
}

/* ==========================================================================
   The article page (BNFSJ_V1) — the structure of the old bnfsj.net
   ========================================================================== */
.bn-post {
    padding: 22px 0 56px;
    background: var(--bg-main, #faf8f6);
}

.bn-post__crumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    margin-bottom: 22px;
    padding: 10px 18px;
    background: var(--secondary, #6b5b8a);
    color: rgba(255, 255, 255, 0.7);
    font: 600 var(--text-sm, 14px)/1.4 var(--devlo-font, var(--font-body));
}

.bn-post__crumbs a {
    color: #fff;
    text-decoration: none;
}

.bn-post__crumbs a:hover,
.bn-post__crumbs a:focus-visible {
    color: var(--primary-200, #f7bcd6);
}

/* the head card */
.bn-post__head {
    margin-bottom: 24px;
    padding: 26px 26px 22px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-subtle, #efeae4);
    text-align: center;
}

.bn-post__title {
    margin: 0;
    font: 700 clamp(24px, 2.8vw, 34px)/1.45 var(--devlo-font, var(--font-heading));
    color: var(--text-primary, #2d2a33);
}

.bn-post__date {
    display: block;
    margin: 8px 0 18px;
    color: var(--text-muted, #6f6878);
    font-size: var(--text-sm, 14px);
}

.bn-post__cover {
    position: relative;
    margin: 0;
    background: var(--bg-section, #f5f0ed);
}

/* the cover keeps its own proportions — never cropped */
.bn-post__cover img,
.bn-post__cover video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    margin-inline: auto;
}

.bn-post__badge {
    position: absolute;
    top: 14px;
    inset-inline-start: 0;
    padding: 6px 16px;
    background: var(--primary, #f285b5);
    color: #fff;
    font: 700 var(--text-sm, 14px)/1.3 var(--devlo-font, var(--font-body));
}

.bn-post__caption {
    margin-top: 10px;
    color: var(--text-secondary, #5c5568);
    font-size: var(--text-sm, 14px);
    line-height: 1.7;
}

/* a square or upright cover: the picture beside the headline and summary */
.bn-post__head--square {
    display: grid;
    /* RTL: the headline on the right, the picture on the left — as bnfsj.net set it */
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 32px;
    align-items: center;
    text-align: start;
}

.bn-post__square {
    position: relative;
    margin: 0;
    background: var(--bg-section, #f5f0ed);
}

.bn-post__square img,
.bn-post__square video {
    display: block;
    width: 100%;
    height: auto;
}

.bn-post__square-text .bn-post__date {
    margin-bottom: 14px;
}

.bn-post__summary {
    margin: 0;
    font: 400 var(--text-md, 16px)/2 var(--devlo-font, var(--font-body));
    color: var(--text-secondary, #5c5568);
}

/* two columns: the text and the side column (RTL: the text on the right) */
.bn-post__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.bn-post__card,
.bn-widget {
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-subtle, #efeae4);
}

.bn-post__card {
    padding: 26px 30px 24px;
}

.bn-post__card + .bn-post__card {
    margin-top: 24px;
}

.bn-post__short {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.bn-post__short-label {
    color: var(--text-muted, #6f6878);
    font-size: var(--text-xs, 12px);
}

.bn-post__short-url {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-medium, #ddd6cf);
    border-radius: 999px;
    background: var(--bg-muted, #f9f6f3);
    color: var(--text-secondary, #5c5568);
    font: 500 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
    cursor: pointer;
}

.bn-post__short-url:hover,
.bn-post__short-url:focus-visible {
    border-color: var(--secondary, #6b5b8a);
    color: var(--secondary, #6b5b8a);
}

.bn-post__body {
    font-size: 17px;
    line-height: 2;
}

.bn-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light, #ece7e2);
}

.bn-post__tag {
    padding: 6px 14px;
    border: 1px solid var(--border-medium, #ddd6cf);
    border-radius: 999px;
    color: var(--text-secondary, #5c5568);
    font: 600 var(--text-sm, 14px)/1.2 var(--devlo-font, var(--font-body));
    text-decoration: none;
}

.bn-post__tag:hover,
.bn-post__tag:focus-visible {
    border-color: var(--primary, #f285b5);
    background: var(--primary-050, #fdf0f5);
    color: var(--primary-700, #d46a9a);
}

.bn-post__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.bn-post__share-label {
    margin-inline-end: 6px;
    color: var(--text-secondary, #5c5568);
    font: 600 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
}

.bn-post__share-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-medium, #ddd6cf);
    border-radius: 50%;
    background: var(--bg-surface, #fff);
    color: var(--secondary, #6b5b8a);
    text-decoration: none;
    cursor: pointer;
}

.bn-post__share-btn:hover,
.bn-post__share-btn:focus-visible {
    background: var(--secondary, #6b5b8a);
    color: #fff;
}

/* «نرشح لك»: 252×180 */
.bn-recs__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.bn-rec__media {
    display: block;
    aspect-ratio: var(--bn-r-related);
    overflow: hidden;
    background: var(--bg-section, #f5f0ed);
}

.bn-rec__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out, ease);
}

.bn-rec:hover .bn-rec__media img {
    transform: scale(1.03);
}

.bn-rec__author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 4px;
    color: var(--secondary, #6b5b8a);
    font: 600 var(--text-xs, 12px)/1.3 var(--devlo-font, var(--font-body));
    text-decoration: none;
}

.bn-rec__author img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.bn-rec__title {
    margin: 0;
    font: 700 var(--text-md, 16px)/1.55 var(--devlo-font, var(--font-heading));
}

.bn-rec__title a {
    color: var(--text-primary, #2d2a33);
    text-decoration: none;
}

.bn-rec__title a:hover {
    color: var(--primary-700, #d46a9a);
}

/* the side column */
.bn-post__aside {
    display: grid;
    gap: 20px;
}

.bn-widget {
    padding: 18px 18px 20px;
}

.bn-widget__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light, #ece7e2);
    color: var(--secondary, #6b5b8a);
    font: 700 var(--text-lg, 18px)/1.3 var(--devlo-font, var(--font-heading));
}

.bn-widget__title i {
    color: var(--primary, #f285b5);
}

.bn-widget__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bn-widget__social a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bg-listen, #f3f0f7);
    color: var(--secondary, #6b5b8a);
    text-decoration: none;
}

.bn-widget__social a:hover,
.bn-widget__social a:focus-visible {
    background: var(--secondary, #6b5b8a);
    color: #fff;
}

.bn-writer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.bn-writer .bn-widget__title {
    align-self: stretch;
}

.bn-writer__photo {
    width: 128px;
    height: 128px;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #f285b5), var(--secondary, #6b5b8a));
}

.bn-writer__photo img {
    display: block;
    width: 100%;
    height: 100%;
    border: 3px solid #fff;
    border-radius: 50%;
    object-fit: cover;
}

.bn-writer__name {
    margin-top: 12px;
    color: var(--secondary-700, #4a3d6b);
    font: 700 var(--text-lg, 18px)/1.4 var(--devlo-font, var(--font-heading));
    text-decoration: none;
}

.bn-writer__role {
    margin-top: 2px;
    color: var(--text-muted, #6f6878);
    font-size: var(--text-sm, 14px);
}

.bn-writer__all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: stretch;
    min-height: 44px;
    margin-top: 16px;
    background: var(--primary, #f285b5);
    color: #fff;
    font: 700 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
    text-decoration: none;
}

.bn-writer__all:hover,
.bn-writer__all:focus-visible {
    background: var(--primary-700, #d46a9a);
}

.bn-most {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.bn-most__item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: var(--text-primary, #2d2a33);
    text-decoration: none;
}

.bn-most__thumb {
    aspect-ratio: var(--bn-r-thumb);
    overflow: hidden;
    background: var(--bg-section, #f5f0ed);
}

.bn-most__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bn-most__title {
    font: 600 var(--text-sm, 14px)/1.6 var(--devlo-font, var(--font-body));
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bn-most__item:hover .bn-most__title {
    color: var(--primary-700, #d46a9a);
}

.bn-widget__search {
    display: grid;
    gap: 10px;
}

.bn-widget__search input {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-medium, #ddd6cf);
    background: var(--bg-muted, #f9f6f3);
    font: inherit;
}

.bn-widget__search input:focus {
    outline: 2px solid var(--primary, #f285b5);
    outline-offset: 0;
}

.bn-widget__search button {
    justify-self: start;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    background: var(--secondary, #6b5b8a);
    color: #fff;
    font: 700 var(--text-sm, 14px)/1 var(--devlo-font, var(--font-body));
    cursor: pointer;
}

.bn-side-media {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-primary, #2d2a33);
    text-align: start;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.bn-side-media__title {
    font: 600 var(--text-sm, 14px)/1.6 var(--devlo-font, var(--font-body));
}

.bn-side-media:hover .bn-side-media__title {
    color: var(--primary-700, #d46a9a);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .bn-post__grid {
        grid-template-columns: 1fr;
    }

    .bn-post__aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .bn-post__head,
    .bn-post__card {
        padding: 18px 16px;
    }

    .bn-post__head--square {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .bn-recs__grid {
        grid-template-columns: 1fr;
    }

    .bn-post__aside {
        grid-template-columns: 1fr;
    }

    .bn-post__short {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .bn-post__head--square .bn-post__square {
        order: -1;
    }
}

/* ==========================================================================
   ذاكرة · مدونات (66) — no empty space (owner, 2026-10-06)
   The big card used to end half-way down the 2×2 beside it. On a wide
   screen the four now sit as rows (picture beside title) in one column
   that is exactly as tall as the big card: the rows spread to its height,
   and if they run taller the big card's picture grows to meet them. Both
   columns always end on one line.
   ========================================================================== */
@media (min-width: 901px) {
    .featquad {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: stretch;
    }

    .featquad__big {
        display: flex;
        flex-direction: column;
    }

    .featquad__big .spotlight-card__media {
        flex: 1 0 auto;
        min-height: 0;
    }

    .featquad__grid {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 14px;
    }

    .featquad__grid .spotlight-card,
    .featquad__grid .spotlight-card:not(:first-child) {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        flex: 1 0 auto;
    }

    .featquad__grid .spotlight-card .spotlight-card__media,
    .featquad__grid .spotlight-card:not(:first-child) .spotlight-card__media {
        flex: 0 0 40%;
        aspect-ratio: auto;
        min-height: 112px;
    }

    .featquad__grid .spotlight-card__body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        padding: 10px 16px;
    }

    .featquad__grid .spotlight-card__author {
        margin-bottom: 6px;
    }

    .featquad__grid .spotlight-card__title {
        font-size: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ==========================================================================
   سفراء بنفسج (62) — every face fits its circle (owner, 2026-10-06)
   A portrait of any shape is cut to the circle, never squeezed or left
   with a strip of background; the crop leans up so the face stays in.
   ========================================================================== */
.amb-showcase-card__avatar {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    background: var(--primary-050, #fdf0f6);
}

.amb-showcase-card__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 25%;
}

/* ==========================================================================
   مجتمع (61, «أقلام») — the writer's card, redrawn (owner, 2026-10-06)
   The newest piece leads with its picture, the avatar sits on the
   picture's edge, the other pieces follow as a quiet list and «عرض جميع
   المقالات» closes every card on one line. Names are never default
   blue/underlined links.
   ========================================================================== */
.blogs-pro .author-card--lead {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: var(--bg-surface, #fff);
    border-radius: 0;
}

.author-card--lead .author-card__cover {
    aspect-ratio: var(--bn-r-card);
}

.author-card--lead .author-card__cover img {
    transition: transform 0.5s var(--ease-out, ease);
}

.author-card--lead:hover .author-card__cover img {
    transform: scale(1.04);
}

.author-card--lead .author-card__header {
    margin: -30px 18px 0;
    padding: 0 0 12px;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.author-card--lead .author-card__avatar {
    display: block;
    width: 60px;
    height: 60px;
    border: 3px solid var(--bg-surface, #fff);
    background: var(--primary-050, #fdf0f6);
    box-shadow: 0 6px 16px -8px rgba(26, 18, 41, 0.45);
}

.author-card--lead .author-card__avatar img {
    display: block;
    object-position: 50% 25%;
}

.author-card--lead .author-card__info {
    padding-bottom: 2px;
}

.author-card--lead .author-card__name a {
    color: var(--text-primary, #2d2a33);
    text-decoration: none;
}

.author-card--lead .author-card__name a:hover,
.author-card--lead .author-card__name a:focus-visible {
    color: var(--primary-700, #d46a9a);
}

.author-card__lead {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 18px;
    padding-bottom: 14px;
    text-decoration: none;
}

.author-card__lead-title {
    font: 800 var(--text-md, 17px)/1.55 var(--devlo-font, var(--font-heading));
    color: var(--text-primary, #2d2a33);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.author-card__lead:hover .author-card__lead-title {
    color: var(--primary-700, #d46a9a);
}

.author-card--lead .author-card__posts {
    flex: 1;
    gap: 0;
    margin: 0 18px;
    border-top: 1px solid var(--border-subtle, #efeae4);
}

.author-card--lead .author-card__post {
    padding: 10px 0;
    background: none;
    border: 0;
    border-bottom: 1px dashed var(--border-subtle, #efeae4);
    border-radius: 0;
}

.author-card--lead .author-card__posts li:last-child .author-card__post {
    border-bottom: 0;
}

.author-card--lead .author-card__post:hover {
    background: none;
}

.author-card--lead .author-card__post-title {
    position: relative;
    padding-inline-start: 14px;
    font-weight: 600;
}

.author-card--lead .author-card__post-title::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #e98bb7);
}

/* With no list under the lead, the gap goes above the closing link. */
.author-card__lead:nth-last-child(2) {
    flex: 1;
}

.author-card--lead .author-card__view-all {
    margin: 0 18px;
    padding: 12px 0 16px;
    justify-content: flex-start;
    border-top: 1px solid var(--border-subtle, #efeae4);
}

/* ==========================================================================
   سلاسل (58) — one even shelf of series cards (owner, 2026-10-06)
   Replaces the featured · episodes · others columns, which left the middle
   column half-empty. Every card is the same: the cover (430×220 like the
   old site), the count on it, the title, the newest article at the foot.
   ========================================================================== */
.series-shelf {
    display: grid;
    grid-template-columns: repeat(var(--series-cols, 3), minmax(0, 1fr));
    gap: var(--space-6, 24px);
}

.series-book {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-subtle, #efeae4);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.series-book:hover {
    box-shadow: 0 16px 40px -22px rgba(26, 18, 41, 0.4);
    transform: translateY(-2px);
}

.series-book__cover {
    aspect-ratio: var(--bn-r-series);
}

.series-book__cover img {
    transition: transform 0.5s var(--ease-out, ease);
}

.series-book:hover .series-book__cover img {
    transform: scale(1.04);
}

/* A shade at the cover's foot so the count on it always reads. */
.series-book__cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(to top, rgba(20, 14, 32, 0.7), rgba(20, 14, 32, 0));
    pointer-events: none;
}

.series-book__count,
.series-book__badge {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 700 var(--text-xs, 12px)/1 var(--devlo-font, var(--font-body));
    padding: 6px 10px;
    border-radius: 999px;
}

.series-book__count {
    inset-inline-start: 12px;
    bottom: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.series-book__badge {
    inset-inline-start: 12px;
    top: 12px;
    color: #fff;
    background: var(--primary, #e98bb7);
}

.series-book__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.series-book__title {
    margin: 0;
    font: 800 var(--text-lg, 19px)/1.45 var(--devlo-font, var(--font-heading));
}

.series-book__title a {
    color: var(--text-primary, #2d2a33);
    text-decoration: none;
}

.series-book__title a:hover {
    color: var(--primary-700, #d46a9a);
}

.series-book__desc {
    margin: 0;
    font-size: var(--text-sm, 14px);
    line-height: 1.7;
    color: var(--text-muted, #6f6878);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-book__latest {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--border-subtle, #efeae4);
    text-decoration: none;
}

.series-book__latest-label {
    font-size: var(--text-xs, 12px);
    font-weight: 700;
    color: var(--secondary, #6b5b8a);
}

.series-book__latest-title {
    font: 600 var(--text-sm, 14px)/1.6 var(--devlo-font, var(--font-body));
    color: var(--text-primary, #2d2a33);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.series-book__latest:hover .series-book__latest-title {
    color: var(--primary-700, #d46a9a);
}

@media (max-width: 900px) {
    .series-shelf {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    /* A phone swipes the shelf instead of stacking six tall cards. */
    .series-shelf {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-inline: calc(-1 * var(--container-pad, 16px));
        padding-inline: var(--container-pad, 16px);
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .series-shelf::-webkit-scrollbar {
        display: none;
    }

    .series-book {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }
}

/* ==========================================================================
   ريلز بنفسج (1121) — the reels band and its full-screen player
   (owner, 2026-10-06). The strip: 9:16 cards, the title on the picture.
   The player: the same arrangement as the fleet's other reels players —
   one reel per screen, snap-scrolled, every control in one column beside
   the reel (bn-reels.js measures the reel into --bnr-w).
   ========================================================================== */
.bnr-band__tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bnr-band__arrow {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-subtle, #efeae4);
    border-radius: 50%;
    background: var(--bg-surface, #fff);
    color: var(--text-primary, #2d2a33);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bnr-band__arrow:hover,
.bnr-band__arrow:focus-visible {
    background: var(--primary, #e98bb7);
    border-color: var(--primary, #e98bb7);
    color: #fff;
    outline: none;
}

.bnr-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 4 * 16px) / 5);
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.bnr-strip::-webkit-scrollbar {
    display: none;
}

.bnr-card {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: start;
    cursor: pointer;
    scroll-snap-align: start;
}

.bnr-card__media {
    border-radius: 14px;
}

.bnr-card__media > img {
    transition: transform 0.5s var(--ease-out, ease);
}

.bnr-card:hover .bnr-card__media > img,
.bnr-card:focus-visible .bnr-card__media > img {
    transform: scale(1.05);
}

.bnr-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 14, 32, 0.85) 0%, rgba(20, 14, 32, 0.25) 45%, rgba(20, 14, 32, 0) 70%);
}

.bnr-card__play {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.bnr-card:hover .bnr-card__play {
    background: var(--primary, #e98bb7);
}

.bnr-card__title {
    position: absolute;
    inset: auto 12px 12px;
    color: #fff;
    font: 700 var(--text-sm, 14px)/1.55 var(--devlo-font, var(--font-heading));
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.bnr-card:focus-visible {
    outline: none;
}

.bnr-card:focus-visible .bnr-card__media {
    box-shadow: 0 0 0 3px var(--primary, #e98bb7);
}

@media (max-width: 900px) {
    .bnr-strip {
        grid-auto-columns: 32%;
    }
}

@media (max-width: 560px) {
    .bnr-strip {
        grid-auto-columns: 46%;
        gap: 12px;
    }

    .bnr-band__arrow {
        display: none;
    }
}

/* ── the player ───────────────────────────────────────────────────────── */
.bnr-viewer {
    --bnr-w: min(100vw, calc((100vh - 24px) * 9 / 16));
    position: fixed;
    inset: 0;
    z-index: 2001;
    background: #0c0814;
    color: #fff;
}

.bnr-viewer[hidden] {
    display: none;
}

.bnr-viewer__track {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.bnr-viewer__track::-webkit-scrollbar {
    display: none;
}

.bnr-slide {
    height: 100vh;
    height: 100dvh;
    display: grid;
    place-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.bnr-slide__frame {
    position: relative;
    width: var(--bnr-w);
    aspect-ratio: 9 / 16;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

.bnr-slide__poster,
.bnr-slide__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

video.bnr-slide__media {
    object-fit: contain;
    background: #000;
}

.bnr-slide__poster {
    filter: brightness(0.7);
}

.bnr-slide__mount:empty {
    display: none;
}

.bnr-slide__title {
    position: absolute;
    inset: auto 0 0;
    margin: 0;
    padding: 60px 18px 18px;
    font: 700 var(--text-md, 16px)/1.6 var(--devlo-font, var(--font-heading));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* A hosted clip draws its own title and controls: ours steps aside. */
.bnr-slide.is-playing .bnr-slide__title {
    opacity: 0;
}

.bnr-viewer__rail {
    position: fixed;
    top: 50%;
    left: calc(50% - var(--bnr-w) / 2 - 64px);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.bnr-viewer.is-narrow .bnr-viewer__rail {
    left: 10px;
}

.bnr-viewer__nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.bnr-viewer__btn {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.12s ease;
}

.bnr-viewer__btn:hover:not(:disabled),
.bnr-viewer__btn:focus-visible {
    background: var(--primary, #e98bb7);
    outline: none;
}

.bnr-viewer__btn:active:not(:disabled) {
    transform: scale(0.94);
}

.bnr-viewer__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.bnr-viewer__counter {
    font: 700 var(--text-xs, 12px)/1 var(--devlo-font, var(--font-body));
    opacity: 0.85;
}

@media (max-width: 600px) {
    .bnr-slide__frame {
        border-radius: 0;
        max-height: 100dvh;
    }

    .bnr-viewer__btn {
        width: 42px;
        height: 42px;
        background: rgba(0, 0, 0, 0.4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bnr-card__media > img,
    .bnr-viewer__btn {
        transition: none;
    }
}

/* ==========================================================================
   فكر (55) on a phone or tablet — the card's padding drops to --space-6
   there (main.css), but the picture kept bleeding by --space-10/--space-8,
   so it overshot the card by 8px on every side and was clipped unevenly.
   The bleed now matches the padding it cancels.
   ========================================================================== */
@media (max-width: 768px) {
    .longread-card__media {
        margin: calc(var(--space-6) * -1) calc(var(--space-6) * -1) var(--space-5);
    }
}

/* ==========================================================================
   Responsive review (owner, 2026-10-06: «راجع الرسبونسف … والتركيز على الصور»)
   ========================================================================== */

/* The hero headline inherited its link's underline on phones. */
.hero-slide,
.hero-slide:hover,
.hero-slide:focus-visible {
    text-decoration: none;
}

@media (max-width: 640px) {
    /* لكِ (54): main.css turned .lt-card into a row, but the flex box is
       .lt-card__link inside it, so the picture sat at an intrinsic ~200px
       in the middle of a 358px card with white on both sides. Now: the
       first story leads with a full-width picture, the rest are rows with
       a picture that fills its own frame. */
    .lifestyle-tabs__grid .lt-card {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .lifestyle-tabs__grid .lt-card .lt-card__img {
        flex: none;
        width: 100%;
        aspect-ratio: var(--bn-r-wide);
        border-radius: 0;
        align-self: stretch;
    }

    .lifestyle-tabs__grid .lt-card:not(:first-child) .lt-card__link {
        flex-direction: row;
        align-items: stretch;
    }

    .lifestyle-tabs__grid .lt-card:not(:first-child) .lt-card__img {
        flex: 0 0 38%;
        width: 38%;
        aspect-ratio: 4 / 3;
    }

    .lifestyle-tabs__grid .lt-card:not(:first-child) .lt-card__cat {
        display: none;
    }

    .lifestyle-tabs__grid .lt-card:not(:first-child) .lt-card__body {
        min-width: 0;
        padding: 10px 12px;
        justify-content: center;
    }

    .lifestyle-tabs__grid .lt-card:not(:first-child) .lt-card__title {
        font-size: var(--text-sm, 15px);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .lifestyle-tabs__grid .lt-card:not(:first-child) .lt-card__meta {
        display: none;
    }

    /* إبداعات (59): one tile per row on a phone, so the piece takes its own
       shape — whole, at full width, no blurred bars above and below. */
    .bn-frame--whole.bn-frame--tile {
        aspect-ratio: auto;
    }

    .bn-frame--whole > img:not(.bn-frame__backdrop) {
        height: auto;
        max-height: 75vh;
        object-fit: contain;
    }

    .bn-frame--whole > .bn-frame__backdrop {
        display: none;
    }
}

/* إبداعات (59) on a tablet: one row of all its tiles (two columns left the
   third tile alone under an empty space); a phone stacks them. */
@media (min-width: 641px) and (max-width: 1024px) {
    .bn-tiles__grid {
        grid-template-columns: repeat(var(--bn-tiles, 3), minmax(0, 1fr));
        gap: 14px;
    }

    .bn-tile {
        padding: 10px;
    }
}

@media (max-width: 640px) {
    .bn-tiles__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* فكر (55) between a tablet and a laptop: two columns, as on a desktop. One
   column there stretched a 700px picture to ~970px and softened it. */
@media (min-width: 769px) and (max-width: 1024px) {
    .longread__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
