/* Стоматология «Спокойно» — демо Pelican */
:root {
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --surface-2: #E6EEEA;
  --text: #15232A;
  --muted: #56646B;
  --line: #DCE0DB;
  --accent: #08716A;
  --accent-hover: #06625C;
  --accent-ink: #FFFFFF;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px rgba(21, 35, 42, .08);
  --f-display: "Ysabeau", "Trebuchet MS", sans-serif;
  --f-text: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hdr-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 40px; }
.muted { color: var(--muted); }
.link { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(21,35,42,.35); }
.link:hover { text-decoration-color: currentColor; }
.show-sm { display: none; }
.show-md { display: none; }
.nowrap { white-space: nowrap; }
html:not(.js) .js-only { display: none !important; }
html:not(.js) [data-menu-open] { display: none; }
.js .nojs-only { display: none !important; }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font: 600 13px/1.4 var(--f-text);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .5; flex: none; }

h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-weight: 600; font-size: 22px; line-height: 1.25; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border-radius: var(--radius-pill);
  font: 700 16px/1.2 var(--f-text);
  text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: var(--text); color: var(--text); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  font: inherit; color: inherit;
}
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: var(--radius-pill); border: 1px solid var(--line); background: transparent;
  color: var(--text); cursor: pointer; text-decoration: none;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Шапка ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, .86);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr__in { height: var(--hdr-h); display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: none; }
