/* TishNarx — стили сайта. Один акцент (глубокий зелёный), светлая база. */
:root {
  --accent: #1f7a5c;
  --accent-dark: #155c44;
  --accent-soft: #e7f2ed;
  --accent-line: #cfe5da;
  --ink: #1b1d1c;
  --muted: #646a67;
  --line: #e4e7e5;
  --bg: #ffffff;
  --bg-soft: #f5f7f6;
  --warn: #8a5a00;
  --warn-soft: #fdf4e3;
  --r: 18px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 40, 30, .04), 0 6px 24px rgba(20, 40, 30, .06);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; opacity: 1 !important; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; }
h2 { font-size: clamp(23px, 3vw, 32px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--s { width: 18px; height: 18px; }
section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 720px; margin-bottom: 28px; }
.section__head p { color: var(--muted); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; font: 700 15px/1 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-weight: 600; }
.btn--link:hover { text-decoration: underline; }

/* шапка */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; flex-direction: column; color: var(--ink); line-height: 1; }
.logo:hover { text-decoration: none; color: var(--ink); }
.logo__name { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.logo__name b { color: var(--accent); font-weight: 800; }
.logo__tag { font-size: 11.5px; color: var(--muted); margin-top: 3px; letter-spacing: .01em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }
.header__cta { margin-left: 4px; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.mnav { display: none; }

/* хлебные крошки */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }

/* первый экран */
.hero { padding: 56px 0 64px; background: linear-gradient(180deg, var(--bg-soft), #fff); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 600px; }
.hero__art { justify-self: end; width: 100%; max-width: 420px; }
.search { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); max-width: 640px; }
.search label { display: block; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; color: var(--muted); font-size: 14.5px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts .ico { color: var(--accent); }
ul.plain { list-style: none; padding: 0; margin: 0; }

/* поля */
.field { display: block; width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); font: 500 16px var(--font); color: var(--ink); background: #fff; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23646a67' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
.field.is-error { border-color: #c0392b; }
textarea.field { min-height: 90px; resize: vertical; }
.lbl { display: block; font-size: 13.5px; font-weight: 600; margin: 0 0 6px; color: var(--muted); }

/* карточки услуг */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--bg-soft); display: grid; place-items: center; color: var(--ink); transition: background .15s, color .15s; }
.card__icon .ico { width: 28px; height: 28px; }
a.card:hover .card__icon { background: var(--accent-soft); color: var(--accent); }
.card__title { font-size: 18px; font-weight: 700; margin: 0; }
.card__price { font-size: 15px; color: var(--muted); margin: 0; }
.card__price b { color: var(--ink); font-size: 17px; }
.card__arrow { position: absolute; top: 22px; right: 22px; color: var(--muted); }
a.card:hover .card__arrow { color: var(--accent); }
.card--soon { background: var(--bg-soft); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.badge--accent { background: var(--accent-soft); color: var(--accent-dark); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--ad { background: #f1f1f1; color: #555; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 24px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.step__n { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; }

/* принципы */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.rules li { display: flex; gap: 12px; align-items: flex-start; }
.rules .ico { color: var(--accent); margin-top: 2px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 44px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5 1v8M1 5h8' stroke='%231b1d1c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat; }
.faq details[open] summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 5h8' stroke='%231b1d1c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.faq details p { color: var(--muted); padding: 0 0 18px; margin: 0; }

/* CTA-полоса */
.cta { border-radius: 24px; background: var(--accent); color: #fff; padding: 36px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0; opacity: .88; }
.cta .btn--ghost { border-color: #fff; }

/* страница услуги */
.page-head { padding: 22px 0 28px; }
.page-head__lead { font-size: 17px; color: var(--muted); max-width: 760px; }
.summary { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.summary__item { padding: 12px 16px; border-radius: 14px; background: var(--bg-soft); min-width: 150px; }
.summary__item b { display: block; font-size: 19px; }
.summary__item span { font-size: 13.5px; color: var(--muted); }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; margin-bottom: 16px; }
.filters--nosys { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.check { display: flex; align-items: center; gap: 10px; min-height: 46px; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: 600 14px var(--font); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.result-count { font-size: 14px; color: var(--muted); margin: 0 0 10px; }

/* таблица цен (на телефоне — карточки) */
.ptable { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.ptable th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .num { white-space: nowrap; }
.price { font-weight: 800; font-size: 18px; white-space: nowrap; }
.price small { font-weight: 600; font-size: 13px; color: var(--muted); }
.price-sub { font-size: 13px; color: var(--muted); }
.clinic-cell a { font-weight: 700; color: var(--ink); font-size: 16px; }
.clinic-cell a:hover { color: var(--accent); }
.clinic-cell .muted { font-size: 14px; display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.src { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.src a { display: inline-flex; align-items: center; gap: 4px; }
.more { margin-top: 10px; font-size: 14px; }
.more summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.more ul { margin: 8px 0 0; padding: 0; list-style: none; }
.more li { padding: 6px 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; }
.note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); display: none; }
.noprice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.noprice__item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.noprice__item a { font-weight: 700; color: var(--ink); }

/* справка */
.ref { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ref__box { padding: 24px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
.ref__box ul { margin: 0; padding-left: 20px; }
.ref__box li { margin-bottom: 6px; }
.systable { width: 100%; border-collapse: collapse; font-size: 15px; }
.systable td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.systable td + td { color: var(--muted); text-align: right; }
.disclaimer { display: flex; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--bg-soft); color: var(--muted); font-size: 14px; margin-top: 24px; }
.disclaimer .ico { color: var(--muted); }

/* карточка клиники */
.clinic-head { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.clinic-mark { width: 72px; height: 72px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.clinic-mark .ico { width: 38px; height: 38px; }
.clinic-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.infobox { position: sticky; top: 88px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; display: flex; flex-direction: column; gap: 14px; }
.infobox__row { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.infobox__row .ico { color: var(--accent); margin-top: 1px; }
.infobox__row a { word-break: break-word; }
.infobox .btn { width: 100%; }
.svc-block { margin-bottom: 28px; }
.svc-block h3 { display: flex; align-items: center; gap: 10px; }
.svc-block h3 .ico { color: var(--accent); }
.linkrow { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }

/* модалка */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 28, 24, .45); }
.modal.is-open { display: flex; }
.modal__box { width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 20px; padding: 26px; position: relative; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-soft); cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.modal h2 { font-size: 24px; padding-right: 40px; }
.form { display: grid; gap: 14px; }
.consent { font-size: 13px; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { padding: 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); font-size: 15px; }
.form-msg--err { background: var(--warn-soft); color: var(--warn); }
.form-msg textarea { width: 100%; margin-top: 10px; font: 14px var(--font); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 120px; }

/* подвал */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 44px 0 30px; margin-top: 40px; font-size: 14.5px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { margin: 0 0 12px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.footer a { color: var(--ink); }
.footer li { margin-bottom: 8px; }
.footer__note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* статичный текст (политика) */
.prose { max-width: 780px; }
.prose h2 { font-size: 22px; margin-top: 1.6em; }
.prose li { margin-bottom: 6px; }

/* адаптив */
@media (max-width: 1040px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clinic-grid { grid-template-columns: 1fr; }
  .infobox { position: static; }
}
@media (max-width: 900px) {
  .nav, .header__cta { display: none; }
  .burger { display: inline-flex; }
  .mnav.is-open { display: block; border-top: 1px solid var(--line); padding: 8px 20px 18px; background: #fff; }
  .mnav a { display: block; padding: 12px 0; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
  .mnav .btn { margin-top: 14px; width: 100%; border-bottom: 0; color: #fff; }
  .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero__art { display: none; }
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .ref, .noprice { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  /* таблица → карточки */
  .ptable, .ptable tbody, .ptable tr, .ptable td { display: block; width: 100%; }
  .ptable { border: 0; background: none; border-radius: 0; overflow: visible; }
  .ptable thead { display: none; }
  .ptable tr { border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: 12px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .ptable td { min-width: 0; overflow-wrap: break-word; }
  .ptable td.c-price { max-width: 55vw; white-space: normal; text-align: right; }
  .ptable tr[hidden] { display: none; }
  .ptable td { padding: 0; border: 0; }
  .ptable td.c-clinic { grid-column: 1 / 2; }
  .ptable td.c-price { grid-column: 2 / 3; grid-row: 1; text-align: right; }
  .ptable td.c-what, .ptable td.c-src, .ptable td.c-act { grid-column: 1 / -1; }
  .ptable td.c-act .btn { width: 100%; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  section { padding: 44px 0; }
  .hero { padding: 32px 0 44px; }
  .search { grid-template-columns: 1fr; }
  .summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary__item { min-width: 0; padding: 10px 12px; }
  .summary__item b { font-size: 16px; }
  .cards, .steps, .rules { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .filters .field { font-size: 15px; padding-left: 10px; padding-right: 30px; background-position: right 10px center; }
  .filters .btn--link { justify-self: start; }
  .cta { padding: 26px; }
  .cta .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
  .clinic-head { grid-template-columns: 1fr; }
  .clinic-mark { width: 56px; height: 56px; border-radius: 16px; }
  .modal { padding: 0; align-items: stretch; }
  .modal__box { max-width: none; max-height: none; border-radius: 0; min-height: 100%; }
  .price { font-size: 17px; }
  .src { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* таблица сравнения клиник на странице района */
.dt__bar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.dt__svc { display: flex; flex-wrap: wrap; gap: 8px; }
.chip--sm { padding: 6px 12px; font-size: 13px; }
.dt__sortsel { display: inline-flex; align-items: center; gap: 8px; }
.field--sm { width: auto; padding: 8px 36px 8px 12px; font-size: 14px; min-height: 0; }
.dt__opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.dtable { table-layout: fixed; }
.dtable .dt__clinic { width: 30%; }
.dtable th.dt__p, .dtable td.dt__p { text-align: right; }
.dtable td.dt__p { font-weight: 700; font-variant-numeric: tabular-nums; }
.dtable td.dt__none { color: var(--muted); font-weight: 400; }
.dtable .dt__from { font-weight: 400; color: var(--muted); font-size: 13px; }
.dtable .is-off { display: none; }
.dtable tr[hidden] { display: none; }
.dtable th { white-space: normal; vertical-align: bottom; }
.dtable td.dt__clinic a { font-weight: 700; }
.dt__sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; }
.dt__sort:hover { color: var(--accent); }
.dt__sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.dt__arrow::after { content: "↕"; opacity: .35; font-size: 12px; }
[aria-sort="ascending"] .dt__sort { color: var(--accent); }
[aria-sort="ascending"] .dt__arrow::after { content: "↑"; opacity: 1; }
@media (max-width: 900px) {
  .ptable.dtable, .ptable.dtable tbody { display: block; border: 0; background: none; }
  .ptable.dtable thead { display: none; }
  .ptable.dtable tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; width: auto; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
  .ptable.dtable tr[hidden] { display: none; }
  .ptable.dtable td { display: block; width: auto; padding: 0; border: 0; text-align: left; }
  .ptable.dtable td.dt__clinic { grid-column: 1 / -1; }
  .ptable.dtable td.dt__p::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
  .ptable.dtable td.is-off { display: none; }
}
@media (max-width: 480px) { .ptable.dtable tr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Чат-консультант (js/chat.js) ===== */
.ychat { position: fixed; right: 20px; bottom: 20px; z-index: 55; font-family: var(--font); }
.ychat svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ychat__fab { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 800 15px/1 var(--font); cursor: pointer; box-shadow: 0 0 0 3px #fff, 0 10px 30px rgba(20, 20, 30, .28); transition: transform .2s, background .2s; }
.ychat__fab:hover { background: var(--accent-dark); transform: translateY(-2px); }
.ychat__fab svg { width: 24px; height: 24px; }
.ychat.is-open .ychat__fab { display: none; }
.ychat__panel { position: absolute; right: 0; bottom: 0; width: 380px; height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fff; border-radius: var(--r); box-shadow: 0 20px 60px rgba(20, 20, 30, .22); overflow: hidden; animation: ychat-in .22s ease-out; }
.ychat__panel[hidden] { display: none; }
@keyframes ychat-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.ychat__head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: var(--accent); color: #fff; }
.ychat__head > div { flex: 1; min-width: 0; }
.ychat__head b { display: block; font-size: 16px; }
.ychat__head small { display: block; font-size: 12.5px; opacity: .85; }
.ychat__ava { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.ychat__icon { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.ychat__icon:hover { background: rgba(255,255,255,.16); }
.ychat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); overscroll-behavior: contain; }
.ychat__msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; word-wrap: break-word; }
.ychat__msg p { margin: 0; }
.ychat__msg p + p, .ychat__msg ul + p, .ychat__msg p + ul { margin-top: 6px; }
.ychat__msg ul { margin: 0; padding-left: 18px; }
.ychat__msg a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ychat__msg--bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; }
.ychat__msg--user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }
.ychat__msg.is-error { background: var(--accent-soft); }
.ychat__dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.ychat__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ychat-dot 1s infinite ease-in-out; }
.ychat__dots i:nth-child(2) { animation-delay: .15s; } .ychat__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ychat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ychat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; background: var(--bg-soft); }
.ychat__chips[hidden] { display: none; }
.ychat__chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 600 13px/1.3 var(--font); cursor: pointer; text-align: left; }
.ychat__chip:hover { border-color: var(--accent); color: var(--accent); }
.ychat__form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.ychat__form textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: 15px/1.4 var(--font); color: var(--ink); max-height: 120px; outline: none; }
.ychat__form textarea:focus { border-color: var(--ink); }
.ychat__send { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ychat__send:disabled { opacity: .45; cursor: default; }
.ychat__foot { padding: 0 12px 12px; background: #fff; text-align: center; }
.ychat__foot a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ychat__foot a svg { width: 16px; height: 16px; color: var(--accent); }
.ychat__foot a:hover { color: var(--accent); }
.ychat__foot small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 600px) {
  .ychat { right: 14px; bottom: 14px; }
  .ychat__fab { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .ychat__fab span { display: none; }
  .ychat.is-open { inset: 0; right: 0; bottom: 0; }
  .ychat__panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
  .ychat__form textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ychat__panel, .ychat__dots i { animation: none; } }
@media print { .ychat { display: none; } }

.tnchat__lead { margin-top: 6px; }
.ychat__chips.is-compact { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ychat__chips.is-compact::-webkit-scrollbar { display: none; }
.ychat__chips.is-compact .ychat__chip { flex: none; white-space: nowrap; }

/* переключатель языка */
.langsw { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 700; font-size: 13px; text-decoration: none; margin-left: 8px; }
.langsw:hover { border-color: var(--accent); color: var(--accent); }
.langsw--m { margin: 4px 0 8px; justify-content: flex-start; border: 0; padding: 12px 0; height: auto; font-size: 16px; }
@media (max-width: 900px) { .header__in > .langsw { display: none; } }

/* сетка карточки клиники: колонки сжимаются, длинные цены переносятся на телефоне */
.clinic-grid > * { min-width: 0; }
@media (max-width: 900px) {
  .ptable .price { white-space: normal; }
  /* карточка клиники: цена сверху, под ней вариант и примечание во всю ширину */
  .svc-block .ptable tr { grid-template-columns: minmax(0, 1fr); }
  .svc-block .ptable td.c-price { grid-column: 1; grid-row: 1; text-align: left; max-width: none; }
  .svc-block .ptable td.c-clinic, .svc-block .ptable td.c-src { grid-column: 1; }
}
