/* ТутНайду · вариант A «Витрина» — стили (mobile-first, светлая и тёмная тема).
   TutNaydu · variant A "Showcase" — styles (mobile-first, light and dark theme). */

/* ---------- Токены / Design tokens ---------- */
:root {
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #5B6472;
  --line: #E4E7EC;
  --line-2: #EEF0F3;
  --brand: #0E9F6E;            /* акцент «доверие» / trust accent */
  --brand-strong: #047857;     /* кнопки с белым текстом (AA) / buttons with white text (AA) */
  --brand-strong-h: #065F46;
  --brand-soft: #E6F6EF;
  --brand-ink: #047857;        /* зелёный текст / green text */
  --amber: #F59E0B;            /* цена и важное / price and important */
  --amber-soft: #FEF3C7;
  --amber-ink: #92400E;
  --danger: #DC2626;
  --danger-strong: #B91C1C;
  --danger-soft: #FEECEC;
  --danger-ink: #991B1B;
  --hero-grad: linear-gradient(135deg, #E3F5EC 0%, #F4FBF7 55%, #FFF7E6 100%);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .06);
  --shadow-lg: 0 14px 34px rgba(16, 24, 40, .14);
  --r-xl: 24px;
  --r-lg: 20px;
  --r: 16px;
  --r-sm: 12px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hdr-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1116;
    --card: #171B22;
    --ink: #E8ECF1;
    --ink-2: #C7CFD9;
    --muted: #9BA5B3;
    --line: #2A313B;
    --line-2: #20262E;
    --brand: #2BB989;
    --brand-soft: #0F2A21;
    --brand-ink: #4ADE9F;
    --amber-soft: #36270A;
    --amber-ink: #FCD34D;
    --danger-soft: #3A1517;
    --danger-ink: #FCA5A5;
    --hero-grad: linear-gradient(135deg, #10291F 0%, #151C1A 55%, #2A2110 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .28);
    --shadow-lg: 0 14px 34px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- База / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: var(--brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
h1:focus, main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); line-height: 1.4; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 1023px) { .desk-only { display: none !important; } .crumbs { display: none; } }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--brand-strong); color: #fff; border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 700; transition: top .15s; }
.skip:focus { top: 12px; }

/* ---------- Иконки / Icons ---------- */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-xs { width: 15px; height: 15px; }
.ic-s { width: 17px; height: 17px; }
.ic-l { width: 26px; height: 26px; }
.ic-xl { width: 34px; height: 34px; }
.ic-fill { fill: currentColor; stroke: none; }
.star { color: var(--amber); }
.ok { color: var(--brand-ink); }

/* ---------- Плашка варианта / Variant strip ---------- */
.strip { background: #06362A; color: #E6F6EF; font-size: 13px; }
.strip-in { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; min-height: 34px; padding-top: 4px; padding-bottom: 4px; line-height: 1.3; }
.strip a { color: #FFFFFF; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 12px 0; margin: -5px 0; white-space: nowrap; }
.strip span { min-width: 0; }

/* ---------- Шапка / Header ---------- */
.hdr { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: saturate(1.5) blur(12px); -webkit-backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--line); }
.hdr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0 10px; }
.logo { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--brand-strong); display: grid; place-items: center; }
.logo-mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.logo-txt { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.city { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border: 0; background: none; border-radius: 12px; font-weight: 600; color: var(--ink-2); }
.city:hover { background: var(--line-2); }
.search { order: 3; flex: 1 1 100%; min-width: 0; display: flex; align-items: center; gap: 4px; min-height: 50px; padding: 3px 3px 3px 12px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 15px; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-ic { color: var(--muted); }
.search input { flex: 1; min-width: 0; width: 0; height: 42px; border: 0; background: transparent; outline: none; font-size: 16px; padding: 0 4px; }
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--muted); }
.search-mic { width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--muted); display: grid; place-items: center; }
.search-mic:hover { background: var(--line-2); color: var(--ink); }
.search-mic.listening { color: #fff; background: var(--danger-strong); animation: pulse 1s infinite; }
.search-btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--brand-strong); color: #fff; font-weight: 700; transition: background .15s; }
.search-btn:hover { background: var(--brand-strong-h); }
.hdr-nav { display: none; }
.mbar { display: none; align-items: center; gap: 6px; min-height: 56px; }
.mbar-title { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbadge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger-strong); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }

@media (max-width: 1023px) {
  body.has-back .hdr-row { display: none; }
  body.has-back .mbar { display: flex; }
  body.no-search .search { display: none; }
  body.no-search .hdr-row { padding-bottom: 8px; }
}

