/* Доска объявлений «Дневник Диабетика» — дизайн-система приложения ДД */
:root {
  --blue: #ef5636;
  --blue-tint: #fce3db;
  --good: #2f9e5f;
  --good-tint: #e4f3e9;
  --bad: #d23b3b;
  --bad-tint: #fbe4e2;
  --warn: #d98a1f;
  --warn-tint: #fdf0dc;
  --page-bg: #f1f0ee;
  --card: #ffffff;
  --card-border: #eae7e2;
  --ink: #1c1512;
  --muted: #7a6b62;
  --faint: #a99a90;
  --line: #e9e7e3;
  --card-shadow: 0 3px 12px rgba(120,55,30,.08), 0 1px 3px rgba(120,55,30,.06);
  --btn-shadow: 0 10px 22px -8px rgba(239,86,54,.5);
  --f-display: "Coolvetica","Helvetica Neue","Arial Rounded MT Bold",system-ui,-apple-system,sans-serif;
  --f-body: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,"Helvetica Neue",sans-serif;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #f26b4e; --blue-tint: #33201a;
    --good: #3bb56f; --good-tint: #123322;
    --bad: #e85555; --bad-tint: #331615;
    --warn: #e3a04a; --warn-tint: #33270f;
    --page-bg: #140f0c; --card: #241b16; --card-border: #322620;
    --ink: #f3ece7; --muted: #b3a396; --faint: #7d6f64;
    --line: #322620;
    --card-shadow: 0 3px 12px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --blue: #f26b4e; --blue-tint: #33201a;
  --good: #3bb56f; --good-tint: #123322;
  --bad: #e85555; --bad-tint: #331615;
  --warn: #e3a04a; --warn-tint: #33270f;
  --page-bg: #140f0c; --card: #241b16; --card-border: #322620;
  --ink: #f3ece7; --muted: #b3a396; --faint: #7d6f64;
  --line: #322620;
  --card-shadow: 0 3px 12px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
}
:root[data-theme="light"] {
  --blue: #ef5636; --blue-tint: #fce3db;
  --good: #2f9e5f; --good-tint: #e4f3e9;
  --bad: #d23b3b; --bad-tint: #fbe4e2;
  --warn: #d98a1f; --warn-tint: #fdf0dc;
  --page-bg: #f1f0ee; --card: #ffffff; --card-border: #eae7e2;
  --ink: #1c1512; --muted: #7a6b62; --faint: #a99a90;
  --line: #e9e7e3;
  --card-shadow: 0 3px 12px rgba(120,55,30,.08), 0 1px 3px rgba(120,55,30,.06);
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font: 16px/1.45 var(--f-body);
  background: var(--page-bg); color: var(--ink);
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
}
button { font: inherit; cursor: pointer; }
svg.ic { width: 22px; height: 22px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* шапка */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--page-bg); border-bottom: 1px solid var(--line);
  padding: 14px 16px 10px;
}
.topbar-in { max-width: 480px; margin: 0 auto; }
.brand-title {
  font-family: var(--f-display); font-size: 22px; letter-spacing: .2px;
  color: var(--ink); line-height: 1.1;
}
.brand-title .accent { color: var(--blue); }
.brand-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

main { padding: 12px 12px 20px; max-width: 480px; margin: 0 auto; }

/* фильтры */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--card-border); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 8px 15px; font-size: 14.5px; box-shadow: var(--card-shadow);
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.filter-row { display: flex; gap: 8px; margin-bottom: 10px; }
.filter-row select, .filter-row input {
  flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--card-border);
  border-radius: 12px; background: var(--card); color: var(--ink); font-size: 15px;
  appearance: none; -webkit-appearance: none;
}

/* карточки ленты */
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 12px; margin-bottom: 10px; display: flex; gap: 12px; align-items: stretch;
}
.card:active { transform: scale(.99); }
.imgwrap { position: relative; flex: none; width: 86px; height: 86px; }
.card-img {
  width: 100%; height: 100%; border-radius: 12px; object-fit: cover;
}
.card-img.ph {
  background: var(--blue-tint); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.card-img.ph svg.ic { width: 30px; height: 30px; stroke-width: 1.5; }
.photocount {
  position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(18,16,15,.62); color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 6px; border-radius: 999px; line-height: 1;
}
.photocount svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 1.7; }
.card-body { min-width: 0; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700;
  border-radius: 8px; padding: 3px 9px; letter-spacing: 0;
}
.badge.sell { background: var(--blue-tint); color: var(--blue); }
.badge.buy  { background: var(--warn-tint); color: var(--warn); }
.badge.free { background: var(--good-tint); color: var(--good); }
.badge.swap { background: var(--line); color: var(--muted); }
.badge.fresh { background: var(--good-tint); color: var(--good); }
.exp {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600;
  border-radius: 8px; padding: 3px 8px; background: var(--line); color: var(--muted);
}
.exp svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.exp.exp-soon { background: var(--warn-tint); color: var(--warn); }
.exp.exp-out  { background: var(--bad-tint); color: var(--bad); }
.card-title { font-weight: 650; font-size: 15.5px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-price { font-weight: 800; margin-top: 4px; font-size: 16.5px; letter-spacing: -.2px; color: var(--ink); }
.card-price.free { color: var(--good); }
.card-price.neg { color: var(--muted); font-weight: 650; font-size: 14.5px; }
.card-meta { font-size: 13px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.card-meta svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.my-views { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.my-views svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; color: var(--faint); }
.opt { color: var(--faint); font-weight: 400; font-size: .88em; }

.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .empty-ic { color: var(--faint); margin-bottom: 12px; }
.empty .empty-ic svg.ic { width: 44px; height: 44px; stroke-width: 1.3; }
.empty b { color: var(--ink); }

/* фирменный заголовок страницы (единый стиль — мини-аппы и сайт) */
.page-head { text-align: center; margin: 2px 0 16px; }
.page-head h1 {
  font-family: var(--f-display); font-size: 22px; color: var(--ink); letter-spacing: .2px;
}
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 5px; line-height: 1.45; }

/* убираем брендовую шапку: в мини-аппах её показывает сам хост, на сайте бренд в hero */
html:not(.web) .topbar { display: none; }               /* мини-аппы ВК/ТГ/MAX */
html:not(.web) .tab[data-tab="home"] { display: none; } /* «Главная» — только на сайте */
@media (max-width: 879px) {
  html.web .topbar { display: none; }              /* узкий сайт — навигация снизу */
  /* Главная как рекламная посадочная: пока человек ещё никуда не уходил, нижнего
     меню нет — первый экран ведут две кнопки в герое. Класс landing снимает app.js
     после первого же перехода, и дальше меню не прячется (иначе страница-ловушка). */
  html.web.landing .tabbar { display: none; }
  html.web.landing body { padding-bottom: 0; }
}
@media (min-width: 880px) {   /* широкий сайт: только навигация, по центру */
  html.web .topbar-in { justify-content: center; }
  html.web .topbar-in .tabbar { margin-left: 0; }
}

/* футер сайта — на ЛЮБОЙ ширине браузера (в мини-аппах его нет: там своя платформа).
   Раньше он показывался только от 880px, и на телефоне пропадали разом логотип,
   ссылки на Политику/Соглашение и соцсети. */
.site-foot { display: none; }
html.web .site-foot {
  display: block; border-top: 1px solid var(--line); margin-top: 40px;
  padding: 26px 20px 30px;
}
html.web .author-card .author-link { display: none; }  /* ссылка автора — в футере */
.foot-in { max-width: 1140px; margin: 0 auto; text-align: center; }
/* знак в подвале — тихое место, где шутку замечают сами */
.foot-logo { display: block; height: 30px; width: auto; margin: 0 auto 18px; color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin-bottom: 12px; }
.foot-links a, .foot-links button {
  color: var(--muted); font-size: 14px; text-decoration: none;
  background: none; border: none; padding: 0; cursor: pointer; font: inherit;
}
.foot-links a:hover, .foot-links button:hover { color: var(--blue); }
.foot-legal { color: var(--faint); font-size: 13px; }
.foot-social { display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 10px; margin: 4px 0 16px; }
.foot-social .soc-cap { font: inherit; font-weight: 400; color: var(--muted); }
.foot-social .soc { display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s; }
.foot-social .soc:hover { transform: translateY(-2px); }
.foot-social .soc svg { width: 26px; height: 26px; display: block; }
@media (min-width: 880px) {
  html.web .site-foot { margin-top: 44px; padding: 28px 32px 34px; }
}

/* форма */
.form label { display: block; font-size: 14px; font-weight: 650; margin: 15px 0 6px;
  color: var(--ink); letter-spacing: normal; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--card-border); border-radius: 12px;
  background: var(--card); color: var(--ink); font-size: 16px;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--blue);
}
.form textarea { min-height: 110px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 5px; }
/* Предупреждение про фото — стоит до загрузчика и не должно теряться взглядом
   (в отличие от .hint). Жёлтое, а не красное: это подсказка, а не запрет —
   красный тут занят плашкой бана (.form-warn ниже). */
