/*!
 * ============================================================
 * اسکریپت نیازمندی و درج آگهی ژوپین
 * نویسنده: سیامک یونسی
 * ارتباط با نویسنده: 09211710910 - 09126622567
 * نسخه: ۱.۲۰.۱
 * ------------------------------------------------------------
 * Xupin Classifieds Script
 * Author: Siamak Younesi
 * Contact: 09211710910 - 09126622567
 * Version: 1.20.1
 * ============================================================
 */
/* ویژگی hidden همیشه مقدم است (حتی روی دکمه‌ها و کارت‌هایی که display دارند) */
[hidden] { display: none !important; }
.draft-state { text-align: center; margin-top: 6px; }
.draft-state:empty { display: none; }
/* ژوپین (Xupin) — نویسنده: سیامک یونسی (Siamak Younesi) — ارتباط با نویسنده: 09211710910 - 09126622567 */
/* یک فایل CSS برای همه قالب‌ها: قالب با data-theme و حالت روشن/تیره با data-mode روی <html> تعیین می‌شود. */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/Vazirmatn-Variable.woff2") format("woff2-variations"), url("../fonts/vazirmatn/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ─────────── توکن‌ها ─────────── */
:root {
  --brand: #0B7A66;
  --accent: #4F46E5;
  --radius: 16px;
  --glass-blur: 18px;
  --glass-alpha: .6;
  --bg-1: #0B7A66;
  --bg-2: #6366F1;
  --bg-3: #F59E0B;

  --ink: #15191E;
  --muted: #4A5260;
  --faint: #8C95A1;
  --line: rgba(21, 25, 30, .1);
  --page: #E8EEF3;
  --surface: rgba(255, 255, 255, var(--glass-alpha));
  --surface-strong: rgba(255, 255, 255, .82);
  --surface-border: rgba(255, 255, 255, .85);
  --field: rgba(255, 255, 255, .85);
  --soft: #E3F3EF;
  --soft-ink: #09695A;
  --gold-bg: #FDF1D8; --gold-ink: #8A4B08;
  --red-bg: #FDE7E4; --red-ink: #A8231A;
  --blue-bg: #EEF4FF; --blue-ink: #2A4594;
  --warn-bg: #FFF6EC; --warn-ink: #6B3A06;
  --shadow: 0 8px 28px rgba(21, 25, 30, .08);
  --shadow-pop: 0 10px 30px rgba(21, 25, 30, .14);
  --blur: blur(var(--glass-blur));
  --cta: linear-gradient(135deg, var(--brand), var(--accent));
  --r-sm: calc(var(--radius) * .6);
  --r-lg: calc(var(--radius) * 1.5);
}

html[data-theme="clean"] {
  --page: #F2F4F7;
  --muted: #586170;
  --surface: #FFFFFF;
  --surface-strong: #FFFFFF;
  --surface-border: #E3E7EC;
  --field: #F4F6F8;
  --line: #E6E9ED;
  --shadow: 0 1px 2px rgba(21, 25, 30, .04);
  --shadow-pop: 0 6px 16px rgba(21, 25, 30, .18);
  --blur: none;
  --cta: var(--brand);
  --r-lg: var(--radius);
}

/* حالت تیره */
html[data-mode="dark"] {
  --ink: #E8ECF1;
  --muted: #AEB6C2;
  --faint: #7D8796;
  --line: rgba(255, 255, 255, .1);
  --page: #0E1217;
  --surface: rgba(28, 33, 41, var(--glass-alpha));
  --surface-strong: rgba(32, 38, 47, .9);
  --surface-border: rgba(255, 255, 255, .08);
  --field: rgba(255, 255, 255, .06);
  --soft: rgba(11, 122, 102, .22);
  --soft-ink: #5FD3BC;
  --gold-bg: rgba(245, 158, 11, .18); --gold-ink: #F7C66A;
  --red-bg: rgba(239, 68, 68, .18); --red-ink: #FCA5A5;
  --blue-bg: rgba(99, 102, 241, .18); --blue-ink: #A5B4FC;
  --warn-bg: rgba(245, 158, 11, .14); --warn-ink: #FCD34D;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
}
html[data-mode="dark"][data-theme="clean"] { --page: #12161B; --surface: #181D23; --surface-strong: #181D23; --line: #262C34; --surface-border: #262C34; --field: #1F252C; }

@media (prefers-color-scheme: dark) {
  html[data-mode="auto"] {
    --ink: #E8ECF1; --muted: #AEB6C2; --faint: #7D8796; --line: rgba(255, 255, 255, .1); --page: #0E1217;
    --surface: rgba(28, 33, 41, var(--glass-alpha)); --surface-strong: rgba(32, 38, 47, .9); --surface-border: rgba(255, 255, 255, .08);
    --field: rgba(255, 255, 255, .06); --soft: rgba(11, 122, 102, .22); --soft-ink: #5FD3BC;
    --gold-bg: rgba(245, 158, 11, .18); --gold-ink: #F7C66A; --red-bg: rgba(239, 68, 68, .18); --red-ink: #FCA5A5;
    --blue-bg: rgba(99, 102, 241, .18); --blue-ink: #A5B4FC; --warn-bg: rgba(245, 158, 11, .14); --warn-ink: #FCD34D;
  }
  html[data-mode="auto"][data-theme="clean"] { --page: #12161B; --surface: #181D23; --surface-strong: #181D23; --line: #262C34; --surface-border: #262C34; --field: #1F252C; }
}

/* ─────────── پایه ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="glass"] body {
  background-color: var(--page);
  background-image:
    radial-gradient(circle at 92% 3%, color-mix(in srgb, var(--bg-1) 34%, transparent), transparent 36%),
    radial-gradient(circle at 0% 28%, color-mix(in srgb, var(--bg-2) 24%, transparent), transparent 42%),
    radial-gradient(circle at 100% 60%, color-mix(in srgb, var(--bg-3) 22%, transparent), transparent 40%),
    radial-gradient(circle at 8% 92%, color-mix(in srgb, var(--bg-1) 20%, transparent), transparent 40%);
  background-attachment: fixed;
}
a { color: var(--soft-ink); text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.5; }
h1 { font-size: 19px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ─────────── چیدمان ─────────── */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.page { display: flex; flex-direction: column; gap: 14px; padding: 12px 0 96px; }
.split { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 960px) {
  .wrap { padding: 0 20px; }
  .page { padding-bottom: 32px; gap: 18px; }
  .split { flex-direction: row; align-items: flex-start; }
  .split > .side { width: 300px; flex: none; position: sticky; top: 92px; }
  .split > .main { flex: 1; min-width: 0; }
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap-x { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ─────────── سطح‌ها ─────────── */
.card {
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--surface-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 14px;
}
html[data-theme="clean"] .card { box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-gap > * + * { margin-top: 12px; }

/* ─────────── هدر ─────────── */
.topbar { position: sticky; top: 0; z-index: 40; padding: 10px 0; }
html[data-theme="clean"] .topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 0; }
.topbar .bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--surface-border); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
html[data-theme="clean"] .topbar .bar { border: 0; box-shadow: none; padding: 0; background: transparent; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -.5px; color: var(--brand); display: flex; align-items: center; gap: 8px; }
.logo img { height: 34px; width: auto; }
.city-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--surface-border); background: var(--field); font-size: 14px; font-weight: 500;
}
.city-btn .icon { width: 18px; height: 18px; color: var(--brand); }
.search {
  order: 3; flex: 1 1 100%; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  background: var(--field); border: 1px solid var(--surface-border); border-radius: var(--r-sm); color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--ink); }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.top-actions .desk { display: none; }
@media (min-width: 960px) {
  .search { order: 0; flex: 1 1 auto; max-width: 520px; }
  .top-actions .desk { display: inline-flex; }
}

/* ─────────── منوی پایین موبایل ─────────── */
.bottom-nav {
  position: fixed; inset-inline: 12px; bottom: 12px; z-index: 45; height: 64px;
  display: flex; align-items: center; justify-content: space-around;
  background: var(--surface-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
html[data-theme="clean"] .bottom-nav { inset-inline: 0; bottom: 0; border-radius: 0; border-width: 1px 0 0; box-shadow: none; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; font-size: 11px; color: var(--muted); }
.bottom-nav a.on { color: var(--brand); font-weight: 700; }
.bottom-nav .fab {
  width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; background: var(--cta); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent);
}
html[data-theme="clean"] .bottom-nav .fab { border-radius: 50%; }
@media (min-width: 960px) { .bottom-nav { display: none; } }
body.focus .bottom-nav { display: none; }
body.focus .footer { padding-bottom: 24px; }

/* ─────────── دکمه و فرم ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid var(--surface-border); background: var(--field); color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .12s ease, opacity .12s;
}
.btn:hover { color: var(--ink); opacity: .92; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--cta); border: 0; color: #fff; }
.btn-primary:hover { color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--brand); color: var(--brand); }
.btn-danger { background: var(--red-bg); border: 0; color: var(--red-ink); }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; font-size: 15px; font-weight: 700; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 44px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.label .req { color: var(--red-ink); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--field); color: var(--ink); outline: none;
}
.textarea { min-height: 120px; line-height: 1.9; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error { font-size: 12px; color: var(--red-ink); margin-top: 4px; }
.field { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--field);
}
.choice input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.choice.on, .choice:has(input:checked) { border: 1.5px solid var(--brand); background: var(--soft); }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--field); font-size: 14px; }
.segmented input:checked + span { background: var(--soft); border-color: var(--brand); color: var(--soft-ink); font-weight: 700; }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); }

/* ─────────── تراشه و برچسب ─────────── */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px;
  border: 1px solid var(--surface-border); background: var(--field); color: var(--ink); font-size: 13px; white-space: nowrap; cursor: pointer;
}
.chip.on { background: var(--soft); border-color: var(--brand); color: var(--soft-ink); font-weight: 700; }
.chip .icon { width: 16px; height: 16px; }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1.8; }
.badge .icon { width: 14px; height: 14px; }
.b-gold { background: var(--gold-bg); color: var(--gold-ink); }
.b-red { background: var(--red-bg); color: var(--red-ink); }
.b-green { background: var(--soft); color: var(--soft-ink); }
.b-blue { background: var(--blue-bg); color: var(--blue-ink); }
.b-gray { background: var(--field); color: var(--muted); }

/* ─────────── استوری ─────────── */
.stories { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); font-size: 12px; }
.story .ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--brand), var(--accent)); }
html[data-theme="clean"] .story .ring { background: var(--brand); }
.story .ring img, .story .ring span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--surface-strong); border: 2px solid var(--surface-strong); display: grid; place-items: center; color: var(--brand); }
.story.add .ring { background: none; border: 2px dashed color-mix(in srgb, var(--brand) 55%, transparent); }
.story .name { max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─────────── دسته‌ها ─────────── */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
@media (min-width: 600px) { .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 960px) { .cats { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); font-size: 12px; text-align: center; line-height: 1.5; }
.cat .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: var(--brand); background: var(--surface-strong); border: 1px solid var(--surface-border); box-shadow: 0 4px 12px rgba(21, 25, 30, .06); }
html[data-theme="clean"] .cat .ic { background: var(--soft); border: 0; box-shadow: none; border-radius: 14px; }
.cat .ic .icon { width: 24px; height: 24px; }

