/* ---------- Шрифты (свои файлы: CSP не пускает внешние) ---------- */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/lora-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/lora-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-bg: #fbf6ee;
  --color-surface: #ffffff;
  --color-text: #2d2420;
  --color-text-muted: #75675b;
  --color-border: #eadfd0;
  --color-primary: #c1552c;
  --color-primary-dark: #9a3f1c;
  --color-primary-soft: #f8e6da;
  --color-accent: #4a7a58;
  --color-accent-soft: #e3eedf;
  --color-danger: #b3261e;
  --color-danger-soft: #f9e1df;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(70, 40, 20, 0.05), 0 6px 20px rgba(70, 40, 20, 0.07);
  --shadow-hover: 0 2px 4px rgba(70, 40, 20, 0.06), 0 14px 32px rgba(70, 40, 20, 0.13);
  --max-width: 1320px;

  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Lora", Georgia, "Times New Roman", serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Шкала текста: два стиля (Lora для заголовков, Nunito для остального), размеры из этого списка */
  --font-size-xs: 12px;   /* время, значки */
  --font-size-sm: 14px;   /* подписи, подсказки */
  --font-size-base: 16px; /* основной текст */
  --font-size-md: 16px;
  --font-size-lg: 18px;   /* малые заголовки */
  --font-size-xl: 20px;   /* заголовки блоков */
  --font-size-2xl: 28px;  /* заголовки страниц */
  --font-size-3xl: 28px;

  --control-height: 50px;
  --page-top: 22px;
  --page-top-detail: 18px;
}

* { box-sizing: border-box; }

/* Видимый фокус по умолчанию для всех интерактивных элементов — конкретные
   компоненты ниже могут переопределять смещение/радиус под свою форму. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- Утилиты (вместо инлайновых style="", которые блокирует CSP) ---------- */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.card-padded { padding: var(--space-5); }
.card-padded-sm { padding: var(--space-4); }

.btn-block { width: 100%; }
.inline-form { display: inline; margin: 0; }
.report-form { margin-top: var(--space-3); max-width: 360px; }
.admin-search-form { margin-bottom: var(--space-4); max-width: 320px; }
.admin-add-card { padding: var(--space-5); max-width: 420px; }
.profile-card { padding: var(--space-5); max-width: 520px; }
.password-card { padding: var(--space-5); max-width: 440px; }
.dashboard-header-card { padding: var(--space-4) var(--space-5); margin-bottom: var(--space-5); }
.notification-row { padding: 14px 18px; }
.notification-row.is-unread { background: var(--color-primary-soft); }
.listing-title-link { font-size: var(--font-size-base); }
.profile-header-name { margin: 0 0 4px; font-size: var(--font-size-2xl); }
.btn-block-link { display: block; width: 100%; text-align: center; }
.w-auto { width: auto; }
.listing-description { white-space: pre-wrap; margin: 0; font-size: var(--font-size-md); line-height: 1.6; overflow-wrap: anywhere; }
.comment-body { margin: var(--space-1) 0 0; }

.flex-row { display: flex; align-items: center; gap: var(--space-2); }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.text-center { text-align: center; }

.avatar-md { width: 64px; height: 64px; font-size: 24px; }
.avatar-lg { width: 96px; height: 96px; font-size: 34px; }

[data-gallery-thumb] { cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Основа ---------- */

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body { min-height: calc(100vh / var(--page-zoom, 1)); display: flex; flex-direction: column; }
body > main { flex: 1; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
h2 { font-size: var(--font-size-xl); margin: 0 0 var(--space-4); }
h3 { font-size: var(--font-size-lg); }

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-5) 0; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.container.container-narrow { max-width: 520px; }
.container.container-medium { max-width: 720px; }
.container.container-form { max-width: 860px; }
.container.container-wide { max-width: 820px; }

/* ---------- Шапка ---------- */

.site-header {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo__mark {
  width: 43px;
  height: 43px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Выбор города рядом с логотипом: показывает текущий город или «Все города». */
.city-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  max-width: 220px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.city-btn:hover { background: var(--color-primary-soft); color: var(--color-text); }
.city-btn svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--color-text-muted); }
.city-btn__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-left: auto;
  align-items: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
}
.main-nav a, .nav-link { color: var(--color-text); }
.main-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
.main-nav .main-nav__link--mobile { display: none; }
.main-nav__link:hover { background: var(--color-primary-soft); text-decoration: none; }
.main-nav__link.active { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.nav-link { border: 0; padding: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.nav-link:hover { text-decoration: underline; }
.nav-link:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 4px; border-radius: 4px; }

.nav-toggle {
  display: none;
  border: 0;
  background: none;
  padding: 10px;
  margin-left: auto;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius);
}

.main-nav .nav-cta {
  background: none;
  color: var(--color-text) !important;
  min-height: 42px;
  padding: 0 11px;
  margin: 0;
  font-size: inherit;
  font-weight: 600;
}
.main-nav .nav-cta:hover { background: var(--color-primary-soft); }

.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--color-text);
}
.icon-link { margin-right: 2px; }
.icon-link svg { width: 23px; height: 23px; }
.icon-link:hover { background: var(--color-primary-soft); text-decoration: none; }
.icon-link .badge-count { position: absolute; top: 2px; right: 0; margin: 0; }
.icon-link__label { display: none; }

.badge-count {
  background: var(--color-danger);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  margin-left: 4px;
}

/* Меню пользователя (details — работает без JS) */
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  color: var(--color-text);
}
.user-menu__button:hover, .user-menu[open] > .user-menu__button { background: var(--color-primary-soft); }
.user-menu__name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 240px;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  z-index: 30;
}
.user-menu__panel a, .user-menu__panel .nav-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 600;
}
.user-menu__panel a:hover, .user-menu__panel .nav-link:hover { background: var(--color-primary-soft); text-decoration: none; }
.user-menu__panel hr { margin: 6px 0; }
.user-menu__panel form { margin: 0; }

/* Окна (город, поддержка) */
.support-dialog {
  width: min(400px, calc(100% - 32px));
  padding: 24px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 20px 70px rgba(45, 30, 20, 0.28);
}
.support-dialog::backdrop { background: rgba(45, 30, 20, 0.5); }
.support-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.support-dialog__header h2 { margin: 0; font-size: var(--font-size-xl); }
.support-dialog__close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--color-bg); color: var(--color-text); cursor: pointer; }
.support-dialog__close:hover { background: var(--color-primary-soft); }
.support-dialog__max { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius); color: var(--color-text); font-size: 20px; font-weight: 700; }
.support-dialog__max:hover { background: var(--color-bg); text-decoration: none; }
.support-dialog__max img { width: 72px; height: 72px; object-fit: contain; }
#city-dialog { width: min(640px, calc(100% - 32px)); }
.city-dialog__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; max-height: calc(50vh / var(--page-zoom, 1)); overflow-x: hidden; overflow-y: auto; padding: 2px 6px 2px 2px; }
.city-dialog__hint { margin: var(--space-4) 0 0; font-size: var(--font-size-sm); color: var(--color-text-muted); }
.support-link { border: 0; padding: 0; background: none; font: inherit; font-weight: 800; color: var(--color-primary-dark); text-decoration: underline; cursor: pointer; }
.support-link:hover { color: var(--color-primary); }
@media (max-width: 520px) { .city-dialog__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.city-dialog__list a { padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--color-border); color: var(--color-text); text-align: center; font-weight: 600; }
.city-dialog__list a:hover { background: var(--color-primary-soft); border-color: var(--color-primary); text-decoration: none; }
.city-dialog__list a.is-current { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary-dark); font-weight: 800; }
.city-dialog__all { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .city-btn { display: none; }
  .main-nav .main-nav__link--mobile { display: inline-flex; }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-2);
    padding: var(--space-3) 0 var(--space-2);
  }
  .main-nav { font-size: var(--font-size-base); }
  .main-nav.is-open { display: flex; max-height: calc(100vh / var(--page-zoom, 1) - 84px); overflow-y: auto; }
  .main-nav__link, .icon-link { width: 100%; justify-content: flex-start; border-radius: var(--radius); padding: 0 12px; min-height: 48px; }
  .icon-link { gap: 12px; margin-right: 0; }
  .icon-link__label { display: inline; }
  .icon-link .badge-count { position: static; }
  .nav-cta { justify-content: center; margin: 4px 0; min-height: 52px; font-size: var(--font-size-md); }
  .user-menu__button { width: 100%; border-radius: var(--radius); padding: 6px 12px 6px 8px; min-height: 52px; }
  .user-menu__name { max-width: none; }
  .user-menu__panel { position: static; width: 100%; box-shadow: none; border: 0; padding: 0 0 0 8px; }
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font: inherit;
  font-size: var(--font-size-md);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-primary-soft); border-color: var(--color-primary-soft); }
