/* ═══════════════════════════════════════════════════════════════
   sibmac-home — Site Navigation (v3.21)  الگوی appstorrent
   سایدبار ثابت (≥1200 پهن با برچسب · 768–1199 ریل آیکونی) با لوگو، بخش‌ها
   + زیرمنوی دسته‌ها، علاقه‌مندی‌ها و لینک‌های پایین · هدر غیرچسبنده با جستجوی
   MAH · نوار پایینی موبایل (خانه · دسته‌ها · جستجو · منو) · دکمهٔ بالا.
   توکن‌ها = سیستم طراحی fx صفحهٔ دانلود.
   ═══════════════════════════════════════════════════════════════ */
:root {
    --sn-side-w: 236px;
    --sn-top-h: 72px;
    --sn-surface: var(--fx-surface, #f4f6fa);
    --sn-surface-hover: var(--fx-surface-hover, #edf1f7);
    --sn-elevated: var(--fx-surface-elevated, var(--color-surface, #ffffff));
    --sn-border: var(--fx-surface-border, rgba(15, 23, 42, .06));
    --sn-control: var(--fx-control-bg, #e5e8f0);
    --sn-control-hover: var(--fx-control-bg-hover, #d8dee9);
    --sn-ink: var(--color-text, #0f172a);
    --sn-muted: var(--color-text-muted, #5c687a);
    --sn-brand: var(--color-brand, #1a66d2);
    --sn-brand-light: rgba(var(--color-brand-rgb, 26, 102, 210), .10);
    --sn-tip-bg: #111827;
    --sn-shadow: 0 12px 32px rgba(15, 23, 42, .10);
}
html.dark_mod, body.dark_mod, html[data-theme="dark"], body.dark-mode, html.dark-mode {
    --sn-surface: var(--fx-surface, #1b2028);
    --sn-surface-hover: var(--fx-surface-hover, #242b36);
    --sn-elevated: var(--fx-surface-elevated, #202630);
    --sn-border: var(--fx-surface-border, rgba(255, 255, 255, .08));
    --sn-control: var(--fx-control-bg, #2a313d);
    --sn-control-hover: var(--fx-control-bg-hover, #343c4a);
    --sn-ink: var(--color-text, #f1f5f9);
    --sn-muted: var(--color-text-muted, #94a3b8);
    --sn-brand: var(--color-brand, #5ba4ff);
    --sn-brand-light: rgba(var(--color-brand-rgb, 91, 164, 255), .16);
    --sn-tip-bg: #0b0f17;
    --sn-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}

/* ───────── هدر/نوار/منوی قالب: خاموش ───────── */
html body.sibmac-has-rail .apple-header,
html body.sibmac-has-rail .mobile-menu,
html body.sibmac-has-rail .apple-bottom-nav,
html.apple-bottom-nav-ready body.sibmac-has-rail .apple-bottom-nav.is-ready,
html body.sibmac-has-rail .apple-bottom-nav-space { display: none !important; }
html body.sibmac-has-rail.sibmac-has-rail,
html body.sibmac-has-rail.sibmac-has-rail.home,
html body.sibmac-has-rail.sibmac-has-rail.admin-bar { padding-top: 0 !important; }
body.sibmac-has-rail.sibmac-no-external-hero main.primary-content { padding-top: 0 !important; }
body.sibmac-has-rail { padding-inline-start: var(--sn-side-w); }

/* آیکون‌های ماژول: در برابر قواعد سراسری svg قالب مقاوم */
:is(.sibmac-side, .sibmac-top, .sibmac-tabs, .sibmac-sheet, .sibmac-totop, .sibmac-favpage) svg[viewBox] { display: block; fill: none !important; stroke: currentColor !important; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── سایدبار ───────── */
.sibmac-side {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 0px);
    bottom: 0;
    inset-inline-start: 0;
    width: var(--sn-side-w);
    z-index: 890;
    display: flex;
    flex-direction: column;
    padding: 0 12px 12px;
    box-sizing: border-box;
    background: transparent;
    direction: rtl;
    overflow: visible;
}
.sibmac-side__logo { display: flex; align-items: center; justify-content: center; height: var(--sn-top-h); padding: 0 8px; flex: none; }
.sibmac-side__logo:empty { display: none; }
.sibmac-side__logo .apple-logo, .sibmac-side__logo .apple-logo:is(:hover, :focus, :visited) { display: inline-flex; align-items: center; gap: 10px; padding: 0; margin: 0; height: auto; text-decoration: none; box-shadow: none; color: var(--sn-ink); }
.sibmac-side__logo .apple-logo img.apple-logo-img { display: block; max-height: 40px !important; max-width: 170px !important; width: auto !important; height: auto !important; object-fit: contain; }
.sibmac-side__logo .apple-logo-text { font-size: 22px; font-weight: 800; color: var(--sn-brand); }
.sibmac-side__nav { flex: none; }
.sibmac-side__list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sibmac-side__li { position: relative; display: flex; align-items: center; border-radius: 14px; }
.sibmac-side__item,
.sibmac-side__item:is(:hover, :focus, :active, :visited) {
    flex: 1 1 auto; min-width: 0;
    display: flex; align-items: center; gap: 12px;
    height: 48px; padding: 0 10px;
    border-radius: 14px; color: var(--sn-ink); font-size: 15px; font-weight: 600;
    text-decoration: none; box-shadow: none !important; transform: none !important;
    transition: background-color .16s ease, color .16s ease;
}
.sibmac-side__ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--sn-border); color: var(--sn-muted); background: transparent; }
.sibmac-side__ico svg { width: 20px; height: 20px; }
.sibmac-side__lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* پس‌زمینهٔ هاور/فعال روی کل ردیف (شامل فلش) */
.sibmac-side__li { transition: background-color .16s ease; }
@media (hover: hover) {
    .sibmac-side__li:hover { background: var(--sn-surface); }
}
.sibmac-side__li.is-active { background: var(--sn-brand-light); }
.sibmac-side__li.is-active > .sibmac-side__item { background: transparent; color: var(--sn-brand); }
.sibmac-side__li.is-active > .sibmac-side__more { color: var(--sn-brand); }
.sibmac-side__li.is-active .sibmac-side__ico { border-color: transparent; background: var(--sn-brand); color: #fff; }
.sibmac-side__item:focus-visible { outline: 2px solid var(--sn-brand); outline-offset: 2px; }
.sibmac-side__more, .sibmac-side__more:is(:hover, :focus, :active) {
    flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-inline-end: 4px;
    border: 0; border-radius: 10px; background: transparent; color: var(--sn-muted); cursor: pointer; box-shadow: none;
}
.sibmac-side__more svg, .sibmac-side__sub-more svg { display: none !important; }
.sibmac-side__more::before, .sibmac-side__sub-more::before { content: ""; display: block; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(2px) rotate(45deg); transition: transform .16s ease; } /* ‹ رو به چپ */
html[dir="ltr"] .sibmac-side__more::before, html[dir="ltr"] .sibmac-side__sub-more::before { transform: translateX(-2px) rotate(-135deg); } /* › */
.sibmac-side__li.is-open > .sibmac-side__more::before,
html[dir="ltr"] .sibmac-side__li.is-open > .sibmac-side__more::before { transform: translateY(-2px) rotate(-45deg); } /* ˅ باز */
.sibmac-side__more:focus, .sibmac-side__more:focus-visible { outline: none; box-shadow: none !important; }
.sibmac-side__more:is(:hover, :focus, :active), .sibmac-side__li:hover > .sibmac-side__more { background: transparent !important; color: var(--sn-ink); box-shadow: none !important; outline: none; }
/* زیرمنو (flyout) کنار سایدبار */
.sibmac-side__fly {
    position: absolute; top: 0; inset-inline-start: calc(100% + 2px); margin: 0;
    min-width: 230px; max-width: 290px;
    padding: 8px; border-radius: 16px; background: var(--sn-surface); border: 1px solid var(--sn-border); box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    opacity: 0; visibility: hidden; transform: translateX(6px); transition: opacity .16s ease, transform .16s ease, visibility .16s;
    z-index: 5;
}
html[dir="ltr"] .sibmac-side__fly { transform: translateX(-6px); }
.sibmac-side__li::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 100%; width: 4px; }
.sibmac-side__li.is-open { background: var(--sn-surface); }
.sibmac-side__li.is-active.is-open { background: var(--sn-brand-light); }
.sibmac-side__li.is-open > .sibmac-side__fly { opacity: 1; visibility: visible; transform: none; }
.sibmac-side__li.has-children:focus-within > .sibmac-side__fly { opacity: 1; visibility: visible; transform: none; }
.sibmac-side__fly-list { list-style: none; margin: 0; padding: 0; max-height: min(72vh, 600px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sibmac-side__fly-list a, .sibmac-side__fly-list a:is(:hover, :focus, :visited) { display: block; padding: 10px 12px; border-radius: 10px; color: var(--sn-ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: none; }
@media (hover: hover) { .sibmac-side__fly-li:hover { background: var(--sn-elevated); } .sibmac-side__fly-li:hover > a { background: transparent; } }
.sibmac-side__fly-li { position: static; display: flex; align-items: center; border-radius: 10px; transition: background-color .16s ease; } /* زیرپنل نسبت به خودِ پنل جای‌گذاری می‌شود تا از لیست اسکرول‌شونده بیرون بیفتد */
.sibmac-side__fly-li > a { flex: 1 1 auto; min-width: 0; }
.sibmac-side__sub-more, .sibmac-side__sub-more:is(:hover, :focus, :active) { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--sn-muted); cursor: pointer; }
.sibmac-side__sub-more::before { width: 7px; height: 7px; transform: translateY(-2px) rotate(-45deg) !important; } /* ˅ پیش‌فرض */
.sibmac-side__fly-li.is-open > .sibmac-side__sub-more::before { transform: translateX(2px) rotate(45deg) !important; } /* ‹ هنگام هاور/باز */
html[dir="ltr"] .sibmac-side__fly-li.is-open > .sibmac-side__sub-more::before { transform: translateX(-2px) rotate(-135deg) !important; }
.sibmac-side__sub-more:is(:hover, :focus, :focus-visible, :active), .sibmac-side__fly-li:hover > .sibmac-side__sub-more, .sibmac-side__fly-li.is-open > .sibmac-side__sub-more { background: transparent !important; outline: none; box-shadow: none !important; transform: none; }
.sibmac-side__sub {
    list-style: none; margin: 0; padding: 8px; position: absolute; top: -8px; inset-inline-start: calc(100% + 4px);
    min-width: 200px; max-width: 260px; border-radius: 16px; background: var(--sn-surface); border: 1px solid var(--sn-border); box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    display: none; z-index: 6;
}
.sibmac-side__fly-li.is-open > .sibmac-side__sub { display: block; }
/* پل نامرئی روی فاصلهٔ بین پنل اصلی و زیرپنل (پدینگ ۸ + فاصلهٔ ۴) تا هاور از دست نرود */
.sibmac-side__sub::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-end: -14px; width: 14px; }
.sibmac-side__sub a, .sibmac-side__sub a:is(:hover, :focus, :visited) { display: block; padding: 10px 12px; border-radius: 10px; color: var(--sn-ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: none; }
@media (hover: hover) { .sibmac-side__sub a:hover { background: var(--sn-elevated); } }
.sibmac-side__fly-li.is-open { background: var(--sn-elevated); }
.sibmac-side__fly-li.is-open > a { background: transparent; }
.sibmac-side__fly-li.is-open > .sibmac-side__sub-more, .sibmac-side__fly-li:hover > .sibmac-side__sub-more { color: var(--sn-ink); }
.sibmac-side__fly { overflow: visible; }
/* علاقه‌مندی‌ها */
.sibmac-side__favs { margin-top: 18px; padding: 0 4px; }
.sibmac-side__favs[hidden] { display: none !important; }
.sibmac-side__favs-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 4px; }
.sibmac-side__favs-ttl { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--sn-muted); }
.sibmac-side__favs-all, .sibmac-side__favs-all:is(:hover, :focus, :active, :visited) { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--sn-control); color: var(--sn-ink); cursor: pointer; box-shadow: none; text-decoration: none; }
.sibmac-side__favs-all svg { width: 16px; height: 16px; transform: scaleX(-1); }
html[dir="ltr"] .sibmac-side__favs-all svg { transform: none; }
@media (hover: hover) { .sibmac-side__favs-all:hover { background: var(--sn-control-hover); } }
.sibmac-side__favs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sibmac-side__fav, .sibmac-side__fav:is(:hover, :focus, :visited) { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 6px; border-radius: 12px; color: var(--sn-muted); font-size: 13.5px; font-weight: 600; text-decoration: none; box-shadow: none !important; }
@media (hover: hover) { .sibmac-side__fav:hover { background: var(--sn-surface); color: var(--sn-ink); } }
.sibmac-side__fav-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: var(--sn-surface); }
.sibmac-side__fav-ico--ph { display: grid; place-items: center; color: var(--sn-muted); }
.sibmac-side__fav-ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* پایین سایدبار */
.sibmac-side__foot { margin-top: auto; padding: 16px 8px 4px; font-size: 12px; color: var(--sn-muted); line-height: 1.8; }
.sibmac-side__foot:empty, .sibmac-side__copy { display: none; }
.sibmac-side__foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.sibmac-side__foot-list a, .sibmac-side__foot-list a:is(:hover, :focus, :visited) { color: var(--sn-muted); text-decoration: none; }
.sibmac-side__foot-list a:hover { color: var(--sn-ink); }
.sibmac-side__copy { margin: 2px 0 0; }

/* لوگو: فقط یک نسخه (روشن/تیره) */
:is(.sibmac-side__logo, .sibmac-top__logo) .apple-logo > .apple-logo-dark,
:is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) :is(.sibmac-side__logo, .sibmac-top__logo) .apple-logo > .apple-logo-light,
body.dark-mode :is(.sibmac-side__logo, .sibmac-top__logo) .apple-logo > .apple-logo-light { display: none !important; }
:is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) :is(.sibmac-side__logo, .sibmac-top__logo) .apple-logo > .apple-logo-dark,
body.dark-mode :is(.sibmac-side__logo, .sibmac-top__logo) .apple-logo > .apple-logo-dark { display: block !important; }

/* ───────── هدر (در جریان صفحه) ───────── */
.sibmac-top {
    position: relative; z-index: 900;
    display: flex; align-items: center; gap: 14px;
    min-height: var(--sn-top-h); padding: 14px 24px 12px 20px; box-sizing: border-box;
    background: transparent;
    direction: rtl;
}
.sibmac-top__logo { display: none; }
.sibmac-top__search { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-start; }
.sibmac-top__search:empty { display: none; }
.sibmac-top__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex: none; }
.sibmac-top__actions .dark-mode, .sibmac-top__actions .apple-account-button, .sibmac-top__actions .apple-nav-link {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; min-width: 40px; height: 40px; padding: 0; border-radius: 50%; aspect-ratio: 1;
    color: var(--sn-ink); text-decoration: none; box-shadow: none;
}
.sibmac-top__actions button.apple-nav-link.dark-mode { border: 0; background: transparent; cursor: pointer; }
.sibmac-top__actions .dark-mode .apple-svg-icon { width: 22px !important; height: 22px !important; }
@media (hover: hover) { .sibmac-top__actions .dark-mode:hover, .sibmac-top__actions .apple-account-button:hover { background: var(--sn-surface); } }
.sibmac-top__bell, .sibmac-top__bell:is(:hover, :focus, :visited) { display: inline-flex !important; align-items: center; justify-content: center; flex: none; width: 40px !important; min-width: 40px; height: 40px !important; padding: 0 !important; border-radius: 50% !important; aspect-ratio: 1; overflow: visible; color: var(--sn-ink); text-decoration: none; box-shadow: none !important; outline: none; background: transparent; position: relative; }
.sibmac-top__bell > svg, .sibmac-top__bell .nsd-notification-icon, .sibmac-top__bell .apple-svg-icon { width: 22px !important; height: 22px !important; }
.sibmac-top__bell .nsd-notification-toggle, .sibmac-top__bell button { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; width: 40px !important; min-width: 40px; height: 40px !important; border-radius: 50% !important; display: inline-flex; align-items: center; justify-content: center; color: inherit; cursor: pointer; }
/* هاور فقط روی یک لایه و کاملاً دایره‌ای */
@media (hover: hover) { .sibmac-top__bell:hover { background: var(--sn-surface); } .sibmac-top__bell .nsd-notification-toggle:hover { background: transparent !important; } }
.sibmac-top__bell:focus-visible, .sibmac-top__bell .nsd-notification-toggle:focus-visible { outline: 2px solid var(--sn-brand); outline-offset: 2px; }
.sibmac-top__bell .nsd-notification-popover { inset-inline-end: 0; inset-inline-start: auto; }
.sibmac-top__actions .user-dropdown-wrapper { position: relative; display: inline-flex; align-items: center; height: 40px; }
.sibmac-top__actions .apple-account-avatar, .sibmac-top__actions .apple-account-avatar img { width: 34px !important; height: 34px !important; min-width: 34px; max-width: 34px; border-radius: 50% !important; aspect-ratio: 1; flex: none; box-sizing: border-box; }
.sibmac-top__actions .apple-account-avatar { display: inline-flex !important; overflow: hidden; padding: 0 !important; margin: 0 !important; }
.sibmac-top__actions .apple-account-avatar img { object-fit: cover; display: block; }
.sibmac-top__actions .apple-account-button.is-logged-in:hover .apple-account-avatar, .sibmac-top__actions .apple-account-button.is-logged-in:focus-visible .apple-account-avatar, .sibmac-top__actions .user-dropdown-wrapper.is-open .apple-account-avatar { box-shadow: 0 0 0 2px var(--sn-brand) !important; transform: none !important; }
/* پنل MAH، همیشه‌باز، به شکل کادر طرح */
:is(.sibmac-top, .sibmac-sheet--search) .mah-header-search, :is(.sibmac-top, .sibmac-sheet--search) .mah-header-search.mah-theme-light, :is(.sibmac-top, .sibmac-sheet--search) .mah-header-search.mah-theme-dark {
    position: relative; width: 100%; max-width: 560px; max-height: none !important; opacity: 1 !important; overflow: visible !important;
    margin: 0; background: transparent !important; border: 0 !important; box-shadow: none !important; transition: none;
}
:is(.sibmac-top, .sibmac-sheet--search) .mah-header-search-inner { max-width: none; padding: 0; }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box, :is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box:focus-within {
    display: flex !important; flex-wrap: nowrap !important; align-items: center; gap: 8px; height: 44px; min-height: 0; max-height: 44px; padding: 0 12px; overflow: hidden;
    border-radius: 14px; border: 1px solid var(--sn-border); background: var(--sn-surface); box-shadow: none;
}
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box { position: relative; }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box > * { flex: none; margin: 0; }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box > :is(svg, i, .mah-search-icon, [class*="icon"]):not(button):not(input) { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--sn-muted); pointer-events: none; }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box > .mah-search-input, :is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box > :is(label, div, span):has(.mah-search-input) { flex: 1 1 auto; min-width: 0; }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box > :is(p, small, .mah-search-hint, .mah-search-footer) { display: none !important; }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box:focus-within { border-color: var(--sn-brand); background: var(--sn-elevated); }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-input { width: 100%; height: 42px; min-height: 0; margin: 0; padding: 0 12px 0 0; padding-inline-start: 40px; padding-inline-end: 12px; border: 0; outline: none; box-shadow: none; font-size: 14px; line-height: 42px; background: transparent; color: var(--sn-ink); }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-input::placeholder { color: var(--sn-muted); }
:is(.sibmac-top, .sibmac-sheet--search) .mah-search-results, :is(.sibmac-top, .sibmac-sheet--search) .mah-search-history { z-index: 1101; }

/* ───────── دکمهٔ رفتن به بالا ───────── */
.sibmac-totop, .sibmac-totop:is(:hover, :focus, :active) {
    position: fixed; inset-inline-end: 24px; bottom: 24px; z-index: 950;
    width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%;
    background: var(--sn-control); color: var(--sn-ink); cursor: pointer; box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
    opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, background-color .16s ease;
}
.sibmac-totop svg { width: 22px; height: 22px; }
.sibmac-totop.is-visible { opacity: 1; transform: none; }
.sibmac-totop[hidden] { display: none !important; }
@media (hover: hover) { .sibmac-totop:hover { background: var(--sn-control-hover); } }

/* ───────── تبلت: ریل آیکونی ───────── */
@media (max-width: 1199px) {
    :root { --sn-side-w: 76px; }
    .sibmac-side { padding: 0 10px 12px; align-items: center; }
    .sibmac-side__logo { justify-content: center; padding: 0; width: 100%; }
    .sibmac-side__logo .apple-logo img.apple-logo-img { max-width: 44px !important; max-height: 44px !important; }
    .sibmac-side__list { width: 100%; align-items: center; }
    .sibmac-side__li { width: 48px; justify-content: center; }
    .sibmac-side__item, .sibmac-side__item:is(:hover, :focus, :active, :visited) { width: 48px; padding: 0; justify-content: center; gap: 0; }
    .sibmac-side__lbl, .sibmac-side__more { display: none; }
    .sibmac-side__li.has-children > .sibmac-side__item::after { content: ""; position: absolute; bottom: 6px; inset-inline-start: 50%; width: 4px; height: 4px; margin-inline-start: -2px; border-radius: 50%; background: currentColor; opacity: .45; }
    .sibmac-side__fly { top: 0; }
    .sibmac-side__favs { width: 100%; padding: 0; }
    .sibmac-side__favs-head { justify-content: center; padding: 0 0 6px; }
    .sibmac-side__favs-ttl { display: none; }
    .sibmac-side__favs-list { align-items: center; }
    .sibmac-side__fav, .sibmac-side__fav:is(:hover, :focus, :visited) { width: 48px; height: 48px; padding: 0; justify-content: center; }
    .sibmac-side__fav-ttl { display: none; }
    .sibmac-side__foot { display: none; }
    .sibmac-top { padding-inline-start: 16px; }
}

/* ───────── موبایل ───────── */
@media (max-width: 767px) {
    :root { --sn-top-h: 56px; }
    .sibmac-side { display: none; }
    body.sibmac-has-rail { padding-inline-start: 0; }
    body.sibmac-has-bottom-tabs { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    .sibmac-top { gap: 10px; padding: 8px 12px; }
    .sibmac-top__logo { display: grid; place-items: center; flex: none; }
    .sibmac-top__logo:empty { display: none; }
    .sibmac-top__logo .apple-logo { display: inline-flex; align-items: center; padding: 0; margin: 0; }
    .sibmac-top__logo .apple-logo img.apple-logo-img { display: block; max-height: 32px !important; max-width: 120px !important; width: auto !important; height: auto !important; }
    :is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box, :is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-box:focus-within { height: 42px; max-height: 42px; }
    :is(.sibmac-top, .sibmac-sheet--search) .mah-search-wrap-header .mah-search-input { font-size: 16px; height: 40px; line-height: 40px; }
    .sibmac-top__actions .user-dropdown-wrapper { display: none; } /* حساب در «منو» */
    .sibmac-top__search, .sibmac-top__bell { display: none !important; } /* جستجو و اعلان‌ها در موبایل: نوار پایین / منو */
    .sibmac-top__actions .dark-mode { display: none; }           /* تم در «منو» */
    .sibmac-totop, .sibmac-totop:is(:hover, :focus, :focus-visible, :active) { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px; width: 46px; height: 46px; } /* هنگام لمس/فوکوس هم همین اندازه و جایگاه (پرش قبلی به‌خاطر قاعدهٔ پایهٔ :active) */

    .sibmac-tabs {
        position: fixed; inset-inline: 0; bottom: 0; z-index: 940;
        display: grid; grid-template-columns: repeat(4, 1fr);
        height: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--sn-elevated); border-top: 1px solid var(--sn-border); box-shadow: 0 -8px 24px rgba(15, 23, 42, .05); direction: rtl;
    }
}
@media (min-width: 768px) { .sibmac-tabs { display: none !important; } }
.sibmac-tabs__tab, .sibmac-tabs__tab:is(:hover, :focus, :active, :visited) {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: var(--sn-muted);
    font: inherit; font-size: 11.5px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
    box-shadow: none !important; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
.sibmac-tabs__ico { display: inline-flex; }
.sibmac-tabs__ico svg { width: 26px; height: 26px; }
.sibmac-tabs__tab.is-on, .sibmac-tabs__tab[aria-current="page"], .sibmac-tabs__tab[aria-expanded="true"] { color: var(--sn-brand); }
.sibmac-tabs__tab:is(:focus, :focus-visible, :active), .sibmac-sheet__close:is(:hover, :focus, :focus-visible, :active) { outline: none !important; box-shadow: none !important; }
.sibmac-tabs__tab.is-on .sibmac-tabs__ico svg, .sibmac-tabs__tab[aria-expanded="true"] .sibmac-tabs__ico svg { stroke-width: 2.3; }

/* ───────── Sheetهای موبایل ───────── */
.sibmac-sheet-overlay { position: fixed; inset: 0; z-index: 9400; background: rgba(17, 24, 39, .42); opacity: 0; transition: opacity .2s ease; }
.sibmac-sheet-overlay.is-open { opacity: 1; }
.sibmac-sheet-overlay[hidden] { display: none !important; }
.sibmac-sheet {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 9410; max-height: 88vh;
    display: flex; flex-direction: column; background: var(--sn-elevated); color: var(--sn-ink);
    border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(15, 23, 42, .18);
    transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); direction: rtl;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sibmac-sheet.is-open { transform: none; }
.sibmac-sheet[hidden] { display: none !important; }
.sibmac-sheet__grab { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--sn-border); flex: none; }
.sibmac-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 6px; flex: none; }
.sibmac-sheet__ttl { font-size: 16px; font-weight: 800; }
.sibmac-sheet__close, .sibmac-favs__rm, .sibmac-favpage__rm,
:is(.sibmac-sheet__close, .sibmac-favs__rm, .sibmac-favpage__rm):is(:hover, :focus, :focus-visible, :active) {
    display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0;
    border: 1px solid var(--sn-border); border-radius: 50%; background: var(--sn-elevated); color: var(--sn-muted);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06) !important; cursor: pointer; outline: none; transform: none !important; -webkit-tap-highlight-color: transparent;
    transition: background-color .16s ease, color .16s ease;
}
.sibmac-sheet__close { width: 36px; height: 36px; }
.sibmac-favs__rm, .sibmac-favpage__rm { width: 32px; height: 32px; }
:is(.sibmac-sheet__close, .sibmac-favs__rm, .sibmac-favpage__rm) svg, :is(.sibmac-sheet__close, .sibmac-favs__rm, .sibmac-favpage__rm) span { display: block; width: 15px !important; height: 15px !important; min-width: 0; stroke-width: 2.2; pointer-events: none; }
:is(.sibmac-sheet__close, .sibmac-favs__rm, .sibmac-favpage__rm) span svg { width: 15px !important; height: 15px !important; }
@media (hover: hover) {
    :is(.sibmac-favs__rm, .sibmac-favpage__rm):hover { background: #fde8e8; color: #dc2626; border-color: transparent; }
    .sibmac-sheet__close:hover { background: var(--sn-surface); color: var(--sn-ink); }
}
:is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) :is(.sibmac-favs__rm, .sibmac-favpage__rm):hover, body.dark-mode :is(.sibmac-favs__rm, .sibmac-favpage__rm):hover { background: rgba(248, 113, 113, .18); color: #f87171; }
.sibmac-sheet__body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 14px 18px; }
/* دسته‌ها */
.sibmac-sheet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sibmac-sheet__item, .sibmac-sheet__item:is(:hover, :focus, :active, :visited) {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 16px;
    background: var(--sn-surface); color: var(--sn-ink); font-size: 13px; font-weight: 700; text-decoration: none; text-align: center; box-shadow: none !important;
}
.sibmac-sheet__item svg { width: 26px; height: 26px; color: var(--sn-brand); }
.sibmac-sheet__item.is-active { background: var(--sn-brand-light); color: var(--sn-brand); }
.sibmac-sheet__sec { font-size: 12px; font-weight: 700; color: var(--sn-muted); margin: 10px 4px 8px; }
.sibmac-sheet__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.sibmac-sheet__cat, .sibmac-sheet__cat:is(:hover, :focus, :active, :visited) { padding: 8px 13px; border-radius: 999px; background: var(--sn-surface); color: var(--sn-ink); font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: none !important; }
/* منو (پروفایل + لیست‌ها) */
.sibmac-sheet--menu .sibmac-sheet__body { padding: 0 12px 16px; }
.sibmac-menu__profile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 18px; text-align: center; }
.sibmac-menu__avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--sn-surface); border: 0; box-shadow: none; }
.sibmac-menu__avatar--ph { display: grid; place-items: center; color: var(--sn-muted); }
.sibmac-menu__avatar--ph svg { width: 40px; height: 40px; }
.sibmac-menu__name { font-size: 18px; font-weight: 800; margin-top: 6px; }
.sibmac-menu__email { font-size: 13px; color: var(--sn-muted); direction: ltr; }
.sibmac-menu__group { list-style: none; margin: 0 0 12px; padding: 4px; border-radius: 20px; background: var(--sn-surface); border: 1px solid var(--sn-border); }
.sibmac-menu__row, .sibmac-menu__row:is(:hover, :focus, :active, :visited) {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 12px; box-sizing: border-box;
    border: 0; border-radius: 16px; background: transparent; color: var(--sn-ink); font: inherit; font-size: 15px; font-weight: 600; text-align: start; text-decoration: none; cursor: pointer; box-shadow: none !important; outline: none; -webkit-tap-highlight-color: transparent;
}
.sibmac-menu__row:active { background: var(--sn-elevated); }
.sibmac-menu__group li + li .sibmac-menu__row { position: relative; }
.sibmac-menu__group li + li .sibmac-menu__row::before { content: ""; position: absolute; top: 0; inset-inline: 62px 12px; border-top: 1px solid var(--sn-border); }
.sibmac-menu__row > span:first-child { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sn-elevated); border: 1px solid var(--sn-border); color: var(--sn-muted); }
.sibmac-menu__row svg { width: 19px; height: 19px; flex: none; }
.sibmac-menu__row--danger > span:first-child { color: #dc2626; }
.sibmac-menu__row-lbl { flex: 1 1 auto; }
.sibmac-menu__row-val { color: var(--sn-muted); font-size: 14px; font-weight: 500; }
.sibmac-menu__row-chev, .sibmac-menu__row > span.sibmac-menu__row-chev { width: 16px !important; height: 16px !important; border: 0; background: transparent; color: var(--sn-muted); transform: scaleX(-1); }
.sibmac-menu__row-chev svg { width: 14px; height: 14px; }
html[dir="ltr"] .sibmac-menu__row-chev { transform: none; }
.sibmac-menu__row--danger { color: #dc2626; }
/* علاقه‌مندی‌ها (sheet/dialog مشترک) */
.sibmac-favs__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sibmac-favs__row { display: flex; align-items: center; gap: 10px; }
.sibmac-favs__link, .sibmac-favs__link:is(:hover, :focus, :visited) { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 8px; border-radius: 14px; color: var(--sn-ink); text-decoration: none; box-shadow: none !important; }
@media (hover: hover) { .sibmac-favs__link:hover { background: var(--sn-surface); } }
.sibmac-favs__ico { flex: none; width: 42px; height: 42px; border-radius: 11px; object-fit: contain; background: var(--sn-surface); }
.sibmac-favs__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sibmac-favs__ttl { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sibmac-favs__ver { font-size: 12px; color: var(--sn-muted); direction: ltr; text-align: end; }
.sibmac-favs__rm { flex: none; }
@media (hover: hover) { .sibmac-favs__rm:hover { background: rgba(220, 38, 38, .12); color: #dc2626; } }
.sibmac-favs__empty { padding: 28px 10px; text-align: center; color: var(--sn-muted); font-size: 14px; line-height: 1.8; }
/* دسکتاپ: sheet علاقه‌مندی‌ها به‌شکل پاپ‌آور وسط صفحه */
@media (min-width: 768px) {
    .sibmac-sheet--cats, .sibmac-sheet--menu, .sibmac-sheet--search, .sibmac-sheet--notifs { display: none !important; }
    .sibmac-sheet--favs { inset: 50% auto auto 50%; bottom: auto; width: min(440px, calc(100vw - 32px)); max-height: 80vh; border-radius: 22px; transform: translate(-50%, -46%); opacity: 0; transition: opacity .18s ease, transform .18s ease; }
    .sibmac-sheet--favs.is-open { transform: translate(-50%, -50%); opacity: 1; }
    .sibmac-sheet--favs .sibmac-sheet__grab { display: none; }
    .sibmac-favs__back { display: none !important; } /* دسکتاپ: فقط × */
}
@media (prefers-reduced-motion: reduce) { .sibmac-sheet, .sibmac-sheet-overlay, .sibmac-side__fly, .sibmac-totop { transition: none !important; } }

/* ───────── صفحهٔ علاقه‌مندی‌ها ───────── */
/* sticky footer با CSS خالص: body ستونی، فوتر قالب (.apple-ft) با margin-top:auto به انتهای پنجره می‌رود */
html body.sibmac-favorites-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
html body.sibmac-favorites-page > .apple-ft { margin-top: auto; }
html body.sibmac-favorites-page > .sibmac-favpage { flex: 0 0 auto; width: 100%; }
.sibmac-favpage { padding: 4px 24px 40px; box-sizing: border-box; }
.sibmac-favpage__crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--sn-muted); margin-bottom: 18px; }
.sibmac-favpage__crumb a, .sibmac-favpage__crumb a:is(:focus, :visited) { color: var(--sn-muted); text-decoration: none; transition: color .15s ease; }
@media (hover: hover) { .sibmac-favpage__crumb a:hover { color: var(--sn-brand); } }
.sibmac-favpage__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sibmac-favpage__title { margin: 0; font: inherit; font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; line-height: 1.4; color: var(--sn-ink); }
.sibmac-favpage__count { font-size: 15px; font-weight: 600; color: var(--sn-muted); margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.sibmac-favpage__clear, .sibmac-favpage__clear:is(:hover, :focus, :focus-visible, :active) { border: 1px solid var(--sn-border); border-radius: 999px; min-height: 34px; padding: 0 14px; background: var(--sn-elevated); color: var(--sn-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: none !important; outline: none !important; transform: none !important; -webkit-tap-highlight-color: transparent; transition: background-color .16s ease, color .16s ease; }
@media (hover: hover) { .sibmac-favpage__clear:hover { background: #fde8e8; color: #dc2626; border-color: transparent; } }
.sibmac-favpage__clear[hidden] { display: none !important; }
.sibmac-favpage__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sibmac-favpage__row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 12px; border-radius: 18px; background: var(--sn-surface); border: 1px solid var(--sn-border); transition: background-color .16s ease; }
@media (hover: hover) { .sibmac-favpage__row:hover { background: var(--sn-surface-hover); } }
.sibmac-favpage__row.is-gone { opacity: .55; }
.sibmac-favpage__link, .sibmac-favpage__link:is(:hover, :focus, :visited) { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--sn-ink); text-decoration: none; font-size: 15px; font-weight: 700; }
/* آیکون مثل کارت‌های مربعی: گوشهٔ ۲۰٪ + سایه + هالهٔ نور ملایم از خود آیکون */
.sibmac-favpage__icowrap { position: relative; flex: none; width: 48px; height: 48px; display: grid; place-items: center; }
.sibmac-favpage__glow { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); object-fit: cover; border-radius: 50%; filter: blur(14px) saturate(1.5); opacity: .22; pointer-events: none; z-index: 0;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, rgba(0,0,0,.55) 40%, transparent 70%); mask-image: radial-gradient(circle at 50% 50%, #000 0%, rgba(0,0,0,.55) 40%, transparent 70%); }
.sibmac-favpage__ico { position: relative; z-index: 1; flex: none; width: 48px; height: 48px; border-radius: 20%; object-fit: contain; background: transparent; filter: drop-shadow(0 4px 10px rgba(15, 23, 42, .14)); }
.sibmac-favpage__ico--ph { display: grid; place-items: center; color: var(--sn-muted); background: var(--sn-elevated); }
.sibmac-favpage__meta--sk { display: inline-block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--sn-border) 25%, var(--sn-surface-hover) 50%, var(--sn-border) 75%); background-size: 200% 100%; animation: sibmac-fav-sk 1.2s ease-in-out infinite; }
@keyframes sibmac-fav-sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sibmac-favpage__meta--sk { animation: none; } }
.sibmac-favpage__ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sibmac-favpage__metas { display: flex; align-items: center; gap: 22px; flex: none; direction: ltr; }
.sibmac-favpage__meta { display: inline-block; color: var(--sn-muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; unicode-bidi: isolate; }
.sibmac-favpage__rm { flex: none; }
.sibmac-favpage__empty { padding: 48px 12px; text-align: center; color: var(--sn-muted); font-size: 15px; line-height: 1.9; }
.sibmac-favpage__empty span { font-size: 13.5px; }
@media (max-width: 767px) {
    .sibmac-favpage { padding: 4px 12px 40px; }
    .sibmac-favpage__title { font-size: 20px; }
    .sibmac-favpage__row { flex-wrap: wrap; }
    .sibmac-favpage__metas { order: 3; width: 100%; gap: 14px; font-size: 12.5px; padding-inline-start: 60px; }
}

/* ───────── حالت خالی آرشیوهای کاتالوگ (بازی‌ها / افزونه‌ها / macOS) ───────── */
.smc-empty-state { padding: 56px 24px !important; border-radius: 20px; background: var(--sn-surface) !important; border: 1px solid var(--sn-border); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.smc-empty-state__ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sn-elevated); border: 1px solid var(--sn-border); color: var(--sn-muted); margin-bottom: 4px; }
.smc-empty-state__ico svg { width: 26px; height: 26px; }
.smc-empty-state p { margin: 0; font-size: 15px; color: var(--sn-muted); }
.smc-empty-state__btn, .smc-empty-state__btn:is(:hover, :focus, :active, :visited) { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; margin-top: 6px; border-radius: 999px; border: 1px solid var(--sn-border); background: var(--sn-elevated); color: var(--sn-ink); font-size: 13.5px; font-weight: 700; text-decoration: none; box-shadow: none !important; outline: none; transition: background-color .16s ease, color .16s ease; }
@media (hover: hover) { .smc-empty-state__btn:hover { background: var(--sn-brand-light); color: var(--sn-brand); border-color: transparent; } }


/* ───────── منو: کارت «اشتراک پرو» ───────── */
.sibmac-menu__pro, .sibmac-menu__pro:is(:hover, :focus, :active, :visited) {
    display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 14px 14px; border-radius: 20px; text-decoration: none; color: var(--sn-ink);
    background: linear-gradient(135deg, var(--sn-brand-light), var(--sn-surface) 70%); border: 1px solid var(--sn-border); box-shadow: none !important; outline: none; -webkit-tap-highlight-color: transparent;
}
.sibmac-menu__pro:active { filter: brightness(.98); }
.sibmac-menu__pro-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sn-elevated); color: var(--sn-brand); border: 1px solid var(--sn-border); }
.sibmac-menu__pro-ico svg { width: 24px; height: 24px; }
.sibmac-menu__pro-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sibmac-menu__pro-ttl { font-size: 15px; font-weight: 800; color: var(--sn-brand); }
.sibmac-menu__pro-sub { font-size: 12.5px; font-weight: 500; color: var(--sn-muted); }
.sibmac-menu__pro .sibmac-menu__row-chev { color: var(--sn-muted); }
:is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-menu__pro, body.dark-mode .sibmac-menu__pro { background: linear-gradient(135deg, rgba(91,164,255,.18), var(--sn-surface) 70%); }
.sibmac-menu__row--notifs .sibmac-menu__row-val:not(:empty) { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--sn-brand); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }

/* ───────── شیت تمام‌صفحهٔ اعلان‌ها ───────── */
.sibmac-sheet--notifs { top: 0 !important; bottom: 0; max-height: none !important; height: 100dvh; border-radius: 0 !important; box-shadow: none !important; background: var(--sn-elevated); }
.sibmac-sheet--notifs .sibmac-sheet__grab { display: none; }
.sibmac-sheet--notifs .sibmac-sheet__head { justify-content: flex-start; gap: 6px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background: var(--sn-elevated); border-bottom: 1px solid transparent; transition: border-color .16s ease, box-shadow .16s ease; }
.sibmac-sheet--notifs.is-scrolled .sibmac-sheet__head { border-bottom-color: var(--sn-border); box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.sibmac-sheet--notifs .sibmac-sheet__ttl { font-size: 17px; font-weight: 800; flex: 1 1 auto; }
.sibmac-notifs__back, .sibmac-notifs__back:is(:hover, :focus, :focus-visible, :active) { border: 0 !important; background: transparent !important; box-shadow: none !important; width: 40px !important; height: 40px !important; border-radius: 50%; color: var(--sn-ink); }
.sibmac-notifs__back:active { background: var(--sn-surface) !important; }
.sibmac-notifs__back span, .sibmac-notifs__back span svg { width: 22px !important; height: 22px !important; stroke-width: 2; }
.sibmac-notifs__acts { display: inline-flex; gap: 2px; }
.sibmac-notifs__acts[hidden] { display: none; }
.sibmac-notifs__act, .sibmac-notifs__act:is(:hover, :focus, :focus-visible, :active) { display: inline-grid !important; place-items: center; width: 40px !important; min-width: 40px; height: 40px !important; padding: 0 !important; margin: 0; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--sn-ink); box-shadow: none !important; outline: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sibmac-notifs__act:active { background: var(--sn-surface) !important; }
.sibmac-notifs__act--danger:active { color: #dc2626; }
.sibmac-notifs__act-ico, .sibmac-notifs__act-ico svg { display: block; width: 22px !important; height: 22px !important; min-width: 22px; }
.sibmac-notifs__body { flex: 1 1 auto; display: flex; flex-direction: column; padding: 10px 16px 24px; }
.sibmac-notifs__body .nsd-notification-items { max-height: none !important; overflow: visible !important; display: flex; flex-direction: column; gap: 10px; padding: 0 0 12px; }
.sibmac-notifs__body .sibmac-notifs__nsd-empty { display: none !important; }
.sibmac-notifs__empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px 64px; text-align: center; }
.sibmac-notifs__empty-ico { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--sn-surface); color: var(--sn-muted); }
.sibmac-notifs__empty-ico svg { width: 34px; height: 34px; stroke-width: 1.6; }
.sibmac-notifs__empty-ttl { margin: 0; font-size: 16px; font-weight: 700; color: var(--sn-ink); }
.sibmac-sheet--notifs.has-items .sibmac-notifs__empty { display: none; }
.sibmac-sheet--notifs:not(.has-items) .nsd-notification-items { display: none !important; }
/* پاپ‌آور افزونه وقتی شیت باز است دیده نشود (فقط برای بارگذاری فهرست باز می‌شود) */
html.sibmac-notifs-open .nsd-notification-popover { visibility: hidden !important; pointer-events: none !important; }

/* ───────── شیت تمام‌صفحهٔ جستجو (موبایل) ───────── */
.sibmac-sheet--search { top: 0 !important; bottom: 0; max-height: none !important; height: 100dvh; border-radius: 0 !important; box-shadow: none !important; background: var(--sn-elevated); }
.sibmac-sheet--search .sibmac-sheet__grab { display: none; }
.sibmac-sheet--search .sibmac-sheet__head { justify-content: flex-start; gap: 6px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background: var(--sn-elevated); border-bottom: 1px solid transparent; transition: border-color .16s ease, box-shadow .16s ease; }
.sibmac-sheet--search.is-scrolled .sibmac-sheet__head { border-bottom-color: var(--sn-border); box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.sibmac-sheet--search .sibmac-sheet__ttl { font-size: 17px; font-weight: 800; flex: 1 1 auto; }
.sibmac-ssearch__body { flex: 1 1 auto; display: flex; flex-direction: column; padding: 4px 14px 24px; }
.sibmac-ssearch__host { flex: none; }
.sibmac-sheet--search .mah-header-search, .sibmac-sheet--search .mah-header-search.mah-theme-light, .sibmac-sheet--search .mah-header-search.mah-theme-dark { max-width: none; display: block !important; }
.sibmac-sheet--search .mah-search-wrap-header .mah-search-box, .sibmac-sheet--search .mah-search-wrap-header .mah-search-box:focus-within { height: 48px; max-height: 48px; border-radius: 16px; }
.sibmac-sheet--search .mah-search-wrap-header .mah-search-input { font-size: 16px; height: 46px; line-height: 46px; }
/* نتایج/تاریخچه MAH: به‌جای پاپ‌آور، فهرست تمام‌عرض در جریان صفحه */
.sibmac-sheet--search .mah-search-results, .sibmac-sheet--search .mah-search-history {
    position: static !important; inset: auto !important; width: 100% !important; max-width: none !important; max-height: none !important; margin: 12px 0 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; transform: none !important; overflow: visible !important;
}
.sibmac-sheet--search .mah-search-results-inner, .sibmac-sheet--search .mah-history-list { max-height: none !important; overflow: visible !important; }
.sibmac-sheet--search .mah-search-result-item { border-radius: 16px; }
.sibmac-ssearch__empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px 64px; text-align: center; }
.sibmac-ssearch__empty-ico { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--sn-surface); color: var(--sn-muted); }
.sibmac-ssearch__empty-ico svg { width: 34px; height: 34px; stroke-width: 1.6; }
.sibmac-ssearch__empty-ttl { margin: 0; font-size: 16px; font-weight: 700; color: var(--sn-ink); }
.sibmac-sheet--search.has-query .sibmac-ssearch__empty { display: none; }

/* ───────── شیت علاقه‌مندی‌ها ───────── */
.sibmac-favs__count { font-size: 14px; font-weight: 600; color: var(--sn-muted); margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.sibmac-favs__count:empty { display: none; }
.sibmac-favs__clear[hidden] { display: none !important; }
.sibmac-sheet--favs .sibmac-sheet__head { gap: 6px; }
.sibmac-sheet--favs .sibmac-sheet__ttl { flex: 1 1 auto; display: inline-flex; align-items: baseline; }
.sibmac-favs__icowrap { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.sibmac-favs__glow { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); object-fit: cover; border-radius: 50%; filter: blur(14px) saturate(1.5); opacity: .22; pointer-events: none; z-index: 0;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, rgba(0,0,0,.55) 40%, transparent 70%); mask-image: radial-gradient(circle at 50% 50%, #000 0%, rgba(0,0,0,.55) 40%, transparent 70%); }
.sibmac-favs__icowrap .sibmac-favs__ico { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 20%; background: transparent; filter: drop-shadow(0 4px 10px rgba(15, 23, 42, .14)); }
.sibmac-favs__icowrap .sibmac-favs__ico--ph { background: var(--sn-surface); }
.sibmac-favs__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 36px 16px; text-align: center; }
.sibmac-favs__empty-ico { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--sn-surface); color: var(--sn-muted); }
.sibmac-favs__empty-ico svg { width: 34px; height: 34px; stroke-width: 1.6; }
.sibmac-favs__empty-ttl { margin: 0; font-size: 16px; font-weight: 700; color: var(--sn-ink); }
@media (max-width: 767px) {
    .sibmac-sheet--favs { top: 0 !important; bottom: 0; max-height: none !important; height: 100dvh; border-radius: 0 !important; box-shadow: none !important; background: var(--sn-elevated); }
    .sibmac-sheet--favs .sibmac-sheet__grab { display: none; }
    .sibmac-sheet--favs .sibmac-sheet__head { justify-content: flex-start; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background: var(--sn-elevated); border-bottom: 1px solid transparent; transition: border-color .16s ease, box-shadow .16s ease; }
    .sibmac-sheet--favs.is-scrolled .sibmac-sheet__head { border-bottom-color: var(--sn-border); box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
    .sibmac-sheet--favs .sibmac-sheet__ttl { font-size: 17px; font-weight: 800; }
    .sibmac-sheet--favs .sibmac-sheet__close:not(.sibmac-favs__back) { display: none !important; } /* موبایل: فلش بازگشت به‌جای × */
    .sibmac-sheet--favs .sibmac-sheet__body { flex: 1 1 auto; display: flex; flex-direction: column; padding: 10px 14px 24px; }
    .sibmac-sheet--favs .sibmac-favs__list { gap: 10px; }
    .sibmac-sheet--favs .sibmac-favs__row { gap: 10px; min-height: 64px; padding: 10px 12px; border-radius: 18px; background: var(--sn-surface); border: 1px solid var(--sn-border); }
    .sibmac-sheet--favs .sibmac-favs__link, .sibmac-sheet--favs .sibmac-favs__link:is(:hover, :focus, :visited) { height: auto; padding: 0; background: transparent; }
    .sibmac-sheet--favs .sibmac-favs__ttl { font-size: 15px; }
    .sibmac-sheet--favs .sibmac-favs__ver { font-size: 12.5px; }
    .sibmac-sheet--favs .sibmac-favs__empty { flex: 1 1 auto; padding: 24px 16px 64px; }
}
/* v3.22.49 — دکمهٔ «ورود / ثبت‌نام» (مهمان) متنی است؛ نباید دایرهٔ ۴۰px شود */
.sibmac-top__actions .apple-account-button.is-guest { width: auto !important; min-width: 0 !important; aspect-ratio: auto !important; height: 36px; padding: 0 14px !important; border-radius: 999px !important; background: var(--sn-brand); color: #fff !important; font-size: 13px; font-weight: 700; white-space: nowrap; gap: 6px; border: 0 !important; box-shadow: 0 1px 2px rgba(0,0,0,.08) !important; }
.sibmac-top__actions .apple-account-button.is-guest .apple-account-label { display: inline !important; position: static !important; width: auto !important; height: auto !important; clip: auto !important; overflow: visible !important; color: inherit; }
.sibmac-top__actions .apple-account-button.is-guest .bi, .sibmac-top__actions .apple-account-button.is-guest svg { display: none; }
@media (hover: hover) { .sibmac-top__actions .apple-account-button.is-guest:hover { background: var(--sn-brand); filter: brightness(1.08); } }
.sibmac-top__actions .apple-account-button.is-guest:focus-visible { outline: 2px solid var(--sn-brand); outline-offset: 2px; box-shadow: 0 0 0 2px var(--sn-brand), 0 1px 2px rgba(0,0,0,.08) !important; }
.sibmac-top__actions .apple-account-button.is-guest:active { transform: scale(.97); filter: brightness(.92); }
@media (max-width: 480px) { .sibmac-top__actions .apple-account-button.is-guest { height: 34px; padding: 0 12px !important; font-size: 12.5px; } }
/* v3.22.50 — دکمهٔ مهمان: قوانین قالب (پس‌زمینهٔ شفاف/حاشیه/ارتفاع) با اولویت بالاتر می‌بردند */
.sibmac-top .sibmac-top__actions a.apple-account-button.is-guest, .sibmac-top .sibmac-top__actions a.apple-account-button.is-guest:is(:hover, :focus, :visited, :active) { background: var(--sn-brand) !important; border: 0 !important; box-shadow: 0 1px 2px rgba(0,0,0,.08) !important; color: #fff !important; height: 36px !important; min-height: 0 !important; max-height: 36px !important; line-height: 1 !important; padding: 0 14px !important; width: auto !important; min-width: 0 !important; border-radius: 999px !important; aspect-ratio: auto !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; margin: 0 !important; }
.sibmac-top .sibmac-top__actions a.apple-account-button.is-guest:focus-visible { outline: 2px solid var(--sn-brand) !important; outline-offset: 2px !important; box-shadow: 0 0 0 2px var(--sn-brand), 0 1px 2px rgba(0,0,0,.08) !important; }
.sibmac-top .sibmac-top__actions a.apple-account-button.is-guest:active { transform: scale(.97) !important; filter: brightness(.92) !important; }
.sibmac-top .sibmac-top__actions a.apple-account-button.is-guest .apple-account-label { font-size: 13px !important; font-weight: 700 !important; color: #fff !important; line-height: 1 !important; }
@media (max-width: 480px) { .sibmac-top .sibmac-top__actions a.apple-account-button.is-guest { height: 34px !important; max-height: 34px !important; padding: 0 12px !important; } .sibmac-top .sibmac-top__actions a.apple-account-button.is-guest .apple-account-label { font-size: 12.5px !important; } }
/* v3.22.51 — موبایل: هدر چسبنده با افکت گلس (blur)؛ در بالای صفحه شفاف، پس از اسکرول زمینهٔ نیمه‌شفاف + خط زیرین */
@media (max-width: 767px) {
    .sibmac-top { position: sticky; top: 0; z-index: 930; padding-top: calc(8px + env(safe-area-inset-top, 0px)); background: transparent; border-bottom: 1px solid transparent; transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }
    .sibmac-top.is-stuck { background: rgba(255, 255, 255, .72); border-bottom-color: var(--sn-border); box-shadow: 0 1px 0 rgba(15, 23, 42, .02); }
    @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
        .sibmac-top.is-stuck { -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); }
    }
    @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
        .sibmac-top.is-stuck { background: rgba(255, 255, 255, .94); }
    }
    :is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-top.is-stuck, body.dark-mode .sibmac-top.is-stuck { background: rgba(27, 32, 40, .72); }
    @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
        :is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-top.is-stuck, body.dark-mode .sibmac-top.is-stuck { background: rgba(27, 32, 40, .94); }
    }
    .sibmac-top .sibmac-top__actions a.apple-account-button.is-guest { height: 34px !important; max-height: 34px !important; }
}
/* v3.22.52 — گلس هدر از توکن‌های سایت (--sn-elevated) به‌جای رنگ ثابت؛ هم‌رنگ نوار پایین/ریل در روشن و تاریک */
@media (max-width: 767px) {
    @supports (background: color-mix(in srgb, red 50%, transparent)) {
        .sibmac-top.is-stuck, :is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-top.is-stuck, body.dark-mode .sibmac-top.is-stuck { background: color-mix(in srgb, var(--sn-elevated) 74%, transparent); }
        @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
            .sibmac-top.is-stuck, :is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-top.is-stuck, body.dark-mode .sibmac-top.is-stuck { background: color-mix(in srgb, var(--sn-elevated) 94%, transparent); }
        }
    }
    .sibmac-top.is-stuck { border-bottom-color: var(--sn-border); }
}
/* v3.22.53 — موبایل: ارتفاع هدر قطعاً ۵۶px (+safe-area)؛ قبلاً تا ~۱۴۰px باز می‌شد و با چسبنده‌شدن توی چشم می‌زد */
@media (max-width: 767px) {
    .sibmac-top { height: calc(var(--sn-top-h) + env(safe-area-inset-top, 0px)) !important; min-height: 0 !important; max-height: calc(var(--sn-top-h) + env(safe-area-inset-top, 0px)) !important; padding: env(safe-area-inset-top, 0px) 12px 0 12px !important; box-sizing: border-box; overflow: hidden; align-items: center; }
    .sibmac-top > * { max-height: var(--sn-top-h); }
    .sibmac-top__logo, .sibmac-top__logo .apple-logo, .sibmac-top__logo .apple-logo picture { height: 40px !important; max-height: 40px !important; padding: 0 !important; margin: 0 !important; display: inline-flex !important; align-items: center !important; }
    .sibmac-top__logo .apple-logo img.apple-logo-img { max-height: 30px !important; }
    .sibmac-top__actions { height: 40px; align-items: center; }
}
/* v3.22.54 — دکمهٔ ورود پشت لایهٔ گلس می‌رفت (z-index منفی قالب در stacking context جدید backdrop-filter) */
.sibmac-top > *, .sibmac-top__actions > *, .sibmac-top .sibmac-top__actions a.apple-account-button.is-guest { position: relative; z-index: 2 !important; opacity: 1 !important; visibility: visible !important; }
.sibmac-top .sibmac-top__actions a.apple-account-button.is-guest { transform: none !important; filter: none !important; }
/* v3.22.55 — گلس روی لایهٔ ::before (نه خود هدر) تا فرزندان هرگز زیر بلور نروند (باگ Safari با backdrop-filter روی والد sticky) */
@media (max-width: 767px) {
    .sibmac-top, .sibmac-top.is-stuck { background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; isolation: isolate; border-bottom-color: transparent; }
    .sibmac-top::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .25s ease; background: rgba(255, 255, 255, .74); border-bottom: 1px solid var(--sn-border); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); }
    @supports (background: color-mix(in srgb, red 50%, transparent)) { .sibmac-top::before { background: color-mix(in srgb, var(--sn-elevated) 74%, transparent); } }
    :is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-top::before, body.dark-mode .sibmac-top::before { background: rgba(32, 38, 48, .74); }
    @supports (background: color-mix(in srgb, red 50%, transparent)) { :is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-top::before, body.dark-mode .sibmac-top::before { background: color-mix(in srgb, var(--sn-elevated) 74%, transparent); } }
    .sibmac-top.is-stuck::before { opacity: 1; }
    .sibmac-top > * { position: relative; z-index: 1; }
    .sibmac-top .sibmac-top__actions a.apple-account-button.is-guest { display: inline-flex !important; position: relative; z-index: 3 !important; }
    /* سایه خیلی ظریف در پایین هدر موبایل (فقط قبل از اسکرول) تا هدر از بدنه سفید جدا دیده شود */
    .sibmac-top:not(.is-stuck)::after {
        content: "";
        position: absolute;
        inset-inline: 0;
        inset-block-end: 0;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(15, 23, 42, .04), transparent);
        pointer-events: none;
        z-index: 3;
    }
}

