/* Оформление сайта: принятый вариант «А». Светлый фон, белые скруглённые карточки, тёмно-зелёный акцент. */

/* Шрифт лежит на самом сайте: посетитель не ходит за ним на сторонние серверы */
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-cyrillic-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F5F8F6; --card: #FFFFFF; --ink: #17231F; --muted: #5C6B66; --line: #E1E8E5; --line-strong: #D5DFDB;
  --accent: #1F6F5C; --accent-dark: #17524A; --soft: #E3F0EB; --mint: #DDF2E8; --online: #1F9D6B;
  --err: #B3261E; --warn: #8A5A00; --ok: #17524A;
  --r-card: 20px; --r-ctl: 14px; --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { scroll-padding-bottom: 150px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15.5px/1.45 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: var(--nav-h); }
body.no-bottom-nav { padding-bottom: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1 { font-size: 1.65rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 .5rem; text-wrap: balance; }
h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 .6rem; }
h3 { font-size: .88rem; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
p { margin: 0 0 .8rem; }
small { color: var(--muted); font-size: .87rem; }
strong, b { font-weight: 700; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; }
[hidden] { display: none !important; }
.visually-hidden, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Шапка и меню */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 6px; max-width: 1080px; margin: 0 auto; }
.site-logo { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a { font-weight: 600; text-decoration: none; }
.wide-only { display: none !important; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: var(--ink) !important; display: flex; align-items: center; justify-content: center; }
.icon-btn .badge-count { position: absolute; top: 2px; right: 0; }
.badge-count { display: inline-block; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 700; line-height: 19px; text-align: center; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--nav-h); display: flex; background: var(--card); border-top: 1px solid var(--line); padding: 4px 8px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: .8rem; font-weight: 600; color: var(--muted); }
.bottom-nav a.on { color: var(--accent); font-weight: 700; }
.bottom-nav .badge-count { position: absolute; top: 2px; left: 50%; margin-left: 6px; }
.site-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 16px; }
.site-main.narrow { max-width: 480px; }
.site-main.wide { max-width: 1080px; }
.site-footer { max-width: 1080px; margin: 16px auto 20px; padding: 0 16px; display: flex; gap: 16px; justify-content: space-between; color: var(--muted); font-size: .87rem; }