.btn-outline { background: transparent; color: var(--color-primary-dark); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-soft); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #8f1d17; }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: var(--font-size-sm); }
.btn-lg { min-height: 58px; padding: 12px 32px; font-size: var(--font-size-lg); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
[hidden] { display: none !important; }
.form-delete { margin-top: var(--space-5); text-align: center; }
.btn-link.btn-link--danger { color: var(--color-danger); font-size: var(--font-size-sm); }
.btn-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--color-primary-dark); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* ---------- Карточки, формы ---------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-group { margin-bottom: 20px; }
.form-group label, .form-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: var(--font-size-base); }
.form-control {
  width: 100%;
  min-height: var(--control-height);
  padding: 11px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--font-size-md);
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
}
.form-control:hover { border-color: #d9c9b4; }
.form-control:focus { outline: none; border-color: var(--color-primary); }
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2375675b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 140px; line-height: 1.5; }
input[type="file"].form-control { padding: 9px 12px; }
.form-hint { color: var(--color-text-muted); font-size: var(--font-size-sm); margin-top: 6px; line-height: 1.5; }
.form-group label .form-hint, .form-label .form-hint { font-weight: 400; margin: 0; }
.form-row { display: flex; gap: 20px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin: 0 0 var(--space-4); font-size: var(--font-size-base); }
.alert-success { background: var(--color-accent-soft); color: #2e4a36; }
.alert-error { background: var(--color-danger-soft); color: var(--color-danger); }
.alert-draft { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.alert-muted { background: var(--color-border); color: var(--color-text); }
main > .container:first-child:empty { display: none; }
main > .container:first-child { padding-top: 1px; }
main > .container:first-child > .alert:first-child { margin-top: var(--space-4); }

.errors-list { color: var(--color-danger); background: var(--color-danger-soft); border-radius: var(--radius); font-size: var(--font-size-base); margin: 0 0 20px; padding: 14px 18px 14px 36px; }
.field-error { color: var(--color-danger); font-size: var(--font-size-sm); font-weight: 600; margin: 6px 0 0; }

.form-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }
.form-actions .btn { flex: 1; min-width: 180px; }

/* Карточки-шаги формы */
.form-section { padding: var(--space-5); margin-bottom: var(--space-5); }
.form-section__title { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--space-4); font-size: var(--font-size-xl); }
.form-section__num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 800;
}
.form-section .form-group:last-child { margin-bottom: 0; }

/* Крупный выбор из двух вариантов */
.choice-group { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 520px) { .choice-group { grid-template-columns: 1fr; } }
.choice { display: block; margin: 0 !important; font-weight: inherit !important; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, background-color 0.15s;
}
.choice__box strong { font-size: var(--font-size-md); }
.choice__box small { color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 400; line-height: 1.4; }
.choice:hover .choice__box { border-color: #d9c9b4; }
.choice input:checked + .choice__box { border-color: var(--color-primary); background: var(--color-primary-soft); }
.choice input:focus-visible + .choice__box { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* Фото в форме */
.photo-manager { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.photo-manager:empty { display: none; }
.photo-manager__item { position: relative; width: 100%; aspect-ratio: 1; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.photo-manager__item img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--color-border); pointer-events: none; }
.photo-manager__item.is-dragging { z-index: 5; cursor: grabbing; opacity: 0.92; transition: none; filter: drop-shadow(0 10px 18px rgba(45, 36, 32, 0.3)); }
.photo-manager__cover-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(45, 36, 32, 0.62); color: #fff;
  font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill);
}
.photo-manager__remove-form { margin: 0; }
.photo-hint { margin: calc(var(--space-2) * -1) 0 var(--space-4); font-size: var(--font-size-sm); color: var(--color-text-muted); }
.photo-upload-form { display: block; }
.photo-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 44px 16px;
  border: 2px dashed #d9bfa8;
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-primary-dark);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.photo-drop:hover, .photo-upload-form:focus-within .photo-drop { background: var(--color-primary-soft); border-color: var(--color-primary); }
.photo-drop strong { font-size: var(--font-size-lg); }
.photo-drop span { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.photo-drop svg { margin-bottom: 4px; }

/* ---------- Главная ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-accent-soft));
  padding: 56px 0 68px;
  text-align: center;
}
.hero__content {
  position: relative;
  z-index: 1;
  width: 56%;
  max-width: 920px;
}
.hero__art {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(220px, 28vw, 480px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 74%, rgba(0, 0, 0, 0.5) 90%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 74%, rgba(0, 0, 0, 0.5) 90%, transparent);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero__art--left { left: -12px; }
.hero__art--right { right: -12px; }
.hero__art--left img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 56%, rgba(0, 0, 0, 0.82) 67%, rgba(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0.18) 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 56%, rgba(0, 0, 0, 0.82) 67%, rgba(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0.18) 92%, transparent);
}
.hero__art--right img {
  -webkit-mask-image: linear-gradient(to left, transparent, #000 7%, #000 56%, rgba(0, 0, 0, 0.82) 67%, rgba(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0.18) 92%, transparent);
  mask-image: linear-gradient(to left, transparent, #000 7%, #000 56%, rgba(0, 0, 0, 0.82) 67%, rgba(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0.18) 92%, transparent);
}
@media (max-width: 1000px) {
  .hero { padding: 40px 0 250px; }
  .hero__content { width: 100%; }
  .hero__art { top: auto; height: 230px; width: 230px; max-width: 54%; }
  .hero h1 { margin-bottom: var(--space-4); }
  .hero p { margin-bottom: var(--space-5); }
}
.hero h1 {
  font-size: clamp(28px, 2.6vw, 44px);
  line-height: 1.18;
  margin: 0 0 28px;
  color: var(--color-text);
}
.hero__lead { color: var(--color-text); }
.hero__accent { display: block; color: var(--color-primary); }
.hero p { font-size: var(--font-size-md); color: var(--color-text); max-width: 520px; margin: 0 auto 52px; text-wrap: balance; }

.hero-search {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 540px;
  margin: 0 auto;
  padding: 6px 6px 6px 20px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-hover);
}
.hero-search:focus-within { border-color: var(--color-primary); }
.hero-search svg { flex-shrink: 0; color: var(--color-text-muted); }
.hero-search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--font-size-md);
  padding: 10px 6px;
  color: var(--color-text);
}
.hero-search input[type="search"]:focus { outline: none; }
.hero-search input[type="search"]::placeholder { color: var(--color-text-muted); }
.hero-search .btn { flex-shrink: 0; }

.section { padding: 48px 0; }
/* Первая секция любой внутренней страницы: всегда одинаково далеко от шапки */
main > .container:first-child + .section { padding-top: var(--page-top); }
/* Страница внутри карточки (само объявление, сверху ссылка «назад») ближе к шапке */
main > .container:first-child + .section.section--detail { padding-top: var(--page-top-detail); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.section__head h2 { margin: 0; font-size: var(--font-size-2xl); }
.section__more { font-weight: 700; }

.category-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-3); }
@media (max-width: 860px) { .category-tiles { grid-template-columns: repeat(3, 1fr); } }
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--font-size-base);
  text-align: center;
  line-height: 1.25;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--color-primary); text-decoration: none; }
.category-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  font-size: 28px;
  line-height: 1;
}

.steps-band { padding-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: var(--space-4); } }
.step { display: flex; gap: var(--space-4); align-items: flex-start; }
.step__num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}
.step h3 { margin: 4px 0 4px; font-size: var(--font-size-lg); }
.step p { margin: 0; color: var(--color-text-muted); }

/* ---------- Каталог: поиск и фильтры ---------- */

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin: 0 0 var(--space-4); }
.page-head .page-title { margin: 0; }
.page-head .results-count { margin: 0; }

