/*
 * تمِ سایت، **همان پالتِ اپ**.
 *
 * مقدارها یک‌به‌یک از `ui/theme/Color.kt` می‌آیند: سبزِ برگ به‌عنوان تنها
 * رنگِ هویت، سه رنگِ معنایی (منتشرشده/در انتظار/ردشده)، خطِ نازک به‌جای سایه،
 * و نوارِ بالای صفحه که در تمِ روشن کمی از سطح تیره‌تر است تا ناپیدا نشود.
 */
:root {
  --bg: #f9fbf8;
  --surface: #ffffff;
  --sunken: #f3f6f4;
  --bar: #edf1ee;
  --line: #e4e8e5;
  --text: #171a18;
  --muted: #656b67;
  --primary: #0ea960;
  --on-primary: #ffffff;
  --primary-container: #cdf0de;
  --on-primary-container: #00341e;
  --published: #12734f;
  --error: #b4451b;
  --error-bg: #fce9df;
  --pending: #9a6300;
  --pending-bg: #fff1d6;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141211;
    --surface: #191e1b;
    --sunken: #141815;
    --bar: #191e1b;
    --line: #2a302c;
    --text: #e4e9e6;
    --muted: #9da7a1;
    --primary: #52d69a;
    --on-primary: #00341e;
    --primary-container: #00341e;
    --on-primary-container: #cdf0de;
    --published: #66d6a4;
    --error: #ff9e70;
    --error-bg: #3a2015;
    --pending: #ffc65c;
    --pending-bg: #3a2e12;
  }
}

/* همان قلمِ اپ (استعداد) تا سایت و اپ یک چیز به نظر برسند */
@font-face {
  font-family: Estedad;
  src: url('/fonts/estedad_regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Estedad;
  src: url('/fonts/estedad_semibold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Estedad;
  src: url('/fonts/estedad_bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Estedad, "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; font-size: 18px; color: var(--primary); }

#nav { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; }

#nav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
}

#nav a.on { background: var(--primary-container); color: var(--on-primary-container); font-weight: 600; }

.view { max-width: 900px; margin: 0 auto; padding: 16px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- فرم ---------- */
label { display: block; margin-bottom: 12px; }
label > span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  /* هم‌اندازه اپ: گردی ۴، متن ۱۶ */
  border-radius: 4px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }

button {
  font: inherit;
  padding: 10px 18px;
  /* گردیِ همه دکمه‌های اپ ۴ است (`ButtonShape`)، نه کپسول */
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
}

button.ghost { background: transparent; border-color: var(--line); color: var(--text); }
/* دکمه متنی — «ارسال دوباره کد» در صفحه ورود */
button.link-button { border: 0; padding: 0; color: var(--primary); font-size: 13px; background: transparent; cursor: pointer; }
button.danger { background: var(--error); color: #fff; }
button:disabled { opacity: .5; cursor: default; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; cursor: zoom-in; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- گروهِ دکمه‌ها (به‌جای رادیو) ---------- */
.group { display: flex; flex-wrap: wrap; gap: 4px; }

.group button {
  background: var(--sunken);
  color: var(--text);
  border-radius: 4px;
  padding: 8px 14px;
  /* انتخاب‌نشده بی‌خط، از زمینه جدا نمی‌شد و دکمه به نظر نمی‌رسید — مثل اپ */
  border: 1px solid var(--line);
}

.group button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  border-color: transparent;
}

/* ---------- تراشه‌های فیلتر ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.chips button { white-space: nowrap; background: var(--surface); color: var(--text); border-color: var(--line); }
.chips button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
/* تب‌های پنل مدیر */
.chip {
  white-space: nowrap; text-decoration: none; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); border-radius: 14px; padding: 6px 14px;
}
.chip.on { background: var(--primary); color: var(--on-primary); border-color: transparent; }

/* ---------- کارتِ آگهی ---------- */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--sunken); }
.card .body { padding: 10px 12px; }
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.price { color: var(--published); font-weight: 700; }

/* ---------- اخطارها، هم‌شکل با اپ ---------- */
.notice { display: flex; gap: 8px; padding: 10px 12px; border-radius: 12px; margin: 12px 0; }
/* هم‌شکلِ `Notice` در اپ: بی‌کادر، فقط متنِ رنگی */
.notice.error { background: transparent; color: var(--error); padding-inline: 0; }
.notice.warn { background: transparent; color: var(--pending); padding-inline: 0; }
.notice.info { background: transparent; color: var(--muted); padding-inline: 0; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--sunken); color: var(--muted); }
.badge.ok { background: var(--primary-container); color: var(--on-primary-container); }
.badge.pending { background: var(--pending-bg); color: var(--pending); }
.badge.rejected { background: var(--error-bg); color: var(--error); }

/* ---------- گفتگو ---------- */
.messages { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 16px; background: var(--sunken); }
.bubble.mine { align-self: flex-start; background: var(--primary-container); color: var(--on-primary-container); }
.bubble.theirs { align-self: flex-end; }

.gallery { display: flex; gap: 8px; overflow-x: auto; }
.gallery img { height: 220px; border-radius: 12px; object-fit: cover; cursor: zoom-in; display: block; }
.shot { position: relative; flex: 0 0 auto; }
.shot-tag {
  position: absolute; inset-inline-start: 8px; bottom: 8px;
  font: inherit; font-size: 12px; border: 0; border-radius: 8px;
  padding: 3px 8px; background: rgba(0,0,0,.6); color: #fff;
}
.shot-tag.pick { cursor: pointer; }
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.9); padding: 24px;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; transform-origin: center; will-change: transform; }
/* عکسِ بزرگ‌شده تمامِ صفحه است: بی‌گردی، دکمه‌ها و شمارنده کنار می‌روند */
.lightbox.zoomed img { border-radius: 0; }
.lightbox.zoomed .lightbox-close, .lightbox.zoomed .lightbox-nav, .lightbox.zoomed .lightbox-count { opacity: 0; pointer-events: none; }
.lightbox-close, .lightbox-nav {
  position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; border-radius: 12px; padding: 8px 14px;
}
.lightbox-close { top: 16px; inset-inline-end: 16px; }
.lightbox-nav.prev { inset-inline-start: 16px; }
.lightbox-nav.next { inset-inline-end: 16px; }
.lightbox-count { position: absolute; bottom: 16px; color: #fff; font-size: 13px; }
/* کاورِ فعلی با یک قابِ رنگی مشخص است */
.gallery img.cover { outline: 3px solid var(--primary); outline-offset: -3px; cursor: default; }

.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  margin: 0 auto;
  max-width: 480px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 16px;
  border-radius: 12px;
  text-align: center;
  z-index: 50;
}

[hidden] { display: none !important; }

/* ---------- کد یک‌بارمصرف ---------- */
.otp { display: flex; gap: 8px; direction: ltr; }
.otp input {
  flex: 1;
  aspect-ratio: 1;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  border-radius: 4px;
}
.login-actions { display: flex; gap: 12px; }
.login-actions .primary { flex: 3; }
.login-actions .ghost { flex: 7; }

/* کارتِ ردیفی — گلفروشی‌های اطراف */
.row-card {
  display: block;
  padding: 12px 14px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}

/* ---------- نقشه ---------- */
.map {
  width: 100%;
  height: 260px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--sunken);
}
.map-tall { height: 360px; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ورقه نوعِ نقشه — همتای باتم‌شیتِ اپ */
.map-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.map-sheet {
  background: #fff;
  width: min(480px, 100%);
  border-radius: 16px 16px 0 0;
  padding: 16px 20px 28px;
}
.map-sheet h3 { margin: 0 0 12px; }

/* نشانه «نقشه» گوشه بالا-راستِ نقشه جزئیات آگهی — همتای اپ */
.map-wrap { position: relative; }
.map-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 2;
}