/* ---------- Нижнее меню / Bottom tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--card) 96%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border: 0; background: none; border-radius: 14px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; transition: color .15s; }
.tabbar a[aria-current="page"] { color: var(--brand-ink); }
.tabbar a[aria-current="page"] .ic { stroke-width: 2.4; }
.tabbar .nbadge { position: absolute; top: 4px; left: calc(50% + 6px); }
.tab-plus { width: 46px; height: 32px; border-radius: 12px; background: var(--brand-strong); color: #fff; display: grid; place-items: center; }
.tab-post { color: var(--ink) !important; }
body.no-tabbar .tabbar { display: none; }

main { padding-top: 12px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); min-height: 60vh; }
body.has-mcta main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* ---------- Кнопки / Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 13px; border: 1.5px solid transparent; font-weight: 700; font-size: 15.5px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand-strong); color: #fff; }
.btn-primary:hover { background: var(--brand-strong-h); }
.btn-secondary { background: var(--brand-soft); color: var(--brand-ink); }
.btn-secondary:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-amber { background: var(--amber); color: #241500; }
.btn-danger { background: var(--danger-strong); color: #fff; }
.btn-danger:hover { background: #991B1B; }
.btn-lg { min-height: 52px; font-size: 16.5px; padding: 0 22px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--ink); flex: none; }
.icon-btn:hover { background: var(--line-2); }
.link { border: 0; background: none; padding: 10px 0; min-height: 44px; color: var(--brand-ink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Бейджи и чипы / Badges and chips ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 650; line-height: 1.2; background: var(--line-2); color: var(--ink-2); }
.b-ok { background: var(--brand-soft); color: var(--brand-ink); }
.b-amber { background: var(--amber-soft); color: var(--amber-ink); }
.b-danger { background: var(--danger-soft); color: var(--danger-ink); }
.b-line { background: transparent; border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"], .chip[aria-checked="true"], .chip.on { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.chip .cnt:not(:empty) { min-width: 20px; height: 20px; border-radius: 10px; background: var(--brand-strong); color: #fff; font-size: 12px; display: inline-grid; place-items: center; padding: 0 5px; }

/* ---------- Карточки-обёртки / Card containers ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.sec { margin-top: 30px; }
.sec-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.sec-h p { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.sec-h a { font-weight: 650; text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.sec-h a:hover { text-decoration: underline; }

/* ---------- Сегменты и герой / Segments and hero ---------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 4px 6px; border: 0; border-radius: 14px; background: none; color: var(--ink-2); font-weight: 700; font-size: 14.5px; line-height: 1.15; text-align: center; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button:hover { background: var(--line-2); }
.seg button[aria-selected="true"] { background: var(--brand-strong); color: #fff; }
@media (max-width: 399px) { .seg button .ic { display: none; } .seg button { font-size: 14px; } }
.hero { margin-top: 12px; padding: 20px 18px; border-radius: var(--r-xl); background: var(--hero-grad); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: relative; overflow: hidden; animation: fadeUp .25s var(--ease); }
.hero h2 { font-size: 22px; font-weight: 800; }
.hero p { color: var(--ink-2); margin-top: 6px; max-width: 560px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { display: none; }
.hero-txt { display: grid; gap: 14px; min-width: 0; }
@media (max-width: 639px) {
  .hero { gap: 14px; padding: 18px 16px; }
  .hero h2 { font-size: 20px; }
  .hero p { font-size: 15px; }
  .hero-btns .btn-lg { min-height: 48px; font-size: 15.5px; padding: 0 16px; }
  .hero .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .hero .chips::-webkit-scrollbar { display: none; }
}
.hero-idx { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hero-idx li { display: flex; justify-content: space-between; gap: 10px; background: color-mix(in srgb, var(--card) 75%, transparent); padding: 10px 12px; border-radius: 12px; font-size: 14.5px; }
.hero-idx b { white-space: nowrap; }

/* ---------- Категории / Categories ---------- */
.cats { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 112px; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.cats::-webkit-scrollbar, .rail::-webkit-scrollbar, .quick::-webkit-scrollbar, .qr::-webkit-scrollbar, .days::-webkit-scrollbar { display: none; }
.cat { scroll-snap-align: start; display: flex; flex-direction: column; gap: 5px; min-height: 116px; padding: 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cat-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; line-height: 1; background: var(--amber-soft); margin-bottom: 2px; }
.cat.service .cat-ic { background: var(--brand-soft); }
.cat b { font-size: 14px; line-height: 1.2; }
.cat small { font-size: 12px; line-height: 1.25; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--amber); }
.legend i.s { background: var(--brand); }