.filters-bar { padding: var(--space-4); margin-bottom: var(--space-4); }
.filters-bar form { display: flex; flex-direction: column; gap: var(--space-3); }
.search-row { display: flex; gap: var(--space-2); }
.search-row .form-control { flex: 1; min-width: 0; border-radius: var(--radius-pill); padding-left: 22px; }
.search-row .btn { flex-shrink: 0; }
.filters-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.filter-field { min-width: 0; }
.filter-field > label { display: block; margin: 0 0 6px 4px; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filters-row .form-control { width: 100%; min-width: 0; border-radius: var(--radius-pill); padding-left: 20px; }

.segmented { display: inline-flex; padding: 4px; background: var(--color-bg); border: 2px solid var(--color-border); border-radius: var(--radius-pill); }
.segmented__item { margin: 0 !important; cursor: pointer; font-weight: inherit !important; }
.segmented__item input { position: absolute; opacity: 0; pointer-events: none; }
.segmented__item span {
  display: block;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.segmented__item input:checked + span { background: var(--color-primary); color: #fff; }
.segmented__item input:focus-visible + span { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.segmented__item:hover input:not(:checked) + span { color: var(--color-text); }

.more-filters summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  color: var(--color-primary-dark);
  cursor: pointer;
}
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary:hover { background: var(--color-primary-soft); }
.more-filters summary::after { content: "▾"; font-size: 12px; transition: transform 0.15s; }
.more-filters[open] summary::after { transform: rotate(180deg); }
/* Свой выпадающий список (см. js/custom-select.js) */
.cselect { position: relative; }
.cselect .cselect__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  max-width: none;
  text-align: left;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2375675b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.filters-row .cselect .cselect__btn { border-radius: var(--radius-pill); padding-left: 20px; }
.cselect.is-open .cselect__btn { border-color: var(--color-primary); }
.cselect__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(360px, 92vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}
.cselect .cselect__search { width: calc(100% - 16px); margin: 8px 8px 0; min-height: 42px; padding: 8px 14px; border-radius: var(--radius-pill); }
.cselect__list { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; position: relative; }
.cselect__opt { padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: var(--font-size-base); line-height: 1.35; }
.cselect__opt:hover, .cselect__opt:focus { background: var(--color-primary-soft); outline: none; }
.cselect__opt.is-selected { font-weight: 800; color: var(--color-primary-dark); }
.cselect__opt.is-nested { padding-left: 24px; }
.cselect__group { padding: 10px 12px 4px; font-size: var(--font-size-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.cselect__empty { padding: 12px; color: var(--color-text-muted); }
.city-search { margin-bottom: var(--space-3); border-radius: var(--radius-pill); padding-left: 20px; }

.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 700;
}
.filter-chip:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.filter-chip--reset { background: none; border: 2px solid var(--color-border); color: var(--color-text-muted); font-weight: 600; padding: 4px 14px; }
.filter-chip--reset:hover { background: var(--color-surface); color: var(--color-text); border-color: var(--color-text-muted); }

.results-count { color: var(--color-text-muted); font-size: var(--font-size-base); margin-bottom: var(--space-4); }

.load-more-wrap { display: flex; justify-content: center; margin: var(--space-6) 0; }

/* ---------- Карточки объявлений ---------- */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

/* Главная: число колонок задано жёстко, а лишние карточки скрываются, чтобы последний ряд не оставался неполным. */
.listing-grid--home { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1279px) {
  .listing-grid--home { grid-template-columns: repeat(4, 1fr); }
  }
@media (max-width: 860px) {
  .listing-grid--home { grid-template-columns: repeat(3, 1fr); }
  }

.listing-card { position: relative; overflow: hidden; transition: transform 0.18s, box-shadow 0.18s; }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.listing-card__link { display: flex; flex-direction: column; color: inherit; height: 100%; }
.listing-card__link:hover { text-decoration: none; }
.listing-card__favorite-form { margin: 0; }
.listing-card__favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-muted);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 30, 20, 0.2);
  transition: transform 0.15s;
}
.listing-card__favorite:hover { background: #fff; color: var(--color-danger); text-decoration: none; transform: scale(1.08); }
.listing-card__favorite.is-active { color: var(--color-danger); }
.listing-card__image {
  position: relative;
  aspect-ratio: 6 / 5;
  background: var(--color-primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  overflow: hidden;
}
.listing-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.listing-card:hover .listing-card__image img { transform: scale(1.04); }
.listing-card--gone .listing-card__image img { filter: grayscale(1); opacity: 0.3; }
.listing-card--gone .listing-card__image { background: #f6f4f1; }
.listing-card--gone .listing-card__body { opacity: 0.55; }
.listing-card__noimage { font-size: 40px; line-height: 1; }
.listing-card__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  font-size: var(--font-size-xs);
  font-weight: 800;
  color: var(--color-primary-dark);
  box-shadow: 0 2px 6px rgba(45, 30, 20, 0.15);
}
.listing-card__tag--status { background: rgba(45, 36, 32, 0.82); color: #fff; }
.listing-card__body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.listing-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-card__meta { font-size: var(--font-size-sm); color: var(--color-text-muted); }
.listing-card__meta { font-size: 13px; }
.listing-card__meta--place { font-weight: 600; color: var(--color-text-muted); display: flex; align-items: flex-start; gap: 4px; margin-top: 2px; line-height: 1.3; }
.listing-card__meta--place svg { margin-top: 2px; }
.listing-card__meta--place svg { color: var(--color-primary); flex-shrink: 0; }

.type-badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  width: fit-content;
}
.type-badge.give { background: var(--color-accent-soft); color: #2e4a36; }
.type-badge.want { background: var(--color-primary-soft); color: var(--color-primary-dark); }

.status-badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: #ece6dd;
  color: #5a4f45;
}

/* ---------- Страница объявления ---------- */

.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; line-height: 1.3; font-weight: 700; color: var(--color-text-muted); }
.listing-comments .form-hint { font-size: var(--font-size-base); }
.back-link:hover { color: var(--color-primary-dark); text-decoration: none; }

.listing-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas:
    "gallery side"
    "comments comments";
  grid-template-rows: auto auto;
  column-gap: 32px;
  row-gap: 24px;
  margin-top: 8px;
  align-items: start;
}
.listing-detail__gallery { grid-area: gallery; }
.listing-detail__comments { grid-area: comments; }
.listing-detail__side { grid-area: side; display: flex; flex-direction: column; gap: var(--space-4); }
@media (max-width: 900px) {
  .listing-detail { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
  .listing-detail__gallery { order: 1; }
  .listing-detail__side { order: 2; }
  .listing-detail__comments { order: 3; }
}

.listing-gallery__main { border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface); aspect-ratio: 4/3; position: relative; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.listing-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.listing-gallery__thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.listing-gallery__thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; border: 2px solid transparent; opacity: 0.85; transition: opacity 0.15s, border-color 0.15s; }
.listing-gallery__thumbs img:hover { opacity: 1; border-color: rgba(45, 36, 32, 0.35); }

.listing-summary { padding: var(--space-5); }
.listing-summary__tags { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.listing-title { margin: 0 0 var(--space-3); font-size: 24px; line-height: 1.25; }
.facts { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: grid; gap: 10px; font-size: var(--font-size-base); }
.facts li { display: flex; gap: 10px; align-items: baseline; }
.facts__label { flex: 0 0 104px; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.facts__value { font-weight: 600; min-width: 0; }
.listing-cta { display: flex; gap: var(--space-2); align-items: stretch; margin-top: var(--space-4); }
.listing-cta form { margin: 0; }
.listing-cta__main { flex: 1; min-width: 0; }
.listing-cta__fav { flex-shrink: 0; display: flex; }
.btn-compact { min-height: 44px; padding: 8px 20px; font-size: var(--font-size-base); }
.fav-btn { flex-shrink: 0; width: 44px; padding: 0; color: var(--color-text-muted); position: relative; }
.share-btn.is-copied::after {
  content: "Ссылка скопирована";
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: 700;
  white-space: nowrap;
}
.listing-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--color-bg); border: 1px solid var(--color-border); font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text); }
.chip svg { color: var(--color-primary); flex-shrink: 0; }
.fav-btn:hover { color: var(--color-danger); border-color: var(--color-danger-soft); background: var(--color-danger-soft); }
.fav-btn.is-active { color: var(--color-danger); border-color: var(--color-danger); }
.listing-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.listing-views { margin: 0; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.listing-meta .report-details { position: relative; }
.listing-meta .report-details summary { min-height: 32px; padding: 4px 8px; margin: 0; }
.listing-meta .report-form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: min(340px, calc(100vw - 48px));
  max-width: none;
  margin: 0;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
}
.report-details summary { list-style: none; cursor: pointer; width: fit-content; margin: 0; border: 0; min-height: 36px; font-size: var(--font-size-sm); color: var(--color-text-muted); background: none; }
.report-details summary:hover { color: var(--color-danger); background: none; }
.report-details summary::-webkit-details-marker { display: none; }
.report-details[open] summary { color: var(--color-danger); }
.report-details .report-form { max-width: none; }