.logo__cap { position: relative; width: 22px; height: 30px; flex: none; }
/* знак: капсула-кадр врача и её контур-эхо — тот же приём, что у фото в hero */
.logo__cap::before, .logo__cap::after { content: ""; position: absolute; width: 14px; height: 22px; border-radius: 999px 999px 4px 4px; }
/* знак: капсула-кадр (как фото врачей) + контур-эхо + точка «ближайшего окна» на нижнем левом крае */
.logo__cap::before { right: 0; top: 0; border: 1.25px solid currentColor; opacity: .38; }
.logo__cap::after {
  left: 0; bottom: 0; border: 1.5px solid currentColor;
  background: radial-gradient(circle at 3.5px calc(100% - 4.5px), var(--accent) 0 2.6px, transparent 3.1px), var(--surface-2);
}
.logo--inv .logo__cap::after { background: radial-gradient(circle at 3.5px calc(100% - 4.5px), #5FC3B8 0 2.6px, transparent 3.1px), #20343C; }
.logo__txt { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font: 600 24px/1 var(--f-display); letter-spacing: -.01em; }
.logo__sub { font: 400 12px/1.2 var(--f-text); color: var(--muted); margin-top: 4px; }
.logo--inv, .logo--inv .logo__sub { color: #E9EEEC; }
.logo--inv .logo__sub { opacity: .7; }
.nav { display: flex; gap: 26px; margin-left: 12px; }
.nav a {
  position: relative; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--text);
  padding: 8px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(.35); background: var(--line); }
.nav a.is-active::after { transform: scaleX(1); background: var(--accent); }
.hdr__right { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.hdr__status { font-size: 13px; color: var(--muted); white-space: nowrap; }
.hdr__tel { font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.hdr__mob { display: none; margin-left: auto; gap: 8px; }

/* Мобильное меню */
.mmenu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; flex-direction: column; overflow-y: auto;
}
.mmenu__top { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.mmenu__nav { display: flex; flex-direction: column; padding-top: 24px; padding-bottom: 24px; }
.mmenu__nav a {
  font: 400 24px/1.25 var(--f-display); text-decoration: none; padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.mmenu__foot { margin-top: auto; padding-top: 24px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.mmenu__tel { font: 700 22px/1.3 var(--f-text); text-decoration: none; }
.mmenu__book { margin-bottom: 18px; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 64px; position: relative; }
.hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
.hero__text { grid-column: 1 / span 7; }
.hero h1 {
  font-weight: 300; font-size: clamp(40px, 6.4vw, 94px); line-height: 1.06; letter-spacing: -.02em;
}
.hero h1 .h1-l, .hero h1 em { display: block; }
.hero h1 em { font-style: italic; font-weight: 300; }
.hero__lead { margin-top: 32px; font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 540px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.facts { display: flex; flex-wrap: wrap; margin-top: 48px; font-size: 15px; color: var(--text); }
.facts li { padding: 0 20px; border-left: 1px solid var(--line); line-height: 1.3; }
.facts li:first-child { padding-left: 0; border-left: 0; }
.hero__fig { grid-column: 8 / span 5; margin: 0; position: relative; justify-self: end; width: min(100%, 460px); }
.hero__fig::before {
  /* контурная капсула-эхо логотипа */
  content: ""; position: absolute; top: -18px; right: -18px; width: 100%; aspect-ratio: 3 / 4;
  border: 1px solid rgba(21,35,42,.18); border-radius: 999px 999px 28px 28px; pointer-events: none;
}
.hero__stage { position: relative; }
.hero__cap { width: 100%; aspect-ratio: 3 / 4; }
.hero__badge { position: absolute; left: -48px; bottom: 36px; }
.hero__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.hero__fig figcaption { font-size: 14px; line-height: 1.4; color: var(--muted); }
/* вторая капсула: ближайшее окно у другого врача */
.hero__next {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
  padding: 5px 18px 5px 5px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); text-decoration: none; line-height: 1.25;
  transition: border-color .2s, transform .25s var(--ease);
}
.hero__next:hover { border-color: var(--text); transform: translateY(-2px); }
.hero__next-cap { width: 40px; height: 54px; border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-2); flex: none; }
.hero__next-cap img { width: 100%; height: 100%; object-fit: cover; }
.hero__next-t { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.hero__next-s { display: block; font-size: 13px; color: var(--muted); }

.cap { position: relative; overflow: hidden; border-radius: 999px 999px 24px 24px; background: var(--surface-2); }
.cap img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.5); transform-origin: 50% 10%; transition: transform .8s var(--ease); }

/* Плашка «Ближайшее окно» */
.slot-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface); color: var(--text); text-decoration: none;
  padding: 12px 20px 12px 16px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft); line-height: 1.25;
  transition: transform .25s var(--ease);
}
.slot-badge:hover { transform: translateY(-2px); }
.slot-badge__t { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.slot-badge__s { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(1.8); opacity: 0; } }

/* ---------- Секции ---------- */
.sec { padding: 128px 0; }
.sec__head { max-width: 760px; margin-bottom: 56px; }
@media (min-width: 900px) {
  /* соседние секции одного фона: стык ~160px вместо 256px */
  .sec:not(.calc-sec):not(.reviews) { padding-bottom: 96px; }
  .sec:not(.calc-sec):not(.reviews) + .sec:not(.calc-sec):not(.reviews) { padding-top: 64px; }
}
.sec__head--split { max-width: none; display: grid; grid-template-columns: 7fr 5fr; gap: 24px 64px; align-items: end; }
.sec__lead { margin-top: 20px; color: var(--muted); max-width: 62ch; }
.sec__head--split .sec__lead { margin-top: 0; }

/* Цены */
.prices { padding-top: 64px; }
.prices__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; border-top: 1px solid var(--line); padding-top: 72px; }
.prices__head { position: sticky; top: calc(var(--hdr-h) + 32px); }
.prices__note { margin: 20px 0 32px; max-width: 40ch; }
.plist { border-top: 1px solid var(--line); }
.prow {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text);
}
.prow__name { display: flex; flex-direction: column; font-weight: 600; font-size: 18px; line-height: 1.35; transition: transform .25s var(--ease); }
.prow__note { font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.prow .price { display: inline-flex; align-items: center; gap: 10px; }
.prow .price::after {
  content: ""; width: 16px; height: 16px; opacity: 0; transform: translateX(-6px);
  transition: opacity .25s, transform .25s;
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315232A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
.prow:hover .prow__name { transform: translateX(4px); }
.prow:hover .price::after { opacity: 1; transform: none; }
.price { font: 700 18px/1.2 var(--f-text); font-variant-numeric: lining-nums tabular-nums; color: var(--accent); white-space: nowrap; }

/* ---------- Запись ---------- */
.booking { padding-top: 96px; }
.bk {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: 36px 44px 40px; scroll-margin-top: calc(var(--hdr-h) + 16px);
  min-height: 420px; position: relative;
}
.bk__nojs { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; font-size: 20px; }
.bk__stages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 28px; font-size: 15px; }
.bk__stage { background: none; border: 0; padding: 6px 0; color: var(--muted); font-weight: 600; cursor: default; position: relative; }
.bk__stage.is-past { cursor: pointer; }
.bk__stage.is-past:hover { color: var(--text); }
.bk__stage.is-future { opacity: .6; }
.bk__stage.is-current { color: var(--text); font-weight: 700; }
.bk__stage.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--text); }
.bk__sep { color: var(--line); }
.bk__view { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bk__title { font: 400 28px/1.2 var(--f-display); margin-bottom: 20px; }
.bk__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.bk__back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font-weight: 600; min-height: 44px; padding: 0 4px; color: var(--muted); }
.bk__back:hover { color: var(--text); }
.bk__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bk__foot .btn { margin-left: auto; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center;
  text-align: left; width: 100%; min-height: 76px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.opt:hover { border-color: var(--text); }
.opt__t { font-weight: 600; font-size: 17px; line-height: 1.3; }
.opt__n { grid-column: 1; font-size: 14px; color: var(--muted); line-height: 1.4; }
.opt__p { grid-row: 1 / span 2; grid-column: 2; }
.opt--hint { background: var(--surface-2); border-color: var(--surface-2); grid-column: 1 / -1; grid-template-columns: auto 1fr auto; }
.opt--hint .opt__t, .opt--hint .opt__n { grid-column: 2; }
.opt--hint .opt__ico { grid-row: 1 / span 2; grid-column: 1; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--text); display: grid; place-items: center; font: 600 18px/1 var(--f-display); }
.opt--hint .opt__arr { grid-row: 1 / span 2; grid-column: 3; }
.opt__arr svg, .opt--doc .opt__arr svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.opt--hint:hover { border-color: var(--text); }
.bk__showall { margin-top: 16px; font-size: 15px; color: var(--muted); }

