:root {
  --brand: #0a9f6a;
  --brand-dark: #07845a;
  --brand-soft: #e6f6ef;
  --accent: #ff6a3d;
  --accent-dark: #ec5428;
  --ink: #1b1d1f;
  --muted: #7a7f85;
  --line: #e7e9ec;
  --soft: #f4f5f7;
  --bg: #ffffff;
  --danger: #e0393e;
  --warn: #f2a516;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(20, 30, 40, .08);
  --wrap: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 16px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 20px; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 17px; margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.danger { color: var(--danger); }
.inline { display: inline; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 0; cursor: pointer;
  font-weight: 700; font-size: 15px; white-space: nowrap; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: var(--soft); color: var(--ink); }
.btn-ghost:hover { background: #e9ebee; color: var(--ink); }
.btn-danger-ghost { background: #fdeeee; color: var(--danger); }
.btn-danger-ghost:hover { background: #fadcdc; color: var(--danger); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar { background: var(--soft); font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; height: 32px; align-items: center; }
.toplinks { display: flex; gap: 18px; align-items: center; }
.toplinks a, .toplinks .linkbtn { color: var(--ink); }
.toplinks a:hover, .toplinks .linkbtn:hover { color: var(--accent); }
.mainbar { display: flex; align-items: center; gap: 14px; height: 68px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 24px; color: var(--ink); letter-spacing: -.02em; flex-shrink: 0; }
.logo:hover { color: var(--ink); }
.logo-sm { font-size: 18px; }
.catbtn {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px;
  background: var(--brand); color: #fff; border: 0; border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; flex-shrink: 0;
}
.catbtn:hover { background: var(--brand-dark); }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }
.catbtn[aria-expanded="true"] .burger { background: transparent; }
.catbtn[aria-expanded="true"] .burger::before { top: 0; transform: rotate(45deg); }
.catbtn[aria-expanded="true"] .burger::after { top: 0; transform: rotate(-45deg); }

.searchbar { flex: 1; display: flex; min-width: 0; border: 2px solid var(--brand); border-radius: var(--radius-sm); overflow: hidden; height: 44px; }
.searchbar input { flex: 1; min-width: 0; border: 0; padding: 0 14px; outline: none; background: #fff; }
.searchbar .search-city { border: 0; border-left: 1px solid var(--line); padding: 0 8px; background: #fff; max-width: 170px; outline: none; cursor: pointer; }
.searchbar .search-city.has-city { background: var(--brand-soft); font-weight: 700; color: var(--brand-dark); }
.searchbar .btn { border-radius: 0; height: 100%; }
.usernav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.iconlink { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); }
.iconlink:hover { background: var(--soft); color: var(--accent); }
.iconlink svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
}
.iconlink .badge { position: absolute; top: 2px; right: 0; }

.catmenu { border-top: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); max-height: calc(100vh - 100px); overflow: auto; }
.catmenu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; padding-top: 20px; padding-bottom: 24px; }
.catmenu-col { display: flex; flex-direction: column; gap: 4px; }
.catmenu-col a { color: var(--ink); font-size: 14px; }
.catmenu-col a:hover { color: var(--accent); }
.catmenu-head { font-weight: 800; font-size: 15px !important; margin-bottom: 4px; }
.catmenu-foot { display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 18px; }
.catmenu-foot .linkbtn { color: var(--ink); font-size: 14px; }
.catmenu-foot .linkbtn:hover { color: var(--accent); }

/* ---------- общие блоки ---------- */
.page { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; }
.flash-ok { background: var(--brand-soft); color: var(--brand-dark); }
.flash-warn { background: #fff5e0; color: #8a5a00; }
.flash-error { background: #fdeeee; color: var(--danger); }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); background: #fff5e0; margin-bottom: 16px; }
.notice-sold { background: var(--soft); }
.notice-blocked { background: #fdeeee; color: var(--danger); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 14px; flex-wrap: wrap; }
.section-head h1, .section-head h2 { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs > *:not(:last-child)::after { content: '›'; margin-left: 6px; color: #b6babf; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--soft); font-size: 12px; font-weight: 700; color: #4b5056; }
.tag-new { background: var(--brand-soft); color: var(--brand-dark); }
.tag-drop { background: #fff1e6; color: #b8460b; }
.tag-leaving { background: #e8f3ff; color: #1659a3; }
.tag-bargain { background: #e3f7e8; color: #177a3a; }
.leaving-banner { margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--radius-sm); background: #e8f3ff; color: #1659a3; font-size: 13.5px; text-align: center; }
.leaving-note { margin-top: 2px; color: #1659a3; font-size: 13px; font-weight: 600; }
.price-drop { color: #b8460b; font-size: 14px; margin-top: 4px; }
.empty { text-align: center; padding: 56px 16px; background: var(--soft); border-radius: var(--radius); }
.empty-icon { font-size: 48px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 16px; }

/* ---------- главная ---------- */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: var(--radius); margin-bottom: 18px;
  background: linear-gradient(120deg, #0a9f6a 0%, #13b37c 55%, #ffb36b 140%); color: #fff;
}
.hero h1 { margin: 0 0 6px; font-size: 26px; }
.hero p { margin: 0; opacity: .92; }
.cat-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.cat-tile {
  position: relative; display: block; height: 96px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--tile, var(--soft)); color: var(--ink); overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.cat-tile:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-name { position: relative; z-index: 1; font-weight: 700; font-size: 14px; line-height: 1.2; display: block; max-width: 75%; }
.cat-count { position: relative; z-index: 1; font-size: 12px; color: var(--muted); }
.cat-icon { position: absolute; right: 8px; bottom: 2px; font-size: 44px; line-height: 1; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 17px; border: 0;
  background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pill:hover { background: #e9ebee; color: var(--ink); }
.pill.on { background: var(--ink); color: #fff; }
.pill.top { font-weight: 800; }
option.top { font-weight: 700; }
.back-link { display: inline-block; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.back-link:hover { color: var(--accent); }

/* ---------- кроппер аватара ---------- */
.cropper { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(18, 20, 24, .55); }
.cropper-card { width: min(340px, 100%); background: #fff; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.cropper-card h2 { margin: 0; font-size: 18px; text-align: center; }
.cropper-view { position: relative; width: 280px; height: 280px; margin: 0 auto; overflow: hidden; border-radius: 12px; background: var(--soft); cursor: grab; touch-action: none; }
.cropper-view:active { cursor: grabbing; }
.cropper-view img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; user-select: none; pointer-events: none; }
.cropper-ring { position: absolute; inset: 0; border: 2px dashed rgba(255,255,255,.9); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.4); pointer-events: none; }
.cropper input[type=range] { width: 100%; accent-color: var(--accent); }
.cropper-actions { display: flex; align-items: center; justify-content: center; gap: 14px; }

/* ---------- карточки ---------- */
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 16px; }
.grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; min-width: 0; }
.card-photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-photo img { transform: scale(1.03); }
.nophoto { display: grid; place-items: center; width: 100%; height: 100%; font-size: 40px; opacity: .6; }
.nophoto.big { font-size: 56px; }
.photo-count { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; }
.sold-label { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.6); font-weight: 800; font-size: 18px; color: var(--ink); }
.fav {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: rgba(255,255,255,.9); cursor: pointer; color: var(--ink);
}
.fav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fav:hover { color: var(--accent); }
.fav.on { color: var(--accent); }
.fav.on svg { fill: currentColor; }
.card-body { padding-top: 8px; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.35; }
.card-title:hover { color: var(--accent); }
.card-price { font-weight: 800; font-size: 17px; margin-top: 4px; }
.card-approx { font-size: 12px; color: var(--muted); }
.card-tags { display: flex; gap: 4px; margin: 4px 0; flex-wrap: wrap; }
.card-tags:empty { display: none; }
.card-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.is-sold .card-price { color: var(--muted); text-decoration: line-through; }

/* ---------- поиск ---------- */
.search-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.search-head h1 { margin-bottom: 10px; }
.save-search { margin-left: auto; }
.subcats { margin-bottom: 20px; }
.search-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: 120px; }
.filters-toggle { display: none; }
.filters-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: #4b5056; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input:not([type]), select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: #fff; outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; }
select { cursor: pointer; }
.price-range { display: grid; grid-template-columns: 1fr 1fr 64px; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.push-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.push-row .linkbtn { color: var(--brand-dark); }
.segmented { display: inline-flex; background: var(--soft); border-radius: var(--radius-sm); padding: 3px; flex-wrap: wrap; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.segmented input:checked + span { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); }
.where { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--brand-soft); font-size: 14px; margin-bottom: 16px; }
.where a { font-weight: 700; margin-left: 8px; white-space: nowrap; }
.where.is-empty { background: #fff5e0; }
.elsewhere { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.sortbar { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; font-size: 14px; flex-wrap: wrap; }
.sort { color: var(--ink); font-weight: 600; }
.sort.on { color: var(--brand-dark); border-bottom: 2px solid var(--brand); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px; border-radius: var(--radius-sm); background: var(--soft); color: var(--ink); font-weight: 700; }
.pager .on { background: var(--ink); color: #fff; }

/* ---------- объявление ---------- */
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; }
.item-title { font-size: 30px; }
/* Фото и видео лентой квадратов: тап по плитке — просмотр на весь экран */
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.media-tile {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--soft);
}
button.media-tile { cursor: pointer; }
button.media-tile:hover { box-shadow: var(--shadow); }
.media-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.media-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px;
}
.item-section { margin-top: 28px; }
.specs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.specs li { display: flex; gap: 8px; }
.specs span { color: var(--muted); min-width: 110px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
.item-meta { margin-top: 24px; }
.report { margin-top: 12px; font-size: 14px; }
.report summary { cursor: pointer; color: var(--muted); }
.report form { margin-top: 10px; max-width: 420px; }
.item-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 120px; }
.price-box { display: flex; flex-direction: column; gap: 4px; }
.item-price { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.fav-inline { position: static; width: auto; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--soft); display: inline-flex; gap: 6px; align-self: flex-start; margin-top: 6px; font-weight: 600; font-size: 14px; }
.contact-box, .owner-box { display: flex; flex-direction: column; gap: 8px; }
.seller-box { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.seller-box:hover { color: var(--ink); border-color: #cfd3d8; }
.rating { color: #f29b16; font-weight: 700; }
.rating.big { font-size: 18px; }
.tip { padding: 14px; border-radius: var(--radius); background: var(--brand-soft); font-size: 14px; }
.tip p { margin: 4px 0 0; }
.avatar {
  flex-shrink: 0; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #13b37c, #0a7f56); color: #fff; font-weight: 800; object-fit: cover;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 80px; height: 80px; font-size: 26px; }
.avatar.xl { width: 120px; height: 120px; font-size: 40px; }
.avatar-link { display: block; margin: 0 4px; }

/* ---------- формы ---------- */
.form-page { max-width: 760px; }
.form-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.listing-form .field + .field, .listing-form .field + fieldset, .listing-form fieldset + .field { margin-top: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-input { display: grid; grid-template-columns: 1fr 140px; gap: 8px; margin-top: 12px; max-width: 420px; }
.price-input input { font-size: 18px; font-weight: 700; }
.dropzone { display: grid; place-items: center; text-align: center; min-height: 110px; padding: 16px; border: 2px dashed #cfd3d8; border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.previews, .photo-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-edit { margin: 0 0 12px; }
.preview, .photo-edit-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); }
.preview img, .photo-edit-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-edit-item label { display: flex; gap: 4px; align-items: center; padding: 2px 6px; }
.preview button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.preview .main-label { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-actions p { width: 100%; margin: 0; }
.auth-card { max-width: 460px; margin: 20px auto; padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-tabs { display: flex; gap: 20px; margin-bottom: 20px; }
.auth-tabs a { font-size: 22px; font-weight: 800; color: var(--muted); }
.auth-tabs a.on { color: var(--ink); }
.avatar-row { display: flex; align-items: center; gap: 16px; }

/* ---------- мои объявления, вкладки ---------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 0; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--ink); }
.tabs a span { color: var(--muted); font-weight: 600; margin-left: 4px; }
.my-list { display: flex; flex-direction: column; }
.my-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.my-photo { display: block; width: 120px; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); }
.my-photo img { width: 100%; height: 100%; object-fit: cover; }
.my-info { min-width: 0; }
.my-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- продавец, отзывы ---------- */
.seller-page { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: start; }
.seller-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.seller-card h1 { margin: 10px 0 0; font-size: 24px; }
.seller-facts { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.seller-about { white-space: pre-wrap; text-align: left; font-size: 14px; margin: 8px 0 0; }
.reviews { margin-top: 36px; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review p { margin: 8px 0 0; white-space: pre-wrap; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars input { position: absolute; opacity: 0; }
.stars label { font-size: 30px; color: #d3d6da; cursor: pointer; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f29b16; }
.stars-static { color: #f29b16; letter-spacing: 1px; }
.stars-static .muted { color: #d3d6da; }
.review-reply { margin: 10px 0 0 18px; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14px; }
.review-reply p { margin: 4px 0 0; }
.review .report { margin-top: 8px; font-size: 13px; }
.rating-summary { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.rating-score { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rating-score b { font-size: 40px; line-height: 1; font-weight: 800; }
.rating-bars { flex: 1; min-width: 220px; max-width: 360px; display: flex; flex-direction: column; gap: 4px; }
.rating-bar { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; }
.rating-bar .bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.rating-bar .bar span { display: block; height: 100%; background: #f29b16; }
.badges { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.badges li { padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12.5px; font-weight: 700; cursor: help; }
.item-side .badges { justify-content: flex-start; margin: 0; }
.seller-actions { width: 100%; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 14px; text-align: left; }
.seller-actions .linkbtn { color: var(--muted); }
.seller-actions .report { margin-top: 0; }
.blocked-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.blocked-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.blocked-user { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.chat .report { margin: 6px auto 0; text-align: center; }
.chat .report form { margin: 10px auto 0; text-align: left; }
.chat-actions { display: flex; gap: 8px; justify-content: center; align-items: flex-start; flex-wrap: wrap; margin-top: 4px; }
.chat-actions .report { margin: 0; }
.chat-actions .report[open] { flex-basis: 100%; }
.chat-actions .report summary { list-style: none; color: var(--ink); }
.chat-actions .report summary::-webkit-details-marker { display: none; }

/* ---------- сообщения ---------- */
.dialogs { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dialog { display: flex; gap: 12px; align-items: center; padding: 12px 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
.dialog:last-child { border-bottom: 0; }
.dialog:hover { background: var(--soft); color: var(--ink); }
.dialog.unread { background: #f3fbf7; }
.dialog-photo { flex-shrink: 0; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; font-size: 24px; }
.dialog-photo img { width: 100%; height: 100%; object-fit: cover; }
.dialog-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dialog-top { display: flex; justify-content: space-between; gap: 8px; }
.dialog-title, .dialog-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.dialog-role { flex-shrink: 0; }
.chat { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.chat-head { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.chat-back { font-size: 22px; color: var(--ink); }
.chat-listing { flex: 1; display: flex; gap: 10px; align-items: center; color: var(--ink); min-width: 0; }
.chat-listing > span:last-child, .chat-peer > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.chat-listing b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-peer { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.chat-log {
  height: min(60vh, 560px); overflow-y: auto; padding: 16px; border-radius: var(--radius); background: var(--soft);
  display: flex; flex-direction: column; gap: 8px;
}
.chat-empty { margin: auto; }
.msg { max-width: 75%; align-self: flex-start; }
.msg.mine { align-self: flex-end; }
.msg-body { padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.msg.mine .msg-body { background: #d8f3e6; border-radius: 16px 16px 4px 16px; }
.msg-time { font-size: 11px; color: var(--muted); margin-top: 2px; padding: 0 4px; }
.msg-warn { margin-top: 4px; padding: 7px 11px; border-radius: 10px; background: #fff4e0; color: #7a4b00; font-size: 13px; line-height: 1.35; }
.msg.mine .msg-time { text-align: right; }
.read { color: var(--brand); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-blocked { text-align: center; padding: 12px; background: var(--line); border-radius: var(--radius); margin: 0; }
.deal-check { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--brand-soft); }
.deal-check p { margin-bottom: 10px; }
.deal-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dialog-ask { font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.chat-form textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; }
.chat-form .btn { height: 44px; width: 52px; padding: 0; font-size: 18px; }
/* Фото в чате: одно — крупно, несколько — плиткой 2×N */
.msg-photos { display: grid; gap: 3px; border-radius: 14px; overflow: hidden; margin-bottom: 3px; width: min(280px, 62vw); }
.msg-photos:not([data-count="1"]) { grid-template-columns: 1fr 1fr; }
.msg-photo { padding: 0; border: 0; background: var(--line); cursor: zoom-in; display: block; }
.msg-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.msg-photos[data-count="1"] .msg-photo img { max-height: 340px; object-fit: contain; background: #fff; }
.msg-photos:not([data-count="1"]) .msg-photo { aspect-ratio: 1; }
.msg-photos[data-count="3"] .msg-photo:first-child { grid-column: 1 / -1; aspect-ratio: 2; }
.msg-photo-removed { padding: 18px 10px; background: var(--line); color: var(--muted); font-size: 12px; text-align: center; grid-column: 1 / -1; }
.chat-attach { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--soft); font-size: 20px; cursor: pointer; position: relative; }
.chat-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.chat-attach:focus-within { outline: 2px solid var(--brand); }
.chat-chips { padding: 8px 12px 0; }
.chat-chips .pill { font-size: 13px; }
.chat-previews { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chat-preview { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--soft); }
.chat-preview img { width: 100%; height: 100%; object-fit: cover; }
.chat-preview button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; line-height: 22px; padding: 0; cursor: pointer; }

/* ---------- админка ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stats div { padding: 16px; border-radius: var(--radius); background: var(--soft); display: flex; flex-direction: column; }
.stats b { font-size: 28px; }
.stats span { color: var(--muted); font-size: 13px; }
.stats .warn { background: #fff5e0; }
.admin-block { margin-bottom: 32px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.blocked td { opacity: .55; }
.inline-form { display: flex; gap: 8px; max-width: 420px; margin-bottom: 12px; }

/* ---------- тексты ---------- */
.prose { max-width: 760px; font-size: 16px; line-height: 1.6; }
.prose h2 { margin-top: 28px; }
.prose li { margin-bottom: 6px; }

/* ---------- подвал и нижняя панель ---------- */
.site-footer { background: var(--soft); padding: 32px 0; margin-top: 24px; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.footer-in p { margin: 10px 0 0; max-width: 460px; }
.footer-in .small { grid-column: 1 / -1; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--ink); }
.tabbar { display: none; }

/* ---------- адаптивность ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .hide-sm { display: none !important; }
  .topbar { display: none; }
  .mainbar { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .logo { order: 1; font-size: 21px; }
  .usernav { order: 2; margin-left: auto; }
  .catbtn { order: 3; padding: 0 12px; height: 40px; }
  .searchbar { order: 4; flex-basis: 100%; }
  .searchbar .search-city { max-width: 110px; font-size: 13px; }
  .searchbar .btn { padding: 0 12px; }
  .grid, .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-layout, .item-layout, .seller-page { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters-toggle { display: flex; width: 100%; }
  .filters-form { display: none; margin-top: 12px; }
  .filters-form.open { display: flex; }
  .item-side { position: static; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a.on { color: var(--brand-dark); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .tabbar .badge { position: absolute; top: 2px; left: 55%; }
  .tab-add span { display: grid; place-items: center; width: 34px; height: 26px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 22px; line-height: 1; font-weight: 700; }
  .tab-add { color: var(--accent) !important; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .usernav .iconlink { display: none; }
}
@media (max-width: 640px) {
  h1, .item-title { font-size: 22px; }
  .hero { padding: 18px; }
  .hero h1 { font-size: 21px; }
  .hero .btn { width: 100%; }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-tile { height: 84px; padding: 10px; }
  .cat-name { font-size: 12.5px; max-width: 100%; }
  .cat-icon { font-size: 32px; }
  .city-pills .pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; }
  .grid, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
  .card-price { font-size: 15px; }
  .searchbar .search-city { display: none; }
  .row-2 { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .item-price { font-size: 26px; }
  .my-row { grid-template-columns: 88px 1fr; }
  .my-photo { width: 88px; }
  .my-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .footer-in { grid-template-columns: 1fr; }
  .chat-log { height: 58vh; padding: 10px; }
  .msg { max-width: 88%; }
  .auth-card { padding: 20px; margin: 0; box-shadow: none; border: 0; }
  .form-card { padding: 16px; }
  .price-input { grid-template-columns: 1fr 120px; }
  .dialog-role { display: none; }
}

/* поправки форм */
.field > .segmented { align-self: flex-start; }
.listing-form .row-2 > .field { margin-top: 0; }
.listing-form .row-2 { margin-top: 0; }

/* ---------- просмотр фото и видео на весь экран ---------- */
html.lb-open, html.lb-open body { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden;
  background: rgba(0, 0, 0, var(--lb-fade, 1)); touch-action: none; overscroll-behavior: contain;
  -webkit-user-select: none; user-select: none;
}
.lightbox[hidden] { display: none; }
.lb-img {
  width: 100%; height: 100%; object-fit: contain; transform-origin: center; will-change: transform;
  transition: transform .22s ease; -webkit-user-drag: none; pointer-events: none;
}
.lb-img.dragging { transition: none; }
.lb-video { max-width: 100%; max-height: 100%; background: #000; }
.lb-close, .lb-nav {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lb-close { top: calc(env(safe-area-inset-top, 0px) + 12px); right: calc(env(safe-area-inset-right, 0px) + 12px); font-size: 22px; }
.lb-nav { top: 50%; margin-top: -24px; font-size: 32px; line-height: 1; }
.lb-nav.prev { left: calc(env(safe-area-inset-left, 0px) + 12px); }
.lb-nav.next { right: calc(env(safe-area-inset-right, 0px) + 12px); }
.lb-close:hover, .lb-nav:hover { background: rgba(0, 0, 0, .75); }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-count {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 24px); left: 50%; transform: translateX(-50%);
  padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px;
}
@media (max-width: 640px) {
  /* На телефоне листают свайпом — стрелки внизу, чтобы не закрывать фото */
  .lb-nav { top: auto; margin-top: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
}

/* ---------- проверка объявлений ---------- */
.notice-pending, .notice-review { background: var(--brand-soft); }
.notice-rejected { background: #fdeeee; }
.notice-actions { margin-top: 10px; }
.notice .appeal { margin-top: 10px; }
.notice .appeal summary { cursor: pointer; color: var(--brand-dark); }
.notice .appeal form { margin-top: 8px; }
.notice .appeal textarea { width: 100%; }
.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px;
  border: 2px solid var(--brand); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.admin-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
.admin-reject { display: flex; gap: 6px; margin-top: 6px; }
.admin-reject input { flex: 1; min-width: 140px; }
.admin-log { margin-top: 16px; }
.admin-log summary { cursor: pointer; font-weight: 600; }
.my-status { font-weight: 600; }
.my-status.pending, .my-status.review { color: var(--brand-dark); }
.my-status.rejected { color: var(--danger); }
.mod-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mod-photo { flex: 0 0 auto; }
.mod-photo .nophoto { display: grid; place-items: center; width: 56px; height: 42px; border-radius: 6px; background: var(--soft); }
.mod-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
.mod-actions .admin-reject { flex: 1 1 220px; margin-top: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ai-models { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ai-models legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.ai-model { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.ai-model:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ai-model input { margin-top: 3px; }
.ai-model .small { display: block; }
.ai-hint { margin-top: -6px; }
.ai-key { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ai-provider { font-weight: 600; font-size: 14px; margin-top: 8px; }
.ai-tag { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 10px; background: var(--line); color: var(--muted); }
.ai-tag.ok { background: var(--brand-soft); color: var(--brand); }
.ai-model-off { opacity: .6; }

/* ---------- карты ---------- */
.map { height: 300px; border-radius: var(--radius-sm); border: 1px solid var(--line); z-index: 0; background: var(--soft); }
.map-sm { height: 220px; margin: 8px 0 6px; }
.map-results { height: min(70vh, 640px); }
.map-pick .map { margin-top: 8px; cursor: crosshair; }
.map-note { margin-top: 8px; }
.view-switch a { display: block; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.view-switch a.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
/* Маркер с ценой: Leaflet двигает сам элемент через transform, поэтому сдвигаем вложенный span */
.map-price { background: none; border: 0; }
.map-price span { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; background: #fff; color: var(--ink);
  font: 700 12px/1 Manrope, system-ui, sans-serif; padding: 6px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.25); border: 1px solid var(--line); }
.leaflet-marker-icon.map-price:hover span, .leaflet-marker-icon.map-price:focus span { background: var(--ink); color: #fff; }
.map-pop { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.map-pop img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.map-pop b { display: block; font-size: 13px; line-height: 1.3; max-height: 3.9em; overflow: hidden; }
.map-pop span span { color: var(--brand-dark); font-weight: 700; }
.leaflet-container { font-family: inherit; }

.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; }

/* ---------- статистика объявления ---------- */
.stats-page .stats-4 { grid-template-columns: repeat(2, 1fr); margin-bottom: 8px; }
@media (min-width: 640px) { .stats-page .stats-4 { grid-template-columns: repeat(4, 1fr); } }
.stats-item { display: flex; gap: 12px; align-items: center; color: var(--ink); margin-bottom: 8px; }
.stats-item b { display: block; }
.stats-h { font-size: 18px; margin: 22px 0 10px; }
.stats-tabs { margin-bottom: 12px; }
.chart { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 180px; align-items: end; padding: 8px 0 22px; border-bottom: 1px solid var(--line); position: relative; }
.chart-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.chart-bar { width: 100%; min-height: 2px; background: var(--brand); border-radius: 3px 3px 0 0; }
.chart-col:hover .chart-bar { background: var(--brand-dark); }
.chart-n { font-size: 10px; color: var(--muted); line-height: 1.4; }
.chart-day { position: absolute; bottom: -20px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.stats-tips { margin-top: 20px; }
.stats-tips ul { margin: 8px 0 12px; padding-left: 18px; }
.stats-tips li { margin-bottom: 4px; }
.my-stats { font-weight: 600; }
@media (max-width: 640px) { .chart-n { display: none; } }
.lang-switch a { font-weight: 600; color: var(--muted); }
.lang-switch a.on { color: var(--ink); font-weight: 800; }
.lang-row a.on { font-weight: 700; color: var(--ink); }

/* Кнопка языка в шапке: на десктопе между логотипом и «Все категории»,
   на мобильной — справа рядом с аватаром (order ниже). */
.flag { display: block; width: 20px; height: auto; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.langdd { position: relative; flex-shrink: 0; }
.langbtn {
  display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 800; font-size: 13px; color: var(--ink); cursor: pointer;
}
.langbtn:hover { background: var(--soft); }
.langbtn-caret { width: 8px; height: 5px; fill: none; stroke: var(--muted); stroke-width: 1.6; transition: transform .15s; }
.langbtn[aria-expanded="true"] .langbtn-caret { transform: rotate(180deg); }
.langmenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 70; min-width: 160px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.langmenu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--ink); font-size: 14px; }
.langmenu a:hover { background: var(--soft); color: var(--ink); }
.langmenu a.on { font-weight: 800; }
.langmenu .flag { width: 22px; }
@media (max-width: 900px) {
  .langdd { order: 2; margin-left: auto; }
  .usernav { margin-left: 0; }
  .langbtn { height: 40px; padding: 0 10px; }
  .langmenu { left: auto; right: 0; }
}
@media (max-width: 640px) {
  .langbtn-code { display: none; }
  .langbtn { padding: 0 9px; }
}

/* ---------- видео в объявлении ---------- */
.video-current video { width: 100%; max-height: 70vh; border-radius: var(--radius); background: #000; display: block; }
.video-field { margin-top: 14px; display: grid; gap: 10px; }
.video-current { display: grid; gap: 6px; }
.dropzone-video { min-height: 0; padding: 14px; }
.video-badge { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; }

/* ---------- поделиться ---------- */
.price-box .share { display: inline-block; position: relative; margin-left: 6px; }
.share summary { list-style: none; cursor: pointer; }
.share summary::-webkit-details-marker { display: none; }
.share-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 200px; display: grid; padding: 6px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); }
.share-menu a, .share-menu .linkbtn { padding: 9px 12px; border-radius: 8px; color: var(--ink); text-align: left; font-weight: 600; font-size: 14px; }
.share-menu a:hover, .share-menu .linkbtn:hover { background: var(--soft); }

/* ---------- автоперевод ---------- */
.translate-btn { margin-top: 8px; font-size: 14px; font-weight: 600; }
.msg-translate { font-size: 12px; margin: 2px 4px 0; color: var(--brand-dark); }

.settings-h { font-size: 18px; margin: 28px 0 8px; }

/* ---------- забронировано ---------- */
.reserved-label { position: absolute; left: 8px; top: 8px; padding: 4px 9px; border-radius: 8px; background: var(--warn); color: #3a2600; font-size: 12px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.reserved-banner { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fff4e0; color: #6b4300; font-size: 14px; }

/* ---------- капча ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row img { border-radius: 10px; border: 1px solid var(--line); }
.cf-turnstile { min-height: 65px; }

.assist-btn { margin-top: 10px; }

/* Обязательные поля: звёздочка у подписи, ошибки проверки формы */
.req-mark, .marks-req .field:has(> :required, > * > :required) > span:first-child::after { color: var(--danger); }
.marks-req .field:has(> :required, > * > :required) > span:first-child::after { content: ' *'; }
.req-note { margin: 0 0 4px; }
.invalid input, .invalid select, .invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 53, 69, .12); }
.field-error, .field > .field-error, .check > .field-error { display: block; font-size: 13px; font-weight: 500; color: var(--danger); }
.check.invalid { color: var(--danger); }

/* Подсказки адреса в форме объявления */
.suggest { position: relative; }
.suggest-list { position: absolute; z-index: 1000; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--bg, #fff); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); max-height: 320px; overflow-y: auto; }
.suggest-list li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.suggest-list li span { font-size: 12px; color: var(--muted); }
.suggest-list li.on, .suggest-list li:hover { background: var(--brand-soft); }
.suggest-list li.muted { cursor: default; background: none; color: var(--muted); font-size: 13px; }

/* Вход: после ошибок — заметная кнопка «Восстановить пароль» */
.login-help { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-bottom: 14px; border-radius: var(--radius-sm); background: var(--brand-soft); }
.login-help p { margin: 0; font-size: 14px; }
.captcha-ts { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* Поле пароля с глазком «показать» */
.pass-wrap, .field > .pass-wrap { position: relative; display: block; font-size: inherit; font-weight: inherit; color: inherit; }
.pass-wrap > input { width: 100%; padding-right: 46px; }
.pass-wrap > input::-ms-reveal { display: none; }
.pass-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pass-toggle:hover { color: var(--ink); }
.pass-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Почта не подтверждена — напоминание на каждой странице */
.verify-banner { margin-bottom: 14px; }
.verify-banner .notice { margin-top: 6px; }