.listing-comments { padding: var(--space-5); }
.listing-comments h2 { font-size: var(--font-size-xl); }
.handover-note { margin-top: var(--space-4); padding: 14px 16px; border-radius: var(--radius); background: var(--color-accent-soft); color: #2e4a36; }
.handover-note strong { display: block; font-size: var(--font-size-sm); margin-bottom: 2px; }

.owner-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.owner-card a { color: var(--color-text); font-weight: 800; }
.dashboard-name { font-size: var(--font-size-lg); }
.owner-card a.edit-link { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--color-text-muted); }
.owner-card a.edit-link:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); text-decoration: none; }
.listing-owner { display: flex; align-items: center; gap: 12px; margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.listing-owner .avatar { width: 40px; height: 40px; font-size: 15px; }
.listing-owner .owner-card__stats { margin-top: 2px; }
.listing-owner a { color: var(--color-text); font-weight: 800; }
.owner-card__stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: var(--font-size-sm); color: var(--color-text-muted); }
.owner-card__stats strong { color: var(--color-text); font-size: var(--font-size-base); }
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--color-accent-soft); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: 15px; }

.manage-card { padding: var(--space-4) var(--space-5); }

.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.comment:last-of-type { border-bottom: none; }

/* ---------- Сообщения ---------- */

.conversation-list { display: flex; flex-direction: column; overflow: hidden; }
.conversation-item { display: flex; align-items: center; border-bottom: 1px solid var(--color-border); }
.conversation-item:last-child { border-bottom: 0; }
.conversation-item:hover { background: var(--color-primary-soft); }
.conversation-row {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  color: var(--color-text);
}
.conversation-row:hover { text-decoration: none; }
.conversation-delete { margin: 0 14px 0 0; flex-shrink: 0; }
.conversation-delete__btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--color-text-muted); cursor: pointer; }
.conversation-delete__btn:hover { background: var(--color-danger-soft); color: var(--color-danger); }
.conversation-delete__btn:disabled { opacity: 0.35; cursor: not-allowed; background: none; color: var(--color-text-muted); }
.conversation-row__text { flex: 1; min-width: 0; }
.conversation-row__text p { margin: 2px 0 0; font-size: var(--font-size-sm); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--color-border); }
.chat-head__back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--color-text-muted); }
.chat-head__back:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); text-decoration: none; }
.avatar-xl { width: 120px; height: 120px; font-size: 44px; }
.profile-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.profile-avatar-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-5); text-align: center; }
.profile-avatar-card .form-hint { margin: 0; }
.profile-data-card { padding: var(--space-5); }
.profile-data-card .form-group:last-of-type { margin-bottom: var(--space-4); }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }
.chat-head .avatar { width: 44px; height: 44px; font-size: 17px; }
.chat-head__name { display: block; font-size: var(--font-size-lg); line-height: 1.2; }
.chat-head__listing { display: block; font-size: var(--font-size-sm); color: var(--color-primary-dark); font-weight: 600; }
.chat-card { display: flex; flex-direction: column; height: calc(100vh / var(--page-zoom, 1) - 168px); min-height: 460px; overflow: hidden; }
.chat-window { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; min-height: 0; overflow-y: auto; }
.chat-bubble { max-width: 75%; padding: 12px 16px; border-radius: 20px; font-size: var(--font-size-base); overflow-wrap: anywhere; }
.chat-bubble.mine { align-self: flex-end; background: var(--color-primary); color: #fff; border-bottom-right-radius: 6px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--color-primary-soft); color: var(--color-text); border-bottom-left-radius: 6px; }
.chat-bubble time { display: block; font-size: var(--font-size-xs); opacity: 0.75; margin-top: 4px; }
.chat-input-row { padding: 18px 20px 20px; border-top: 1px solid var(--color-border); }
.chat-composer { display: flex; flex-direction: column; gap: 10px; }
.chat-compose-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-compose-row[hidden], .chat-recorder[hidden], .chat-pending[hidden], .chat-error[hidden], .chat-send[hidden], .chat-icon-btn[hidden] { display: none; }
.chat-input-row textarea { flex: 1; min-height: 52px; max-height: 150px; resize: none; padding: 14px 20px; border-radius: 26px; line-height: 1.4; font-size: 16px; overflow-y: auto; }
.chat-icon-btn { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 48px; height: 52px; padding: 0; border: 0; background: none; color: var(--color-text-muted); cursor: pointer; border-radius: 50%; }
.chat-icon-btn:hover { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.chat-pending { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; max-width: 100%; padding: 6px 8px 6px 14px; border-radius: 16px; background: var(--color-primary-soft); color: var(--color-primary-dark); font-size: 14px; }
.chat-pending__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pending__remove { border: 0; background: none; font-size: 20px; line-height: 1; color: inherit; cursor: pointer; padding: 0 6px; }
.chat-error { margin: 0; color: var(--color-danger, #b3261e); font-size: var(--font-size-sm); }
.chat-recorder { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.chat-recorder__dot { width: 12px; height: 12px; border-radius: 50%; background: #d93025; animation: chat-rec-pulse 1s ease-in-out infinite; }
.chat-recorder__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.chat-recorder__hint { flex: 1; color: var(--color-text-muted); }
@keyframes chat-rec-pulse { 50% { opacity: 0.25; } }
.chat-bubble--media { padding: 6px 6px 8px; }
.chat-bubble--media time { padding: 0 8px; }
.chat-attach-img { display: block; max-width: 100%; max-height: 280px; border-radius: 14px; margin-bottom: 4px; }
.voice { display: flex; align-items: center; gap: 12px; min-width: 250px; margin-bottom: 2px; }
.voice__btn { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; transition: transform 0.1s; }
.voice__btn:active { transform: scale(0.94); }
.voice__icon--pause, .voice.is-playing .voice__icon--play { display: none; }
.voice.is-playing .voice__icon--pause { display: block; }
.voice__icon--play { margin-left: 2px; }
.voice__wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; }
.voice__wave i { flex: 1; min-width: 2px; border-radius: 2px; transition: background-color 0.1s; }
.voice__time { flex-shrink: 0; min-width: 34px; font-size: var(--font-size-sm); font-variant-numeric: tabular-nums; }
.chat-bubble.mine .voice__btn { background: #fff; color: var(--color-primary); }
.chat-bubble.mine .voice__wave i { background: rgba(255, 255, 255, 0.5); }
.chat-bubble.mine .voice__wave i.is-played { background: #fff; }
.chat-bubble.theirs .voice__btn { background: var(--color-primary); color: #fff; }
.chat-bubble.theirs .voice__wave i { background: rgba(193, 87, 45, 0.3); }
.chat-bubble.theirs .voice__wave i.is-played { background: var(--color-primary); }
.chat-attach-file { display: flex; align-items: center; gap: 8px; color: inherit; font-weight: 600; text-decoration: underline; margin-bottom: 2px; }
.chat-send { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--color-primary); color: #fff; cursor: pointer; transition: background-color 0.15s; }
.chat-send:hover { background: var(--color-primary-dark); }

/* Уведомления */
.notification-list { overflow: hidden; }
.notification-item { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: var(--color-bg); text-decoration: none; }
.notification-item.is-unread { background: var(--color-primary-soft); }
.notification-item.is-unread:hover { background: #f4dccd; }
.notification-item__icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-surface); color: var(--color-primary-dark); border: 1px solid var(--color-border); }
.notification-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notification-item__text { font-size: var(--font-size-base); }
.notification-item__time { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.notification-item__dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary); }

/* ---------- Таблицы (админка) ---------- */

table.data-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-base); }
table.data-table th, table.data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--color-border); }
table.data-table th { color: var(--color-text-muted); font-weight: 700; font-size: var(--font-size-sm); }
.card:has(> table.data-table) { overflow-x: auto; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-actions form { margin: 0; }
.table-actions--center { justify-content: center; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px; text-align: center; }
.stat-card strong { display: block; font-family: var(--font-display); font-size: var(--font-size-3xl); line-height: 1.2; color: var(--color-primary-dark); }
.stat-card span { font-size: var(--font-size-sm); color: var(--color-text-muted); }

/* ---------- Каркас страниц ---------- */

.page-title { font-size: var(--font-size-3xl); margin: 0 0 var(--space-5); line-height: 1.15; }
.two-col { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 16px; }
}

.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.side-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-radius: 12px; color: var(--color-text); font-weight: 600; }
.side-nav .badge-count { margin-left: 0; }
.side-nav a:hover { background: var(--color-bg); text-decoration: none; }
.side-nav a.active { background: var(--color-primary-soft); color: var(--color-primary-dark); font-weight: 800; }
@media (max-width: 860px) {
  .side-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; border-radius: var(--radius-pill); gap: 2px; -webkit-overflow-scrolling: touch; }
  .side-nav a { white-space: nowrap; padding: 9px 16px; border-radius: var(--radius-pill); }
}