/* ---------- Ленты и сетки / Rails and grids ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(156px, 44vw, 210px); gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* ---------- Карточка товара/мастера / Product & pro card ---------- */
.pc { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; transition: transform .18s var(--ease), box-shadow .18s var(--ease); animation: fadeUp .25s var(--ease) both; }
.pc:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pc:has(.pc-title a:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.pc-title a:focus-visible { outline: none; }
.pc-media { position: relative; aspect-ratio: 1 / 1; background: var(--line-2); overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.pc:hover .pc-media img { transform: scale(1.04); }
.pc-kind { position: absolute; top: 9px; left: 9px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 750; background: rgba(255, 255, 255, .94); color: #92400E; letter-spacing: .01em; }
.pc-kind.svc { color: #065F46; }
.fav { position: absolute; top: 2px; right: 2px; z-index: 2; width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: #1F2937; }
.fav span { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fav:hover span { transform: scale(1.08); }
.fav[aria-pressed="true"] { color: #E11D48; }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.pc-free { position: absolute; left: 8px; bottom: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: calc(100% - 16px); padding: 4px 9px; border-radius: 999px; background: rgba(4, 120, 87, .94); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-free.later { background: rgba(17, 24, 39, .78); }
.pc-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.pc-price { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.pc-price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 1px; }
.pc-price .unit { font-size: 14px; font-weight: 600; color: var(--muted); }
.pc-title { font-size: 14.5px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-title a { color: var(--ink); text-decoration: none; }
.pc-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pc-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.pc-seller { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 4px; min-width: 0; }
.pc-seller span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-seller .ic { color: var(--brand-ink); }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 700; }
.rating .ic { width: 15px; height: 15px; }
.pc-ad { position: relative; z-index: 2; margin: 2px -4px -6px; }
.ad-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; }
.ad-btn:hover { color: var(--ink); }
.pc.is-ad { box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--amber) 55%, transparent); }
.pc.compact .pc-price { font-size: 16.5px; }
.pc.compact .pc-title { font-size: 14px; }

/* Карточка проверенного продавца / Verified seller card */
.vcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.vcard-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vcard h3 { font-size: 15px; }
.vcard h3 a { color: var(--ink); text-decoration: none; }
.vcard h3 a::after { content: ''; position: absolute; inset: 0; }
.vcard-top div span { font-size: 12.5px; color: var(--muted); }
.vcard-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }

/* Аватары / Avatars */
.ava { border-radius: 50%; object-fit: cover; flex: none; background: var(--line-2); }
.ava-ini { display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.ava-xs { width: 20px; height: 20px; font-size: 9px; }
.ava-s { width: 36px; height: 36px; font-size: 13px; }
.ava-m { width: 44px; height: 44px; font-size: 15px; }
.ava-l { width: 52px; height: 52px; font-size: 17px; }
.ava-xl { width: 76px; height: 76px; font-size: 24px; border: 4px solid var(--card); }

/* CTA-карточка внутри выдачи / CTA card inside results */
.cta-card { display: flex; flex-direction: column; gap: 8px; justify-content: center; padding: 18px; border-radius: var(--r-lg); background: var(--hero-grad); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, transparent); }
.cta-card .ic-l { color: var(--brand-ink); }
.cta-card b { font-size: 16px; }
.cta-card span { font-size: 14px; color: var(--ink-2); }
.cta-card .btn { color: #fff; font-size: 15px; }
.cta-card .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- Как работает гарантия / How the guarantee works ---------- */
.how { margin-top: 30px; padding: 20px 18px; }
.how-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.how ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 18px; }
.how li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 3px 14px; }
.how li:not(:last-child)::after { content: ''; position: absolute; left: 25px; top: 56px; bottom: -14px; width: 2px; background: linear-gradient(var(--brand), color-mix(in srgb, var(--brand) 15%, transparent)); }
.how-ic { grid-row: span 2; position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.how-ic i { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); color: #241500; font-style: normal; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); }
.how li b { font-size: 16px; align-self: end; }
.how li span { color: var(--muted); font-size: 14.5px; }
.how-note { margin-top: 16px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); color: var(--amber-ink); font-size: 14px; font-weight: 600; }

/* Почему здесь спокойно / Trust strip */
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 30px; }
.trust div { padding: 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); display: grid; gap: 6px; align-content: start; }
.trust .ic { color: var(--brand-ink); }
.trust b { font-size: 14.5px; }
.trust span { font-size: 13px; color: var(--muted); }
.foot { margin-top: 32px; padding: 18px 0 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Поиск / Search ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span[aria-current] { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.srch-head { margin-bottom: 12px; }
.srch-head p { margin-top: 4px; }
.srch-bar { display: grid; gap: 10px; margin-bottom: 14px; }
.kind { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 4px; padding: 4px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); justify-self: start; }
.kind button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: 14.5px; color: var(--ink-2); }
.kind button[aria-checked="true"] { background: var(--ink); color: var(--card); }
.quick { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.srch-grid { display: block; }
.sort-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; font-size: 14px; }
.sort-row label { color: var(--muted); }
.select { min-height: 44px; padding: 0 36px 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6472' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 18px; appearance: none; -webkit-appearance: none; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.sort-row .link { margin-left: auto; font-size: 13.5px; }

/* Фильтры: лист на телефоне / Filters: sheet on phones */
.filters { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 86vh; overflow-y: auto; background: var(--card); border-radius: 24px 24px 0 0; padding: 6px 18px calc(16px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); transform: translateY(105%); visibility: hidden; transition: transform .25s var(--ease), visibility .25s; }
.filters.open { transform: none; visibility: visible; }
.fback { position: fixed; inset: 0; z-index: 65; background: rgba(8, 12, 18, .45); animation: fadeIn .2s; }
.f-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -6px; background: var(--card); padding: 10px 0 6px; z-index: 1; }
.fgroup { border: 0; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line-2); display: grid; gap: 10px; }
.fgroup legend, .fgroup > label { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 2px; float: left; width: 100%; }
.fgroup legend + * { clear: both; }
.fgroup .select { width: 100%; }
.price-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea.input { padding: 12px 14px; min-height: 120px; resize: vertical; line-height: 1.45; }
.fgroup .chips .chip { min-height: 44px; font-size: 13.5px; padding: 0 12px; }
.f-foot { position: sticky; bottom: -16px; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 14px 0 4px; background: var(--card); }

/* Переключатель / Switch */
.sw { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-txt b { display: block; font-weight: 600; font-size: 15px; }
.sw-txt small { color: var(--muted); font-size: 12.5px; }
.sw-ui { grid-column: 2; grid-row: 1; width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .2s; }
.sw-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.sw input:checked + .sw-ui { background: var(--brand-strong); }
.sw input:checked + .sw-ui::after { transform: translateX(20px); }
.sw input:focus-visible + .sw-ui { outline: 3px solid var(--brand); outline-offset: 2px; }
.sw .sw-txt { grid-column: 1; grid-row: 1; }

.empty { grid-column: 1 / -1; text-align: center; padding: 36px 18px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: center; }
.empty-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--line-2); display: grid; place-items: center; color: var(--muted); }
.empty p { max-width: 440px; color: var(--muted); }

/* ---------- Деталь товара/мастера / Item & pro detail ---------- */
.det { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.gallery { position: relative; margin: 0 -16px; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; max-height: 70vh; object-fit: cover; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--line-2); }
.gal-tools { position: absolute; top: 10px; right: 26px; display: flex; gap: 8px; }
.gal-tools .fav { position: static; }
.gal-count { position: absolute; left: 26px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(17, 24, 39, .7); color: #fff; font-size: 12.5px; font-weight: 600; }
.det-side { display: grid; gap: 14px; align-content: start; }
.det-buy { padding: 18px; display: grid; gap: 12px; }
.det-buy h1 { font-size: 21px; font-weight: 700; line-height: 1.25; }
.det-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.det-price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.det-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13.5px; }
.det-meta span { display: inline-flex; align-items: center; gap: 4px; }
.det-cta { display: grid; gap: 10px; }
.det-sec { padding: 18px; display: grid; gap: 12px; }
.det-sec p { color: var(--ink-2); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14.5px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }

/* ИИ-вилка цены / AI price range */
.fork { padding: 14px; border-radius: var(--r); background: color-mix(in srgb, var(--amber) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); display: grid; gap: 10px; }
.fork-h { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; }
.fork-h .ic { color: var(--amber-ink); margin-top: 1px; }
.fork-v { display: flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 650; }
.fork-v.ok { color: var(--brand-ink); }
.fork-v.warn { color: var(--amber-ink); }
.meter { padding-top: 4px; }
.meter-track { position: relative; height: 10px; border-radius: 999px; background: var(--line); }
.meter-zone { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: color-mix(in srgb, var(--brand) 55%, transparent); }
.meter-med { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--brand-ink); }
.meter-dot { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); border: 3px solid var(--card); box-shadow: 0 1px 5px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); transition: left .25s var(--ease); }
.meter-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* Продавец / Seller */
.seller { padding: 18px; display: grid; gap: 12px; }
.seller-top { display: flex; align-items: center; gap: 12px; }
.seller-top b { font-size: 16.5px; display: block; }
.seller-top div span { font-size: 13.5px; color: var(--muted); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts .ic { color: var(--brand-ink); }
.facts .star { color: var(--amber); }

/* Связанные услуги / Related services */
.related { padding: 18px; display: grid; gap: 12px; background: var(--hero-grad); }
.related h2 { display: flex; gap: 8px; align-items: center; }
.rel { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; padding: 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.rel img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; }
.rel-txt { display: grid; gap: 2px; min-width: 0; }
.rel-txt b { font-size: 15.5px; }
.rel-txt span { font-size: 13.5px; color: var(--muted); }
.rel-price { color: var(--ink) !important; font-weight: 800; font-size: 16px !important; }
.rel .btn { grid-column: 1 / -1; }

/* Липкая панель действий на телефоне / Sticky mobile action bar */
.mcta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 97%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); animation: slideUp .25s var(--ease); }
.mcta-price { display: grid; line-height: 1.15; margin-right: auto; min-width: 0; }
.mcta-price b { font-size: 18px; font-weight: 800; white-space: nowrap; }
.mcta-price small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcta .btn { flex: none; }

/* ---------- Оформление / Checkout ---------- */
.narrow { max-width: 680px; margin: 0 auto; display: grid; gap: 14px; }
.co-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px; }
.co-item img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.co-item b { font-size: 15px; }
.co-item span:not(.badge) { font-size: 13px; color: var(--muted); display: block; }
.co-sec { padding: 18px; display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--muted); }
.opt:has(input:checked) { border-color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-ui { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.opt input:checked + .opt-ui { border-color: var(--brand-strong); }
.opt input:checked + .opt-ui::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-strong); }
.opt input[type="checkbox"] + .opt-ui { border-radius: 7px; }
.opt input[type="checkbox"]:checked + .opt-ui { background: var(--brand-strong); }
.opt input[type="checkbox"]:checked + .opt-ui::after { width: 6px; height: 11px; border-radius: 0; background: none; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.opt:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.opt-txt b { display: block; font-size: 15px; }
.opt-txt small { font-size: 13px; color: var(--muted); }
.opt-price { font-weight: 700; white-space: nowrap; }
.bd { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-size: 15px; }
.bd dt { color: var(--ink-2); }
.bd dd { margin: 0; text-align: right; font-weight: 600; white-space: nowrap; }
.bd .muted-row { color: var(--muted); font-size: 13.5px; }
.bd .total { font-size: 19px; font-weight: 800; color: var(--ink); padding-top: 10px; border-top: 1px solid var(--line); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--line-2); font-size: 14.5px; }
.callout > .ic { margin-top: 1px; }
.callout.ok { background: var(--brand-soft); }
.callout.ok > .ic { color: var(--brand-ink); }
.callout.warn { background: var(--amber-soft); }
.callout.warn > .ic { color: var(--amber-ink); }
.callout.danger { background: var(--danger-soft); }
.callout.danger > .ic { color: var(--danger-ink); }
.callout p { color: var(--ink); }
.faq summary { cursor: pointer; font-weight: 700; min-height: 28px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; color: var(--muted); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--ink-2); font-size: 14.5px; }

