/* Лавочка — приложение: общие стили каркаса. ОБЩИЙ ФАЙЛ (docs/PARTS.md): половины «покупатель» и «продавец»
   пишут свои стили в buyer/buyer.css и seller/seller.css, этот файл не правят.
   Цвета, шрифты и тёмная тема — только из /shared/tokens.css.
   Мобильный в первую очередь (390 px); с 900 px — шапка сверху и центрированная раскладка. */

:root { --on-free: #fff; --star: #f0a21a; --badge: #e5484d; --hdr: 0px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --on-free: #0b1f17; --star: #f5b53d; } }
:root[data-theme="dark"] { --on-free: #0b1f17; --star: #f5b53d; }
@media (min-width: 900px) { :root { --hdr: 64px; } }

html { scroll-padding-top: calc(var(--hdr) + 64px); }
html.no-scroll { overflow: hidden; }
body { min-height: 100dvh; overflow-x: hidden; }
#app { min-height: 100dvh; }

/* ───────── типографика и утилиты ───────── */
.h1 { font-size: 30px; letter-spacing: -.02em; }
.h2 { font-size: 24px; letter-spacing: -.015em; }
.h3 { font-size: 19px; }
.h4 { font-size: 16px; }
.muted { color: var(--muted); }
.sm { font-size: var(--fs-sm); }
.block { display: block; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1 1 auto; }
.min0 { min-width: 0; }
.row { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.center { text-align: center; justify-content: center; }
.center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.ok-t { color: var(--free-ink); }
.danger-t { color: var(--danger); }
.err { color: var(--danger); font-size: 14px; }
.link { color: var(--primary); background: none; border: 0; padding: 0; font-weight: 600; cursor: pointer; min-height: 32px; }
.link:disabled { color: var(--muted); cursor: default; }
.dot { color: var(--faint); }
.hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.d-only, .d-inline { display: none !important; }
.m-only { display: flex; }
@media (min-width: 900px) { .d-only { display: inline-flex !important; } .d-inline { display: inline !important; } .m-only { display: none !important; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: var(--sh-2); }
.skip:focus { left: 12px; }

/* ───────── раскладка ───────── */
.main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); outline: none; }
.app.bare .main { padding-bottom: 0; }
.pad { padding-inline: 16px; max-width: 1200px; margin-inline: auto; }
.narrow { max-width: 720px; }
@media (min-width: 900px) {
  .pad { padding-inline: 32px; }
  .main { padding-bottom: 56px; }
  .narrow { max-width: 760px; }
}
.route { animation: page-in .26s var(--ease) both; }
/* появление (кривые и кадры Brain Motion) */
.in-up { animation: bm-fade-up var(--bm-slow, .42s) var(--bm-ease-out, var(--ease)) var(--d, 0ms) both; }
.in-pop { animation: bm-pop .6s var(--bm-ease, var(--ease)) var(--d, 0ms) both; }
@keyframes page-in { from { opacity: 0; } }

/* заголовок страницы */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 4px; min-height: 56px;
  padding: calc(4px + env(safe-area-inset-top)) 8px 4px; background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tb-title { flex: 1; min-width: 0; padding-inline: 4px; }
.tb-title h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-gap { width: 8px; flex: none; }
.tb-gap + .tb-title h1 { font-size: 26px; letter-spacing: -.02em; }
.tb-act { display: flex; gap: 2px; }
@media (min-width: 900px) {
  .topbar { position: static; max-width: 1200px; margin: 0 auto; padding: 22px 24px 6px; background: none; backdrop-filter: none; }
  .page:has(.narrow) > .topbar { max-width: 776px; }
  .tb-title h1 { font-size: 28px; letter-spacing: -.02em; }
  .tb-gap + .tb-title h1 { font-size: 30px; }
}

.offline { position: sticky; top: 0; z-index: 60; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 6px 12px; background: var(--ink); color: var(--bg); font-size: 13px; }

/* ───────── кнопки ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px;
  border: 1px solid transparent; font-weight: 650; font-size: 15px; line-height: 1.1; text-decoration: none !important; white-space: nowrap;
  cursor: pointer; transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.btn > span { overflow: hidden; text-overflow: ellipsis; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 18px -10px color-mix(in oklab, var(--primary) 80%, transparent); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-soft { background: var(--primary-soft); color: var(--primary-soft-ink); }
.btn-soft:hover { background: color-mix(in oklab, var(--primary-soft) 80%, var(--brand) 12%); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost-danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn-ghost-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: 14px; border-radius: 11px; }
.btn-lg { min-height: 54px; padding: 0 22px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.is-loading > span:not(.spin) { opacity: .8; }
.spin { display: inline-block; width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: lv-spin .7s linear infinite; flex: none; }
@keyframes lv-spin { to { transform: rotate(360deg); } }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); flex: none; text-decoration: none !important; transition: background var(--t) var(--ease); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.glass { background: rgba(255,255,255,.9); color: #17141f; backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.badge { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--badge); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.badge.dot { min-width: 0; width: 10px; height: 10px; padding: 0; top: 1px; right: 10px; border: 2px solid var(--surface); }
.badge.in { position: static; margin-right: 4px; }

/* ───────── скелетоны и картинки ───────── */
.sk { display: block; border-radius: 10px; background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface-3) 50%, var(--surface-2) 60%) 0 0 / 200% 100%; animation: lv-shimmer 1.3s linear infinite; }
@keyframes lv-shimmer { to { background-position: -200% 0; } }
.img { position: relative; overflow: hidden; background: hsl(var(--h, 262) 45% 92%); }
.img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s var(--ease); }
.img.ok img { opacity: 1; }
.img.ph { display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 55% 86%), hsl(calc(var(--h) + 30) 50% 78%)); }
.ph-mark { width: 30%; max-width: 64px; opacity: .55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .img { background: hsl(var(--h, 262) 18% 18%); } :root:not([data-theme="light"]) .img.ph { background: linear-gradient(135deg, hsl(var(--h) 25% 20%), hsl(calc(var(--h) + 30) 25% 14%)); } }
:root[data-theme="dark"] .img { background: hsl(var(--h, 262) 18% 18%); }
:root[data-theme="dark"] .img.ph { background: linear-gradient(135deg, hsl(var(--h) 25% 20%), hsl(calc(var(--h) + 30) 25% 14%)); }