.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.tab { padding: 8px 18px; border-radius: var(--radius-pill); color: var(--color-text-muted); font-size: var(--font-size-base); font-weight: 700; background: var(--color-surface); border: 2px solid var(--color-border); }
.tab__count { display: inline-block; min-width: 22px; margin-left: 8px; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--color-bg); color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: 800; text-align: center; }
.tab.active .tab__count { background: rgba(255, 255, 255, 0.25); color: #fff; }
.tab:hover { color: var(--color-text); border-color: #d9c9b4; text-decoration: none; }
.tab.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-md);
}
.chat-window .empty-state { border: 0; background: none; padding: 32px 20px; }
.chat-window .empty-state::before { content: "💬"; display: block; font-size: 44px; line-height: 1; margin-bottom: 12px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 32px 0; }
.pagination a, .pagination span { padding: 9px 15px; border-radius: 12px; border: 2px solid var(--color-border); font-weight: 700; }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ---------- Подвал ---------- */

footer.site-footer {
  margin-top: 64px;
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: 36px 0 28px;
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
}
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer__brand { display: flex; align-items: center; gap: 14px; }
.site-footer__brand img { width: 52px; height: 52px; object-fit: contain; }
.site-footer__brand strong { display: block; font-family: var(--font-display); font-size: var(--font-size-lg); color: var(--color-primary-dark); line-height: 1.2; }
.site-footer__links { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.site-footer a { color: var(--color-text-muted); font-weight: 600; }
.site-footer a:hover { color: var(--color-primary-dark); }
.site-footer__copy { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--color-border); font-size: var(--font-size-sm); }

/* ---------- Вход и регистрация ---------- */

.auth-card { padding: var(--space-6) var(--space-5); }
.auth-card .page-title { text-align: center; margin: 0 0 var(--space-2); font-size: var(--font-size-2xl); }
.auth-lead { text-align: center; color: var(--color-text-muted); margin: 0 0 var(--space-5); }
.auth-alt { margin: var(--space-5) 0 0; text-align: center; color: var(--color-text-muted); }
.auth-alt a { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .listing-card:hover, .category-tile:hover { transform: none; }
}

@media (max-width: 600px) {
  :root { --font-size-3xl: 24px; --font-size-2xl: 24px; }
  .section { padding: 36px 0; }
  .site-header__inner { gap: 10px; }
  .logo { font-size: 23px; }
  .logo__mark { width: 42px; height: 42px; }
  .hero-search { padding-left: 18px; }
  .hero-search > svg { display: none; }
  .hero-search .btn { padding-left: 18px; padding-right: 18px; }
  .form-section { padding: var(--space-4); }
  .listing-summary, .listing-comments { padding: var(--space-4); }
  .segmented { width: 100%; }
  .segmented__item { flex: 1; text-align: center; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .listing-card__body { padding: 12px 12px 14px; }
  .listing-card__title { font-size: var(--font-size-md); }
  .listing-card__tag { left: 8px; top: 8px; }
  .listing-card__favorite { top: 8px; right: 8px; width: 32px; height: 32px; }
  .category-tiles { gap: var(--space-2); }
  .category-tile { padding: 12px 6px 10px; font-size: var(--font-size-sm); gap: 6px; }
  .category-tile__icon { width: 44px; height: 44px; font-size: 22px; }
  .chat-bubble { max-width: 88%; }
}

/* страница переписки: меньше пустоты между окном и подвалом */
main:has(.chat-card) .section { padding-bottom: 0; }
main:has(.chat-card) + .site-footer { margin-top: 44px; }

/* форма объявления */
.errors-list[hidden] { display: none; }
.photo-drop { gap: 10px; }
.photo-drop__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.photo-drop__chips span { padding: 4px 12px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--font-size-sm); }
.photo-manager__remove { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(45, 36, 32, 0.62); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; transition: background-color 0.15s; }
.photo-manager__remove:hover { background: var(--color-danger); }
.photo-manager__item .photo-manager__cover-badge { z-index: 1; }

/* Карточка: адрес всегда внизу, в одну строку, длинный обрезается многоточием */
.listing-card__body { gap: 4px; }
.listing-card__meta--place { margin-top: auto; padding-top: 6px; align-items: center; min-width: 0; white-space: nowrap; }
.listing-card__place-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Планшеты и телефоны: всё немного мельче и дальше от глаз */
@media (max-width: 1024px) {
  :root { --page-zoom: 0.88; }
  html { zoom: var(--page-zoom); }
}
@media (max-width: 520px) {
  :root { --page-zoom: 0.84; }
  .listing-card__title { font-size: 14px; }
  .listing-card__meta--place { font-size: 12px; }
  .chat-card { height: calc(100dvh / var(--page-zoom) - 160px); min-height: 420px; }
  .chat-window { padding: 14px; }
  .chat-input-row { padding: 12px 12px 14px; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
  .stat-card { padding: 14px 6px; }
  .stat-card strong { font-size: 24px; }
  .stat-card span { font-size: 12px; display: block; line-height: 1.25; }
  .form-actions .btn { flex: 1 1 100%; min-width: 0; }
  .page-title { margin-bottom: var(--space-4); }
}

/* Карточка: текст ближе к краям, заголовок до двух строк, адрес до двух строк */
.listing-card__body { padding: 10px 10px 12px; }
.listing-card__title { font-weight: 600; }
.listing-card__meta--place { white-space: normal; align-items: flex-start; }
.listing-card__place-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .listing-card__body { padding: 10px 9px 12px; } }

h1, h2, h3 { font-weight: 600; }
.feed-sentinel { height: 1px; }

/* Страница объявления: название, состояние, место, описание */
.listing-facts { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.listing-fact { margin: 0; }
.listing-fact dt { margin: 0 0 2px; font-size: var(--font-size-sm); color: var(--color-text-muted); font-weight: 600; }
.listing-fact dd { margin: 0; font-size: var(--font-size-md); line-height: 1.5; }
.listing-fact dd.listing-description { font-size: var(--font-size-md); line-height: 1.6; }
.listing-title { margin-bottom: var(--space-4); }
.listing-cta { margin-top: var(--space-4); justify-content: flex-start; }
.listing-views { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 13px; }
.listing-seller { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.listing-seller .listing-owner { margin: 0; padding: 0; border: 0; min-width: 0; }
.listing-seller .report-details { position: relative; flex-shrink: 0; }
.listing-seller .report-details summary { min-height: 32px; padding: 4px 8px; margin: 0; }
.listing-seller .report-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: min(340px, calc(100vw - 48px)); max-width: none; margin: 0; padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.comment__main { flex: 1; min-width: 0; }
.comment__choose { margin: 0; align-self: center; flex-shrink: 0; }
.comment__chosen { align-self: center; flex-shrink: 0; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--color-primary-soft); color: var(--color-primary-dark); font-size: 13px; font-weight: 700; }

/* Единые компактные отступы от края внутри карточек и блоков по всему сайту */
.card-padded, .card-padded-sm, .admin-add-card, .profile-card, .password-card,
.form-section, .listing-summary, .listing-comments, .profile-avatar-card, .profile-data-card { padding: 16px; }
.dashboard-header-card, .manage-card, .listing-seller, .owner-card { padding: 12px 16px; }
.stat-card { padding: 16px 8px; }
.filters-bar { padding: 12px; }
.conversation-row, .notification-item { padding: 12px 16px; }
.chat-window { padding: 14px; }
.chat-input-row { padding: 14px 14px 16px; }
.listing-card__body { padding: 8px 8px 10px; }
.support-dialog { padding: 18px; }
@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .listing-card__body { padding: 8px 8px 10px; }
}