/* Успех и таймлайн / Success and timeline */
.success { text-align: center; padding: 26px 18px; display: grid; gap: 10px; justify-items: center; }
.success-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-strong); color: #fff; animation: pop .45s var(--ease) both; box-shadow: 0 0 0 10px var(--brand-soft); margin-bottom: 8px; }
.success-ic .ic { width: 40px; height: 40px; stroke-width: 2.6; }
.success p { color: var(--ink-2); max-width: 480px; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; padding-bottom: 18px; }
.tl li::before { content: ''; position: absolute; left: 16px; top: 36px; bottom: 2px; width: 2px; background: var(--line); }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::before { display: none; }
.tl li.done::before { background: var(--brand); }
.tl-dot { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 800; transition: background .25s, border-color .25s; }
.tl li.done .tl-dot { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.tl li.now .tl-dot { background: var(--amber); border-color: var(--amber); color: #241500; animation: ring 1.6s infinite; }
.tl b { font-size: 15.5px; align-self: center; }
.tl span { color: var(--muted); font-size: 14px; }
.tl li.next b { color: var(--muted); font-weight: 600; }

/* ---------- Мастер / Pro profile ---------- */
.pro-cover { margin: 0 -16px; }
.pro-cover img { width: 100%; height: 200px; object-fit: cover; object-position: 50% 30%; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.pro-head { padding: 0 18px 18px; margin: -44px 10px 0; position: relative; display: grid; gap: 12px; }
.pro-id { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; }
.pro-id .ava-xl { margin-top: -30px; box-shadow: var(--shadow); }
.pro-id > div { padding-top: 12px; min-width: 0; }
.pro-id h1 { font-size: 22px; }
.pro-id p { color: var(--muted); font-size: 14.5px; }
.pro-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 5px 10px; border-radius: 10px; background: var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.prices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.prow { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.prow:hover { border-color: var(--muted); }
.prow:has(input:checked) { border-color: var(--brand-strong); background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.prow:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.prow input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prow-main b { display: block; font-size: 15px; }
.prow-main small { display: block; font-size: 12.5px; color: var(--muted); }
.prow-main .vs { display: inline-block; margin-top: 3px; }
.prow-price { text-align: right; font-weight: 800; font-size: 16px; white-space: nowrap; }
.vs { display: block; font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.vs.ok { color: var(--brand-ink); }
.vs.warn { color: var(--amber-ink); }
.book { padding: 18px; display: grid; gap: 14px; }
.book-svc { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--line-2); }
.book-svc span { font-size: 12.5px; color: var(--muted); }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); gap: 8px; overflow-x: auto; scrollbar-width: none; }
.day { min-height: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); display: grid; align-content: center; justify-items: center; gap: 1px; padding: 6px; }
.day b { font-size: 14.5px; }
.day small { font-size: 12px; color: var(--muted); }
.day[aria-selected="true"] { border-color: var(--brand-strong); background: var(--brand-strong); color: #fff; }
.day[aria-selected="true"] small { color: #E6F6EF; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 15px; transition: background .15s, border-color .15s; }
.slot:hover:not([disabled]) { border-color: var(--brand); }
.slot[aria-pressed="true"] { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.slot[disabled] { color: var(--muted); text-decoration: line-through; background: var(--line-2); border-color: transparent; cursor: not-allowed; opacity: .7; }
.slots-empty { grid-column: 1 / -1; padding: 12px; text-align: center; color: var(--muted); font-size: 14px; background: var(--line-2); border-radius: 12px; }
.book-sum { display: grid; gap: 6px; font-size: 14.5px; }
.book-sum div { display: flex; gap: 8px; align-items: center; }
.book-sum .ic { color: var(--brand-ink); }
.guar ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.guar li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.guar li .ic { color: var(--brand-ink); margin-top: 1px; }
.rev-sum { display: flex; align-items: center; gap: 14px; }
.rev-sum .big { font-size: 40px; font-weight: 800; line-height: 1; }
.rev { padding: 14px 0; border-top: 1px solid var(--line-2); display: grid; gap: 6px; }
.rev-h { display: flex; align-items: center; gap: 10px; }
.rev-h .muted { font-size: 13px; margin-left: auto; }
.rev-stars { color: var(--amber); letter-spacing: 2px; font-size: 15px; }
.rev p { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Мастер-сценарии: заказ и продажа / Flows: order and sell ---------- */
.flow { max-width: 720px; margin: 0 auto; display: grid; gap: 16px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stepper li { display: grid; gap: 6px; font-size: 12px; font-weight: 650; color: var(--muted); }
.stepper li::before { content: ''; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s; }
.stepper li.done::before { background: var(--brand); }
.stepper li.now { color: var(--ink); }
.stepper li.now::before { background: var(--amber); }
.flow-h p { color: var(--muted); margin-top: 6px; }
.ta-wrap { padding: 6px; position: relative; }
.ta-wrap textarea { border: 0; box-shadow: none !important; min-height: 130px; font-size: 17px; background: transparent; }
.ta-bar { display: flex; align-items: center; gap: 10px; padding: 6px 8px 8px; border-top: 1px solid var(--line-2); }
.mic-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; transition: background .2s, transform .15s; }
.mic-btn:hover { transform: scale(1.05); }
.mic-btn[aria-pressed="true"] { background: var(--danger-strong); color: #fff; animation: pulse 1s infinite; }
.ta-hint { font-size: 14px; color: var(--muted); }
.listening { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--danger-ink); }
.wave { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.wave i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: wave .9s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; } .wave i:nth-child(4) { animation-delay: .45s; }
.field-err { color: var(--danger-ink); font-size: 14px; font-weight: 600; }
.examples { display: grid; gap: 8px; }
.examples > span { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.assure { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.assure li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.assure .ic { color: var(--brand-ink); margin-top: 1px; }
.think-card { padding: 22px 18px; display: grid; gap: 16px; }
.think-h { display: flex; align-items: center; gap: 12px; }
.think-orb { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-strong), #0EA5A0 60%, var(--amber)); background-size: 200% 200%; animation: orb 2s ease-in-out infinite; flex: none; }
.think { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.think li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 15px; transition: color .2s; }
.think li .st { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--brand); flex: none; animation: spin .8s linear infinite; display: grid; place-items: center; }
.think li.wait .st { animation: none; border-color: var(--line); }
.think li.done { color: var(--ink); }
.think li.done .st { animation: none; background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.think li.done .st .ic { width: 14px; height: 14px; stroke-width: 3; }
.parse { padding: 18px; display: grid; gap: 14px; }
.parse-quote { font-size: 15px; color: var(--ink-2); padding: 12px 14px; background: var(--line-2); border-radius: 14px; font-style: italic; }
.parse-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.parse-grid div { padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); animation: fadeUp .3s var(--ease) both; }
.parse-grid div:nth-child(2) { animation-delay: .06s; } .parse-grid div:nth-child(3) { animation-delay: .12s; } .parse-grid div:nth-child(4) { animation-delay: .18s; }
.parse-grid dt { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.parse-grid dt .ic { color: var(--brand-ink); }
.parse-grid dd { margin: 4px 0 0; font-weight: 700; font-size: 15.5px; }
.parse-grid dd small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.idx-box { padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--amber) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); display: grid; gap: 8px; }
.idx-nums { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.idx-nums b { color: var(--ink); display: block; font-size: 15px; }
.idx-nums div:nth-child(2) { text-align: center; } .idx-nums div:nth-child(3) { text-align: right; }
.offer { padding: 16px; display: grid; gap: 10px; animation: fadeUp .35s var(--ease) both; }
.offer-top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.offer-top a { color: var(--ink); text-decoration: none; font-weight: 750; font-size: 16px; }
.offer-top a:hover { text-decoration: underline; }
.offer-top div > span { display: block; font-size: 13px; color: var(--muted); }
.offer-price { text-align: right; font-size: 20px; font-weight: 800; white-space: nowrap; }
.offer-price small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.offer-note { font-size: 14.5px; color: var(--ink-2); padding: 10px 12px; background: var(--line-2); border-radius: 12px; }
.offer.best { box-shadow: var(--shadow), inset 0 0 0 2px var(--brand); }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14.5px; padding: 6px 2px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
.who { padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.who b { display: block; }
.who > div > span { font-size: 13.5px; color: var(--muted); }
.who .row { grid-column: 1 / -1; }
.who .row .btn { flex: 1; }
.stars-in { display: flex; gap: 6px; }
.stars-in button { width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--line-2); color: var(--muted); display: grid; place-items: center; transition: transform .15s, color .15s, background .15s; }
.stars-in button svg { width: 26px; height: 26px; }
.stars-in button.on { color: var(--amber); background: var(--amber-soft); }
.stars-in button:hover { transform: scale(1.08); }

/* Продажа по фото / Sell by photo */
.camera { display: grid; justify-items: center; gap: 10px; padding: 30px 18px; border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 4%, var(--card)); border-radius: var(--r-xl); width: 100%; text-align: center; color: var(--ink); transition: background .2s, border-color .2s; }
.camera:hover { background: color-mix(in srgb, var(--brand) 9%, var(--card)); border-color: var(--brand); }
.camera-ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--brand-strong); color: #fff; }
.camera b { font-size: 18px; }
.camera span { font-size: 14px; color: var(--muted); }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pick { position: relative; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--line-2); aspect-ratio: 1 / 1; box-shadow: var(--shadow); transition: transform .18s var(--ease), box-shadow .18s; }
.pick:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-lg); }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick span { position: absolute; left: 6px; bottom: 6px; padding: 3px 8px; border-radius: 999px; background: rgba(17, 24, 39, .72); color: #fff; font-size: 12px; font-weight: 650; }
.scan { padding: 16px; display: grid; gap: 16px; }
.scan-img { position: relative; border-radius: 18px; overflow: hidden; max-width: min(340px, 72vw); width: 100%; margin: 0 auto; aspect-ratio: 1 / 1; }
.scan-img img { width: 100%; height: 100%; object-fit: cover; }
.scan-line { position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand) 45%, transparent) 85%, #6EE7B7); animation: scan 1.6s ease-in-out infinite; }
.scan-box { position: absolute; inset: 14%; border: 2.5px solid #6EE7B7; border-radius: 16px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18); animation: fadeIn .6s .5s both; }
.sell-form { padding: 18px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > label, .field > .lbl { font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 3px 8px; border-radius: 999px; }
.ai-tag .ic { width: 13px; height: 13px; }
.recog { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--brand-soft); }
.recog img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.recog b { display: block; }
.recog span { font-size: 13.5px; color: var(--ink-2); }
.price-in { display: flex; align-items: center; gap: 8px; }
.price-in .input { font-size: 22px; font-weight: 800; max-width: 200px; }
.days-hint { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; }
.days-hint .ic { color: var(--brand-ink); }
.free-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); color: var(--amber-ink); font-weight: 650; font-size: 14.5px; }

/* ---------- Сообщения / Messages ---------- */
.chat { display: grid; gap: 14px; }
.chat-list { display: grid; gap: 8px; align-content: start; }
.chat-list h1, .chat-h { margin-bottom: 4px; font-size: 24px; font-weight: 800; }
.ch-items { display: grid; gap: 8px; }
.ch-item { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: background .15s; }
.ch-item:hover { background: color-mix(in srgb, var(--brand) 4%, var(--card)); }
.ch-item[aria-current="page"] { box-shadow: var(--shadow), inset 0 0 0 2px var(--brand); }
.ch-mid { min-width: 0; display: grid; gap: 1px; }
.ch-mid b { font-size: 15px; display: flex; gap: 6px; align-items: center; }
.ch-mid span { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-right { display: grid; justify-items: end; gap: 4px; font-size: 12px; color: var(--muted); }
.ch-ava { position: relative; }
.ch-ava img.thumb { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--card); object-fit: cover; }
.conv { display: flex; flex-direction: column; min-width: 0; }
.conv-h { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px 14px; }
.conv-h b { display: block; font-size: 16px; }
.conv-h div span { font-size: 13px; color: var(--muted); }
.conv-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; margin-top: 8px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.conv-item img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.conv-item b { font-size: 14.5px; display: block; }
.conv-item span { font-size: 13px; color: var(--muted); }
.msgs { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; }
.bub { max-width: 84%; padding: 10px 14px 8px; border-radius: 20px; font-size: 15.5px; line-height: 1.4; animation: fadeUp .22s var(--ease) both; overflow-wrap: anywhere; }
.bub time { display: block; text-align: right; font-size: 11.5px; opacity: .72; margin-top: 3px; }
.bub.them { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bub.me { align-self: flex-end; background: var(--brand-strong); color: #fff; border-bottom-right-radius: 6px; }
.bub.flag { box-shadow: var(--shadow), inset 0 0 0 2px var(--danger); }
.flag-tag { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 750; color: var(--danger-ink); margin-bottom: 4px; }
.sys { align-self: center; max-width: 92%; text-align: center; font-size: 12.5px; color: var(--muted); background: var(--line-2); padding: 6px 12px; border-radius: 14px; animation: fadeUp .22s var(--ease) both; }
.link-blocked { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 6px; background: var(--danger-soft); color: var(--danger-ink); font-weight: 700; text-decoration: line-through; white-space: nowrap; }
.link-blocked .ic { width: 13px; height: 13px; }
.masked { padding: 0 6px; border-radius: 6px; background: var(--line-2); font-weight: 700; white-space: nowrap; }
.guard { align-self: stretch; padding: 16px; border-radius: 20px; background: var(--danger-soft); border: 1.5px solid color-mix(in srgb, var(--danger) 45%, transparent); display: grid; gap: 10px; animation: fadeUp .3s var(--ease) both; }
.guard-h { display: flex; align-items: center; gap: 10px; color: var(--danger-ink); }
.guard-h .ic-wrap { width: 40px; height: 40px; border-radius: 12px; background: var(--danger-strong); color: #fff; display: grid; place-items: center; flex: none; }
.guard-h b { font-size: 16.5px; }
.guard-h small { display: block; font-size: 12.5px; font-weight: 600; opacity: .9; }
.guard ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; }
.guard ol b { color: var(--ink); }
.guard .row .btn { flex: 1 1 160px; }
.guard.mini { padding: 12px 14px; grid-template-columns: auto 1fr; align-items: center; background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.guard.mini > .ic { color: var(--brand-ink); }
.offer-msg { align-self: flex-end; max-width: 88%; padding: 14px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 2px var(--brand); display: grid; gap: 6px; animation: fadeUp .25s var(--ease) both; }
.offer-msg b { display: flex; align-items: center; gap: 6px; color: var(--brand-ink); }
.offer-msg span { font-size: 14px; color: var(--ink-2); }
.composer { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.qr { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.qr .chip { min-height: 44px; font-size: 14px; }
.comp-row { display: flex; gap: 8px; align-items: center; }
.comp-row .input { border-radius: 24px; min-height: 50px; }
.send { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--brand-strong); color: #fff; display: grid; place-items: center; flex: none; transition: transform .15s; }
.send:hover { transform: scale(1.05); }
.comp-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--danger-soft); color: var(--danger-ink); font-size: 14px; font-weight: 600; animation: fadeUp .2s var(--ease) both; }

/* ---------- Кабинет / Pro cabinet ---------- */
.cab { display: grid; gap: 14px; }
.cab-h { padding: 18px; display: grid; gap: 14px; }
.cab-id { display: flex; gap: 14px; align-items: center; }
.cab-id h1 { font-size: 21px; }
.cab-id p { font-size: 14px; color: var(--muted); }
.cab-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cab-stats div { padding: 10px; border-radius: 14px; background: var(--line-2); text-align: center; }
.cab-stats b { display: block; font-size: 18px; }
.cab-stats span { font-size: 12px; color: var(--muted); }
.cab-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--hdr-h) + 6px); z-index: 10; padding: 6px; margin: 0 -6px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-radius: 16px; }
.cab-tabs button { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 14.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.cab-tabs button[aria-selected="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.cab-grid { display: grid; gap: 14px; }
.cab-sec { padding: 18px; display: grid; gap: 14px; align-content: start; }
.sec-h2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 1023px) { .cab-sec:not(.on) { display: none; } }
.appts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.appt { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px 10px; align-items: start; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); }
.appt.next { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 7%, var(--card)); }
.appt.done { opacity: .78; }
.appt time { font-weight: 800; font-size: 16px; }
.appt-mid { display: grid; gap: 2px; min-width: 0; }
.appt-mid span { font-size: 13.5px; color: var(--muted); }
.appt-r { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.appt-r b { font-size: 16px; }
.appt .badge { white-space: nowrap; }
.appt .row { grid-column: 1 / -1; }
.appt .row .btn { flex: 1; min-height: 44px; font-size: 14px; }
.req { padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); display: grid; gap: 8px; animation: fadeUp .25s var(--ease) both; }
.req-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.req-top span { font-size: 12.5px; white-space: nowrap; }
.req-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; color: var(--muted); }
.req-meta span { display: inline-flex; align-items: center; gap: 4px; }
.req-idx { font-size: 14px; }
.req-done { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-ink); padding: 8px 0 2px; }
.req .row .btn { flex: 1; }
.money-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.money-top > div { padding: 14px; border-radius: 16px; background: var(--line-2); display: grid; gap: 2px; }
.money-top > div:first-child { background: var(--brand-soft); }
.money-top span { font-size: 13px; color: var(--muted); }
.money-top b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.money-top small { font-size: 12.5px; color: var(--muted); }
.fee-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fee-rules div { padding: 12px 10px; border-radius: 14px; border: 1.5px solid var(--line); display: grid; gap: 2px; align-content: start; }
.fee-rules b { font-size: 22px; font-weight: 800; color: var(--brand-ink); }
.fee-rules div:first-child b { color: var(--ink); }
.fee-rules span { font-size: 13px; font-weight: 650; line-height: 1.25; }
.fee-rules small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.ops { list-style: none; margin: 0; padding: 0; display: grid; }
.ops li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.ops li span { font-size: 12.5px; color: var(--muted); }
.ops li .sum { text-align: right; font-weight: 800; }
.bar { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #34D399); transition: width .6s var(--ease); }
.lim-nums { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.lim-nums b { font-size: 22px; font-weight: 800; }
.rcpts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rcpts li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--line-2); }
.rcpts li > .ic { color: var(--brand-ink); }
.rcpts b { display: block; font-size: 14.5px; }
.rcpts span { font-size: 12.5px; color: var(--muted); }
.shop-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.shop-row b { display: block; font-size: 15px; }
.shop-row small { font-size: 12.5px; color: var(--muted); }
.shop-row .price-in .input { font-size: 17px; max-width: 120px; min-height: 44px; text-align: right; }
.shop-row .vs { grid-column: 1 / -1; margin: 0; }
.biz-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.biz-link code { font-family: inherit; font-weight: 800; color: var(--brand-ink); }

