/*
 * قالب Formula — پایه سایت.
 *
 * ظاهر کپی سایت المنتوری قبلی است (کیت ۶، سربرگ ۴۳، فوتر ۴۵/۹۱۰، منوی ۴۱۷، ۴۰۴ = ۱۰۰۶؛
 * مرجع در _theme_ref/). رنگ و اندازه همیشه var(--fml-x, مقدار).
 *
 * وزن قانون‌ها عمدی است:
 *   - ریست (کپی ریست Hello بی رنگ صورتی) با وزن خود Hello؛
 *   - کیت با `.fml-kit` به وزن (۰،۱،۱)، همان وزن `.elementor-kit-6`، تا CSS افزونه که با آن
 *     کنار آمده بود همان نتیجه را بدهد؛
 *   - اجزای قالب زیر `.fml-kit` (۰،۲،۰) تا از قانون لینک و دکمه کیت ببرند.
 */

/* ---------- فونت: وزیرمتن متغیر (همان فونت سفارشی کیت؛ woff2 به جای ttf ۲۴۰ کیلوبایتی) ---------- */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* رنگ‌های قالب = توکن‌های شیوه‌نامه افزونه (fap-msg.css، DESIGN-SYSTEM.md)؛ نام‌های --fml-* فقط برای
   CSS قالب می‌مانند تا همه برگه‌ها یک‌جا با سایت و پنل هم‌رنگ باشند. fallback = مقدار همان توکن. */