/* Заголовок слева, сердечко и ссылка справа; длинное название переносится и не заходит под кнопки */
.listing-titlebar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: var(--space-4); }
.listing-titlebar .listing-title { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.listing-titlebar .listing-cta { flex-shrink: 0; margin: 0; gap: 8px; }
.listing-titlebar .fav-btn { width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; }
.listing-titlebar .fav-btn svg { width: 20px; height: 20px; }

/* Сердечко: маленькое, у правого края строки с названием */
.listing-titlebar .fav-btn { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
.listing-titlebar .fav-btn svg { width: 18px; height: 18px; }
.listing-titlebar .listing-cta { margin-left: auto; }

/* Текст на странице объявления: два стиля — заголовок и обычный текст одного размера */
.count-badge { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: var(--radius-pill); background: var(--color-bg); color: var(--color-text-muted); font-family: var(--font-body); font-size: 14px; font-weight: 700; vertical-align: middle; }
.listing-fact dd, .listing-fact dd.listing-description { font-size: var(--font-size-base); line-height: 1.5; }
.listing-comments .comment-body { font-size: var(--font-size-base); line-height: 1.5; }
.listing-comments textarea.form-control { font-size: var(--font-size-base); }

/* Пожелания */
.count-badge { margin-left: 4px; padding: 0; background: none; color: var(--color-text-muted); font-size: var(--font-size-lg); font-weight: 600; }
.comment { align-items: flex-start; gap: 10px; padding: 12px 0; }
.comment__avatar { flex-shrink: 0; display: block; }
.comment__avatar:hover { text-decoration: none; }
.comment__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.comment__name, .comment__name:hover { color: var(--color-text); font-weight: 700; font-size: var(--font-size-base); text-decoration: none; }
.comment__name:hover { text-decoration: underline; }
.comment__time { color: var(--color-text-muted); font-size: var(--font-size-xs); }
.listing-comments .comment-body { margin: 2px 0 0; }
.comment__edit { margin-top: 4px; }
.comment__edit summary { display: inline-block; cursor: pointer; color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 600; list-style: none; }
.comment__edit summary::-webkit-details-marker { display: none; }
.comment__edit summary:hover { color: var(--color-primary-dark); }
.comment__edit form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.comment__edit textarea { width: 100%; font-size: var(--font-size-base); min-height: 80px; }

/* Название на странице объявления — как заголовок блока, чуть крупнее */
.listing-titlebar .listing-title { font-size: 24px; }
/* «Изменить»: при открытом редактировании прячем текст пожелания и саму ссылку */
.comment__main:has(.comment__edit[open]) .comment-body { display: none; }
.comment__edit[open] > summary { display: none; }
.comment__edit-actions { display: flex; gap: 8px; }

/* Публичный профиль */
.profile-head { position: relative; align-items: center; }
.profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.profile-meta__place { display: inline-flex; align-items: center; gap: 4px; }
.profile-meta__place svg { color: var(--color-text-muted); flex-shrink: 0; }
.profile-head .report-details { position: relative; flex-shrink: 0; align-self: flex-start; }
.profile-head .report-details summary { min-height: 32px; padding: 4px 8px; margin: 0; }
.profile-head .report-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: min(340px, calc(100vw - 48px)); max-width: none; margin: 0; padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-hover); }
a.avatar:hover { text-decoration: none; }
.listing-owner a.avatar { color: var(--color-accent); }

/* Цифры в обзоре кабинета — тёмные */
.stat-card strong { color: var(--color-text); }