.ava { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.ava-ph { display: inline-grid; place-items: center; font-weight: 700; color: hsl(var(--h) 45% 30%); background: hsl(var(--h) 60% 90%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ava-ph { color: hsl(var(--h) 60% 80%); background: hsl(var(--h) 30% 22%); } }
:root[data-theme="dark"] .ava-ph { color: hsl(var(--h) 60% 80%); background: hsl(var(--h) 30% 22%); }

/* ───────── рейтинг ───────── */
.rating { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.rating.sm { font-size: 13px; }
.rating-star, .star-c { color: var(--star); }
.rating-n { color: var(--muted); font-weight: 400; }
.stars { position: relative; display: inline-block; font-size: var(--s); line-height: 1; letter-spacing: 1px; white-space: nowrap; }
.stars-bg { color: var(--surface-3); }
.stars-fg { position: absolute; inset: 0; width: var(--v); overflow: hidden; color: var(--star); }
.star-input { display: flex; gap: 2px; }
.star-btn { border: 0; background: none; color: var(--surface-3); line-height: 1; padding: 2px; min-width: 48px; min-height: 48px; transition: transform var(--t-fast) var(--ease), color var(--t-fast); }
.star-btn.on { color: var(--star); }
.star-btn:active { transform: scale(.88); }

/* ───────── чипы и метки ───────── */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 14px; font-weight: 550; color: var(--ink-2); white-space: nowrap; flex: none; text-decoration: none !important; }
.chip:hover { border-color: var(--faint); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-reset { color: var(--danger); border-style: dashed; }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--free-ink); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--info-soft); color: var(--info); }