/* بارگذاریِ نقشه جزئیات آگهی — همتای LoadingIndicator اپ */
.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  z-index: 3;
}
@keyframes map-spin { to { transform: rotate(360deg); } }

.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; aspect-ratio: var(--slide-ratio, 4 / 3); object-fit: cover; scroll-snap-align: center; cursor: zoom-in; display: block; }
.dots { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,.35); }
.dots span { width: calc(6px + 10px * var(--t)); height: 6px; border-radius: 3px; background: rgba(255,255,255,calc(.6 + .4 * var(--t))); }

.photo-hero { position: relative; }
.photo-top { display: flex; gap: 8px; padding: 8px 12px; background: var(--bar); }
.photo-chip { pointer-events: auto; font: inherit; font-size: 13px; display: flex; align-items: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; }
.photo-count { display: flex; align-items: center; gap: 4px; position: absolute; bottom: 12px; left: 12px; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.35); color: #fff; font-size: 13px; }
.photo-count-icon { display: flex; }
.photo-bar { flex: 1; min-width: 0; display: flex; align-items: center; height: 40px; border-radius: 8px; background: none; overflow: hidden; }
.photo-search { flex: 1; min-width: 0; height: 100%; padding: 0 10px; font: inherit; font-size: 16px; border: 0; background: none; color: inherit; outline: none; }
.photo-bar-btn { width: 40px; height: 40px; font: inherit; font-size: 18px; border: 0; border-inline-start: 1px solid var(--outline, #ccc); background: none; color: inherit; cursor: pointer; }
.place-line { display: flex; align-items: center; gap: 6px; }
.place-line img { width: 20px; height: 20px; }
.float-bar { position: fixed; inset-inline: 12px; bottom: 12px; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bar); box-shadow: 0 4px 16px rgba(0,0,0,.25); z-index: 20; }
.float-bar .price { flex: 1; margin: 0; }
.float-bar .row { flex-wrap: nowrap; margin: 0; }
.map-loading.cover { inset: 0; top: 0; left: 0; width: auto; height: auto; margin: 0; background: var(--bar) no-repeat center; display: flex; align-items: center; justify-content: center; }
.map-loading.cover svg { width: 96px !important; height: 96px !important; }

/* صفحه آگهی‌ها: تصویرِ یک‌سومِ بالا و کادرِ محتوا روی آن */
.feed-hero {
  position: sticky; top: 0; z-index: 0;
  height: 100px; margin: -16px -16px -40px; padding: 0 16px 40px;
  display: flex; align-items: center; gap: 8px; box-sizing: border-box;
  background: linear-gradient(#1B5E20, #43A047); color: #fff;
}
.feed-logo { width: 32px; height: 32px; }
.feed-hero h1 { margin: 0; font-size: 22px; }
.feed-hero p { margin: 0 auto 0 0; padding-right: 4px; font-size: 12px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-sheet {
  position: relative; z-index: 1;
  margin: -20px -16px 0; padding: 16px;
  min-height: 67vh;
  background: var(--bg, #fff); border-radius: 12px 12px 0 0;
}
/* دسته‌های صفحه آگهی‌ها: دو ردیف با اسکرولِ افقی، مثل اپ */
.feed-chips { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); gap: 8px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.feed-chips::-webkit-scrollbar { display: none; }
.feed-chips button { white-space: nowrap; }
.chip-count { display: block; font-size: 11px; opacity: .7; }
.feed-chips button { background: none; border: 0; }
.feed-chips button[aria-pressed="true"] { background: var(--primary); color: #fff; border-radius: 12px; }

/* پربازدیدهای هفته: ردیفِ افقی کارت‌های کوچک */
.popular-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.popular-row::-webkit-scrollbar { display: none; }
.popular-card { flex: 0 0 150px; color: inherit; text-decoration: none; }
.popular-card img { width: 150px; height: 120px; object-fit: cover; border-radius: 8px; display: block; }
.popular-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }

/* پنل مدیر: تب‌های عمودی سمتِ راست */
.admin-layout { display: flex; gap: 16px; align-items: flex-start; }
.admin-tabs { flex: 0 0 200px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 16px;
  /* فهرست بلندتر از صفحه شد: خودش اسکرول شود، نه اینکه ته‌اش گم شود */
  max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; padding-inline-end: 4px; }
/* صفحه پهن: تب‌ها چسبیده به گوشه راستِ صفحه، محتوا وسط */
@media (min-width: 1360px) {
  .admin-layout { display: block; }
  .admin-tabs { position: fixed; inset-inline-start: 16px; top: 88px; width: 200px; max-height: calc(100vh - 104px); overflow-y: auto; }
}
.admin-tabs a { padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* سرگروه‌ها: کوچک، خاکستری، و هنگام اسکرول بالای گروهِ خودشان می‌مانند */
.admin-group { position: sticky; top: 0; z-index: 1; background: var(--bg, #fff);
  font-size: 12px; color: var(--muted, #777); padding: 10px 12px 4px; }
.admin-tabs a.on .badge { background: var(--on-primary, #fff); color: var(--primary); }
.admin-tabs a:hover { background: var(--surface); }
.admin-tabs a.on { background: var(--primary); color: var(--on-primary, #fff); font-weight: 600; }
.admin-content { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .admin-layout { flex-direction: column; }
  .admin-tabs { position: static; flex-direction: row; overflow-x: auto; overflow-y: visible; max-height: none; flex-basis: auto; width: 100%; }
  /* نوارِ افقیِ موبایل جای سرگروه ندارد */
  .admin-group { display: none; }
  .admin-tabs a { white-space: nowrap; }
}

/* آمارِ کلی در پنل مدیر */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat-value { font-size: 26px; font-weight: 700; margin: 4px 0; }
.stat-chart { display: flex; gap: 8px; align-items: flex-end; height: 160px; padding-top: 8px; }
.stat-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.stat-bars { flex: 1; width: 100%; display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.stat-bar { width: 40%; min-height: 2px; border-radius: 4px 4px 0 0; }
.stat-bar.listings, .stat-key.listings { background: var(--primary); }
.stat-bar.users, .stat-key.users { background: #E8A33D; }
.stat-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.stat-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.popular-row.new-shops { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: 200px; gap: 12px 14px; }
.shop-chip { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.shop-chip img { width: 56px; height: 56px; flex: none; border-radius: 14px; object-fit: cover; display: block; background: var(--surface); }
.shop-chip-text { min-width: 0; }
.shop-chip-text .popular-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-chip-text .small { font-size: 11px; white-space: nowrap; }

/* دکمه و باتم‌شیتِ دسته‌ها در صفحه اطراف */
.cat-button { background: #fff; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; border-radius: 4px; padding: 3px 10px; }
.cat-sheet-row { display: flex; align-items: center; gap: 16px; width: 100%; background: none; border: 0; font: inherit; padding: 12px 8px; cursor: pointer; text-align: start; color: var(--text); }
.cat-sheet-row.on { color: var(--primary); font-weight: 700; }
.cat-sheet-icon { font-size: 22px; width: 28px; text-align: center; }
.cat-sheet-check { margin-inline-start: auto; }

/* نوارِ شناورِ آگهی / کسب‌وکار در صفحه اطراف */
.nearby-mode { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; gap: 2px; padding: 0; overflow: hidden; background: var(--bar, #fff); border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.nearby-mode button { border: 0; background: var(--sunken); color: var(--text); font: inherit; border-radius: 4px; padding: 6px 28px; line-height: 1.6; cursor: pointer; }
.nearby-mode button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); font-weight: 600; }

/* بارگیری روی نقشه اطراف: heavy یعنی نقشه مات و لمس بسته */
.map-busy { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.map-busy.heavy { background: rgba(255,255,255,.2); pointer-events: auto; }
.map-blur canvas { filter: blur(3px); }

/* عنوانِ روی پین‌های نقشه: متنِ سفید با هاله تیره، مثل اپ */
.map-label { color: #1B1F1D; background: #fff; font-size: 12px; font-weight: 500; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; padding: 2px 8px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.25); text-decoration: none; pointer-events: none;
  opacity: 0; transform: scaleX(.3); transform-origin: right center; transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.3,1.2); }
/* باز شدنِ کادرِ اسم وقتی جا هست */
.map-label.open { opacity: 1; transform: none; pointer-events: auto; }

/* فونتِ سایت داخلِ نقشه هم (MapLibre خودش Helvetica می‌گذارد) */
.maplibregl-map, .maplibregl-popup-content, .map-label { font-family: Estedad, "Segoe UI", Tahoma, system-ui, sans-serif; }
/* «من» روی نقشه اطراف: نقطه آبی، نه پینِ سبزِ آگهی */
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #1A73E8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26,115,232,.2); }
/* کارتِ شناورِ آگهی/کسب‌وکارِ انتخاب‌شده، بالای نوارِ آگهی/کسب‌وکار */
.nearby-card { position: fixed; bottom: 128px; left: 50%; transform: translateX(-50%); z-index: 40; width: min(420px, calc(100% - 24px)); box-shadow: 0 6px 20px rgba(0,0,0,.2); border-radius: 12px; background: var(--surface, #fff); }
.nearby-card .card { margin: 0; }

/* کادرِ نازکِ فاصله، چسبیده به بالای کارتِ شناور */
.nearby-card { background: transparent; box-shadow: none; }
.nearby-card .card { box-shadow: 0 6px 20px rgba(0,0,0,.2); background: var(--surface, #fff); }
.nearby-distance { display: inline-block; margin-inline-start: 12px; padding: 2px 10px; font-size: 12px; background: var(--bar, #fff); border-radius: 8px 8px 0 0; }

/* انتخابِ یک مورد روی نقشه: بقیه کوچک‌تر و کم‌رنگ */
.pin-dim svg { width: 23px; height: 30px; }
.pin-dim { width: 23px !important; height: 30px !important; }
.map-label.dim { font-size: 10px; }
/* کادرِ اسمِ انتخاب‌شده: نورِ سبز آرام و پیوسته دورش می‌چرخد — مثل اپ */
@property --glow-turn { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --glow-a { syntax: '<number>'; inherits: false; initial-value: 0; }
.map-label { border: 2px solid transparent; padding: 0 6px; --glow-a: 0; transition: --glow-a .35s ease, opacity .25s ease, transform .3s cubic-bezier(.2,.8,.3,1.2); background: linear-gradient(#fff, #fff) padding-box, conic-gradient(from var(--glow-turn), transparent 0deg, rgb(46 125 79 / var(--glow-a)) 43deg, transparent 108deg, transparent 360deg) border-box; }
/* آمدن و رفتن نرم؛ چرخش روی کادرهای غیرکم‌رنگ می‌ماند تا هنگامِ محو شدن نایستد */
.map-label:not(.dim) { animation: glow-turn 2.4s linear infinite; }
.map-label.chosen { --glow-a: 1; }
@keyframes glow-turn { to { --glow-turn: 360deg; } }
.map-label.dim.open { opacity: .6; }
/* ضربدرِ بستنِ کارتِ شناور، بالا و وسط */
.nearby-close { display: block; float: left; margin: 0 8px 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bar, #fff); box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: pointer; font-size: 14px; color: var(--text); }
#nearby-card-box > :last-child, .nearby-card > :last-child { clear: both; }

/* ورودِ کارتِ شناور: از پایین بالا، بعد ضربدر از پشتش */
@keyframes nearby-rise { from { transform: translate(-50%, 320px); } to { transform: translate(-50%, 0); } }
@keyframes nearby-close-rise { from { transform: translateY(38px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.nearby-card.enter { animation: nearby-rise .35s cubic-bezier(.2,.8,.3,1) both; }
.nearby-card.enter .nearby-close { position: relative; z-index: -1; animation: nearby-close-rise .3s cubic-bezier(.3,1.4,.5,1) .35s both; }

/* دایره تعدادِ موارد نزدیک به هم، و برچسبِ کوچکِ محدوده حدودی */
.map-cluster { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 17px; border: 0; color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.3); }

/* دکمه فعال کمی بزرگ‌تر و با سایه، روی دکمه دیگر می‌افتد — مثل اپ */
.nearby-mode { background: transparent !important; box-shadow: none !important; overflow: visible !important; gap: 0 !important; align-items: center; }
.nearby-mode button { background: var(--bar, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.18); transform: scale(.97); transition: transform .25s ease, box-shadow .25s ease, background .25s ease; position: relative; z-index: 0; height: 36px; padding: 0 28px; }
.nearby-mode button + button { margin-inline-start: -8px; }
.nearby-mode button[aria-pressed="true"] { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0,0,0,.25); z-index: 1; }

/* صفحه معرفیِ کسب‌وکار */
.shop-header .row { display: flex; gap: 12px; align-items: center; }
.shop-header h1 { margin: 0 0 4px; }
.shop-logo { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--sunken); flex: 0 0 72px; }
.follow-button { width: 100%; margin-top: 12px; height: 40px; border-radius: 4px; border: 1px solid var(--primary); background: none; color: var(--primary); font: inherit; cursor: pointer; }
.follow-button.on { background: var(--primary); color: #fff; }
/* با اسکرول زیرِ نوارِ بالا می‌چسبد تا معلوم باشد کدام تب است — مثل اپ */
.shop-tabs { display: flex; border-bottom: 1px solid var(--sunken); margin: 12px 0; position: sticky; top: calc(var(--bar-height, 57px) + var(--shop-header-height, 0px)); z-index: 9; background: var(--bg); }
.shop-tabs button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px; font: inherit; cursor: pointer; color: var(--text); }
.shop-tabs button[aria-pressed="true"] { border-bottom-color: var(--primary); color: var(--primary); font-weight: 600; }

/* خروجِ کارتِ شناور: اول ضربدر پشتِ کارت، بعد کارت پایین */
@keyframes nearby-fall { from { transform: translate(-50%, 0); } to { transform: translate(-50%, 320px); } }
@keyframes nearby-close-fall { from { transform: translateY(0); opacity: 1; } to { transform: translateY(38px); opacity: 0; } }
.nearby-card.leave { animation: nearby-fall .26s ease-in .18s both; }
.nearby-card.leave .nearby-close { position: relative; z-index: -1; animation: nearby-close-fall .18s ease-in both; }

.map-label-sub { color: #2E7D4F; font-weight: 700; font-size: 11px; }
.map-label-sub.rating { color: #5B635F; font-weight: 500; }
.map-label-sub.rating .star { color: #F5A623; }
.map-label > div { overflow: hidden; text-overflow: ellipsis; }

/* نشانگرِ دایره‌ای با عکس در نقشه اطراف */
.photo-pin { display: flex; flex-direction: column; align-items: center; cursor: pointer; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.photo-pin-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--pin); border: 3px solid var(--pin); box-sizing: border-box; overflow: hidden; border-width: 1.5px; }
.photo-pin-circle img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.photo-pin-tip { width: 0; height: 0; border-inline: 7px solid transparent; border-top: 7px solid var(--pin); margin-top: -2px; }
.photo-pin.pin-dim { transform: scale(.65); transform-origin: bottom center; width: auto !important; height: auto !important; transition: transform .25s ease; }
.photo-pin.pin-dim svg { width: auto; height: auto; }

/* کوچک و بزرگ شدنِ نرمِ نشانگرها با انتخابِ یک مورد */
.photo-pin { transition: transform .25s ease; transform-origin: bottom center; }
.photo-pin.pin-dim { transition: transform .25s ease; }
@keyframes pin-shrink { from { transform: scale(1); } to { transform: scale(.65); } }
.photo-pin.pin-dim.animate { animation: pin-shrink .25s ease both; }

.photo-pin-circle:not(:has(img)) { background: #fff; display: flex; align-items: center; justify-content: center; }
.photo-pin-flower { width: 62%; height: 62%; }

/* کادرِ فاصله: بعد از کارت و پیش از ضربدر بالا می‌آید؛ هنگامِ بستن اول از همه پایین */
@keyframes nearby-distance-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nearby-distance-fall { from { transform: none; opacity: 1; } to { transform: translateY(24px); opacity: 0; } }
.nearby-card.enter .nearby-distance { position: relative; z-index: -1; animation: nearby-distance-rise .28s cubic-bezier(.3,1.4,.5,1) .35s both; }
.nearby-card.enter .nearby-close { animation-delay: .6s !important; }
.nearby-card.leave .nearby-distance { position: relative; z-index: -1; animation: nearby-distance-fall .16s ease-in .18s both; }
.nearby-card.leave .nearby-close { animation-delay: 0s !important; }
.nearby-card.leave { animation-delay: .34s !important; }

/* کادرِ فاصله برجسته: سایه و متنِ پررنگ */
.nearby-distance { box-shadow: 0 -2px 10px rgba(0,0,0,.22); font-weight: 700; }

/* موجودیِ کسب‌وکار — مثل اپ: شبکه دوستونه */
.stock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stock-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.stock-item > div:nth-of-type(1) { margin-top: 6px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.stock-item[onclick], .panel .stock-item { cursor: pointer; }
.stock-add { width: 100%; margin: 0 0 12px; border-radius: 4px; }
.stock-photo { width: 120px; height: 120px; border: 1px dashed var(--line, #ccc); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; margin-bottom: 12px; }
.stock-photo img { width: 100%; height: 100%; object-fit: cover; }

/* پیوندی که شکلِ دکمه دارد — گردی ۴ مثل همه دکمه‌ها */
a.button { display: inline-block; padding: 10px 18px; border-radius: 4px; background: var(--primary); color: var(--on-primary); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* آیکونِ اخطار، مثل `Notice` اپ: خطا ErrorOutline، هشدار WarningAmber، اطلاع Info — به رنگِ متن */
.notice::before { content: ''; flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; background: currentColor;
  -webkit-mask: var(--notice-icon) center / contain no-repeat; mask: var(--notice-icon) center / contain no-repeat; }
.notice.error { --notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z'/%3E%3C/svg%3E"); }
.notice.warn { --notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z'/%3E%3C/svg%3E"); }
.notice.info { --notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z'/%3E%3C/svg%3E"); }

.info-button { background: none; border: 0; padding: 0 4px; color: var(--muted); font-size: 18px; vertical-align: middle; cursor: pointer; }

/* نشانیِ تازه از زیرِ کادرِ نقشه پایین می‌لغزد */
.address-drop { position: relative; z-index: 0; animation: address-drop .35s cubic-bezier(.2,.8,.3,1) both; }
@keyframes address-drop { from { transform: translateY(-100%); opacity: 0; max-height: 0; margin-block: 0; } to { transform: none; opacity: 1; max-height: 6em; } }
.address-lift { overflow: hidden; animation: address-lift .25s ease-in both; }
@keyframes address-lift { from { opacity: 1; max-height: 6em; } to { opacity: 0; max-height: 0; margin-block: 0; } }

/* اخطارِ مستقل در کادر (`boxed = true` در اپ) */
.notice.boxed { padding: 10px 12px; border-radius: 12px; }
.notice.error.boxed { background: var(--error-bg); }
.notice.warn.boxed { background: var(--pending-bg); }
.notice.info.boxed { background: var(--sunken); }

/* دکمه اصلی ۷۰٪ و بی‌خیال ۳۰٪، کنارِ هم */
.save-row { display: flex; gap: 8px; margin-top: 12px; }
.save-row > :first-child { flex: 7; }
.save-row > :last-child { flex: 3; }

/* برچسبِ «تأیید شده» چسبیده به بالا-چپِ کارت */
.status-tab { width: fit-content; margin: 0 auto -1px 12px; margin-inline: auto 12px; padding: 2px 10px; font-size: 12px; font-weight: 700; color: var(--on-primary); background: var(--primary); border-radius: 8px 8px 0 0; box-shadow: 0 -2px 6px rgba(0,0,0,.15); }
.status-tab + .panel { margin-top: 0; }
/* با ورود از پشتِ کارت بالا می‌آید — مثلِ کادرِ فاصله «اطراف» */
.status-tab { position: relative; z-index: 0; animation: nearby-distance-rise .28s cubic-bezier(.3,1.4,.5,1) .25s both; }
.status-tab + .panel { position: relative; z-index: 1; }

.status-tab.ok { background: var(--primary); color: var(--on-primary); }
.status-tab.error { background: var(--error); color: #fff; }
.status-tab.none { background: var(--sunken); color: var(--muted); }

.rating .star { color: #F5A623; }
.vote-box { overflow: hidden; }
.vote-leave > * { animation: vote-up .28s ease-in forwards; }
.vote-enter { animation: vote-down .32s ease-out; }
@keyframes vote-up { to { transform: translateY(-100%); opacity: 0; } }
@keyframes vote-down { from { transform: translateY(-100%); opacity: 0; } }
.vote-box:has(> .vote-result), .vote-enter { text-align: center; }
.vote-result { display: block; text-align: center; font-size: 12px; padding: 4px 14px; border-radius: 0; background: var(--line); }
/* مثل اپ: زمینه نوارِ زیرِ هدرِ گفتگو، متنِ سبز، به اندازه متن */
.vote-result.rejected { color: var(--error); background: var(--error-bg); font-weight: 600; }
.vote-result.ok { color: var(--primary, #2e7d32); background: var(--error-bg); font-weight: 600; }
.vote.on { border-color: var(--primary); background: var(--primary-container); }
.empty-center { text-align: center; padding: 48px 0; }
.review-row p { margin: 4px 0 8px; }
.vote { background: none; border: 1px solid var(--line); padding: 6px 10px; margin-inline-start: 6px; font-size: 18px; }

/* دنبال‌شده‌ها */
.following-row { display: flex; align-items: center; gap: 12px; }
.following-name { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.small-logo { width: 48px; height: 48px; flex-basis: 48px; }

.verified-tick { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-start: 6px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; vertical-align: middle; }
.vote-send { display: block; width: 60%; margin-inline-start: 0; margin-inline-end: auto; }
.owner-hint { font-weight: normal; margin-inline-start: 8px; vertical-align: super; font-size: 11px; }
.owner-avatar { display: inline-block; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--line); margin-inline-end: 8px; vertical-align: middle; }
.zoomable { cursor: zoom-in; }
.zoom-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; }
.zoom-image { width: min(90vw, 480px); aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.zoom-image.round { border-radius: 50%; }
.complete-button { font-size: 12px; font-weight: normal; padding: 2px 12px; margin-inline-end: 8px; }
.map-holder { position: relative; }
.finding-me { position: absolute; bottom: 16px; right: 16px; z-index: 5; font-size: 11px; padding: 4px 8px; border-radius: 8px; background: var(--surface, #fff); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.update-me { border: none; cursor: pointer; font-family: inherit; color: inherit; }
.update-me.pulse { animation: update-pulse .7s ease-in-out 2; }
@keyframes update-pulse { 50% { transform: scale(1.12); } }
.area-sheet { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.area-list { width: 100%; height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--surface); border-radius: 0 0 16px 16px; pointer-events: auto; box-sizing: border-box; padding: 0 12px; display: flex; flex-direction: column; gap: 8px; }
.area-sheet.open .area-list { box-shadow: 0 4px 12px rgba(0,0,0,.2); padding: 4px 12px; }
.area-list { gap: 0 !important; }
.area-item { border: none !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; padding-inline: 0 !important; }
.area-item + .area-item { border-top: 1px solid var(--border) !important; }
.area-handle { pointer-events: auto; touch-action: none; border: none; background: var(--surface); color: inherit; font: inherit; font-size: 12px; padding: 4px 14px; border-radius: 0 0 12px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: grab; }
.area-arrow { display: inline-block; transition: transform .3s; }
.area-sheet.open .area-arrow { transform: rotate(180deg); }
/* نوارِ نازکِ خطا، تمام‌عرض زیرِ «آگهی / کسب‌وکار» — مثل اپ */
.nearby-error { position: fixed; left: 0; right: 0; bottom: 52px; z-index: 39; height: 22px; line-height: 22px; text-align: center; background: var(--bar); color: var(--error); font-size: 12px; font-weight: 500; }
.nearby-distance.approx { background: #f57c00; color: #fff; margin-inline-start: 6px; }
.card-time { box-shadow: none; font-size: 11px; font-weight: 500; color: inherit; }
.card-time + .card-time { margin-inline-start: 6px; }
.card-place { max-width: calc(100% - 120px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.zoom-frame { display: flex; flex-direction: column; }
.zoom-image { position: relative; z-index: 1; }
.zoom-close { margin: 8px 8px 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bar, #fff); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.2); font-size: 16px; cursor: pointer; animation: zoom-close-drop .3s cubic-bezier(.3,1.4,.5,1) .25s both; }
@keyframes zoom-close-drop { from { transform: translateY(-48px); opacity: 0; } to { transform: none; opacity: 1; } }
.zoom-backdrop.closing .zoom-close { animation: zoom-close-lift .16s ease-in both; }
@keyframes zoom-close-lift { from { transform: none; opacity: 1; } to { transform: translateY(-48px); opacity: 0; } }
.owner-line { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; }
.owner-line .owner-avatar { width: 28px; height: 28px; }
/* سربرگِ کسب‌وکار هم‌رنگِ نوارِ بالا و ثابت زیرِ آن — مثل اپ */
.panel.shop-header { background: var(--bar); position: sticky; top: var(--bar-height, 57px); z-index: 9; margin-bottom: 0; }
/* زمینه سربرگ رنگِ نوار است و خطِ پیش‌فرضِ دکمه رویش گم می‌شود */
.shop-header .save-row button { border-color: var(--muted); }
.header-rating { margin-inline-start: auto; align-self: flex-start; }
.header-rating .rating { font-weight: 700; color: var(--text); }

/* دسته آگهی بالای قیمت: هم‌اندازه، ولی کم‌وزن‌تر */
.card-category { font-weight: 400; }

/* نقطه‌های نمایشگرِ عکس (موجودی) */
.lightbox-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.lightbox-dots span { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.lightbox-dots span.on { background: var(--primary); width: 9px; height: 9px; }
.lightbox.zoomed .lightbox-dots { opacity: 0; }
/* عکس‌های موجودی: نشانِ تعداد و ردیفِ عکس‌های فرم */
.stock-image { position: relative; }
.stock-image .photo-count { bottom: 8px; left: auto; right: 8px; }
.stock-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.stock-photos .stock-photo { margin-bottom: 0; width: 88px; height: 88px; position: relative; }
.stock-photo .remove { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 22px; padding: 0; cursor: pointer; }

/* بجِ عدد کنارِ عنوانِ تب */
/* کادرِ کوچکِ مربعی هم‌رنگِ سربرگ، کمی بالاتر از متن — مثل اپ */
.tab-badge { display: inline-block; margin-inline-start: 4px; padding: 1px 4px; border-radius: 4px; background: var(--bar); color: inherit; font-size: 10px; line-height: 12px; text-align: center; vertical-align: 6px; }

/* آیکونِ ساعت و پین در کادرهای کوچکِ بالای کارت */
.card-tab-icon { display: inline-flex; vertical-align: -1px; margin-inline-end: 4px; }

/* دکمه دسته‌ها در صفحه آگهی‌ها */
.feed-cat { padding: 4px 0 8px; }
.feed-cat-button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 4px; border: 1px solid var(--border, #ccc);
  background: transparent; font: inherit; text-align: start; cursor: pointer;
}
.feed-cat-button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.feed-cat-button .grow, .cat-sheet-row .grow { flex: 1; display: flex; flex-direction: column; }
.feed-cat-clear { padding: 0 6px; font-weight: 700; }
/* وضعیتِ آگهیِ خودم، بالای کادرِ شناور و داخلِ همان */
.float-card { position: fixed; inset-inline: 12px; bottom: 12px; max-width: 720px; margin: 0 auto; border-radius: 12px; background: var(--bar); box-shadow: 0 4px 16px rgba(0,0,0,.25); z-index: 20; overflow: hidden; }
.float-card .float-bar { position: static; box-shadow: none; border-radius: 0; max-width: none; }
.float-strip { padding: 4px 16px; min-height: 22px; font-size: 12px; line-height: 18px; text-align: center; color: var(--error, #b3261e); border-bottom: 1px solid var(--border, #ddd); }
.float-strip.muted { color: var(--muted, #6b7280); }

/* تغییراتِ ویرایش و کارنامه کاربر (مدیر) */
.changes { margin: 8px 0; padding: 8px 12px; border-inline-start: 3px solid var(--primary); background: var(--bar); border-radius: 4px; }
.change-row { padding: 6px 0; border-bottom: 1px solid var(--border, #ddd); }
.change-row:last-child { border-bottom: 0; }
.change-label { font-weight: 600; font-size: 13px; }
.change-from { text-decoration: line-through; opacity: .75; white-space: pre-wrap; }
.change-to { white-space: pre-wrap; }
.thumb.added { outline: 2px solid var(--primary); }
.thumb.removed { outline: 2px solid #b3261e; opacity: .7; }
.action-row { padding: 10px 0; border-bottom: 1px solid var(--border, #ddd); }
.action-detail { white-space: pre-wrap; margin-top: 4px; }

/* پیش‌نویس‌ها هم‌شکلِ کارتِ آگهی */
.draft-item { padding: 8px 0; border-bottom: 1px solid var(--border, #ddd); }
.draft-row { align-items: center; gap: 8px; }
.draft-link { display: flex; gap: 12px; align-items: flex-start; flex: 1; color: inherit; text-decoration: none; }
.draft-image { width: 128px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--bar); flex: none; }

/* فهرستِ گفتگوها، مثل اپ */
.chat-row { align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.chat-main { flex: 1; min-width: 0; flex-wrap: nowrap; gap: 12px; margin: 0; }
.chat-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--bar); flex: none; }
.chat-text { min-width: 0; }
.chat-text > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.unread-dot { width: 22px; height: 22px; border-radius: 50%; background: #D32F2F; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.chat-text { display: flex; flex-direction: column; gap: 10px; }
.chat-side { gap: 10px; }
.chat-row { display: flex; }
.chat-text { flex: 1; }
.chat-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.chat-line > :first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-line > :last-child:not(:first-child) { flex: none; }
/* ساعت و تیکِ پیام */
.bubble .stamp { display: inline-flex; gap: 3px; align-items: center; margin-inline-start: 12px; font-size: 11px; opacity: .8; vertical-align: bottom; }
.bubble .tick { color: inherit; font-size: 12px; letter-spacing: -4px; padding-inline-end: 4px; }
.bubble .tick.read { color: #2E7D32; opacity: 1; }
.tick.list-tick { font-size: 12px; letter-spacing: -4px; padding-inline-end: 4px; }
.tick.list-tick.read { color: #2E7D32; }
.nav-unread { width: 18px; height: 18px; font-size: 10px; margin-inline-start: 4px; vertical-align: 2px; }
.nav-unread[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 10px; }
.chat-avatar.small { width: 36px; height: 36px; }
.chat-subject { display: block; font-weight: 400; margin-top: 6px; color: var(--muted, #6b7280); }
.chat-head .seen { font-weight: 400; color: var(--muted, #6b7280); }
.chat-head .seen.online { color: var(--primary); }
.chat-kind { color: var(--primary); margin-inline-start: 12px; }
/* پیامِ عکس: بی حاشیه، ساعت و تیک روی عکس */
.bubble.image { padding: 0; background: none; position: relative; width: 220px; height: 220px; }
.bubble.image img { width: 220px; height: 220px; object-fit: cover; border-radius: 12px; display: block; cursor: zoom-in; }
.bubble.image .stamp { position: absolute; bottom: 6px; inset-inline-end: 6px; margin: 0; padding: 1px 6px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; opacity: 1; }
.last-preview { display: inline-flex; align-items: center; gap: 6px; }
.last-thumb { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; flex: none; }
.chat-avatar { border: 0.5px solid var(--border, #d0d0d0); box-sizing: border-box; }
/* عکسِ دریافتیِ دانلودنشده: کدر با دکمه دانلود */
.blurred-image { position: relative; width: 220px; height: 220px; border-radius: 12px; overflow: hidden; background: var(--bar); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.blurred-image img.blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px); transform: scale(1.15); }
.download-dot { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 24px; cursor: pointer; }
.blurred-image.loading .download-dot::after { content: ''; position: absolute; inset: 12px; border: 3px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
span.last-thumb { display: inline-block; background: var(--bar); }
.chat-kind.list-tag { font-size: 11px; font-weight: 500; }
/* حجمِ فایل روی عکس، و پخش‌کننده پیامِ صوتی */
.size-tag { position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; }
.voice { display: inline-flex; align-items: center; gap: 8px; min-width: 220px; }
.voice-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 16px; cursor: pointer; padding: 0; }
.voice-bar { flex: 1; accent-color: currentColor; }
/* نوارِ صدا: خطِ نازک با دایره توپر؛ دکمه پخش داخلِ دایره */
.voice .voice-btn { width: 36px; height: 36px; flex: none; background: #2E7D32; color: #fff; font-size: 14px; position: relative; }
.voice-track { flex: 1; display: flex; flex-direction: column; }
.voice-track .small { align-self: flex-start; }
.voice-bar { -webkit-appearance: none; appearance: none; height: 20px; background: transparent; width: 100%; direction: rtl; }
.voice-bar::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(to left, currentColor var(--fill, 0%), rgba(127,127,127,.35) var(--fill, 0%)); }
.voice-bar::-moz-range-track { height: 2px; background: rgba(127,127,127,.35); }
.voice-bar::-moz-range-progress { height: 2px; background: currentColor; }
.voice-bar::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: currentColor; margin-top: -5px; }
.voice-bar::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: currentColor; }
.voice.pending .voice-bar::-webkit-slider-thumb { visibility: hidden; }
/* پخش‌کننده چپ‌به‌راست برای هر دو طرف: دکمه چپ، پیشرفت از چپ، زمان زیرِ ابتدای نوار */
.voice { direction: ltr; }
.voice-bar { direction: ltr; }
.voice-bar::-webkit-slider-runnable-track { background: linear-gradient(to right, currentColor var(--fill, 0%), rgba(127,127,127,.35) var(--fill, 0%)); }
.voice-track .small { align-self: flex-start; }
/* خطِ «خوانده نشده» */
.unread-divider { display: flex; align-items: center; gap: 10px; margin: 6px 8px; color: var(--primary); font-size: 12px; }
.unread-divider::before, .unread-divider::after { content: ''; flex: 1; height: 1px; background: var(--border, #ddd); }
/* بجِ روز داخلِ چت */
.day-badge { display: flex; justify-content: center; margin: 4px 0; }
.day-badge span { padding: 3px 12px; border-radius: 12px; background: var(--sunken, #eee); color: var(--muted, #6b7280); font-size: 12px; }
.chat-subject { display: flex; align-items: center; }
.chat-subject .chat-kind { margin-inline-start: auto; padding-inline-start: 12px; }
.dl-icon { display: inline-flex; } .dl-icon svg { width: 22px; height: 22px; }

/* ویرایش و حذفِ پیام — مثل اپ */
.bubble-row { display: flex; align-items: flex-end; gap: 4px; max-width: 80%; }
.bubble-row.mine { align-self: flex-start; }
.bubble-row.theirs { align-self: flex-end; }
.bubble-row .bubble { max-width: 100%; -webkit-touch-callout: none; }
.bubble.deleted { background: var(--sunken); color: var(--muted); font-style: italic; opacity: .75; }
.edited-tag { font-size: 9px; color: var(--muted); white-space: nowrap; padding-bottom: 2px; }
.edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px; }
.edit-bar[hidden] { display: none; }
.edit-bar .edit-title { color: var(--primary); }
.edit-bar .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.cat-sheet-row.danger { color: var(--error); }

/* گفتگوهای کاربر در پنل مدیر */
.admin-chat-row { display: block; width: 100%; text-align: start; }
.admin-chat-thread { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.admin-chat-msg { padding: 8px 12px; border-radius: 12px; background: var(--sunken); max-width: 85%; align-self: flex-end; }
.admin-chat-msg.self { align-self: flex-start; background: var(--primary-container); color: var(--on-primary-container); }
.admin-chat-msg.removed { outline: 1px dashed var(--error); }
.admin-chat-text { white-space: pre-wrap; }
.admin-chat-image { max-width: 220px; border-radius: 8px; cursor: zoom-in; display: block; }
.admin-chat-old { text-decoration: line-through; }

/* رأی به نظر و پاسخِ مالک — مثل اپ */
.review-actions { gap: 6px; align-items: center; }
.review-react { padding: 2px 10px; border-radius: 4px; font-size: 13px; }
.review-react.on { background: var(--primary-container); color: var(--on-primary-container); font-weight: 600; }
.review-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
/* پاسخِ مالک در همان کادر، با خطِ افقی — مثل اپ */
.review-reply { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.review-reply > .small { color: var(--primary); font-weight: 600; }
.review-reply p { margin: 4px 0; }
.review-row.mine { background: var(--error-bg); }
.review-mine { color: var(--primary); font-weight: 600; }
.review-who { display: inline-flex; align-items: center; gap: 8px; }
.review-avatar { width: 32px; height: 32px; border-radius: 7px; }

/* امتیازِ ستاره‌ای — مثل اپ */
.star-line { color: #f5a623; font-size: 13px; letter-spacing: 1px; margin-inline-start: 6px; }
.star-line .star-empty { color: var(--line); }
.star-pick .vote.star { font-size: 22px; color: #f5a623; background: none; border: 0; padding: 0 2px; cursor: pointer; }
.star-counts { max-width: 220px; margin: 6px 0; }
.star-counts .star-line { margin: 0; }

/* زمینه گفتگو مثلِ اپ: رنگِ ملایم با طرحِ برگ و گل و گلدان؛ حباب‌ها رویش برجسته */
:root { --chat-wall: #E7EAE4; --chat-mine: #C0E3A6; --chat-on-mine: #1C2E1B; --chat-theirs: #FFFFFF; --chat-on-theirs: #1F2621; --chat-stamp: #1E88E5; --chat-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='144' fill='none' stroke='rgba(46%2C94%2C42%2C0.07)' stroke-width='1.4'%3E%3Cg transform='translate(20 20) rotate(-40)'%3E%3Cpath d='M0-9Q8 0 0 9Q-8 0 0-9M0-6V9'/%3E%3C/g%3E%3Cg transform='translate(92 20)'%3E%3Ccircle cx='0' cy='-5' r='3.2'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(72)'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(144)'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(216)'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(288)'/%3E%3C/g%3E%3Cg transform='translate(56 92)'%3E%3Cpath d='M-6 2H6L4 11H-4ZM0 2V-8M0-4Q-6-8-7-3Q-3-2 0-4M0-6Q6-10 7-5Q3-4 0-6'/%3E%3C/g%3E%3Cg transform='translate(128 92) rotate(30)'%3E%3Cpath d='M0-9Q8 0 0 9Q-8 0 0-9M0-6V9'/%3E%3C/g%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root { --chat-wall: #131514; --chat-mine: #2D4A31; --chat-on-mine: #E2EFDF; --chat-theirs: #262C28; --chat-on-theirs: #E1E5E1; --chat-stamp: #64B5F6; --chat-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='144' fill='none' stroke='rgba(255%2C255%2C255%2C0.05)' stroke-width='1.4'%3E%3Cg transform='translate(20 20) rotate(-40)'%3E%3Cpath d='M0-9Q8 0 0 9Q-8 0 0-9M0-6V9'/%3E%3C/g%3E%3Cg transform='translate(92 20)'%3E%3Ccircle cx='0' cy='-5' r='3.2'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(72)'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(144)'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(216)'/%3E%3Ccircle cx='0' cy='-5' r='3.2' transform='rotate(288)'/%3E%3C/g%3E%3Cg transform='translate(56 92)'%3E%3Cpath d='M-6 2H6L4 11H-4ZM0 2V-8M0-4Q-6-8-7-3Q-3-2 0-4M0-6Q6-10 7-5Q3-4 0-6'/%3E%3C/g%3E%3Cg transform='translate(128 92) rotate(30)'%3E%3Cpath d='M0-9Q8 0 0 9Q-8 0 0-9M0-6V9'/%3E%3C/g%3E%3C/svg%3E"); }
}
.messages { background: var(--chat-wall) var(--chat-pattern); border-radius: 12px; padding: 8px; }
.bubble { background: var(--chat-theirs); color: var(--chat-on-theirs); }
.bubble.mine { background: var(--chat-mine); color: var(--chat-on-mine); }
.bubble.mine:not(.image) .stamp .tick { color: inherit; }
.bubble.mine:not(.image) .stamp .tick.read { color: var(--chat-stamp); opacity: 1; }
.bubble.deleted { background: var(--chat-theirs); color: var(--chat-on-theirs); }
.bubble.mine.deleted { background: var(--chat-mine); color: var(--chat-on-mine); }
/* عکس داخلِ حباب با حاشیه نازک */
.bubble.image { padding: 3px; width: auto; height: auto; background: var(--chat-theirs); }
.bubble.image.mine { background: var(--chat-mine); }
.bubble.image .stamp { bottom: 9px; inset-inline-end: 9px; }
.bubble:not(.image) { padding-left: 8px; }

/* منوی کوچکِ ویرایش/حذفِ پیام — مثل اپ */
.msg-menu-layer { position: fixed; inset: 0; z-index: 60; }
.msg-menu { position: fixed; min-width: 150px; padding: 6px 0; border-radius: 8px; background: var(--surface, var(--bg)); box-shadow: 0 4px 16px rgba(0,0,0,.2); display: flex; flex-direction: column; }
.msg-menu button { background: none; border: 0; border-radius: 0; text-align: start; padding: 10px 16px; font: inherit; font-weight: 600; color: inherit; cursor: pointer; }
.msg-menu button:hover { background: var(--sunken); }
.msg-menu button.danger { color: var(--error, #c62828); }
.bubble-row.held { background: rgba(33,150,243,.14); border-radius: 8px; }
.msg-menu { max-width: 280px; }
.msg-menu > button { padding: 7px 14px; font-size: 14px; }
.reaction-bar { display: flex; gap: 2px; overflow-x: auto; padding: 0 6px 4px; border-bottom: 1px solid var(--sunken); margin-bottom: 2px; scrollbar-width: none; }
.reaction-bar button { flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 20px; cursor: pointer; }
.reaction-bar button.on { background: rgba(33,150,243,.18); }
.reaction-chips { display: flex; gap: 2px; margin-top: -4px; padding: 0 4px; font-size: 16px; position: relative; }
.reaction-chips.mine { align-self: flex-start; }
.reaction-chips.theirs { align-self: flex-end; }
.reaction-chips span { padding: 0 3px; border-radius: 50%; }
.reaction-chips span.own { background: rgba(33,150,243,.18); cursor: pointer; }

/* نوارِ واکنش‌ها بیرون و بالای کادرِ منو، کشیده‌تر */
.msg-menu { background: none; box-shadow: none; padding: 0; gap: 6px; max-width: 320px; }
.msg-menu .reaction-bar { border: 0; margin: 0; padding: 4px 6px; border-radius: 24px; background: var(--surface, var(--bg)); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.msg-menu .menu-box { display: flex; flex-direction: column; width: 160px; padding: 4px 0; border-radius: 12px; background: var(--surface, var(--bg)); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.msg-menu .menu-box button { padding: 7px 14px; font-size: 14px; }
.bubble .stamp .reaction { font-size: 14px; margin-inline-start: 2px; }
/* واکنش‌ها گوشه پایین-راستِ حباب */
.bubble:has(> .reactions) { position: relative; padding-bottom: 22px; min-width: 110px; }
.bubble > .reactions { position: absolute; bottom: 3px; right: 10px; font-size: 15px; display: flex; gap: 2px; }
.bubble.image > .reactions { bottom: 9px; right: 9px; padding: 0 4px; border-radius: 8px; background: rgba(0,0,0,.45); }
.bubble.image:has(> .reactions) { padding-bottom: 3px; min-width: 0; }
.bubble:not(.image) > .reactions { padding: 0 4px; border-radius: 8px; background: rgba(0,0,0,.07); }
.bubble:has(> .reactions) { min-width: 130px; }
.bubble:not(.image) > .reactions { padding: 0 2px; line-height: 1.15; }
.bubble:has(> .reactions) { min-width: 145px; }
.bubble > .reactions span.pulse { display: inline-block; animation: reaction-pulse .44s ease-in-out 2; }
@keyframes reaction-pulse { 50% { transform: scale(1.5); } }
/* ایموجی بی کادر، همه‌جا */
.bubble > .reactions, .bubble.image > .reactions, .bubble:not(.image) > .reactions { background: none; padding: 0; border-radius: 0; line-height: normal; font-size: 16px; overflow: visible; }
/* منوی پیام: بقیه صفحه تیره، فقط حبابِ همان پیام روشن — مثل اپ */
.msg-menu-layer { background: rgba(0,0,0,.5); animation: scrim-in .18s ease-out; }
@keyframes scrim-in { from { background: rgba(0,0,0,0); } }
.bubble-row.held { background: none; }
.bubble.lifted { position: relative; z-index: 61; }
.bubble.lifted { box-shadow: 0 0 0 1.5px rgba(255,255,255,.8); }
.bubble .stamp .edited-in { font-size: 10px; margin-inline-start: 4px; }
.dialog-backdrop { display: flex; align-items: center; justify-content: center; z-index: 70; }
.chat-dialog { width: min(320px, calc(100% - 32px)); padding: 20px; border-radius: 16px; background: var(--surface, var(--bg)); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
/* موجِ پیامِ صوتی — مثل اپ */
.voice-wave { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 1px; height: 24px; direction: ltr; min-width: 0; }
.voice-wave span { flex: 0 0 3px; border-radius: 2px; background: currentColor; opacity: .35; min-height: 2px; transition: opacity .15s; }
.voice-wave span.on { opacity: 1; }
.bubble.mine .voice-wave span.on { background: #2E7D32; }
.voice-wave.seekable { cursor: pointer; }
/* عکسِ گفتگو بزرگ — مثل اپ */
.chat-viewer { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; align-items: center; justify-content: center; }
.chat-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.chat-viewer-bar { position: absolute; top: 0; inset-inline: 0; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 8px; background: rgba(0,0,0,.55); color: #fff; transition: opacity .18s; }
.chat-viewer.bare .chat-viewer-bar { opacity: 0; pointer-events: none; }
.chat-viewer-back { background: none; border: 0; color: #fff; font-size: 22px; width: 44px; height: 44px; cursor: pointer; }
.chat-viewer-name { font-weight: 600; }
.chat-viewer-bar .small { opacity: .75; }
/* سایه اسکلتی — مثل اپ */
.skeleton { background: linear-gradient(100deg, var(--sunken) 30%, rgba(255,255,255,.45) 50%, var(--sunken) 70%) var(--sunken); background-size: 300% 100%; animation: skeleton-shine 1.1s linear infinite; border-radius: 6px; }
.skeleton.bar { height: 11px; margin: 6px 0; }
.skeleton.w60 { width: 60%; } .skeleton.w85 { width: 85%; } .skeleton.w110 { width: 110px; } .skeleton.w70 { width: 70px; }
@keyframes skeleton-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.chat-row.lifted { position: relative; z-index: 61; }
.reports-link { position: relative; font-size: 20px; text-decoration: none; padding: 4px 8px; }
.reports-link.dot::after { content: ''; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: #c62828; }
.resolved { color: #2E7D32; }
.report-row .chat-text > * { white-space: normal; }
/* گزارشِ گفتگو: قلمِ گزینه‌ها و حرکتِ مرحله‌ها — مثل اپ */
.report-reason { font-size: 16px; font-weight: 500; transition: background .15s; }
.report-body > * { animation: step-in .22s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateX(-12px); } }

/* بلاکِ گفتگو */
.chat-head .chat-block { margin-inline-start: auto; font-size: 14px; padding: 6px 10px; }
.chat-blocked { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; color: var(--muted, #6b7280); font-size: 14px; text-align: center; }
.feature-ok { color: var(--primary); }
.feature-no { color: var(--error, #b3261e); }
.sub-chips { margin-top: 8px; }
.sub-chips .chip-count { display: inline; }
.cat-admin-row { gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.cat-admin-subs { margin-inline-start: 20px; border-inline-start: 2px solid var(--border, #e5e7eb); padding-inline-start: 12px; }

/* انتخابِ چند شهر */
.feed-place-button { white-space: nowrap; }
.place-scroll { max-height: 60vh; overflow-y: auto; margin: 8px 0; }
.place-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.place-row.indent { padding-inline-start: 20px; }
.place-row input { width: 18px; height: 18px; margin: 0; }
.place-group { font-weight: 600; padding-top: 8px; }
.place-divider { border: 0; border-top: 1px solid var(--border, #e5e7eb); margin: 6px 0; }
.place-province { display: flex; justify-content: space-between; width: 100%; background: none; border: 0; padding: 10px 0; font: inherit; color: inherit; cursor: pointer; }
.confirm-orange { width: 100%; background: #F57C00; color: #fff; border: 0; border-radius: 4px; padding: 12px; font: inherit; font-weight: 600; cursor: pointer; }
.place-all-title { font-weight: 600; color: var(--primary); padding: 8px 0 4px; }
.nearby-close { background: #F57C00 !important; color: #fff !important; }
.terms p { line-height: 1.9; }
.place-admin-row { gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.jalali-picker { margin-top: 10px; padding: 10px; border: 1px dashed var(--border, #e5e7eb); border-radius: 4px; display: grid; gap: 8px; }
.jalali-picker select { width: auto; }
.announce-group { border: 1px solid var(--border, #e5e7eb); border-radius: 4px; padding: 6px 10px; margin: 6px 0; }
.announce-group summary { cursor: pointer; font-weight: 600; }
.announce-checks { max-height: 260px; overflow-y: auto; white-space: pre; }
.announce-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 2px; }
.announce-image img, .announce-thumb { max-width: 220px; max-height: 160px; border-radius: 8px; display: block; margin: 6px 0; }
.announce-image-full { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 8px; }
.announce-body { white-space: pre-line; line-height: 1.8; }
.announce-preview { display: grid; gap: 6px; max-width: 380px; }
.preview-notif { background: var(--surface, #f3f4f6); border-radius: 16px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.preview-notif-head { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .7; margin-bottom: 4px; }
.preview-notif-head img { width: 16px; height: 16px; border-radius: 4px; }
.preview-notif-row { display: flex; justify-content: space-between; gap: 10px; }
.preview-notif-text { font-size: 14px; white-space: pre-line; }
.preview-notif-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.preview-notif-big { width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; margin-top: 8px; }
.preview-sheet { border: 1px solid var(--border, #e5e7eb); border-radius: 16px 16px 0 0; padding: 12px 16px; }
.announce-image img, .announce-thumb { aspect-ratio: 2 / 1; object-fit: cover; }
.preview-notif-big { aspect-ratio: 2 / 1; max-height: none; }

/* محل نمایشِ اعلان: یک ستون، زیر هم */
.announce-where { display: grid; gap: 6px; }

/* منوی سه‌نقطه گفتگوها: دکمه است، نه لینک */
button.reports-link { background: none; border: 0; cursor: pointer; color: inherit; line-height: 1; }

/* کادرِ کوچکِ نوعِ گفتگو، چسبیده به بالای ردیف */
.chat-kind-tab { margin: 10px 4px -1px; }
.chat-kind-tab .nearby-distance { margin-inline-start: 0; }

/* بومِ امضا و نمایشِ آن در پنل مدیر */
.signature-pad { width: 100%; max-width: 600px; height: 240px; background: #fff; border: 1px solid var(--line, #ddd); border-radius: 12px; touch-action: none; display: block; }
.signature-view { max-width: 320px; width: 100%; background: #fff; border: 1px solid var(--line, #ddd); border-radius: 8px; margin: 8px 0; cursor: zoom-in; }

/* عنوان قوانین و تاریخ آخرین به‌روزرسانی کنارش */
.rules-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rules-head h1 { margin: 0; }
