/* ТБ Маркет v2 — витрина в духе классифайдов: поиск сверху, плитки категорий,
   лента карточек, фильтры шторкой/сайдбаром, закреплённая панель действий.
   Mobile-first; "мобильный" макет = до 860px (как у шапки маркета).
   Всё внутри body.market-v2 — страницы переключаются классом в шаблоне. */

body[data-tbos-module="marketplace"] {
  --mk-bg: #f4f5f7;
  --mk-card: #ffffff;
  --mk-line: #e5e8ee;
  --mk-text: #0f172a;
  --mk-muted: #667085;
  --mk-brand: #2f6bff;
  --mk-brand-soft: #eaf1ff;
  --mk-ok: #12a05c;
  --mk-radius: 14px;
}
body.market-v2 {
  background: var(--mk-bg) !important;
  color: var(--mk-text);
}
body.market-v2 .market-bg,
body.market-v2:not(.market-filters-open)::before,
body.market-v2::after { display: none !important; }
body.market-v2 .market-shell,
body.market-v2 .market-shell-market {
  width: 100% !important;
  max-width: none !important;
  padding: 0 0 40px !important;
}
.mk-wrap { width: min(1280px, calc(100% - 24px)); margin: 0 auto; }

/* ── Кнопки, чипы, заголовки ───────────────────────────────────────── */
.mk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
body.market-v2 .mk-btn--primary { background: var(--mk-brand); color: #fff !important; }
body.market-v2 .mk-btn--primary:hover { filter: brightness(1.06); }
body.market-v2 .mk-btn--ghost { background: #fff; border-color: var(--mk-line); color: var(--mk-text); }
body.market-v2 .mk-btn--light { background: #fff; color: var(--mk-brand); box-shadow: 0 6px 18px rgba(47, 107, 255, .18); }
body.market-v2 
.mk-chip {
  display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--mk-line); border-radius: 999px; background: #fff;
  color: var(--mk-text); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
body.market-v2 .mk-chip { color: var(--mk-text); }
body.market-v2 .mk-chip.is-active { background: var(--mk-text); border-color: var(--mk-text); color: #fff; }

.mk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.mk-head h1, .mk-head h2 { margin: 0; font-size: 1.15rem; line-height: 1.2; font-weight: 800; }
body.market-v2 .mk-head a, .mk-head span { color: var(--mk-brand); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.mk-head--results span { color: var(--mk-muted); font-weight: 500; }

.mk-tag { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: #f1f3f7; color: var(--mk-muted); font-size: .7rem; font-weight: 600; }
.mk-tag--ok { background: #e6f6ee; color: var(--mk-ok); }

.mk-empty { grid-column: 1 / -1; padding: 36px 20px; border: 1px dashed var(--mk-line); border-radius: var(--mk-radius); background: #fff; text-align: center; }
.mk-empty p { margin: 6px 0 16px; color: var(--mk-muted); }
.mk-empty__actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ── Карточка объявления ───────────────────────────────────────────── */
.mk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mk-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); overflow: hidden;
}
.mk-card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: #eef1f6; overflow: hidden; }
.mk-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mk-card__media.is-fallback img { object-fit: contain; padding: 12%; }
.mk-card__count {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 8px;
  background: rgba(15, 23, 42, .62); color: #fff; font-size: .72rem; font-weight: 700;
}
.mk-card__fav { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.mk-card__fav, .mk-card__fav.tbm-favorite-btn, .mk-card__fav .tbm-favorite-btn {
  width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%;
  display: inline-grid; place-items: center; background: rgba(255, 255, 255, .92);
  color: #4a5568; font-size: 1.15rem; line-height: 1; text-decoration: none; box-shadow: 0 2px 8px rgba(15, 23, 42, .16); cursor: pointer;
}
.mk-card__fav .tbm-favorite-btn.is-active, .mk-card__fav.is-active { color: #e5384f; }
.mk-card__body { display: grid; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
body.market-v2 .mk-card__price { color: var(--mk-text); font-size: 1.08rem; font-weight: 800; text-decoration: none; }
.mk-card__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .92rem; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere;
}
body.market-v2 .mk-card__title { color: var(--mk-text); }
body.market-v2 .mk-card__title:hover { color: var(--mk-brand); }
.mk-card__desc { display: none; margin: 2px 0 4px; color: var(--mk-muted); font-size: .86rem; line-height: 1.4; }
.mk-card__meta { display: flex; flex-direction: column; gap: 1px; color: var(--mk-muted); font-size: .78rem; }
.mk-card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* Режим «список» (каталог): фото слева, текст справа */
.mk-grid[data-catalog-view="list"] { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.mk-grid[data-catalog-view="list"] .mk-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); }
.mk-grid[data-catalog-view="list"] .mk-card__media { aspect-ratio: auto; height: 100%; min-height: 128px; }
.mk-grid[data-catalog-view="list"] .mk-card__fav { top: 6px; right: 6px; }

/* ── Главная ───────────────────────────────────────────────────────── */
.market-product-switch-form { margin: 0; }
.market-product-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 13px;
  border: 1px solid #d8e2f3; border-radius: 12px; background: #f7faff; color: #244064; font: inherit;
  font-size: .84rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.market-product-switch:hover { border-color: var(--mk-brand); background: var(--mk-brand-soft); color: var(--mk-brand); }
.market-product-switch:focus-visible { outline: 3px solid rgba(47, 107, 255, .25); outline-offset: 2px; }

.mk-home-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 30px;
  min-height: 390px; margin-top: 18px; padding: clamp(28px, 5vw, 62px); overflow: hidden;
  border: 1px solid #dce5f6; border-radius: 28px;
  background: radial-gradient(circle at 84% 18%, rgba(255, 213, 128, .42), transparent 26%),
              radial-gradient(circle at 66% 92%, rgba(135, 225, 194, .32), transparent 28%),
              linear-gradient(135deg, #f7faff 0%, #edf4ff 52%, #f8fff9 100%);
}
.mk-home-hero::before {
  content: ""; position: absolute; inset: auto auto -85px -75px; width: 220px; height: 220px; border-radius: 50%;
  border: 42px solid rgba(47, 107, 255, .06); pointer-events: none;
}
.mk-home-hero__copy { position: relative; z-index: 2; align-self: center; min-width: 0; }
.mk-home-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); color: #315e45; font-size: .82rem; font-weight: 800; box-shadow: 0 6px 18px rgba(44, 73, 116, .08);
}
.mk-home-hero h1 { max-width: 760px; margin: 16px 0 12px; font-size: clamp(2rem, 4vw, 3.65rem); line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.mk-home-hero h1 em { color: var(--mk-brand); font-style: normal; }
.mk-home-hero__copy > p { max-width: 680px; margin: 0; color: #526176; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.55; }
.mk-home-hero__search {
  grid-template-columns: minmax(0, 1fr) 180px auto; max-width: 820px; margin-top: 24px; padding: 8px;
  border: 1px solid rgba(194, 207, 228, .9); border-radius: 17px; background: rgba(255, 255, 255, .94); box-shadow: 0 18px 42px rgba(43, 73, 120, .12);
}
.mk-home-hero__search .mk-search__field, .mk-home-hero__search .mk-search__select { border: 0; background: transparent; }
.mk-home-hero__search .mk-search__field { border-right: 1px solid var(--mk-line); border-radius: 0; }
.mk-home-hero__links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; }
.mk-home-hero__links a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: #34445a; font-size: .88rem; font-weight: 700; text-decoration: none; }
.mk-home-hero__links a:hover { color: var(--mk-brand); }
.mk-home-hero__visual { position: relative; min-height: 270px; align-self: stretch; }
.mk-home-hero__orb {
  position: absolute; inset: 50% auto auto 52%; display: grid; place-items: center; width: 172px; height: 172px;
  border: 18px solid rgba(255, 255, 255, .72); border-radius: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  background: linear-gradient(145deg, #2f6bff, #6b8eff); color: #fff; font-size: 3.35rem; font-weight: 900;
  letter-spacing: -.08em; box-shadow: 0 26px 60px rgba(47, 107, 255, .28);
}
.mk-home-float {
  position: absolute; z-index: 2; display: grid; grid-template-columns: 46px auto; grid-template-rows: auto auto; column-gap: 10px;
  min-width: 158px; padding: 10px 12px; border: 1px solid rgba(215, 225, 240, .9); border-radius: 17px;
  background: rgba(255, 255, 255, .94); box-shadow: 0 14px 30px rgba(45, 70, 107, .13);
}
.mk-home-float .mk-ph { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 13px; }
.mk-home-float b { align-self: end; font-size: .9rem; }
.mk-home-float small { align-self: start; color: var(--mk-muted); font-size: .72rem; }
.mk-home-float--one { top: 7%; left: -2%; }
.mk-home-float--two { top: 55%; right: -4%; }
.mk-home-float--three { bottom: 0; left: 0; }
.mk-home-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; }
.mk-home-trust article { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; border: 1px solid var(--mk-line); border-radius: 16px; background: #fff; color: var(--mk-brand); }
.mk-home-trust span { display: grid; min-width: 0; }
.mk-home-trust strong { color: var(--mk-text); font-size: .9rem; }
.mk-home-trust small { color: var(--mk-muted); font-size: .76rem; }
.mk-search { display: none; margin-top: 16px; padding: 24px; border: 1px solid var(--mk-line); border-radius: 18px; background: #fff; }
.mk-search__title { margin: 0 0 14px; font-size: 1.6rem; line-height: 1.15; font-weight: 800; }
.mk-search__form { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 10px; }
.mk-search__field, .mk-search__select {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px;
  border: 1.5px solid var(--mk-line); border-radius: 12px; background: #fff; min-width: 0;
}
.mk-search__field:focus-within, .mk-search__select:focus-within { border-color: var(--mk-brand); }
body.market-v2 .mk-search__field input,
body.market-v2 .mk-search__select select {
  width: 100%; min-width: 0; min-height: 0 !important; padding: 0 !important; border: 0 !important; outline: 0; box-shadow: none !important; background: transparent !important; color: var(--mk-text); font: inherit;
}
.mk-search__field span { color: var(--mk-muted); }

.mk-cats { display: flex; gap: 12px; margin: 14px 0 0; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.mk-cats::-webkit-scrollbar { display: none; }
.mk-cat { flex: 0 0 76px; display: grid; justify-items: center; gap: 6px; color: var(--mk-text); text-decoration: none; text-align: center; scroll-snap-align: start; }
.mk-cat__pic { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--mk-brand-soft); overflow: hidden; }
.mk-cat__pic img { width: 100%; height: 100%; object-fit: cover; }
.mk-cat strong { font-size: .74rem; line-height: 1.15; font-weight: 700; }
.mk-cat small { display: none; color: var(--mk-muted); font-size: .76rem; }

.mk-promo {
  position: relative; display: flex; align-items: center; min-height: 150px; margin-top: 14px; padding: 18px 16px;
  border-radius: 18px; overflow: hidden; background: linear-gradient(120deg, #eef3ff, #f7f9ff);
  border: 1px solid #dbe6ff;
}
.mk-promo::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 46%;
  background: url("/static/img/market-lite/promo-mascot.webp") right bottom / auto 118% no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%); mask-image: linear-gradient(90deg, transparent, #000 28%);
}
.mk-promo__copy { position: relative; z-index: 1; display: grid; gap: 8px; justify-items: start; max-width: 62%; }
.mk-promo__badge { padding: 3px 10px; border-radius: 999px; background: var(--mk-brand); color: #fff; font-size: .72rem; font-weight: 800; }
.mk-promo h2 { margin: 0; font-size: 1.1rem; line-height: 1.15; font-weight: 800; }
.mk-promo p { display: none; margin: 0; color: var(--mk-muted); }
.mk-promo .mk-btn { min-height: 38px; padding: 0 14px; font-size: .85rem; }

.mk-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.mk-stats article { padding: 14px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
.mk-stats strong { display: block; font-size: 1.4rem; font-weight: 800; }
.mk-stats span { color: var(--mk-muted); font-size: .84rem; }

.mk-perks__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mk-perks__grid article { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
.mk-perks__grid i { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 6px; border-radius: 12px; background: var(--mk-brand-soft); color: var(--mk-brand); font-style: normal; }
.mk-perks__grid strong { font-size: .95rem; }
.mk-perks__grid span { color: var(--mk-muted); font-size: .84rem; line-height: 1.35; }
.mk-steps { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.mk-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; font-size: .9rem; }
.mk-steps b { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--mk-brand-soft); color: var(--mk-brand); }

/* ── Каталог ───────────────────────────────────────────────────────── */
.mk-search--compact { display: none; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; margin-top: 16px; }
.mk-chips { display: flex; gap: 8px; margin-top: 12px; padding: 2px 2px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.mk-chips::-webkit-scrollbar, .mk-bar__sorts::-webkit-scrollbar { display: none; }
.mk-chips .mk-chip { scroll-snap-align: start; }

.mk-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-width: 0; }
.mk-bar__filters {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--mk-line); border-radius: 999px; background: #fff; color: var(--mk-text); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
}
.mk-bar__sorts { display: flex; flex: 1 1 auto; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mk-bar__view { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--mk-line); border-radius: 10px; overflow: hidden; background: #fff; }
.mk-bar__view button { width: 40px; height: 36px; border: 0; background: transparent; color: var(--mk-muted); font-size: 1rem; cursor: pointer; }
.mk-bar__view button.is-active { background: var(--mk-text); color: #fff; }

.mk-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 4px; align-items: start; }
.mk-results { min-width: 0; }
.mk-results .mk-head { margin-top: 14px; }

/* Фильтры: оформление панели (позиционирование — ниже и в marketplace-mobile.css) */
body.market-v2 .tbm-catalog-filters-clean {
  padding: 16px; border: 1px solid var(--mk-line); border-radius: 16px; background: #fff; box-shadow: none;
}
body.market-v2 .tbm-catalog-filters-clean__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
body.market-v2 .tbm-catalog-filters-clean__head h2 { margin: 2px 0 0; font-size: 1.15rem; }
body.market-v2 .tbm-catalog-filters-clean__form { display: grid; gap: 12px; }
body.market-v2 .tbm-catalog-filters-clean__form label { display: grid; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--mk-muted); }
body.market-v2 .tbm-catalog-filters-clean__form input:not([type="checkbox"]),
body.market-v2 .tbm-catalog-filters-clean__form select { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--mk-line); border-radius: 10px; background: #fff; color: var(--mk-text); font: inherit; }
body.market-v2 .tbm-catalog-filters-clean__form input:focus,
body.market-v2 .tbm-catalog-filters-clean__form select:focus { border-color: var(--mk-brand); outline: 0; }
body.market-v2 .tbm-catalog-filters-clean__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.market-v2 .tbm-catalog-filters-clean__actions { display: grid; gap: 8px; }
body.market-v2 .tbm-catalog-filters-clean__actions .market-btn { min-height: 46px; border-radius: 12px; justify-content: center; }

/* ── Мобильная шапка и нижняя панель (до 860px) ────────────────────── */
@media (max-width: 860px) {
  body[data-tbos-module="marketplace"] { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

  body[data-tbos-module="marketplace"] .tbm-mobile-header {
    position: sticky; top: 0; z-index: 40; margin: 0; padding: 8px 12px; min-height: 58px; gap: 10px;
    border: 0; border-bottom: 1px solid var(--mk-line); border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none;
  }
  body[data-tbos-module="marketplace"] .tbm-mobile-header__burger,
  body[data-tbos-module="marketplace"] .tbm-mobile-header__brand strong,
  body[data-tbos-module="marketplace"] .tbm-mobile-header__actions button { display: none; }
  body[data-tbos-module="marketplace"] .tbm-mobile-header__search {
    position: static; transform: none; opacity: 1; pointer-events: auto; flex: 1 1 auto; min-width: 0; min-height: 44px;
    padding: 0 12px; border: 1.5px solid transparent; border-radius: 12px; background: var(--mk-bg); box-shadow: none;
  }
  body[data-tbos-module="marketplace"] .tbm-mobile-header__search:focus-within { border-color: var(--mk-brand); background: #fff; }
  body[data-tbos-module="marketplace"] .tbm-mobile-header__search input {
    min-height: 0 !important; height: 40px; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; font-size: 16px !important;
  }
  body[data-tbos-module="marketplace"] .tbm-mobile-header__actions a {
    width: 40px; height: 40px; border: 0; background: transparent; color: var(--mk-text); text-decoration: none; font-size: 1.4rem;
  }
  body[data-tbos-module="marketplace"] .tbm-mobile-header__actions form { margin: 0; }
  body[data-tbos-module="marketplace"] .tbm-mobile-header__actions .tbm-mobile-header__crm {
    display: inline-grid; place-items: center; width: 44px; height: 40px; min-height: 40px; padding: 0; border: 1px solid #d8e2f3;
    border-radius: 11px; background: #f7faff; color: #244064; font: inherit; font-size: .72rem; font-weight: 900; text-decoration: none;
  }

  .mk-home-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; margin-top: 10px; padding: 24px 18px; border-radius: 22px; }
  .mk-home-hero h1 { font-size: clamp(1.85rem, 9vw, 2.55rem); }
  .mk-home-hero__copy > p { font-size: .96rem; }
  .mk-home-hero__search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 20px; padding: 8px; }
  .mk-home-hero__search .mk-search__field { border-right: 0; border-bottom: 1px solid var(--mk-line); border-radius: 0; }
  .mk-home-hero__search .mk-search__select { display: none; }
  .mk-home-hero__search .mk-btn { width: 100%; }
  .mk-home-hero__visual { display: none; }
  .mk-home-hero__links { gap: 8px 14px; }
  .mk-home-trust { grid-template-columns: minmax(0, 1fr); }

  /* плавающие кнопки компактнее, чтобы не закрывать карточки */
  body[data-tbos-module="marketplace"] .market-community-chat__toggle,
  body[data-tbos-module="marketplace"] .market-ai-concierge__toggle { width: 44px; height: 44px; min-height: 44px; }
  body[data-tbos-module="marketplace"] .market-ai-concierge { bottom: calc(var(--mkt-float-bottom, 88px) + 52px); }

  body[data-tbos-module="marketplace"] .market-mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; display: grid !important; grid-template-columns: repeat(5, 1fr); gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); border: 0 !important; border-top: 1px solid var(--mk-line) !important;
    border-radius: 0; background: #fff !important; box-shadow: 0 -4px 18px rgba(15, 23, 42, .06) !important; backdrop-filter: none;
  }
  body[data-tbos-module="marketplace"] .market-mobile-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-height: 52px; padding: 2px 0;
    border: 0 !important; border-radius: 0; background: none !important; color: var(--mk-muted) !important; font-size: .68rem; font-weight: 600; text-decoration: none;
  }
  body[data-tbos-module="marketplace"] .market-mobile-bar a i { font-style: normal; font-size: 1.3rem; line-height: 1; }
  body[data-tbos-module="marketplace"] .market-mobile-bar a.is-active { color: var(--mk-brand) !important; }
  body[data-tbos-module="marketplace"] .market-mobile-bar a.is-primary { color: var(--mk-text) !important; }
  body[data-tbos-module="marketplace"] .market-mobile-bar a.is-primary i {
    display: grid; place-items: center; width: 42px; height: 42px; margin-top: -16px; border-radius: 50%;
    background: var(--mk-brand); color: #fff; font-size: 1.6rem; box-shadow: 0 6px 16px rgba(47, 107, 255, .4);
  }

  /* пока открыта шторка фильтров — панель навигации не должна её перекрывать */
  body.market-filters-open[data-tbos-module="marketplace"] .market-mobile-bar { display: none !important; }

  /* на каталоге фильтры уходят в шторку — отдельная липкая панель не нужна */
  body.market-v2 .tbm-catalog-mobile-actions { display: none !important; }
}

/* ── Планшет и десктоп ─────────────────────────────────────────────── */
@media (min-width: 640px) { .mk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }

@media (min-width: 861px) {
  .mk-search { display: block; }
  .mk-search--compact { display: grid; }
  .mk-bar__filters { display: none; }
  .mk-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; overflow: visible; padding: 0; margin-top: 16px; }
  .mk-cat {
    flex: initial; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 0; align-items: center; justify-items: start; text-align: left;
    padding: 12px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff;
  }
  .mk-cat:hover { border-color: var(--mk-brand); }
  .mk-cat__pic { grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 14px; }
  .mk-cat strong { font-size: .95rem; align-self: end; }
  .mk-cat small { display: block; align-self: start; }
  .mk-promo { min-height: 190px; padding: 28px 32px; }
  .mk-promo::after { width: 42%; }
  .mk-promo__copy { max-width: 50%; gap: 10px; }
  .mk-promo h2 { font-size: 1.7rem; }
  .mk-promo p { display: block; }
  .mk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-perks__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .mk-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
  body.market-v2 .tbm-catalog-filters-clean {
    position: sticky; inset: auto; top: 88px; z-index: 1; max-height: calc(100dvh - 104px); overflow-y: auto;
    visibility: visible; transform: none; transition: none; box-shadow: none;
  }
  body.market-v2 .tbm-catalog-filters-clean .market-sidebar-close { display: none; }

  .mk-grid[data-catalog-view="list"] .mk-card { grid-template-columns: 240px minmax(0, 1fr); }
  .mk-grid[data-catalog-view="list"] .mk-card__media { min-height: 170px; }
  .mk-grid[data-catalog-view="list"] .mk-card__body { padding: 14px 18px; gap: 5px; }
  .mk-grid[data-catalog-view="list"] .mk-card__title { font-size: 1.05rem; -webkit-line-clamp: 2; }
  .mk-grid[data-catalog-view="list"] .mk-card__price { font-size: 1.25rem; order: -1; }
  .mk-grid[data-catalog-view="list"] .mk-card__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mk-grid[data-catalog-view="grid"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-feed .mk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .mk-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .mk-feed .mk-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mk-grid[data-catalog-view="grid"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .mk-cats, .mk-chips { scroll-behavior: auto; }
}

/* ── Страница объявления ───────────────────────────────────────────── */
body.market-v2--ad .tbm-listing-hero,
body.market-v2--ad .tbm-listing-section,
body.market-v2--ad .tbm-listing-sidebar-card,
body.market-v2--ad .tbm-listing-seller,
body.market-v2--ad .tbm-listing-live,
body.market-v2--ad .tbm-listing-price,
body.market-v2--ad .tbm-listing-gallery-card {
  background: #fff; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); box-shadow: none; backdrop-filter: none;
}
body.market-v2--ad .tbm-listing-hero h1 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.25; font-weight: 800; color: var(--mk-text); }
body.market-v2--ad .tbm-listing-hero__eyebrow { display: none; }
body.market-v2--ad .tbm-listing-hero__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--mk-muted); font-size: .84rem; }
body.market-v2--ad .tbm-listing-hero__meta span {
  min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; font-size: .84rem !important; color: var(--mk-muted);
}
body.market-v2--ad .tbm-listing-hero__meta .is-online { color: var(--mk-ok); }
body.market-v2--ad .tbm-listing-hero__meta .is-verified { color: var(--mk-ok); font-weight: 700; }
body.market-v2--ad .tbm-listing-breadcrumbs { color: var(--mk-muted); font-size: .84rem; }
body.market-v2--ad .tbm-listing-breadcrumbs a { color: var(--mk-muted); }

body.market-v2--ad .tbm-listing-price__top { display: grid; gap: 2px; }
body.market-v2--ad .tbm-listing-price__top strong { font-size: 1.8rem; line-height: 1.1; font-weight: 800; color: var(--mk-text); }
body.market-v2--ad .tbm-listing-price__top small { color: var(--mk-muted); }
body.market-v2--ad .tbm-listing-price__facts,
body.market-v2--ad .tbm-listing-gallery__tags { display: none; }

body.market-v2--ad .tbm-listing-section__head h2 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; }
body.market-v2--ad .tbm-listing-description p { margin: 0; color: var(--mk-text); line-height: 1.55; white-space: pre-line; }
body.market-v2--ad .tbm-listing-params { display: grid; gap: 0; margin: 14px 0 0; }
body.market-v2--ad .tbm-listing-params div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--mk-line); }
body.market-v2--ad .tbm-listing-params dt { color: var(--mk-muted); font-weight: 500; }
body.market-v2--ad .tbm-listing-params dd { margin: 0; font-weight: 600; text-align: right; }

body.market-v2--ad .tbm-listing-gallery__stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--mk-radius) var(--mk-radius) 0 0; background: #eef1f6; }
body.market-v2--ad .tbm-listing-gallery__image { width: 100%; height: 100%; object-fit: cover; }
body.market-v2--ad .tbm-listing-gallery__fallback img { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
body.market-v2--ad .tbm-listing-gallery__fallback strong,
body.market-v2--ad .tbm-listing-gallery__fallback small { display: none; }
body.market-v2--ad .tbm-listing-gallery__thumbs { padding: 10px; }

body.market-v2--ad .tbm-listing-mobile-cta { display: none; }

/* мобильный макет: блоки идут в порядке покупательского решения */
@media (max-width: 860px) {
  body.market-v2--ad { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  body.market-v2--ad .market-mobile-bar { display: none !important; }
  body.market-v2--ad .tbm-listing-page { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: none; margin: 0; padding: 0; }
  body.market-v2--ad .tbm-listing-layout,
  body.market-v2--ad .tbm-listing-main,
  body.market-v2--ad .tbm-listing-sidebar { display: contents; }
  body.market-v2--ad .tbm-listing-breadcrumbs { display: none; }

  body.market-v2--ad .tbm-listing-hero,
  body.market-v2--ad .tbm-listing-section,
  body.market-v2--ad .tbm-listing-sidebar-card,
  body.market-v2--ad .tbm-listing-seller,
  body.market-v2--ad .tbm-listing-live,
  body.market-v2--ad .tbm-listing-price { margin: 0; padding: 14px 16px; border: 0; border-radius: 0; }
  body.market-v2--ad .tbm-listing-gallery-card { margin: 0; padding: 0; border: 0; border-radius: 0; }
  body.market-v2--ad .tbm-listing-gallery__stage { border-radius: 0; }
  body.market-v2--ad .tbm-listing-gallery__thumbs { display: none; }

  body.market-v2--ad .tbm-listing-gallery-card { order: 1; }
  body.market-v2--ad .tbm-listing-price { order: 2; padding-bottom: 4px; }
  body.market-v2--ad .tbm-listing-hero { order: 3; padding-top: 4px; }
  body.market-v2--ad .tbm-listing-main > :nth-child(2) { order: 4; }
  body.market-v2--ad .tbm-listing-seller { order: 5; }
  body.market-v2--ad .tbm-listing-contact-card { order: 6; }
  body.market-v2--ad .tbm-listing-message-card { order: 7; }
  body.market-v2--ad .tbm-listing-main > :nth-child(n+3) { order: 8; }
  body.market-v2--ad .tbm-listing-safety-card { order: 20; }
  body.market-v2--ad .tbm-listing-live { order: 21; }

  body.market-v2--ad .tbm-listing-mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--mk-line);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, .06);
  }
  body.market-v2--ad .tbm-listing-mobile-cta .market-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; border: 0; font-weight: 700; text-decoration: none; }
  body.market-v2--ad .tbm-listing-mobile-cta a.market-btn.primary { background: var(--mk-brand) !important; color: #fff !important; }
  body.market-v2--ad .tbm-listing-mobile-cta a.market-btn.ghost { background: var(--mk-ok) !important; color: #fff !important; border: 0 !important; }
  body.market-v2--ad .tbm-listing-glass-badge { display: none; }

  /* поднимаем плавающие кнопки над закреплённой панелью */
  body.market-v2--ad { --mkt-float-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}

@media (min-width: 861px) {
  body.market-v2--ad .tbm-listing-page { width: min(1280px, calc(100% - 24px)); margin: 16px auto 0; }
  body.market-v2--ad .tbm-listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
  body.market-v2--ad .tbm-listing-main { display: grid; gap: 16px; min-width: 0; }
  body.market-v2--ad .tbm-listing-sidebar { display: grid; gap: 12px; position: sticky; top: 88px; }
  body.market-v2--ad .tbm-listing-hero,
  body.market-v2--ad .tbm-listing-section,
  body.market-v2--ad .tbm-listing-sidebar-card,
  body.market-v2--ad .tbm-listing-seller,
  body.market-v2--ad .tbm-listing-live,
  body.market-v2--ad .tbm-listing-price { padding: 18px 20px; }
  body.market-v2--ad .tbm-listing-hero { margin-bottom: 14px; }
  body.market-v2--ad .tbm-listing-breadcrumbs { margin: 14px 0 10px; }
  body.market-v2--ad .tbm-listing-gallery__stage { aspect-ratio: 16 / 10; max-height: 520px; }
  body.market-v2--ad .tbm-listing-gallery-card { padding: 0; overflow: hidden; }
}

/* ── Подача объявления ─────────────────────────────────────────────── */
.mk-create__head h1 { margin: 18px 0 4px; font-size: 1.45rem; line-height: 1.2; font-weight: 800; }
.mk-create__head p { margin: 0 0 14px; color: var(--mk-muted); }
.mk-create__grid { display: grid; gap: 12px; align-items: start; }
.mk-create__form { display: grid; gap: 12px; min-width: 0; }
.mk-step { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
.mk-step legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; padding: 0; margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; }
.mk-step legend + * { clear: both; }
.mk-step legend b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--mk-brand-soft); color: var(--mk-brand); font-size: .85rem; }
.mk-field { display: grid; gap: 6px; min-width: 0; }
.mk-field > span { color: var(--mk-muted); font-size: .8rem; font-weight: 700; }
body.market-v2 .mk-field input,
body.market-v2 .mk-field select,
body.market-v2 .mk-field textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--mk-line); border-radius: 10px;
  background: #fff !important; color: var(--mk-text); font: inherit; font-size: 16px;
}
body.market-v2 .mk-field textarea { min-height: 130px; padding: 12px; resize: vertical; }
body.market-v2 .mk-field input:focus,
body.market-v2 .mk-field select:focus,
body.market-v2 .mk-field textarea:focus { border-color: var(--mk-brand); outline: 0; }
.mk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mk-ai { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-ai .mk-btn { min-height: 40px; padding: 0 14px; font-size: .85rem; }

body.market-v2--create .tbm-upload-card { display: grid; gap: 10px; padding: 0; border: 0; background: none; box-shadow: none; }
body.market-v2--create .tbm-upload-dropzone {
  display: grid; place-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed #c3d3fa; border-radius: var(--mk-radius);
  background: #f6f9ff; color: var(--mk-text); text-align: center; cursor: pointer;
}
body.market-v2--create .tbm-upload-icon { font-size: 1.6rem; }
body.market-v2--create .tbm-upload-dropzone small { color: var(--mk-muted); }

.mk-create__actions { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }
.mk-create__preview { display: none; }

@media (max-width: 860px) {
  body.market-v2--create { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  body.market-v2--create .market-mobile-bar { display: none !important; }
  .mk-create__actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid var(--mk-line); box-shadow: 0 -4px 18px rgba(15, 23, 42, .06);
  }
  .mk-create__actions .mk-btn { min-height: 48px; }
  body.market-v2--create { --mkt-float-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 861px) {
  .mk-create__grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
  .mk-create__preview { display: block; position: sticky; top: 88px; padding: 16px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
  .mk-create__actions { grid-template-columns: auto auto; justify-content: start; }
}

/* ── Кабинет и избранное ───────────────────────────────────────────── */
.mk-head--page { margin-top: 18px; }
.mk-head--page h1 { font-size: 1.45rem; }
.mk-muted { color: var(--mk-muted); }
.mk-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }

.mk-profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 16px; padding: 16px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
.mk-profile__avatar { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--mk-brand-soft); color: var(--mk-brand); font-size: 1.2rem; font-weight: 800; }
.mk-profile__info { min-width: 0; }
.mk-profile__info h1 { margin: 0; font-size: 1.2rem; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.mk-profile__info p { margin: 2px 0 6px; color: var(--mk-muted); font-size: .88rem; }
.mk-profile__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-profile__cta { grid-column: 1 / -1; }

.mk-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
body.market-v2 .mk-kpis a { display: grid; gap: 2px; padding: 12px 8px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; text-align: center; text-decoration: none; color: var(--mk-text); }
.mk-kpis strong { font-size: 1.2rem; font-weight: 800; }
.mk-kpis span { color: var(--mk-muted); font-size: .72rem; }

.mk-cabinet__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
.mk-cabinet__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.mk-cabinet__main > section { min-width: 0; }
.mk-menu { border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; overflow: hidden; }
body.market-v2 .mk-menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--mk-line); color: var(--mk-text); font-weight: 600; text-decoration: none; }
body.market-v2 .mk-menu a:last-child { border-bottom: 0; }
.mk-menu a i { color: var(--mk-muted); font-style: normal; font-size: 1.3rem; }
body.market-v2 .mk-menu a.is-active { color: var(--mk-brand); }