.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 12px; max-width: 1080px; margin: 0 auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { padding: 10px 10px; white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
.tabs.sub { border-bottom: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 22px; text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 600; }
.chips a.on { background: var(--mint); border-color: var(--accent); color: var(--accent-dark); }
.chips .n { color: var(--muted); font-weight: 600; }

/* Карточки, кнопки, формы */
.card { background: var(--card); border-radius: var(--r-card); padding: 16px; margin: 0 0 12px; }
.danger-zone { border: 1.5px solid #EBCFCC; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.head-row h1 { margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.filter { margin: 0 0 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.soft { background: var(--soft); border-color: var(--soft); color: var(--accent-dark); }
.btn.block { display: flex; width: 100%; }
.btn.danger { color: var(--err); border-color: #EBCFCC; }
.btn.small { min-height: 36px; padding: 0 11px; font-size: .88rem; border-radius: 11px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
form.inline { display: inline; }

.form .field, .form fieldset.field { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.form label, .form legend { display: block; font-weight: 700; margin: 0 0 5px; padding: 0; }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea, .filter input, .filter select { width: 100%; max-width: 100%; min-height: 46px; padding: 10px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font: inherit; background: #fff; color: var(--ink); }
.form input[size], .row label input, .row label select { width: auto; }
.filter input, .filter select { width: auto; flex: 1 1 180px; }
.form textarea { resize: vertical; }
.form .row label { font-weight: 500; }
.form-section { margin: 0 0 8px; padding-top: 6px; }
.form-section h2 { padding-top: 12px; border-top: 1px solid var(--line); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.hint { display: block; color: var(--muted); font-size: .87rem; margin-top: 4px; font-weight: 500; }
.req { color: var(--err); }
.field-error { display: block; color: var(--err); font-size: .9rem; margin-top: 4px; font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err) !important; }
.static { margin: 0; }
.with-unit { display: flex; align-items: center; gap: 8px; }
.with-unit input { max-width: 160px !important; }
.unit { color: var(--muted); }
label.check, .form label.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; margin: 0; padding: 6px 0; }
label.check input { margin-top: 2px; flex: none; width: 20px; height: 20px; accent-color: var(--accent); }
label.check small { margin-left: 4px; }
.checks { display: grid; gap: 0 12px; }
.checks.cols { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.checks.cols2 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.checks.scroll { max-height: 270px; overflow-y: auto; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); padding: 6px 12px; margin-top: 6px; }
.list-filter { margin-top: 6px; }
.role-pick { display: grid; gap: 8px; margin-bottom: 14px; }
.role { display: flex !important; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font-weight: 500 !important; cursor: pointer; }
.role input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--accent); }
.role span { display: grid; }
.code-box { font: 700 1.3rem/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; padding: 14px; background: var(--soft); border-radius: var(--r-ctl); text-align: center; word-break: break-all; }

.flash { padding: 11px 14px; border-radius: var(--r-ctl); margin: 0 0 12px; background: var(--mint); color: var(--ok); font-weight: 600; }
.flash-err { background: #FBECEB; color: var(--err); }
.flash-warn { background: #FDF3DF; color: var(--warn); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #ECEFED; color: var(--muted); font-size: .8rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.badge-published, .badge-approved { background: var(--mint); color: var(--ok); }
.badge-pending { background: #FDF0D2; color: var(--warn); }
.badge-manual { background: #E4ECF7; color: #2A4B7C; }
.badge-rejected, .badge-blocked { background: #FBE3E1; color: var(--err); }
.online { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; background: var(--mint); color: var(--accent-dark); font-size: .8rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--online); }

.checklist { list-style: none; padding: 0; margin: 0 0 14px; }
.checklist li { padding: 5px 0 5px 26px; position: relative; }
.checklist li::before { position: absolute; left: 0; top: 5px; width: 18px; text-align: center; font-weight: 800; }
.checklist .done::before { content: "✓"; color: var(--online); }
.checklist .todo::before { content: "•"; color: var(--err); }
.checklist .opt::before { content: "•"; color: var(--muted); }
.checklist .done a { color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 0 0 12px; }
table { border-collapse: collapse; width: 100%; }
table.grid { background: var(--card); border-radius: var(--r-card); overflow: hidden; }
table.grid th, table.grid td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid thead th { font-size: .82rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
table.grid tr.off td { color: var(--muted); }
table.grid input:not([type=checkbox]) { width: 100%; min-width: 60px; padding: 7px 9px; border: 1.5px solid var(--line-strong); border-radius: 10px; font: inherit; }
table.grid form { margin: 0; }

/* Прайс в кабинете */
.price-group { border-top: 1px solid var(--line); padding: 8px 0; }
.price-group summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; text-align: center; }
.price-row { border-top: 1px solid var(--line); padding: 2px 0; }
.price-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 8px; padding: 2px 0 10px 29px; }
.form .price-cells label { font-weight: 500; font-size: .8rem; color: var(--muted); margin: 0; }
.form .price-cells input { min-height: 42px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
/* Общий блок цен стоит сам по себе, не под галочкой услуги: отступ слева не нужен */
.price-common .price-kind, .price-common .price-cells { padding-left: 0; }
/* Справа от цен — отметки-галочки («Медкнижка»); на телефоне они встают под ценами */
.price-with-side { display: grid; gap: 0 28px; }
.price-side .field { margin: 0; }
/* Услуги в кабинете — просто галочки; отмеченная выделена жирным */
.svc-pick { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.svc-pick label.check:has(input:checked) { font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { display: block; padding: 14px; background: var(--card); border-radius: var(--r-card); text-decoration: none; color: var(--muted); font-weight: 600; }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.stat.hot { background: #FFF6DF; }

/* Аватарки и фото */
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--soft); display: block; }
.avatar.big { width: 96px; height: 96px; }
.avatar-letter { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; }
.avatar-letter.big { font-size: 2.2rem; }
.avatar-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.avatar-row p { margin: 0; }
.upload { margin: 0 0 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { margin: 0; background: var(--bg); border-radius: 16px; overflow: hidden; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.photo figcaption { padding: 8px; display: grid; gap: 6px; font-size: .88rem; }
.photo figcaption .row { gap: 6px; }

/* Выдача */
.crumbs { font-size: .88rem; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.crumbs a { text-decoration: none; }
.filters { margin: 0 0 14px; display: grid; gap: 8px; }
.fpanels { display: flex; flex-wrap: wrap; gap: 8px; }
.fpanel > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--card); color: var(--ink); font-size: .92rem; font-weight: 600; cursor: pointer; }
.fpanel > summary::-webkit-details-marker { display: none; }
.fpanel > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.fpanel.picked > summary { background: var(--accent); color: #fff; }
.fpanel[open] { flex: 1 0 100%; }
.fpanel[open] > summary { margin-bottom: 8px; }
.fpanel .fbody { background: var(--card); border-radius: var(--r-card); padding: 14px; }
.fpanel .fbody > h3:first-child { margin-top: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 13px; border: 1.5px solid var(--line-strong); border-radius: 20px; text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 600; }
.opt .n { color: var(--muted); font-size: .85em; }
.opt.on { background: var(--mint); border-color: var(--accent); color: var(--accent-dark); }
.opt.on .n { color: inherit; }
.opt.off { color: #8A9792; border-style: dashed; }
.opt.any { border-color: transparent; background: var(--bg); color: var(--accent); }
.fpanel .list-filter { width: 100%; min-height: 46px; padding: 10px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font: inherit; margin: 0 0 10px; }
.toggles { margin: 0; }
.pcards { display: grid; gap: 12px; }
.pcard { background: var(--card); border-radius: var(--r-card); padding: 14px; display: grid; gap: 12px; }
.pcard-main { display: flex; gap: 12px; text-decoration: none; color: var(--ink); }
.pcard-main:hover { color: var(--ink); }
.pcard .avatar { width: 68px; height: 68px; }
.pcard-body { display: grid; gap: 3px; flex: 1; min-width: 0; align-content: start; }
.pcard-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard-title strong { font-size: 1.08rem; }
.pcard-price { flex: none; text-align: right; display: grid; align-content: start; }
.pcard-price b { font-size: 1.14rem; font-weight: 800; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0; }
.nearby { margin-top: 22px; }

/* Анкета */
/* Карусель фото: одно крупное фото, листается пальцем или стрелками, под ним миниатюры */
.gallery { margin: 0 0 14px; min-width: 0; }
.gal-stage { position: relative; aspect-ratio: 4 / 5; max-height: 72vh; border-radius: var(--r-card); overflow: hidden; background: #1B2623; }
.gal-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; outline-offset: -3px; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { position: relative; flex: 0 0 100%; overflow: hidden; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in; }
/* Поля вокруг фото другой формы закрывает оно же, размытое */
.gal-slide::before { content: ''; position: absolute; inset: -32px; background: var(--bg) center / cover no-repeat; filter: blur(26px) brightness(.78); }
.gal-slide img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.gal-nav, .lb-nav, .lb-close { position: absolute; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.gal-nav, .lb-nav { top: 50%; transform: translateY(-50%); }
.gal-nav { display: none; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.2); transition: opacity .15s; }
.gal-nav.prev, .lb-nav.prev { left: 12px; }
.gal-nav.next, .lb-nav.next { right: 12px; }
.gal-nav:disabled { opacity: 0; pointer-events: none; }
.gal-nav::before, .lb-nav::before { content: ''; width: 10px; height: 10px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-left: 4px; }
.gal-nav.next::before, .lb-nav.next::before { transform: rotate(-135deg); margin: 0 4px 0 0; }
.gal-count, .lb-count { position: absolute; padding: 4px 11px; border-radius: 999px; background: rgba(15,24,21,.62); color: #fff; font-size: .82rem; font-weight: 600; pointer-events: none; }
.gal-count { right: 12px; bottom: 12px; }
.gal-count b { font-weight: 700; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.gal-thumbs::-webkit-scrollbar { display: none; }
.gal-thumbs a { flex: none; width: 56px; height: 56px; border: 2px solid transparent; border-radius: 12px; overflow: hidden; opacity: .6; transition: opacity .15s, border-color .15s; }
.gal-thumbs a:hover, .gal-thumbs a.on { opacity: 1; }
.gal-thumbs a.on { border-color: var(--accent); }
.gal-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Фото во весь экран */
.lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(9,14,12,.96); }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: pointer; user-select: none; -webkit-user-select: none; }
.lb-nav, .lb-close { background: rgba(255,255,255,.16); color: #fff; }
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 12px; right: 12px; }
.lb-close::before, .lb-close::after { content: ''; position: absolute; width: 18px; height: 2.5px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.lb-close::after { transform: rotate(-45deg); }
.lb-count { bottom: 14px; left: 50%; transform: translateX(-50%); }
html.lb-open { overflow: hidden; }
.profile-head { display: grid; gap: 5px; margin-bottom: 14px; }
.profile-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-head p { margin: 0; }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile section { background: var(--card); border-radius: var(--r-card); padding: 16px; margin: 0 0 12px; }
.price-item { display: grid; gap: 7px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.price-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.price-item > strong { font-size: .97rem; }
/* Ссылки «Поиск · Метро · Районы»: на телефоне — строкой над списком, на широком экране они в меню шапки */
.search-links { display: flex; gap: 8px; margin: 0 0 12px; }
.search-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; background: var(--card); color: var(--ink); font-size: .92rem; font-weight: 700; text-decoration: none; }
.search-links a.on { background: var(--ink); color: #fff; }
.chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 10px; }
.chosen-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chosen-group b { margin-right: 2px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 6px 3px 12px; border-radius: 999px; background: var(--mint); color: var(--accent-dark); font-size: .92rem; font-weight: 600; text-decoration: none; }
.chip-x .x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(23, 82, 74, .13); font-size: 1rem; line-height: 1; }
.chip-x:hover .x, .chip-x:focus-visible .x { background: var(--accent); color: #fff; }
.chosen-links { font-size: .92rem; color: var(--muted); }
/* Поиск со всеми фильтрами */
.search-form { display: grid; gap: 12px; max-width: 860px; }
.search-form .card h2 { margin-bottom: 10px; }
.search-form .checks.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; margin-bottom: 6px; }
.search-form h3 { margin-top: 12px; }
.search-form .price-range { max-width: 360px; }
/* Указатели по метро и районам */
.geo-filter { width: 100%; max-width: 420px; min-height: 46px; padding: 10px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font: inherit; background: var(--card); color: var(--ink); margin: 0 0 14px; }
.geo-cols { columns: 2 170px; column-gap: 18px; background: var(--card); border-radius: var(--r-card); padding: 16px; }
.geo-group { break-inside: avoid; margin: 0 0 14px; display: grid; gap: 2px; }
.geo-group h2 { font-size: 1.05rem; margin: 0 0 4px; }
.geo-group.okrug h2 small { font-weight: 500; display: none; }
.geo-group [data-name] { min-width: 0; overflow-wrap: break-word; }
.geo-item { display: flex; align-items: center; gap: 8px; min-height: 34px; font-weight: 500; }
.geo-item a { color: var(--ink); text-decoration: none; }
.geo-item a:hover { color: var(--accent); text-decoration: underline; }
.geo-item .n, .geo-group h2 .n { color: var(--muted); font-size: .85rem; font-weight: 600; }
.geo-item.off, .geo-group .off { color: #9AA8A3; padding-left: 30px; }
.geo-group h2 .off { padding-left: 0; }
.all-link { display: inline-block; margin-top: 8px; font-size: .9rem; font-weight: 700; }
/* Списки станций и районов прямо на странице поиска */
.geo-pick { border-top: 1px solid var(--line); padding: 8px 0 4px; }
.geo-pick > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; list-style: none; }
.geo-pick > summary::-webkit-details-marker { display: none; }
.geo-pick > summary::before { content: ''; flex: none; width: 8px; height: 8px; margin: 0 2px 2px 3px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; }
.geo-pick[open] > summary::before { transform: rotate(45deg); }
.pick-sum { font-weight: 500; color: var(--muted); font-size: .92rem; }
.geo-pick .geo-filter { margin: 8px 0 12px; }
.geo-pick .geo-cols { background: none; padding: 0; border-radius: 0; }
.geo-empty { margin-top: 14px; color: var(--muted); }
.geo-empty summary { cursor: pointer; font-weight: 600; }
.geo-empty p { margin: 8px 0 0; font-size: .92rem; line-height: 1.6; }
.search-form .checks.cols2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; }
.q-line { margin: 2px 0 8px; }
/* Избранное и заметка на карточке */
.pcard-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.fav-form { display: inline-flex; margin: 0; }
.fav, .note-act { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: none; }
.fav:hover, .note-act:hover { color: var(--ink); }
.fav .heart { font-size: 1.2rem; line-height: 1; color: #B7C2BD; }
.fav.on { color: var(--ink); }
.fav.on .heart { color: #D9483B; }
.pcard-noteform { display: grid; gap: 6px; }
.pcard-noteform textarea { width: 100%; min-height: 54px; padding: 9px 11px; border: 1.5px solid #EBD9A8; border-radius: 12px; font: inherit; background: #fff; color: var(--ink); resize: vertical; }
.pcard-noteform .row { gap: 8px; }
.profile-acts { display: flex; }
.profile-acts .fav { font-size: .98rem; }
/* Заметка для себя */
.note-box { display: grid; gap: 6px; margin-top: 4px; padding: 12px; border-radius: 16px; background: #FDF3DF; }
.note-box label { font-weight: 700; font-size: .92rem; }
.note-box textarea { width: 100%; min-height: 54px; padding: 9px 11px; border: 1.5px solid #EBD9A8; border-radius: 12px; font: inherit; background: #fff; color: var(--ink); resize: vertical; }
.note-box .row { align-items: center; gap: 10px; }
.note-box .hint { flex: 1; min-width: 0; }
.note-all { font-size: .88rem; font-weight: 600; }
.pcard-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: #FDF3DF; color: #5A4300; font-size: .9rem; overflow-wrap: anywhere; }
/* Оценка и отзывы */
.rate { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.rate .star, .stars { color: #E3A008; }
.stars { letter-spacing: 1px; white-space: nowrap; }
.stars i { font-style: normal; color: #D5DCD8; }
.rate-link { text-decoration: none; color: var(--ink); }
.rate-link:hover { color: var(--ink); }
.pcard-side .rate { display: none; }
.reviews h2 .n { color: var(--muted); font-weight: 600; }
.rating-big { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.rating-big b { font-size: 1.8rem; font-weight: 800; }
.rating-big .stars { font-size: 1.2rem; }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.review time { color: var(--muted); font-size: .86rem; margin-left: auto; }
.review p { margin: 0 0 6px; overflow-wrap: anywhere; }
.card.review { border-top: 0; padding: 14px; margin-bottom: 10px; }
.review-form { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.review-form h3 { font-size: 1.05rem; color: var(--ink); font-weight: 800; margin: 0 0 8px; }
.rating-pick { border: 0; padding: 0; margin: 0 0 10px; min-width: 0; }
.rating-pick legend { font-weight: 700; padding: 0; margin-bottom: 2px; }
.rating-pick .pick { display: inline-flex; flex-direction: row-reverse; }
.rating-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-pick label { font-size: 2.1rem; line-height: 1; padding: 0 2px; color: #D5DCD8; cursor: pointer; }
.rating-pick input:checked ~ label, .rating-pick label:hover, .rating-pick label:hover ~ label { color: #E3A008; }
.rating-pick input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* Цены прямо в карточке выдачи */
.pcard-prices { min-width: 0; }
.pcard-prices small { flex: 1 0 100%; }
.pcard-prices span { padding: 5px 9px; border-radius: 10px; background: var(--bg); font-size: .86rem; white-space: nowrap; }
.pcard-prices span.hour { background: var(--mint); color: var(--accent-dark); }
/* Части карточки, которые видны только в выдаче на широком экране */
.pcard-photo, .pcard-about, .ps-kind, .ps-seen, .list-tools, .fseg, .h1-count { display: none; }
.pcard-side { display: contents; }
.h1-row h1 { margin-bottom: .5rem; }
.price-range { display: flex; gap: 8px; }
.price-range input { flex: 1; min-width: 0; width: 100%; min-height: 46px; padding: 10px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font: inherit; background: #fff; color: var(--ink); }
.price-range .btn { flex: none; }
.price-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.price-lines { display: grid; gap: 6px; }
.price-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-line small { min-width: 5.2em; }
.pcard-prices span.out { background: none; padding-left: 2px; color: var(--muted); }
.price-kinds { display: grid; gap: 6px; }
.price-kind { font-size: .86rem; font-weight: 700; color: var(--muted); margin-top: 4px; padding-left: 29px; }
.price-chips span { padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: .88rem; }
.price-chips span.hour { background: var(--mint); color: var(--accent-dark); }
/* Цены анкеты отдельным блоком — таблицей: сверху длительности, под ними строки «у мастера» и «выезд» */
.price-box { container-type: inline-size; margin: -6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
/* Справа от таблицы цен — отметки («Медкнижка»): есть — жирным, нет — бледно и зачёркнуто. Не помещаются рядом — встают под таблицей */
.price-marks { list-style: none; margin: 0; padding: 0 6px; display: grid; gap: 5px; }
.price-marks .yes { font-weight: 700; }
.price-marks small { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); }
.price-marks b { display: block; overflow-wrap: anywhere; }
.price-marks .no b { font-weight: 500; }
.price-marks { max-width: 260px; }
.price-marks .no { color: #A3AFAB; }
.price-grid { width: auto; border-collapse: separate; border-spacing: 6px; }
.price-grid th { padding: 0 6px 0 0; text-align: left; font-size: .86rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.price-grid thead th { padding: 0 2px; text-align: center; }
.price-grid td { padding: 7px 10px; border-radius: 10px; background: var(--bg); font-size: .92rem; font-weight: 700; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-grid thead td, .price-grid td.pad { background: none; padding: 0; }
.price-grid td.hour { background: var(--mint); color: var(--accent-dark); }
.price-grid td.none { background: none; color: #A3AFAB; font-weight: 500; }
/* Столбец справа от цен («Медкнижка»): название в строке со временем, значение одно на обе строки цен */
.price-grid td.x { white-space: normal; overflow-wrap: anywhere; max-width: 220px; vertical-align: middle; }
.pg-bands .price-grid.pg-x { width: auto; table-layout: auto; }
.pg-bands .price-grid.pg-x thead th { padding: 0; text-align: left; }
.pg-bands .price-grid.pg-x td.x { padding: 7px 12px; min-width: 76px; text-align: left; }
.pg-bands .price-grid.pg-x td.x.none { padding: 0; min-width: 0; }
.pg-bands .price-grid.pg-x td.pad { display: none; }
/* В карточке списка анкет та же сетка, только плотнее */
.pcard-prices .price-box { margin: -4px; }
.price-box.pg-card .price-grid { border-spacing: 4px; }
.price-box.pg-card .price-grid th { font-size: .8rem; }
.price-box.pg-card .price-grid td { padding: 5px 8px; font-size: .86rem; border-radius: 8px; }
.price-box.pg-card .pg-bands { max-width: 380px; gap: 4px; }
.price-box.pg-card .pg-bands .price-grid td { padding: 5px 1px; font-size: .84rem; }
/* Таблица идёт полосами по три длительности: помещается и на телефоне. Когда длительностей больше трёх и места хватает,
   вместо полос показывается одна таблица. Ширина считается по самому блоку цен, а не по экрану: рядом может стоять боковая колонка. */
.price-grid.pg-wide { display: none; }
.pg-bands { display: grid; gap: 8px; flex: 1 1 280px; max-width: 440px; min-width: 0; }
.pg-bands .price-grid { width: 100%; table-layout: fixed; }
.pg-bands .price-grid thead td:first-child { width: 5.4em; }
.pg-bands .price-grid td { padding: 7px 1px; font-size: .88rem; }
@container (max-width: 330px) { .pg-bands .price-grid { border-spacing: 4px; } .pg-bands .price-grid th { font-size: .78rem; padding-right: 2px; } .pg-bands .price-grid td { font-size: .8rem; } .pg-bands .price-grid thead td:first-child { width: 5.6em; } }
@container (min-width: 500px) { .price-grid.pg-wide.n4 { display: table; } .price-grid.pg-wide.n4 + .pg-bands { display: none; } }
@container (min-width: 600px) { .price-grid.pg-wide.n5 { display: table; } .price-grid.pg-wide.n5 + .pg-bands { display: none; } }
@container (min-width: 700px) { .price-grid.pg-wide.n6 { display: table; } .price-grid.pg-wide.n6 + .pg-bands { display: none; } }
@container (min-width: 800px) { .price-grid.pg-wide.n7 { display: table; } .price-grid.pg-wide.n7 + .pg-bands { display: none; } }
/* Услуги в анкете: весь список по группам. Отмеченные — жирным, остальные — бледно и зачёркнуто */
/* Группы услуг — отдельными блоками, у каждой свой цвет: фон блока и плашка с названием группы */
.svc-block { --tint: #F1F8F4; --pill: #DDF2E8; --pill-ink: #17524A; margin: 0 0 10px; padding: 12px 14px 14px; border-radius: 16px; background: var(--tint); }
.svc-block:last-child { margin-bottom: 0; }
.svc-block.c2 { --tint: #EFF5FC; --pill: #D9E7F9; --pill-ink: #24467A; }
.svc-block.c3 { --tint: #FDF5EA; --pill: #FAE4C6; --pill-ink: #7A4A10; }
.svc-block.c4 { --tint: #F5F1FB; --pill: #E6DCF7; --pill-ink: #4B2F7D; }
.svc-block.c5 { --tint: #FCF0F3; --pill: #F8DAE1; --pill-ink: #7D2B40; }
.svc-group { width: fit-content; margin: 0 0 10px; padding: 5px 14px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); font-size: .95rem; font-weight: 800; }
.svc-block .svc-list { margin-bottom: 0; }
.svc-block .svc-list .no { color: #98A5A1; }
.svc-list { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 5px 18px; }
.svc-list .yes { font-weight: 700; }
.svc-list .no { color: #A3AFAB; }
.params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.params > div { display: grid; gap: 2px; }
.params .wide { grid-column: 1 / -1; }
.params dt { color: var(--muted); font-size: .8rem; }
.params dd { margin: 0; font-weight: 700; }
.cta-bar { position: sticky; bottom: 0; z-index: 15; background: var(--card); border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.cta-bar .btn { min-height: 52px; border-radius: 16px; font-size: 1.03rem; }
.cta-row { display: flex; gap: 8px; }
.cta-row .btn.primary { flex: 1 1 auto; }
.cta-row .cta-phone { flex: 0 0 56px; padding: 0; justify-content: center; }
.cta-bar p { margin: 0; text-align: center; font-size: .8rem; color: var(--muted); }
.cta-bar > * { max-width: 728px; width: 100%; margin-left: auto; margin-right: auto; }
.prose p { max-width: 65ch; }

/* Чаты: список */
.guest-note { background: var(--soft); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; display: grid; gap: 4px; font-size: .9rem; line-height: 1.4; }
.guest-note a { font-weight: 700; }
.chat-list { background: var(--card); border-radius: var(--r-card); padding: 2px 14px; display: grid; }
.chat-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.chat-row:last-child { border-bottom: 0; }
.chat-row:hover { color: var(--ink); }
.chat-ava { position: relative; flex: none; width: 52px; height: 52px; }
.chat-ava .avatar { width: 52px; height: 52px; }
.chat-ava .dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: var(--online); }
.chat-row-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chat-row-top time { font-size: .8rem; color: var(--muted); flex: none; }
.chat-row-last { display: flex; align-items: center; gap: 5px; font-size: .9rem; color: var(--muted); min-width: 0; }
.chat-row-last .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.unread strong, .chat-row.unread .txt { font-weight: 800; color: var(--ink); }
.chat-row.unread time { color: var(--accent-dark); font-weight: 700; }
.ticks { display: inline-flex; flex: none; color: var(--muted); }
.ticks .t2 { display: none; }
.ticks-sent { opacity: .45; }
.ticks-read { color: var(--accent); }
.ticks-read .t2 { display: inline; }

/* Чаты: диалог занимает весь экран */
.site-main.bare { max-width: 760px; padding: 0; }
.chat { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 4px; background: var(--card); border-bottom: 1px solid var(--line); }
.chat-back { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.chat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.chat-who .avatar { width: 42px; height: 42px; }
.chat-who > span:last-child { display: grid; min-width: 0; }
.chat-who strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who small { font-size: .8rem; font-weight: 600; }
.chat-who small.is-online { color: var(--accent-dark); }
.chat-menu { position: relative; flex: none; }
.chat-menu > summary { list-style: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; }
.chat-menu > summary::-webkit-details-marker { display: none; }
.chat-menu-body { position: absolute; right: 0; top: 46px; z-index: 30; width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 8px 24px rgba(23, 35, 31, .12); }
.chat-menu-body form { display: grid; gap: 6px; }
.chat-menu-body input { min-height: 40px; padding: 8px 10px; border: 1.5px solid var(--line-strong); border-radius: 10px; font: inherit; }
.chat-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.chat-strip > span { display: grid; gap: 1px; min-width: 0; }
.chat-strip strong { font-size: .88rem; }
.chat-strip small { font-size: .8rem; }
.chat-strip b { flex: none; font-size: .88rem; color: var(--accent); }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-note { align-self: center; margin: 0 0 4px; max-width: 320px; padding: 8px 12px; border-radius: 12px; background: var(--soft); color: #2F4039; font-size: .8rem; line-height: 1.4; text-align: center; }
.chat-day { align-self: center; font-size: .8rem; font-weight: 700; color: var(--muted); }
.chat-empty { align-self: center; margin: auto 0; color: var(--muted); text-align: center; }
.msg { max-width: 78%; padding: 9px 12px 6px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; border-radius: 18px 18px 4px 18px; background: var(--accent); color: #fff; }
.msg.them { align-self: flex-start; border-radius: 18px 18px 18px 4px; background: var(--card); }
.msg-text { font-size: .97rem; line-height: 1.35; }
.msg-meta { justify-self: end; display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; color: var(--muted); }
.msg.me .msg-meta, .msg.me .ticks { color: #EAF5F0; }
.msg.me .ticks-read { color: #fff; }
.chat-typing { align-self: flex-start; padding-left: 4px; font-size: .8rem; color: var(--muted); }
.chat-foot { background: var(--card); border-top: 1px solid var(--line); padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
.chat-foot .flash { margin: 0 0 8px; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; }
.chat-form textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 132px; padding: 12px 16px; border: 1.5px solid var(--line-strong); border-radius: 24px; background: var(--bg); color: var(--ink); font: inherit; resize: none; }
.chat-form button { width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-blocked { margin: 0; text-align: center; color: var(--muted); font-weight: 600; padding: 10px 0; }

table.prices td:not(:first-child), table.prices thead th:not(:first-child) { text-align: right; white-space: nowrap; }
table.prices tr.group th { text-align: left; color: var(--muted); font-size: .86rem; padding-top: 14px; }
/* Салон: анкеты мастеров */
.master-list { display: grid; gap: 10px; }
.master-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.master-row .avatar { width: 56px; height: 56px; }
.master-info { flex: 1; min-width: 150px; display: grid; gap: 2px; justify-items: start; }
.salon-team { margin-top: 22px; }
/* Свои страницы и тексты под выдачей */
.prose h2 { font-size: 1.2rem; margin: 1.2rem 0 .5rem; }
.prose h3 { font-size: 1rem; color: var(--ink); margin: 1rem 0 .4rem; }
.prose ul { margin: 0 0 .8rem; padding-left: 1.2rem; max-width: 65ch; }
.prose li { margin-bottom: .3rem; }
.seo-text { margin-top: 22px; }
/* Текст под анкетами занимает всю ширину блока: узкая колонка оставляла справа пустое место */
.seo-text p, .seo-text ul { max-width: none; }
.site-logo img { display: block; height: 36px; width: auto; max-width: 220px; }
.logo-preview img { height: 36px; width: auto; }

/* Админка: быстрые ссылки, надписи */
.mt { margin-top: 22px; }
.stats.links .stat b { font-size: 1.05rem; margin-bottom: 2px; }
.stats.links { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
ul.plain { margin: 0 0 .8rem; padding-left: 1.1rem; }
.form input[type=color] { width: 72px; min-height: 44px; height: 44px; padding: 4px; cursor: pointer; }
.form input[type=file] { border: 0; padding: 0; min-height: 0; background: none; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; }
.tx-list { display: grid; gap: 0; padding: 4px 14px; }
.tx-row { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx-row:last-child { border-bottom: 0; }
.tx-row .tx-src { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.tx-row .tx-src .hint { display: block; margin-top: 2px; }
.tx-row textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font: inherit; background: #fff; color: var(--ink); resize: vertical; }
.tx-row.changed textarea { border-color: var(--accent); background: var(--mint); }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + 8px); background: var(--card); padding: 10px 14px; border-radius: var(--r-card); box-shadow: 0 2px 14px rgba(23, 35, 31, .12); margin-top: 12px; }
details.card > summary { cursor: pointer; font-weight: 700; }
details.card[open] > summary { margin-bottom: 12px; }

/* Полоска администратора на страницах сайта и правка надписей на месте */
.adminbar { position: fixed; left: 8px; right: 8px; bottom: calc(var(--nav-h) + 8px); z-index: 40; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--ink); color: #fff; border-radius: 16px; box-shadow: 0 6px 24px rgba(23, 35, 31, .28); }
.no-bottom-nav .adminbar { bottom: 84px; }
.adminbar form { display: inline-flex; }
.adminbar .btn { border-color: transparent; background: rgba(255, 255, 255, .14); color: #fff; }
.adminbar .btn.primary { background: #fff; color: var(--ink); }
.adminbar-note { font-size: .88rem; font-weight: 600; padding: 0 4px; }
.asbar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; background: #FDF3DF; color: var(--warn); font-weight: 600; font-size: .92rem; }
.tx-on .tx { outline: 1.5px dashed var(--accent); outline-offset: 2px; border-radius: 3px; cursor: text; }
.tx-on .tx.tx-changed { outline-style: solid; }
.tx-on .btn.primary .tx { outline-color: #fff; }
.tx-dialog { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 48px); border: 0; border-radius: 22px; padding: 20px; color: var(--ink); font: inherit; box-shadow: 0 12px 48px rgba(23, 35, 31, .3); }
.tx-dialog::backdrop { background: rgba(23, 35, 31, .45); }
.tx-dialog h2 { font-size: 1.2rem; }
.tx-dialog .tx-list { padding: 0; max-height: 52vh; overflow-y: auto; margin-bottom: 10px; }
.tx-dialog .tx-filter { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font: inherit; margin-bottom: 6px; }
.tx-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.tx-go { display: inline-block; font-weight: 600; margin-bottom: 8px; }

/* Шапка: меню слева, вход справа (на телефоне спрятаны) */
.hdr-left { display: flex; align-items: center; gap: 28px; }
.main-nav { display: none; gap: 22px; }
.main-nav a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.fpanel.picked .ft { display: none; }

/* Главная */
.hero { padding: 6px 0 22px; }
.hero h1 { font-size: 2.2rem; line-height: 1.06; letter-spacing: -0.03em; }
.lead { font-size: 1.06rem; line-height: 1.5; color: #44524D; max-width: 34em; margin-bottom: 16px; }
.home-search { display: grid; gap: 10px; background: var(--card); border-radius: 24px; padding: 14px; max-width: 660px; }
.home-search select { width: 100%; min-height: 54px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 16px; font: inherit; font-weight: 600; background: #fff; color: var(--ink); }
.home-search .btn { min-height: 54px; border-radius: 16px; font-size: 1.03rem; }
.home-block { margin: 0 0 28px; }
.home-block h2, .home-cols h2, .how h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
.home-block .head-row a { font-weight: 700; text-decoration: none; }
.home-cols { display: grid; gap: 26px; margin: 0 0 28px; }
.chips.links a { background: var(--card); border-color: transparent; }
.how { padding: 24px; border-radius: 28px; }
.how-grid { display: grid; gap: 20px; }
.how-grid h3 { font-size: 1.12rem; color: var(--ink); font-weight: 800; margin: 8px 0 4px; }
.how-grid p { margin: 0; color: #44524D; }
.num { width: 36px; height: 36px; border-radius: 50%; background: var(--mint); color: var(--accent-dark); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* Блоки, которые на телефоне скрыты */
.side-cta, .chat-pane-empty { display: none; }
.side-price { margin: 0; }
.side-price b { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.side-note { margin: 0; text-align: center; font-size: .82rem; color: var(--muted); }
.side-cta .chat-note { max-width: none; margin: 0; align-self: stretch; text-align: left; }
.listing-body .toggles { margin-bottom: 14px; }
.chat-layout.has-chat .chat-side { display: none; }
.is-bare .site-header { display: none; }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .adminbar, .no-bottom-nav .adminbar { left: auto; right: 16px; bottom: 16px; }
  .tx-form .tx-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
  .sticky-actions { bottom: 12px; }
  .wide-only { display: inline-flex !important; }
  form.wide-only { display: inline !important; }
  .narrow-only { display: none !important; }
  .main-nav { display: flex; }
  .search-links { display: none; }
  .main-nav { gap: 18px; }
  .site-header { padding: 14px 24px; max-width: 1160px; }
  .site-logo { font-size: 1.5rem; }
  .site-main { padding: 12px 24px 24px; }
  .site-footer { padding: 0 24px; max-width: 1160px; }
  .pcards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
  .price-cells { grid-template-columns: repeat(6, 1fr); }
  .price-with-side { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .price-side { min-width: 150px; max-width: 240px; }
  .gal-stage { aspect-ratio: 4 / 3; max-height: 560px; }
  .gal-nav { display: flex; }
  .gal-thumbs a { width: 72px; height: 72px; }
  .home-search { grid-template-columns: 1fr 1fr auto; }
  .home-cols { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 3.2rem; }
  .chat { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

@media (min-width: 1024px) {
  .site-main.wide { max-width: 1320px; }
  .site-header, .site-footer, .tabs { max-width: 1320px; }
  .tabs { padding: 0 20px; }
  h1 { font-size: 2.2rem; }

  /* Выдача: фильтры боковой колонкой */
  .listing { display: grid; grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "side head" "side body"; gap: 6px 32px; align-items: start; }
  .listing-head { grid-area: head; }
  .listing-body { grid-area: body; }
  .listing-side { grid-area: side; padding: 6px 0 0; }
  .listing-side .filters { margin: 0; }
  .listing-side .fpanels { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .listing-side .fpanel, .listing-side .fpanel[open], .listing-side .fseg { flex: none; padding: 0; margin: 0 0 24px; }
  .listing-side .fseg { display: block; order: -4; }
  .listing-side .fpanel.f-price { order: -3; }
  .listing-side .fpanel.f-metro { order: -2; }
  .listing-side .fpanel.more { margin-bottom: 0; }
  .listing-side .fseg h3, .listing-side .fpanel > summary { min-height: 0; padding: 0; margin: 0 0 10px; background: none; color: var(--ink); font-size: 1.05rem; font-weight: 800; cursor: default; }
  .listing-side .fpanel > summary::after { display: none; }
  .listing-side .fpanel.picked .ft { display: inline; }
  .listing-side .fpanel .fv { display: none; }
  .listing-side .fpanel .fbody { padding: 0; border-radius: 0; background: none; }
  .listing-side .fbody > h3 { font-size: .86rem; }
  .listing-side .opts { display: grid; gap: 2px; max-height: 292px; overflow-y: auto; }
  .listing-side .opt { border: 0; border-radius: 12px; justify-content: space-between; min-height: 38px; padding: 0 10px; font-weight: 500; }
  .listing-side .opt:hover { background: var(--card); }
  .listing-side .opt.on { background: var(--card); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--ink); }
  .listing-side .opt.off { display: none; }
  .listing-side .opt.any { background: none; color: var(--accent); font-weight: 700; }
  .listing-side .checks.cols2 { grid-template-columns: 1fr; }
  .listing-side .f-sort { display: none; }
  .listing-side .price-range .btn { display: none; }
  /* Кнопки-сегменты: «Все / Частные / Салоны» */
  .seg { display: flex; flex-wrap: wrap; gap: 6px; }
  .seg a, .seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; background: #E6ECE9; color: var(--ink); font-size: .95rem; font-weight: 600; text-decoration: none; }
  .seg a:hover { background: #DCE4E0; }
  .seg .on { background: var(--ink); color: #fff; }

  /* Заголовок с числом анкет и панель над списком */
  .h1-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .h1-count { display: inline; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; color: #A3B0AB; line-height: 1.15; }
  .listing-body .toggles { display: none; }
  .list-tools { display: flex; align-items: center; gap: 26px; margin: 0 0 14px; min-height: 40px; }
  .sortbox { position: relative; }
  .sortbox > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
  .sortbox > summary::-webkit-details-marker { display: none; }
  .sortbox > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: 4px; }
  .sortbox > summary b { font-weight: 700; }
  .sortbox .menu { position: absolute; z-index: 15; top: 100%; left: 0; margin-top: 8px; min-width: 250px; padding: 6px; display: grid; background: var(--card); border-radius: 16px; box-shadow: 0 8px 30px rgba(23, 35, 31, .16); }
  .sortbox .menu a { padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
  .sortbox .menu a:hover { background: var(--bg); }
  .sortbox .menu a.on { font-weight: 700; background: var(--mint); }
  .switch { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
  .switch:hover { color: var(--ink); }
  .switch .sw { position: relative; width: 38px; height: 22px; border-radius: 11px; background: #C9D3CF; transition: background .15s; }
  .switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
  .switch.on .sw { background: var(--ink); }
  .switch.on .sw::after { left: 18px; }

  /* Выдача строками: крупное фото, имя и цены, описание, справа — кто это и кнопка */
  .pcards.rows { grid-template-columns: 1fr; gap: 12px; }
  .geo-cols { columns: 4 200px; padding: 22px; }
  .geo-group.okrug h2 small { display: inline; }
  .geo-pick .geo-cols { columns: 3 200px; }
  .listing-head .lead { margin: 6px 0 0; max-width: 46em; font-size: 1rem; }
  .listing-body .home-cols, .listing-body .how { margin-top: 28px; }
  .pcards.rows .pcard { grid-template-columns: 216px minmax(0, 1fr) 200px; grid-template-areas: "photo main side" "photo prices side" "photo about side" "photo note side"; grid-template-rows: auto auto auto 1fr; gap: 10px 22px; padding: 14px; align-items: start; }
  .pcards.rows .pcard-photo { display: block; grid-area: photo; position: relative; width: 216px; height: 216px; border-radius: 16px; overflow: hidden; background: var(--bg); }
  .pcards.rows .pcard-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .pcards.rows .pcard-photo .avatar { width: 100%; height: 100%; border-radius: 0; font-size: 4.5rem; }
  .ph-count { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 9px; background: rgba(23, 35, 31, .72); color: #fff; font-size: .78rem; font-weight: 600; }
  .pcards.rows .pcard-main { grid-area: main; flex-direction: column; gap: 4px; }
  .pcards.rows .pcard-main > .avatar { display: none; }
  .pcards.rows .pcard-body { display: contents; }
  .pcards.rows .pcard-title strong { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
  .pcards.rows .pcard-main:hover .pcard-title strong { color: var(--accent); }
  .pcards.rows .pcard-title .online, .pcards.rows .pcard-title .rate { display: none; }
  .pcards.rows .pcard-side .rate { display: inline-flex; }
  .pcards.rows .pcard-note, .pcards.rows .pcard-noteform { grid-area: note; align-self: start; }
  .pcards.rows .pcard-acts { flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 4px; }
  .pcards.rows .pcard-price { order: 1; display: flex; align-items: baseline; gap: 8px; text-align: left; }
  .pcards.rows .pcard-price b { font-size: 1.35rem; }
  .pcards.rows .pcard-body > small { order: 2; font-size: .95rem; color: var(--ink); }
  .pcards.rows .pcard-body > small + small { color: var(--muted); }
  .pcards.rows .pcard-body .k, .pcards.rows .pcard-body .sep { display: none; }
  .pcards.rows .pcard-prices { grid-area: prices; }
  .pcards.rows .pcard-about { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; grid-area: about; margin: 0; color: var(--muted); max-width: 62ch; }
  .pcards.rows .pcard-side { display: flex; flex-direction: column; gap: 6px; grid-area: side; align-self: stretch; }
  .pcards.rows .ps-kind { display: block; font-weight: 700; }
  .pcards.rows .ps-seen { display: block; color: var(--muted); font-size: .9rem; }
  .pcards.rows .pcard-contact { margin-top: auto; }
  /* в узкой колонке справа: номер во всю ширину, под ним значки, кнопка чата — в две строки */
  .pcards.rows .pc-row { flex-wrap: wrap; }
  .pcards.rows .pc-row form, .pcards.rows .pc-row > .phone-num { flex: 1 1 100%; }
  .pcards.rows .pc-row .pc-ico { flex: 1 1 0; }
  .pcards.rows .pc-chat .chat-lbl { flex-direction: column; align-items: center; gap: 1px; }
  .pcards.rows .pc-chat .chat-st { font-size: .74rem; }
  .pcards.rows .ps-seen:empty { display: none; }

  /* Анкета: фото и разделы слева, блок с кнопкой справа */
  .profile { display: grid; grid-template-columns: minmax(0, 1fr) 370px; grid-template-areas: "gallery side" "sections side"; gap: 16px 24px; align-items: start; }
  .profile .gallery { grid-area: gallery; margin: 0; }
  .gal-stage { border-radius: 24px; }
  .profile-side { grid-area: side; position: sticky; top: 16px; background: var(--card); border-radius: 24px; padding: 22px; display: grid; gap: 14px; }
  .profile-side .profile-head { margin: 0; }
  .side-cta { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
  .side-cta .btn { min-height: 56px; border-radius: 16px; font-size: 1.06rem; }
  .profile-sections { grid-area: sections; }
  .profile section { border-radius: 24px; padding: 22px; margin-bottom: 16px; }
  .price-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .price-lines { justify-items: end; }
  .price-line { justify-content: flex-end; }
  .price-line small { text-align: right; }
  .cta-bar { display: none; }

  /* Чаты: список слева, диалог справа */
  .is-bare .site-header { display: flex; }
  .site-main.bare { max-width: 1320px; padding: 8px 24px 24px; }
  .chat-layout { display: grid; grid-template-columns: 370px minmax(0, 1fr); background: var(--card); border-radius: 24px; overflow: hidden; height: calc(100vh - 118px); min-height: 520px; }
  .chat-layout .chat-side, .chat-layout.has-chat .chat-side { display: block; border-right: 1px solid var(--line); padding: 18px 14px; overflow-y: auto; }
  .chat-side h1 { font-size: 1.5rem; }
  .chat-side .chat-list { padding: 0; border-radius: 0; }
  .chat-side .chat-row { padding: 12px 8px; border-radius: 14px; border-bottom: 0; }
  .chat-side .card { padding: 8px; }
  .chat-row.active { background: var(--bg); }
  .chat-pane-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--bg); }
  .chat-pane-empty p { margin: 0; }
  .chat { height: auto; min-height: 0; border: 0; }
  .chat-back { display: none; }
  .chat-head { padding-left: 16px; }
  .msg { max-width: 62%; }
}
@media (max-width: 420px) {
  .params { grid-template-columns: 1fr; }
}

/* Админка: тексты ИИ */
.ai-model { margin-top: 12px; max-width: 520px; }
.ai-vars { margin: 0 0 14px; }
.ai-vars summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.ai-pick { align-items: center; margin-bottom: 10px; }
.ai-pick input[type=search] { flex: 1 1 200px; max-width: 320px; min-height: 38px; padding: 6px 11px; border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl); font: inherit; background: var(--card); color: var(--ink); }
.ai-table td:first-child, .ai-table th:first-child { width: 36px; }
.ai-table tr.busy td { background: var(--soft); }
.ai-table tr.failed td { background: #FCEEEC; }
.ai-opts { display: grid; gap: 2px; margin: 0 0 10px; }
.ai-progress { flex: 1 0 100%; margin: 0; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--soft); color: var(--accent-dark); font-weight: 600; }
.ai-progress.bad { background: #FBE3E1; color: var(--err); }

/* Анкета: телефон и мессенджеры */
.contacts { display: grid; gap: 8px; margin: 12px 0 0; scroll-margin-top: 14px; }
.contacts .btn { min-height: 48px; gap: 8px; }
.contacts form { margin: 0; }
.phone-num { font-weight: 800; font-size: 1.08rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.contact-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.contact-btns .btn { display: flex; justify-content: center; }
.msg-wa svg { color: #1FAF54; }
.msg-tg svg { color: #2A9BD8; }

/* Связь в карточке списка: номер, «Написать» (если мастер в сети) и значки мессенджеров */
.pcard-contact { display: grid; gap: 6px; }
.pcard-contact form { margin: 0; }
.pcard-contact .btn { min-height: 42px; gap: 7px; padding-left: 10px; padding-right: 10px; }
.pcard-contact .phone-num { font-size: .98rem; white-space: nowrap; }
.pcard-contact .phone-num svg { display: none; }
.pc-row { display: flex; gap: 6px; }
.pc-row form { flex: 1 1 auto; display: flex; }
.pc-row form .btn, .pc-row > .phone-num { flex: 1 1 auto; justify-content: center; }
.pc-row .pc-ico { flex: 0 0 46px; padding: 0; justify-content: center; }
.pc-row .pc-ico span { display: none; }
.pcard-contact .pc-chat { display: flex; justify-content: center; text-align: center; padding-top: 4px; padding-bottom: 4px; }

/* «Написать (в сети)» / «Написать (не в сети, был(а) в 15:43)» */
.chat-lbl { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 6px; line-height: 1.2; }
.chat-st { font-weight: 500; font-size: .84em; opacity: .75; white-space: nowrap; }
.chat-st.on { opacity: 1; }
.btn.soft .chat-st.on { color: var(--online); }
.cta-bar .chat-st { font-size: .78em; }