/* ───────── формы ───────── */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field-l { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field-h { font-size: 12px; color: var(--muted); }
.field-err { font-size: 13px; color: var(--danger); }
.input { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px; color: var(--ink); transition: border-color var(--t), box-shadow var(--t); }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 72px; line-height: 1.4; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.has-err .input { border-color: var(--danger); }
.checkline { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 44px; cursor: pointer; }
.checkline input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; flex: none; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; transition: border var(--t-fast); }
.radio.on { border: 6px solid var(--primary); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 13px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-i { min-height: 38px; padding: 0 14px; border: 0; background: transparent; border-radius: 10px; font-weight: 650; color: var(--muted); white-space: nowrap; font-size: 14px; }
.seg-i.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.seg-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 11px; margin-left: 4px; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 999px; border: 0; background: var(--surface-3); flex: none; transition: background var(--t); }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t) var(--ease); }
.switch.on { background: var(--primary); }
.switch.on i { transform: translateX(20px); }
.switch:disabled { opacity: .5; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--info-soft); color: var(--ink); font-size: 14px; margin: 10px 0; }
.notice > .ic { margin-top: 1px; }
.notice.warn { background: var(--warn-soft); }
.notice.err { background: var(--danger-soft); }

/* ───────── листы ───────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(16, 12, 28, .5); animation: lv-fade .2s var(--ease); }
.sheet { position: relative; width: 100%; max-height: 92dvh; background: var(--surface); border-radius: 24px 24px 0 0; display: flex; flex-direction: column;
  box-shadow: var(--sh-3); animation: lv-up .34s var(--bm-ease-out, var(--ease)); padding-bottom: env(safe-area-inset-bottom); outline: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 2px 20px; }
.sheet-head h2 { font-size: 19px; }
.sheet-x { position: absolute; top: 8px; right: 8px; z-index: 2; }
.sheet-body { padding: 8px 20px 20px; overflow: auto; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 20px; border-top: 1px solid var(--line); }
@keyframes lv-fade { from { opacity: 0; } }
@keyframes lv-up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { max-width: 480px; border-radius: 24px; max-height: 86vh; animation-name: lv-pop; }
  .sheet.wide { max-width: 880px; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 14px; }
}
@keyframes lv-pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }

.list { display: flex; flex-direction: column; }
.row-i { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; width: 100%; color: var(--ink); text-decoration: none !important; font-size: 15px; }
.row-i:last-child { border-bottom: 0; }
.row-i.on { color: var(--primary); font-weight: 650; }
.ok-ic { color: var(--primary); }

/* ───────── шапка ПК ───────── */
.hdr { display: none; }
@media (min-width: 900px) {
  .hdr { display: block; position: sticky; top: 0; z-index: 50; height: 64px; background: color-mix(in oklab, var(--bg) 86%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .hdr-in { max-width: 1200px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 32px; }
  .hdr-r { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: none; }
  .hdr-r .icon-btn.on { color: var(--primary); background: var(--primary-soft); }
  .hdr-me { border-radius: 50%; margin: 0 6px; display: block; }
  .hdr-sell { margin-left: 8px; }
  .hdr-city { flex: none; max-width: 190px; }
}
@media (min-width: 900px) and (max-width: 1080px) { .hdr-sell > span:last-child { display: none; } .hdr-sell { padding: 0 11px; } }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -.02em; text-decoration: none !important; flex: none; }
.mark-ink { fill: var(--brand); }

/* ───────── нижнее меню телефона ───────── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px 4px env(safe-area-inset-bottom); background: color-mix(in oklab, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none !important; border-radius: 14px; }
.tab-ic { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; transition: background var(--t) var(--ease); }
.tab.on { color: var(--primary); }
.tab.on .tab-ic { background: var(--primary-soft); }
.tab:active .tab-ic { transform: scale(.92); }
.tab-ic .badge { top: -3px; right: 2px; }
.tab-sell { color: var(--primary); }
.tab-plus { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 14px -6px var(--primary); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ───────── цена, метки статуса ───────── */
.price { font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.price.free { color: var(--free-ink); }
.price-old { font-weight: 500; font-size: .8em; color: var(--muted); }
.tag.st { gap: 4px; }
.st-draft { background: var(--st-draft-bg); color: var(--st-draft); }
.st-moderation { background: var(--st-moderation-bg); color: var(--st-moderation); }
.st-active { background: var(--st-active-bg); color: var(--st-active); }
.st-sold { background: var(--st-sold-bg); color: var(--st-sold); }
.st-archived { background: var(--st-archived-bg); color: var(--st-archived); }
.st-rejected { background: var(--st-rejected-bg); color: var(--st-rejected); }
.tag { gap: 4px; }
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag.brand { background: var(--primary-soft); color: var(--primary-soft-ink); }
.rating-none { color: var(--muted); font-size: 13px; }
.notice.ok { background: var(--ok-soft); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }

/* ───────── карточка объявления и сетка ───────── */
.lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) { .lgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 900px) { .lgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1180px) { .lgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.lcard { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--sh-1); transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
@media (hover: hover) { .lcard:hover { box-shadow: var(--sh-2); transform: translateY(-2px); } }
.lcard:has(.stretch:focus-visible) { box-shadow: var(--ring); }
.lcard-ph { position: relative; aspect-ratio: 1 / 1; }
.lcard-ph > .img { position: absolute; inset: 0; }
.lcard.gone .lcard-ph > .img { filter: grayscale(.7); opacity: .75; }
.lcard-n, .lcard-flag { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 999px; }
.lcard-n { left: 8px; bottom: 8px; background: rgba(23, 20, 31, .62); color: #fff; }
.lcard-flag { left: 8px; top: 8px; }
.lcard-flag.free { background: var(--accent); color: #3b2a00; }
/* «Цена снижена»: тёмно-зелёная плашка со светлым текстом в светлой теме (7,3:1) и наоборот в тёмной (10:1) */
.lcard-flag.down { background: var(--free-ink); color: var(--surface); }
.lcard-st { position: absolute; z-index: 2; right: 8px; bottom: 8px; }
.lcard-b { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.lcard-price { font-size: 17px; }
.lcard-t { font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: 0; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-t a { color: inherit; text-decoration: none !important; }
.lcard-t a:focus-visible { box-shadow: none; }
a.stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.lcard-m { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-s { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.lcard-b > .btn, .lcard-b > .row { position: relative; z-index: 2; margin-top: 6px; }
.sk-card { pointer-events: none; }
.sk-card .lcard-b { gap: 8px; }

.fav { position: relative; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.fav.float { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.14); color: #17141f; }
.fav svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: transform var(--t) var(--bm-back, var(--ease)); }
.fav.on svg { fill: #e5484d; stroke: #e5484d; transform: scale(1.08); }

/* объявление строкой */
.lrow { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px; border-radius: 16px; color: var(--ink); text-decoration: none !important; }
a.lrow:hover { background: var(--surface-2); }
.lrow-ph { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.lrow-b { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.lrow-t { font-weight: 600; font-size: 14px; }
.lrow-price { font-size: 14px; }
.lrow-sub { font-size: 12px; color: var(--muted); }

/* продавец строкой и значки доверия */
.sline { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none !important; }
.sline-b { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.sline-n { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 16px; }
.sline-m { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* «был(а) вчера · на Лавочке с октября 2025 · 5 объявлений» — переносится, а не обрезается посреди года */
.sline-m.muted { display: block; white-space: normal; }
.sline-go { color: var(--faint); }
.sbadges { display: inline-flex; gap: 4px; flex: none; flex-wrap: wrap; }
.sbadge { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 12px; font-weight: 600; }
.sb-shop_verified, .sb-trusted { color: var(--free); }
.sb-new, .sb-pro { color: var(--muted); }

/* ───────── город ───────── */
.city-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 80%, transparent); font-weight: 650; font-size: 14px; color: var(--ink); min-width: 0; }
.city-top { display: grid; grid-template-columns: 1fr auto; gap: 8px; position: sticky; top: -8px; z-index: 2; background: var(--surface); padding: 8px 0; margin-top: -8px; }
.city-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 8px 2px; }
.city-list .row-i { padding-inline: 8px; }

/* ───────── разделы, карточки-блоки, меню ───────── */
.page { min-height: 40vh; }
.sec { margin-top: 28px; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 21px; letter-spacing: -.015em; }
.sec-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sec-more { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; font-weight: 650; font-size: 14px; white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin: 12px 0; display: flex; flex-direction: column; gap: 12px; }
.menu { background: var(--surface); border-radius: 20px; border: 1px solid var(--line); overflow: hidden; margin-top: 10px; }
.menu-i { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; text-align: left; color: var(--ink); text-decoration: none !important; font-size: 15px; }
.menu-i:last-child { border-bottom: 0; }
button.menu-i:hover, a.menu-i:hover { background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
.menu-i.static { cursor: default; }
.menu-i > .ic:last-child { color: var(--faint); }
.menu-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.menu-ic.brand { background: var(--primary-soft); color: var(--primary-soft-ink); }
.menu-i .grow { min-width: 0; flex: 1 1 0; }
.menu-h { font-size: 13px; color: var(--muted); margin: 24px 6px 0; font-weight: 700; }

/* ───────── вход ───────── */
.login-in { padding-bottom: 40px; max-width: 460px; }
.login-why-line { margin-bottom: 14px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-grid .btn { min-width: 0; padding: 0 10px; font-size: 14px; }

/* ───────── пусто, ошибки, заглушки ───────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 44px 16px; }
.empty-ic { width: 76px; height: 76px; border-radius: 24px; background: var(--primary-soft); color: var(--primary-soft-ink); display: grid; place-items: center; margin-bottom: 6px; }
.empty h3 { font-size: 19px; }
.empty p { color: var(--muted); max-width: 360px; }
.empty-act { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.nf-mark { display: block; animation: bm-float 4s ease-in-out infinite; }
.stub { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 16px; margin: 16px 0; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 24px; }
.stub p { max-width: 460px; }
.stub code { font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.stub-home { border-style: solid; border-color: var(--line); padding: 44px 16px; background:
  radial-gradient(90% 70% at 100% 0%, color-mix(in oklab, var(--brand) 16%, transparent), transparent 60%),
  radial-gradient(70% 60% at 0% 0%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%), var(--surface); }

/* ───────── тосты Brain Motion — в стиле Лавочки ───────── */
.bm-toasts { bottom: calc(92px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px); }
.bm-toast { font: 600 14px/1.35 var(--font); background: var(--ink); color: var(--bg); border-radius: 14px; text-align: center; }
@media (min-width: 900px) { .bm-toasts { bottom: 28px; } }
.app.bare ~ .bm-toasts, html[data-route^="/chats/"] .bm-toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* лист во весь экран на телефоне (выбор города, фильтры) */
@media (max-width: 699px) { .sheet.full { height: 92dvh; } }

/* ───────── карты Leaflet: карта поиска, мини-карта объявления, выбор места в форме подачи ───────── */
.leaflet-container { font: inherit; }
.leaflet-container .leaflet-control-attribution { background: color-mix(in oklab, var(--surface) 78%, transparent); color: var(--muted); font-size: 10px; }
.leaflet-container .leaflet-control-attribution a { color: var(--muted); }
/* тёмная тема: светлые плитки OpenStreetMap переворачиваем в тёмные, чтобы карта не слепила (точки и кнопки не трогаем) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.7); } }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.7); }