/* ---------- Диалог и тост / Dialog and toast ---------- */
dialog.sheet { border: 0; padding: 0; background: var(--card); color: var(--ink); width: 100%; max-width: 100%; max-height: 90vh; margin: auto 0 0; border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.sheet[open] { animation: slideUp .25s var(--ease); }
dialog.sheet::backdrop { background: rgba(8, 12, 18, .5); animation: fadeIn .2s; }
.sheet-in { position: relative; max-height: 90vh; overflow-y: auto; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.sheet-in::before { content: ''; justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: -10px 0 0; }
.sheet-close { position: absolute; top: 8px; right: 8px; }
.sheet-in h2 { padding-right: 40px; font-size: 21px; }
.sheet-in ul, .sheet-in ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.choice { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.choice-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.choice b { display: block; font-size: 16px; color: var(--ink); }
.choice span { font-size: 13.5px; color: var(--muted); }
.choice > .ic { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); width: max-content; padding: 12px 18px; border-radius: 14px; background: #111827; color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-color-scheme: dark) { .toast { background: #E8ECF1; color: #111827; } }

/* ---------- Анимации / Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); } }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); } 50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orb { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Планшет / Tablet ---------- */
@media (min-width: 640px) {
  .hero { padding: 26px; }
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery { margin: 0; }
  .gallery img { border-radius: var(--r-xl); }
  .gal-tools { right: 10px; }
  .gal-count { left: 12px; }
  .pro-cover { margin: 0; }
  .pro-cover img { border-radius: var(--r-xl); height: 240px; }
  dialog.sheet { max-width: 560px; margin: auto; border-radius: 24px; }
  .sheet-in::before { display: none; }
  .rel { grid-template-columns: 76px 1fr auto; }
  .rel .btn { grid-column: auto; }
}

/* ---------- Десктоп / Desktop (≥1024px) ---------- */
@media (min-width: 1024px) {
  :root { --hdr-h: 72px; }
  .mob-only { display: none !important; }
  .hdr-row { flex-wrap: nowrap; gap: 16px; padding: 12px 0; }
  .city { margin-left: 0; }
  .search { order: 0; flex: 1 1 auto; max-width: 680px; }
  .hdr-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
  .hdr-nav a { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: 15px; }
  .hdr-nav a:hover { background: var(--line-2); }
  .hdr-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
  .hdr-nav .nbadge { margin-left: -2px; }
  .tabbar, .mcta { display: none !important; }
  main, body.has-mcta main { padding-top: 22px; padding-bottom: 48px; }
  h1 { font-size: 30px; }
  .toast { bottom: 28px; }

  /* Главная / Home */
  .seg { max-width: 640px; }
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; padding: 30px 34px; min-height: 260px; }
  .hero h2 { font-size: 30px; }
  .hero-art { display: block; position: relative; height: 220px; }
  .hero-art img { position: absolute; width: 168px; height: 168px; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-lg); border: 4px solid var(--card); }
  .hero-art img:nth-child(1) { left: 4%; top: 24px; transform: rotate(-5deg); }
  .hero-art img:nth-child(2) { left: 34%; top: 0; z-index: 1; width: 190px; height: 190px; }
  .hero-art img:nth-child(3) { left: 66%; top: 34px; transform: rotate(5deg); }
  .hero-txt { display: grid; gap: 16px; min-width: 0; }
  .cats { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 12px; }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 4px 0 8px; gap: 16px; }
  .rail > :nth-child(n + 6) { display: none; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .pc-media { aspect-ratio: 4 / 3.4; }
  .how { padding: 28px 30px; }
  .how ol { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .how li { grid-template-columns: 52px 1fr; }
  .how li:not(:last-child)::after { left: 64px; right: -14px; top: 25px; bottom: auto; width: auto; height: 2px; background: none; }
  .sec { margin-top: 40px; }

  /* Поиск / Search */
  .srch-bar { grid-template-columns: auto 1fr; align-items: center; }
  .quick { display: none; }
  .srch-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
  .filters { position: sticky; top: calc(var(--hdr-h) + 16px); transform: none; visibility: visible; max-height: calc(100vh - var(--hdr-h) - 32px); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 4px 18px 16px; z-index: 1; transition: none; }
  .fback, .f-head .icon-btn, .f-foot .btn-primary { display: none !important; }
  .f-foot { grid-template-columns: 1fr; position: static; }
  .srch .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Карточка товара / Item page */
  .det { grid-template-columns: minmax(0, 1fr) 400px; gap: 20px 28px; align-items: start; }
  .det > .gallery, .det > .pro-cover { grid-column: 1; }
  .det > .det-side { grid-column: 2; grid-row: 1 / span 6; position: sticky; top: calc(var(--hdr-h) + 16px); }
  .det > :not(.det-side) { grid-column: 1; }
  .gallery img { max-height: 560px; aspect-ratio: 4 / 3; }

  /* Мастер / Pro */
  .pro-cover img { height: 280px; }
  .det .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .det .rail > :nth-child(n + 5) { display: none; }

  /* Сценарии / Flows */
  .flow { gap: 20px; }
  .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scan { grid-template-columns: 340px 1fr; align-items: center; padding: 22px; }

  /* Сообщения / Chat */
  .chat { grid-template-columns: 340px minmax(0, 1fr); align-items: start; gap: 20px; }
  .chat-list { position: sticky; top: calc(var(--hdr-h) + 16px); }
  .chat-h { font-size: 30px; }
  .pro-head { margin: -44px 16px 0; }
  .conv { background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 6px 18px 0; min-height: calc(100vh - var(--hdr-h) - 120px); }
  .conv-item { box-shadow: none; background: var(--line-2); }
  .msgs { flex: 1; }
  .composer { background: var(--card); border-top: 1px solid var(--line-2); padding: 12px 0 16px; }
  .qr { margin: 0; padding: 0; }

  /* Кабинет / Cabinet */
  .cab-tabs { display: none; }
  .cab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
  .cab-h { grid-template-columns: 1fr auto; align-items: center; }
  .cab-stats { min-width: 420px; }
}

@media (max-width: 1023px) {
  .chat:not(.has-conv) .conv { display: none; }
  .chat.has-conv .chat-list { display: none; }
}

/* Хлебные крошки только на десктопе / Breadcrumbs on desktop only */
@media (max-width: 1023px) { .crumbs { display: none; } }

/* Вертикальная стопка блоков / Vertical stack */
.stack { display: grid; gap: 16px; min-width: 0; }