/* ─────────── کارت آگهی ─────────── */
.ads { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 680px) { .ads { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ads.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ad {
  display: flex; gap: 12px; padding: 10px; color: var(--ink); position: relative;
  background: var(--surface); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--surface-border); border-radius: calc(var(--radius) * 1.25); box-shadow: var(--shadow);
}
.ad:hover { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
html[data-theme="clean"] .ads { gap: 0; }
html[data-theme="clean"] .ad { border-width: 0 0 1px; border-radius: 0; padding: 14px 0; background: transparent; }
html[data-theme="clean"] .ads { column-gap: 24px; }
.ad .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-inline-start: 2px; }
.ad .title { font-size: 15px; font-weight: 600; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad .price { font-size: 14px; font-weight: 700; margin-top: auto; }
.ad .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ad .thumb { width: 112px; height: 112px; flex: none; border-radius: calc(var(--radius) * .85); background: var(--field); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.ad .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad.featured { background: color-mix(in srgb, var(--gold-bg) 75%, transparent); border-color: color-mix(in srgb, var(--gold-ink) 22%, transparent); }
html[data-theme="clean"] .ad.featured { background: var(--gold-bg); border-radius: var(--radius); padding: 12px; margin: 6px 0; border: 1px solid color-mix(in srgb, var(--gold-ink) 22%, transparent); }

/* ─────────── صفحه آگهی ─────────── */
.gallery { position: relative; aspect-ratio: 4 / 3; background: var(--field); border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; color: var(--faint); }
@media (min-width: 960px) { .gallery { aspect-ratio: auto; height: 460px; } }
.gallery .slides { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .slides::-webkit-scrollbar { display: none; }
/* ۱.۳.۲: گالری فقط افقی ورق می‌خورد؛ عکس و ویدیو داخل کادر بالا و پایین نمی‌روند */
.gallery .slides { position: absolute; inset: 0; overflow-y: hidden; overscroll-behavior-x: contain; background: #0d1014; align-items: stretch; }
.gallery .slides > img, .gallery .slides > .slide-video { height: 100%; max-height: 100%; min-height: 0; }
.gallery .slides img { flex: none; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; background: #0d1014; }
.gallery .count { position: absolute; bottom: 12px; left: 12px; padding: 2px 10px; border-radius: 12px; background: rgba(21, 25, 30, .65); color: #fff; font-size: 12px; }
.gallery .thumbs { position: absolute; bottom: 10px; right: 10px; display: flex; gap: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-child { border-top: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: left; }
.facts { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.fact .v { text-align: center; padding: 0 4px; overflow-wrap: anywhere; }
.fact { display: flex; flex-direction: column; align-items: center; padding: 10px 0; border-radius: 14px; background: var(--field); }
.fact .k { font-size: 12px; color: var(--muted); }
.fact .v { font-size: 15px; font-weight: 700; }
.desc { white-space: pre-line; font-size: 14px; line-height: 2; margin: 0; overflow-wrap: anywhere; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.9; }
.note .icon { margin-top: 3px; }
.note-blue { background: var(--blue-bg); color: var(--blue-ink); }
.note-warn { background: var(--warn-bg); color: var(--warn-ink); }
.note-green { background: var(--soft); color: var(--soft-ink); }
.note-red { background: var(--red-bg); color: var(--red-ink); }
.contact-bar { position: sticky; bottom: 0; z-index: 30; display: flex; gap: 10px; padding: 10px; margin: 0 -2px; }
.contact-bar .inner { display: flex; gap: 10px; width: 100%; padding: 10px; border-radius: var(--r-lg); background: var(--surface-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--surface-border); box-shadow: var(--shadow-pop); }
html[data-theme="clean"] .contact-bar .inner { border-radius: 0; box-shadow: none; border-width: 1px 0 0; }
.contact-bar .btn { flex: 1; }
@media (max-width: 959px) { .ad-page .contact-bar { bottom: 84px; } html[data-theme="clean"] .ad-page .contact-bar { bottom: 64px; } }
.mapbox { height: 150px; border-radius: var(--radius); background: color-mix(in srgb, var(--soft) 60%, var(--field)); display: grid; place-items: center; }
.mapbox .circle { width: 76px; height: 76px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 18%, transparent); border: 2px solid var(--brand); }

/* ─────────── ویزارد درج آگهی ─────────── */
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width .25s ease; }
.step { display: none; }
.step.on { display: block; }
.found { display: flex; flex-wrap: wrap; gap: 8px; }
.found span { padding: 5px 10px; border-radius: 12px; background: var(--surface-strong); border: 1px solid var(--line); font-size: 13px; }
.uploader { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .uploader { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.up-item { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--field); }
.up-item img { width: 100%; height: 100%; object-fit: cover; }
.up-item .x { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(21, 25, 30, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.up-item .main-tag { position: absolute; bottom: 6px; right: 6px; padding: 0 8px; border-radius: 8px; background: rgba(21, 25, 30, .7); color: #fff; font-size: 11px; }
.up-item.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shimmer 1.1s infinite; }
.up-add { aspect-ratio: 1; border-radius: 14px; border: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--brand); cursor: pointer; font-size: 12px; background: transparent; }
.tree-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: right; }
.tree-item:hover { background: var(--field); }
.tree-item .icon:last-child { margin-inline-start: auto; color: var(--faint); }
.sticky-actions { position: sticky; bottom: 0; padding: 10px 0; }
@media (max-width: 959px) { .post-page .sticky-actions { bottom: 0; } }
.price-words { font-size: 12px; color: var(--soft-ink); margin-top: 4px; min-height: 18px; }

/* ─────────── مدال و برگه کشویی ─────────── */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-end; justify-content: center; background: rgba(10, 13, 17, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal.on { display: flex; }
.modal .sheet { width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; padding: 16px; border-radius: 24px 24px 0 0; background: var(--surface-strong); border: 1px solid var(--surface-border); box-shadow: var(--shadow-pop); }
html[data-mode="dark"] .modal .sheet, html[data-theme="glass"] .modal .sheet { -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
html[data-theme="clean"] .modal .sheet { background: var(--surface); }
@media (min-width: 680px) { .modal { align-items: center; } .modal .sheet { border-radius: 24px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.city-list { max-height: 50vh; overflow: auto; }
.city-item { display: flex; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--line); cursor: pointer; }
.city-item input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ─────────── پیام و اعلان ─────────── */
.flash { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: 92vw; padding: 10px 16px; border-radius: 14px; background: rgba(21, 25, 30, .9); color: #fff; font-size: 14px; box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }
.empty .icon { width: 44px; height: 44px; margin: 0 auto 8px; color: var(--faint); }
.banner-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 96px; border-radius: var(--r-lg); border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); color: var(--muted); font-size: 12px; text-align: center; }
.banner-slot strong { color: var(--ink); font-size: 14px; }

/* ─────────── صفحه‌بندی، تب، جدول ─────────── */
.pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center; border-radius: 12px; background: var(--field); border: 1px solid var(--surface-border); color: var(--ink); font-size: 14px; }
.pager .on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .off { opacity: .45; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.crumbs { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs a { color: var(--muted); }
.crumbs span:last-child { color: var(--ink); font-weight: 500; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.chart .bar { flex: 1; min-width: 4px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, transparent)); position: relative; }
.chart .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 2px 8px; border-radius: 8px; background: var(--ink); color: var(--page); font-size: 11px; margin-bottom: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 680px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 12px; border-radius: var(--radius); background: var(--field); }
.stat .n { font-size: 22px; font-weight: 800; }
.otp-input { letter-spacing: 12px; text-align: center; font-size: 24px; font-weight: 700; direction: ltr; }
.captcha-row { display: flex; gap: 8px; align-items: stretch; }
.captcha-row img { height: 46px; border-radius: 10px; background: #fff; cursor: pointer; }

/* ─────────── فوتر ─────────── */
.footer { padding: 18px 12px 100px; text-align: center; font-size: 12px; line-height: 2; color: var(--muted); }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-bottom: 8px; }
.foot-cols { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 36px; margin-bottom: 6px; }
.foot-cols nav { flex-direction: column; align-items: center; gap: 0; margin: 0; }
.foot-h { font-weight: 700; color: var(--ink); }
@media (min-width: 680px) { .foot-cols nav { align-items: flex-start; } }
.footer nav a { color: var(--muted); }
.footer .author { opacity: .9; }
@media (min-width: 960px) { .footer { padding-bottom: 24px; } }

.skeleton { background: linear-gradient(90deg, var(--field), var(--surface-strong), var(--field)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 960px) { .mobile-only { display: none !important; } }
@media (max-width: 959px) { .desktop-only { display: none !important; } }

/* ───── نسخه ۱.۱: سایدبار، نقشه، اسکرول خودکار، انتخاب استان ───── */
.ad-price { font-size: 20px; font-weight: 800; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-actions > form { display: contents; }
.ad-actions .btn { flex: 1 1 auto; min-width: 0; }
.side .card { min-width: 0; }
.map { height: 240px; border-radius: var(--radius); overflow: hidden; background: var(--field); z-index: 0; position: relative; }
.map-pick { height: 300px; cursor: crosshair; }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 10px; direction: ltr; }
.renew-box { align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.feed-more { display: flex; justify-content: center; padding: 14px 0 4px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: xspin .8s linear infinite; }
@keyframes xspin { to { transform: rotate(360deg); } }
html.js .pager-fallback[hidden] { display: none; }

.side-block { display: flex; flex-direction: column; }
.side-title { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.side-block a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: 12px; color: var(--ink); font-size: 14px; }
.side-block a:hover { background: var(--field); }
.side-block a.on, .side-parent.on { background: var(--soft); color: var(--soft-ink); font-weight: 700; }
.side-block .icon { color: var(--muted); flex: none; }
.side-back { color: var(--muted) !important; font-size: 13px !important; }
.side-anc { font-size: 13px !important; color: var(--muted) !important; }
.side-parent { font-weight: 700; }
.side-children { display: flex; flex-direction: column; border-inline-start: 2px solid var(--line); margin-inline-start: 18px; padding-inline-start: 6px; }
.side-children a { min-height: 36px; font-size: 13.5px; }
.side-links .side-foot { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.side-links .side-foot a { min-height: 28px; padding: 0; font-size: 12px; color: var(--muted); }
.side-links .side-foot a:hover { background: none; color: var(--ink); }
.side-author { font-size: 11px; color: var(--faint); margin-top: 6px; line-height: 1.8; }
.dside-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 10px; }
@media (min-width: 960px) {
  .split > .side.dside, .split > .side.dside-home { display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 108px); overflow: auto; scrollbar-width: thin; padding-bottom: 6px; }
  .split > .side.dside-home { width: 260px; }
}
@media (max-width: 959px) {
  .dside { display: none; }
  .dside.open { display: flex; flex-direction: column; gap: 12px; position: fixed; inset: 0; z-index: 90; overflow: auto; padding: 14px 14px 90px; background: var(--page, var(--surface-strong)); }
  body.no-scroll { overflow: hidden; }
}

.city-crumb { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.city-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.city-chosen:empty { display: none; }
.city-item.prov { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: right; font: inherit; padding: 0; }
.city-item.prov .icon { width: 18px; height: 18px; color: var(--muted); }

/* ───── نسخه ۱.۲: چیدمان با منوی کناری، هدر و فوتر جدا ───── */
:root { --nav-w: 248px; --logo-h: 34px; }
html[data-theme="glass"] { --surface: rgba(255, 255, 255, calc(var(--glass-alpha) + .1)); --surface-border: rgba(255, 255, 255, .95); }
html[data-theme="glass"][data-mode="dark"] { --surface: rgba(28, 33, 41, calc(var(--glass-alpha) + .12)); --surface-border: rgba(255, 255, 255, .1); }
.shell { min-height: 100vh; }
.appmain { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.appmain > main { flex: 1; }
.logo img { height: var(--logo-h-set, var(--logo-h)); max-width: 170px; object-fit: contain; }
@media (max-width: 599px) { .logo img { height: min(var(--logo-h-set, 28px), 28px); } }
.top-logo { font-size: 21px; }
@media (max-width: 599px) { :root { --logo-h: 28px; } .top-logo { font-size: 19px; } }

/* منوی کناری */
.appnav {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 95; width: min(84vw, 300px);
  display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 18px; overflow-y: auto;
  background: var(--surface-strong); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border-inline-end: 1px solid var(--surface-border); box-shadow: var(--shadow-pop);
  transform: translateX(110%); transition: transform .22s ease; visibility: hidden;
}
html[data-theme="clean"] .appnav { background: var(--surface); }
.appnav.open { transform: none; visibility: visible; }
.nav-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(10, 13, 17, .45); display: none; }
.nav-backdrop.on { display: block; }
.appnav-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; border-bottom: 1px solid var(--line); }
.appnav-links { display: flex; flex-direction: column; gap: 2px; }
.appnav-links a, .appnav-cats a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink); font-size: 14.5px; }
.appnav-links a .icon, .appnav-cats a .icon { color: var(--muted); }
.appnav-links a:hover, .appnav-cats a:hover { background: var(--field); color: var(--ink); }
.appnav-links a.on { background: var(--soft); color: var(--soft-ink); font-weight: 700; }
.appnav-links a.on .icon { color: var(--soft-ink); }
.appnav-h { font-size: 12px; color: var(--faint); font-weight: 700; padding: 4px 12px; }
.appnav-cats { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; }
.appnav-cats a { min-height: 38px; font-size: 13.5px; }
.appnav-theme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); }
.appnav-theme button { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 34px; border: 0; border-radius: 10px; background: transparent; font-size: 12px; cursor: pointer; color: var(--muted); }
html[data-mode="light"] .appnav-theme [data-mode-set="light"], html[data-mode="dark"] .appnav-theme [data-mode-set="dark"], html[data-mode="auto"] .appnav-theme [data-mode-set="auto"] { background: var(--surface-strong); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.appnav-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; padding-top: 10px; }
body.nav-lock { overflow: hidden; }

/* هدر */
.topbar .bar { gap: 8px; }
.nav-toggle { flex: none; }
.mode-btn .i-sun { display: none; }
html[data-mode="dark"] .mode-btn .i-sun { display: block; }
html[data-mode="dark"] .mode-btn .i-moon { display: none; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.city-btn { margin-inline-start: auto; max-width: 46vw; }
.city-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="clean"] .topbar { background: var(--surface); }
@media (min-width: 960px) {
  .city-btn { margin-inline-start: 0; }
  .top-actions { margin-inline-start: auto; }
}
/* ۱.۳.۲: در موبایل/تبلت دکمه‌های بالا فقط در دسکتاپ هستند؛ کادر خالی‌شان فضا نگیرد تا انتخاب شهر به لبه‌ی کادر برود و ردیف لوگو با جستجو هم‌تراز شود */
@media (max-width: 959px) {
  .topbar .top-actions { display: none; }
  .topbar .city-btn { margin-inline-start: auto; }
}

/* دسکتاپ بزرگ: منوی ثابت کنار صفحه */
@media (min-width: 1200px) {
  .shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .appnav { position: sticky; top: 0; height: 100vh; width: auto; transform: none; visibility: visible; box-shadow: none; z-index: 30; }
  html[data-theme="glass"] .appnav { background: var(--surface); margin: 12px 12px 12px 0; height: calc(100vh - 24px); top: 12px; border: 1px solid var(--surface-border); border-radius: var(--r-lg); box-shadow: var(--shadow); }
  .appnav-close, .nav-toggle, .nav-backdrop, .top-logo { display: none !important; }
  html[data-theme="clean"] .appmain > main, html[data-theme="clean"] .site-footer { background: transparent; }
}

/* فوتر */
.site-footer { padding-top: 6px; padding-bottom: 96px; }
@media (min-width: 960px) { .site-footer { padding-bottom: 20px; } }
.foot-card { padding: 18px 18px 12px; font-size: 13px; color: var(--muted); line-height: 2; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 680px) { .foot-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .foot-about { grid-column: span 2; } }
.foot-brand { font-size: 17px; font-weight: 800; color: var(--brand); }
.foot-about p { margin: 4px 0 8px; }
.foot-contact { display: flex; flex-direction: column; }
.foot-contact a, .foot-col a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.foot-contact a:hover, .foot-col a:hover { color: var(--brand); }
.foot-col { display: flex; flex-direction: column; }
.foot-h { font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.foot-social { display: flex; gap: 8px; margin-top: 6px; }
.foot-social a { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--field); border: 1px solid var(--line); color: var(--ink); }
.foot-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }

/* سرتیتر بخش‌ها (مثل «جایگاه ویژه») */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.sec-head h2 { display: flex; align-items: center; gap: 10px; }
.sec-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink); }
.cats .cat .ic { background: var(--surface-strong); border: 1px solid var(--line); }
html[data-theme="clean"] .cats .cat .ic { background: var(--field); }

/* محتوا: صفحه، وبلاگ */
.prose { font-size: 15.5px; line-height: 2.05; overflow-wrap: anywhere; }
.prose h2 { font-size: 18px; margin: 18px 0 6px; }
.prose h3 { font-size: 16px; margin: 14px 0 4px; }
.prose p { margin: 0 0 12px; }
.prose img { border-radius: var(--r-sm); height: auto; margin: 10px auto; }
.prose ul, .prose ol { padding-inline-start: 22px; margin: 0 0 12px; }
.prose blockquote { margin: 12px 0; padding: 8px 14px; border-inline-start: 4px solid var(--brand); background: var(--field); border-radius: 8px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.prose iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--r-sm); }
.posts { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 680px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .posts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; color: var(--ink); }
.post-card:hover { color: var(--ink); transform: translateY(-1px); }
.post-card .cover { aspect-ratio: 16/9; background: var(--field); display: grid; place-items: center; color: var(--faint); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.post-card .t { font-weight: 800; font-size: 15px; line-height: 1.7; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--faint); }
.post-hero { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/8; background: var(--field); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.tagline { display: flex; flex-wrap: wrap; gap: 6px; }

/* ───── نسخه ۱.۲: اندازه و رنگ متن‌ها از تنظیمات، دکمه‌ها و گزینه‌های زیباتر ───── */
:root {
  --ui-shadow: 0 1px 2px rgba(21, 25, 30, .06), 0 2px 8px rgba(21, 25, 30, .06);
  --ui-shadow-hover: 0 4px 14px rgba(21, 25, 30, .12);
  --c-heading: var(--ink);
  --c-card-title: var(--ink); --c-card-fields: var(--muted); --c-card-price: var(--ink); --c-card-meta: var(--faint);
  --c-ad-label: var(--muted); --c-ad-value: var(--ink); --c-ad-price: var(--ink);
}
html[data-mode="dark"] { --ui-shadow: 0 1px 2px rgba(0, 0, 0, .3); --ui-shadow-hover: 0 4px 14px rgba(0, 0, 0, .45); }
body { font-size: var(--fs-base, 15px); }
h1 { font-size: var(--fs-h1, 19px); color: var(--c-heading); }
h2, h3 { color: var(--c-heading); }
.appnav-links a, .appnav-cats a { font-size: var(--fs-menu, 14px); }
.btn { font-size: var(--fs-btn, 14px); box-shadow: var(--ui-shadow); transition: transform .12s ease, box-shadow .15s ease, background .15s ease, opacity .12s; }
.btn:hover { box-shadow: var(--ui-shadow-hover); transform: translateY(-1px); opacity: 1; }
.btn:active { transform: translateY(0) scale(.98); box-shadow: var(--ui-shadow); }
.btn-primary { box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 32%, transparent); }
.btn-primary:hover { box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 42%, transparent); }
.btn-icon { box-shadow: none; }
body.btn-pill .btn { border-radius: 999px; }
body.btn-square .btn { border-radius: 8px; }
.input, .select, .textarea { box-shadow: inset 0 1px 2px rgba(21, 25, 30, .04); transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); outline: none; }
.choice, .city-item.prov { transition: background .15s, box-shadow .15s, border-color .15s; }
.choice { box-shadow: var(--ui-shadow); }
.choice:hover { box-shadow: var(--ui-shadow-hover); }
.choice.on, .choice:has(input:checked) { border-color: var(--brand); background: var(--soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.segmented span { box-shadow: var(--ui-shadow); transition: all .15s; }
.segmented input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 3px 10px color-mix(in srgb, var(--brand) 35%, transparent); }
.check input, .city-item input { accent-color: var(--brand); }
.chip { box-shadow: var(--ui-shadow); transition: box-shadow .15s, transform .12s; }
.chip:hover { box-shadow: var(--ui-shadow-hover); transform: translateY(-1px); }
body.ui-borders .card { border-color: color-mix(in srgb, var(--line) 60%, var(--surface-border)); }
html[data-theme="clean"] body.ui-borders .card { border: 1px solid var(--line); }
.ad { box-shadow: var(--ui-shadow); transition: box-shadow .15s, border-color .15s, transform .12s; }
.ad:hover { box-shadow: var(--ui-shadow-hover); transform: translateY(-1px); }

/* کارت آگهی: متن‌های کوچک‌تر و فشرده */
.ad .title { font-size: var(--fs-card-title, 14px); color: var(--c-card-title); }
.ad .sub { font-size: var(--fs-card-fields, 12px); color: var(--c-card-fields); }
.ad .price { font-size: var(--fs-card-price, 13px); color: var(--c-card-price); line-height: 1.6; }
.ad .prices { margin-top: auto; display: flex; flex-direction: column; gap: 0; }
.ad .prices .price { margin-top: 0; }
.ad .prices.multi .price { font-size: calc(var(--fs-card-price, 13px) - 1px); font-weight: 600; }
.ad .prices.multi .price .lbl { color: var(--c-card-fields); font-weight: 500; }
.ad .meta { font-size: var(--fs-card-meta, 11px); color: var(--c-card-meta); }
.ad .thumb { width: 104px; height: 104px; }
.ad .thumb .vbadge { position: absolute; bottom: 6px; left: 6px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 8px; padding: 1px 6px; font-size: 10px; display: flex; align-items: center; gap: 3px; }
.ad .thumb { position: relative; }

/* صفحه آگهی: بخش‌های کادردار */
.ad-head h1 { font-size: var(--fs-ad-title, 19px); }
.ad-price { font-size: var(--fs-ad-price, 19px); color: var(--c-ad-price); }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 680px) { .spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.spec { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--field); border: 1px solid var(--line); min-width: 0; }
.spec .k { font-size: calc(var(--fs-ad-fields, 14px) - 2px); color: var(--c-ad-label); }
.spec .v { font-size: var(--fs-ad-fields, 14px); font-weight: 700; color: var(--c-ad-value); overflow-wrap: anywhere; }
.spec.wide { grid-column: 1 / -1; }
/* ۱.۱۸: امکانات/آپشن‌ها در جدول (هم‌اندازه‌ی مشخصات) */
.feat { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--field); min-width: 0; font-size: var(--fs-ad-fields, 14px); font-weight: 600; line-height: 1.5; }
.feat span { overflow-wrap: anywhere; min-width: 0; }
.feat .icon { flex: none; }
.feat.on { background: var(--soft); color: var(--soft-ink); border-color: color-mix(in srgb, var(--soft-ink) 22%, transparent); }
.feat.off { color: var(--muted); font-weight: 500; }
.feat.off span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.amen { display: flex; flex-wrap: wrap; gap: 8px; }
.amen .badge { padding: 6px 10px; border-radius: 12px; font-size: 13px; box-shadow: var(--ui-shadow); }
.facts .fact { border: 1px solid var(--line); box-shadow: var(--ui-shadow); }
.ad-page .desc { font-size: var(--fs-ad-desc, 15px); }
.safety-list { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
.dir-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ویدیو در گالری و فرم */
.video-box { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 16/9; }
.video-box video, .video-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.vid-list { display: flex; flex-direction: column; gap: 8px; }
.vid-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--field); }
.vid-item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .only-touch { display: none !important; } }