:root {
    --fml-primary: var(--fap-brand-500, #1aa29a);
    --fml-secondary: var(--fap-c-muted, #566a6e);
    --fml-text: var(--fap-c-ink, #13292d);
    --fml-accent: var(--fap-brand-600, #0d8276);
    --fml-white: var(--fap-c-surface, #fff);
    --fml-ink: var(--fap-c-ink, #13292d);
    --fml-muted: var(--fap-c-muted, #566a6e);
    --fml-bg: var(--fap-c-bg-soft, #f8fafa);
    --fml-line: var(--fap-c-line, #e0e8e9);
    --fml-navy: #002A41;
    /* سطح تیره (باکس ویدیوی شعب، بخش فروش، کارت خرید سفارشی، سایه عکس شعب): همان سرمه‌ای‌خاکستری
       طرح اصلی، نه سبز تیره متن (--fap-c-ink)؛ سبز در سطح بزرگ سایت را یک‌دست سبز می‌کرد */
    --fml-dark: var(--fap-c-dark, #1d212b); /* توکن افزونه؛ همان نوارهای پایانی صفحه‌های ابزار */
    --fml-glass: rgba(255, 255, 255, .8);
    --fml-divider: rgba(84, 89, 95, .26);
    --fml-font: 'Vazirmatn', 'FAP Vazirmatn', Tahoma, sans-serif;
    --fml-h1: 35px;
    --fml-h2: 30px;
    --fml-container: 1270px;
}

@media (max-width: 1024px) {
    :root {
        --fml-h1: 30px;
        --fml-h2: 26px;
        --fml-container: 1024px;
    }
}

@media (max-width: 767px) {
    :root {
        --fml-h1: 28px;
        --fml-h2: 22px;
        --fml-container: 767px;
    }
}

/* ---------- ریست (کپی reset.css پوسته Hello؛ #c36 صورتی جایش را به رنگ برند داده) ---------- */
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
/* لنگر همین صفحه (اسکرول نرم fapPage، پرش مرورگر، رسیدن از صفحه دیگر) زیر سربرگ چسبان نرود:
   سربرگ شیشه‌ای دسکتاپ ۸۸ و نوار اپی موبایل ۵۶، به‌اضافه ۱۲ تا ۱۶ فاصله */
html { scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 100px); }
@media (max-width: 1024px) {
    html { scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + env(safe-area-inset-top, 0px) + 72px); }
}
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; } /* مقصد لنگر فوکوس می‌گیرد، نه حلقه */
*, :after, :before { box-sizing: border-box; }
body { background-color: var(--fml-bg, #FAFAFA); color: var(--fml-text, #111); font-family: var(--fml-font); font-size: 1rem; font-weight: 400; line-height: 1.5; margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, h5, h6 { color: inherit; font-family: inherit; font-weight: 500; line-height: 1.2; margin-block-end: 1rem; margin-block-start: .5rem; }
h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.75rem; } h4 { font-size: 1.5rem; } h5 { font-size: 1.25rem; } h6 { font-size: 1rem; }
p { margin-block-end: .9rem; margin-block-start: 0; }
hr { box-sizing: content-box; height: 0; overflow: visible; }
pre { font-family: monospace, monospace; font-size: 1em; white-space: pre-wrap; }
a { background-color: transparent; color: var(--fml-accent, #21C6B5); text-decoration: none; }
a:active, a:hover { color: var(--fml-primary, #1DAA9B); }
a:not([href]):not([tabindex]), a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover { color: inherit; text-decoration: none; }
a:not([href]):not([tabindex]):focus { outline: 0; }
b, strong { font-weight: bolder; }
code, kbd, samp { font-family: monospace, monospace; font-size: 1em; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -.25em; } sup { top: -.5em; }
img { border-style: none; height: auto; max-width: 100%; }
details { display: block; } summary { display: list-item; }
[hidden], template { display: none; }
label { display: inline-block; line-height: 1; vertical-align: middle; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: 1rem; line-height: 1.5; margin: 0; }
input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea {
    border: 1px solid #666; border-radius: 3px; padding: .5rem 1rem; transition: all .3s; width: 100%;
}
input[type=date]:focus, input[type=email]:focus, input[type=number]:focus, input[type=password]:focus, input[type=search]:focus, input[type=tel]:focus, input[type=text]:focus, input[type=url]:focus, select:focus, textarea:focus { border-color: #333; }
button, input { overflow: visible; }
button, select { text-transform: none; }
/* وزن صفر: fap-ui وابستگی همین فایل است، پس fap-msg.css پیش از آن چاپ می‌شود و ریست هم‌وزن
   ([type=submit] = ۰،۱،۰) چیدمان تک‌کلاسه .fap-btn را می‌برد (display:inline-block → چرخنده زیر متن). */
:where([type=button], [type=reset], [type=submit], button) { -webkit-appearance: button; width: auto; }
:where([type=button], [type=submit], button) {
    background-color: transparent; border: 1px solid var(--fml-accent, #21C6B5); border-radius: 3px; color: var(--fml-accent, #21C6B5);
    display: inline-block; font-size: 1rem; font-weight: 400; padding: .5rem 1rem; text-align: center; transition: all .3s;
    -webkit-user-select: none; user-select: none; white-space: nowrap;
}
[type=button]:focus:not(:focus-visible), [type=submit]:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
/* وزن صفر: فقط دکمه بی‌استایل فیروزه‌ای می‌شود؛ جزء کلاس‌دار افزونه (باکس پیام، پنجره، چیپ) هاور خودش را نگه می‌دارد */
:where([type=button], [type=submit], button):where(:focus, :hover) { background-color: var(--fml-accent, #21C6B5); color: var(--fap-c-on-solid, #fff); text-decoration: none; }
[type=button]:not(:disabled), [type=submit]:not(:disabled), button:not(:disabled) { cursor: pointer; }
fieldset { padding: .35em .75em .625em; }
legend { box-sizing: border-box; color: inherit; display: table; max-width: 100%; padding: 0; white-space: normal; }
progress { vertical-align: baseline; }
textarea { overflow: auto; resize: vertical; }
[type=checkbox], [type=radio] { box-sizing: border-box; padding: 0; }
[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button { height: auto; }
[type=search] { -webkit-appearance: textfield; outline-offset: -2px; }
[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
select { display: block; }
table { background-color: transparent; border-collapse: collapse; border-spacing: 0; font-size: .9em; margin-block-end: 15px; width: 100%; }
table td, table th { border: 1px solid hsla(0, 0%, 50%, .502); line-height: 1.5; padding: 15px; vertical-align: top; }
table th { font-weight: 700; }
table tbody > tr:nth-child(odd) > td, table tbody > tr:nth-child(odd) > th { background-color: hsla(0, 0%, 50%, .071); }
dd, dl, dt, li, ol, ul { background: transparent; border: 0; font-size: 100%; margin-block-end: 0; margin-block-start: 0; outline: 0; vertical-align: baseline; }

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: #eee; clip: auto !important; clip-path: none; color: #333; display: block; font-size: 1rem;
    height: auto; left: 5px; line-height: normal; padding: 12px 24px; text-decoration: none; top: 5px; width: auto; z-index: 100000;
}

/* ---------- کیت ۶ (همان وزن .elementor-kit-6) ---------- */
.fml-kit { background-color: var(--fml-bg, #FAFAFA); color: var(--fml-text, #111); font-family: var(--fml-font); font-weight: 400; line-height: 1.4em; }
.fml-kit a { color: var(--fml-accent, #21C6B5); font-family: var(--fml-font); font-weight: 400; line-height: 1.4em; }
.fml-kit a:hover { color: var(--fml-primary, #1DAA9B); }
.fml-kit h1 { color: var(--fml-primary, #1DAA9B); font-family: var(--fml-font); font-size: var(--fml-h1, 35px); font-weight: 600; line-height: 1.4em; }
.fml-kit h2 { color: var(--fml-primary, #1DAA9B); font-family: var(--fml-font); font-size: var(--fml-h2, 30px); font-weight: 400; line-height: 1.4em; }
.fml-kit h3 { color: var(--fml-accent, #21C6B5); font-family: var(--fml-font); font-size: var(--fml-h2, 30px); font-weight: 400; line-height: 1.4em; }
.fml-kit h4 { color: var(--fml-ink, #1D212B); font-family: var(--fml-font); font-weight: 400; line-height: 1.4em; }
.fml-kit h5, .fml-kit h6 { color: var(--fml-text, #111); font-family: var(--fml-font); font-weight: 400; line-height: 1.4em; }

/* ---------- قاب صفحه ---------- */
.fml-kit .fml-page { display: block; min-height: 40vh; outline: none; }
.fml-kit .fml-skip:focus { position: fixed !important; }

/* ---------- نوار تماس موبایل (بالای سربرگ، با اسکرول می‌رود) ---------- */
.fml-kit .fml-callbar { display: none; }

/* ---------- سربرگ چسبان شیشه‌ای ---------- */
.fml-kit .fml-header {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 99;
    padding: 10px;
}
.fml-kit .fml-header__bar {
    max-width: var(--fml-container, 1270px);
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 10px;
    background-color: var(--fml-glass, rgba(255, 255, 255, .8));
    border: 2px solid var(--fml-white, #fff);
    border-radius: 20px;
    box-shadow: 1px 2px 10px -4px rgba(0, 0, 0, .05);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.fml-kit .fml-logo { flex: 0 0 auto; width: 210px; max-width: 210px; display: block; line-height: 0; }
.fml-kit .fml-logo img { display: block; width: 100%; height: auto; }

.fml-kit .fml-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.fml-kit .fml-nav__list { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.fml-kit .fml-nav__list > li { position: relative; display: flex; }
.fml-kit .fml-nav__list > li + li { margin-inline-start: -13px; }
.fml-kit .fml-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--fml-secondary, #54595F);
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.5;
    transition: color .3s;
}
.fml-kit .fml-nav__list > li:not(:last-child) .fml-nav__link::after {
    content: "";
    position: absolute;
    inset-inline-end: 6px;
    top: 32.5%;
    height: 35%;
    border-inline-start: 1px solid var(--fml-divider, rgba(84, 89, 95, .26));
}
.fml-kit .fml-nav__link:hover,
.fml-kit .fml-nav__link.is-current { color: var(--fml-primary, #1DAA9B); }

.fml-kit .fml-header__tools { flex: 0 0 auto; width: 350px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.fml-kit .fml-callbox { display: flex; align-items: center; gap: 7px; color: var(--fml-primary, #1DAA9B); }
.fml-kit .fml-callbox__icon { display: flex; color: var(--fap-brand-500, #1aa29a); }
.fml-kit .fml-callbox__text { display: flex; flex-direction: column; gap: 2px; }
.fml-kit .fml-callbox__title { color: var(--fml-primary, #1DAA9B); font-size: 14px; font-weight: 500; line-height: 1.2; }
.fml-kit .fml-callbox__num { color: var(--fml-ink, #1D212B); font-size: 18px; font-weight: 500; line-height: 1.1; }
/* کلید حالت روشن و تیره و آیکن حساب: جفت دکمه گرد هم‌اندازه، جدا از مرکز تماس با یک خط (جای ۱، انتخاب کاربر).
   آیکن کلید (تبدیل ماه به خورشید) از fap-msg.css، .fap-theme-ico. */
.fml-kit .fml-header__sep { width: 1px; height: 28px; margin: 0 6px; background: var(--fap-c-line, #e0e8e9); }
.fml-kit .fml-header__acts { display: flex; align-items: center; gap: 6px; }
.fml-kit .fml-account,
.fml-kit .fml-themebtn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fml-ink, #1D212B); line-height: 0; cursor: pointer; transition: color .15s, background-color .15s; }
.fml-kit .fml-account:hover,
.fml-kit .fml-themebtn:hover { color: var(--fap-c-link, #0d8276); background: var(--fap-c-fill, #e8efef); }
.fml-kit .fml-account:focus-visible,
.fml-kit .fml-themebtn:focus-visible { outline: 2px solid var(--fap-brand-600, #0d8276); outline-offset: 2px; }
.fml-kit .fml-account .fap-i,
.fml-kit .fml-themebtn .fap-theme-ico { width: 24px; height: 24px; }

/* ---------- سربرگ اپی (موبایل و تبلت؛ parts/site-header.php و formula_app_bar) ----------
 * صفحه اصلی: لوگو، جست‌وجو و تماس. بقیه: برگشت، عنوان کوتاه صفحه، دکمه‌های همان صفحه و تماس.
 * تخت و تمام‌عرض مثل نوار بالای اپ؛ نوار شیشه‌ای دسکتاپ این‌جا پنهان است. */
.fml-kit .fml-appbar { display: none; }

@media (max-width: 1024px) {
    .fml-kit .fml-header { padding: 0; }
    .fml-kit .fml-header__bar { display: none; }
    .fml-kit .fml-appbar {
        display: flex;
        align-items: center;
        gap: 4px;
        min-height: 56px;
        padding: env(safe-area-inset-top, 0px) 6px 0;
        background-color: var(--fml-white, #fff);
        border-bottom: 1px solid var(--fap-c-line, #e0e8e9);
    }
    .fml-kit .fml-appbar--home { padding-inline-start: 14px; }
    /* هم‌اندازه لوگوی سربرگ موبایل پنل حساب (account-panel.css) */
    .fml-kit .fml-appbar__logo { display: block; flex: 0 0 auto; line-height: 0; }
    .fml-kit .fml-appbar__logo img { display: block; width: auto; max-width: 120px; height: 26px; object-fit: contain; }
    .fml-kit .fml-appbar__title {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        color: var(--fap-c-ink, #13292d);
        font-size: var(--fap-fs-lg, 16px);
        font-weight: 700;
        line-height: 1.4;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    /* عنوان جمع‌شونده (data-title-follow، theme.js): تا عنوان بزرگ صفحه دیده می‌شود پنهان */
    .fml-kit .fml-appbar__title { transition: opacity var(--fap-dur-fast, .15s) ease; }
    .fml-kit .fml-appbar__title.is-off { opacity: 0; }
    .fml-kit .fml-appbar__acts { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-inline-start: auto; }
    /* دکمه‌های قاب‌دار گوشه‌گرد (همان سربرگ موبایل پنل، account-panel.css): برگشت فیروزه‌ای کم‌رنگ،
       بقیه خاکستری کم‌رنگ */
    .fml-kit .fml-appbar .fml-appbar__btn {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: var(--fap-r-md, 12px);
        background: var(--fap-c-bg, #f3f7f7);
        color: var(--fap-c-text, #34494d);
        line-height: 0;
        -webkit-tap-highlight-color: transparent;
        transition: background-color .15s, transform .15s;
    }
    .fml-kit .fml-appbar .fml-appbar__btn:hover,
    .fml-kit .fml-appbar .fml-appbar__btn:focus-visible { background: var(--fap-brand-100, #e3f4f1); color: var(--fap-c-link, #0d8276); }
    .fml-kit .fml-appbar .fml-appbar__btn:active { transform: scale(.94); }
    .fml-kit .fml-appbar .fml-appbar__back { margin-inline-end: 6px; background: var(--fap-brand-100, #e3f4f1); color: var(--fap-c-link, #0d8276); }
    .fml-kit .fml-appbar .fml-appbar__back:hover,
    .fml-kit .fml-appbar .fml-appbar__back:active { background: var(--fap-brand-200, #c6e9e4); }
    .fml-kit .fml-appbar .fml-appbar__btn:focus-visible { outline: 2px solid var(--fap-brand-600, #0d8276); outline-offset: -2px; }
    .fml-kit .fml-appbar .fml-appbar__btn svg { width: 21px; height: 21px; }
    /* دکمه علاقه‌مندی: همان حالت دکمه داخل صفحه (theme.js) */
    .fml-kit .fml-appbar .fml-appbar__btn.is-on { color: var(--fap-c-error, #c81e1e); }
    .fml-kit .fml-appbar .fml-appbar__btn.is-on svg,
    .fml-kit .fml-appbar .fml-appbar__btn.is-on svg path { fill: currentColor; }
    .fml-kit .fml-nav { display: none; }
}

/* موبایل (۷۶۷ و کمتر) */
@media (max-width: 767px) {
    .fml-kit .fml-callbar {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 29px;
        padding-top: 1px;
        background-color: var(--fml-primary, #1DAA9B);
        color: var(--fap-c-on-solid, #fff);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.7;
    }
    .fml-kit .fml-callbar:hover { color: var(--fap-c-on-solid, #fff); }
    /* فقط صفحه اصلی؛ بقیه دکمه تماس سربرگ اپی را دارند */
    body.fml-kit:not(.fml-is-home) .fml-callbar { display: none; }
}

/* نوار مدیر وردپرس روی موبایل باریک با صفحه اسکرول می‌شود (absolute)؛ سربرگ از لبه بالا بچسبد */
@media (max-width: 600px) {
    .fml-kit .fml-header { top: 0; }
}

/* ---------- فوتر (کپی ۴۵) ---------- */
.fml-kit .fml-footer { border-top: 1px solid var(--fml-line, #E2E8F0); padding: 40px 10px; }
.fml-kit .fml-footer__grid {
    max-width: var(--fml-container, 1270px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.fml-kit .fml-footer__brand, .fml-kit .fml-footer__col { display: flex; flex-direction: column; gap: 14px; padding: 10px; }
.fml-kit .fml-footer__brand { gap: 10px; align-items: center; text-align: center; }
.fml-kit .fml-footer__logo { display: block; width: 100%; line-height: 0; }
.fml-kit .fml-footer__logo img { width: 100%; height: auto; }
.fml-kit .fml-footer__tagline { margin: 0; color: var(--fml-text, #111); font-size: 17px; font-weight: 600; line-height: 34px; }
.fml-kit .fml-footer__title { margin: 0; color: var(--fap-brand-700, #0b6c62); font-size: 16px; font-weight: 700; line-height: 1.4; }
.fml-kit .fml-footer__links { list-style: none; margin: 0; padding: 0; }
.fml-kit .fml-footer__links li { padding-bottom: 4px; }
.fml-kit .fml-footer__links li + li { margin-top: 4px; }
.fml-kit .fml-footer__links li:last-child { padding-bottom: 0; }
.fml-kit .fml-footer__links a { display: flex; color: var(--fml-muted, #64748B); font-size: 14px; line-height: 1.4; }
.fml-kit .fml-footer__links a:hover { color: var(--fml-primary, #1DAA9B); }
.fml-kit .fml-footer__col--contact { gap: 12px; }
.fml-kit .fml-footer__part { display: flex; flex-direction: column; gap: 12px; }
.fml-kit .fml-footer__phone { display: flex; align-items: flex-start; gap: 10px; margin-top: -6px; color: var(--fap-c-ink, #13292d); font-size: var(--fap-fs-2xl, 22px); font-weight: 700; line-height: 1.4; }
.fml-kit .fml-footer__phone .fap-i { color: var(--fap-brand-500, #1aa29a); flex: 0 0 auto; }
.fml-kit .fml-footer__phone:hover { color: var(--fml-primary, #1DAA9B); }
.fml-kit .fml-footer__permits { display: flex; flex-wrap: wrap; gap: 10px; }
.fml-kit .fml-permit { display: flex; align-items: center; justify-content: center; width: 80px; height: 86px; padding: 7px; background: var(--fml-white, #fff); border-radius: 11px; }
.fml-kit .fml-permit img { width: 66px; height: auto; max-height: 72px; object-fit: contain; }
/* «اپ فرمولا»: عنوان و جمله | باکس‌های فروشگاه (.fap-stores شیوه‌نامه افزونه) */
.fml-kit .fml-footer__app { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; max-width: var(--fml-container, 1270px); margin: 10px auto 0; padding: 10px; }
.fml-kit .fml-footer__apptext { display: flex; flex-direction: column; gap: 6px; }
.fml-kit .fml-footer__apptext p { margin: 0; color: var(--fml-muted, #64748B); font-size: 14px; line-height: 1.6; }
/* «اپ فرمولا» از ۱.۱.۱۷ (.fml-footer__col--app، آخرین فرزند گرید؛ خواست کاربر ۲۰۲۶-۱۱-۲۷): زیر ۱۲۰۰ کارت
   حاشیه‌دار تمام‌عرض زیر ستون‌ها با آیکن اپ؛ از ۱۲۰۰ ستون پنجم مثل بقیه ستون‌ها (عنوان، جمله، نشان‌ها
   دوبه‌دو)، بی آیکن و بی قاب، تا جای خالی نماند. زیر ۱۲۰۰ ستون پنجم تنگ است و شعار دوخطی می‌شد.
   طرح قبلی (.fml-footer__app بالا) با ثابت FORMULA_FOOTER_APP_V1 (site-footer.php). */
.fml-kit .fml-footer__col--app {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-top: 10px;
    padding: 14px 18px;
    border: 1px solid var(--fap-c-line, #e0e8e9);
    border-radius: var(--fap-r-lg, 16px);
    background: var(--fap-c-surface, #fff);
}
.fml-kit .fml-footer__apphead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fml-kit .fml-footer__appicon { display: block; flex: 0 0 auto; width: 48px; height: 48px; }
.fml-kit .fml-footer__col--app .fml-footer__apptext { gap: 2px; }
.fml-kit .fml-footer__col--app .fml-footer__apptext p { text-wrap: balance; } /* دوخطی متوازن، نه یک کلمه تنها در خط دوم */
.fml-kit .fml-footer__col--app .fap-stores.fap-stores { gap: 10px; padding: 0; }
.fml-kit .fml-footer__col--app .fap-store.fap-store img { width: 140px; }
@media (min-width: 1200px) {
    .fml-kit .fml-footer__grid--app { grid-template-columns: 1.15fr 1fr .85fr 1fr 1.1fr; }
    .fml-kit .fml-footer__col--app {
        grid-column: auto;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 14px;
        margin: 0;
        padding: 10px;
        border: 0;
        border-radius: 0;
        background: none;
    }
    .fml-kit .fml-footer__col--app .fml-footer__appicon { display: none; }
    .fml-kit .fml-footer__col--app .fml-footer__apptext { gap: 14px; }
    .fml-kit .fml-footer__col--app .fap-stores.fap-stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 280px; }
    .fml-kit .fml-footer__col--app .fap-store.fap-store img,
    .fml-kit .fml-footer__col--app button.fap-store.fap-store { width: 100%; }
}
/* فقط نشان‌های همان گوشی. آیفون و آیپد (هر مرورگر iOS وب‌کیت است و فقط آن -webkit-touch-callout دارد؛ بی
   جاوااسکریپت تا با کش صفحه و پوسته مجله هم درست باشد): بازار، مایکت و فایل اندروید به کارش نمی‌آیند، پس
   اگر «نصب نسخه وب» هست فقط همان. گوشی اندروید: «نسخه وب» همان اپ اندروید است، پس اگر فروشگاهی هست پنهان،
   و بقیه یک ردیف سه‌تایی. مرورگر بی :has() همه را مثل قبل می‌بیند. */
@supports (-webkit-touch-callout: none) {
    .fml-kit .fml-footer__col--app .fap-stores:has(.fap-store--web) > li:not(:has(> .fap-store--web)) { display: none; }
}
/* آیفون و آیپد زیر ۱۲۰۰ (۱.۱.۱۸، خواست کاربر ۲۰۲۶-۱۱-۲۹): به‌جای نشان تنهای «نصب نسخه وب» در ردیفی جدا
   (جای خالی کنارش)، دکمه «نصب» در همان ردیف سربرگ کارت، ته ردیف (سمت چپ). دکمه فقط وقتی چاپ می‌شود که نشان
   نسخه وب هست (site-footer.php) و همان data-pwa-install را دارد؛ در مجله پوسته آن را پیوند /#install می‌کند.
   از ۱۲۰۰ (ستون پنجم) و روی اندروید و دسکتاپ همان نشان‌ها می‌مانند. */
.fml-kit .fml-footer__appbtn.fml-footer__appbtn { display: none; margin-inline-start: auto; }
@supports (-webkit-touch-callout: none) {
    @media (max-width: 1199px) {
        .fml-kit .fml-footer__col--app:has(.fml-footer__appbtn) .fap-stores { display: none; }
        .fml-kit .fml-footer__col--app .fml-footer__apphead:has(> .fml-footer__appbtn) { flex: 1 1 auto; }
        .fml-kit .fml-footer__appbtn.fml-footer__appbtn { display: inline-flex; }
    }
}
.fml-kit .fml-footer__rule { max-width: var(--fml-container, 1270px); margin: 20px auto; border: 0; border-top: 1px solid var(--fml-line, #E2E8F0); }
.fml-kit .fml-copy { margin: 0; text-align: center; color: var(--fml-secondary, #54595F); font-size: 15px; font-weight: 200; line-height: 21px; }
.fml-kit .fml-footer--mini { padding: 10px; }
/* فقط اپ نصب‌شده (کلاس fap-app روی html؛ افزونه، fap-pwa.js و اسکریپت اسپلش در head). سایت دست نمی‌خورد.
   پیوندهای فوتر (تماس، درباره، قوانین، مجوزها، مجله) در گروه «فرمولا» حساب من هم هست. */
html.fap-app .fml-footer, html[data-fap-store] .fml-footer { display: none; } /* data-fap-store: اپ بازار و مایکت، مستقل از حالت اپ وب */

@media (max-width: 767px) {
    .fml-kit .fml-footer { padding: 10px 0 20px; }
    .fml-kit .fml-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fml-kit .fml-footer__brand { grid-column: 1 / -1; }
    /* مرکز تماس و مجوزها کنار هم (روی دسکتاپ زیر هم، یک ستون) */
    .fml-kit .fml-footer__col--contact { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-inline: 0; }
    .fml-kit .fml-footer__part { padding-inline: 10px; }
    .fml-kit .fml-footer__logo { width: 220px; }
    .fml-kit .fml-footer__col--contact { padding-bottom: 0; }
    .fml-kit .fml-footer__phone { font-size: var(--fap-fs-xl, 18px); }
    .fml-kit .fml-footer__phone .fap-i { width: 24px; height: 24px; }
    .fml-kit .fml-footer__permits { gap: 8px; }
    .fml-kit .fml-permit { width: 66px; height: 72px; padding: 6px; }
    .fml-kit .fml-permit img { width: 54px; max-height: 60px; }
    .fml-kit .fml-footer__app { flex-direction: column; align-items: stretch; margin-top: 0; }
    .fml-kit .fml-footer__col--app { flex-direction: column; align-items: stretch; gap: 12px; margin: 8px 10px 0; padding: 14px; }
    .fml-kit .fml-footer__rule { margin: 10px 0; }
    .fml-kit .fml-footer--mini { padding: 10px 0 20px; }
}
@media (max-width: 600px) {
    /* شبکه دوستونه نشان‌ها از fap-msg.css است؛ پهنای ۱۴۰ کارت بالا این‌جا به پهنای ستون برمی‌گردد */
    .fml-kit .fml-footer__col--app .fap-store.fap-store img,
    .fml-kit .fml-footer__col--app button.fap-store.fap-store { width: 100%; }
    @supports not (-webkit-touch-callout: none) {
        .fml-kit .fml-footer__col--app .fap-stores:has(> li > a.fap-store:not(.fap-store--web)) > li:has(> .fap-store--web) { display: none; }
        .fml-kit .fml-footer__col--app .fap-stores.fap-stores:has(> li > a.fap-store:not(.fap-store--web)) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    }
}

/* دکمه‌های قالب: همان .fap-btn شیوه‌نامه (دکمه قالبی جدا نداریم) */

/* ---------- ۴۰۴ (کپی ۱۰۰۶) ---------- */
.fml-kit .fml-404 {
    position: relative;
    max-width: var(--fml-container, 1270px);
    min-height: 675px;
    margin: 0 auto;
    padding: 0 10px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.fml-kit .fml-404__glow {
    position: absolute;
    top: -186px;
    left: 50%;
    width: 460px;
    height: 460px;
    margin-left: -230px;
    border-radius: 9999px;
    background-color: rgba(26, 162, 154, .15);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}
.fml-kit .fml-404 > :not(.fml-404__glow) { position: relative; z-index: 1; }
/* حاله نباید زیر سربرگ با خط صاف بریده شود. دسکتاپ: مثل هیروی خانه (home.css) پشت سربرگ شیشه‌ای ادامه دارد
   و لبه بالای محتوا آن را نمی‌برد؛ فقط چپ و راست و پایین بریده می‌شود. موبایل و تبلت: سربرگ اپی مات است و
   هر حاله‌ای که به آن برسد زیر لبه‌اش بریده می‌شود، پس فقط حاله کوچک پشت چرخ (.fml-404__halo) می‌ماند. */
@media (min-width: 1025px) {
    .fml-kit .fml-404 { overflow: clip visible; clip-path: inset(-400px 0 0 0); }
}
@media (max-width: 1024px) {
    .fml-kit .fml-404__glow { display: none; }
}
.fml-kit .fml-404__art {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin: 30px 0;
    font-family: 'Vazirmatn', sans-serif;
    -webkit-user-select: none;
    user-select: none;
    opacity: 0;
    animation: fml404-fade-up .8s cubic-bezier(.22, 1, .36, 1) .1s forwards;
}
.fml-kit .fml-404__digit {
    font-size: 110px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.04em;
    background: linear-gradient(180deg, #0f172a 0%, #334155 60%, #1AA29A 130%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.fml-kit .fml-404__wheel { position: relative; flex-shrink: 0; width: 100px; height: 100px; animation: fml404-float 5s ease-in-out infinite; }
.fml-kit .fml-404__halo { position: absolute; inset: 0; border-radius: 9999px; background: rgba(26, 162, 154, .15); filter: blur(28px); }
.fml-kit .fml-404__wheel svg { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 22px 36px rgba(15, 23, 42, .25)); }
.fml-kit .fml-404__wheel .fm404anim-spin { transform-origin: 100px 100px; animation: fml404-spin 14s linear infinite; }
.fml-kit .fml-404__title { margin: 10px 0 0; color: var(--fml-ink, #1D212B); font-size: var(--fml-h1, 35px); font-weight: 600; line-height: 1.4; text-align: center; }
.fml-kit .fml-404__text { margin: 10px 0 0; max-width: 820px; color: var(--fml-muted, #64748B); font-size: 18px; line-height: 1.4; text-align: center; }
.fml-kit .fml-404__search { width: 100%; max-width: 882px; margin-top: 10px; }
.fml-kit .fml-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 10px; }

@media (min-width: 640px) {
    .fml-kit .fml-404__art { gap: 1.5rem; }
    .fml-kit .fml-404__digit { font-size: 180px; }
    .fml-kit .fml-404__wheel { width: 160px; height: 160px; }
}
@media (min-width: 1024px) {
    .fml-kit .fml-404__digit { font-size: 210px; }
    .fml-kit .fml-404__wheel { width: 190px; height: 190px; }
}
@media (max-width: 767px) {
    .fml-kit .fml-404 { min-height: 0; }
    /* ۲۴ بالا: دنباله حاله پشت چرخ به لبه سربرگ مات نمی‌رسد */
    .fml-kit .fml-404__art { margin: 24px 0 20px; }
    .fml-kit .fml-404__text { font-size: 16px; }
    .fml-kit .fml-404__search { max-width: 280px; }
    .fml-kit .fml-404__actions { flex-direction: column; width: 100%; }
    .fml-kit .fml-404__actions .fml-btn { width: 100%; }
}

@keyframes fml404-fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fml404-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes fml404-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- برگه متنی ساده ---------- */
.fml-kit .fml-page-text { max-width: var(--fml-container, 1270px); margin: 0 auto; padding: 20px 10px 40px; }
.fml-kit .fml-page-text__title { margin-top: 0; }
/* برگه شورت‌کددار: همان قاب .site-main پوسته Hello (۵۰۰/۶۰۰/۸۰۰/۱۱۴۰) که فرم‌ها با آن طراحی شده‌اند */
.fml-kit .fml-page-app { width: 100%; margin-inline: auto; } /* فاصله بالا و پایین از خود محتوای برگه، مثل Hello */
@media (max-width: 575px) { .fml-kit .fml-page-app { padding-inline: 10px; } }
@media (min-width: 576px) { .fml-kit .fml-page-app { max-width: 500px; } }
@media (min-width: 768px) { .fml-kit .fml-page-app { max-width: 600px; } }
@media (min-width: 992px) { .fml-kit .fml-page-app { max-width: 800px; } }
@media (min-width: 1200px) { .fml-kit .fml-page-app { max-width: 1140px; } }

/* ---------- ناوبری نرم: اسکلت عمومی و کارت خطا (fap-nav.js با پیکربندی Site_Nav افزونه) ---------- */
.fml-kit .fml-nav-skel { max-width: calc(var(--fml-container, 1270px) + 20px); min-height: 60vh; margin: 0 auto; padding: 40px 10px 60px; }
.fml-kit .fml-nav-skel__in { display: flex; flex-direction: column; gap: 14px; }
.fml-kit .fml-nav-skel .fap-sk--title { width: 38%; height: 26px; }
.fml-kit .fml-nav-skel .fap-sk--line:nth-child(3) { width: 72%; }
.fml-kit .fml-nav-skel .fap-sk--block { height: 180px; }
.fml-kit .fml-nav-error { max-width: 520px; margin: 60px auto; padding: 28px 20px; background: var(--fml-white, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: var(--fap-r-lg, 16px); text-align: center; }
.fml-kit .fml-nav-error h2 { margin: 0 0 8px; color: var(--fml-ink, #1D212B); font-size: 20px; font-weight: 700; }
.fml-kit .fml-nav-error p { margin: 0 0 18px; color: var(--fml-muted, #64748B); }
.fml-kit .fml-nav-error__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* اسکلت هر نوع صفحه (parts/nav-skeletons.php): هم‌چیدمان صفحه واقعی تا با رسیدن داده چیزی نپرد */
.fml-kit .fml-skel { max-width: 1290px; min-height: 70vh; margin: 0 auto; padding: 10px; display: flex; flex-direction: column; gap: 16px; }
.fml-kit .fml-skel .fml-skel__short { width: 45%; }
.fml-kit .fml-skel__bar { padding: 18px; background: var(--fml-white, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: 20px; }
.fml-kit .fml-skel__adgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; align-items: start; }
.fml-kit .fml-skel__gallery { grid-column: span 3; }
.fml-kit .fml-skel__gallery .fap-sk { aspect-ratio: 16 / 9; border-radius: var(--fap-r-lg, 16px); }
.fml-kit .fml-skel__side { grid-column: span 2; display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--fml-white, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: 20px; }
.fml-kit .fml-skel__side .fap-sk--title { width: 70%; height: 22px; }
.fml-kit .fml-skel__price { height: 44px; }
.fml-kit .fml-skel__btn { height: 50px; }
.fml-kit .fml-skel__hero { height: 320px; border-radius: 30px; }
.fml-kit .fml-skel__hero--sm { height: 180px; border-radius: 20px; }
.fml-kit .fml-skel__search { height: 56px; max-width: 760px; width: 100%; margin: 0 auto; border-radius: 16px; }
.fml-kit .fml-skel__qs { display: inline-block; width: 120px; vertical-align: middle; } /* جای نام چرخان کادر جست‌وجوی صفحه اصلی */
.fml-kit .fml-skel__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fml-kit .fml-skel__card { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--fml-white, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: 16px; }
.fml-kit .fml-skel__thumb { aspect-ratio: 4 / 3; }
.fml-kit .fml-skel__info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; padding: 30px 0; }
.fml-kit .fml-skel__text { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.fml-kit .fml-skel__text .fap-sk--title { width: 40%; height: 30px; }
.fml-kit .fml-skel__media { min-height: 420px; border-radius: 20px; }
/* فهرست خودرو: فیلترها کنار و ردیف کارت‌ها (دسکتاپ)؛ چیپ‌ها و کارت عمودی (موبایل) */
.fml-kit .fml-skel--cars { max-width: 980px; }
.fml-kit .fml-skel__ctitle { width: 260px; max-width: 60%; height: 30px; }
.fml-kit .fml-skel__chips { display: none; gap: 8px; overflow: hidden; }
.fml-kit .fml-skel__chips .fap-sk { flex: 0 0 auto; width: 96px; height: 40px; border-radius: 999px; }
.fml-kit .fml-skel__carsgrid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.fml-kit .fml-skel__filters { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--fml-white, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: 20px; }
.fml-kit .fml-skel__filters .fap-sk--block { height: 62px; border-radius: var(--fap-r-md, 12px); }
.fml-kit .fml-skel__rows { display: flex; flex-direction: column; gap: 14px; }
.fml-kit .fml-skel__row { display: flex; gap: 14px; padding: 10px; background: var(--fml-white, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: 16px; }
.fml-kit .fml-skel__rthumb { flex: 0 0 210px; height: 130px; border-radius: var(--fap-r-md, 12px); }
.fml-kit .fml-skel__rtext { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
/* فرم چندمرحله‌ای */
.fml-kit .fml-skel--form { max-width: 720px; }
.fml-kit .fml-skel__ftitle { width: 55%; height: 28px; align-self: center; }
.fml-kit .fml-skel__steps { display: flex; justify-content: space-between; padding: 0 8%; }
.fml-kit .fml-skel__dot { width: 34px; height: 34px; border-radius: 50%; }
.fml-kit .fml-skel__fcard { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--fml-white, #fff); border: 1px solid var(--fap-c-line, #e0e8e9); border-radius: 20px; }
.fml-kit .fml-skel__field { height: 50px; border-radius: var(--fap-r-md, 12px); }
/* هاب «حساب من» */
.fml-kit .fml-skel--hub { max-width: 640px; }
.fml-kit .fml-skel__row-sm { height: 40px; border-radius: var(--fap-r-sm, 10px); }
@media (max-width: 1024px) {
    .fml-kit .fml-skel__adgrid { grid-template-columns: minmax(0, 1fr); }
    .fml-kit .fml-skel__gallery, .fml-kit .fml-skel__side { grid-column: auto; }
    .fml-kit .fml-skel__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fml-kit .fml-skel__carsgrid { grid-template-columns: minmax(0, 1fr); }
    .fml-kit .fml-skel__filters { display: none; }
    .fml-kit .fml-skel__chips { display: flex; }
}
@media (max-width: 767px) {
    .fml-kit .fml-skel__gallery .fap-sk { aspect-ratio: 4 / 3; }
    .fml-kit .fml-skel__hero { height: 220px; border-radius: 20px; }
    .fml-kit .fml-skel__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .fml-kit .fml-skel__row { flex-direction: column; }
    .fml-kit .fml-skel__rthumb { flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 16 / 10; }
    .fml-kit .fml-skel__info { grid-template-columns: minmax(0, 1fr); gap: 15px; padding: 0; }
    .fml-kit .fml-skel__media { order: -1; min-height: 200px; }
}

/* لودر بخش پویای قاب ثابت (fap-nav.js) وقتی سایه بازدید قبل نیست (بار اول): [data-live].is-loader تا
   رسیدن داده تازه؛ ارتفاع (min-height) از بازدید قبل. سایه خودش چیدمان خود بخش است (fap-nav.css). */
.fml-kit :is([data-live], .fap-live-out).is-loader { display: flex; flex-direction: column; } /* .fap-live-out: لودری که روی داده رسیده محو می‌شود */
.fml-kit .fml-skel-live { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; width: 100%; }
/* لودر ریل پیشنهادها (fap-rec-rail، کارت‌های افقی recommended-ads.css): یک ردیف، هر کارت هم‌عرض و
   هم‌قد کارت واقعی (۳۳۱: تصویر ۱۶۰ و متن)، نه شبکه دوستونی که روی گوشی دو ردیف می‌شد و بخش را بلندتر
   می‌کرد. با padding خود ریل همان ۳۷۷ پیکسل؛ با رسیدن کارت‌ها چیزی نمی‌پرد. */
.fml-kit .fap-rec-rail .fml-skel__cards { display: flex; gap: 14px; overflow: hidden; }
.fml-kit .fap-rec-rail .fml-skel__card { flex: 0 0 78%; box-sizing: border-box; height: 331px; padding: 10px; border-radius: 20px; }
.fml-kit .fap-rec-rail .fml-skel__thumb { flex: 0 0 160px; aspect-ratio: auto; border-radius: 14px; }
@media (min-width: 560px) { .fml-kit .fap-rec-rail .fml-skel__card { flex-basis: 46%; } }
@media (min-width: 768px) { .fml-kit .fap-rec-rail .fml-skel__card { flex-basis: 31%; } }
@media (min-width: 1024px) { .fml-kit .fap-rec-rail .fml-skel__card { flex-basis: calc((100% - 42px) / 4); } }
.fml-kit .fml-skel-live__fill { flex: 1 1 auto; min-height: 64px; border-radius: 16px; }

/* ---------- موبایل: ردیف‌های اسکرول افقی تا لبه صفحه ----------
   ردیفی که قاب ندارد (ریل کارت آگهی‌ها: صفحه اصلی، آگهی مشابه، کاتالوگ؛ نوار تب شعب؛ مسیر راهنمای بلند) تا لبه صفحه
   می‌رود تا آیتم‌ها از لبه وارد و خارج شوند، مثل نوع بدنه؛ آیتم اول همان‌جای قبل، هم‌تراز محتوا. ظرف
   این ردیف‌ها همه‌جا وسط صفحه است، پس calc(50% - 50vw) همان فاصله ظرف تا لبه است. scroll-padding: جای
   چسبیدن کارت‌ها (scroll-snap) لبه محتواست، نه لبه صفحه؛ درصدش به عرض خود ریل برمی‌گردد نه ظرف، پس عدد
   حاشیه صفحه (--fml-gutter: ۱۰، کاتالوگ ۱۶). لودر ریل هم تا لبه (پدینگ انتها تا عرض کارت‌ها همان ۷۸٪
   کارت واقعی بماند). ردیف داخل کارت (چیپ فیلتر /car/، حروف کاتالوگ، استوری‌ها در home.css) تا لبه همان
   کارت می‌رود. */
@media (max-width: 767px) {
    .fml-kit { --fml-gutter: 10px; }
    .fml-kit .fap-rv-wrap { --fml-gutter: 16px; }
    .fml-kit .fap-rec-rail,
    .fml-kit .fap-rec--tabs .fap-rec-tabs,
    .fml-kit .fap-crumbs .fap-crumbs__list { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); scroll-padding-inline: var(--fml-gutter, 10px); }
    .fml-kit .fap-rec--tabs .fap-rec-head--tabs { margin-inline: 0; padding-inline: 0; }
    .fml-kit .fap-rec-rail .fml-skel__cards { margin-inline-end: calc(50% - 50vw); padding-inline-end: calc(50vw - 50%); }
}

/* ریشه صفحه فوکوس می‌گیرد (صفحه‌خوان)؛ قاب فوکوس روی کل صفحه نه */
.fml-kit #fml-page:focus { outline: none; }

/* ---------- حرکت کمتر ---------- */
@media (prefers-reduced-motion: reduce) {
    .fml-kit .fml-404__art, .fml-kit .fml-404__wheel, .fml-kit .fml-404__wheel .fm404anim-spin { animation: none; opacity: 1; }
}

/* ---------- حالت تیره ----------
   رنگ‌ها از توکن‌های شیوه‌نامه (fap-msg.css)؛ این‌جا فقط نقش‌هایی که قالب خودش دارد. فعلا پیش‌نمایش مدیر
   کل (Theme_Mode افزونه)؛ لوگوی تیره هم فقط برای همان چاپ می‌شود (formula_logo_dark، جابه‌جایی در fap-msg.css). */
[data-fap-theme="dark"] {
    --fml-bg: var(--fap-c-bg, #131415);   /* زمینه صفحه یک پله تیره‌تر از کارت */
    --fml-glass: color-mix(in srgb, var(--fap-c-surface, #1d1e20) 84%, transparent);
    --fml-divider: var(--fap-c-line, #313236);
}
[data-fap-theme="dark"] .fml-kit .fml-header__bar { border-color: var(--fap-c-line, #313236); box-shadow: none; }
/* هاله فیروزه‌ای روی زمینه تیره درخشش می‌شد */
[data-fap-theme="dark"] .fml-kit :is(.fml-404__glow, .fml-404__halo) { display: none; }
[data-fap-theme="dark"] .fml-kit .fml-404__digit { background-image: linear-gradient(180deg, var(--fap-c-ink, #ececee) 0%, var(--fap-c-muted, #9a9da2) 60%, var(--fap-brand-500, #1aa29a) 130%); }
/* مجوزها تصویر رسمی روی سفیدند */
[data-fap-theme="dark"] .fml-kit .fml-permit { background: var(--fap-c-on-solid, #fff); }