/* Переписка: спокойные цвета вместо яркого оранжевого */
.chat-bubble.mine { background: #e4eddf; color: var(--color-text); }
.chat-bubble.theirs { background: #f1ece4; color: var(--color-text); }
.chat-bubble time { color: var(--color-text-muted); opacity: 1; }
.chat-bubble.mine .voice__btn { background: var(--color-accent); color: #fff; }
.chat-bubble.mine .voice__wave i { background: rgba(74, 122, 88, 0.35); }
.chat-bubble.mine .voice__wave i.is-played { background: var(--color-accent); }
.chat-bubble.theirs .voice__btn { background: var(--color-text-muted); color: #fff; }
.chat-bubble.theirs .voice__wave i { background: rgba(117, 103, 91, 0.35); }
.chat-bubble.theirs .voice__wave i.is-played { background: var(--color-text-muted); }
.chat-bubble--system { align-self: center; max-width: 90%; padding: 6px 14px; border-radius: 999px; background: #f1ece4; color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 600; text-align: center; }
.chat-head__text { flex: 1; min-width: 0; }
.chat-head__name, .chat-head__name:hover { display: block; color: var(--color-text); font-weight: 700; font-size: var(--font-size-lg); line-height: 1.2; text-decoration: none; }
.chat-head__name:hover { text-decoration: underline; }
.chat-head__action { margin: 0 0 0 auto; flex-shrink: 0; }
.chat-head a.avatar { color: var(--color-accent); }
.promise-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: var(--space-4); padding: 12px 14px; border-radius: var(--radius); background: var(--color-accent-soft); }
.promise-box form { margin: 0; }

/* Фото профиля и окно подгонки */
.avatar-edit { border: 0; padding: 0; cursor: pointer; }
.avatar-edit img { width: 100%; height: 100%; object-fit: cover; }
.profile-main { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.profile-password-card { padding: 16px; }
.profile-password-card h2 { margin-bottom: var(--space-3); }
.crop-dialog { width: min(360px, calc(100% - 32px)); }
.crop-dialog__hint { margin: 0 0 12px; }
.crop-stage { display: flex; justify-content: center; }
#crop-canvas { width: 300px; max-width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--radius); background: #222; touch-action: none; cursor: grab; }
#crop-canvas.is-dragging { cursor: grabbing; }
#crop-zoom { width: 100%; margin: 14px 0 6px; accent-color: var(--color-primary); }
.crop-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.promise-box--muted { background: #f1ece4; }
/* «Снять обещание»: красная ссылка без рамки справа в шапке блока (не кнопка, чтобы не сливаться с «Выбрать») */
.listing-comments__head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 22px; flex-wrap: wrap; }
.listing-comments__head form { margin: 0; }
.listing-comments__head .btn-link--danger { font-size: var(--font-size-base); }
.confirm-dialog { width: min(400px, calc(100% - 32px)); }
.confirm-dialog__text { margin: 0 0 var(--space-4); font-size: var(--font-size-md); line-height: 1.5; }
.confirm-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; }
.promise-box__actions, .chat-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.promise-box__actions { justify-content: flex-end; }
.chat-head__actions form { margin: 0; }
.promise-box { margin: 0 0 var(--space-4); }
.profile-avatar-card .form-hint { margin: 0; }

/* Форум */
.forum-head { gap: 12px; }
.forum-head__title { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--font-size-lg); line-height: 1.2; }
.forum-head__hint { display: block; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.forum-city { margin: 0 0 0 auto; width: 240px; max-width: 45%; flex-shrink: 0; }
.forum-city .form-control, .forum-city .cselect__btn { min-height: 42px; }
.forum-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; }
.forum-msg.is-mine { align-self: flex-end; }
.forum-msg__avatar { flex-shrink: 0; color: var(--color-accent); }
.forum-msg__bubble { min-width: 0; padding: 8px 12px; border-radius: 16px; background: #f1ece4; border-bottom-left-radius: 6px; }
.forum-msg.is-mine .forum-msg__bubble { background: #e4eddf; border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; }
.forum-msg__name, .forum-msg__name:hover { display: block; color: var(--color-text); font-weight: 700; font-size: var(--font-size-sm); text-decoration: none; margin-bottom: 1px; }
.forum-msg__name:hover { text-decoration: underline; }
.forum-msg__text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--font-size-base); line-height: 1.45; }
.forum-msg__meta { display: flex; align-items: center; gap: 10px; margin-top: 2px; color: var(--color-text-muted); font-size: var(--font-size-xs); }
.forum-msg__del { border: 0; background: none; padding: 0; color: var(--color-text-muted); font: inherit; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.forum-msg:hover .forum-msg__del, .forum-msg__del:focus-visible { opacity: 1; }
.forum-msg__del:hover { color: var(--color-danger); }
@media (hover: none) { .forum-msg__del { opacity: 1; } }
@media (max-width: 600px) { .forum-head { flex-wrap: wrap; } .forum-city { width: 100%; max-width: none; margin: 0; } .forum-msg { max-width: 92%; } }
.forum-card { height: calc(100vh / var(--page-zoom, 1) - 250px); min-height: 420px; }
@media (max-width: 520px) { .forum-card { height: calc(100dvh / var(--page-zoom, 1) - 210px); } }

/* Форум: отступ сверху, высота так, чтобы подвал не был виден */
.forum-page .page-title { margin-bottom: var(--space-3); }
.forum-card { height: calc(100vh / var(--page-zoom, 1) - 200px); min-height: 420px; }
@media (max-width: 520px) { .forum-card { height: calc(100dvh / var(--page-zoom, 1) - 180px); } }
.forum-msg__bubble .chat-attach-img { max-height: 260px; }
.forum-msg__bubble .voice { min-width: 230px; }
.forum-msg.is-mine .voice__btn { background: var(--color-accent); color: #fff; }
.forum-msg.is-mine .voice__wave i { background: rgba(74, 122, 88, 0.35); }
.forum-msg.is-mine .voice__wave i.is-played { background: var(--color-accent); }
.forum-msg:not(.is-mine) .voice__btn { background: var(--color-text-muted); color: #fff; }
.forum-msg:not(.is-mine) .voice__wave i { background: rgba(117, 103, 91, 0.35); }
.forum-msg:not(.is-mine) .voice__wave i.is-played { background: var(--color-text-muted); }

/* Форум без заголовка страницы: максимум места для общения; компактные шапка и поле ввода */
.forum-card { height: calc(100vh / var(--page-zoom, 1) - 150px); min-height: 420px; }
@media (max-width: 520px) { .forum-card { height: calc(100dvh / var(--page-zoom, 1) - 130px); } }
.forum-head { padding: 8px 14px; }
.forum-head__title { font-size: 16px; }
.forum-city { width: 200px; }
.forum-city .form-control, .forum-city .cselect__btn { min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: var(--font-size-sm); }

/* Поле ввода в переписке и на форуме: элементы поменьше */
.chat-input-row { padding: 10px 12px 12px; }
.chat-compose-row { gap: 6px; align-items: center; }
.chat-input-row textarea { min-height: 38px; padding: 8px 16px; border-radius: 19px; line-height: 1.4; }
.chat-icon-btn { width: 38px; height: 38px; }
.chat-icon-btn svg { width: 20px; height: 20px; }
.chat-send { width: 38px; height: 38px; }
.chat-send svg { width: 18px; height: 18px; }
.chat-recorder { min-height: 38px; gap: 10px; }

.forum-head__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 18px; }
.forum-head__city { color: var(--color-text-muted); font-weight: 500; }

/* Шапка переписки: компактнее */
.chat-head { padding: 6px 12px; gap: 10px; }
.chat-head__back { width: 30px; height: 30px; }
.chat-head .avatar { width: 34px; height: 34px; font-size: 14px; }
.chat-head__name, .chat-head__name:hover { font-size: var(--font-size-base); line-height: 1.2; }
.chat-head__listing { font-size: 13px; line-height: 1.2; }
.chat-head__action .btn-small { min-height: 34px; padding: 4px 14px; }

/* Шапка переписки: чуть просторнее */
.chat-head { padding: 10px 14px; gap: 12px; }
.chat-head .avatar { width: 38px; height: 38px; font-size: 15px; }
.chat-head__text { display: flex; flex-direction: column; gap: 2px; }
.chat-head__name, .chat-head__name:hover { font-size: 17px; }

/* Страница объявления у владельца: «Изменить» рядом с названием */
.listing-edit-btn { flex-shrink: 0; margin-left: auto; gap: 6px; }
/* Форум: ещё чуть ниже, чтобы не оставалось пустого места под окном */
.forum-card { height: calc(100vh / var(--page-zoom, 1) - 110px); }
@media (max-width: 520px) { .forum-card { height: calc(100dvh / var(--page-zoom, 1) - 110px); } }

/* ---------- Форум как мессенджер: слева чаты городов, справа переписка, без прокрутки страницы и подвала ---------- */
body:has(.forum-app) { height: calc(100vh / var(--page-zoom, 1)); overflow: hidden; }
body:has(.forum-app) .site-footer { display: none; }
body:has(.forum-app) main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
main .section.forum-page { flex: 1; min-height: 0; display: flex; padding-bottom: 20px; }
.forum-page > .container { width: 100%; display: flex; min-height: 0; }
.forum-app { flex: 1; display: flex; min-width: 0; min-height: 0; overflow: hidden; }
.forum-app .forum-card { flex: 1; min-width: 0; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.forum-side { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--color-border); }
.forum-side__title { padding: 16px 18px; font-family: var(--font-display); font-weight: 600; font-size: var(--font-size-lg); border-bottom: 1px solid var(--color-border); }
.forum-side__list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.forum-chat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); color: var(--color-text); }
.forum-chat:hover { background: var(--color-bg); text-decoration: none; }
.forum-chat.is-active { background: var(--color-primary-soft); }
.forum-chat__avatar { flex-shrink: 0; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent); font-weight: 800; font-size: var(--font-size-lg); }
.forum-chat.is-active .forum-chat__avatar { background: var(--color-primary); color: #fff; }
.forum-chat__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forum-chat__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.forum-chat__top strong { font-size: var(--font-size-base); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-chat__top time { flex-shrink: 0; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.forum-chat__preview { font-size: var(--font-size-sm); color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .forum-side { display: none; } }

/* Форум на весь экран, как мессенджер: без полей по краям, шапки слева и справа одной высоты */
main > .container:first-child + .section.forum-page { padding: 0; }
.forum-page > .container { max-width: none; padding: 0; }
.forum-app.card { border: 0; border-radius: 0; box-shadow: none; }
.forum-side { width: 320px; }
.forum-side__title, .forum-app .forum-head { box-sizing: border-box; height: 64px; padding: 0 18px; display: flex; align-items: center; border-bottom: 1px solid var(--color-border); }
.forum-side__title { font-size: var(--font-size-lg); }
.forum-app .forum-head__title { font-size: var(--font-size-lg); }
.forum-chat-item { position: relative; }
.forum-chat__preview { padding-right: 24px; }
.forum-chat__remove { position: absolute; right: 12px; bottom: 10px; margin: 0; opacity: 0; transition: opacity 0.15s; }
.forum-chat__remove button { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0 0 2px; border: 0; border-radius: 50%; background: var(--color-surface); color: var(--color-text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.forum-chat__remove button:hover { background: var(--color-danger-soft); color: var(--color-danger); }
.forum-chat-item:hover .forum-chat__remove, .forum-chat__remove:focus-within { opacity: 1; }
@media (hover: none) { .forum-chat__remove { opacity: 1; } }
@media (max-width: 600px) { .forum-app .forum-head { height: auto; min-height: 64px; padding: 8px 14px; flex-wrap: nowrap; } .forum-city { width: 150px; max-width: 50%; margin-left: auto; } }

/* Переписка на весь экран: окно доходит до низа, страница не прокручивается, подвала нет (как мессенджер) */
body:has(.chat-card) { height: calc(100vh / var(--page-zoom, 1)); overflow: hidden; }
body:has(.chat-card) .site-footer { display: none; }
body:has(.chat-card) main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
main > .container:first-child + .section:has(.chat-card):not(.forum-page) { flex: 1; min-height: 0; display: flex; padding-bottom: 20px; }
.section:has(.chat-card):not(.forum-page) > .container.two-col { flex: 1; min-height: 0; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.container.two-col:has(.chat-card) > div { display: flex; flex-direction: column; min-height: 0; }
body:has(.chat-card) .two-col .chat-card { height: auto; flex: 1; min-height: 0; }
@media (max-width: 860px) { .section:has(.chat-card):not(.forum-page) > .container.two-col { grid-template-rows: auto minmax(0, 1fr); } }

/* Крестик «убрать чат из списка» ровно по центру кружка */
.forum-chat__remove button { padding: 0; }
.container.two-col:has(.chat-card) > .side-nav { align-self: start; }

/* Переписка и форум без линий-разделителей: части отделены цветом (слева тёплый фон) и мягкой тенью */
.chat-head, .chat-input-row { border: 0; position: relative; z-index: 1; background: var(--color-surface); }
.chat-head { box-shadow: 0 2px 12px rgba(45, 36, 32, 0.07); }
.chat-input-row { box-shadow: 0 -2px 12px rgba(45, 36, 32, 0.06); }
.forum-side { background: var(--color-bg); border-right: 0; }
.forum-side__title, .forum-app .forum-head { border-bottom: 0; }
.forum-app .forum-head { background: var(--color-surface); }
.forum-chat:hover { background: var(--color-surface); }
.forum-chat.is-active:hover { background: var(--color-primary-soft); }
.forum-chat__remove button { background: var(--color-bg); }
.forum-chat.is-active + .forum-chat__remove button { background: var(--color-primary-soft); }

/* Форум: слева белый список, справа переписка на тёплом фоне с белыми пузырями (как в Телеграме); разделяет цвет, не линия */
.forum-side { background: var(--color-surface); }
.forum-chat:hover { background: var(--color-bg); }
.forum-chat.is-active:hover { background: var(--color-primary-soft); }
.forum-chat__remove button { background: var(--color-surface); }
.forum-app .forum-window { background: var(--color-bg); }
.forum-msg:not(.is-mine) .forum-msg__bubble { background: var(--color-surface); box-shadow: 0 1px 2px rgba(45, 36, 32, 0.06); }

/* Свои тонкие ползунки прокрутки на всём сайте (минималистичные, без стрелок) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(117, 103, 91, 0.32); border: 3px solid transparent; background-clip: content-box; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(117, 103, 91, 0.55); border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(117, 103, 91, 0.4) transparent; }
}

/* Форум: лента на нейтральном светло-сером фоне, список и переписку делит одна вертикальная линия на всю высоту */
.forum-app .forum-window { background: #f5eeea; }
.forum-side { border-right: 1px solid var(--color-border); }

/* Список городов на форуме открывается от правого края, чтобы не выходить за экран и не сдвигать страницу */
.forum-city .cselect__panel { left: auto; right: 0; }

/* Поле сообщения как в Телеграме: одна плоская строка во всю ширину, без рамки и пилюли, значки узкие по краям */
.forum-app .forum-window { background: #f4f0ec; }
.chat-input-row { padding: 6px 8px; }
.chat-compose-row { gap: 2px; }
.chat-input-row textarea.form-control, .chat-input-row textarea.form-control:hover, .chat-input-row textarea.form-control:focus {
  border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none;
  min-height: 40px; padding: 10px 8px;
}
.chat-icon-btn { width: 36px; height: 36px; }
.chat-send { width: 36px; height: 36px; }

/* Шапка одинаковая на всех страницах: место под полосу прокрутки занято всегда, даже там, где страница не прокручивается (форум, переписка) */
html { scrollbar-gutter: stable; }

/* Фильтры каталога: все пять в одну строку, ничего не раскрывается; на узких экранах по два в ряд */
@media (max-width: 900px) { .filters-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .filters-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .filters-row .filter-field:nth-child(even) .cselect__panel { left: auto; right: 0; } }

/* Длинный текст не ломает вёрстку: в одну строку с многоточием в конце (списки, шапка переписки, имена), в карточках не больше двух строк */
.conversation-row__top { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head__name, .chat-head__listing, .forum-head__city, .forum-msg__name, .comment__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }
.forum-head__title { min-width: 0; }
.forum-head__city { display: block; }
.comment__head { min-width: 0; flex-wrap: nowrap; }
.comment__time { flex-shrink: 0; }
.listing-card__title, .listing-card__place-text, .profile-header-name { overflow-wrap: anywhere; }

.category-tile__icon img { width: 1.1em; height: 1.1em; }

/* Фото объявления: пустые поля вокруг фото белые, стрелки для листания */
.listing-gallery__thumbs img.is-active { opacity: 1; border-color: var(--color-text); }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--color-text); box-shadow: 0 2px 10px rgba(45, 36, 32, 0.22); cursor: pointer; transition: transform 0.15s, opacity 0.15s; }
.gallery-arrow:hover { transform: translateY(-50%) scale(1.14); }
.gallery-arrow--prev { left: 12px; }
.gallery-arrow--next { right: 12px; }

/* Стрелки на фото: на компьютере появляются при наведении, на телефоне и планшете видны сразу */
@media (hover: hover) {
  .listing-gallery__main .gallery-arrow { opacity: 0; transition: opacity 0.15s, transform 0.15s; }
  .listing-gallery__main:hover .gallery-arrow, .listing-gallery__main .gallery-arrow:focus-visible { opacity: 1; }
}
.listing-gallery__main img.is-zoomable { cursor: zoom-in; }

/* Фото на весь экран */
.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(28, 22, 19, 0.92); display: flex; }
.lightbox__stage { flex: 1; min-width: 0; display: flex; overflow: auto; padding: 56px 72px 40px; cursor: zoom-out; }
.lightbox__img { margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.lightbox__stage.is-zoom-1, .lightbox__stage.is-zoom-2 { padding: 0; }
.lightbox__stage.is-zoom-1 .lightbox__img, .lightbox__stage.is-zoom-2 .lightbox__img { max-width: none; max-height: none; border-radius: 0; cursor: grab; }
.lightbox__stage.is-zoom-1 .lightbox__img { height: 150vh; }
.lightbox__stage.is-zoom-2 .lightbox__img { height: 270vh; }
.lightbox__stage.is-dragging, .lightbox__stage.is-dragging .lightbox__img { cursor: grabbing; }
.lightbox__close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer; }
.lightbox__close:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox .gallery-arrow { position: absolute; z-index: 2; opacity: 1; }
.lightbox__count { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: var(--font-size-sm); font-weight: 700; }
@media (max-width: 700px) { .lightbox__stage { padding: 60px 8px 48px; } .lightbox .gallery-arrow--prev { left: 6px; } .lightbox .gallery-arrow--next { right: 6px; } }

/* Плитки фото в форме: на телефоне по две в ряд */
@media (max-width: 600px) { .photo-manager { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.comments-empty { margin: 0 0 var(--space-3); }

/* Редактирование объявления: «Удалить» слева, «Сохранить изменения» справа */
.form-actions--split { justify-content: space-between; align-items: center; }
@media (max-width: 600px) { .form-actions--split { flex-direction: column-reverse; align-items: stretch; } .form-actions--split .btn { flex: 1 1 auto; } }

/* «Изменить» у обещанной вещи: бледная кнопка, по нажатию показываем пояснение */
.listing-edit-btn.is-locked { opacity: .45; cursor: not-allowed; }
.listing-edit-btn.is-locked:hover { background: var(--color-surface); border-color: var(--color-border); }

/* ---------- Админка: обзор, жалобы, проверка ---------- */
.stat-card--link { display: block; color: inherit; }
.stat-card--link:hover { text-decoration: none; border-color: #d9c9b4; }
.admin-block { padding: 16px; margin-bottom: 16px; }
.admin-block__title { font-size: var(--font-size-xl); margin: 0 0 4px; }
.admin-intro { margin: 0 0 16px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.admin-grid .admin-block { margin-bottom: 0; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }

.chart { display: block; width: 100%; height: auto; margin-top: 8px; }
.chart__grid { stroke: var(--color-border); stroke-width: 1; }
.chart__label { fill: var(--color-text-muted); font-size: var(--font-size-xs); }
.chart__hit { fill: transparent; }
.chart__col:hover .chart__hit { fill: rgba(45, 36, 32, 0.05); }
.chart__bar--visits { fill: var(--color-accent); }
.chart__bar--signups { fill: var(--color-primary); }

.admin-list { list-style: none; margin: 8px 0 0; padding: 0; }
.admin-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.admin-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.admin-list__meta { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.admin-list__details { flex-basis: 100%; color: var(--color-text-muted); font-size: var(--font-size-sm); overflow-wrap: anywhere; }
.admin-list--rows .admin-row { align-items: center; }

.admin-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.admin-chip { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--color-bg); border: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 700; }
.admin-chip--warn { background: var(--color-primary-soft); border-color: transparent; color: var(--color-primary-dark); }
.admin-chip--danger { background: var(--color-danger-soft); border-color: transparent; color: var(--color-danger); }

.report-card { padding: 16px; margin-bottom: 16px; }
.report-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.report-card__title { font-size: var(--font-size-lg); font-weight: 700; color: var(--color-text); overflow-wrap: anywhere; }
.report-card__parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .report-card__parties { grid-template-columns: 1fr; } }
.report-party { background: var(--color-bg); border-radius: 14px; padding: 12px; min-width: 0; }
.report-party__label { display: block; margin-bottom: 8px; color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 700; }
.report-party__owner { margin: 8px 0 0; color: var(--color-text-muted); font-size: var(--font-size-sm); }
.report-person { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--color-text); }
.report-person:hover { text-decoration: none; }
.report-person__text { display: flex; flex-direction: column; min-width: 0; }
.report-person__text strong, .report-person__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-person__text small { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.report-thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; object-fit: cover; }
.report-card__details { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-card__details--clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.report-card__actions { margin-top: 12px; }
.admin-photos { display: flex; gap: 8px; margin-bottom: 8px; }
.admin-photos img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; }

.admin-person__head { display: flex; align-items: center; gap: 16px; }
.admin-person__name { margin: 0 0 4px; }
.admin-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 16px 0 0; }
.admin-facts dt { color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 700; }
.admin-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .admin-facts { grid-template-columns: 1fr; } }

.stat-grid--admin { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tabs--compact { margin: 8px 0 0; gap: 6px; }
.tabs--compact .tab { padding: 6px 14px; font-size: var(--font-size-sm); }

.listing-admin { margin-top: 12px; }
