/* Стили половины «продавец и общение» (docs/PARTS.md, часть В): подача и правка объявления, мои объявления и
   статистика, чаты, уведомления, профиль и настройки, магазин, страницы «Безопасность» и «Правила».
   Файл принадлежит части В. Цвета и размеры — только из /shared/tokens.css; общие элементы уже в /styles.css.
   Классы — с приставкой s-, чтобы не пересечься с половиной «покупатель» (b-…). Телефон в первую очередь. */

/* ───────── общее ───────── */
.s-sk-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.s-cnt { float: right; font-variant-numeric: tabular-nums; color: var(--faint); }
.s-inl { display: inline-flex; vertical-align: -2px; }
.s-wrap { flex-wrap: wrap; }
.s-danger-ic { background: var(--danger-soft); color: var(--danger); }
.s-actions .row-i { padding-inline: 4px; }
.s-actions .row-i:disabled { opacity: .5; }
.s-hint { font-size: 13px; color: var(--muted); }
.s-req { color: var(--danger); margin-left: 3px; }
.s-row-wrap { flex-wrap: wrap; row-gap: 8px; }
.s-row-wrap > .grow { flex: 1 1 180px; }
.s-compl-st { align-self: flex-start; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.on { color: var(--primary); background: var(--primary-soft); }

.s-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px -16px 12px; padding: 2px 16px; }
.s-tabs::-webkit-scrollbar { display: none; }
.s-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; flex: none; }
.s-tab.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.s-tab-n { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.s-tab.on .s-tab-n { background: color-mix(in oklab, var(--bg) 22%, transparent); color: var(--bg); }

.s-view { position: fixed; inset: 0; z-index: 300; background: rgba(10, 8, 16, .94); display: grid; place-items: center; outline: none; animation: lv-fade .2s var(--ease); }
.s-view img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.s-view-x { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 10px; }
.s-view-l, .s-view-r { position: absolute; top: 50%; margin-top: -22px; }
.s-view-l { left: 10px; } .s-view-r { right: 10px; }
.s-view-n { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; background: rgba(0, 0, 0, .5); padding: 4px 10px; border-radius: 999px; }

/* ───────── подача объявления ───────── */
.s-sell-grid { display: grid; gap: 24px; padding-top: 4px; }
.s-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.s-form > .notice { margin: 0; }
.s-block { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; min-width: 0; }
.s-block > h2, .s-block-h h2 { font-size: 17px; letter-spacing: -.01em; }
.s-block-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.s-block.need, .s-block.bad { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.s-block.need::before { content: 'Исправьте здесь'; align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 700; }
.s-side { display: none; }

.s-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .s-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 720px) { .s-photos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.s-ph, .s-ph-new { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; }
.s-ph { overflow: hidden; background: var(--surface-2); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t); }
.s-ph-b { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: grab; border-radius: inherit; }
.s-ph-b img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.s-ph.sel { box-shadow: 0 0 0 3px var(--brand); }
.s-ph.drag { transform: scale(1.06); box-shadow: var(--sh-3); opacity: .9; z-index: 2; }
.s-photos.dragging .s-ph-b { cursor: grabbing; }
.s-ph.err img { filter: grayscale(1); opacity: .45; }
.s-ph-cover { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: #3b2a00; font-size: 11px; font-weight: 700; pointer-events: none; }
.s-ph-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(23, 20, 31, .66); color: #fff; }
.s-ph-x::after { content: ''; position: absolute; inset: -8px; }
.s-ph-prog { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .6); overflow: hidden; }
.s-ph-prog i { display: block; height: 100%; background: var(--brand); border-radius: 5px; transition: width .2s linear; }
.s-ph-retry { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: color-mix(in oklab, var(--danger-soft) 80%, transparent); color: var(--danger); font-size: 12px; font-weight: 700; }
.s-ph-add { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: 14px;
  color: var(--primary); background: var(--primary-soft); cursor: pointer; font-size: 13px; padding: 6px; }
.s-ph-add small { color: var(--muted); font-size: 11px; }
@media (hover: none) { .s-ph-add small { display: none; } }
.s-ph-add:focus-within { box-shadow: var(--ring); }
.s-ph-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.s-ph-tools .btn { margin-right: auto; }

.s-pick { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.s-pick.s-none { color: var(--faint); }
.s-pick > .ic:last-child { color: var(--faint); }
.s-suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s-suggest .chip { min-height: 36px; max-width: 100%; border-color: var(--brand-300); color: var(--primary-soft-ink); background: var(--primary-soft); }
.s-suggest .chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.s-attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.s-attr.wide { grid-column: 1 / -1; }
@media (max-width: 420px) { .s-attrs { grid-template-columns: minmax(0, 1fr); } }
.s-money { position: relative; display: flex; align-items: center; }
.s-money .input { font-variant-numeric: tabular-nums; padding-right: 48px; }
.s-money-cur { position: absolute; right: 14px; color: var(--muted); font-weight: 600; pointer-events: none; }
.s-money-pre { flex: none; padding-right: 10px; color: var(--muted); font-weight: 600; }
#f-price { font-size: 22px; font-weight: 700; min-height: 56px; }
.s-toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.s-toggle b { font-weight: 600; }
.s-free { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--free-ink); }
.s-place { display: flex; align-items: center; gap: 12px; }
.s-warn { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 10px; }
.s-warn.err { background: var(--danger-soft); color: var(--danger); }
.s-warn.hold { background: var(--warn-soft); color: var(--warn); }
.s-warn > span:last-child { color: var(--ink); }

.s-bar { position: sticky; bottom: 0; z-index: 30; display: flex; gap: 8px; margin: 4px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.s-bar .btn { min-width: 0; }
.s-bar-prev { padding-inline: 14px; flex: none; }

.s-prev { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--sh-1); }
.s-prev-ph { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.s-prev-ph img { width: 100%; height: 100%; object-fit: cover; }
.s-prev-no { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--faint); font-size: 13px; }
.s-prev-b { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.s-side-h { font-size: 13px; font-weight: 700; color: var(--muted); }
.s-todo { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.s-todo-h { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.s-todo-i { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 6px; border: 0; background: none; border-radius: 10px; text-align: left; font-size: 14px; color: var(--ink-2); }
.s-todo-i:hover { background: var(--surface-2); }
.s-todo-i .ic { color: var(--primary); }
.s-ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 4; }
.s-ring-fg { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .5s var(--ease); }
.s-ring-t { font-size: 12px; font-weight: 700; fill: var(--ink); }
.s-ring-ok { fill: none; stroke: var(--free); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.s-side-tip { display: flex; gap: 8px; align-items: flex-start; }
.s-side-tip .ic { color: var(--free); margin-top: 2px; }

.s-cats .row-i { padding-inline: 4px; }
.s-cat-back { color: var(--primary); }
.s-pv { display: flex; flex-direction: column; gap: 12px; }
.s-pv-ph { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.s-pv-ph img { width: 100%; height: 100%; object-fit: contain; }
.s-pv-th { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.s-pv-th button { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; flex: none; background: none; }
.s-pv-th button.on { border-color: var(--brand); }
.s-pv-th img { width: 100%; height: 100%; object-fit: cover; }
.s-pv-b { display: flex; flex-direction: column; gap: 8px; }
.s-pv-price { display: flex; align-items: center; gap: 8px; font-size: 26px; flex-wrap: wrap; }
.s-pv-attrs { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.s-pv-attrs div { display: flex; flex-direction: column; }
.s-pv-attrs dt { font-size: 12px; color: var(--muted); }
.s-pv-attrs dd { margin: 0; font-weight: 600; }
.s-pv-desc { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 700px) { .s-pv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; } .s-pv-th { grid-column: 1; } .s-pv-b { grid-column: 2; grid-row: 1 / span 2; } }

.s-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 48px; padding-bottom: 32px; }
.s-done-ic { width: 92px; height: 92px; border-radius: 30px; display: grid; place-items: center; }
.s-done-ic.ok { background: var(--ok-soft); color: var(--free-ink); }
.s-done-ic.wait { background: var(--warn-soft); color: var(--warn); }
.s-done h1 { outline: none; }
.s-done > p { max-width: 460px; }
.s-done-card { width: 100%; max-width: 460px; padding: 6px; text-align: left; }
.s-done-act { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 460px; }

.s-map { position: relative; height: min(52dvh, 460px); min-height: 260px; border-radius: 16px; overflow: hidden; background: var(--surface-2); flex: none; }
.s-map-in { position: absolute; inset: 0; z-index: 0; }
.s-map-wait { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 20px; background: var(--surface-2); }
.s-map-foot { display: flex; align-items: center; gap: 8px; }
.s-pin i { display: block; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--primary); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
.s-approx { stroke: var(--brand); fill: var(--brand); fill-opacity: .18; }

@media (min-width: 1000px) {
  .s-sell-grid { grid-template-columns: minmax(0, 700px) 320px; justify-content: center; gap: 28px; }
  .s-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--hdr) + 20px); align-self: start; }
  .s-bar { margin-inline: 0; padding-inline: 0; border-top: 0; background: color-mix(in oklab, var(--bg) 92%, transparent); }
  .s-bar-prev { display: none; }
  .s-done-act { flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: none; }
}
.page:has(.s-sell-grid) > .topbar { max-width: 1104px; }

/* ───────── мои объявления ───────── */
.s-search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin-bottom: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); max-width: 420px; }
.s-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--ink); }
.s-search:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.s-my-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .s-my-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.s-my { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; min-width: 0; }
.s-my-top { display: flex; gap: 12px; color: var(--ink); text-decoration: none !important; min-width: 0; border-radius: 14px; }
.s-my-ph { width: 92px; height: 92px; border-radius: 14px; flex: none; }
.s-my-sold .s-my-ph, .s-my-archived .s-my-ph { filter: grayscale(.6); opacity: .8; }
.s-my-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.s-my-t { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-my-stats { display: flex; gap: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.s-my-stats span { display: inline-flex; align-items: center; gap: 4px; }
.s-my-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.s-my-meta .tag { white-space: normal; text-align: left; }
.s-my-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s-my-act .btn-ghost { background: var(--surface-2); }
.s-my-act .btn:disabled { opacity: .75; }
.s-my-act .icon-btn { width: 38px; height: 38px; }
.s-reject { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--danger-soft); border-left: 3px solid var(--danger); font-size: 14px; }
.s-reject-h { display: flex; gap: 6px; align-items: flex-start; color: var(--danger); }
.s-reject-h b { color: var(--ink); }
.s-appeal { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.s-appeal.accepted b { color: var(--free-ink); }

.s-one { display: flex; flex-direction: column; gap: 12px; }
.s-one .card { margin: 0; }
.s-one-top { display: flex; gap: 14px; }
.s-one-ph { width: 96px; height: 96px; border-radius: 16px; flex: none; }
.s-one-t { font-size: 19px; margin: 6px 0 2px; overflow-wrap: anywhere; }
.s-one-price { font-size: 20px; }
.s-one-head .notice { margin: 0; }
.s-one-act { display: flex; gap: 8px; flex-wrap: wrap; }
.s-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .s-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.s-kpi { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; min-width: 0; }
.s-kpi.on { border-color: var(--brand); background: var(--primary-soft); }
.s-kpi-l { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); max-width: 100%; }
.s-kpi-v { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.s-chart { margin: 0; }
.s-chart-cap { font-size: 14px; margin-bottom: 6px; }
.s-chart svg { width: 100%; height: auto; overflow: visible; }
.s-chart-grid { stroke: var(--line); stroke-width: 1; }
.s-chart-t { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.s-chart-bar { fill: var(--brand); transition: fill var(--t-fast); }
.s-chart-bar.zero { fill: var(--surface-3); }
.s-chart-bar.on { fill: var(--accent); }
.s-facts { margin: 0; display: grid; gap: 8px; }
.s-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.s-facts dt { color: var(--muted); }
.s-facts dd { margin: 0; font-weight: 600; text-align: right; }
.s-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.s-hist-i { display: flex; gap: 10px; font-size: 14px; }
.s-hist-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.s-hist-i.reject .s-hist-ic { background: var(--danger-soft); color: var(--danger); }
.s-hist-i.approve .s-hist-ic, .s-hist-i.auto_pass .s-hist-ic, .s-hist-i.restore .s-hist-ic { background: var(--ok-soft); color: var(--free-ink); }
.s-hist-i.auto_hold .s-hist-ic { background: var(--warn-soft); color: var(--warn); }
.s-one-cols { display: grid; gap: 12px; align-items: start; }
@media (min-width: 900px) { .s-one-cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } .s-one-top { gap: 18px; } .s-one-ph { width: 132px; height: 132px; } }

/* ───────── чаты ───────── */
.s-chats-h { display: flex; margin-bottom: 8px; }
.s-chat-list { display: flex; flex-direction: column; gap: 2px; }
.s-chat-i { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.s-chat-i:hover { background: var(--surface-2); }
.s-chat-i.on { background: var(--primary-soft); }
.s-chat-ph { position: relative; width: 56px; height: 56px; flex: none; }
.s-chat-ph .img { width: 56px; height: 56px; border-radius: 14px; }
.s-chat-ava { position: absolute; right: -5px; bottom: -5px; border: 2px solid var(--surface); box-sizing: content-box; }
.s-chat-b { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.s-chat-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.s-chat-l { color: var(--muted); }
.s-chat-last { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.s-chat-i.unread .s-chat-last { color: var(--ink); font-weight: 600; }
.s-chat-flag { color: var(--danger); flex: none; }
.s-chat-i .badge.in { margin: 0; flex: none; }

.s-conv { display: flex; flex-direction: column; height: calc(100dvh - var(--hdr)); min-width: 0; background: var(--bg); }
.s-chat-head { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: calc(4px + env(safe-area-inset-top)) 6px 4px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.s-chat-head > b, .s-chat-head > .sk:first-child { margin-left: 10px; }
.s-chat-peer { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ink); text-decoration: none !important; padding: 2px 4px; border-radius: 12px; }
.s-chat-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; }
.s-chat-listing { flex: none; border-bottom: 1px solid var(--line); background: var(--surface); padding: 0 6px; }
.s-chat-listing .lrow { padding: 6px; }
.s-chat-listing .lrow-ph { width: 44px; height: 44px; border-radius: 10px; }
.s-msgs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.s-msgs-in { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 100%; padding: 12px 12px 10px; max-width: 760px; margin: 0 auto; }
.s-older { align-self: center; font-size: 13px; }
.s-trust { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; margin-bottom: 6px; }
.s-trust > .ic { color: var(--free); margin-top: 1px; }
.s-trust .sm { color: var(--muted); }
.s-trust.warn { background: var(--warn-soft); border-color: transparent; }
.s-trust.warn > .ic { color: var(--warn); }
.s-trust.warn .sm { color: var(--ink-2); }
.s-safe { padding: 14px; border-radius: 16px; background: var(--info-soft); font-size: 14px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.s-safe b { display: flex; align-items: center; gap: 6px; }
.s-safe ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.s-day, .s-sys { display: flex; justify-content: center; margin: 8px 0 2px; }
.s-day span { font-size: 12px; font-weight: 650; color: var(--muted); padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.s-sys span { font-size: 13px; color: var(--muted); padding: 5px 12px; border-radius: 999px; background: var(--surface-2); text-align: center; }
.s-msg { display: flex; flex-direction: column; gap: 4px; max-width: 86%; align-self: flex-start; align-items: flex-start; animation: bm-fade-up .22s var(--ease) both; }
.s-msg.out { align-self: flex-end; align-items: flex-end; }
.s-msg-row { display: flex; align-items: center; gap: 2px; max-width: 100%; }
.s-msg.out .s-msg-row { flex-direction: row-reverse; }
.s-bub { position: relative; padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); min-width: 0; text-align: left; color: var(--ink); }
.s-msg.out .s-bub { border-radius: 18px 18px 6px 18px; background: var(--primary-soft); border-color: transparent; }
.s-msg.pending .s-bub { opacity: .6; }
.s-msg.risky .s-bub { border-color: var(--danger); }
.s-msg-t { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.s-msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.s-read { color: var(--primary); }
.s-bub-img { padding: 3px; overflow: hidden; cursor: zoom-in; }
.s-bub-img img { display: block; width: 220px; max-width: 100%; height: 165px; object-fit: cover; border-radius: 14px; }
.s-bub-img .s-msg-meta { position: absolute; right: 9px; bottom: 9px; margin: 0; padding: 2px 7px; border-radius: 999px; background: rgba(23, 20, 31, .6); color: #fff; }
.s-bub-img .s-read { color: #fff; }
.s-msg-more { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--faint); display: grid; place-items: center; flex: none; opacity: .55; }
.s-msg-more:hover, .s-msg-more:focus-visible { opacity: 1; background: var(--surface-2); color: var(--ink-2); }
.s-mwarn { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; font-size: 14px; max-width: 100%; }
.s-mwarn.recv { background: var(--danger-soft); border-left: 3px solid var(--danger); }
.s-mwarn.recv > .ic { color: var(--danger); margin-top: 1px; }
.s-mwarn.sent { background: var(--warn-soft); color: var(--ink-2); }
.s-mwarn.sent > .ic { color: var(--warn); margin-top: 1px; }
.s-mwarn-act { display: flex; gap: 14px; align-items: center; margin-top: 2px; }
.s-mwarn-act .link { color: var(--danger); min-height: 28px; }
.s-offer { display: flex; flex-direction: column; gap: 4px; min-width: 212px; padding: 10px 12px 8px; }
.s-offer-l { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.s-offer-sum { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.s-offer.cancelled .s-offer-sum, .s-offer.declined .s-offer-sum { text-decoration: line-through; color: var(--muted); }
.s-offer-act { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.s-offer-act .btn { flex: 1; }
.s-offer-act .btn-ghost { flex: none; }
.s-offer-st { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.s-offer-st.accepted { color: var(--free-ink); font-weight: 650; }
.s-offer-ctx { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.s-review-bar, .s-note, .s-closed { display: flex; align-items: center; gap: 10px; flex: none; margin: 0 auto; width: 100%; max-width: 760px; padding: 8px 12px; }
.s-review-bar { background: var(--accent-soft); border-radius: 14px 14px 0 0; }
.s-review-bar .btn { flex: none; }
.s-note { align-items: flex-start; background: var(--danger-soft); border-radius: 14px 14px 0 0; }
.s-note > .ic { color: var(--danger); margin-top: 2px; }
.s-note.hint { background: var(--warn-soft); align-items: center; }
.s-note.hint > .ic { color: var(--warn); margin: 0; }
.s-note .icon-btn { width: 32px; height: 32px; }
.s-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: none; width: 100%; max-width: 760px; margin: 0 auto; padding: 6px 12px 2px; }
.s-quick::-webkit-scrollbar { display: none; }
.s-quick .chip { min-height: 36px; font-size: 13px; background: var(--surface); }
.s-closed { justify-content: center; text-align: center; flex-wrap: wrap; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); max-width: none; background: var(--surface); }
.s-composer { display: flex; align-items: flex-end; gap: 2px; flex: none; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.s-composer .input { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; padding: 10px 14px; border-radius: 22px; resize: none; margin: 0 4px; background: var(--surface-2); border-color: transparent; }
.s-composer .icon-btn { cursor: pointer; }
.s-attach:focus-within { box-shadow: var(--ring); }
.s-send { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); flex: none; }
.s-send:disabled { background: var(--surface-3); color: var(--faint); }
.s-rev-who { display: flex; align-items: center; gap: 12px; }

.s-chat-side-h { font-size: 26px; letter-spacing: -.02em; padding: 4px 6px 12px; }
.s-chat-none { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 32px; }
.s-chat-none p { max-width: 380px; }
@media (min-width: 1000px) {
  .s-chatpage.wide { display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); max-width: 1200px; margin: 0 auto; height: calc(100dvh - var(--hdr)); padding: 0 32px; }
  .s-chat-side { overflow-y: auto; padding: 18px 12px 18px 0; border-right: 1px solid var(--line); min-height: 0; }
  .s-chatpage.wide .s-conv { height: 100%; min-height: 0; }
  .s-chatpage.wide .s-chat-head, .s-chatpage.wide .s-chat-listing, .s-chatpage.wide .s-composer, .s-chatpage.wide .s-closed { background: transparent; }
  .s-chatpage.wide .s-chat-head { padding: 10px 8px 10px 14px; }
  html[data-route="/chats"] .main, html[data-route="/chats/:id"] .main { padding-bottom: 0; }
}

/* ───────── уведомления ───────── */
.s-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.s-notes-day { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 4px 2px; }
.s-notes-day:first-child { margin-top: 2px; }
.s-note-i { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-align: left; color: var(--ink); }
.s-note-i:hover { border-color: var(--line-strong); }
.s-note-i.new { background: color-mix(in oklab, var(--primary-soft) 55%, var(--surface)); border-color: transparent; }
.s-note-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.s-note-ic.ok { background: var(--ok-soft); color: var(--free-ink); }
.s-note-ic.danger { background: var(--danger-soft); color: var(--danger); }
.s-note-ic.warn { background: var(--warn-soft); color: var(--warn); }
.s-note-ic.brand { background: var(--primary-soft); color: var(--primary-soft-ink); }
.s-note-ic.accent { background: var(--accent-soft); color: var(--accent-ink); }
.s-note-ph { position: relative; width: 44px; height: 44px; flex: none; }
.s-note-ph .img { width: 44px; height: 44px; border-radius: 12px; }
.s-note-ic.mini { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-sizing: content-box; }
.s-note-b { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 14px; }
.s-note-b b { font-size: 15px; overflow-wrap: anywhere; }
.s-note-t { color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.s-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex: none; margin-top: 6px; }

/* ───────── профиль и настройки ───────── */
.s-guest { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 20px; margin: 8px 0 16px; border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(90% 70% at 100% 0%, color-mix(in oklab, var(--brand) 16%, transparent), transparent 60%), radial-gradient(70% 60% at 0% 0%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%), var(--surface); }
.s-guest p { max-width: 420px; }
.s-guest-mark { animation: bm-float 4s ease-in-out infinite; }
.s-blocked { display: flex; flex-direction: column; gap: 8px; padding: 16px; margin: 8px 0 14px; border-radius: 20px; background: var(--danger-soft); border-left: 4px solid var(--danger); }
.s-blocked-h { display: flex; gap: 8px; align-items: flex-start; color: var(--danger); }
.s-blocked-h b { color: var(--ink); font-size: 16px; }
.s-blocked .btn { align-self: flex-start; }
.s-me { display: flex; align-items: center; gap: 14px; padding: 6px 2px 14px; }
.s-me-n { display: flex; align-items: center; gap: 6px; font-size: 21px; min-width: 0; }
.s-me-r { margin: 3px 0 1px; }
.s-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.s-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 9px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; min-width: 0; }
.s-tile:hover { border-color: var(--line-strong); }
.s-tile .ic { color: var(--primary); margin-bottom: 4px; }
.s-tile b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.s-tile span:not(.ic) { font-size: 11.5px; letter-spacing: -.01em; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-tile-n { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--badge); color: #fff; }
.s-ver { margin: 18px 0 8px; }
.menu-i:disabled { opacity: .5; }
.menu-i .seg { flex: none; }
.s-ava-row { display: flex; align-items: center; gap: 16px; }
.s-ava-act { display: flex; flex-wrap: wrap; gap: 8px; }
.s-ava-act label { cursor: pointer; }
.s-ava-act label:focus-within { box-shadow: var(--ring); }
.s-edit, .s-shop { padding-bottom: 24px; }
.s-settings .menu-h:first-child { margin-top: 8px; }
.s-omsg { border-radius: 11px; flex: none; }
.s-hours { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.s-hours .input, .s-day-row .input { width: 118px; min-height: 40px; padding: 6px 8px; font-size: 15px; font-variant-numeric: tabular-nums; text-align: center; }
.s-note-p { margin: 10px 6px 0; }
.s-rsum { flex-direction: row; align-items: center; gap: 20px; }
.s-rsum-l { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.s-rsum-v { font-size: 38px; letter-spacing: -.03em; line-height: 1; }
.s-rsum-d { flex: 1; display: grid; gap: 4px; min-width: 0; }
.s-rsum-r { display: grid; grid-template-columns: 12px 1fr 24px; align-items: center; gap: 8px; }
.s-rsum-bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.s-rsum-bar i { display: block; height: 100%; background: var(--star); border-radius: 6px; }
.s-revs { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.s-revs .card { margin: 0; gap: 10px; }
.s-rev-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.s-rev p, .s-compl p { overflow-wrap: anywhere; }
.s-rev-l { display: flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.s-rev-l .img { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.s-rev-reply { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.s-rev .btn { align-self: flex-start; }

/* ───────── магазин ───────── */
.s-shop-head { margin: 4px 0 0; }
.s-shop-logo { width: 56px; height: 56px; border-radius: 16px; flex: none; }
.s-shop-head .tag { margin-top: 4px; white-space: normal; }
.s-shop-intro { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(90% 80% at 100% 0%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%), var(--surface); }
.s-shop-intro ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.s-shop-intro li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.s-shop-pics { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; }
.s-shop-pic { position: relative; height: 104px; display: grid; place-items: center; border-radius: 16px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); color: var(--primary); cursor: pointer; overflow: hidden; }
.s-shop-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-shop-pic:focus-within { box-shadow: var(--ring); }
.s-pic-t { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(23, 20, 31, .62); color: #fff; }
.s-pic-wait { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in oklab, var(--surface) 70%, transparent); z-index: 1; }
.s-days { display: grid; gap: 6px; }
.s-day-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.s-day-n { width: 26px; flex: none; }
.s-day-row .switch { margin-left: auto; }
@media (max-width: 380px) { .s-hours .input, .s-day-row .input { width: 100px; padding-inline: 4px; } }

/* ───────── безопасность и правила ───────── */
.s-info { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.s-info .card, .s-info .menu { margin: 0; }
.s-info-hero { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(90% 80% at 100% 0%, color-mix(in oklab, var(--brand) 16%, transparent), transparent 60%), var(--surface); }
.s-info-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-soft-ink); }
.s-info-h { margin-top: 14px; }
.s-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: tip; }
.s-tips li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.s-tip-n { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.s-shield { display: grid; gap: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.s-shield-i { display: flex; gap: 12px; align-items: flex-start; }
@media (min-width: 700px) { .s-shield { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; } }
.s-info-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.s-rules { display: grid; gap: 10px; }
.s-rules h3 { display: flex; align-items: center; gap: 8px; }
.s-rules h3 .ic { color: var(--primary); }
.s-banned { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
@media (min-width: 700px) { .s-banned { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; } }

/* узкий телефон: кнопки действий в одну строку */
@media (max-width: 480px) {
  .s-my-act .btn-sm { padding: 0 11px; }
  .s-my-act .btn-ghost .ic { display: none; }
}

/* статистика на широком экране: плитки слева, график справа */
@media (min-width: 900px) {
  .s-stats { display: grid; grid-template-columns: 320px minmax(0, 1fr); column-gap: 24px; }
  .s-stats > * { grid-column: 1 / -1; }
  .s-stats > .s-kpis { grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: start; }
  .s-stats > .s-chart, .s-stats > .s-kpis + .sk { grid-column: 2; }
}
.s-done .notice { text-align: left; }
/* тёмная тема плиток карты — общая для всех карт, в /styles.css */