.mk-chip__n { margin-left: 6px; opacity: .6; font-weight: 500; }
.mk-my-ads { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.mk-my-ad { display: grid; grid-template-columns: 76px minmax(0, 1fr); min-width: 0; gap: 12px; padding: 12px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
.mk-my-ad--archived, .mk-my-ad--deleted { opacity: .72; }
.mk-my-ad__pic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 10px; background: #eef1f6; color: var(--mk-muted); font-size: 1.4rem; font-weight: 800; overflow: hidden; text-decoration: none; }
.mk-my-ad__pic img { width: 100%; height: 100%; object-fit: cover; }
.mk-my-ad__body { display: grid; gap: 3px; min-width: 0; align-content: start; }
body.market-v2 .mk-my-ad__title { color: var(--mk-text); font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.mk-my-ad__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--mk-muted); font-size: .84rem; }
.mk-my-ad__meta strong { color: var(--mk-text); }
.mk-my-ad__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.mk-my-ad__actions form { margin: 0; }
.mk-my-ad__actions .mk-btn { min-height: 38px; padding: 0 12px; font-size: .84rem; }
.mk-btn--danger { color: #d92d20; }
.mk-status { justify-self: start; padding: 2px 8px; border-radius: 6px; background: #f1f3f7; color: var(--mk-muted); font-size: .7rem; font-weight: 700; }
.mk-status--published { background: #e6f6ee; color: var(--mk-ok); }
.mk-status--moderation { background: #fff4e0; color: #b25e09; }
.mk-status--draft { background: var(--mk-brand-soft); color: var(--mk-brand); }

.mk-reviews { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.mk-review { padding: 14px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
.mk-review__top { display: flex; justify-content: space-between; gap: 12px; }
.mk-review p { margin: 6px 0; line-height: 1.5; }
.mk-review small { color: var(--mk-muted); }
.mk-notes { display: grid; gap: 8px; }
body.market-v2 .mk-notes a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; color: var(--mk-text); text-decoration: none; }
.mk-notes small { color: var(--mk-muted); }

@media (min-width: 861px) {
  .mk-profile { grid-template-columns: auto minmax(0, 1fr) auto; padding: 22px; }
  .mk-profile__cta { grid-column: auto; }
  .mk-kpis { gap: 12px; }
  .mk-cabinet__grid { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
  .mk-menu { position: sticky; top: 88px; }
  .mk-my-ad { grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; }
  .mk-my-ad__pic { width: 88px; height: 88px; }
  .mk-my-ad__actions { grid-column: auto; justify-content: flex-end; max-width: 360px; }
}
@media (max-width: 860px) {
  body.market-v2--cabinet .mk-menu { order: 2; }
  body.market-v2--cabinet .mk-cabinet__main { order: 1; }
}

/* ── Вход ──────────────────────────────────────────────────────────── */
.mk-auth { display: grid; place-items: start center; padding-top: 24px; }
.mk-auth__card { width: min(440px, 100%); padding: 24px 20px; border: 1px solid var(--mk-line); border-radius: 18px; background: #fff; }
.mk-auth__card h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; }
.mk-auth__lead { margin: 0 0 18px; color: var(--mk-muted); line-height: 1.45; }
.mk-auth__form { display: grid; gap: 14px; }
.mk-auth__form .mk-btn { width: 100%; min-height: 50px; margin-top: 4px; }
.mk-auth__alt { margin: 16px 0 0; text-align: center; color: var(--mk-muted); }
body.market-v2 .mk-auth__alt a { color: var(--mk-brand); font-weight: 700; text-decoration: none; }
.mk-auth__flash { margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #b42318; font-size: .9rem; }

/* ── Регистрация (JS-мастер .reg-*; разметка и хуки не менялись) ───── */
body.market-v2--register .reg-page {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
  width: min(1100px, calc(100% - 24px)); margin: 16px auto 0; padding: 0; background: none;
}
body.market-v2--register .reg-card { order: 1; }
body.market-v2--register .reg-trust { order: 2; }
body.market-v2--register .reg-card,
body.market-v2--register .reg-trust {
  min-width: 0; padding: 18px 16px; border: 1px solid var(--mk-line); border-radius: 18px; background: #fff !important;
  box-shadow: none; backdrop-filter: none; color: var(--mk-text);
}
body.market-v2--register .reg-card__head h1 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 800; color: var(--mk-text); }
body.market-v2--register .reg-card__head p,
body.market-v2--register .reg-muted,
body.market-v2--register .reg-trust__lead,
body.market-v2--register .reg-trust__note { color: var(--mk-muted); }
body.market-v2--register .reg-trust h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--mk-text); }

body.market-v2--register .reg-steps { display: flex; flex-wrap: nowrap; gap: 8px; margin: 14px 0; padding: 2px 0 6px; overflow-x: auto; scrollbar-width: none; }
body.market-v2--register .reg-steps::-webkit-scrollbar { display: none; }
body.market-v2--register .reg-steps button {
  flex: 0 0 auto; min-height: 36px; padding: 0 14px; border: 1px solid var(--mk-line); border-radius: 999px;
  background: #fff; color: var(--mk-muted); font: inherit; font-size: .85rem; font-weight: 600; white-space: nowrap;
}
body.market-v2--register .reg-steps button.is-active { background: var(--mk-text); border-color: var(--mk-text); color: #fff; }

body.market-v2--register .reg-panel h3 { margin: 4px 0 10px; font-size: 1.1rem; color: var(--mk-text); }
body.market-v2--register .reg-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
body.market-v2--register .reg-role {
  display: grid; align-content: start; gap: 4px; padding: 12px; border: 1.5px solid var(--mk-line); border-radius: var(--mk-radius);
  background: #fff; color: var(--mk-text); cursor: pointer;
}
body.market-v2--register .reg-role:has(input:checked) { border-color: var(--mk-brand); background: var(--mk-brand-soft); }
body.market-v2--register .reg-role input { position: absolute; opacity: 0; pointer-events: none; }
body.market-v2--register .reg-role__icon { color: var(--mk-brand); }
body.market-v2--register .reg-role__title { font-weight: 800; }
body.market-v2--register .reg-role__desc { color: var(--mk-muted); font-size: .78rem; line-height: 1.3; }
/* Три основные роли — карточки-строки: на телефоне в две колонки названия обрезались */
body.market-v2--register .reg-roles { grid-template-columns: minmax(0, 1fr); }
body.market-v2--register .reg-role {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: center; text-align: left;
}
body.market-v2--register .reg-role__icon { grid-row: 1 / span 2; }
body.market-v2--register .reg-role__title,
body.market-v2--register .reg-role__desc { grid-column: 2; }
body.market-v2--register .reg-role:not(:has(.reg-role__icon)) { grid-template-columns: minmax(0, 1fr); }
body.market-v2--register .reg-role:not(:has(.reg-role__icon)) .reg-role__title,
body.market-v2--register .reg-role:not(:has(.reg-role__icon)) .reg-role__desc { grid-column: 1; }
body.market-v2--register .reg-more-roles { margin: -4px 0 14px; }
body.market-v2--register .reg-more-roles > summary { cursor: pointer; color: var(--mk-brand); font-weight: 700; padding: 6px 0; }
body.market-v2--register .reg-more-roles .reg-roles { margin-top: 8px; }
@media (min-width: 768px) {
  body.market-v2--register .reg-roles:not(.reg-roles--extra) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.market-v2--register .reg-role { grid-template-columns: minmax(0, 1fr); text-align: left; }
  body.market-v2--register .reg-role__icon { grid-row: auto; }
  body.market-v2--register .reg-role__title, body.market-v2--register .reg-role__desc { grid-column: 1; }
}

body.market-v2--register .reg-fields-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
body.market-v2--register .reg-field { display: grid; gap: 6px; margin-top: 8px; color: var(--mk-muted); font-size: .8rem; font-weight: 700; }
body.market-v2--register .reg-field input:not([type="checkbox"]),
body.market-v2--register .reg-field select,
body.market-v2--register .reg-field textarea {
  width: 100%; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--mk-line); border-radius: 10px; background: #fff !important;
  color: var(--mk-text); font: inherit; font-size: 16px; font-weight: 400;
}
body.market-v2--register .reg-field textarea { padding: 12px; min-height: 100px; }
body.market-v2--register .reg-field input:focus,
body.market-v2--register .reg-field select:focus,
body.market-v2--register .reg-field textarea:focus { border-color: var(--mk-brand); outline: 0; }
body.market-v2--register .reg-error { display: block; min-height: 0; color: #d92d20; font-size: .78rem; }
body.market-v2--register .reg-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; color: var(--mk-text); font-size: .9rem; }
body.market-v2--register .reg-check a { color: var(--mk-brand); }
body.market-v2--register .reg-categories { display: flex; flex-wrap: wrap; gap: 8px; }
body.market-v2--register .reg-cat { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--mk-line); border-radius: 999px; font-size: .85rem; color: var(--mk-text); }

body.market-v2--register [hidden] { display: none !important; }
body.market-v2--register .reg-actions { display: flex; gap: 10px; margin-top: 16px; }
body.market-v2--register .reg-actions__primary { flex: 1 1 auto; display: grid; }
body.market-v2--register .reg-actions .market-btn { min-height: 50px; border-radius: 12px; font-weight: 700; }
body.market-v2--register .reg-login-link { margin: 14px 0 0; text-align: center; }
body.market-v2--register .reg-login-link a { color: var(--mk-brand); font-weight: 700; text-decoration: none; }

body.market-v2--register .reg-trust__benefits { display: grid; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
body.market-v2--register .reg-trust__benefits li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
body.market-v2--register .reg-trust__benefits strong { display: block; color: var(--mk-text); }
body.market-v2--register .reg-trust__benefits span:not(.reg-trust__icon) { color: var(--mk-muted); font-size: .84rem; }

@media (max-width: 860px) {
  body.market-v2--register .market-mobile-bar,
  body.market-v2--auth .market-mobile-bar { display: none !important; }
  body.market-v2--register, body.market-v2--auth { padding-bottom: 24px; }
}
@media (min-width: 861px) {
  body.market-v2--register .reg-page { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
  body.market-v2--register .reg-card { padding: 28px; }
  body.market-v2--register .reg-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  body.market-v2--register .reg-trust { position: sticky; top: 88px; }
}

/* ── Мессенджер: в открытом диалоге панель и плавающие кнопки не нужны ── */
@media (max-width: 860px) {
  body[data-tbos-module="marketplace"]:has(.mmessenger.is-chat-open) .market-mobile-bar,
  body[data-tbos-module="marketplace"]:has(.mmessenger.is-chat-open) .market-ai-concierge,
  body[data-tbos-module="marketplace"]:has(.mmessenger.is-chat-open) .market-community-chat { display: none !important; }
  body[data-tbos-module="marketplace"]:has(.mmessenger.is-chat-open) { padding-bottom: 0; }
}

/* ── Мессенджер: доработка (внешний вид сохранён) ──────────────────── */
/* Поле ввода: UA-шрифт textarea — моноширинный, плюс чужая рамка/фон от общих стилей полей */
body.market-body--messenger .mmessenger-compose textarea {
  font-family: inherit; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0;
  overflow-y: auto; scrollbar-width: none;
}
body.market-body--messenger .mmessenger-compose textarea::-webkit-scrollbar { display: none; }

@media (max-width: 767.98px) {
  /* Список диалогов: страница учитывает новую шапку (58px) и нижнюю панель (76px) */
  body.market-body--messenger:not(:has(.mmessenger.is-chat-open)) .mmessenger-page {
    height: calc(100dvh - 58px - 76px - env(safe-area-inset-bottom, 0px));
  }

  /* Открытый диалог — на весь экран: своя шапка чата вместо шапки сайта */
  body.market-body--messenger:has(.mmessenger.is-chat-open) .tbm-mobile-header { display: none; }
  body.market-body--messenger:has(.mmessenger.is-chat-open) .mmessenger-page { height: 100dvh; padding: 0; }
  body.market-body--messenger .mmessenger.is-chat-open .mmessenger-main { border-radius: 0; border-width: 0; box-shadow: none; }

  /* Шапка чата: назад · аватар · имя/статус · позвонить · инфо · меню.
     «Написать» (якорь на поле ввода) и «Открыть диспут» остаются в меню чата. */
  body.market-body--messenger .mmessenger-chat-head { min-height: 60px; padding: 6px 8px; gap: 6px; }
  body.market-body--messenger .mmessenger-chat-head__user { gap: 8px; min-width: 0; flex: 1 1 auto; }
  body.market-body--messenger .mmessenger-chat-head__avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; font-size: .9rem; }
  body.market-body--messenger .mmessenger-chat-head__identity { min-width: 0; }
  body.market-body--messenger .mmessenger-chat-head__identity strong { display: block; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
  body.market-body--messenger .mmessenger-chat-head__status { font-size: .75rem; white-space: nowrap; }
  body.market-body--messenger .mmessenger-chat-head__actions { flex: 0 0 auto; gap: 4px; margin-left: 0; }
  body.market-body--messenger .mmessenger-chat-head__actions a[href="#mmessengerComposeForm"],
  body.market-body--messenger .mmessenger-chat-head__actions .mmessenger-head-action.is-primary { display: none; }
  body.market-body--messenger .mmessenger-head-action,
  body.market-body--messenger .mmessenger-chat-head__actions .mmessenger-icon-btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; }

  /* «Инфо» уже есть в шапке — плавающая кнопка только перекрывала поле ввода */
  body.market-body--messenger .mmessenger-mobile-info-fab { display: none !important; }
}

/* Список диалогов: строка занимает всю ширину (время не «плавает»), поиск без двойной рамки */
body.market-body--messenger .mmessenger-thread__body { flex: 1 1 auto; min-width: 0; }
body.market-body--messenger .mmessenger-thread__row { width: 100%; justify-content: space-between; }
body.market-body--messenger .mmessenger-search input {
  min-height: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0;
}

/* Десктоп/планшет: средняя колонка чата узкая (между 310px и 360px боковыми) — три подписанные
   кнопки съедали ширину, имя собеседника сжималось до 18px, шапка раздувалась до 217px.
   На средних ширинах кнопки — только иконки, лишние дубли скрыты. */
@media (min-width: 768px) and (max-width: 1560px) {
  body.market-body--messenger .mmessenger-chat-head__user { flex: 1 1 auto; min-width: 0; }
  body.market-body--messenger .mmessenger-chat-head__identity { min-width: 0; }
  body.market-body--messenger .mmessenger-chat-head__identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.market-body--messenger .mmessenger-chat-head__actions { flex: 0 0 auto; gap: 6px; }
  body.market-body--messenger .mmessenger-head-action small { display: none; }
  body.market-body--messenger .mmessenger-head-action,
  body.market-body--messenger .mmessenger-chat-head__actions .mmessenger-icon-btn { width: 40px; min-width: 40px; padding: 0; justify-content: center; }
  body.market-body--messenger .mmessenger-chat-head__actions a[href="#mmessengerComposeForm"] { display: none; }
  body.market-body--messenger .mmessenger-chat-head__meta-line,
  body.market-body--messenger .mmessenger-chat-head__chips { display: none; }
}

/* ── Доступность: видимый фокус с клавиатуры на элементах нового стиля ── */
body[data-tbos-module="marketplace"] :where(
  .mk-btn, .mk-chip, .mk-cat, .mk-card__title, .mk-card__price, .mk-card__fav, .mk-menu a, .mk-kpis a,
  .mk-bar__filters, .mk-bar__view button, .market-mobile-bar a, .tbm-mobile-header a
):focus-visible {
  outline: 2px solid var(--mk-brand);
  outline-offset: 2px;
  border-radius: 10px;
}
body[data-tbos-module="marketplace"] :where(.mk-field input, .mk-field select, .mk-field textarea, .mk-search__field input):focus-visible {
  outline: 2px solid var(--mk-brand);
  outline-offset: 0;
}

/* ── Специалисты (каталог): компактный экран поиска на телефоне ─────── */
@media (max-width: 767.98px) {
  body[data-tbos-module="marketplace"] .spec-page { padding-left: 12px; padding-right: 12px; }
  body[data-tbos-module="marketplace"] .spec-hero { margin: 12px 0 0; padding: 16px 14px; border-radius: 18px; }
  body[data-tbos-module="marketplace"] .spec-hero h1 { margin: 6px 0 12px; font-size: 1.5rem; line-height: 1.15; }
  body[data-tbos-module="marketplace"] .spec-hero__content > p,
  body[data-tbos-module="marketplace"] .spec-hero__visual { display: none; }
  body[data-tbos-module="marketplace"] .spec-search { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body[data-tbos-module="marketplace"] .spec-search__field--task,
  body[data-tbos-module="marketplace"] .spec-search__submit { grid-column: 1 / -1; }
  body[data-tbos-module="marketplace"] .spec-search__submit { min-height: 48px; }
  body[data-tbos-module="marketplace"] .spec-hero__chips {
    display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  body[data-tbos-module="marketplace"] .spec-hero__chips::-webkit-scrollbar { display: none; }
  body[data-tbos-module="marketplace"] .spec-hero__chips .spec-chip { flex: 0 0 auto; min-height: 36px; white-space: nowrap; }
}

/* .visually-hidden есть только в Bootstrap CRM, в маркете его не было — подписи полей
   (label для скринридеров) показывались как обычный текст и ломали сетки форм. */
body[data-tbos-module="marketplace"] .visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
@media (max-width: 767.98px) {
  body[data-tbos-module="marketplace"] .spec-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body[data-tbos-module="marketplace"] .spec-stat-card { padding: 12px 14px; }
  body[data-tbos-module="marketplace"] .spec-stat-card strong { font-size: 1.3rem; }
}

/* Специалисты: фильтры-дубль сворачиваются на телефоне (чекбокс, без JS) */
body[data-tbos-module="marketplace"] .spec-filters-open { display: none; }
@media (max-width: 767.98px) {
  body[data-tbos-module="marketplace"] .spec-filters-open {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin: 0 0 10px; padding: 0 16px;
    border: 1px solid var(--mk-line); border-radius: 12px; background: #fff; color: var(--mk-text); font-weight: 700; cursor: pointer;
  }
  body[data-tbos-module="marketplace"] .spec-filters-open::after { content: "▾"; color: var(--mk-muted); }
  body[data-tbos-module="marketplace"] .spec-filters-toggle:checked + .spec-filters-open::after { content: "▴"; }
  body[data-tbos-module="marketplace"] .spec-filters-toggle:focus-visible + .spec-filters-open { outline: 2px solid var(--mk-brand); outline-offset: 2px; }
  body[data-tbos-module="marketplace"] .spec-filters { display: none; }
  body[data-tbos-module="marketplace"] .spec-filters-toggle:checked ~ .spec-filters { display: block; }
}

/* ── Профиль специалиста: компактная шапка на телефоне ──────────────
   Шапка занимала >890px (больше экрана): обложка 220px, аватар 124px,
   заголовок 38px и четыре кнопки столбиком. */
@media (max-width: 767.98px) {
  body[data-tbos-module="marketplace"] .master-social__cover { height: 110px; min-height: 0; }
  body[data-tbos-module="marketplace"] .master-social__avatar { width: 84px; height: 84px; margin-top: -42px; }
  body[data-tbos-module="marketplace"] .master-social__hero-body { padding-bottom: 14px; }
  body[data-tbos-module="marketplace"] .master-social__identity h1 { margin: 2px 0 4px; font-size: 1.5rem; line-height: 1.15; }
  body[data-tbos-module="marketplace"] .master-social__meta { margin: 0 0 8px; font-size: .9rem; }
  body[data-tbos-module="marketplace"] .master-social__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body[data-tbos-module="marketplace"] .master-social__actions .master-social-btn { min-height: 46px; justify-content: center; }
  body[data-tbos-module="marketplace"] .master-social__actions .is-primary { grid-column: 1 / -1; }
}

/* ── Карта специалистов: на телефоне — карта ближе к началу страницы ──── */
body[data-tbos-module="marketplace"] .spec-map-filters-open { display: none; }
@media (max-width: 767.98px) {
  body[data-tbos-module="marketplace"] .spec-map-page { padding-left: 12px; padding-right: 12px; }
  body[data-tbos-module="marketplace"] .spec-map-hero { padding: 16px 14px; border-radius: 18px; }
  body[data-tbos-module="marketplace"] .spec-map-hero h1 { margin: 6px 0 10px; font-size: 1.35rem; line-height: 1.2; }
  body[data-tbos-module="marketplace"] .spec-map-hero__copy > p { display: none; }
  body[data-tbos-module="marketplace"] .spec-map-search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  body[data-tbos-module="marketplace"] .spec-map-search button { min-height: 48px; }
  body[data-tbos-module="marketplace"] .spec-map-hero__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
  body[data-tbos-module="marketplace"] .spec-map-hero__actions .spec-map-btn { padding: 0 8px; font-size: .85rem; line-height: 1.2; text-align: center; justify-content: center; overflow-wrap: anywhere; }
  body[data-tbos-module="marketplace"] .spec-map-hero__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }

  body[data-tbos-module="marketplace"] .spec-map-filters-open {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin: 10px 0; padding: 0 16px;
    border: 1px solid var(--mk-line); border-radius: 12px; background: #fff; color: var(--mk-text); font-weight: 700; cursor: pointer;
  }
  body[data-tbos-module="marketplace"] .spec-map-filters-open::after { content: "▾"; color: var(--mk-muted); }
  body[data-tbos-module="marketplace"] .spec-map-filters-toggle:checked + .spec-map-filters-open::after { content: "▴"; }
  body[data-tbos-module="marketplace"] .spec-map-filters-toggle:focus-visible + .spec-map-filters-open { outline: 2px solid var(--mk-brand); outline-offset: 2px; }
  body[data-tbos-module="marketplace"] .spec-map-filters { display: none; }
  body[data-tbos-module="marketplace"] .spec-map-filters-toggle:checked ~ .spec-map-filters { display: block; }
}

/* ── Уведомления ───────────────────────────────────────────────────── */
body.market-v2--notifications .market-notification-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
body.market-v2--notifications .market-notification-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; box-shadow: none; backdrop-filter: none;
}
body.market-v2--notifications .market-notification-card.is-unread { border-color: #cdd9ff; background: var(--mk-brand-soft); }
body.market-v2--notifications .market-notification-card p { margin: 4px 0; color: var(--mk-text); }
body.market-v2--notifications .market-notification-card small { color: var(--mk-muted); }
body.market-v2--notifications .market-notification-card form { margin: 0; }
body.market-v2--notifications .market-shell section.market-section.mk-wrap { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0; backdrop-filter: none !important; }
body.market-v2--notifications .market-shell .market-section-head { margin: 18px 0 12px; }
body.market-v2--notifications .market-shell .market-section-head h1 { margin: 6px 0 0; font-size: 1.45rem !important; line-height: 1.2; font-weight: 800; }
body.market-v2--notifications .market-notification-card.is-unread strong::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--mk-brand); vertical-align: middle;
}
body.market-v2--notifications .market-notification-card .market-btn { padding: 8px 12px; min-height: 40px; font-size: .85rem; white-space: nowrap; }

/* ── Кабинет по роли и экосистема ТБ Сервис ── */
body.market-v2 .mk-tag--role { background: var(--mk-brand-soft); color: var(--mk-brand); border-color: transparent; font-weight: 800; }
body.market-v2 .mk-next { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 18px; }
body.market-v2 .mk-next a, body.market-v2 .mk-eco-mini a {
  display: grid; gap: 4px; padding: 14px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius);
  background: #fff; color: var(--mk-text); text-decoration: none;
}
body.market-v2 .mk-next a:hover, body.market-v2 .mk-eco-mini a:hover { border-color: var(--mk-brand); }
body.market-v2 .mk-next span, body.market-v2 .mk-eco-mini span { color: var(--mk-muted); font-size: .85rem; line-height: 1.35; }
body.market-v2 .mk-eco-mini { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
body.market-v2 .mk-eco-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
body.market-v2 .mk-eco-card {
  display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px solid var(--mk-line);
  border-radius: var(--mk-radius); background: #fff;
}
body.market-v2 .mk-eco-card h2 { margin: 0; font-size: 1.05rem; }
body.market-v2 .mk-eco-card p { margin: 0; color: var(--mk-muted); font-size: .9rem; line-height: 1.4; }
body.market-v2 .mk-eco-card form { display: grid; gap: 8px; margin: 0; }
body.market-v2 .mk-eco-link > summary { list-style: none; cursor: pointer; text-align: center; }
body.market-v2 .mk-eco-link > summary::-webkit-details-marker { display: none; }
body.market-v2 .mk-eco-link[open] > summary { margin-bottom: 10px; }
body.market-v2 .mk-link-btn { background: none; border: 0; padding: 4px 0; color: var(--mk-muted); text-decoration: underline; cursor: pointer; font: inherit; justify-self: start; }
body.market-v2 .mk-eco-note { margin-top: 16px; padding: 14px; border-radius: var(--mk-radius); background: var(--mk-brand-soft); color: var(--mk-text); font-size: .88rem; line-height: 1.45; }
@media (min-width: 768px) {
  body.market-v2 .mk-next { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.market-v2 .mk-eco-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.market-v2 .mk-eco-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.market-v2 .mk-join, body.market-v2 .mk-eco-strip { margin: 22px 0; }

/* ── Значки вместо картинок-заглушек: категории, объявления без фото, баннер ── */
.mk-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--ph-a), var(--ph-b)); color: var(--ph-fg); }
.mk-tone--blue   { --ph-a: #e8f0ff; --ph-b: #cfe0ff; --ph-fg: #2f6bff; }
.mk-tone--cyan   { --ph-a: #e0f7fb; --ph-b: #bfeaf4; --ph-fg: #0b8fae; }
.mk-tone--pink   { --ph-a: #ffe9f3; --ph-b: #ffd0e4; --ph-fg: #e0357f; }
.mk-tone--violet { --ph-a: #f0eaff; --ph-b: #dccfff; --ph-fg: #7a4dff; }
.mk-tone--amber  { --ph-a: #fff3dc; --ph-b: #ffe2ad; --ph-fg: #d98200; }
.mk-tone--green  { --ph-a: #e3f8ec; --ph-b: #c5efd7; --ph-fg: #12a05c; }
.mk-tone--slate  { --ph-a: #eef1f6; --ph-b: #dde3ec; --ph-fg: #5b6b82; }
.mk-ico { flex: none; }

body.market-v2 .mk-cat__pic { background: none; overflow: hidden; }
body.market-v2 .mk-cat__pic .mk-ph { width: 100%; height: 100%; border-radius: inherit; }
body.market-v2 .mk-cat__pic .mk-ico { width: 32px; height: 32px; }
body.market-v2 .mk-cat:hover .mk-cat__pic, body.market-v2 .mk-cat:focus-visible .mk-cat__pic { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31, 41, 64, .12); }
body.market-v2 .mk-cat__pic { transition: transform .15s ease, box-shadow .15s ease; }

body.market-v2 .mk-card__media.is-fallback { background: none; }
body.market-v2 .mk-card__media .mk-ph { width: 100%; height: 100%; }
body.market-v2 .mk-card__media .mk-ph .mk-ico { width: 30%; height: auto; max-width: 64px; opacity: .92; }

/* баннер «Народный маркет»: чисто белый фон, персонаж целиком (был обрезан и другого оттенка) */
.mk-promo { background: #fff; border-color: #e3e8f2; }
.mk-promo::after {
  top: 8px; right: 10px; bottom: 0; width: 34%;
  background: url("/static/img/market-lite/promo-mascot-w.webp") right bottom / contain no-repeat;
  -webkit-mask-image: none; mask-image: none;
}
@media (min-width: 768px) { .mk-promo::after { top: 12px; right: 28px; width: 26%; } }

body.market-v2--ad .tbm-listing-gallery__fallback .mk-ph { width: 100%; height: 100%; }
body.market-v2--ad .tbm-listing-gallery__fallback .mk-ph .mk-ico { width: 22%; height: auto; max-width: 120px; }
body.market-v2 .tbm-listing-similar__card .mk-ph { flex: none; width: 88px; height: 88px; border-radius: 14px; }
body.market-v2 .tbm-listing-similar__card .mk-ph .mk-ico { width: 40px; height: 40px; }

/* объявление без фото: плитка со значком заполняет всю сцену галереи (раньше — узкая полоса посередине) */
body.market-v2--ad .tbm-listing-gallery__fallback { position: absolute; inset: 0; display: block; height: auto; padding: 0; }
body.market-v2--ad .tbm-listing-gallery__fallback .mk-ph { width: 100%; height: 100%; }
/* заголовок в списке не залезает под кнопку «в избранное» */
body.market-v2 .mk-grid[data-catalog-view="list"] .mk-card__title { padding-right: 40px; }
/* плашка «онлайн» в углу галереи вылезала за край (и дублирует «онлайн» в шапке объявления) */
body.market-v2--ad .tbm-listing-gallery__status { display: none; }

/* специалисты на телефоне: три вложенных отступа (12 + 14 + 12) съедали по ~38px с каждой стороны */
@media (max-width: 767px) {
  body[data-tbos-module="marketplace"] .market-shell-market:has(.spec-page) { margin-inline: 0; padding-inline: 8px; }
  body[data-tbos-module="marketplace"] .spec-page { padding-inline: 0; }
}
body.market-v2 .mk-my-ad__pic .mk-ph { width: 100%; height: 100%; }
body.market-v2 .mk-my-ad__pic .mk-ico { width: 36px; height: 36px; }

/* ── Каталог: категории, хлебные крошки, подкатегории; страница «Все категории» ── */
body.market-v2 .mk-chips--cats { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
body.market-v2 .mk-chips--cats::-webkit-scrollbar { display: none; }
body.market-v2 .mk-chips--cats .mk-chip { flex: none; }
body.market-v2 .mk-chip--more { color: var(--mk-brand); font-weight: 800; }
body.market-v2 .mk-chip--accent { background: var(--mk-brand-soft); color: var(--mk-brand); border-color: transparent; font-weight: 800; }
body.market-v2 .mk-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 2px 2px; font-size: .85rem; color: var(--mk-muted); }
body.market-v2 .mk-crumbs a { color: var(--mk-muted); text-decoration: none; }
body.market-v2 .mk-crumbs a[aria-current="page"] { color: var(--mk-text); font-weight: 700; }
body.market-v2 .mk-subcats { display: flex; gap: 8px; margin: 8px 0 4px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
body.market-v2 .mk-subcats::-webkit-scrollbar { display: none; }
body.market-v2 .mk-subcats .mk-chip { flex: none; }
body.market-v2 .mk-chip__n { margin-left: 4px; opacity: .6; font-weight: 600; }

body.market-v2 .mk-allcats__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
body.market-v2 .mk-group { padding: 14px; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff; }
body.market-v2 .mk-group__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
body.market-v2 .mk-group__head .mk-ph { flex: none; width: 48px; height: 48px; border-radius: 14px; }
body.market-v2 .mk-group__head h2 { margin: 0; font-size: 1.05rem; }
body.market-v2 .mk-group__head h2 a { color: var(--mk-text); text-decoration: none; }
body.market-v2 .mk-group__head small { color: var(--mk-muted); }
body.market-v2 .mk-group__leaves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin: 0; padding: 0; list-style: none; }
body.market-v2 .mk-group__leaves a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; color: var(--mk-text); text-decoration: none; font-size: .9rem; border-bottom: 1px solid var(--mk-line); }
body.market-v2 .mk-group__leaves a span { color: var(--mk-muted); }
body.market-v2 .mk-group__more { display: inline-block; margin-top: 10px; color: var(--mk-brand); font-weight: 800; text-decoration: none; }
@media (min-width: 768px) {
  body.market-v2 .mk-allcats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.market-v2 .mk-cats .mk-cat:nth-child(n+9):not(.mk-cat--all) { display: none; }
}
@media (min-width: 1100px) { body.market-v2 .mk-allcats__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.market-v2 .mk-allcats .mk-head--page { flex-wrap: wrap; }
body.market-v2 .mk-allcats .mk-head--page > div { flex: 1 1 240px; }

body.market-v2 .mk-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 8px; }
body.market-v2 .mk-pager__gap { align-self: center; color: var(--mk-muted); }

/* ── Сохранённые поиски ── */
body.market-v2 .mk-savesearch {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 12px; border: 1px solid #cdd9ff; border-radius: var(--mk-radius); background: var(--mk-brand-soft);
}
body.market-v2 .mk-savesearch span { color: var(--mk-muted); font-size: .9rem; }
body.market-v2 .mk-searches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
body.market-v2 .mk-search {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--mk-line); border-radius: var(--mk-radius); background: #fff;
}
body.market-v2 .mk-search.is-muted { opacity: .7; }
body.market-v2 .mk-search__main { display: grid; gap: 2px; flex: 1 1 200px; min-width: 0; color: var(--mk-text); text-decoration: none; }
body.market-v2 .mk-search__main strong { overflow-wrap: anywhere; }
body.market-v2 .mk-search__main span { color: var(--mk-muted); font-size: .85rem; }
body.market-v2 .mk-search form { margin: 0; }

/* ── Подсказки поиска ── */
.mk-suggest-host { position: relative; }
.mk-suggest {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); max-height: 70vh; overflow-y: auto;
  padding: 6px; border: 1px solid var(--mk-line, #e4e8f0); border-radius: 14px; background: #fff; box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}
.mk-suggest[hidden] { display: none; }
.mk-suggest__head { padding: 8px 10px 4px; color: var(--mk-muted, #66708a); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.mk-suggest__item, .mk-suggest__all { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; color: var(--mk-text, #121a2b); text-decoration: none; }
.mk-suggest__item:hover, .mk-suggest__item:focus-visible, .mk-suggest__all:hover, .mk-suggest__all:focus-visible { background: var(--mk-brand-soft, #eef3ff); outline: none; }
.mk-suggest__title { overflow-wrap: anywhere; font-weight: 600; }
.mk-suggest__meta { color: var(--mk-muted, #66708a); }
.mk-suggest__all { margin-top: 4px; color: var(--mk-brand, #2f6bff); font-weight: 700; border-top: 1px solid var(--mk-line, #e4e8f0); border-radius: 0 0 10px 10px; }
body.market-v2 .mk-suggest a.mk-suggest__item { color: var(--mk-text, #121a2b); }
body.market-v2 .mk-suggest a.mk-suggest__all { color: var(--mk-brand, #2f6bff); }

/* ── Мои кабинеты ── */
body.market-v2 .mk-form-error { margin: 12px 0; padding: 12px 14px; border: 1px solid #f3c2c2; border-radius: var(--mk-radius); background: #fff1f1; color: #9b1c1c; font-weight: 600; }
body.market-v2 .mk-check { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; line-height: 1.35; color: var(--mk-muted); }
body.market-v2 .mk-check input { margin-top: 3px; flex: none; }
body.market-v2 .mk-spaces .mk-eco-card select, body.market-v2 .mk-spaces .mk-eco-card textarea { width: 100%; font: inherit; font-size: 16px; }
