/* =========================================================================
   پوسته‌ی اپ سُکانه (PWA): نشان برند، آیکون‌ها، نوار بالای موبایل، نوار پایین، دعوت به نصب،
   پنل کشویی، اعلان کوتاه، فوتر و صفحه‌ی «بیشتر».
   پس از base_style.css بارگذاری می‌شود؛ رنگ‌ها و اندازه‌ها از tokens.css.
   ========================================================================= */

/* ---------- آیکون‌های خطی ({% icon %}) ---------- */
.sk-ico { display: inline-flex; align-items: center; justify-content: center; font-style: normal; line-height: 1; vertical-align: -0.14em; }
.sk-ico svg { display: block; width: 1em; height: 1em; }

/* ---------- نشان برند (هدر، فوتر) ---------- */
.sk-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sk-primary); text-decoration: none; }
.sk-brand__mark {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; background: var(--sk-primary);
    display: inline-flex; align-items: center; justify-content: center;
}
.sk-brand__mark svg { width: 25px; height: 25px; }
.sk-brand__name { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.sk-brand--light { color: #FFFFFF; }
.sk-brand--light .sk-brand__mark { background: #FFFFFF; }

/* ---------- فوکوس صفحه‌کلید: حلقه‌ی هم‌رنگ برند به‌جای حلقه‌ی سیاه پیش‌فرض ---------- */
.sk-tabbar a:focus-visible, .sk-btn:focus-visible, .sk-sheet button:focus-visible, .sk-install-banner button:focus-visible,
.sk-more__row:focus-visible, .sk-toast__action:focus-visible, .sk-brand:focus-visible, .sk-footer a:focus-visible, .sk-footer button:focus-visible {
    outline: 2px solid var(--sk-primary-light); outline-offset: 2px;
}
.sk-sheet button:focus:not(:focus-visible) { outline: none; }

/* ---------- دکمه‌های مشترک پوسته ---------- */
.sk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
    border: none; border-radius: 14px; font-family: inherit; font-size: var(--fs-md); font-weight: 700;
    cursor: pointer; text-decoration: none; transition: background 0.15s ease, color 0.15s ease;
}
.sk-btn--primary { background: var(--sk-primary); color: #FFFFFF; }
.sk-btn--primary:hover { background: var(--sk-primary-hover); color: #FFFFFF; }
.sk-btn--ghost { background: transparent; color: var(--sk-muted); }
.sk-btn--ghost:hover { color: var(--sk-ink); }
.sk-btn--block { width: 100%; }

/* ---------- نوار بالای صفحه‌های داخلی (فقط موبایل): بازگشت + عنوان ---------- */
.sk-appbar-inner { display: none; }

/* ---------- کارت فیلترها (pwa.js: data-sk-filter-card) ---------- */
.sk-filter-toggle { display: none; }

/* ---------- فهرست‌های بلند در موبایل: «نمایش … مورد دیگر» (pwa.js: data-sk-mobile-limit) ---------- */
.sk-more-btn { display: none; }

/* ---------- نوار پایین (فقط موبایل) ---------- */
.sk-tabbar { display: none; }

/* ---------- دعوت به نصب ---------- */
.sk-install-banner {
    position: fixed; left: 12px; right: 12px; z-index: var(--sk-z-install);
    bottom: calc(var(--sk-bottomnav-h) + var(--sk-safe-bottom) + 12px);
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px;
    background: var(--sk-primary); color: #FFFFFF; box-shadow: var(--sk-shadow-md);
    opacity: 0; transform: translateY(12px); transition: opacity 0.2s ease, transform 0.2s ease;
}
.sk-install-banner[hidden] { display: none; }
.sk-install-banner.is-visible { opacity: 1; transform: none; }
.sk-install-banner__icon {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: #FFFFFF;
    display: flex; align-items: center; justify-content: center;
}
.sk-install-banner__icon svg { width: 28px; height: 28px; }
.sk-install-banner__text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sk-install-banner__text strong { font-size: var(--fs-sm); font-weight: 700; }
.sk-install-banner__text span { font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.8); }
.sk-install-banner__cta {
    min-height: 38px; padding: 0 16px; border: none; border-radius: 11px; background: var(--sk-accent); color: var(--sk-accent-ink);
    font-family: inherit; font-size: var(--fs-sm); font-weight: 800; cursor: pointer;
}
.sk-install-banner__close {
    width: 36px; height: 36px; flex-shrink: 0; border: none; border-radius: 10px; background: transparent;
    color: rgba(255, 255, 255, 0.8); font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- پنل کشویی از پایین (bottom sheet) ---------- */
.sk-sheet {
    position: fixed; inset: 0; z-index: var(--sk-z-sheet); display: flex; align-items: flex-end; justify-content: center;
    background: rgba(8, 24, 32, 0); transition: background 0.2s ease;
}
.sk-sheet[hidden] { display: none; }
.sk-sheet.is-open { background: rgba(8, 24, 32, 0.52); }
.sk-sheet__panel {
    position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; box-sizing: border-box;
    padding: 8px 20px calc(20px + var(--sk-safe-bottom)); border-radius: 24px 24px 0 0;
    background: var(--sk-surface); color: var(--sk-ink); box-shadow: var(--sk-shadow-lg);
    display: flex; flex-direction: column; gap: 18px;
    transform: translateY(100%); transition: transform 0.22s ease;
}
.sk-sheet.is-open .sk-sheet__panel { transform: none; }
.sk-sheet__handle { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--sk-primary-soft-border); }
.sk-sheet__close {
    position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border: none; border-radius: 12px;
    background: var(--sk-ground); color: var(--sk-ink); font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
html.sk-sheet-open, html.sk-sheet-open body { overflow: hidden; }
@media (min-width: 769px) {
    .sk-sheet { align-items: center; }
    .sk-sheet__panel { border-radius: 24px; padding-bottom: 24px; }
}

.sk-install-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.sk-install-hero__icon {
    width: 76px; height: 76px; border-radius: 22px; background: var(--sk-primary);
    display: flex; align-items: center; justify-content: center; box-shadow: var(--sk-shadow-md);
}
.sk-install-hero__icon svg { width: 46px; height: 46px; }
.sk-install-hero h2 { margin: 8px 0 0; font-size: 1.3rem; font-weight: 800; color: var(--sk-ink); }
.sk-install-hero p { margin: 0; font-size: var(--fs-sm); color: var(--sk-muted); line-height: 1.8; max-width: 320px; }
.sk-install-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sk-install-benefits li { display: flex; align-items: flex-start; gap: 12px; }
.sk-install-benefits__icon {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; background: var(--sk-primary-soft); color: var(--sk-primary);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.sk-install-benefits strong { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--sk-ink); }
.sk-install-benefits span:not(.sk-install-benefits__icon) { font-size: var(--fs-xs); color: var(--sk-muted); }
.sk-install-actions { display: flex; flex-direction: column; gap: 4px; }
.sk-install-manual { display: none; flex-direction: column; gap: 10px; background: var(--sk-ground); border-radius: 16px; padding: 14px 16px; }
.sk-install-manual__title { margin: 0; font-weight: 700; color: var(--sk-ink); font-size: var(--fs-sm); }
.sk-install-manual ol { margin: 0; padding: 0 20px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--sk-ink); line-height: 1.8; }
.sk-install-manual__ios { display: none !important; }
.sk-sheet.is-manual .sk-install-actions { display: none; }
.sk-sheet.is-manual .sk-install-manual { display: flex; }
.sk-sheet.is-ios .sk-install-manual__ios { display: flex !important; }
.sk-sheet.is-ios .sk-install-manual__android { display: none; }

/* ---------- اعلان کوتاه (toast) ---------- */
.sk-toast-host {
    position: fixed; left: 12px; right: 12px; z-index: var(--sk-z-toast); pointer-events: none;
    bottom: calc(16px + var(--sk-safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.sk-toast {
    pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 460px; box-sizing: border-box;
    padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--sk-ink); color: #FFFFFF;
    font-size: var(--fs-sm); box-shadow: var(--sk-shadow-md);
    opacity: 0; transform: translateY(10px); transition: opacity 0.2s ease, transform 0.2s ease;
}
.sk-toast.is-visible { opacity: 1; transform: none; }
.sk-toast__action {
    min-height: 36px; padding: 0 14px; border: none; border-radius: 10px; background: var(--sk-accent); color: var(--sk-accent-ink);
    font-family: inherit; font-size: var(--fs-sm); font-weight: 800; cursor: pointer; white-space: nowrap;
}

/* ---------- فوتر ---------- */
.sk-footer { background: var(--sk-primary-deep); color: rgba(255, 255, 255, 0.72); padding: 48px 0 0; margin-top: 56px; }
.sk-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.sk-footer__about { display: flex; flex-direction: column; gap: 14px; }
.sk-footer__about p { margin: 0; font-size: var(--fs-sm); line-height: 1.9; color: rgba(255, 255, 255, 0.72); max-width: 340px; }
.sk-footer__col h3 { margin: 0 0 14px; font-size: var(--fs-md); font-weight: 700; color: #FFFFFF; }
.sk-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sk-footer__col a, .sk-footer__col button {
    color: rgba(255, 255, 255, 0.72); font-size: var(--fs-sm); text-decoration: none; transition: color 0.15s ease;
    background: none; border: none; padding: 0; font-family: inherit; cursor: pointer; text-align: right;
}
.sk-footer__col a:hover, .sk-footer__col button:hover { color: var(--sk-accent); }
.sk-footer__bottom {
    margin-top: 36px; padding-top: 18px; padding-bottom: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.6); text-align: center;
}
.sk-footer__bottom p { margin: 0; font-size: inherit; }
.sk-footer [data-sk-install-open] { display: none; }
html.can-install .sk-footer [data-sk-install-open] { display: inline; }
@media (max-width: 992px) {
    .sk-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sk-footer__about { grid-column: 1 / -1; }
}

.sk-footer__contact { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sk-footer__contact a { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: var(--fs-sm); }
.sk-footer__contact a:hover { color: var(--sk-accent); }
.sk-footer__social { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.sk-footer__social a {
    width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: #FFFFFF;
    display: inline-flex; align-items: center; justify-content: center; font-size: 19px; transition: background 0.15s ease;
}
.sk-footer__social a:hover { background: var(--sk-accent); color: var(--sk-accent-ink); }

/* ---------- صفحه‌ی «بیشتر» ---------- */
.sk-more { max-width: 560px; margin: 0 auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 16px; color: var(--sk-ink); }
.sk-more__title { margin: 0; font-size: 1.25rem; font-weight: 800; }
.sk-more__card {
    background: var(--sk-surface); border: 1px solid var(--sk-line); border-radius: 18px; padding: 14px;
    display: flex; flex-direction: column; gap: 12px;
}
.sk-more__user { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.sk-more__avatar {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--sk-primary); color: #FFFFFF;
    font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.sk-more__user-info { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sk-more__user-info strong { font-size: var(--fs-md); font-weight: 700; }
.sk-more__user-info span { font-size: var(--fs-xs); color: var(--sk-muted); }
.sk-more__chevron { color: var(--sk-muted); font-size: 18px; }
.sk-more__sub {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 12px; padding: 10px 12px;
    background: var(--sk-accent-soft); color: var(--sk-accent-text); font-size: var(--fs-sm); font-weight: 700; text-decoration: none;
}
.sk-more__sub span { display: flex; align-items: center; gap: 8px; }
.sk-more__sub strong { font-weight: 800; }
.sk-more__sub--none { background: var(--sk-primary-soft); color: var(--sk-primary); }
.sk-more__guest { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.sk-more__guest p { margin: 0; color: var(--sk-muted); font-size: var(--fs-sm); }
.sk-more__guest-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sk-more__outline { background: var(--sk-surface); color: var(--sk-primary); border: 1px solid var(--sk-primary-soft-border); }
.sk-more__group { display: flex; flex-direction: column; gap: 8px; }
.sk-more__group h2 { margin: 0 4px; font-size: var(--fs-xs); font-weight: 700; color: var(--sk-muted); }
.sk-more__list { list-style: none; margin: 0; padding: 0; background: var(--sk-surface); border: 1px solid var(--sk-line); border-radius: 16px; overflow: hidden; }
.sk-more__list li + li { border-top: 1px solid var(--sk-line); }
.sk-more__row {
    width: 100%; min-height: 52px; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 0 14px;
    color: var(--sk-ink); text-decoration: none; background: none; border: none; font-family: inherit; cursor: pointer; text-align: right;
}
.sk-more__row:hover { background: var(--sk-ground); color: var(--sk-ink); }
.sk-more__row-icon {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--sk-primary-soft); color: var(--sk-primary);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sk-more__row-label { flex-grow: 1; font-size: var(--fs-sm); font-weight: 600; }
.sk-more__row--accent .sk-more__row-icon { background: var(--sk-accent-soft); color: var(--sk-accent-text); }
.sk-more__row--danger { color: var(--sk-danger); }
.sk-more__row--danger .sk-more__row-icon { background: var(--sk-danger-soft); color: var(--sk-danger); }
.sk-more__install { display: none; }
html.can-install .sk-more__install, html.sk-ios .sk-more__install { display: list-item; }
html.is-standalone .sk-more__install { display: none; }
.sk-more__version { text-align: center; font-size: var(--fs-xs); color: var(--sk-muted); margin: 4px 0 0; }

/* =========================================================================
   موبایل (≤ 768px): پوسته‌ی اپ
   ========================================================================= */
@media (max-width: 768px) {
    /* نوار بالای فشرده: نشان برند + حساب؛ منوی همبرگری جای خود را به نوار پایین و «بیشتر» می‌دهد */
    .main-header { height: var(--sk-appbar-h); padding-top: var(--sk-safe-top); box-sizing: content-box; box-shadow: none; border-bottom: 1px solid var(--sk-line); }
    .main-header nav.container { padding: 0 12px 0 16px; }
    .main-header .nav-links, .main-header .menu-toggle { display: none !important; }
    .sk-brand__mark { width: 34px; height: 34px; border-radius: 10px; }
    .sk-brand__mark svg { width: 22px; height: 22px; }
    .sk-brand__name { font-size: 1.2rem; }
    .user-action-item a[href*="register"] { display: none; }
    .user-action-item a {
        display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px;
        background: var(--sk-primary-soft); color: var(--sk-primary); font-weight: 700;
    }
    .user-menu__trigger { padding: 4px; border-radius: 50%; }
    /* منوی حساب: کارت ثابت زیر نوار بالا، کاملاً داخل صفحه (قبلاً از لبه‌ی چپ بیرون می‌زد) */
    .user-menu__panel {
        position: fixed; top: calc(var(--sk-appbar-h) + var(--sk-safe-top) + 6px); left: 12px; right: auto;
        width: min(300px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - var(--sk-appbar-h) - var(--sk-bottomnav-h) - 40px);
        overflow-y: auto; border-radius: 18px; padding: 8px; transform-origin: top left; transform: translateY(-6px) scale(0.97);
        box-shadow: var(--sk-shadow-lg); z-index: 1100;
    }
    .user-menu__panel.is-open { transform: none; }
    .user-menu__header { padding: 12px 12px 14px; }
    .user-menu__header strong { font-size: var(--fs-md); }
    .user-menu__item { min-height: 48px; padding: 0 12px; font-size: var(--fs-md); border-radius: 12px; }
    .user-menu__item svg { width: 20px; height: 20px; }
    .main-header .sk-brand { min-height: 44px; }

    /* صفحه‌های داخلی: بازگشت + عنوان صفحه به‌جای نشان برند */
    .main-header--inner .logo { display: none; }
    .sk-appbar-inner { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; margin-left: 8px; }
    .sk-appbar-back {
        width: 44px; height: 44px; flex-shrink: 0; margin-right: -10px; border-radius: 12px;
        display: flex; align-items: center; justify-content: center; color: var(--sk-ink); font-size: 22px;
    }
    .sk-appbar-back:active { background: var(--sk-ground); }
    .sk-appbar-title { min-width: 0; font-size: var(--fs-md); font-weight: 800; color: var(--sk-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* بنر بالای صفحه‌ها فشرده: نوار بالا عنوان را نشان می‌دهد، پس بنر فقط معرفی کوتاه و ابزار اصلی صفحه است */
    .hs-hero, .ts-hero, .ct-hero, .cc-hero, .cv-hero, .ebp-hero, .bl-hero { padding: 22px 18px !important; border-radius: 18px !important; }
    .hs-hero__badge, .ts-hero__badge, .ct-hero__badge, .cc-hero__badge, .cv-hero__badge, .ebp-hero__badge, .bl-hero__badge,
    .hs-hero__decor, .ts-hero__decor, .ct-hero__decor, .cc-hero__decor, .cv-hero__decor, .ebp-hero__decor, .bl-hero__decor { display: none !important; }
    .hs-hero__title, .ts-hero__title, .ct-hero__title, .cc-hero__title, .cv-hero__title, .ebp-hero__title, .bl-hero__title {
        font-size: 1.35rem !important; line-height: 1.5 !important; margin-bottom: 8px !important;
    }
    .hs-hero__subtitle, .ts-hero__subtitle, .ct-hero__subtitle, .cc-hero__subtitle, .cv-hero__subtitle, .ebp-hero__subtitle, .bl-hero__subtitle {
        font-size: var(--fs-sm) !important; line-height: 1.85 !important; margin-bottom: 0;
    }

    [data-sk-filter-card] { padding: 12px !important; }
    [data-sk-filter-card] .box-header { margin: 0 !important; padding: 0 !important; border: none !important; gap: 8px; flex-wrap: nowrap; align-items: stretch; }
    [data-sk-filter-card] .box-header-titles { display: none; }
    [data-sk-filter-card] .box-header .btn-soft { min-height: 46px; border-radius: 14px; white-space: nowrap; }
    .sk-filter-toggle {
        flex: 1; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px;
        border: 1px solid var(--sk-line); border-radius: 14px; background: var(--sk-ground); color: var(--sk-ink);
        font-family: inherit; font-size: var(--fs-md); font-weight: 700; cursor: pointer;
    }
    .sk-filter-toggle svg { width: 20px; height: 20px; color: var(--sk-primary); flex-shrink: 0; }
    .sk-filter-toggle__count {
        min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 11px; background: var(--sk-primary); color: #FFFFFF;
        font-size: var(--fs-xs); display: inline-flex; align-items: center; justify-content: center;
    }
    .sk-filter-toggle__count[hidden] { display: none; }
    .sk-filter-toggle .sk-filter-toggle__chev { margin-right: auto; color: var(--sk-muted); transition: transform 0.2s ease; }
    [data-sk-filter-card].is-open .sk-filter-toggle__chev { transform: rotate(180deg); }
    [data-sk-filter-card] .sk-filter-body { display: none; margin-top: 14px; }
    [data-sk-filter-card].is-open .sk-filter-body { display: block; }

    .sk-limited > .sk-over { display: none !important; }
    .sk-more-btn {
        display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin-top: 10px;
        border: 1px solid var(--sk-primary-soft-border); border-radius: 14px; background: var(--sk-primary-soft); color: var(--sk-primary);
        font-family: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
    }

    /* جا برای نوار پایین تا انتهای صفحه زیر آن پنهان نشود */
    body { padding-bottom: calc(var(--sk-bottomnav-h) + var(--sk-safe-bottom)); }

    .sk-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--sk-z-bottomnav);
        display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
        height: var(--sk-bottomnav-h); padding: 4px 4px var(--sk-safe-bottom); box-sizing: content-box;
        background: var(--sk-surface); border-top: 1px solid var(--sk-line); box-shadow: 0 -2px 12px rgba(15, 37, 48, 0.05);
    }
    .sk-tabbar__item {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        color: var(--sk-muted); text-decoration: none; -webkit-tap-highlight-color: transparent;
    }
    .sk-tabbar__icon {
        position: relative; width: 56px; height: 30px; border-radius: 15px; font-size: 22px;
        display: flex; align-items: center; justify-content: center; transition: background 0.15s ease;
    }
    .sk-tabbar__label { font-size: 11.5px; font-weight: 500; line-height: 1.2; }
    .sk-tabbar__item.is-active { color: var(--sk-primary); }
    /* نشانگر زبانه‌ی فعال: یک قرص جدا (نه پس‌زمینه‌ی آیکون) تا هنگام رفتن به زبانه‌ی دیگر بلغزد */
    .sk-tabbar__icon > svg, .sk-tabbar__icon > .sk-ico { position: relative; z-index: 1; }
    .sk-tabbar__pill {
        position: absolute; inset: 0; border-radius: 15px; background: var(--sk-primary-soft);
        opacity: 0; transform: scaleX(0.55); transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.3, 0.9, 0.3, 1.15);
    }
    .sk-tabbar__item.is-active .sk-tabbar__pill { opacity: 1; transform: none; view-transition-name: sk-tab-pill; }
    .sk-tabbar__item:active .sk-tabbar__icon { transform: scale(0.92); }
    .sk-tabbar__icon { transition: transform 0.12s ease; }
    .sk-tabbar__label { transition: color 0.18s ease; }
    .sk-tabbar__item.is-active .sk-tabbar__label { font-weight: 700; }
    .sk-tabbar__badge {
        position: absolute; top: -3px; left: 8px; min-width: 19px; height: 19px; box-sizing: border-box; padding: 0 5px;
        border-radius: 10px; border: 2px solid var(--sk-surface); background: var(--sk-danger); color: #FFFFFF;
        font-size: 11px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center;
    }

    /* فوتر وب در موبایل فشرده است و در اپ نصب‌شده اصلاً نمایش داده نمی‌شود */
    /* ستون‌های پیوند همان فهرست زبانه‌ی «بیشتر» است؛ در موبایل فقط معرفی، راه‌های ارتباطی و حق نشر */
    .sk-footer { margin-top: 32px; padding-top: 24px; }
    .sk-footer__grid { grid-template-columns: 1fr; gap: 0; }
    .sk-footer__col { display: none; }
    .sk-footer__bottom { margin-top: 20px; }

    /* صفحه‌های ورود/ثبت‌نام: دکمه‌ی «ورود» نوار بالا تکراری است؛ پیوندهای متنی قابل لمس */
    .user-actions--auth { display: none; }
    .login-wrapper .link-primary, .login-wrapper .link-secondary, .register-wrapper .link-primary, .forgot-wrapper .back-link-wrapper a {
        display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
    }
    .sk-toast-host { bottom: calc(var(--sk-bottomnav-h) + var(--sk-safe-bottom) + 12px); }

    /* لایه‌های موجود صفحه‌ها که باید روی نوار پایین قرار بگیرند یا بالای آن بنشینند */
    .dash-nav-overlay { z-index: 955; }
    .dash-nav-sidebar { z-index: 960; }
    .hs-modal-scope .hs-toast { bottom: calc(var(--sk-bottomnav-h) + var(--sk-safe-bottom) + 12px); }
}

/* اپ نصب‌شده: نه فوتر وب، نه دعوت به نصب */
html.is-standalone .sk-footer, html.is-standalone .sk-install-banner { display: none !important; }
@media (display-mode: standalone) {
    .sk-footer, .sk-install-banner { display: none !important; }
}

/* ---------- اعلان داخل اپ برای پیام جدید (notify.js) ---------- */
.sk-msg-banner {
    position: fixed; top: calc(8px + var(--sk-safe-top)); left: 50%; z-index: calc(var(--sk-z-toast) + 1);
    width: min(440px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--sk-line); border-radius: 18px; background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sk-shadow-lg);
    font-family: inherit; text-align: right; cursor: pointer; color: var(--sk-ink);
    transform: translate(-50%, calc(-100% - 24px)); opacity: 0; visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.2s ease, visibility 0.32s;
}
.sk-msg-banner.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.sk-msg-banner__avatar {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--sk-primary); color: #FFFFFF;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; font-weight: 800;
}
.sk-msg-banner__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sk-msg-banner__name { font-size: var(--fs-sm); font-weight: 800; }
.sk-msg-banner__preview { font-size: var(--fs-sm); color: var(--sk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* شمارنده‌ی زبانه‌ی «گفتگوها» با رسیدن پیام تازه یک ضربه‌ی کوچک می‌خورد */
@keyframes skBadgeBump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.sk-tabbar__badge.is-bump { animation: skBadgeBump 0.45s ease; }
@media (prefers-reduced-motion: reduce) {
    .sk-msg-banner { transition: opacity 0.15s ease, visibility 0.15s; }
    .sk-tabbar__badge.is-bump { animation: none; }
}

/* ---------- کلید اعلان پیام‌ها در صفحه‌ی «بیشتر» ---------- */
.sk-more__push .sk-more__row-label { display: flex; flex-direction: column; gap: 2px; }
.sk-more__push .sk-more__row-label small { font-size: var(--fs-xs); font-weight: 500; color: var(--sk-muted); }
.sk-switch {
    position: relative; width: 46px; height: 28px; flex-shrink: 0; margin-right: auto; border-radius: 14px;
    background: var(--sk-line); transition: background 0.2s ease;
}
.sk-switch::after {
    content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 37, 48, 0.25); transition: transform 0.2s ease;
}
.sk-more__push[data-state="enabled"] .sk-switch { background: var(--sk-success); }
.sk-more__push[data-state="enabled"] .sk-switch::after { transform: translateX(-18px); }
.sk-more__push[data-state="denied"] .sk-switch, .sk-more__push[data-state="unsupported"] .sk-switch { opacity: 0.45; }

/* =========================================================
   جابه‌جایی نرم بین صفحه‌ها (View Transitions؛ کروم/سامسونگ اینترنت/سافاری جدید)
   base.html نوع جابه‌جایی را تعیین می‌کند: tab-next / tab-prev (زبانه‌ی بعدی/قبلی در نوار پایین)،
   forward (ورود به صفحه‌ی داخلی)، back (بازگشت). نوار بالا و پایین ثابت می‌مانند.
   ========================================================= */
@view-transition { navigation: auto; }

.main-header { view-transition-name: sk-appbar; }
@media (max-width: 768px) {
    .sk-tabbar { view-transition-name: sk-tabbar; }
}

@keyframes sk-vt-fade-in { from { opacity: 0; } }
@keyframes sk-vt-fade-out { to { opacity: 0; } }
@keyframes sk-vt-in-from-left { from { transform: translateX(-32px); } }
@keyframes sk-vt-in-from-right { from { transform: translateX(32px); } }
@keyframes sk-vt-out-to-left { to { transform: translateX(-24px); } }
@keyframes sk-vt-out-to-right { to { transform: translateX(24px); } }
@keyframes sk-vt-rise { from { transform: translateY(10px); } }

::view-transition-old(root) { animation: 140ms ease-in both sk-vt-fade-out; }
::view-transition-new(root) { animation: 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both sk-vt-fade-in, 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both sk-vt-rise; }

/* نوار پایین و بالا: فقط برچسب/عنوان نرم عوض می‌شود؛ قرص زبانه‌ی فعال با فنر ملایم جابه‌جا می‌شود */
::view-transition-old(sk-tabbar), ::view-transition-new(sk-tabbar),
::view-transition-old(sk-appbar), ::view-transition-new(sk-appbar) { animation-duration: 180ms; }
::view-transition-group(sk-tab-pill) { animation-duration: 340ms; animation-timing-function: cubic-bezier(0.3, 1.25, 0.4, 1); }

@media (max-width: 768px) {
    /* راست‌به‌چپ: زبانه‌ی بعدی سمت چپ است؛ محتوای تازه از چپ می‌آید و قبلی به راست می‌رود */
    html:active-view-transition-type(tab-next)::view-transition-new(root),
    html:active-view-transition-type(forward)::view-transition-new(root) {
        animation: 200ms ease-out both sk-vt-fade-in, 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both sk-vt-in-from-left;
    }
    html:active-view-transition-type(tab-next)::view-transition-old(root),
    html:active-view-transition-type(forward)::view-transition-old(root) {
        animation: 150ms ease-in both sk-vt-fade-out, 200ms ease-in both sk-vt-out-to-right;
    }
    html:active-view-transition-type(tab-prev)::view-transition-new(root),
    html:active-view-transition-type(back)::view-transition-new(root) {
        animation: 200ms ease-out both sk-vt-fade-in, 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both sk-vt-in-from-right;
    }
    html:active-view-transition-type(tab-prev)::view-transition-old(root),
    html:active-view-transition-type(back)::view-transition-old(root) {
        animation: 150ms ease-in both sk-vt-fade-out, 200ms ease-in both sk-vt-out-to-left;
    }
}

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .sk-tabbar__pill, .sk-tabbar__icon { transition: none; }
}

/* ---------- لوگو و آیکون بارگذاری‌شده از پنل مدیریت ----------
   حاشیه‌ی خالی و زمینه‌ی سفید لوگو هنگام بارگذاری حذف می‌شود (core/branding.py: process_logo)؛ اندازه‌ی سربرگ
   بر اساس شکل لوگو: افقی ۴۰ پیکسل، عمودی/مربعی (نماد بالای نام) ۵۲ پیکسل در سربرگ ۷۰ پیکسلی دسکتاپ؛
   در نوار ۵۶ پیکسلی اپ ۳۴ و ۴۴ پیکسل */
.sk-brand__logo { display: block; width: auto; height: 40px; max-width: 200px; object-fit: contain; }
.sk-brand--stacked .sk-brand__logo { height: 52px; max-width: 120px; }
.sk-footer .sk-brand__logo { height: 44px; max-width: 220px; }
.sk-footer .sk-brand--stacked .sk-brand__logo { height: 64px; }
.sk-install-banner__icon img, .sk-install-hero__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
@media (max-width: 768px) {
    .main-header .sk-brand__logo { height: 34px; max-width: 170px; }
    .main-header .sk-brand--stacked .sk-brand__logo { height: 44px; max-width: 100px; }
}