.opt--doc { grid-template-columns: 56px 1fr auto; gap: 2px 18px; min-height: 84px; }
.opt--doc .ava { grid-row: 1 / span 3; }
.opt--doc .opt__t, .opt--doc .opt__n { grid-column: 2; }
.opt__near { grid-column: 3; grid-row: 1 / span 3; font-size: 14px; font-weight: 600; text-align: right; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.opt__near .pulse { width: 7px; height: 7px; }
.opt__near .pulse::after { animation: none; }
.docs-list { display: grid; gap: 10px; }
.ava { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--surface-2); flex: none; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava--any { display: grid; place-items: center; border: 1px dashed var(--muted); background: transparent; }
.ava--any svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Дни и слоты */
.days { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 12px; margin: 0 -4px 12px; scrollbar-width: thin; }
.day {
  flex: none; scroll-snap-align: start; width: 72px; min-height: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
  cursor: pointer; padding: 10px 4px; transition: background-color .2s, color .2s, border-color .2s;
}
.day__w { font-size: 13px; font-weight: 700; }
.day__d { font-size: 14px; font-variant-numeric: lining-nums tabular-nums; }
.day__s { font-size: 11px; color: var(--muted); line-height: 1.1; }
.day:hover:not([aria-disabled="true"]) { border-color: var(--text); }
.day[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.tgroup { margin-top: 18px; }
.tgroup__h { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.times { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; min-width: 76px; padding: 0 18px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line);
  font-weight: 600; font-size: 16px; font-variant-numeric: lining-nums tabular-nums; cursor: pointer; line-height: 1.1;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--text); }
.chip small { font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }
.chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-checked="true"] small { color: rgba(255,255,255,.85); }
.js .times .chip { animation: chipIn .35s var(--ease) both; }
@keyframes chipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bk__info { margin-top: 22px; color: var(--muted); font-size: 15px; }
.bk__empty { padding: 24px; border-radius: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* Контакты записи */
.bk__contacts { display: grid; grid-template-columns: 5fr 7fr; gap: 36px; align-items: start; }
.summary { background: var(--surface-2); border-radius: 20px; padding: 24px; display: grid; gap: 14px; }
.summary__row { display: grid; gap: 2px; }
.summary__row span:first-child { font-size: 13px; color: var(--muted); }
.summary__row b { font-weight: 600; font-size: 17px; }
.summary__doc { display: flex; align-items: center; gap: 12px; }
.summary__doc .ava { width: 44px; height: 44px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .field__lbl { font-size: 14px; font-weight: 600; }
.field input[type=text], .field input[type=tel], .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; font: 400 17px/1.4 var(--f-text); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.field [aria-invalid="true"] { border-color: #A23A2A; }
.err { font-size: 14px; color: #A23A2A; min-height: 0; }
.err:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; cursor: pointer; min-height: 44px; padding-top: 2px; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--text); cursor: pointer; }
.demo-note { font-size: 13px; color: var(--muted); }

.bk__done { max-width: 640px; padding: 12px 0; }
.bk__done h3 { font: 400 40px/1.1 var(--f-display); margin-bottom: 18px; }
.bk__done h3:focus { outline: none; }
.bk__done p { font-size: 18px; }
.bk__done .demo-note { margin-top: 14px; font-size: 13px; }
.bk__done .btn { margin-top: 28px; }
.done-mark { width: 56px; height: 72px; border: 1.5px solid var(--text); border-radius: var(--radius-pill); display: grid; place-items: center; margin-bottom: 24px; }
.done-mark svg { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Квиз */
.quiz__q { font: 400 30px/1.2 var(--f-display); margin-bottom: 20px; }
.quiz__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz__opts .opt { min-height: 60px; grid-template-columns: 1fr auto; }
.qres { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: start; }
.qres .ava { width: 72px; height: 72px; }
.qres__txt { font-size: 18px; line-height: 1.55; max-width: 62ch; }
.qres__note { margin-top: 14px; font-size: 15px; color: var(--muted); }
.qres__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.qres__chips .chip { padding: 0 20px; }
.qres__all { margin-top: 18px; font-weight: 600; font-size: 15px; min-height: 44px; }

/* ---------- Врачи ---------- */
.docs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.doc { display: flex; flex-direction: column; }
.doc__cap { aspect-ratio: 3 / 4; }
.doc:hover .cap img { transform: scale(1.56); }
.doc__badge { position: absolute; left: 10px; right: 10px; bottom: 12px; padding: 10px 12px; gap: 9px; justify-content: flex-start; }
.doc__badge .slot-badge__t { font-size: 14px; line-height: 1.3; }
.doc__badge .slot-badge__s { font-size: 12px; margin: 0 0 1px; }
.doc__name { font: 400 22px/1.2 var(--f-display); margin-top: 22px; }
.doc__role { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.doc__txt { font-size: 15px; line-height: 1.55; margin-top: 12px; }
.doc__link {
  margin-top: auto; padding-top: 16px; font-weight: 700; font-size: 15px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.doc__link::after { content: "→"; transition: transform .2s; }
.doc__link:hover::after { transform: translateX(4px); }

/* ---------- Калькулятор ---------- */
.calc-sec { background: var(--surface-2); }
.calc-nojs { background: var(--surface); border-radius: var(--radius-lg); padding: 36px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.calc-nojs__t { font: 400 26px/1.3 var(--f-display); }
.calc { display: grid; grid-template-columns: 7fr 5fr; gap: 24px 56px; align-items: start; }
.calc__params { display: grid; gap: 36px; }
.fld legend { font-weight: 700; font-size: 15px; margin-bottom: 14px; padding: 0; }
.fld__hint { font-size: 14px; color: var(--muted); margin-top: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: var(--radius-pill); }
.seg button {
  min-height: 44px; padding: 0 20px; border: 0; background: transparent; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 15px; cursor: pointer; transition: background-color .2s, color .2s;
}
.seg button:hover { background: var(--surface); }
.seg button[aria-checked="true"] { background: var(--text); color: var(--bg); }
.seg--wrap { border-radius: 26px; }
.stepper { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stepper__b {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--text); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
}
.stepper__b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.stepper__b[disabled] { opacity: .35; cursor: not-allowed; }
.stepper__v { min-width: 40px; text-align: center; font: 400 40px/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
.stepper .fld__hint { margin: 0 0 0 10px; }
.tip { margin-top: 16px; padding: 16px 20px; background: var(--surface); border-radius: 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 15px; }
.tip .link-btn { font-weight: 700; min-height: 44px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rcard {
  position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s; min-height: 120px;
}
.rcard b { font-weight: 700; font-size: 15px; padding-right: 26px; line-height: 1.3; }
.rcard span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.rcard:hover { border-color: var(--text); }
.rcard[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.rcard[aria-checked="true"]::after {
  content: ""; position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F6F4EF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.calc__res {
  position: sticky; top: 96px; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: 32px;
}
.calc__lbl { font-size: 14px; color: var(--muted); }
.calc__sum { font: 400 44px/1.1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; color: var(--accent); margin-top: 8px; letter-spacing: -.01em; white-space: nowrap; }
.calc__fix { font-size: 14px; margin-top: 6px; }
.calc__kv { margin-top: 20px; border-top: 1px solid var(--line); }
.calc__kv div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.calc__kv dt { color: var(--muted); }
.calc__kv dd { font-weight: 700; font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.calc__lines { margin-top: 16px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.calc__lines li { display: flex; justify-content: space-between; gap: 12px; }
.calc__lines li span:last-child { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.calc__incl { margin-top: 16px; font-size: 14px; line-height: 1.5; padding: 14px 16px; background: var(--bg); border-radius: 12px; }
.calc__res .btn { margin-top: 20px; min-height: 56px; }
.calc__small { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
.calc__disc { font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.calc__mini { display: none; }

/* ---------- Работы ---------- */
.works__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.chips-row { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips-row::-webkit-scrollbar { display: none; }
.chips-row .chip { flex: none; padding: 0 20px; font-size: 15px; }
.chips-row .chip[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.ba {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize;
  --pos: 66%;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; pointer-events: none; }
.ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba.is-swapping .ba__img { opacity: 0; }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba__handle {
  position: absolute; top: 50%; left: var(--pos); width: 44px; height: 88px; margin: -44px 0 0 -22px;
  border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: grab; padding: 0; box-shadow: 0 2px 10px rgba(21,35,42,.12);
}
.ba__handle:active { cursor: grabbing; }
.ba__handle svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ba__tag {
  position: absolute; top: 16px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 600; pointer-events: none;
}
.ba__tag--l { left: 16px; }
.ba__tag--r { right: 16px; }
.case { padding-top: 60px; }
.case__title { font: 400 36px/1.15 var(--f-display); margin-bottom: 24px; }
.case__kv { border-top: 1px solid var(--line); margin-bottom: 28px; }
.case__kv div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
.case__kv dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.case__doc { display: flex; align-items: center; gap: 12px; }
.case__doc img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.case .price { font-size: 20px; }
.case.is-swapping > * { opacity: .2; }
.case > * { transition: opacity .25s; }

/* ---------- Первый визит ---------- */
.visit__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 88px; align-items: center; }
.visit__photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; }
.visit__photo img { width: 100%; height: 100%; object-fit: cover; }
.tl { margin: 40px 0 40px; position: relative; }
.tl::before { content: ""; position: absolute; left: 3.5px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.tl li { position: relative; padding-left: 36px; padding-bottom: 26px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.tl h3 { font: 600 18px/1.4 var(--f-text); }
.tl p { color: var(--muted); margin-top: 4px; max-width: 58ch; }

/* ---------- Отзывы ---------- */
.reviews { background: var(--surface-2); }
.rev__score { font-size: 16px; color: var(--muted); justify-self: end; }
.rev__score b { font: 400 40px/1 var(--f-display); color: var(--text); margin-right: 6px; vertical-align: -4px; }
.revs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rev { background: var(--surface); border-radius: var(--radius-lg); padding: 36px 36px 32px; display: flex; flex-direction: column; }
.rev blockquote { margin: 0 0 28px; font: 400 22px/1.45 var(--f-display); text-wrap: pretty; }
.rev blockquote::before { content: "«"; display: block; font-size: 48px; line-height: .6; color: var(--muted); opacity: .45; margin-bottom: 12px; }
.rev__who { margin-top: auto; font-weight: 700; font-size: 15px; }
.rev__doc { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.faq__head { position: sticky; top: calc(var(--hdr-h) + 32px); }
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0; font: 400 24px/1.3 var(--f-display); min-height: 44px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315232A' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E");
  transition: transform .3s var(--ease);
}
.acc details[open] summary::after { transform: rotate(45deg); }
.acc details p { padding: 0 60px 26px 0; color: var(--muted); max-width: 62ch; }

/* ---------- Контакты ---------- */
.contacts { padding-top: 64px; }
.contacts__grid { display: grid; grid-template-columns: 6fr 6fr; gap: 72px; align-items: center; }
.kv { margin: 36px 0; border-top: 1px solid var(--line); }
.kv div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 15px; padding-top: 1px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.contacts__photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.contacts__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Подвал ---------- */
.ftr { background: var(--text); color: #C9D2D0; padding: 64px 0 40px; }
.ftr__top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.ftr__nav { display: flex; gap: 28px; flex-wrap: wrap; }
.ftr__nav a, .ftr__nav .link-btn { color: #E9EEEC; text-decoration: none; font-weight: 600; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.ftr__nav a:hover, .ftr__nav .link-btn:hover { text-decoration: underline; }
.ftr__nav .link-btn { text-decoration: none; }
.ftr__line { margin-top: 28px; font-size: 15px; }
.ftr__line a { color: #E9EEEC; text-decoration: none; }
.ftr__small { margin-top: 10px; font-size: 13px; color: #95A3A2; max-width: 80ch; }

/* ---------- Мобильная панель ---------- */
.mbar { display: none; }

/* ---------- Модалки ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(21, 35, 42, .42); animation: fadeIn .2s ease;
}
.modal__box {
  position: relative; width: min(100%, 520px); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--bg); border-radius: var(--radius-lg); padding: 40px 36px 36px; animation: boxIn .3s var(--ease);
}
.modal__x { position: absolute; top: 14px; right: 14px; }
.modal__h { font: 400 30px/1.15 var(--f-display); padding-right: 40px; margin-bottom: 12px; }
.modal__h:focus { outline: none; }
.modal__p { color: var(--muted); margin-bottom: 24px; }
.modal .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.modal .chip { font-size: 15px; }
.modal .chip[aria-checked="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.cb-ok .btn { margin-top: 24px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes boxIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
body.is-locked { overflow: hidden; }

/* ---------- Прайс-страница ---------- */
.p-hero { padding: 64px 0 32px; }
.p-hero h1 { font-weight: 300; font-size: clamp(40px, 5.2vw, 76px); line-height: 1.05; letter-spacing: -.015em; max-width: 14em; }
.p-hero__lead { margin-top: 24px; font-size: 20px; color: var(--muted); max-width: 62ch; }
.anchors {
  position: sticky; top: var(--hdr-h); z-index: 20; background: rgba(246,244,239,.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 12px 0; border-bottom: 1px solid var(--line);
}
.anchors__row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.anchors__row::-webkit-scrollbar { display: none; }
.anchors .chip { flex: none; text-decoration: none; color: var(--text); font-size: 15px; }
.anchors .chip.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.pgroups { padding: 56px 0 32px; }
.pgroup { display: grid; grid-template-columns: 4fr 8fr; gap: 24px 64px; padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hdr-h) + 80px); }
.pgroup:first-child { border-top: 0; padding-top: 0; }
.pgroup h2 { font-size: clamp(28px, 2.8vw, 40px); }
.pgroup__meta { color: var(--muted); font-size: 15px; margin-top: 10px; }
.ptable { border-top: 1px solid var(--line); }
.ptable li { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ptable__n { font-size: 17px; line-height: 1.4; }
.ptable__n small { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.ptable .price { font-size: 17px; text-align: right; }
.pgroup__link { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; min-height: 44px; }
.pgroup__link::after { content: "→"; transition: transform .2s; }
.pgroup__link:hover::after { transform: translateX(4px); }
.payless { background: var(--surface-2); border-radius: var(--radius-lg); padding: 56px; margin: 32px 0 64px; display: grid; grid-template-columns: 4fr 8fr; gap: 24px 64px; }
.payless__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.payless__cols p { font-size: 16px; color: var(--muted); }
.payless__cols b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.payless .btn-row { grid-column: 2; }

/* ---------- Появление ---------- */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.js .cap-rv { clip-path: inset(100% 0 0 0); transition: clip-path .6s var(--ease); }
.js .cap-rv.in { clip-path: inset(0 0 0 0); }
/* капсулы врачей раскрываются каскадом, шаг 80 мс */
.docs .doc:nth-child(2) .cap-rv { transition-delay: 80ms; }
.docs .doc:nth-child(3) .cap-rv { transition-delay: 160ms; }
.docs .doc:nth-child(4) .cap-rv { transition-delay: 240ms; }
.docs .doc:nth-child(5) .cap-rv { transition-delay: 320ms; }
.js .hero__cap.cap-rv.in { transition-duration: .9s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .rv, .js .cap-rv { opacity: 1; transform: none; clip-path: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1279px) {
  .hdr__status { display: none; }
  .nav { gap: 20px; }
  .docs { grid-template-columns: repeat(3, 1fr); row-gap: 56px; }
}
@media (max-width: 1100px) {
  .cards { grid-template-columns: 1fr; }
  .rcard { min-height: 0; }
}
@media (max-width: 899px) {
  :root { --hdr-h: 60px; }
  .hide-md { display: none; }
  .show-md { display: inline; }
  body { font-size: 16px; padding-bottom: 80px; }
  .wrap { padding: 0 16px; }
  .nav, .hdr__right { display: none; }
  .hdr__mob { display: flex; }
  .logo__name { font-size: 22px; }
  .sec { padding: 72px 0; }
  .sec__head { margin-bottom: 36px; }
  .sec__head--split { grid-template-columns: 1fr; }
  .rev__score { justify-self: start; }

  .hero { padding: 28px 0 56px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__text { grid-column: 1; padding-top: 0; }
  .hero h1 { font-size: 40px; line-height: 1.06; }
  .hero__lead { font-size: 16px; margin-top: 18px; }
  .hero__btns { flex-direction: column; margin-top: 24px; gap: 10px; }
  .hero__btns .btn { width: 100%; }
  .facts { flex-direction: column; gap: 6px; margin-top: 28px; }
  .facts li { padding: 0 0 0 16px; border-left: 0; position: relative; }
  .facts li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 1px; background: var(--muted); }
  .facts li:first-child { padding-left: 16px; }
  .hero__fig { grid-column: 1; width: 78%; margin-top: 40px; }
  .hero__cap { aspect-ratio: auto; height: 380px; }
  .hero__fig::before { aspect-ratio: auto; height: 380px; top: -12px; right: -12px; }
  .hero__badge { left: -22%; bottom: 20px; padding: 10px 16px 10px 14px; }
  .hero__foot { flex-direction: column; align-items: flex-end; gap: 12px; margin-top: 16px; }
  .hero__fig figcaption { text-align: right; font-size: 13px; }

  .prices { padding-top: 24px; }
  .prices__grid { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .prices__head { position: static; }
  .prow__name { font-size: 16px; }
  .price { font-size: 16px; }

  .booking { padding-top: 56px; }
  .bk { padding: 22px 16px 24px; border-radius: 20px; min-height: 360px; }
  .bk__stages { font-size: 14px; gap: 4px 10px; margin-bottom: 20px; padding-bottom: 14px; }
  .opts, .quiz__opts { grid-template-columns: 1fr; }
  .opt { padding: 14px 16px; min-height: 64px; grid-template-columns: 1fr auto; column-gap: 12px; }
  .opt:not(.opt--doc):not(.opt--hint) .opt__n { grid-column: 1 / -1; }
  .opt:not(.opt--doc):not(.opt--hint) .opt__p { grid-row: 1; grid-column: 2; align-self: start; font-size: 15px; padding-top: 2px; }
  .opt--hint { grid-template-columns: auto 1fr auto; }
  .opt--doc { grid-template-columns: 56px 1fr; min-height: 64px; }
  .opt__near { grid-column: 2; grid-row: auto; text-align: left; justify-content: flex-start; font-size: 13px; margin-top: 4px; white-space: normal; }
  .opt--doc .opt__arr { display: none; }
  .bk__foot { flex-direction: column-reverse; align-items: stretch; }
  .bk__foot .btn { width: 100%; margin-left: 0; }
  .bk__back { align-self: flex-start; }
  .bk__contacts { grid-template-columns: 1fr; gap: 24px; }
  .quiz__q { font-size: 26px; }
  .qres { grid-template-columns: 1fr; gap: 14px; }
  .qres__txt { font-size: 16px; }
  .bk__done h3 { font-size: 32px; }

  .docs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; gap: 16px; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .docs::-webkit-scrollbar { display: none; }
  .doc { flex: 0 0 72%; scroll-snap-align: start; }

  .calc { grid-template-columns: 1fr; }
  .calc__params { gap: 30px; }
  .stepper .fld__hint { flex-basis: 100%; margin: 4px 0 0; }
  .seg { display: flex; }
  .seg button { flex: 1 1 auto; padding: 0 14px; font-size: 14px; }
  .seg--wrap { border-radius: 24px; }
  .calc__res { position: static; padding: 24px 20px; }
  .calc__sum { font-size: 36px; white-space: normal; }
  .calc__mini {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; bottom: 76px; z-index: 5; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: 8px 8px 8px 20px; box-shadow: var(--shadow-soft);
    font-size: 14px; font-variant-numeric: lining-nums tabular-nums; transition: opacity .25s, transform .25s;
  }
  .calc__mini-t { display: flex; flex-direction: column; line-height: 1.25; }
  .calc__mini b { font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; }
  .calc__mini small { font-size: 13px; color: var(--muted); }
  .calc__kv div { flex-direction: column; gap: 2px; }
  .calc__kv dd { text-align: left; }
  .calc__mini.is-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
  .calc__mini-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--text); border-radius: var(--radius-pill); background: transparent; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }

  .works__grid { grid-template-columns: 1fr; gap: 28px; }
  .chips-row { margin: 0 -16px 14px; padding: 2px 16px; }
  .case { padding-top: 0; }
  .case__title { font-size: 28px; }
  .case__kv div { grid-template-columns: 96px 1fr; font-size: 15px; }

  .visit__grid { grid-template-columns: 1fr; gap: 36px; }
  .visit__photo { aspect-ratio: 4 / 4.2; }
  .visit .btn { width: 100%; }

  .revs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; gap: 12px; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .revs::-webkit-scrollbar { display: none; }
  .rev { flex: 0 0 86%; scroll-snap-align: start; padding: 26px 22px; }
  .rev blockquote { font-size: 19px; }

  .faq__grid { grid-template-columns: 1fr; gap: 24px; }
  .faq__head { position: static; }
  .acc summary { font-size: 20px; padding: 18px 0; }
  .acc details p { padding-right: 0; }

  .contacts__grid { grid-template-columns: 1fr; gap: 36px; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
  .btn-row .btn { flex: 1 1 100%; }

  .ftr { padding: 48px 0 32px; }

  .mbar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); min-height: 64px;
    transition: transform .3s var(--ease);
  }
  .mbar .btn { min-height: 48px; padding: 0 16px; }
  .mbar__call { flex: 1 1 40%; }
  .mbar__book { flex: 1 1 60%; }
  .mbar.is-hidden { transform: translateY(110%); }

  .modal { align-items: end; padding: 0; }
  .modal__box { width: 100%; border-radius: 24px 24px 0 0; padding: 32px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 92dvh; }

  .p-hero { padding: 36px 0 24px; }
  .p-hero h1 { font-size: 40px; }
  .p-hero__lead { font-size: 16px; }
  .anchors { margin: 0; }
  .pgroups { padding-top: 32px; }
  .pgroup { grid-template-columns: 1fr; padding: 36px 0; }
  .ptable__n { font-size: 16px; }
  .ptable .price { font-size: 16px; }
  .payless { grid-template-columns: 1fr; padding: 32px 20px; }
  .payless__cols { grid-template-columns: 1fr; gap: 18px; }
  .payless .btn-row { grid-column: 1; }
}
/* Планшет: не растягивать мобильную раскладку на 768 */
@media (min-width: 600px) and (max-width: 899px) {
  /* крупный план рта не во весь экран: ползунок 520 по центру, чипы случаев — по той же оси */
  .ba { max-width: 520px; margin-inline: auto; }
  .works .chips-row { justify-content: safe center; }
  .wrap { padding: 0 32px; }
  .hero { padding: 40px 0 64px; }
  .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 36px; align-items: center; }
  .hero h1 { font-size: 50px; }
  .hero__fig { grid-column: 2; width: 100%; margin-top: 12px; }
  .hero__cap { aspect-ratio: 3 / 4; height: auto; }
  .hero__fig::before { aspect-ratio: 3 / 4; height: auto; }
  .hero__badge { left: -32px; bottom: 20px; }
  .hero__foot { align-items: flex-start; }
  .hero__fig figcaption { text-align: left; }
  .docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 20px; overflow: visible; margin: 0; padding: 0; }
  .doc { flex: none; }
  .chips-row { margin: 0 -32px 14px; padding: 2px 32px; }
  .revs { margin: 0 -32px; padding: 0 32px 8px; scroll-padding-inline: 32px; }
  .rev { flex-basis: 62%; }
  .visit__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: start; }
  .visit__photo { aspect-ratio: 3 / 4; }
  .calc__kv div { flex-direction: row; gap: 16px; }
  .calc__kv dd { text-align: right; }
  .btn-row .btn { flex: 1 1 0; }
  .modal { align-items: center; padding: 24px; }
  .modal__box { width: min(100%, 560px); border-radius: 24px; }
}
@media (max-width: 599px) {
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  /* длинный вариант «Кость» не ломается внутри пилюли: варианты списком */
  .seg--wrap { flex-direction: column; border-radius: 16px; }
  .seg--wrap button { border-radius: 12px; text-align: left; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 36px; }
}

/* Колонки сеток не распираются лентами со скроллом внутри */
.hero__grid > *, .prices__grid > *, .calc > *, .works__grid > *, .visit__grid > *, .faq__grid > *, .contacts__grid > *, .pgroup > *, .payless > *, .bk__contacts > *, .sec__head--split > * { min-width: 0; }

/* Ysabeau по умолчанию рисует «старостильные» цифры — в ценах и суммах нужны прописные */
h1, h2, h3, .hero h1, .p-hero h1, .pgroup h2, .rev blockquote, .rev__score b, .acc summary, .bk__title, .quiz__q, .modal__h,
.case__title, .doc__name, .calc-nojs__t, .mmenu__nav a, .logo__name, .bk__done h3, .tl h3 { font-variant-numeric: lining-nums; }