.photo-warn { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 9px;
  padding: 9px 11px; border-radius: 10px; background: var(--warn-tint);
  border: 1px solid rgba(217,138,31,.28); color: var(--warn);
  font-size: 12.5px; line-height: 1.45; }
.photo-warn svg { flex: none; margin-top: 1px; }
.photo-warn b { font-weight: 700; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg .chip { text-align: center; box-shadow: none; }
.photos-row { display: flex; gap: 8px; margin-top: 6px; }
.photo-slot {
  width: 78px; height: 78px; border-radius: 12px; border: 1.5px dashed var(--card-border);
  background: var(--card); display: flex; align-items: center; justify-content: center;
  color: var(--faint); overflow: hidden; position: relative;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(20,15,12,.6); color: #fff; font-size: 12px; line-height: 1;
}
.btn {
  width: 100%; border: none; border-radius: 14px; padding: 15px; font-size: 16.5px;
  font-weight: 700; background: var(--blue); color: #fff; margin-top: 18px;
  box-shadow: var(--btn-shadow);
}
.btn[disabled] { opacity: .55; }
.btn.ghost { background: var(--card); color: var(--ink);
  border: 1px solid var(--card-border); box-shadow: var(--card-shadow); }

/* мои объявления */
.status { font-size: 13px; font-weight: 650; margin-top: 4px;
  display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--warn); } .status.active { color: var(--good); }
.status.rejected { color: var(--bad); } .status.closed, .status.expired { color: var(--faint); }
.mini-btn {
  display: block; border: 1px solid var(--card-border); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 8px 14px; font-size: 13.5px; margin-top: 10px;
}