/* ۱.۳: هدر موبایل همیشه در یک ردیف (منو، لوگو، شهر، حالت) و جستجو در ردیف دوم */
@media (max-width: 599px) {
  .topbar { padding: 8px 0; }
  .topbar .bar { gap: 6px; padding: 8px 10px; }
  .topbar .btn-icon { width: 34px; min-height: 34px; border-radius: 10px; }
  .topbar .btn-icon .icon { width: 18px; height: 18px; }
  :root { --logo-h: 24px; }
  .top-logo { font-size: 17px; flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .top-logo img { height: var(--logo-h); max-width: 92px; object-fit: contain; }
  .city-btn { height: 34px; padding: 0 9px; gap: 4px; font-size: 12.5px; max-width: 40vw; min-width: 0; flex: 0 1 auto; }
  .city-btn .icon { width: 15px; height: 15px; }
  .topbar .mode-btn { display: none !important; } /* در موبایل حالت تیره/روشن فقط در منوی کناری است */
  .search { height: 42px; }
}
@media (max-width: 359px) { .city-btn { max-width: 34vw; } .top-logo { font-size: 15px; } }

/* ۱.۳: فهرست کشویی قابل جستجو */
.ss { position: relative; }
.ss-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
.ss-btn { width: 100%; text-align: start; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ss-btn:disabled { opacity: .6; cursor: not-allowed; }
.ss-btn.ss-empty { color: var(--muted); }
.ss-panel { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 60; background: var(--surface-strong, var(--surface)); border: 1px solid var(--line); border-radius: var(--r-sm, 12px); box-shadow: 0 12px 32px rgba(0, 0, 0, .16); padding: 8px; }
html[data-mode="dark"] .ss-panel { background: #1b2230; }
.ss-q { height: 40px; margin-bottom: 6px; }
.ss-list { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.ss-opt { text-align: start; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.ss-opt:hover, .ss-opt.act { background: var(--field); }
.ss-opt.on { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-weight: 700; }
.ss-opt.ss-none { color: var(--muted); }
.ss-nores { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.ss-btn { padding-inline-end: 34px; position: relative; }
.ss::after { content: ""; position: absolute; inset-inline-end: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.ss.open::after { transform: rotate(-135deg); margin-top: -2px; }
.ss:has(.ss-panel:not([hidden]))::after { transform: rotate(-135deg); margin-top: -2px; }

/* ۱.۳: ویدیو داخل گالری آگهی و پیش‌نمایش ویدیو در درج آگهی */
.gallery .slides .slide-video { flex: none; width: 100%; height: 100%; scroll-snap-align: center; background: #000; display: grid; place-items: center; }
.gallery .slides .slide-video video, .gallery .slides .slide-video iframe { width: 100%; height: 100%; border: 0; object-fit: contain; }
.gal-video-btn { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 0; border-radius: 14px; background: rgba(21, 25, 30, .72); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.gal-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.gal-thumbs button { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #0d1014; color: #fff; cursor: pointer; display: grid; place-items: center; opacity: .75; }
.gal-thumbs button.on, .gal-thumbs button:hover { border-color: var(--brand); opacity: 1; }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.vid-prev { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: #000; flex: none; display: grid; place-items: center; color: #fff; }
.vid-status { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--field); }
.vid-status.ok { color: #0a7a3f; background: color-mix(in srgb, #16a34a 12%, transparent); }
.vid-status.err { color: #b42318; background: color-mix(in srgb, #dc2626 10%, transparent); }
.vid-status.busy { color: var(--muted); }
.ok-tick { color: #16a34a; }
.ad .thumb { position: relative; }
/* ۱.۳.۱: نشان ویدیو فقط یک آیکن پخش گرد و شیشه‌ای */
.ad .thumb .vbadge { z-index: 2; bottom: 6px; left: 6px; width: 26px; height: 26px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 18, 24, .55); color: #fff; border: 1.5px solid rgba(255, 255, 255, .85); box-shadow: 0 2px 8px rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ad .thumb .vbadge svg { display: block; margin-inline-start: 2px; }

/* ۱.۳.۱: پشتیبان چیدمان نقشه — حتی اگر فایل CSS نقشه دیر یا اصلاً بارگذاری نشود، کادر بزرگ و به‌هم‌ریخته نشود */
.gl-box { position: relative; max-width: 100%; }
.gl-box svg { max-width: 100%; }
.gl-tools { display: flex; gap: 8px; margin-bottom: 8px; align-items: stretch; }
.gl-tools svg, .gl-btn svg, .gl-search > svg { width: 18px; height: 18px; flex: none; }
.gl-search { position: relative; flex: 1; min-width: 0; }
.gl-stage { position: relative; height: 340px; max-height: 60vh; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--field); isolation: isolate; }
.gl-map { position: absolute; inset: 0; direction: ltr; z-index: 0; }
.gl-pin { position: absolute; z-index: 500; left: 50%; top: 50%; width: 40px; height: 54px; margin: -54px 0 0 -20px; pointer-events: none; }
.gl-float { position: absolute; z-index: 600; display: flex; gap: 6px; }
.gl-float.is-top { top: 10px; right: 10px; }
.gl-float.is-bottom { bottom: 12px; inset-inline: 12px; justify-content: center; }
.gl-lock[hidden], .gl-results[hidden] { display: none !important; }
.gl-fallback-note { display: none; }
.gl-box.gl-fallback .gl-fallback-note { display: block; }
html.gl-noscroll, html.gl-noscroll body { overflow: hidden !important; }
.gl-box.gl-full { position: fixed; z-index: 9999; inset: 0; margin: 0 !important; border-radius: 0; background: var(--page, #fff); padding: 12px; display: flex; flex-direction: column; overflow: auto; }
.gl-box.gl-full .gl-stage { flex: 1; height: auto; max-height: none; min-height: 300px; }
@media (max-width: 599px) {
  .gl-box .gl-stage { height: 280px; max-height: 52vh; border-radius: 14px; }
  .gl-box.gl-full .gl-stage { height: auto; max-height: none; }
  .gl-tools { flex-wrap: wrap; }
  .gl-tools .gl-btn { flex: 1 1 auto; }
  .gl-search { flex-basis: 100%; }
  .gl-float.is-bottom .gl-btn { width: 100%; max-width: 320px; }
}

/* ۱.۳: نوار فیلتر سریع موبایل (دو ردیف، با اسکرول افقی) */
.quick-filters { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: max-content; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; margin-inline: -2px; }
.quick-filters::-webkit-scrollbar { display: none; }
.quick-filters .chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; font: inherit; font-size: 13px; }
.quick-filters .qf-more { grid-row: span 2; align-self: stretch; font-weight: 700; background: var(--surface-strong, var(--surface)); }
.quick-filters .chip.on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.flash-focus { animation: flashf 1.4s ease; border-radius: 10px; }
@keyframes flashf { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); } 100% { box-shadow: none; } }

/* ۱.۳: جایگاه پله */
.badge.b-stair { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #6d28d9; }
html[data-mode="dark"] .badge.b-stair { color: #c4b5fd; }
.stair-slot { border: 1.5px dashed color-mix(in srgb, #7c3aed 45%, transparent); border-radius: var(--r-lg); padding: 10px; background: color-mix(in srgb, #7c3aed 4%, transparent); }
.stair-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* ۱.۳: معرفی و تماس در سایدبار */
.appnav-about { margin-top: 12px; padding: 12px; border-radius: var(--r-sm, 12px); background: var(--field); border: 1px solid var(--line); font-size: 13px; }
.appnav-about p { margin: 4px 0 8px; color: var(--muted); line-height: 1.9; font-size: 12.5px; }
.appnav-about .appnav-h { margin: 0; }
.appnav-contact { display: flex; flex-direction: column; gap: 6px; }
.appnav-contact a, .appnav-contact span { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; }
.appnav-about .foot-social { margin-top: 8px; }
.appnav-badges { margin-top: 12px !important; }
.city-item.prov-all { font-weight: 700; color: var(--brand); border: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand) 5%, transparent); }
.city-item.prov-all.on { background: color-mix(in srgb, var(--brand) 14%, transparent); border-style: solid; }
.city-item.prov-all .icon { stroke: currentColor; fill: none; stroke-width: 2.4; }

/* ۱.۳: پیشنهادهای جستجوی زنده */
.search { position: relative; }
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 70; background: var(--surface-strong, #fff); border: 1px solid var(--line); border-radius: var(--r-sm, 12px); box-shadow: 0 16px 40px rgba(0, 0, 0, .18); padding: 6px; max-height: min(70vh, 520px); overflow-y: auto; color: var(--ink); }
html[data-mode="dark"] .suggest { background: #1b2230; }
.sg-h { font-size: 11.5px; color: var(--muted); padding: 8px 10px 4px; font-weight: 700; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.sg-item:hover, .sg-item.act { background: var(--field); }
.sg-item .icon { flex: none; color: var(--brand); fill: none; stroke: currentColor; stroke-width: 1.8; }
.sg-item b { display: block; font-weight: 600; font-size: 14px; }
.sg-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.sg-item mark { background: color-mix(in srgb, var(--brand) 20%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.sg-n { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.sg-all { border-top: 1px solid var(--line); margin-top: 4px; color: var(--brand); font-weight: 600; }
.suggest, .ss-panel { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-mode="dark"] .suggest, html[data-mode="dark"] .ss-panel { background: #1b2230; }
@media (prefers-color-scheme: dark) { html[data-mode="auto"] .suggest, html[data-mode="auto"] .ss-panel { background: #1b2230; } }

/* ۱.۳: نوار تبدیل ودیعه و اجاره */
.convert-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.convert-out > div { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.convert-out .k { font-size: 12px; color: var(--muted); }
.convert-out strong { font-size: 18px; color: var(--brand); }
.convert-out small { font-size: 11.5px; color: var(--muted); }
.convert-range { width: 100%; direction: ltr; appearance: none; -webkit-appearance: none; height: 8px; border-radius: 8px; margin: 10px 0 12px;
  background: linear-gradient(to right, var(--brand) var(--pc, 50%), var(--line) var(--pc, 50%)); transform: scaleX(-1); }
.convert-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: grab; }
.convert-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); cursor: grab; }
.convert-box [data-conv-reset] { white-space: nowrap; flex: none; }

/* ۱.۴: کیف پول، ارتقای آگهی و نتیجه پرداخت */
.promo-ad { gap: 12px; align-items: center; }
.promo-ad .thumb { width: 72px; height: 72px; flex: none; border-radius: 12px; overflow: hidden; background: var(--field); display: grid; place-items: center; color: var(--faint); }
.promo-ad .thumb img { width: 100%; height: 100%; object-fit: cover; }
.plan-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.plan-opt { display: flex; align-items: center; gap: 10px; min-height: 58px; cursor: pointer; }
.plan-opt input { flex: none; accent-color: var(--brand); }
.plan-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: left; white-space: nowrap; }
.plan-price strong { color: var(--brand); font-size: 14px; }
.promo-featured .sec-ic { color: var(--gold-ink); }
.promo-urgent .sec-ic { color: #dc2626; }
.promo-stair .sec-ic { color: #7c3aed; }
.wallet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface)); color: var(--brand); }
.wallet-balance { font-size: 26px; color: var(--ink); }
.wallet-balance small { font-size: 13px; color: var(--muted); font-weight: 500; }
.tx-row { padding: 10px 0; border-bottom: 1px solid var(--line); gap: 10px; align-items: center; }
.tx-row:last-of-type { border-bottom: 0; }
.tx-in { color: #15803d; } .tx-out { color: #b42318; }
html[data-mode="dark"] .tx-in { color: #4ade80; } html[data-mode="dark"] .tx-out { color: #f87171; }
.chip[data-amount].on { border-color: var(--brand); background: var(--soft); color: var(--brand); }
.pay-result { padding: 28px 18px; gap: 12px; }
.pay-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #16a34a; box-shadow: 0 8px 24px color-mix(in srgb, #16a34a 35%, transparent); }
.pay-result.fail .pay-ic { background: #dc2626; box-shadow: 0 8px 24px color-mix(in srgb, #dc2626 35%, transparent); }
.pay-result.wait .pay-ic { background: #2563eb; }
.pay-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
@media (max-width: 599px) { .plan-grid { grid-template-columns: 1fr; } .wallet-balance { font-size: 22px; } }

/* ۱.۵: بنرهای تبلیغاتی */
.bn { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--field); line-height: 0; max-width: 100%; }
.bn a, .bn picture { display: block; }
.bn img { display: block; width: 100%; height: auto; }
.bn-tag { position: absolute; top: 6px; left: 6px; line-height: 1.6; font-size: 10px; padding: 0 7px; border-radius: 8px; background: rgba(15, 18, 24, .55); color: #fff; pointer-events: none; }
.bn[data-bn] > :not(.bn-tag):not(a):not(picture) { line-height: normal; }
.ads > .bn-in-feed { grid-column: 1 / -1; }
.bn-side { margin-top: 12px; border-radius: var(--r-sm, 12px); }
@media (max-width: 599px) { .bn-dev-desktop { display: none !important; } }
@media (min-width: 600px) { .bn-dev-mobile { display: none !important; } }

/* ۱.۵: یادداشت آگهی و نوار پیشنهادی/جدیدترین */
.note-opts .chip { cursor: pointer; user-select: none; }
.note-opts .chip.on { border-color: var(--brand); background: var(--soft); color: var(--brand); font-weight: 700; }
.note-box textarea { min-height: 64px; resize: vertical; }
.reco-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 2px; }
.reco-bar .chip.on { border-color: var(--brand); background: var(--soft); color: var(--brand); font-weight: 700; }
.reco-bar .chip .icon { width: 15px; height: 15px; }
@media (max-width: 599px) { .reco-hint { display: none; } }
.note-card { display: flex; gap: 12px; align-items: flex-start; }
.note-card .thumb { width: 72px; height: 72px; flex: none; border-radius: 12px; overflow: hidden; background: var(--field); display: grid; place-items: center; color: var(--faint); }
.note-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.note-label { display: inline-block; padding: 1px 10px; border-radius: 10px; background: var(--soft); color: var(--brand); font-size: 12px; font-weight: 700; }

/* ۱.۵: چت */
.nav-ic { position: relative; display: inline-grid; }
.nav-badge { position: absolute; top: -6px; inset-inline-end: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface-strong, #fff); }
.chat-top { position: relative; }
.chat-top .nav-badge { top: -6px; inset-inline-end: -6px; }
.grow-form { flex: 1; display: flex; } .grow-form .btn { flex: 1; }
.contact-bar .inner > .btn, .contact-bar .inner > form { flex: 1; }
.chat-list { padding: 4px 0; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.chat-item:last-child { border-bottom: 0; }
.chat-item:hover { background: var(--field); }
.chat-item .thumb, .chat-ad .thumb { width: 52px; height: 52px; flex: none; border-radius: 12px; overflow: hidden; background: var(--field); display: grid; place-items: center; color: var(--faint); }
.chat-item .thumb img, .chat-ad .thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-item.unread .bold, .chat-item.unread .chat-last { font-weight: 800; color: var(--ink); }
.chat-item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.chat-page { gap: 10px; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px; position: relative; z-index: 20; }
.chat-ad { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ink); }
.chat-ad .thumb { width: 44px; height: 44px; }
.chat-menu { position: relative; }
.chat-menu summary { list-style: none; cursor: pointer; }
.chat-menu summary::-webkit-details-marker { display: none; }
.chat-menu-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 50; width: 240px; display: flex; flex-direction: column; gap: 8px; padding: 10px; box-shadow: var(--shadow-pop); }
.chat-safety { padding: 8px 10px; }
.chat-thread { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-msgs { height: min(62vh, 560px); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; background: color-mix(in srgb, var(--field) 60%, transparent); }
.msg { max-width: 78%; padding: 8px 12px 6px; border-radius: 16px; position: relative; line-height: 1.8; font-size: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-start; background: var(--brand); color: #fff; border-end-start-radius: 4px; }
.msg.theirs { align-self: flex-end; background: var(--surface-strong, #fff); color: var(--ink); border: 1px solid var(--line); border-end-end-radius: 4px; }
.msg-body { white-space: pre-wrap; }
.msg-img img { display: block; max-width: 240px; max-height: 260px; border-radius: 12px; margin-bottom: 4px; object-fit: cover; }
.msg-meta { display: block; font-size: 10.5px; opacity: .75; text-align: left; margin-top: 2px; }
.msg-meta .tick { margin-inline-start: 4px; }
.msg-warn { margin-top: 4px; font-size: 12px; padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, #f59e0b 18%, transparent); color: var(--ink); }
.chat-empty { margin: auto; text-align: center; padding: 30px 10px; }
.chat-quick { padding: 8px 10px 0; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface-strong, #fff); }
.chat-compose textarea { flex: 1; min-height: 42px; max-height: 120px; resize: none; padding: 9px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.chat-compose textarea:focus { border-color: var(--brand); }
.chat-compose .btn-icon { flex: none; width: 42px; min-height: 42px; }
@media (max-width: 599px) { .chat-msgs { height: calc(100vh - 330px); min-height: 280px; } .msg { max-width: 86%; } }

/* ۱.۶: نشان ارتقا با آیکن روی کارت */
.ad .meta .promo-b { gap: 3px; padding: 0 7px; }
.ad .meta .promo-b .icon { width: 12px; height: 12px; }
.ad .meta .b-red.promo-b .icon { fill: currentColor; stroke: none; }

/* ۱.۶: صفحه چت در موبایل — بدون منوی پایین، کادر نوشتن همیشه پایین صفحه و بالای کیبورد */
.chat-safety { display: block; }
.chat-safety summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.chat-safety summary::-webkit-details-marker { display: none; }
.chat-safety .more { flex: none; color: var(--brand); font-weight: 700; }
.chat-safety ul { margin: 6px 0 0; padding-inline-start: 22px; line-height: 1.9; }
@media (max-width: 959px) {
  body.chat-mode .bottom-nav, body.chat-mode .contact-bar { display: none !important; }
  body.chat-mode .topbar .search { display: none; }
  body.chat-mode .page.chat-page { padding-bottom: 0; gap: 8px; }
  body.chat-mode .chat-thread { position: relative; }
  /* صفحه چت دقیقاً به اندازه صفحه نمایش: پیام‌ها جای باقیمانده را می‌گیرند و نوار نوشتن همیشه پایین دیده می‌شود */
  body.chat-mode .page.chat-page { display: flex; flex-direction: column; height: calc(100vh - var(--chat-top, 96px)); height: calc(100dvh - var(--chat-top, 96px)); min-height: 360px; margin-bottom: 0; }
  body.chat-mode .page.chat-page > * { flex: none; }
  body.chat-mode .page.chat-page > .chat-thread { flex: 1 1 auto; min-height: 0; }
  body.chat-mode .chat-msgs { flex: 1 1 auto; height: auto; min-height: 120px; }
  body.chat-mode .chat-quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  body.chat-mode .chat-quick .chip { flex: none; }
  body.chat-mode .chat-compose { flex: none; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.chat-mode .chat-safety summary { white-space: nowrap; overflow: hidden; }
  body.chat-mode .chat-safety summary .grow { overflow: hidden; text-overflow: ellipsis; }
  body.chat-mode .chat-safety[open] summary { white-space: normal; }
  body.chat-mode footer, body.chat-mode .site-footer { display: none; }
}

/* ۱.۶: تاریخچه جستجو، اخطار و نام در چت */
.sg-h .sg-clear { float: left; border: 0; background: none; color: var(--brand); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.warn-box { align-items: flex-start; }
.warn-box ul { margin: 4px 0; padding-inline-start: 18px; line-height: 1.9; }
.chat-name { padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* ─────────── ۱.۶: کادر جدا برای هر بخش صفحه اصلی ─────────── */
.home-secs { gap: 16px; }
.home-sec {
  background: var(--surface-strong); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--surface-border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden;
}
.hs-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hs-head h1, .hs-head h2 { font-size: 15px; font-weight: 700; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--soft); color: var(--soft-ink, var(--brand)); }
.hs-ic.gold { background: var(--gold-bg); color: var(--gold-ink); }
.hs-all { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink); background: var(--surface); }
.hs-all:hover { border-color: var(--brand); color: var(--brand); }
.hs-body { padding: 14px; }
.home-sec .stories, .home-sec .cats { margin: 0; }
.home-sec .empty { padding: 26px 10px; }
/* کارت‌های آگهی داخل کادر: زمینه روشن جدا از کادر */
.home-sec .ad { background: var(--field); box-shadow: none; border-color: var(--line); }
.home-sec .ad:hover { box-shadow: var(--shadow); }
.home-sec .ad.featured { background: color-mix(in srgb, var(--gold-bg) 80%, var(--surface-strong)); }
html[data-theme="clean"] .home-sec .ads { gap: 12px; }
html[data-theme="clean"] .home-sec .ad { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 0; }
html[data-theme="clean"] .home-sec .ad.featured { background: var(--gold-bg); }
html[data-theme="clean"] body:has(.home-secs) { background: var(--field); }
/* ردیف افقی آگهی‌های ویژه (کارت عمودی با عکس بزرگ) */
.hs-rail-wrap { position: relative; }
.hs-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding: 2px; }
.hs-rail::-webkit-scrollbar { display: none; }
.hs-rail .ad { flex-direction: column-reverse; justify-content: flex-end; scroll-snap-align: start; padding: 8px; margin: 0 !important; border-width: 1px !important; border-style: solid; border-radius: calc(var(--radius) * 1.25) !important; }
.hs-rail .ad .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.hs-rail .ad .title { font-size: 14px; }
.hs-rail .ad .sub { display: none; }
.hs-rail .ad .body > .badge:first-child { display: none; }
.hs-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-strong); color: var(--ink); display: none; place-items: center; box-shadow: var(--shadow); cursor: pointer; }
.hs-arrow.prev { right: 6px; } .hs-arrow.next { left: 6px; }
@media (hover: hover) and (min-width: 680px) { .hs-arrow { display: grid; } }
@media (max-width: 599px) {
  .hs-head { padding: 10px 12px; }
  .hs-body { padding: 10px; }
  .hs-rail { grid-auto-columns: 62%; }
  .home-secs { gap: 12px; }
}
.hs-arrow.prev .icon { transform: scaleX(-1); }
@media (max-width: 599px) { .hs-m { display: none; } .hs-all { padding: 0 9px; } .hs-head h1, .hs-head h2 { font-size: 14px; } }

/* ─────────── ۱.۷: منوی عمودی «ژوپین من» ─────────── */
.acc-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.acc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.acc-nav { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.acc-card { padding: 10px; }
.acc-user { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; }
.acc-avatar { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink, var(--brand)); }
.acc-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 6px; }
.acc-list form { margin: 0; }
.acc-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; border-radius: 12px; color: var(--ink); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: start; }
.acc-item:hover { background: var(--field); color: var(--ink); }
.acc-item.on { background: var(--soft); color: var(--soft-ink, var(--brand)); font-weight: 700; }
.acc-item.danger { color: var(--red-ink, #c0392b); }
.acc-item .icon { flex: none; }
.acc-chev { color: var(--faint); display: inline-flex; }
.acc-badge { position: static; margin: 0; }
.acc-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.acc-crumb { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 0 4px; }
.acc-crumb a { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 700; }
.acc-open { display: none; }
.acc-welcome { display: none; }
@media (min-width: 900px) {
  .acc-page { grid-template-columns: 270px minmax(0, 1fr); }
  .acc-nav { position: sticky; top: 14px; }
  .acc-welcome { display: block; }
}
/* موبایل: منو فقط در صفحه‌ی «ژوپین من»؛ در زیرصفحه‌ها یک نوار کوچک با دکمه‌ی منو و مسیر */
@media (max-width: 899px) {
  /* ۱.۸: در موبایل منو فقط در صفحه‌ی «ژوپین من» و همیشه باز است؛ در بخش‌ها فقط مسیر بازگشت به منو */
  .acc-nav:not(.is-menu) .acc-card { display: none; }
  .acc-nav:not(.is-menu) .acc-crumb { display: flex; font-size: 14px; padding: 2px 4px 0; }
  .acc-menu-page .acc-main { order: 2; }
  .acc-menu-page .acc-welcome { display: none; }
  .acc-menu-page .acc-dash { display: grid; }
}

/* ─────────── ۱.۷: رنگ زمینه‌ی زیر کارت‌ها و رنگ کارت (قابل تنظیم در «فونت و رنگ») ─────────── */
.home-sec { background: var(--sec-box, var(--surface-strong)); }
.home-sec .hs-body { background: var(--sec-bg, color-mix(in srgb, var(--brand) 3%, #eef1f5)); }
.home-sec .hs-head { background: var(--sec-box, transparent); }
.home-sec .ad, html[data-theme="clean"] .home-sec .ad { background: var(--card-bg, #fff); border-color: var(--line); }
.home-sec .ad.featured, html[data-theme="clean"] .home-sec .ad.featured { background: var(--featured-bg, color-mix(in srgb, var(--gold-bg) 85%, #fff)); }
.ads .ad { background: var(--card-bg, var(--surface)); }
.ads .ad.featured { background: var(--featured-bg, color-mix(in srgb, var(--gold-bg) 75%, transparent)); }
html[data-theme="clean"] .ads .ad:not(.featured) { background: var(--card-bg, transparent); }
html[data-mode="dark"] .home-sec .hs-body { background: rgba(0, 0, 0, .18); }
html[data-mode="dark"] .home-sec .ad { background: var(--surface); }
html[data-mode="dark"] .home-sec .ad.featured { background: color-mix(in srgb, var(--gold-bg) 60%, transparent); }
@media (prefers-color-scheme: dark) {
  html[data-mode="auto"] .home-sec .hs-body { background: rgba(0, 0, 0, .18); }
  html[data-mode="auto"] .home-sec .ad { background: var(--surface); }
  html[data-mode="auto"] .home-sec .ad.featured { background: color-mix(in srgb, var(--gold-bg) 60%, transparent); }
}
/* ۱.۷: تماس و پیامک */
.contact-num { font-size: 22px; font-weight: 800; letter-spacing: 1px; text-align: center; margin: 4px 0 10px; }
.contact-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.contact-acts .btn:only-child { grid-column: 1 / -1; }
.contact-acts .btn { justify-content: center; }

/* ─────────── ۱.۷: نمایش استوری شبیه اینستاگرام ─────────── */
.story.seen .ring { background: color-mix(in srgb, var(--faint) 60%, transparent); }
.sv { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: #000; touch-action: none; }
.sv[hidden] { display: none; }
.sv-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(28px) brightness(.45); transform: scale(1.15); }
.sv-box { position: relative; width: min(100vw, 460px); height: 100%; max-height: 100dvh; display: flex; flex-direction: column; color: #fff; overflow: hidden; }
@media (min-width: 600px) { .sv-box { height: min(92dvh, 820px); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #111; } }
.sv-bars { position: absolute; top: 10px; inset-inline: 10px; z-index: 3; display: flex; gap: 4px; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.sv-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.sv-bars i.done b { width: 100%; }
.sv-top { position: absolute; top: 20px; inset-inline: 10px; z-index: 3; display: flex; align-items: center; gap: 8px; padding-top: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.sv-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sv-meta strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-meta span { font-size: 12px; opacity: .85; }
.sv-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 14px; cursor: pointer; flex: none; }
.sv-img { flex: 1; display: grid; place-items: center; min-height: 0; }
.sv-img img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.sv-nav { position: absolute; top: 70px; bottom: 130px; width: 26%; z-index: 2; background: none; border: 0; cursor: pointer; }
.sv-nav.prev { right: 0; } .sv-nav.next { left: 0; }
.sv-foot { position: absolute; bottom: 0; inset-inline: 0; z-index: 3; padding: 40px 14px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.75)); display: flex; flex-direction: column; gap: 10px; }
.sv-price { font-weight: 800; font-size: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.sv-price:empty { display: none; }
body.sv-open { overflow: hidden; }
/* ۱.۸: پنجره تماس سبک‌تر و سریع‌تر روی موبایل (بدون مات کردن کل صفحه) */
.contact-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 0; color: var(--muted); font-size: 14px; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--brand) 25%, transparent); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 899px) {
  .modal { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10, 13, 17, .55); }
  html[data-mode] .modal .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--page, #f5f7f9); background-image: linear-gradient(var(--surface-strong), var(--surface-strong)); }
}

/* ─────────── ۱.۸: پیام‌های عمومی و سیستمی ─────────── */
.notice-list { padding: 4px 0; }
.notice { display: flex; gap: 12px; padding: 14px 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
a.notice:hover { background: var(--field); color: var(--ink); }
.notice.unread { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.notice.unread .bold::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-inline-start: 6px; vertical-align: middle; }
.notice-body { white-space: pre-line; color: var(--ink); opacity: .9; }
.hs-ic.red { background: var(--red-bg, #fde8e8); color: var(--red-ink, #c0392b); }
.chat-item.chat-pinned { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.chat-item.chat-pinned .thumb { background: var(--soft); color: var(--soft-ink, var(--brand)); display: grid; place-items: center; }
/* ۱.۸ */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.field .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.acc-dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .acc-dash { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dash-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: var(--r-lg); background: var(--sec-box, var(--surface-strong)); border: 1px solid var(--surface-border); box-shadow: var(--shadow); color: var(--ink); }
.dash-tile strong { font-size: 17px; }
.dash-tile span:last-child { font-size: 12px; color: var(--muted); }
.dash-tile:hover { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.ads > .bn-slot { grid-column: 1 / -1; } .bn-slot > .bn-cand > .bn { margin: 0; }

/* ─────────── ۱.۸: یک‌دستی صفحه آگهی و فهرست با صفحه اصلی + رنگ‌های قابل تنظیم ─────────── */
body.ad-view { background-color: var(--adp-page, var(--page)); }
.ad-page .card, .list-sec { background: var(--adp-card, var(--sec-box, var(--surface-strong))); }
.ad-page .card { padding: 14px 16px 16px; overflow: hidden; }
.ad-page .card > .sec-head { margin: -14px -16px 14px; padding: 12px 16px; background: var(--sec-box, transparent); }
.ad-page .sec-head h2 { font-size: 15px; }
.ad-page .sec-ic { width: 34px; height: 34px; border-radius: 11px; }
.ad-page .spec, .ad-page .fact { background: var(--adp-tile, var(--sec-bg, color-mix(in srgb, var(--brand) 3%, #eef1f5))); border-color: var(--line); }
.ad-page .gallery, .ad-page .gallery .slides, .ad-page .gallery .slides img, .gallery .slides .slide-video { background-color: var(--adp-gallery, #0d1014); }
.ad-page .contact-bar .inner { background: var(--adp-bar, var(--surface-strong)); }
html[data-mode="dark"] .ad-page .spec, html[data-mode="dark"] .ad-page .fact { background: rgba(0, 0, 0, .18); }
.list-sec > .hs-body { display: flex; flex-direction: column; gap: 12px; }
.list-sec .stair-slot { margin: 0; }
@media (prefers-color-scheme: dark) { html[data-mode="auto"] .ad-page .spec, html[data-mode="auto"] .ad-page .fact { background: rgba(0, 0, 0, .18); } }
/* ۱.۸: نوار نصب اپ وب */
.pwa-bar { position: fixed; inset-inline: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-lg); background-color: var(--page); background-image: linear-gradient(var(--surface-strong), var(--surface-strong)); border: 1px solid var(--surface-border); box-shadow: var(--shadow-pop); }
.pwa-bar[hidden] { display: none; }
body.chat-mode .pwa-bar, body.sv-open .pwa-bar { display: none; }
.pwa-tile { width: 100%; font: inherit; text-align: start; cursor: pointer; }
.pwa-tile[hidden] { display: none; }

/* ─────────── ۱.۹: کسب‌وکار ─────────── */
.biz-card { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.biz-card:hover { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.biz-logo { width: 52px; height: 52px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink, var(--brand)); border: 1px solid var(--line); }
.biz-logo img { width: 100%; height: 100%; object-fit: cover; }
.biz-logo.lg { width: 92px; height: 92px; border-radius: 22px; border: 3px solid var(--sec-box, #fff); box-shadow: var(--shadow); margin-top: -46px; background-color: var(--sec-box, #fff); }
.biz-logo-sm { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; margin-top: 6px; }
.biz-cover { height: 180px; background: linear-gradient(135deg, var(--brand), var(--accent, var(--brand))); background-size: cover; background-position: center; }
@media (max-width: 599px) { .biz-cover { height: 120px; } .biz-logo.lg { width: 72px; height: 72px; margin-top: -36px; } }
.biz-head { display: flex; align-items: flex-start; gap: 14px; padding: 0 16px 16px; }
.biz-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.biz-head h1 { font-size: 20px; margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.biz-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.biz-badges:empty { display: none; }
.biz-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.biz-meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.biz-acts { display: flex; gap: 8px; padding-top: 12px; flex: none; }
@media (max-width: 699px) {
  .biz-head { flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 14px 14px; }
  .biz-id { align-items: center; padding-top: 6px; width: 100%; }
  .biz-head h1 { font-size: 18px; }
  .biz-badges, .biz-meta { justify-content: center; }
  .biz-acts { width: 100%; padding-top: 10px; }
  .biz-acts > * { flex: 1; justify-content: center; }
}
.biz-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 1000px) { .biz-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.biz-grid .ads.three { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.member-list { display: flex; flex-direction: column; gap: 8px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card-bg, #fff); border: 1px solid var(--line); }
.member-row form { margin: 0; }
.member-add { align-items: end; }
.biz-item .thumb { width: 84px; height: 84px; }

/* ─────────── ۱.۹: جستجو روی نقشه ─────────── */
.map-search { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: var(--page); }
.map-search[hidden] { display: none; }
.ms-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); background-color: var(--page); background-image: linear-gradient(var(--surface-strong), var(--surface-strong)); border-bottom: 1px solid var(--line); z-index: 2; }
.ms-map { flex: 1; min-height: 0; }
.ms-sheet { position: absolute; inset-inline: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1000; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: var(--r-lg); background-color: var(--page); background-image: linear-gradient(var(--surface-strong), var(--surface-strong)); box-shadow: var(--shadow-pop); }
@media (min-width: 900px) { .ms-sheet { inset-inline: auto 16px; width: 380px; max-height: 70vh; } }
.ms-sheet[hidden] { display: none; }
.ms-card { display: flex; gap: 10px; padding: 8px; border-radius: 12px; background: var(--card-bg, #fff); border: 1px solid var(--line); color: var(--ink); }
.ms-card:hover { color: var(--ink); border-color: var(--brand); }
.ms-card img, .ms-noimg { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: none; background: var(--field); }
.ms-card .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-card strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-pin { background: none; border: 0; }
.ms-pin span { display: inline-block; transform: translate(-50%, -100%); white-space: nowrap; padding: 3px 8px; border-radius: 10px; background: #fff; color: #15191e; font: 700 11px/1.6 inherit; font-family: inherit; box-shadow: 0 2px 6px rgba(0,0,0,.25); border: 1.5px solid var(--brand); }
.ms-pin.f span { border-color: #d4a017; background: #fff8e1; }
.ms-pin.g span { background: var(--brand); color: #fff; }
.ms-cluster { display: grid !important; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--brand) 85%, transparent); color: #fff; font-weight: 800; font-size: 13px; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
body.no-scroll { overflow: hidden; }
/* ۱.۱۰: نوع آگهی‌دهنده */
.seller-tabs { display: flex; gap: 6px; padding: 4px; margin-bottom: 12px; border-radius: 14px; background: var(--card-bg, #fff); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seller-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seller-tab.on { background: var(--brand); color: #fff; }
.seller-tab:not(.on):hover { background: var(--field); color: var(--ink); }
html[data-mode="dark"] .seller-tabs { background: var(--surface); }
/* ۱.۱۰: صفحه‌ی دانلود اپ */
.app-hero-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; }
.app-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); }
.app-steps { margin: 0; padding-inline-start: 20px; line-height: 2.1; }
.ios-share { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--field); }
.biz-docs { padding: 12px; border-radius: 12px; border: 1px dashed var(--line); background: var(--card-bg, #fff); } .biz-docs .small { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .req { color: #dc2626; }

/* ─────────── ۱.۱۰: صفحه‌ی جستجو روی نقشه ─────────── */
body.map-mode .page.map-page { padding-bottom: 12px; }
.mp-wrap { position: relative; height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 480px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--surface-border); box-shadow: var(--shadow); background: #e9eef2; }
.mp-map { position: absolute; inset: 0; }
.mp-panel { position: absolute; top: 14px; z-index: 1001; width: 280px; max-height: calc(100% - 28px); display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background-color: var(--page); background-image: linear-gradient(var(--surface-strong), var(--surface-strong)); border: 1px solid var(--surface-border); box-shadow: var(--shadow-pop); overflow: hidden; }
.mp-panel.side-right { right: 14px; } .mp-panel.side-left { left: 14px; }
.mp-panel-head { display: flex; align-items: center; justify-content: space-between; }
.mp-panel-head h1 { font-size: 15px; margin: 0; }
.mp-toggle { display: none; }
.mp-fields { display: flex; flex-direction: column; gap: 8px; }
.mp-fields .input, .mp-fields .select { height: 42px; background: var(--field); }
.mp-cats { display: flex; flex-direction: column; gap: 8px; }
.mp-status { padding: 2px 2px 0; }
.mp-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -4px; padding: 0 4px; min-height: 0; flex: 1; }
.mp-list .ms-card { padding: 6px; }
.mp-list .ms-card img, .mp-list .ms-noimg { width: 56px; height: 56px; }
.mp-sheet { z-index: 600; }
@media (min-width: 900px) { .mp-sheet { inset-inline: auto; left: 14px; } .side-left ~ .mp-sheet { left: auto; right: 14px; } }
@media (max-width: 899px) {
  body.map-mode .bottom-nav { display: none !important; }
  .mp-wrap { height: calc(100dvh - 110px); border-radius: 16px; }
  .mp-panel { top: 10px; inset-inline: 10px !important; width: auto; padding: 10px 12px; }
  .mp-toggle { display: inline-flex; width: auto; padding: 0 10px; gap: 6px; }
  .mp-toggle::after { content: 'فیلترها'; font-size: 13px; }
  .mp-wrap .leaflet-top { top: 96px; }
  .mp-panel:not(.open) .mp-fields, .mp-panel:not(.open) .mp-list { display: none; }
}
.ms-pin.d span { padding: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; } .ms-pin.f.d span { background: #d4a017; }
/* ۱.۱۰: اشتراک کسب‌وکار */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--card-bg, #fff); border: 1px solid var(--line); }
.plan-card.popular { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent); }
.plan-pop { position: absolute; top: -10px; left: 12px; }
.plan-price { font-size: 17px; font-weight: 800; display: flex; gap: 6px; align-items: baseline; }
.plan-card ul { margin: 0; padding-inline-start: 16px; line-height: 1.9; color: var(--muted); }
.biz-ad { display: flex; flex-direction: column; gap: 6px; }
.biz-ad-acts { gap: 6px; } .biz-ad-acts form { margin: 0; }

/* ۱.۱۰: ورود گروهی آگهی */
.imp-tpl{gap:8px;flex-wrap:wrap;margin:10px 0}
.imp-tpl .input{flex:1;min-width:220px}
.imp-help,.imp-errs{margin:8px 0 0;padding-inline-start:18px;line-height:2}
.imp-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;margin:10px 0}
.imp-table{width:100%;border-collapse:collapse;font-size:13px}
.imp-table th,.imp-table td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:start;vertical-align:top}
.imp-table th{background:var(--soft,#f6f6f6);font-weight:700;white-space:nowrap}
.imp-table tr.bad td{background:color-mix(in srgb,#e53935 7%,transparent)}
.imp-table .red,.red{color:#d32f2f}.imp-table .green{color:#2e7d32}

/* ۱.۱۱: آگهی‌های مشابه به‌صورت ردیف افقی */
.related-rail { grid-auto-columns: minmax(160px, 200px); }
/* ۱.۱۷: در موبایل همان کارت افقی فهرست آگهی‌ها (متن کنار عکس کوچک)، با اسکرول چپ و راست */
@media (max-width: 599px) {
  .related-rail { grid-auto-columns: 84%; gap: 10px; }
  .related-rail .ad { flex-direction: row; justify-content: flex-start; align-items: stretch; padding: 10px; min-height: 0; }
  .related-rail .ad .thumb { width: 92px; height: 92px; aspect-ratio: auto; }
  .related-rail .ad .title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ۱.۱۱: لوگو در وسط هدر موبایل (منو در راست، شهر در چپ) */
@media (max-width: 599px) {
  .topbar .bar { position: relative; }
  .top-logo { position: absolute; top: 8px; height: 34px; inset-inline-start: 50%; transform: translateX(50%); display: flex; align-items: center; justify-content: center; max-width: 30vw; z-index: 1; }
  html[dir="ltr"] .top-logo { transform: translateX(-50%); }
  .topbar .city-btn { margin-inline-start: auto; max-width: calc(50vw - 66px); }
  .top-logo img { max-width: 30vw; }
  html[data-theme="clean"] .top-logo { top: 0; }
}

/* ۱.۱۱: تب‌های نوع آگهی‌دهنده کوچک و در یک خط */
.seller-tabs { display: inline-flex; width: auto; max-width: 100%; gap: 2px; padding: 3px; margin-bottom: 10px; border-radius: 12px; flex-wrap: nowrap; }
.seller-tab { flex: 0 0 auto; gap: 4px; padding: 5px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.6; }
.seller-tab .icon { width: 14px; height: 14px; }
@media (max-width: 599px) { .seller-tabs { display: flex; width: 100%; } .seller-tab { flex: 1 1 0; padding: 5px 6px; font-size: 12px; } }
.ads.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s; }
/* ۱.۱۱: «جدیدترین / پیشنهادی» کوچک‌تر با فاصله از کارت‌ها */
.reco-bar { gap: 6px; margin: 0 0 12px; }
.reco-bar .chip { min-height: 30px; padding: 3px 11px; font-size: 12.5px; border-radius: 999px; }
.reco-bar .chip .icon { width: 13px; height: 13px; }
.reco-bar .reco-hint { font-size: 11px; }
@media (max-width: 599px) { .reco-bar .reco-hint { display: none; } }
/* ۱.۱۱: شماره ثابت در پنجره‌ی تماس */
.contact-ll { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); display: flex; flex-direction: column; gap: 4px; }
.contact-num.sm { font-size: 18px; }

/* ۱.۱۲: کارت‌های آگهی در صفحه‌های ژوپین من (نشان‌شده‌ها، بازدیدهای اخیر، یادداشت‌ها) مثل کارت‌های صفحه اصلی */
.acc-main .ads, html[data-theme="clean"] .acc-main .ads { gap: 12px; }
.acc-main .ad, html[data-theme="clean"] .acc-main .ad { background: var(--card-bg, var(--surface-strong, #fff)); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 0; box-shadow: var(--ui-shadow, none); }
.acc-main .ad:hover { box-shadow: var(--shadow); }
.acc-main .ad.featured, html[data-theme="clean"] .acc-main .ad.featured { background: var(--featured-bg, color-mix(in srgb, var(--gold-bg) 85%, #fff)); }
html[data-mode="dark"] .acc-main .ad { background: var(--surface); }
@media (prefers-color-scheme: dark) { html[data-mode="auto"] .acc-main .ad { background: var(--surface); } }
@media (min-width: 1100px) { .acc-main .ads.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .acc-main .ads.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.acc-main .note-card, html[data-theme="clean"] .acc-main .note-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--card-bg, var(--surface-strong, #fff)); }
html[data-mode="dark"] .acc-main .note-card { background: var(--surface); }
.acc-main > .ads, .acc-main > .stack { margin-top: 12px; }
/* ۱.۱۲: تاریخچه‌ی جستجو با حذف تکی */
.sg-hist { padding: 0; gap: 0; }
.sg-hist-a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.sg-hist-a b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-hist:hover, .sg-hist-a.act { background: var(--field); }
.sg-del { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.sg-del:hover { color: #d32f2f; background: color-mix(in srgb, #d32f2f 8%, transparent); }
.sg-del .icon { stroke: currentColor; fill: none; stroke-width: 2; }
/* ۱.۱۲: آگهی دیده‌شده */
.ad .thumb { position: relative; }
.seen-eye { position: absolute; top: 6px; right: 6px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(15, 20, 25, .62); color: #fff; backdrop-filter: blur(4px); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.seen-eye .icon { stroke: currentColor; fill: none; stroke-width: 2; }
.ad.is-seen .title { color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }
/* ۱.۱۲: آگهی فوری از نظر ظاهری متمایز (جایگاهش تغییر نمی‌کند) */
.ad.urgent:not(.featured) { border-color: color-mix(in srgb, #e53935 45%, var(--line)) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, #e53935 18%, transparent); }
.ad.urgent .promo-b.b-red { font-weight: 800; }
.ad.urgent .thumb::before { content: 'فوری'; position: absolute; top: 6px; left: 6px; z-index: 2; background: #e53935; color: #fff; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.plan-opt.is-disabled { opacity: .5; pointer-events: none; }
/* ۱.۱۲: در هدر موبایل به‌جای نام شهر فقط آیکن موقعیت */
.city-dot { display: none; }
@media (max-width: 599px) {
  .topbar .city-btn { position: relative; width: 38px; min-width: 38px; max-width: 38px !important; height: 38px; padding: 0; justify-content: center; border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-strong, #fff)); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); }
  .topbar .city-btn .city-lbl, .topbar .city-btn .city-down { display: none !important; }
  .topbar .city-btn .city-pin { width: 21px !important; height: 21px !important; }
  .topbar .city-btn .city-dot { display: grid; place-items: center; position: absolute; top: -5px; left: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 800; border: 2px solid var(--surface-strong, #fff); line-height: 1; }
  .top-logo { top: 10px; }
}
/* ۱.۱۲: داخل اپ اندروید پیشنهاد نصب اپ وب نمایش داده نمی‌شود */
html.in-app .pwa-bar, html.in-app [data-pwa-install], html.in-app .app-promo { display: none !important; }

/* ۱.۱۳: رفع «شطرنجی» زیر دکمه‌ها در موبایل و اپ اندروید.
   روی صفحه‌ی لمسی حالت hover بعد از لمس می‌ماند و جابه‌جایی/بزرگ‌نمایی دکمه داخل کادرهای مات (backdrop-filter)
   باعث می‌شود مرورگر اطراف دکمه را لحظه‌ای شطرنجی بکشد؛ پس روی لمسی فقط کمی کم‌رنگ می‌شود. */
html { -webkit-tap-highlight-color: transparent; }
@media (hover: none), (pointer: coarse) {
  .btn, .btn:hover, .btn:active, .chip, .chip:hover, .chip:active, .seller-tab, .city-btn, .bottom-nav a, .ad, .ad:hover, .ad:active {
    transform: none !important; transition: opacity .12s ease, background-color .15s ease !important;
  }
  .btn:hover { box-shadow: var(--ui-shadow); }
  .btn-primary:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 32%, transparent); }
  .btn:active, .chip:active, .seller-tab:active, .ad:active { opacity: .78; }
}
/* داخل اپ اندروید (WebView) مات‌کردن پس‌زمینه‌ی دکمه‌ها و نشان‌های کوچک خاموش است */
html.in-app .btn, html.in-app .chip, html.in-app .badge, html.in-app .vbadge, html.in-app .seen-eye { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ۱.۱۳: در اپ اندروید (WebView) فیلتر محوکننده‌ی پس‌زمینه هنگام لمس دکمه‌ها لکه‌ی شطرنجی می‌سازد؛
   در اپ هیچ عنصری backdrop-filter ندارد و کادرهای شیشه‌ای کمی مات‌تر می‌شوند تا ظاهر حفظ شود. */
html.in-app { --blur: none; --surface-strong: rgba(255, 255, 255, .96); }
html.in-app[data-mode="dark"] { --surface-strong: rgba(32, 38, 47, .97); }
html.in-app *, html.in-app *::before, html.in-app *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ─────────── ۱.۱۴: شیشه‌ی سبک (گوشی، دستگاه ضعیف، «کاهش شفافیت» سیستم) ───────────
   ظاهر شیشه‌ای حفظ می‌شود ولی محوکننده‌ی پس‌زمینه فقط روی نوارهای ثابت (هدر، منوی پایین، نوار تماس، پنجره‌ها) می‌ماند.
   کارت‌ها، دکمه‌ها و نشان‌ها به‌جای blur جداگانه (که با هر اسکرول دوباره محاسبه می‌شود) سطح نیمه‌مات می‌گیرند. */
html.lite-glass { --blur: none; --surface: rgba(255, 255, 255, .86); --surface-strong: rgba(255, 255, 255, .9); }
html.lite-glass[data-mode="dark"] { --surface: rgba(28, 33, 41, .88); --surface-strong: rgba(32, 38, 47, .93); }
html.lite-glass .card, html.lite-glass .ad, html.lite-glass .chip, html.lite-glass .btn, html.lite-glass .badge, html.lite-glass .vbadge, html.lite-glass .seen-eye, html.lite-glass .home-sec, html.lite-glass .bn { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lite-glass .topbar .bar, html.lite-glass .bottom-nav, html.lite-glass .contact-bar .inner, html.lite-glass .modal .sheet { -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
/* پس‌زمینه‌ی گرادیانی ثابت روی یک لایه‌ی جدا (background-attachment: fixed در موبایل با هر اسکرول کل صفحه را دوباره رنگ می‌کند) */
html.lite-glass[data-theme="glass"] body { background-attachment: scroll; background-image: none; }
html.lite-glass[data-theme="glass"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
  background-color: var(--page);
  background-image:
    radial-gradient(circle at 92% 3%, color-mix(in srgb, var(--bg-1) 34%, transparent), transparent 36%),
    radial-gradient(circle at 0% 28%, color-mix(in srgb, var(--bg-2) 24%, transparent), transparent 42%),
    radial-gradient(circle at 100% 60%, color-mix(in srgb, var(--bg-3) 22%, transparent), transparent 40%),
    radial-gradient(circle at 8% 92%, color-mix(in srgb, var(--bg-1) 20%, transparent), transparent 40%);
}
@media (prefers-reduced-transparency: reduce) {
  html .card, html .ad, html .topbar .bar, html .bottom-nav, html .contact-bar .inner { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
/* فهرست‌های طولانی (اسکرول خودکار): کارت‌های دور از دید رندر نمی‌شوند؛ اندازه‌ی آخرین رندر به خاطر سپرده می‌شود */
.ads > .ad { content-visibility: auto; contain-intrinsic-size: auto 132px; }
@media (min-width: 680px) { .ads > .ad { contain-intrinsic-size: auto 300px; } }

/* ۱.۱۴: راهنمای مرحله‌ای ثبت آگهی و میزان تکمیل */
.post-guide { padding: 10px 14px; }
.post-guide summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--soft-ink); list-style: none; }
.post-guide summary::-webkit-details-marker { display: none; }
.post-guide summary::after { content: "▾"; margin-inline-start: auto; opacity: .6; transition: transform .2s; }
.post-guide[open] summary::after { transform: rotate(180deg); }
.post-guide ul { margin: 8px 0 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.9; color: var(--muted); }
.complete { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-sm); background: var(--soft); color: var(--soft-ink); margin-bottom: 10px; }
.complete .progress { background: color-mix(in srgb, var(--soft-ink) 15%, transparent); }
.complete-list { margin: 0; padding-inline-start: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.complete-list .link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; text-align: start; }
.complete-list .ok { list-style: "✓ "; }
/* ۱.۱۴: کلمه‌ی خیلی بلند بدون فاصله در عنوان (مثلاً «آپارتمانفروشی…») صفحه را از عرض بیرون نمی‌زند */
.ad .title, .ad .body, .acc-main .bold, .acc-main .grow, .card h1, .ad-page h1, .sg-item b { overflow-wrap: anywhere; word-break: normal; }
/* ۱.۱۵: پیش‌نمایش تبدیل ودیعه و اجاره در فرم ثبت آگهی */
.conv-calc { margin-top: 6px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--soft); color: var(--soft-ink); font-size: 13px; line-height: 1.9; }
.conv-calc:empty { display: none; }
/* ۱.۱۵: نشان بارگذاری عکس (پیش‌نمایش + دایره‌ی درصد) */
.up-item.loading img { filter: blur(1px) brightness(.7); }
.up-item.loading::after { display: none; }
.up-prog { position: absolute; inset: 0; display: grid; place-items: center; }
.up-prog i { position: absolute; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p, 0) * 1%), rgba(255, 255, 255, .35) 0); -webkit-mask: radial-gradient(circle, transparent 20px, #000 21px); mask: radial-gradient(circle, transparent 20px, #000 21px); transition: background .2s; }
.up-prog b { position: relative; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.up-item.loading:not(:has(img)) { background: var(--soft); }
.up-item.loading:not(:has(img)) .up-prog b { color: var(--soft-ink); text-shadow: none; }
/* ۱.۱۵: چت — پیام صوتی، موقعیت، حذف پیام، نوار ضبط */
.msg.is-del .msg-del { font-size: 13px; opacity: .7; font-style: italic; }
.msg-audio { display: flex; align-items: center; gap: 6px; }
.msg-audio audio { height: 36px; max-width: 240px; }
.msg-loc { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.msg-loc-ic { font-size: 22px; }
.msg-loc small { display: block; font-size: 11px; opacity: .75; direction: ltr; text-align: right; }
.msg-loc-links { display: flex; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.msg-loc-links a { font-weight: 700; }
.msg-del-btn { border: 0; background: none; padding: 0 4px; margin-inline-start: 4px; cursor: pointer; opacity: .55; font-size: 12px; color: inherit; }
.msg-del-btn:hover, .msg-del-btn.on { opacity: 1; }
.msg-del-btn.on { color: #b91c1c; font-weight: 700; }
.chat-rec { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); }
.chat-rec[hidden] { display: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .25; } }
.chat-compose[hidden] { display: none; }

/* ۱.۱۵ — جستجوی تمام‌صفحه در موبایل (شبیه دیوار) و ردیف‌های تاریخچه */
.sx-back { display: none; }
.sx-row { padding: 2px 0; gap: 2px; align-items: center; border-bottom: 1px solid var(--line); border-radius: 0; }
.sx-row:last-of-type { border-bottom: 0; }
.sx-mark { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; }
button.sx-mark:hover { background: var(--field); }
.sx-mark .icon { fill: none; stroke: currentColor; stroke-width: 1.8; }
.sx-mark.on { color: var(--brand); }
.sx-mark.on .icon { fill: currentColor; }
.sx-row .sg-hist-a { padding: 9px 4px; }
.sx-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.sx-txt b { font-weight: 700 !important; font-size: 14.5px; max-width: 100%; }
.sx-txt small { color: var(--muted); font-size: 12px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sx-chip { display: inline-block; font-size: 11.5px; line-height: 1; padding: 5px 9px; border-radius: 999px; background: var(--field); color: var(--ink); border: 1px solid var(--line); }
.sx-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 16px; color: var(--muted); text-align: center; font-size: 14px; }
.sx-empty .icon { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .6; }
@media (max-width: 768px) {
  html.sx-open, html.sx-open body { overflow: hidden; }
  html.sx-open .topbar, html.sx-open .topbar .wrap, html.sx-open .topbar .bar { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; transform: none !important; filter: none !important; }
  html.sx-open .topbar form.search {
    position: fixed; inset: 0; z-index: 1200; height: auto; margin: 0; border: 0; border-radius: 0;
    display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0; padding: calc(8px + env(safe-area-inset-top)) 8px 0;
    background: #fff;
  }
  html.sx-open .topbar form.search > .icon { display: none; }
  html.sx-open .sx-back { display: grid; place-items: center; flex: none; width: 44px; height: 46px; border: 0; background: none; color: var(--ink); cursor: pointer; }
  html.sx-open .sx-back .icon { fill: none; stroke: currentColor; stroke-width: 2; }
  html.sx-open .topbar form.search input { flex: 1; height: 46px; padding: 0 12px; background: #f1f3f6; border: 1px solid #e3e7ec; border-radius: var(--r-sm, 12px); font-size: 16px; }
  html.sx-open .topbar form.search .suggest {
    position: static; flex: 1 1 100%; width: 100%; max-height: none; height: calc(100dvh - 62px - env(safe-area-inset-top)); margin-top: 8px;
    border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 4px 4px 24px; background: var(--surface-strong, #fff);
  }
  html.sx-open .topbar form.search .suggest[hidden] { display: block; }
  html.sx-open .bottom-nav, html.sx-open .fab { display: none !important; }
}
@media (max-width: 768px) {
  html[data-mode="dark"].sx-open .topbar form.search { background: #1b2230; }
  html[data-mode="dark"].sx-open .topbar form.search input { background: #252d3b; border-color: #313a4a; }
  html.sx-open .topbar form.search .suggest { background: transparent !important; }
}
@media (max-width: 768px) and (prefers-color-scheme: dark) { html[data-mode="auto"].sx-open .topbar form.search { background: #1b2230; } }

/* ۱.۱۵ — سرصفحه‌ی نتایج: ذخیره‌ی جستجو و نقشه (موبایل شبیه دیوار) */
.lh { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; }
.lh h1 { margin: 0; min-width: 0; }
.lh-act { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.lh-count { white-space: nowrap; }
.lh-save, .lh-map {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--surface-border, var(--line)); background: var(--surface-strong, #fff); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.lh-save .icon, .lh-map .icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; }
.lh-save:hover, .lh-map:hover { border-color: var(--brand); color: var(--brand); }
.lh-save.on { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand) 9%, var(--surface-strong, #fff)); }
.lh-save.on .icon { fill: currentColor; }
.lh-save[disabled] { opacity: .6; }
@media (max-width: 768px) {
  .lh h1 { flex: 1 1 100%; font-size: 17px; line-height: 1.6; }
  .lh-act { flex: 1 1 100%; justify-content: space-between; }
  .lh-count { order: 0; }
  .lh-save { order: 1; height: 32px; padding: 0 11px; font-size: 12.5px; }
  /* «نقشه» دکمه‌ی شناور وسط پایین، بالای نوار منو */
  .lh-map {
    position: fixed; z-index: 60; inset-inline-start: 50%; transform: translateX(50%); bottom: calc(98px + env(safe-area-inset-bottom));
    height: 42px; padding: 0 18px; font-size: 13.5px; border: 0; color: #fff; background: #1f2937; box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  }
  .lh-map:hover { color: #fff; }
  .lh-map span { font-size: 0; }
  .lh-map span::after { content: 'نقشه'; font-size: 13.5px; }
  html[data-mode="dark"] .lh-map { background: #e8ecf1; color: #111; }
}
@media (max-width: 768px) { html.sx-open .topbar { z-index: 1200; } html.sx-open .lh-map { display: none; } }

/* ───────── ۱.۱۶ — فیلترها شبیه دیوار (موبایل: صفحه‌ی تمام‌صفحه؛ دسکتاپ: ستون کناری) ───────── */
:root { --fline: #cfd4db; }
html[data-mode="dark"] { --fline: #3a4352; }
@media (prefers-color-scheme: dark) { html[data-mode="auto"] { --fline: #3a4352; } }
.fp-form { display: flex; flex-direction: column; gap: 0; }
.fp-dhead { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.fp-dhead h2 { margin: 0; font-size: 16px; }
.fsec { border-bottom: 1px solid var(--line); padding: 14px 0; }
.fsec:last-of-type { border-bottom: 0; }
.fsec-h { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 15px; cursor: pointer; user-select: none; }
.fsec-h::-webkit-details-marker { display: none; }
.fsec-h label, .fsec-h span { cursor: inherit; }
.fsec-h small { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.fsec-h::after { content: ''; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 0 2px 2px; transform: rotate(135deg); transition: transform .2s; flex: none; margin-top: 4px; }
.fsec:not([open]) > .fsec-h::after { transform: rotate(-45deg); margin-top: -4px; }
.fsec-b { margin-top: 12px; }
.fsec[data-has="1"] > .fsec-h > :first-child::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-inline-start: 6px; vertical-align: middle; }
.frange { display: flex; align-items: stretch; height: 48px; border: 1px solid var(--fline); border-radius: 12px; overflow: hidden; background: var(--field); }
.frange:focus-within { border-color: var(--brand); }
.frange .input { flex: 1; min-width: 0; height: 100%; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; padding: 0 12px; }
.frange .input + .input { border-inline-start: 1px solid var(--fline) !important; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fchip, .fseg span { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 12px; border: 1px solid var(--fline); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.fchip:hover, .fseg span:hover { border-color: var(--brand); }
.fchip.on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.fseg { display: flex; flex-wrap: wrap; gap: 8px; }
.fseg label { margin: 0; }
.fseg input { position: absolute; opacity: 0; pointer-events: none; }
.fseg span { min-width: 48px; min-height: 42px; }
.fseg input:checked + span { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); font-weight: 700; }
.fseg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.fsws { display: flex; flex-direction: column; gap: 2px; }
.fsw { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; font-size: 14px; margin: 0; }
.fsw input { position: absolute; opacity: 0; pointer-events: none; }
.fsw i { flex: none; position: relative; width: 42px; height: 24px; border-radius: 999px; background: #c8ced6; transition: background .2s; }
.fsw i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start .2s; }
.fsw input:checked + i { background: var(--brand); }
.fsw input:checked + i::after { inset-inline-start: 21px; }
.fsw input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
html[data-mode="dark"] .fsw i { background: #3a4452; }
.fp-foot { padding-top: 12px; }
.fp-apply { height: 48px; font-size: 15px; font-weight: 800; }
@media (min-width: 960px) {
  .fp-foot { position: sticky; bottom: -6px; background: inherit; padding: 12px 0 4px; margin-top: 4px; z-index: 2; }
  .fp-form { background-clip: padding-box; }
}
.fp-head { display: none; }
@media (max-width: 959px) {
  .dside.open { padding: 0 0 96px; gap: 0; background: #fff; z-index: 950; }
  html[data-mode="dark"] .dside.open { background: #141a22; }
  .dside.open .fp-head { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; position: sticky; top: 0; z-index: 3; height: 56px; padding: 0 8px 0 16px; padding-top: env(safe-area-inset-top); background: inherit; border-bottom: 1px solid var(--line); }
  .fp-back { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer; }
  .fp-back .icon { fill: none; stroke: currentColor; stroke-width: 2; }
  .fp-head strong { font-size: 16px; font-weight: 800; }
  .fp-clear { font-size: 14px; color: var(--muted); }
  .fp-clear.off { opacity: .5; }
  .dside.open .fp-form { background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0; padding: 0 16px; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .fsec { padding: 18px 0; }
  .fsec-h { pointer-events: none; font-size: 16px; }
  .fsec-h::after { display: none; }
  .frange { height: 52px; background: transparent; }
  .fp-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: start; }
  .fp-rl { flex: 1; font-weight: 800; font-size: 15px; }
  .fp-rv { color: var(--muted); font-size: 14px; }
  .fp-row .icon { fill: none; stroke: var(--muted); stroke-width: 2; }
  .fp-foot { position: fixed; inset-inline: 0; bottom: 0; z-index: 4; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: inherit; background-color: #fff; box-shadow: 0 -6px 18px rgba(0, 0, 0, .08); }
  html[data-mode="dark"] .fp-foot { background-color: #141a22; }
  .fp-apply { height: 52px; font-size: 16px; border-radius: 12px; }
}
@media (max-width: 959px) and (prefers-color-scheme: dark) { html[data-mode="auto"] .dside.open, html[data-mode="auto"] .fp-foot { background-color: #141a22; } }

/* ───────── ۱.۱۶ — کشوی دسته‌ها ───────── */
.csheet { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: flex-end; justify-content: center; }
.csheet[hidden] { display: none; }
.cs-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 24, .45); opacity: 0; transition: opacity .22s; }
.csheet.on .cs-backdrop { opacity: 1; }
.cs-panel {
  position: relative; width: 100%; max-height: 82vh; max-height: 82dvh; display: flex; flex-direction: column;
  background: #fff; color: var(--ink); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom);
}
.csheet.on .cs-panel { transform: translateY(0); }
html[data-mode="dark"] .cs-panel { background: #1b2230; }
.cs-grip { display: grid; place-items: center; height: 18px; flex: none; touch-action: none; }
.cs-grip span { width: 44px; height: 5px; border-radius: 99px; background: #c9ced6; }
.cs-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 52px; padding: 0 10px; border-bottom: 1px solid var(--line); flex: none; touch-action: none; }
.cs-head strong { text-align: center; font-size: 16px; font-weight: 800; }
.cs-back, .cs-x { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); border-radius: 10px; cursor: pointer; }
.cs-back:hover, .cs-x:hover { background: var(--field); }
.cs-back .icon, .cs-x .icon { fill: none; stroke: currentColor; stroke-width: 2; }
.cs-x { visibility: hidden; }
.cs-search { display: flex; align-items: center; gap: 10px; margin: 14px 16px 6px; height: 48px; padding: 0 14px; border: 1px solid var(--fline); border-radius: 12px; flex: none; cursor: text; }
.cs-search:focus-within { border-color: var(--brand); }
.cs-search .icon { flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }
.cs-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.cs-list { overflow-y: auto; padding: 8px 16px 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.cs-row { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 0 14px; border-radius: 14px; background: #f3f4f6; color: var(--ink); text-decoration: none; transition: background .15s; }
.cs-row:hover { background: #e9ebef; color: var(--ink); }
html[data-mode="dark"] .cs-row { background: #252d3b; } html[data-mode="dark"] .cs-row:hover { background: #2c3546; }
.cs-ic { flex: none; width: 30px; display: grid; place-items: center; color: var(--muted); }
.cs-ic .icon { width: 24px; height: 24px; }
.cs-n { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; display: flex; flex-direction: column; }
.cs-n small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cs-chev { flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }
.cs-empty { padding: 28px 8px; text-align: center; color: var(--muted); font-size: 14px; }
@media (prefers-color-scheme: dark) { html[data-mode="auto"] .cs-panel { background: #1b2230; } html[data-mode="auto"] .cs-row { background: #252d3b; } }
@media (min-width: 760px) {
  .csheet { align-items: center; }
  .cs-panel { width: 460px; max-height: min(640px, 84vh); border-radius: 20px; transform: translateY(18px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
  .csheet.on .cs-panel { transform: none; opacity: 1; }
  .cs-grip { display: none; }
  .cs-x { visibility: visible; }
  .cs-row { min-height: 52px; }
}

/* ───────── ۱.۱۶ — نقشه کنار فهرست در دسکتاپ ───────── */
.ms-close-pill, .ms-float-status { display: none; }
@media (min-width: 1100px) {
  body.map-split .map-search { inset: 12px auto 12px 12px; width: 40vw; z-index: 60; border-radius: 22px; overflow: hidden; box-shadow: 0 12px 40px rgba(15, 20, 30, .18); border: 1px solid var(--line); }
  body.map-split .ms-top { display: none; }
  body.map-split .appmain { padding-left: calc(40vw + 18px); }
  body.map-split .split > .side.dside { display: none; }
  body.map-split .lh-map { visibility: hidden; }
  body.map-split .ms-close-pill {
    display: inline-flex; align-items: center; gap: 8px; position: absolute; z-index: 1001; bottom: 22px; left: 50%; transform: translateX(-50%);
    height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  }
  body.map-split .ms-close-pill .icon { fill: none; stroke: currentColor; stroke-width: 2.4; }
  body.map-split .ms-float-status:not(:empty) {
    display: block; position: absolute; z-index: 1001; top: 14px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 120px);
    padding: 8px 16px; border-radius: 999px; background: #fff; color: #15191e; font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body.map-split .ms-sheet { bottom: 84px; }
}

/* ───────── ۱.۱۶ — ثبت آگهی با گفت‌وگو ───────── */
.pa-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; padding: 14px; text-align: start; font: inherit; color: var(--ink); cursor: pointer; border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent) !important; background: color-mix(in srgb, var(--brand) 7%, var(--surface-strong, #fff)) !important; }
.pa-entry:hover { border-color: var(--brand) !important; }
.pa-entry-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.pa-entry b { display: block; font-size: 15px; }
.pa-entry small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.7; }
.pa-entry > .icon:last-child { color: var(--brand); flex: none; }
.pa-chat { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 1250; display: flex; flex-direction: column; background: #fff; color: var(--ink); overflow: hidden; }
.pa-chat[hidden] { display: none; }
html[data-mode="dark"] .pa-chat { background: #141a22; }
@media (prefers-color-scheme: dark) { html[data-mode="auto"] .pa-chat { background: #141a22; } }
@media (min-width: 760px) { .pa-chat { top: auto; left: auto; inset: auto 24px 24px auto; width: 440px; height: min(720px, calc(100vh - 48px)); border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); border: 1px solid var(--line); overflow: hidden; } }
.pa-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); flex: none; }
.pa-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.pa-head b { display: block; font-size: 15px; }
.pa-head small { display: block; font-size: 11.5px; color: var(--muted); }
.pa-x { width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; color: var(--ink); cursor: pointer; }
.pa-x:hover { background: var(--field); }
.pa-x .icon { fill: none; stroke: currentColor; stroke-width: 2; }
.pa-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.pa-m { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.pa-m.bot { align-self: flex-start; background: #f1f3f6; border-start-start-radius: 6px; }
.pa-m.me { align-self: flex-end; background: var(--brand); color: #fff; border-start-end-radius: 6px; white-space: pre-wrap; }
html[data-mode="dark"] .pa-m.bot { background: #222a37; }
.pa-found { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; }
.pa-hint { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, transparent); font-size: 13px; }
.pa-sum { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 6px; font-size: 13px; }
.pa-sum span { color: var(--muted); }
.pa-typing { display: inline-flex; gap: 4px; }
.pa-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: paDot 1s infinite ease-in-out; }
.pa-typing span:nth-child(2) { animation-delay: .15s; } .pa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes paDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.pa-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; max-height: 34vh; overflow-y: auto; flex: none; }
.pa-quick[hidden] { display: none; }
.pa-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); background: transparent; color: var(--brand); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pa-chip:hover, .pa-chip.on { background: var(--brand); color: #fff; }
.pa-chip.alt { border-color: var(--fline); color: var(--ink); font-weight: 500; }
.pa-chip.alt:hover { background: var(--field); color: var(--ink); }
.pa-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.pa-compose textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--fline); background: transparent; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; outline: none; }
.pa-compose textarea:focus { border-color: var(--brand); }

/* ۱.۱۷ — لینک آگهی و خلاصه‌ی هزینه‌ها */
.link-box b .icon { vertical-align: -4px; color: var(--brand); }
.link-box .input[dir="ltr"] { text-align: left; }
.fee-sum { margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand) 6%, transparent); display: flex; flex-direction: column; gap: 4px; }
.fee-sum .fee-total { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 800; }
.ad-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 7%, transparent); color: var(--ink); text-decoration: none; }
.ad-link:hover { border-color: var(--brand); color: var(--ink); }
.ad-link .icon { flex: none; color: var(--brand); }
.ad-link b { display: block; font-size: 14.5px; }
.ad-link small { display: block; color: var(--muted); font-size: 12px; direction: ltr; text-align: right; }

/* ───────── ۱.۱۷ — دستیار خرید ───────── */
.sa-entry { margin: 0 0 12px; }
.qf-ai { font-weight: 700; color: var(--brand) !important; border-color: color-mix(in srgb, var(--brand) 40%, transparent) !important; }
.qf-ai .icon { color: var(--brand); }
.sg-ai { border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--brand); }
.sg-ai small { display: block; color: var(--muted); font-size: 11.5px; }
.pa-m.sa-bot { max-width: 94%; width: 94%; }
.sa-und { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; }
.sa-und span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 10%, transparent); }
.sa-ads { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: 8px; overflow-x: auto; margin: 10px -4px 4px; padding: 2px 4px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.sa-ad { scroll-snap-align: start; display: flex; flex-direction: column; gap: 3px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; font-size: 12.5px; }
html[data-mode="dark"] .sa-ad { background: #1b2230; }
.sa-ad:hover { border-color: var(--brand); color: var(--ink); }
.sa-img { display: block; height: 96px; border-radius: 8px; overflow: hidden; background: var(--field); }
.sa-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sa-t { font-weight: 700; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sa-p { font-weight: 800; color: var(--ink); }
.sa-mt { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-v { align-self: flex-start; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.sa-v.fair { background: #e6f6ee; color: #0a7a4b; } .sa-v.low { background: #fff4e0; color: #9a5b00; } .sa-v.high { background: #fde8e8; color: #b42318; }
.sa-all { margin-top: 6px; }
.sa-adv { margin: 8px 0 0; padding-inline-start: 18px; font-size: 13px; }
.sa-ask { margin-top: 8px; font-weight: 700; color: var(--brand); font-size: 13.5px; }
.sa-tips { margin-top: 8px; font-size: 13px; }
.sa-tips summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.sa-tips ul { margin: 6px 0 0; padding-inline-start: 18px; line-height: 1.9; }
.lh-ai .icon { color: var(--brand); }

/* ۱.۱۸: نوار «ورود به عنوان کاربر» */
.imp-bar { position: sticky; top: 0; z-index: 200; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 8px 16px; background: #7c2d12; color: #fff; font-size: 14px; }
.imp-bar span { display: inline-flex; align-items: center; gap: 6px; }
.imp-bar .btn { background: #fff; color: #7c2d12; border-color: #fff; }

/* ۱.۱۸: پوشاندن پلاک */
.up-item .plate-tag { position: absolute; inset-inline: 4px; bottom: 4px; z-index: 2; border: 0; border-radius: 8px; padding: 3px 6px; font: inherit; font-size: 11px; font-weight: 700; background: rgba(15, 23, 42, .78); color: #fff; cursor: pointer; }
.up-item .plate-tag.on { background: var(--soft); color: var(--soft-ink); }
.plate-dlg { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .6); }
.plate-card { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--card, #fff); color: var(--ink); }
.plate-head { display: flex; flex-direction: column; gap: 2px; }
.plate-stage { position: relative; align-self: center; max-width: 100%; touch-action: none; user-select: none; line-height: 0; }
.plate-stage img { display: block; max-width: 100%; max-height: 60vh; border-radius: 10px; }
.plate-box { position: absolute; border: 2px solid #f59e0b; background: rgba(245, 158, 11, .25); border-radius: 6px; cursor: move; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25); }
.plate-box:focus-visible { outline: 3px solid #fff; }
.plate-h { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: #f59e0b; border: 2px solid #fff; cursor: nwse-resize; }
.plate-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ۱.۱۹: ارتقای چندگانه و راهنما */
.promo-type .sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.promo-help { flex: none; }
.plan-opt.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.promo-sum { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--field); border: 1px solid var(--line); }
.promo-sum ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.promo-sum li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.promo-dlg { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 18px; background: var(--card, #fff); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.promo-dlg::backdrop { background: rgba(15, 23, 42, .55); }
.promo-dlg h3 { margin: 0 0 8px; }
.promo-dlg p { margin: 0 0 10px; line-height: 1.9; }
.promo-dlg form { display: flex; justify-content: flex-end; margin-top: 6px; }

/* ۱.۲۰: هدر موبایل — آیکن موقعیت به‌همراه نام شهر («همه شهرها») */
@media (max-width: 599px) {
  .topbar .city-btn { width: auto; min-width: 0; max-width: calc(50vw - 62px) !important; padding: 0 9px 0 10px; gap: 4px; justify-content: flex-start; font-size: 12.5px; font-weight: 700; }
  .topbar .city-btn .city-lbl { display: inline-block !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .topbar .city-btn .city-pin { width: 18px !important; height: 18px !important; flex: none; }
  .topbar .city-btn .city-dot { display: none !important; }
}

/* ۱.۲۰: تخفیف ترکیبی */
.promo-combos .badge { margin: 3px 0 0 4px; display: inline-flex; }
.promo-disc { color: var(--soft-ink); font-size: 14px; }

/* ۱.۲۰: پرداخت امن */
.escrow-box { display: flex; flex-direction: column; gap: 12px; border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); background: color-mix(in srgb, var(--brand) 5%, var(--card, #fff)); }
.escrow-ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--soft); color: var(--soft-ink); }
.escrow-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--soft); color: var(--soft-ink); }
.deal-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0; counter-reset: st; }
.deal-steps li { list-style: none; text-align: center; font-size: 11.5px; color: var(--muted); position: relative; padding-top: 30px; }
.deal-steps li::before { counter-increment: st; content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--field); border: 1px solid var(--line); font-weight: 800; font-size: 12px; }
.deal-steps li.done { color: var(--soft-ink); } .deal-steps li.done::before { content: '✓'; background: var(--soft); border-color: transparent; color: var(--soft-ink); }
.deal-steps li.now { color: var(--ink); font-weight: 800; } .deal-steps li.now::before { background: var(--brand); color: #fff; border-color: var(--brand); }
.deal-stat { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.deal-stat > div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--field); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.deal-stat .k { font-size: 12px; color: var(--muted); } .deal-stat .v { font-weight: 800; }
.deal-tl { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.deal-tl li { display: flex; gap: 10px; font-size: 13.5px; } .deal-tl li .dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--brand); }
.deal-tl li.admin .dot { background: #f59e0b; } .deal-tl li.system .dot, .deal-tl li.provider .dot { background: var(--muted); }
.deal-row { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.deal-row .thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: var(--field); display: grid; place-items: center; }
.deal-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 599px) { .deal-steps li { font-size: 10px; } }