/* ═════════ v3.22.67 — هدر موبایل تک‌نواره ═════════
   پیش از این، هدر چسبان (56px) و نوار ابزار آرشیو (چسبان دوم) روی هم می‌نشستند
   و حدود ۱۵۰px از ارتفاع گوشی را می‌گرفتند. حالا تیتر صفحه و دکمه‌های
   مرتب‌سازی/فیلتر داخل همین هدر می‌آیند و نوار ابزار جداگانه حذف می‌شود. */
.sibmac-top__title { display: none; } /* فقط موبایل */

/* آیکون ورود موبایل: پیش‌فرض پنهان؛ در دسکتاپ دکمهٔ حساب قالب هست و آیکون دوم
   تکرار می‌شد. فقط در بلوک موبایل پایین‌تر نمایش داده می‌شود. */
.sibmac-top .sibmac-top__login { display: none; }

@media (max-width: 767px) {
    /* چیدمان راست‌به‌چپ: تیتر چسبیده به راست، دکمه‌ها سمت چپ.
       ستون اول در RTL سمت راست است؛ پس تیتر اول و اکشن‌ها دوم می‌آیند. */
    .sibmac-top {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "title actions";
        align-items: center;
        column-gap: 10px;
    }
    .sibmac-top__logo { display: none !important; }        /* در صفحه‌های داخلی اطلاعات تازه‌ای ندارد */
    .sibmac-top__search { display: none !important; }
    .sibmac-top__actions { grid-area: actions; margin: 0 !important; gap: 6px; }
    .sibmac-top__title {
        grid-area: title;
        display: block;
        min-width: 0;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.35;
        color: var(--sn-ink);
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sibmac-top__title:empty { display: none; }

    /* صفحه‌های غیرآرشیو (صفحه اصلی، برگه‌ها، نوشته‌ها، پنل کاربری…): تیتر و
       دکمهٔ ابزار ندارند؛ لوگو سمت چپ و آیکون آدمک سمت راست.
       صفحه‌های آرشیو کلاس is-brand نمی‌گیرند و چیدمان «تیتر راست / دکمه‌ها چپ»
       بالا برایشان دست‌نخورده می‌ماند. */
    .sibmac-top.is-brand {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "actions . logo";
    }
    .sibmac-top.is-brand .sibmac-top__logo { display: grid !important; grid-area: logo; place-items: center; }
    .sibmac-top.is-brand .sibmac-top__logo:empty { display: none !important; }

    /* دکمهٔ آبی «ورود / ثبت‌نام» قالب در موبایل پنهان می‌شود؛ ردیف «ورود / ثبت‌نام»
       در شیت «منو» و آیکون آدمک همین هدر جای آن را می‌گیرند. */
    .sibmac-top .sibmac-top__actions a.apple-account-button.is-guest,
    .sibmac-top .sibmac-top__actions .apple-account-button.is-guest { display: none !important; }

    /* آیکون ورود: ۴۰px، کم‌رنگ با رنگ برند — هم‌اندازهٔ بقیهٔ کنترل‌های هدر
       و آرام‌تر از پیل آبی قبلی که بلندترین عنصر صفحه بود. */
    .sibmac-top .sibmac-top__login,
    .sibmac-top .sibmac-top__login:is(:hover, :focus, :active, :visited) {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 40px !important;
        min-width: 40px;
        height: 40px !important;
        min-height: 40px;
        max-height: 40px;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: var(--sn-brand-light) !important;
        color: var(--sn-brand) !important;
        box-shadow: none !important;
        text-decoration: none !important;
        aspect-ratio: 1;
        -webkit-tap-highlight-color: transparent;
    }
    .sibmac-top .sibmac-top__login svg { width: 21px !important; height: 21px !important; display: block; }
    @media (hover: hover) { .sibmac-top .sibmac-top__login:hover { background: var(--sn-brand) !important; color: #fff !important; } }
    .sibmac-top .sibmac-top__login:focus-visible { outline: 2px solid var(--sn-brand); outline-offset: 2px; }
    .sibmac-top .sibmac-top__login .apple-account-label { display: none !important; }

    /* در حالت تاریک، کم‌رنگ ماندن پس‌زمینه کافی است؛ رنگ متن روشن‌تر می‌شود. */
    :is(html.dark_mod, html.dark-mode, html[data-theme="dark"]) .sibmac-top .sibmac-top__login,
    body.dark-mode .sibmac-top .sibmac-top__login { color: #8cc0ff !important; }
}