/* правила */
.rules { background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 18px; }
.rules h3 { margin: 16px 0 7px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.rules h3:first-child { margin-top: 0; }
.rules h3 svg.ic { width: 19px; height: 19px; }
.rules h3.ok { color: var(--good); } .rules h3.no { color: var(--bad); }
.rules h3.warn { color: var(--warn); }
.rules p, .rules li { font-size: 14.5px; color: var(--ink); }
.rules ul { padding-left: 20px; margin: 4px 0; }
.rules .sign { color: var(--muted); margin-top: 12px; font-size: 13.5px; }
.banner {
  background: var(--warn-tint); color: var(--warn); border-radius: 12px;
  padding: 10px 13px; font-size: 13.5px; margin-bottom: 12px; font-weight: 650;
}

/* таббар */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 5;
  display: flex; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: none; background: none; color: var(--faint);
  padding: 9px 2px 8px; font-size: 11px; font-weight: 650;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  position: relative; text-align: center; line-height: 1.1;
}
.tab.active { color: var(--blue); }
.tab-badge {
  position: absolute; top: 3px; left: 50%; transform: translateX(6px);
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  background: var(--blue); color: #fff; border-radius: 8px;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}

/* панель модерации (только для админов) */
.mod-head { font-weight: 750; margin: 4px 4px 12px; color: var(--ink); }
.mod-card .desc, .fb-card .desc { white-space: pre-wrap; margin: 8px 0 4px; font-size: 14.5px; color: var(--ink); }
.mod-actions { display: flex; gap: 10px; margin-top: 12px; }
.mod-actions .btn { margin-top: 0; flex: 1; }
.btn.mod-ok { background: #1f9d55; }
.fb-card .btn { margin-top: 12px; }
.mod-seg { display: flex; gap: 8px; margin: 2px 0 14px; }
/* Шапка с логотипом и иконки пунктов — принадлежность десктопной панели.
   В мини-аппе .mod-seg это узкая строка чипов: логотип туда не влезет,
   а иконки её переполнят. Показываем их только в html.web.admin (ниже). */
.adm-brand { display: none; }
.mod-seg-btn svg.ic { display: none; }
.mod-seg-btn {
  flex: 1; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--muted); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.mod-seg-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.seg-n {
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.mod-seg-btn.active .seg-n { background: rgba(255,255,255,.28); }
.rp-reason {
  display: flex; align-items: center; gap: 7px; font-weight: 750;
  color: #c23b22; font-size: 14px; margin-bottom: 6px;
}
.rp-reason svg.ic { color: #c23b22; }
.rp-stale { color: var(--muted); font-weight: 600; font-size: 12px; }
/* контакт участника розыгрыша — рядом с именем, чтобы связаться не выходя из списка */
.ent-c { display: block; font-style: normal; font-size: 11.5px; color: var(--faint);
  margin-top: 1px; }

/* ── ответ модератора на обращение ── */
.fb-reply { width: 100%; min-height: 62px; resize: vertical; margin-top: 9px;
  padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.fb-reply:focus { outline: none; border-color: var(--blue); }
.fb-acts { display: flex; gap: 8px; margin-top: 8px; }
.fb-acts .btn { margin-top: 0; flex: 1; }

/* ── свои обращения и ответы (сторона человека) ── */
.fb-mine { flex-direction: column; }
.fb-q { font-size: 14px; line-height: 1.45; }
.fb-when { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.fb-a { margin-top: 9px; padding: 9px 11px; border-radius: 10px;
  background: var(--blue-tint); font-size: 13.5px; line-height: 1.45; }
.fb-a b { color: var(--blue); font-size: 12px; font-weight: 800; }
.fb-a .fb-when { display: inline; margin: 0; }
.fb-a > div { margin-top: 4px; }
.fb-wait { margin-top: 8px; font-size: 12px; color: var(--faint); }

.rp-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.rp-top .rp-reason { margin: 0; }
/* несколько жалоб на одно объявление — это другая ситуация, чем одна */
.rp-many { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 8px;
  background: var(--bad-tint); color: var(--bad); }
.rp-body { display: flex; gap: 11px; align-items: flex-start; }
.rp-ph { width: 92px; height: 92px; flex: none; border-radius: 10px; object-fit: cover;
  background: var(--page-bg); }
.rp-ph.ph { display: flex; align-items: center; justify-content: center; color: var(--faint); }
.rp-info { flex: 1; min-width: 0; }
.rp-price { font-size: 15px; font-weight: 800; margin: 2px 0 5px; }
.rp-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* «отдам даром» в форме «Продам» */
.free-check {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 2px; padding: 10px 12px; border-radius: 12px;
  background: var(--blue-tint); cursor: pointer;
  font-size: 14.5px; font-weight: 650; color: var(--ink);
}
.free-check input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
input.locked { color: var(--blue); font-weight: 700; background: var(--blue-tint); }

/* явное согласие при подаче объявления (152-ФЗ): отдельные непредзаполненные чекбоксы */
.form label.agree {
  display: flex; align-items: flex-start; gap: 11px;
  margin: 10px 0 0; cursor: pointer;
  font-size: 13.5px; line-height: 1.45; color: var(--ink);
  font-weight: 400; text-transform: none; letter-spacing: normal;
}
.form label.agree span { text-transform: none; font-weight: 400; letter-spacing: normal; }
.form label.agree input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; margin-top: 1px; }
.form label.agree a { color: var(--blue); text-decoration: underline; }
.agree + .btn, .agree ~ .btn { margin-top: 14px; }

/* ── журнал действий модератора ── */
.lg-note { font-size: 12.5px; color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 10px; }
.lg-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; }
.lg-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border-bottom: 1px solid var(--line); }
.lg-row:last-child { border-bottom: none; }
.lg-act { flex: none; width: 124px; font-size: 12px; font-weight: 700; border-radius: 6px;
  padding: 3px 7px; background: var(--page-bg); color: var(--muted); text-align: center; }
.lg-act.good { background: var(--good-tint); color: var(--good); }
.lg-act.bad { background: var(--bad-tint); color: var(--bad); }
.lg-act.fail { background: transparent; color: var(--faint); border: 1px dashed var(--line); }
.lg-mid { flex: 1; min-width: 0; }
.lg-t { font-size: 13.5px; font-weight: 600; }
.lg-why { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.lg-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.lg-meta { flex: none; text-align: right; font-size: 11.5px; color: var(--faint);
  font-variant-numeric: tabular-nums; }
.lg-who { margin-top: 2px; }

/* ── поиск по всем объявлениям ── */
.src-box { margin-bottom: 10px; }
.src-box input { width: 100%; padding: 11px 13px; border: 1px solid var(--card-border);
  border-radius: 12px; background: var(--card); color: var(--ink); font-size: 15px; }
.src-box input:focus { outline: none; border-color: var(--blue); }
.src-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.src-row:last-child { border-bottom: none; }
.src-row:hover { background: var(--page-bg); }
.src-st { flex: none; font-size: 11.5px; font-weight: 700; border-radius: 6px;
  padding: 3px 8px; background: var(--page-bg); color: var(--muted); }
.src-st.good { background: var(--good-tint); color: var(--good); }
.src-st.bad { background: var(--bad-tint); color: var(--bad); }
.src-st.warn { background: var(--warn-tint); color: var(--warn); }

/* ── карточка человека ── */
/* автор в разборе заявки — кнопка, но выглядит как ссылка внутри строки данных */
.uc-link { background: none; border: none; padding: 0; font: inherit; color: var(--blue);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.uc-link:hover { text-decoration-thickness: 2px; }
.uc-back { background: none; border: none; color: var(--blue); font-size: 13.5px;
  font-weight: 600; padding: 0; margin-bottom: 10px; cursor: pointer; font-family: inherit; }
.uc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uc-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.uc-key { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.uc-ban { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 8px;
  background: var(--bad-tint); color: var(--bad); }
.uc-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.uc-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.uc-chip { flex: 1; min-width: 96px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; }
.uc-chip b { display: block; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.uc-chip span { font-size: 11.5px; color: var(--faint); }
.uc-h { font-size: 14px; font-weight: 700; margin: 16px 0 7px; }

/* мягкое предупреждение о лекарствах в форме подачи */
.form-warn {
  margin: 8px 0 0; padding: 10px 12px; border-radius: 12px;
  background: var(--bad-tint); color: var(--bad);
  font-size: 13px; line-height: 1.45; font-weight: 600;
}
.form-warn[hidden] { display: none; }

/* модерация: быстрые причины + заметка-причина у автора */
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.reason-chip { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 999px;
  background: var(--line); color: var(--ink); border: 1px solid transparent; cursor: pointer; }
.reason-chip.active { background: var(--blue-tint); color: var(--blue); border-color: var(--blue); }
.reject-note { margin-top: 8px; padding: 10px 12px; border-radius: 12px;
  background: var(--bad-tint); color: var(--bad); font-size: 13.5px; line-height: 1.42; font-weight: 600; }
.reject-note span { font-weight: 400; opacity: .85; }

/* статистика (дашборд для B2B) */
.stat-h { font-size: 14px; font-weight: 800; letter-spacing: normal;
  color: var(--muted); margin: 18px 2px 10px; }
.stat-h:first-child { margin-top: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 10px; text-align: center; }
.stat-tile.accent { background: var(--blue-tint); border-color: transparent; }
.stat-num { font-size: 24px; font-weight: 850; color: var(--ink); line-height: 1.1; }
.stat-tile.accent .stat-num { color: var(--blue); }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.25; }
.stat-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 14px; }
.stat-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink); }
.stat-row:last-child { border-bottom: none; }
.stat-row b { font-weight: 800; }
.stat-row.hot { color: var(--blue); font-weight: 700; }
.stat-row.hot b { color: var(--blue); }
.wk-chart { display: flex; align-items: flex-end; justify-content: flex-start;
  gap: 10px; height: 140px; overflow-x: auto;
  padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.wk-bar { flex: 1 1 0; min-width: 28px; max-width: 44px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; gap: 4px; }
.wk-n { font-size: 11px; font-weight: 700; color: var(--muted); }
.wk-fill { width: 70%; min-height: 4px; background: var(--blue); border-radius: 5px 5px 0 0; }
.wk-lbl { font-size: 9px; color: var(--faint); }
.stat-note { color: var(--faint); font-size: 12px; margin: 16px 2px 4px; line-height: 1.5; }
/* оговорка о том, что цифра неполная, важнее самой цифры — не топим её в сером */
.stat-note b { color: var(--warn); font-weight: 700; }

/* ── отчёты: журнал работ ── */
.wr-add { margin-top: 0 !important; width: auto !important; padding: 7px 15px !important;
  font-size: 13px !important; }
.wr-tbl { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; }
.wr-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid var(--line); font-size: 13.5px; }
.wr-row:last-child { border-bottom: none; }
.wr-row > span { flex: 1; }
.wr-row > i { font-style: normal; font-size: 11.5px; color: var(--faint); }
.wr-row > b { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px;
  text-align: right; }
.wr-item { background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 12px; margin-bottom: 8px; }
.wr-h { display: flex; align-items: center; gap: 8px; }
.wr-h > b { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; }
.wr-hours { font-size: 12.5px; font-weight: 800; color: var(--blue);
  font-variant-numeric: tabular-nums; }
/* Пометки — не украшение: они отличают измерение от воспоминания.
   «замерено» зелёная (посчитано по отметкам времени), «со слов» жёлтая (память). */
.wr-back { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 2px 6px;
  background: var(--warn-tint); color: var(--warn); }
.wr-src { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 2px 6px;
  background: var(--good-tint); color: var(--good); }
.wr-del { background: none; border: none; color: var(--faint); cursor: pointer;
  font-size: 13px; padding: 0 2px; }
.wr-del:hover { color: var(--bad); }
.wr-m { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.wr-d { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45;
  white-space: pre-wrap; }
/* пункты дня по типам */
.wk-grp { margin-top: 9px; }
.wk-t { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  border-radius: 5px; padding: 2px 7px; margin-bottom: 5px; }
.wk-t.k-f { background: var(--good-tint); color: var(--good); }
.wk-t.k-b { background: var(--bad-tint); color: var(--bad); }
.wk-t.k-i { background: var(--page-bg); color: var(--muted); }
.wk-i { font-size: 12.5px; line-height: 1.5; color: var(--muted); padding: 2px 0 2px 13px;
  position: relative; }
.wk-i::before { content: "—"; position: absolute; left: 0; color: var(--faint); }
.wr-l { display: block; font-size: 12.5px; font-weight: 650; margin: 10px 0 4px; }
/* поля формы — во всплывающей шторке .wf-sheet (раньше стили висели на .report-sheet
   и после переезда в модалку перестали применяться: поля съезжали в узкие дефолтные) */
.wf-sheet input[type="date"], .wf-sheet input[type="text"], .wf-sheet input:not([type]),
.wf-sheet select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--card-border);
  border-radius: 10px; background: var(--card); color: var(--ink); font: inherit;
  font-size: 15px; box-sizing: border-box; }
.wf-sheet input:focus, .wf-sheet textarea:focus { outline: none; border-color: var(--blue); }
.vl-in { width: 100%; padding: 10px 12px; border: 1px solid var(--card-border);
  border-radius: 10px; background: var(--page-bg); color: var(--ink);
  font-size: 12.5px; margin: 10px 0; }

/* ── бюджет ── */
.bg-tbl { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; margin-top: 10px; }
.bg-row { display: flex; align-items: flex-start; gap: 14px; padding: 11px 13px;
  border-bottom: 1px solid var(--line); }
.bg-row:last-child { border-bottom: none; }
.bg-n { flex: 1; min-width: 0; }
.bg-n b { display: block; font-size: 13.5px; font-weight: 700; }
.bg-n span { font-size: 12px; color: var(--faint); line-height: 1.4; }
.bg-v { flex: none; font-size: 13px; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.bg-src { font-size: 11.5px; color: var(--faint); margin-top: 9px; line-height: 1.6; }

/* список реальных расходов */
.ex-tbl { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; }
.ex-row { display: flex; align-items: center; gap: 12px; padding: 10px 13px;
  border-bottom: 1px solid var(--line); }
.ex-row:last-child { border-bottom: none; }
.ex-n { flex: 1; min-width: 0; }
.ex-n b { display: block; font-size: 13.5px; font-weight: 600; }
.ex-n span { font-size: 11.5px; color: var(--faint); }
.ex-v { flex: none; font-size: 13.5px; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
/* пометка «своё» — деньги не тратились, это вклад натурой */
.ex-ik { flex: none; font-size: 10.5px; font-weight: 700; border-radius: 5px;
  padding: 2px 6px; background: var(--blue-tint); color: var(--blue); }
.ex-kind { display: flex; flex-direction: column; gap: 6px; }
.ex-kind label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px;
  color: var(--muted); line-height: 1.4; cursor: pointer; }
.ex-kind input { width: auto !important; margin-top: 2px; flex: none; }

/* расход без чека — не факт, а утверждение; помечаем прямо в строке */
.ex-nodoc { flex: none; font-size: 10.5px; font-weight: 700; border-radius: 5px;
  padding: 3px 7px; background: var(--warn-tint); color: var(--warn); white-space: nowrap; }

/* ── чеки и платёжки ── */
.rc-list { display: flex; gap: 5px; flex: none; }
.rc { position: relative; font-size: 10.5px; font-weight: 700; border-radius: 6px;
  padding: 3px 7px; background: var(--good-tint); color: var(--good);
  border: none; cursor: pointer; font-family: inherit; }
.rc:hover { filter: brightness(.96); }
.rc-x { font-style: normal; margin-left: 5px; opacity: .55; }
.rc-x:hover { opacity: 1; color: var(--bad); }
.rc-add { background: none; border: 1px dashed var(--line); color: var(--faint);
  font-size: 10.5px; border-radius: 6px; padding: 3px 7px; cursor: pointer;
  font-family: inherit; white-space: nowrap; }
.rc-add:hover { border-color: var(--blue); color: var(--blue); }
.rc-sheet { max-width: 900px !important; }
.rc-img { width: 100%; height: auto; border-radius: 12px; display: block; }
.rc-doc { width: 100%; height: 70vh; border: none; border-radius: 12px;
  background: #fff; }
.bg-s { color: var(--blue); text-decoration: none; margin-right: 10px; }
.bg-s:hover { text-decoration: underline; }

/* форма записи о работе — во всплывающей шторке */
.wf-sheet .wr-l { margin-top: 12px; }
.wf-sheet .fb-text { min-height: 80px; }

/* ── выбор периода ── */
.per-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.per-chip { padding: 7px 13px; border-radius: 9px; border: 1px solid var(--card-border);
  background: var(--card); color: var(--muted); font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; }
.per-chip:hover { border-color: var(--blue); }
.per-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.st-age { margin-top: 0 !important; }

/* ── сводка возвращаемости одной строкой ── */
.rs { display: flex; align-items: center; gap: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.rs-t { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rs-cell b { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rs-cell span { font-size: 11px; color: var(--faint); }

/* ── график по дням ── */
.dc { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px 8px; }
.dc-svg { width: 100%; height: 170px; display: block; }
.dc-legs { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.dc-leg { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.dc-leg i { width: 9px; height: 3px; border-radius: 2px; }

/* ── возвращаемость: когорты ── */
.ret-tbl { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; margin-top: 10px; }
.ret-row { display: flex; align-items: center; gap: 6px; padding: 7px 11px;
  border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ret-row:last-child { border-bottom: none; }
.ret-row > span { width: 74px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.ret-row > i { width: 42px; flex: none; font-style: normal; text-align: right;
  color: var(--faint); font-variant-numeric: tabular-nums; }
.ret-row > b { flex: 1; text-align: center; font-weight: 700; border-radius: 6px;
  padding: 3px 0; font-variant-numeric: tabular-nums; }
.ret-head { background: var(--page-bg); font-weight: 700; }
.ret-head > b { color: var(--faint); font-size: 11.5px; }
/* прочерк «нет данных» намеренно бледный: это не ноль */
.ret-na { color: var(--faint); font-weight: 400 !important; }
.ret-zero { color: var(--faint); }
.ret-lo { background: var(--blue-tint); color: var(--blue); }
.ret-mid { background: var(--warn-tint); color: var(--warn); }
.ret-hi { background: var(--good-tint); color: var(--good); }
.ret-grid { grid-template-columns: repeat(4, 1fr) !important; }

/* ── воронка ──
   Рисунок слева — собственно воронка (форма-метафора), список справа — числа.
   В мини-аппе рисунок прячем: там ширины нет, и он съел бы весь экран. */
.fn-svg { display: none; }
html.web .fn-svg { display: block; width: 300px; flex: none; height: auto; }
.fn-wrap { display: block; }
.fn { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; }
.fn-step { position: relative; border-bottom: 1px solid var(--line); }
.fn-step:last-child { border-bottom: none; }
.fn-bar { position: absolute; inset: 0 auto 0 0; background: var(--blue-tint); }
.fn-in { position: relative; display: flex; align-items: baseline; gap: 9px;
  padding: 11px 13px; flex-wrap: wrap; }
.fn-in b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums;
  min-width: 52px; }
.fn-in span { font-size: 13.5px; font-weight: 600; }
.fn-in i { font-size: 11.5px; color: var(--faint); font-style: normal; }
.fn-conv { margin-left: auto; font-size: 11.5px; font-style: normal; font-weight: 700;
  color: var(--blue); background: var(--card); border-radius: 6px; padding: 2px 7px; }

/* розыгрыши: компактная строчка-уведомление в ленте */
/* обёртка: полоска + (только админу) крестик «убрать плашку с доски» */
.gv-strip-wrap { display: flex; align-items: stretch; gap: 6px; margin-bottom: 12px; }
.gv-strip-wrap .gv-strip { flex: 1; width: auto; margin-bottom: 0; min-width: 0; }
.gv-strip-x {
  flex: none; width: 40px; padding: 0; cursor: pointer; font-size: 15px;
  background: var(--card); color: var(--faint);
  border: 1px solid var(--line); border-radius: 14px;
}
.gv-strip-x:hover { color: var(--bad); border-color: var(--bad); }
.gv-strip-x[disabled] { opacity: .5; }
.gv-strip {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-bottom: 12px; padding: 12px 14px; border: none; cursor: pointer;
  background: var(--blue-tint); color: var(--blue);
  border-radius: 14px; font-weight: 700; font-size: 14.5px; text-align: left;
}
.gv-strip .gv-strip-txt {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gv-strip svg.ic { color: var(--blue); flex: none; }
.gv-strip.joined { background: #e8f6ee; color: #1f8a4c; }
.gv-strip.joined svg.ic { color: #1f8a4c; }
.gv-strip.done { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.gv-strip.done svg.ic { color: var(--faint); }
@media (prefers-color-scheme: dark) { .gv-strip.joined { background: #16321f; color: #57c77f; } }

.gv-card {
  background: var(--card); border-radius: 18px; overflow: hidden;
  border: 2px solid var(--blue); margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(239,86,54,.16);
}
.gv-card.done { border-color: var(--line); box-shadow: none; }
.gv-card.in-modal { border: none; box-shadow: none; margin: 0; }
/* фото приза — в пропорции 3:4 (портрет), по центру карточки: раньше жёсткая
   высота 150px резала снимок в полоску */
.gv-img {
  display: block; width: 100%; max-width: 300px; margin: 14px auto 0;
  aspect-ratio: 3 / 4; height: auto; object-fit: cover; border-radius: 12px;
}
.gv-img.ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-tint); color: var(--blue);
  max-width: none; margin: 0; aspect-ratio: auto; height: 110px; border-radius: 0;
}
.gv-img.ph svg.ic { color: var(--blue); }
.gv-body { padding: 14px 16px 16px; }
.gv-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue); font-weight: 800; font-size: 12.5px;
  letter-spacing: normal; margin-bottom: 6px;
}
.gv-badge svg.ic { color: var(--blue); width: 15px; height: 15px; }
.gv-title { font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.gv-prize {
  display: flex; align-items: center; gap: 7px; margin-top: 8px;
  font-weight: 700; color: var(--ink); font-size: 15px;
}
.gv-prize svg.ic { color: #1f9d55; }
.gv-desc { color: var(--muted); font-size: 14px; margin-top: 8px; white-space: pre-wrap; }
.gv-join { width: 100%; margin-top: 14px; }
.gv-joined {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: #e8f6ee; color: #1f8a4c; font-weight: 750;
}
.gv-winner {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  font-weight: 750; color: var(--ink);
}
.gv-winner svg.ic { color: var(--blue); }
.gv-count { color: var(--faint); font-size: 13px; margin-top: 8px; text-align: center; }
.ga-live {
  font-size: 11px; font-weight: 800; color: #1f8a4c;
  background: #e8f6ee; padding: 2px 8px; border-radius: 8px; vertical-align: middle;
}
.ga-photo-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
/* кнопка/экран участников */
.ent-open {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 6px 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font-weight: 650; font-size: 14px;
}
.ent-open svg.ic { color: var(--blue); }
.ent-list { max-height: 60vh; overflow-y: auto; margin-top: 6px; }
.ent-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px;
  border-bottom: 1px solid var(--line); font-size: 15px; }
.ent-row:last-child { border-bottom: none; }
.ent-num { width: 26px; color: var(--faint); font-size: 13px; font-weight: 700; flex: none; }
.ent-name { flex: 1; color: var(--ink); font-weight: 600; }
.ent-plat { color: var(--muted); font-size: 12px; font-weight: 700; }
/* барабан-раскрытие победителя */
.draw-anim { text-align: center; padding-bottom: 34px; }
.draw-name {
  font-size: 30px; font-weight: 850; color: var(--ink);
  margin: 26px 0 10px; min-height: 40px; line-height: 1.15;
  transition: transform .15s;
}
.draw-name.win {
  color: var(--blue); transform: scale(1.12);
  animation: winpop .5s ease;
}
@keyframes winpop {
  0% { transform: scale(.7); opacity: .3; }
  60% { transform: scale(1.22); }
  100% { transform: scale(1.12); }
}
.draw-sub { color: var(--muted); font-size: 14px; font-weight: 600; }
.gv-ends {
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.gv-ends svg.ic { color: var(--faint); }
.gv-org {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 11.5px; line-height: 1.45;
}
/* окно условий участия */
.gv-cond .gv-badge { margin-bottom: 2px; }
.gv-cond-note { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.gv-step {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line);
}
.gv-step-ic {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-tint); color: var(--blue);
  font-weight: 800; font-size: 13px; display: flex;
  align-items: center; justify-content: center;
}
.gv-step-ic.done { background: #1f9d55; color: #fff; }
.gv-step-body { flex: 1; font-size: 14px; }
.gv-step-body b { font-size: 14.5px; display: block; }
.gv-step-body span { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.btn.small {
  flex: none; width: auto; margin: 0; padding: 8px 14px;
  font-size: 13px; border-radius: 10px;
}
#gc-join { margin-top: 16px; }
#gc-join[disabled] { opacity: .5; }
@media (prefers-color-scheme: dark) {
  .gv-joined { background: #16321f; color: #57c77f; }
  .ga-live { background: #16321f; color: #57c77f; }
}

/* шторка объявления */
.overlay {
  position: fixed; inset: 0; z-index: 10; background: rgba(20,15,12,.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.overlay.hidden { display: none; }
.sheet {
  background: var(--page-bg); width: 100%; max-width: 480px; max-height: 92vh;
  border-radius: 20px 20px 0 0; overflow-y: auto; padding: 16px 16px 30px;
}
.sheet-close { float: right; border: 1px solid var(--card-border); background: var(--card);
  color: var(--muted); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0 12px; }
.gallery img { height: 230px; border-radius: 14px; }
.sheet h2 { font-family: var(--f-display); font-size: 21px; margin: 8px 0 4px; letter-spacing: .2px; }
.sheet .price { font-size: 19px; font-weight: 800; color: var(--blue); }
.sheet .desc { white-space: pre-wrap; margin: 12px 0; font-size: 15px; }
.kv { color: var(--muted); font-size: 14px; margin: 4px 0; display: flex; gap: 8px; align-items: center; }
.kv svg.ic { width: 17px; height: 17px; color: var(--faint); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 20;
  background: var(--ink); color: var(--page-bg); padding: 11px 18px;
  border-radius: 999px; font-size: 14.5px; max-width: 86vw; text-align: center;
  box-shadow: var(--card-shadow);
}
.toast.hidden { display: none; }
.loader { text-align: center; color: var(--faint); padding: 30px; }

/* правила — карточки-строки в стиле приветствия */
.rules-card { display: grid; gap: 10px; }
.frow {
  display: flex; gap: 14px; padding: 15px 16px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.frow-ic {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.frow-ic svg.ic { width: 22px; height: 22px; stroke-width: 1.7; }
.frow-ic.ok { background: var(--good-tint); color: var(--good); }
.frow-ic.no { background: var(--bad-tint); color: var(--bad); }
.frow-ic.warn { background: var(--warn-tint); color: var(--warn); }
.frow-ic.info { background: var(--blue-tint); color: var(--blue); }
.frow-body b { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 3px; }
.frow-body p { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* карточка автора */
.author-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 16px; margin-top: 12px;
}
.author-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.author-ava {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-tint); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.author-ava svg.ic { width: 26px; height: 26px; }
.author-head b { display: block; font-family: var(--f-display); font-size: 18px; color: var(--ink); }
.author-head span { font-size: 13px; color: var(--muted); }
.author-note { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin-bottom: 4px; text-align: center; }
.author-card .btn { margin-top: 14px; }
.author-link {
  display: block; text-align: center; margin-top: 12px; padding: 4px;
  color: var(--blue); font-size: 14.5px; font-weight: 600; text-decoration: none;
}

/* закреплённая «официальная» карточка (промо ДКП) — визуально отбита */
.pinned {
  background: var(--card); border: 2px solid var(--blue); border-radius: 16px;
  overflow: hidden; margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(239,86,54,.14);
}
.pinned-badge {
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .4px; padding: 6px 14px; display: flex; align-items: center; gap: 6px;
}
.pinned-badge svg.ic { width: 15px; height: 15px; stroke: #fff; }
.pinned-body { display: flex; gap: 12px; padding: 13px 14px 4px; }
.pinned-img { width: 78px; height: 78px; border-radius: 11px; object-fit: cover; flex: none; }
.pinned-img.ph { background: var(--blue-tint); color: var(--blue);
  display: flex; align-items: center; justify-content: center; }
.pinned-img.ph svg.ic { width: 34px; height: 34px; }
.pinned-main { min-width: 0; }
.pinned-title { font-size: 15.5px; font-weight: 650; color: var(--ink); }
.pinned-price { font-size: 16.5px; font-weight: 750; color: var(--blue); margin-top: 4px; }
.pinned-price span { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.pinned-seller { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.pinned-cta {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: calc(100% - 28px); margin: 8px 14px 0; padding: 12px; border: none;
  border-radius: 12px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: var(--btn-shadow);
}
.pinned-disc { font-size: 11.5px; line-height: 1.4; color: var(--faint); padding: 10px 14px 13px; }

/* истории (личный блог автора) */
.stories-bar { display: flex; gap: 14px; padding: 2px 2px 14px; overflow-x: auto;
  scrollbar-width: none; }
.stories-bar::-webkit-scrollbar { display: none; }
.story-circle { flex: none; border: none; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px; }
.story-ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px;
  background: var(--blue); display: flex; align-items: center; justify-content: center; }
.story-circle.seen .story-ring { background: var(--card-border); }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--page-bg); }
.story-ring svg.ic { width: 30px; height: 30px; color: #fff; stroke-width: 1.7; }
.story-name { font-size: 12px; color: var(--ink); max-width: 70px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.story-viewer { position: fixed; inset: 0; z-index: 40; background: #000;
  display: flex; flex-direction: column; }
.sv-bars { display: flex; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; }
.sv-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.32); overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar.done i { width: 100%; }
.sv-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 14px;
  z-index: 3; background: rgba(0,0,0,.4); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.sv-media { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sv-media img, .sv-media video { max-width: 100%; max-height: 100%; }
.sv-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 26px 20px calc(28px + env(safe-area-inset-bottom)); color: #fff;
  font-size: 15.5px; line-height: 1.45; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.sv-nav { position: absolute; top: 40px; bottom: 0; z-index: 1; }
.sv-prev { left: 0; width: 33%; }
.sv-next { right: 0; width: 67%; }

/* форма обратной связи */
.fb-note { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin-bottom: 12px; }
.fb-text {
  width: 100%; min-height: 130px; resize: vertical; padding: 13px;
  border: 1px solid var(--card-border); border-radius: 12px;
  background: var(--card); color: var(--ink); font-size: 16px; font-family: inherit;
}
.fb-text:focus { outline: none; border-color: var(--blue); }

/* жалоба на объявление */
.report-link {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 12px; padding: 10px; background: none; border: none;
  color: var(--faint); font-size: 13.5px;
}
.report-link svg.ic { width: 15px; height: 15px; }
.report-sheet {
  margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px;
}
.report-sheet h3 { font-size: 15px; margin-bottom: 10px; color: var(--ink); }
.report-opt {
  display: block; width: 100%; text-align: left; padding: 13px 14px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px;
  color: var(--ink); font-size: 15px;
}
.report-opt.cancel { color: var(--muted); text-align: center; border: none; background: none; }

/* онбординг (приветствие при первом запуске) */
.onb {
  position: fixed; inset: 0; z-index: 30; background: var(--page-bg);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
/* верхняя строка онбординга: знак слева, «Пропустить» справа. Единственное место
   в мини-аппе, где знак вообще может жить — шапки там нет (см. html:not(.web) .topbar). */
.onb-top { display: flex; align-items: center; padding: 14px 16px 0; }
.onb-logo { display: block; height: 26px; width: auto; color: var(--ink); }
.onb-skip {
  align-self: flex-end; margin: 14px 16px 0; padding: 6px 4px;
  background: none; border: none; color: var(--faint); font-size: 14.5px;
}
.onb-top .onb-skip { align-self: center; margin: 0 0 0 auto; }
.onb-body {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 0 32px;
}
.onb-badge {
  width: 92px; height: 92px; border-radius: 26px; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px; box-shadow: var(--btn-shadow);
}
.onb-badge svg.ic { width: 46px; height: 46px; stroke: #fff; stroke-width: 1.6; }
.onb-body h2 {
  font-family: var(--f-display); font-size: 26px; color: var(--ink);
  margin-bottom: 12px; letter-spacing: .2px;
}
.onb-body p { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 340px; }
.onb-dots { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.onb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--card-border); transition: width .2s; }
.onb-dot.on { background: var(--blue); width: 22px; border-radius: 4px; }
.onb-foot { padding: 0 24px calc(26px + env(safe-area-inset-bottom)); max-width: 480px; width: 100%; margin: 0 auto; }
.onb-foot .btn { margin-top: 0; }

/* ============ ДЕСКТОПНЫЙ САЙТ (только веб-версия .web на широком экране) ============ */
/* Класс .web ставится ТОЛЬКО для сайта в браузере; мини-аппы ВК/ТГ/MAX остаются
   мобильными (узкими) — их этот блок не касается. */
@media (min-width: 880px) {
  html.web body { padding-bottom: 24px; }

  /* широкая шапка: бренд слева, навигация справа */
  html.web .topbar { padding: 14px 32px; }
  html.web .topbar-in {
    max-width: 1140px; display: flex; align-items: center; gap: 24px;
  }
  html.web .brand-block { flex: 1; min-width: 0; }
  html.web .brand-title { font-size: 25px; }
  html.web .brand-sub { font-size: 13px; }

  /* нижний таббар → верхняя горизонтальная навигация (перенесён в шапку из JS) */
  html.web .topbar-in .tabbar {
    position: static; transform: none; width: auto; max-width: none;
    background: none; border-top: none; padding: 0; gap: 6px;
  }
  html.web .topbar-in .tabbar .tab {
    flex: none; flex-direction: row; gap: 8px; padding: 9px 15px;
    font-size: 14.5px; border-radius: 11px;
  }
  html.web .topbar-in .tabbar .tab .ic { width: 19px; height: 19px; }
  html.web .topbar-in .tabbar .tab.active { background: var(--blue-tint); }
  /* Бейдж: в мини-аппе вкладка вертикальная, и он висит абсолютом над иконкой.
     На сайте вкладка горизонтальная — тот же абсолют считается от центра широкой
     вкладки и улетает вверх (подрезается шапкой). Здесь он просто часть строки. */
  html.web .topbar-in .tabbar .tab .tab-badge {
    position: static; transform: none; margin-left: 2px;
    align-items: center; justify-content: center;
  }

  html.web main { max-width: 1140px; padding: 22px 32px 48px; }

  /* ── Админ-панель: рабочий инструмент, а не витрина ──────────────────────
     Здесь плотность важнее воздуха: модератор экран сканирует и действует,
     а не читает. Раскладка включается только на сайте и от 1100px; в мини-аппах
     остаётся мобильная стопка карточек (аварийный вход с телефона). */
  html.web.admin main { max-width: none; padding: 0; }
  html.web.admin .mod-shell {
    display: flex; height: calc(100vh - 66px); align-items: stretch;
  }
  /* лента вкладок разворачивается в вертикальный рельс слева */
  /* .mod-seg и #mod-body ниже по файлу зажаты в «узкую» колонку 640px по центру —
     для панели снимаем это, ширину задаёт раскладка */
  html.web.admin .mod-seg, html.web.admin #mod-body { max-width: none; margin: 0; }

  /* Знак админки — слева в шапке, ровно над рельсом. Топбар в админке распираем
     на всю ширину: иначе он центрируется в 1140px и знак повисает в пустоте
     вместо того, чтобы встать над панелью. */
  html.web.admin .topbar { padding-left: 21px; }
  html.web.admin .topbar-in { max-width: none; }
  html.web.admin .adm-brand {
    display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  }
  html.web.admin .adm-logo { height: 21px; width: auto; color: var(--ink); flex: none; }
  html.web.admin .adm-brand b {
    font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--faint);
  }
  html.web.admin .mod-seg-btn svg.ic { display: block; flex: none; opacity: .85; }
  html.web.admin .mod-seg-btn.active svg.ic { opacity: 1; }

  /* Статистика на всю ширину: раньше всё жалось в колонку 640px по центру,
     и за половиной цифр приходилось листать вниз при пустых полях по бокам.
     Воронка — на всю ширину сверху, остальное растекается по колонкам. */
  html.web.admin .stats > .st-hero > .stat-h,
  html.web.admin .stats > .st-hero > .stat-note { max-width: none; margin-left: 0; }
  html.web.admin .fn-wrap {
    display: flex; align-items: center; gap: 28px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 18px 22px;
  }
  html.web.admin .fn-wrap .fn { flex: 1; border: none; background: none; }
  /* Сетка, а не колонки: column-count лил разделы сверху вниз и переносил в
     следующую колонку, отрывая заголовок от его же цифр. Grid раскладывает
     блоки слева направо — порядок чтения предсказуемый. */
  html.web.admin .st-cols {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px; align-items: start; margin-top: 20px;
  }
  html.web.admin .st-sec > * { max-width: none; margin-left: 0; margin-right: 0; }
  html.web.admin .st-sec > .stat-h:first-child { margin-top: 0; }
  /* когортам нужна ширина: пять колонок процентов в 330px не помещаются */
  html.web.admin .st-sec.wide { grid-column: span 2; }
  @media (max-width: 780px) { html.web.admin .st-sec.wide { grid-column: span 1; } }
  html.web.admin .stat-grid { grid-template-columns: repeat(2, 1fr); }
  @media (max-width: 1080px) {
    html.web.admin .fn-wrap { flex-direction: column; align-items: stretch; }
  }
  html.web.admin .mod-seg {
    flex-direction: column; gap: 2px; width: 196px; flex: none;
    background: var(--card); border-right: 1px solid var(--line); padding: 14px 10px;
  }
  html.web.admin .mod-seg-btn {
    flex: none; justify-content: flex-start; align-items: center; gap: 9px;
    border: none; background: none; border-radius: 9px; padding: 9px 11px;
    font-size: 13.5px;
  }
  html.web.admin .mod-seg-btn:hover:not(.active) { background: var(--page-bg); color: var(--ink); }
  html.web.admin .mod-seg-btn.active { background: var(--blue-tint); color: var(--blue); }
  html.web.admin .mod-seg-btn .seg-n { margin-left: auto; }
  /* Отступы задаёт сам #mod-body: main в админке распёрт на всю ширину
     (padding: 0), и без этого содержимое липло к краям экрана. Очередь заявок —
     исключение: там раскладка сама рисует границы панелей. */
  html.web.admin #mod-body { flex: 1; min-width: 0; overflow: auto; padding: 20px 26px; }
  html.web.admin #mod-body > .mq { margin: -20px -26px; height: calc(100% + 40px); }

  /* очередь: список слева, разбор справа */
  .mq { display: flex; height: 100%; }
  .mq-list { width: 330px; flex: none; border-right: 1px solid var(--line);
    background: var(--card); overflow: auto; }
  .mq-row { display: flex; gap: 10px; padding: 11px 14px; cursor: pointer;
    border-bottom: 1px solid var(--line); }
  .mq-row:hover { background: var(--page-bg); }
  .mq-row.sel { background: var(--blue-tint); }
  .mq-th { width: 52px; height: 52px; border-radius: 8px; flex: none; object-fit: cover;
    background: var(--page-bg); }
  .mq-th.ph { display: flex; align-items: center; justify-content: center; color: var(--faint); }
  .mq-meta { min-width: 0; flex: 1; }
  .mq-t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; }
  .mq-p { font-size: 12.5px; font-weight: 700; margin-top: 1px; }
  .mq-s { font-size: 11.5px; color: var(--faint); margin-top: 2px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }
  .mq-flag { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 700;
    border-radius: 5px; padding: 2px 6px; background: var(--bad-tint); color: var(--bad); }

  .mq-det { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
  .mq-dh { padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--card);
    display: flex; align-items: center; gap: 9px; }
  .mq-cat { font-size: 13px; color: var(--muted); }
  .mq-id { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
  .mq-body { flex: 1; overflow: auto; padding: 16px 18px; display: flex; gap: 16px; }
  .mq-photos { width: 420px; flex: none; }
  /* фото крупно — нарушение живёт именно там (случай с препаратом на снимке) */
  .mq-main { width: 100%; height: 300px; object-fit: contain; border-radius: 12px;
    border: 1px solid var(--line); background: var(--card); cursor: zoom-in; display: block; }
  .mq-main.ph { display: flex; align-items: center; justify-content: center; color: var(--faint); }
  .mq-strip { display: flex; gap: 8px; margin-top: 8px; }
  .mq-tn { width: 76px; height: 60px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--line); cursor: pointer; display: block; }
  .mq-tn.on { border: 2px solid var(--blue); }
  .mq-hint { margin-top: 10px; background: var(--warn-tint); border: 1px solid #f0d9a8;
    border-radius: 9px; padding: 9px 11px; font-size: 12.5px; color: #8a5a10;
    display: flex; gap: 8px; align-items: flex-start; }
  .mq-hint svg { flex: none; margin-top: 1px; color: #8a5a10; }
  .mq-info { flex: 1; min-width: 0; }
  .mq-info h2 { font-size: 19px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 4px; }
  .mq-price { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
  .mq-desc { font-size: 13.5px; line-height: 1.5; color: var(--muted); background: var(--card);
    border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 12px;
    white-space: pre-wrap; }
  .mq-kv { display: flex; gap: 10px; font-size: 13px; color: var(--muted); padding: 6px 0;
    border-bottom: 1px solid var(--line); }
  .mq-kv b { color: var(--ink); font-weight: 600; margin-left: auto; text-align: right; }
  .mq-kv.warn b { color: var(--bad); }
  .mq-acts { border-top: 1px solid var(--line); background: var(--card); padding: 11px 18px;
    display: flex; align-items: center; gap: 9px; }
  .mq-acts .btn { margin-top: 0; width: auto; padding: 10px 18px; font-size: 13.5px;
    display: flex; align-items: center; gap: 7px; }
  .mq-ok { background: var(--good); }
  .mq-acts kbd { font: inherit; font-size: 10.5px; font-weight: 700; border-radius: 4px;
    padding: 1px 5px; background: rgba(255,255,255,.25); }
  .mq-acts .ghost kbd { background: var(--page-bg); color: var(--muted); }
  .mq-tip { font-size: 11.5px; color: var(--faint); margin-left: 10px; }
  .mq-tip kbd { background: var(--page-bg); border: 1px solid var(--line); color: var(--muted);
    margin-right: 3px; }
  .mq-ban { margin-left: auto; background: none; border: none; color: var(--bad);
    font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
  .mq-ban:hover { text-decoration: underline; }
  /* модалка причины внутри панели — прижимаем к правому краю разбора */
  .mq-det .report-sheet { position: absolute; right: 18px; bottom: 64px; left: auto;
    width: 340px; border-radius: 14px; box-shadow: 0 14px 40px rgba(60,45,30,.22); }

  /* лента — адаптивная сетка вертикальных карточек */
  html.web #feed-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px;
  }
  /* пустое состояние/лоадер — на всю ширину грида, а не в одну ячейку */
  html.web #feed-list .empty, html.web #feed-list .loader { grid-column: 1 / -1; }
  /* «Показать ещё» — тоже отдельная строка грида и по центру, иначе кнопка
     падает в первую колонку и выглядит прижатой влево */
  html.web #feed-list #more {
    grid-column: 1 / -1; justify-self: center;
    width: auto; min-width: 220px; margin-top: 8px;
  }
  html.web #feed-list .card {
    flex-direction: column; padding: 0; margin-bottom: 0; gap: 0; overflow: hidden;
    transition: transform .12s, box-shadow .12s;
  }
  html.web #feed-list .card:hover {
    transform: translateY(-2px); box-shadow: 0 12px 28px rgba(120,55,30,.15);
  }
  html.web #feed-list .card:active { transform: translateY(0); }
  html.web #feed-list .imgwrap { width: 100%; height: 176px; }
  html.web #feed-list .card-img { border-radius: 0; }
  /* нет фото → иконка категории по центру. В мини-аппе блок 86px и иконки 30px
     хватает, а здесь блок 176px — мелкая иконка терялась и плашка читалась пустой */
  html.web #feed-list .card-img.ph svg.ic { width: 58px; height: 58px; }
  html.web #feed-list .card-body { padding: 12px 14px 15px; }

  /* «узкие» экраны (форма, правила, статистика, вход) — по центру, не на всю ширину */
  html.web .filters, html.web .filter-row { max-width: 780px; }
  html.web .form, html.web .empty, html.web .fb-note, html.web .fb-text,
  html.web .mod-head, html.web .mod-seg, html.web #mod-body, html.web .stat-grid,
  html.web .stat-list, html.web .wk-chart, html.web .stat-h, html.web .stat-note,
  html.web .fn, html.web .gv-card {
    max-width: 640px; margin-left: auto; margin-right: auto;
  }

  /* правила — сетка карточек 2×2 вместо одинокой колонки */
  html.web .rules-card {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    background: none; border: none; box-shadow: none; padding: 0;
    max-width: 920px; margin: 0 auto 14px;
  }
  html.web .rules-card .frow {
    padding: 20px 22px; border-bottom: none; border: 1px solid var(--card-border);
    background: var(--card); border-radius: 16px; box-shadow: var(--card-shadow);
  }
  html.web .author-card { max-width: 920px; margin-left: auto; margin-right: auto; }

  /* карточка-шторка → центрированное модальное окно */
  html.web .overlay { align-items: center; padding: 20px; }
  html.web .sheet { max-width: 620px; border-radius: 20px; max-height: 88vh; }
  html.web .gallery img { height: 300px; }
}

/* ---- приветственный экран на «Доске» (сайт, Tilda-подобный, адаптивно) ---- */
html.web .web-hero {
  text-align: center; margin: -8px 0 24px; padding: 44px 20px 38px;
  background: linear-gradient(180deg, var(--blue-tint), transparent 80%);
  border-radius: 22px;
}
html.web .wh-title {
  font-family: var(--f-display); font-size: 29px; line-height: 1.12;
  color: var(--ink); letter-spacing: .3px;
}
html.web .wh-sub {
  font-size: 15.5px; color: var(--muted); margin: 14px auto 0;
  max-width: 600px; line-height: 1.55;
}
/* триггер-фраза «Без посредников и переплат» — акцент */
.trigger {
  color: var(--blue); font-weight: 700; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: 4px;
}
html.web .wh-cta-row {
  display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap;
}
html.web .wh-cta-row .btn { width: auto; margin: 0; padding: 14px 26px; }
/* hero — первый экран-лендинг; доска раскрывается по «Смотреть объявления» */
html.web .board-collapsed { display: none; }
html.web .web-hero {
  min-height: calc(100vh - 40px);
  display: flex; flex-direction: column; justify-content: center;
}
@media (min-width: 880px) {
  html.web .web-hero { min-height: calc(100vh - 66px); }
  html.web .web-hero .wh-steps { flex-wrap: nowrap; max-width: 740px; }  /* 3 шага в один ряд */
  html.web .web-hero .wh-step { max-width: none; }
}
/* мобильная вёрстка сайта (узкий экран) */
@media (max-width: 879px) {
  html.web .web-hero {
    margin: 0 -12px 18px; padding: 26px 16px 30px; border-radius: 0;
    min-height: calc(100vh - 16px);
  }
  html.web .web-hero .wh-title { font-size: 24px; line-height: 1.15; }
  html.web .web-hero .wh-sub { font-size: 14.5px; }
  html.web .web-hero .wh-cta-row { flex-direction: column; align-items: stretch; gap: 10px; }
  html.web .web-hero .wh-cta-row .btn { width: 100%; }
  html.web .web-hero .wh-steps { max-width: 360px; margin-top: 20px; gap: 10px; }
  html.web .web-hero .wh-step { flex-basis: 100%; max-width: none; padding: 12px 16px; }
  html.web .web-hero .wh-step-n { margin-bottom: 5px; }
  html.web .web-hero .wh-step b { font-size: 14.5px; }
}
html.web .wh-steps {
  display: flex; gap: 12px; justify-content: center; margin: 28px auto 0;
  max-width: 720px; flex-wrap: wrap;
}
html.web .wh-step {
  flex: 1 1 190px; max-width: 230px; background: var(--card);
  border: 1px solid var(--card-border); border-radius: 14px;
  box-shadow: var(--card-shadow); padding: 15px 14px;
}
html.web .wh-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-tint); color: var(--blue); font-weight: 800; margin-bottom: 7px;
}
html.web .wh-step b { display: block; font-size: 14px; color: var(--ink); }
html.web .wh-step > span:last-child {
  display: block; font-size: 12px; color: var(--muted); margin-top: 3px;
}
/* анимация шагов: появляются по очереди 1→2→3 (показываем порядок действий) */
@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
html.web .wh-step { opacity: 0; animation: stepIn .5s ease forwards; }
html.web .wh-step:nth-child(1) { animation-delay: .15s; }
html.web .wh-step:nth-child(2) { animation-delay: .40s; }
html.web .wh-step:nth-child(3) { animation-delay: .65s; }
/* и номера мягко пульсируют по кругу 1→2→3 — ведут взгляд по шагам */
@keyframes stepPulse {
  0%, 22%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,86,54,0); }
  8%  { transform: scale(1.16); box-shadow: 0 0 0 7px rgba(239,86,54,.16); }
}
html.web .wh-step-n { animation: stepPulse 3.6s ease-in-out infinite; }
html.web .wh-step:nth-child(1) .wh-step-n { animation-delay: 1.0s; }
html.web .wh-step:nth-child(2) .wh-step-n { animation-delay: 1.6s; }
html.web .wh-step:nth-child(3) .wh-step-n { animation-delay: 2.2s; }
@media (prefers-reduced-motion: reduce) {
  html.web .wh-step { opacity: 1; animation: none; }
  html.web .wh-step-n { animation: none; }
}

/* --- единый фирменный стиль страниц сайта --- */
html.web .page-head { text-align: center; max-width: 640px; margin: 4px auto 18px; }
html.web .page-head h1 {
  font-family: var(--f-display); font-size: 25px; color: var(--ink); letter-spacing: .2px;
}
html.web .page-head p { color: var(--muted); font-size: 14.5px; margin-top: 7px; line-height: 1.5; }
html.web .form {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 18px; box-shadow: var(--card-shadow); padding: 6px 24px 24px;
}
html.web #view > .card { max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---- полировка сайта на широком экране ---- */
@media (min-width: 880px) {
  html.web .web-hero {
    margin: -22px -32px 30px; padding: 66px 32px 54px; border-radius: 0 0 30px 30px;
  }
  html.web .wh-title { font-size: 42px; }
  html.web .wh-sub { font-size: 17.5px; max-width: 640px; }

  html.web .topbar { box-shadow: 0 1px 0 var(--line); }
  html.web .chip { transition: border-color .15s, background .15s; }
  html.web .chip:hover:not(.active) { border-color: var(--blue); }
  html.web .topbar-in .tab:hover:not(.active) { background: var(--line); color: var(--muted); }
  html.web .btn { transition: transform .1s, box-shadow .15s, opacity .15s; }
  html.web .btn:hover:not([disabled]) { transform: translateY(-1px); }
  html.web .mini-btn:hover, html.web .report-opt:hover,
  html.web .mod-seg-btn:hover:not(.active) { border-color: var(--blue); }
  html.web .empty { padding: 64px 20px; }
  html.web .sheet-close:hover { border-color: var(--blue); color: var(--blue); }
  html.web .page-head { margin: 8px auto 26px; }
  html.web .page-head h1 { font-size: 30px; }
}
