/* ===== шрифт Onest (SIL OFL 1.1) — тот же набор, что в restaurant.css; лежит в public/templates/fonts ===== */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-cyrillic-ext.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: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-latin-ext.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: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-latin.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; }

/*
 * Шаблон «Клиника / стоматология», редизайн: «стоматология, где всё понятно заранее».
 * Всё под [data-tpl="clinic"]; два стиля — [data-style="a"|"b"]. Самодостаточный файл (ADR 0009).
 *
 *  A «Белый кабинет» — бумажно-белый, один насыщенный кобальт, крупные плотные цифры, тонкая сетка,
 *     бенто-услуги, риски и координаты как на клиническом приборе. Кобальт выбран потому, что это цвет
 *     стерильного инструмента и доверия, он держит контраст 6:1 на белом и не повторяет «бирюзовую
 *     стоматологию», на которой построено большинство сайтов клиник.
 *  B «Ночная смена» — графитовый ink-blue, холодное свечение, челюсть — как окно 3D-сканера.
 *
 * Скорость: анимируем только transform и opacity; всё движущееся стартует после первой отрисовки
 * (data-live на корне ставит MotionLayer). При prefers-reduced-motion страница статична.
 * Токены: --bg --surface --ink --dim --line --acc --on-acc --soft --r
 */
[data-tpl="clinic"] {
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --edge: max(16px, calc((100vw - 1240px) / 2));
  --head-h: 56px;
  --gap: 12px;
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 761px) {
  [data-tpl="clinic"] { padding-bottom: 0; --head-h: 64px; --gap: 16px; }
}
[data-tpl="clinic"] *, [data-tpl="clinic"] *::before, [data-tpl="clinic"] *::after { box-sizing: border-box; }

/* ——— A «Белый кабинет» ——— */
[data-tpl="clinic"][data-style="a"] {
  --bg: #fafbfc;
  --surface: #ffffff;
  --ink: #0b0f1a;
  --dim: #474e60;
  --line: rgba(11, 15, 26, 0.14);
  --line-strong: #0b0f1a;
  --acc: #1f43e8;
  --acc-ink: #1f43e8;
  --on-acc: #ffffff;
  --soft: #eef1fd;
  --tint: #eff2f6;
  --r: 0px;
  --h-weight: 700;
  --h-track: -0.045em;
  --tooth-fill: #ffffff;
  --tooth-stroke: #0b0f1a;
  --glow: none;
}
/* ——— B «Ночная смена» ——— */
[data-tpl="clinic"][data-style="b"] {
  --bg: #060b16;
  --surface: #0b1322;
  --ink: #e8f0ff;
  --dim: #93a6c4;
  --line: rgba(140, 180, 255, 0.18);
  --line-strong: rgba(140, 200, 255, 0.5);
  --acc: #56dcff;
  --acc-ink: #56dcff;
  --on-acc: #03121b;
  --soft: rgba(86, 220, 255, 0.1);
  --tint: #0a1120;
  --r: 10px;
  --h-weight: 650;
  --h-track: -0.035em;
  --tooth-fill: rgba(86, 220, 255, 0.04);
  --tooth-stroke: #56dcff;
  --glow: drop-shadow(0 0 3px rgba(86, 220, 255, 0.85));
}

[data-tpl="clinic"] a { color: inherit; text-decoration: none; }
[data-tpl="clinic"] img { display: block; max-width: 100%; }
[data-tpl="clinic"] h1, [data-tpl="clinic"] h2, [data-tpl="clinic"] h3 { font-weight: var(--h-weight); letter-spacing: var(--h-track); line-height: 1.02; margin: 0; }
[data-tpl="clinic"] p, [data-tpl="clinic"] dl, [data-tpl="clinic"] dd, [data-tpl="clinic"] figure, [data-tpl="clinic"] blockquote { margin: 0; }
[data-tpl="clinic"] ul, [data-tpl="clinic"] ol { list-style: none; margin: 0; padding: 0; }
[data-tpl="clinic"] button { font-family: inherit; color: inherit; font-size: inherit; cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
[data-tpl="clinic"] button:disabled { cursor: default; }
[data-tpl="clinic"] :focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; }
[data-tpl="clinic"][data-style="a"] :focus-visible { outline-color: #0b0f1a; box-shadow: 0 0 0 6px #fff; }

/* ——— кнопки и ссылки ——— */
[data-tpl="clinic"] .cl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; width: auto;
  font-weight: 650; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap;
  background: var(--acc); color: var(--on-acc); border: 1.5px solid var(--acc); border-radius: var(--r);
  transition: transform 0.12s cubic-bezier(0.2, 0, 0, 1), background-color 0.15s;
}
[data-tpl="clinic"] .cl-btn:active:not(:disabled) { transform: translate3d(0, 1px, 0); }
[data-tpl="clinic"] .cl-btn:disabled { background: transparent; color: var(--dim); border-color: var(--line); }
[data-tpl="clinic"] .cl-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
[data-tpl="clinic"][data-style="a"] .cl-btn:hover:not(:disabled):not(.ghost) { background: #0b0f1a; border-color: #0b0f1a; }
[data-tpl="clinic"][data-style="a"] .cl-btn.ghost:hover { background: #0b0f1a; color: #fff; }
[data-tpl="clinic"][data-style="b"] .cl-btn:hover:not(:disabled):not(.ghost) { background: #9ae9ff; border-color: #9ae9ff; }
[data-tpl="clinic"][data-style="b"] .cl-btn.ghost:hover { border-color: var(--acc); color: var(--acc); }
[data-tpl="clinic"] .cl-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--acc-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
[data-tpl="clinic"] .cl-link:disabled { color: var(--dim); text-decoration: none; }
[data-tpl="clinic"] .cl-link.big { font-size: 22px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
[data-tpl="clinic"] .cl-x { display: inline-grid; place-items: center; width: 44px; height: 44px; font-size: 28px; line-height: 1; color: var(--dim); border-radius: var(--r); flex: none; }
[data-tpl="clinic"] .cl-x:hover { color: var(--ink); }
[data-tpl="clinic"] .cl-note { font-size: 15px; line-height: 1.45; color: var(--dim); }
[data-tpl="clinic"] .cl-err { font-size: 14px; font-weight: 600; color: #c4281c; margin-top: 6px; }
[data-tpl="clinic"][data-style="b"] .cl-err { color: #ff8e82; }

/* ——— чипы (фильтры, проблемы, время суток) ——— */
[data-tpl="clinic"] .cl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
[data-tpl="clinic"] .cl-chips button { min-height: 44px; padding: 0 16px; font-weight: 600; font-size: 15px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color 0.12s, background-color 0.12s, color 0.12s; }
[data-tpl="clinic"] .cl-chips button:hover:not(:disabled) { border-color: var(--acc); }
[data-tpl="clinic"] .cl-chips button[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-chips button:disabled { color: var(--dim); opacity: 0.55; }
[data-tpl="clinic"] .cl-chips .cl-chip-quiet { border-style: dashed; background: transparent; color: var(--dim); }

/* ——— шапка ——— */
[data-tpl="clinic"] .cl-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--head-h); padding: 0 var(--edge);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
[data-tpl="clinic"] .cl-logo { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 18px; font-weight: 750; letter-spacing: -0.035em; }
[data-tpl="clinic"] .cl-logo svg { color: var(--acc-ink); flex: none; }
[data-tpl="clinic"] .cl-nav { display: none; gap: 4px; }
@media (min-width: 981px) { [data-tpl="clinic"] .cl-nav { display: flex; } }
[data-tpl="clinic"] .cl-nav a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 14px; font-weight: 550; font-size: 15px; color: var(--dim); transition: color 0.15s; }
[data-tpl="clinic"] .cl-nav a:hover { color: var(--ink); }
[data-tpl="clinic"] .cl-head-r { display: flex; align-items: center; gap: 8px; }
[data-tpl="clinic"] .cl-lang { display: flex; }
[data-tpl="clinic"] .cl-lang a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 650; letter-spacing: 0.04em; color: var(--dim); }
[data-tpl="clinic"] .cl-lang a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--acc); }
[data-tpl="clinic"] .cl-head-book { display: none; min-height: 44px; padding: 0 20px; }
@media (min-width: 761px) { [data-tpl="clinic"] .cl-head-book { display: inline-flex; } }
/* Одна главная кнопка на экран: пока открыта панель решения, «Записаться» в шапке уходит. */
@media (min-width: 761px) { [data-tpl="clinic"]:has(.cl-panel[data-open]) .cl-head-book { opacity: 0; pointer-events: none; } }

/* ——— общие секции ——— */
[data-tpl="clinic"] main { display: block; }
[data-tpl="clinic"] .cl-sec { padding: 72px var(--edge); border-top: 1px solid var(--line); scroll-margin-top: var(--head-h); }
@media (min-width: 761px) { [data-tpl="clinic"] .cl-sec { padding: 112px var(--edge); } }
[data-tpl="clinic"] .cl-sec-head { margin-bottom: 28px; max-width: 760px; }
@media (min-width: 761px) { [data-tpl="clinic"] .cl-sec-head { margin-bottom: 44px; } }
[data-tpl="clinic"] .cl-sec-head h2 { font-size: clamp(34px, 8vw, 72px); }
[data-tpl="clinic"] .cl-sec-head p { margin-top: 12px; font-size: 17px; color: var(--dim); max-width: 52ch; }
[data-tpl="clinic"] .cl-sub { font-size: clamp(24px, 5vw, 36px); margin: 56px 0 18px; }

/* ——— hero: «Что беспокоит?» ——— */
[data-tpl="clinic"] .cl-hero {
  display: grid; gap: 14px var(--gap);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "lead" "vis" "tiles" "panel" "status";
  padding: 20px var(--edge) 40px;
}
[data-tpl="clinic"] .cl-status { grid-area: status; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; color: var(--dim); min-height: 20px; }
[data-tpl="clinic"] .tpl-status { display: inline-flex; align-items: center; gap: 8px; }
[data-tpl="clinic"] .tpl-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
[data-tpl="clinic"] .tpl-status[data-state="open"] i { background: #11a35a; }
[data-tpl="clinic"] .cl-coord { display: none; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
[data-tpl="clinic"] .cl-hero h1 { grid-area: title; font-size: clamp(36px, 11.2vw, 56px); line-height: 0.98; }
[data-tpl="clinic"] .cl-lead { grid-area: lead; font-size: 18px; color: var(--dim); max-width: 38ch; margin-top: -4px; }
[data-tpl="clinic"] .cl-vis { grid-area: vis; position: relative; overflow: hidden; aspect-ratio: 16 / 6.4; background: var(--tint); border-radius: var(--r); }
[data-tpl="clinic"] .cl-vis img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
[data-tpl="clinic"] .cl-vis figcaption { position: absolute; left: 10px; bottom: 8px; padding: 3px 8px; font-size: 15px; font-weight: 600; background: var(--bg); color: var(--ink); border-radius: calc(var(--r) / 2); }
[data-tpl="clinic"][data-style="b"] .cl-vis img { filter: saturate(0.7) contrast(1.05) brightness(0.8); }
[data-tpl="clinic"] .cl-scan::after { content: ""; position: absolute; inset: 0; border-top: 2px solid var(--acc); pointer-events: none; opacity: 0; }
[data-tpl="clinic"][data-style="b"] .cl-scan::after { box-shadow: 0 -10px 24px 4px rgba(86, 220, 255, 0.45); }

[data-tpl="clinic"] .cl-tiles { grid-area: tiles; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
[data-tpl="clinic"] .cl-tile {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px;
  min-height: 88px; padding: 12px 14px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  transition: border-color 0.12s, background-color 0.12s, color 0.12s, transform 0.12s cubic-bezier(0.2, 0, 0, 1);
}
[data-tpl="clinic"] .cl-tile:hover { border-color: var(--acc); }
[data-tpl="clinic"] .cl-tile:active { transform: translate3d(0, 1px, 0); }
[data-tpl="clinic"] .cl-tile-ico { color: var(--acc-ink); line-height: 0; }
[data-tpl="clinic"] .cl-tile-ico svg { width: 30px; height: 30px; }
[data-tpl="clinic"] .cl-tile-label { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
[data-tpl="clinic"] .cl-tile[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-tile[aria-pressed="true"] .cl-tile-ico { color: var(--on-acc); }

[data-tpl="clinic"] .cl-panel { grid-area: panel; display: none; flex-direction: column; gap: 14px; padding: 18px; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r); }
[data-tpl="clinic"] .cl-panel[data-open] { display: flex; }
[data-tpl="clinic"][data-live] .cl-panel[data-open] { animation: cl-rise 0.28s cubic-bezier(0.2, 0, 0, 1); }
[data-tpl="clinic"] .cl-panel-head { display: flex; align-items: center; gap: 12px; }
[data-tpl="clinic"] .cl-panel-head h2 { font-size: 26px; flex: 1; }
[data-tpl="clinic"] .cl-panel-ico { color: var(--acc-ink); line-height: 0; }
[data-tpl="clinic"] .cl-panel-ico svg { width: 36px; height: 36px; }
[data-tpl="clinic"] .cl-panel-line { font-size: 17px; line-height: 1.35; }
[data-tpl="clinic"] .cl-panel-facts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; border-block: 1px solid var(--line); }
[data-tpl="clinic"] .cl-panel-facts > div { padding: 12px 0; }
[data-tpl="clinic"] .cl-panel-facts > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
[data-tpl="clinic"] .cl-panel-facts dt { font-size: 13px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-panel-facts dd { margin-top: 2px; }
[data-tpl="clinic"] .cl-panel-facts b { font-size: 32px; font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; line-height: 1.05; }
[data-tpl="clinic"] .cl-panel-facts span { font-size: 14px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-panel-doc { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 4px 12px; }
[data-tpl="clinic"] .cl-panel-doc img { width: 56px; height: 56px; object-fit: cover; object-position: 50% 18%; border-radius: var(--r); background: var(--tint); }
[data-tpl="clinic"] .cl-panel-doc > div { display: flex; flex-direction: column; min-width: 0; }
[data-tpl="clinic"] .cl-panel-doc b { font-size: 16px; }
[data-tpl="clinic"] .cl-panel-doc span { font-size: 14px; color: var(--dim); }
[data-tpl="clinic"] .cl-panel-next { grid-column: 1 / -1; flex-direction: row !important; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
[data-tpl="clinic"] .cl-panel-next small { font-size: 13px; color: var(--dim); font-weight: 600; }
[data-tpl="clinic"] .tpl-next { display: inline-block; min-width: 9ch; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

@media (min-width: 981px) {
  [data-tpl="clinic"] .cl-hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas: "title vis" "lead vis" "tiles vis" "status vis";
    grid-template-rows: auto auto auto 1fr;
    gap: 16px 48px; padding: 44px var(--edge) 72px; align-items: start;
  }
  [data-tpl="clinic"] .cl-coord { display: inline; }
  [data-tpl="clinic"] .cl-hero h1 { font-size: clamp(64px, 6.6vw, 104px); }
  [data-tpl="clinic"] .cl-lead { font-size: 19px; margin-top: 4px; }
  [data-tpl="clinic"] .cl-vis { aspect-ratio: auto; height: 100%; min-height: 560px; }
  [data-tpl="clinic"] .cl-vis img { position: absolute; inset: 0; }
  [data-tpl="clinic"] .cl-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
  [data-tpl="clinic"] .cl-tile { min-height: 140px; padding: 18px; }
  [data-tpl="clinic"] .cl-tile-ico svg { width: 38px; height: 38px; }
  [data-tpl="clinic"] .cl-tile-label { font-size: 22px; }
  [data-tpl="clinic"] .cl-panel { grid-area: vis; align-self: end; margin: 16px; z-index: 2; box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.45); }
}
@keyframes cl-rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }

/* ——— цифры ——— */
[data-tpl="clinic"] .cl-promo { padding: 12px var(--edge); font-size: 15px; font-weight: 600; background: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-stats { padding: 0 var(--edge); border-top: 1px solid var(--line-strong); }
[data-tpl="clinic"] .cl-stats dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-tpl="clinic"] .cl-stats dl > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 22px 0; }
[data-tpl="clinic"] .cl-stats dl > div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
[data-tpl="clinic"] .cl-stats dl > div:nth-child(n+3) { border-top: 1px solid var(--line); }
[data-tpl="clinic"] .cl-stats dt { font-size: 14px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-stats b { white-space: nowrap; font-size: clamp(32px, 9vw, 60px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.95; font-variant-numeric: tabular-nums; }
@media (min-width: 761px) {
  [data-tpl="clinic"] .cl-stats dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  [data-tpl="clinic"] .cl-stats b { font-size: clamp(40px, 4.6vw, 66px); }
  [data-tpl="clinic"] .cl-stats dl > div { padding: 36px 0 36px 24px; border-left: 1px solid var(--line); }
  [data-tpl="clinic"] .cl-stats dl > div:first-child { padding-left: 0; border-left: 0; }
  [data-tpl="clinic"] .cl-stats dl > div:nth-child(n+3) { border-top: 0; }
  [data-tpl="clinic"] .cl-stats dl > div:nth-child(even) { padding-left: 24px; }
}

/* ——— карта зубов ——— */
[data-tpl="clinic"] .cl-jaw-sec { background: var(--tint); }
[data-tpl="clinic"] .cl-jaw-wrap { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
[data-tpl="clinic"] .cl-arches { display: inline-flex; margin-bottom: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
[data-tpl="clinic"] .cl-arches button { min-height: 44px; padding: 0 28px; font-weight: 650; }
[data-tpl="clinic"] .cl-arches button[aria-pressed="true"] { background: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-jaw-box { position: relative; min-height: 0; overflow: clip; /* clip, а не hidden: фокус на зуб в скрытой половине не должен прокручивать окно */ aspect-ratio: 330 / 308; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
[data-tpl="clinic"] .cl-jaw { display: block; width: 100%; height: auto; transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
[data-tpl="clinic"] .cl-jaw-box[data-arch="low"] .cl-jaw { transform: translate3d(0, -50%, 0); }
[data-tpl="clinic"] .cl-ruler path { stroke: var(--dim); stroke-width: 1; opacity: 0.7; }
[data-tpl="clinic"] .cl-guide { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 5; opacity: 0.5; }
[data-tpl="clinic"] .cl-num { font-size: 12px; font-weight: 600; fill: var(--dim); font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-tooth { cursor: pointer; outline: none; }
[data-tpl="clinic"] .cl-hit { fill: transparent; }
[data-tpl="clinic"] .cl-crown { fill: var(--tooth-fill); stroke: var(--tooth-stroke); stroke-width: 1.4; transition: fill 0.12s, stroke-width 0.12s; }
[data-tpl="clinic"][data-style="b"] .cl-crown { stroke-width: 1.2; }
[data-tpl="clinic"] .cl-fissure { fill: none; stroke: var(--tooth-stroke); stroke-width: 0.8; opacity: 0.45; }
[data-tpl="clinic"] .cl-tooth:hover .cl-crown { stroke: var(--acc); stroke-width: 2; }
[data-tpl="clinic"] .cl-tooth[data-picked] .cl-crown { fill: var(--acc); stroke: var(--acc); filter: var(--glow); }
[data-tpl="clinic"][data-style="b"] .cl-tooth[data-picked] .cl-crown { fill: rgba(86, 220, 255, 0.28); }
[data-tpl="clinic"] .cl-tooth[data-active] .cl-crown { stroke: var(--ink); stroke-width: 2.6; }
[data-tpl="clinic"] .cl-tooth:focus-visible .cl-crown { stroke: var(--ink); stroke-width: 3; }
[data-tpl="clinic"] .cl-mark { fill: var(--on-acc); }
[data-tpl="clinic"] .cl-mark-line { fill: none; stroke: var(--on-acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-tpl="clinic"][data-style="b"] .cl-mark { fill: var(--acc); }
[data-tpl="clinic"][data-style="b"] .cl-mark-line { stroke: var(--acc); }
/* B: сканер — полоса идёт по окну челюсти (transform), как подсветка в 3D-просмотрщике. */
[data-tpl="clinic"] .cl-jaw-box::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--acc); opacity: 0; pointer-events: none; }
[data-tpl="clinic"][data-style="b"] .cl-jaw-box::after { opacity: 0.7; box-shadow: 0 0 14px 2px rgba(86, 220, 255, 0.6); }
[data-tpl="clinic"][data-style="b"] .cl-jaw-box { background: #0a1426; border-color: var(--line-strong); }

[data-tpl="clinic"] .cl-jaw-side { display: flex; flex-direction: column; gap: 16px; }
[data-tpl="clinic"] .cl-pick { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
[data-tpl="clinic"] .cl-pick[data-on] { border-color: var(--acc); }
[data-tpl="clinic"] .cl-pick-title { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; min-height: 26px; }
[data-tpl="clinic"] .cl-planlist { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
[data-tpl="clinic"] .cl-planlist li { display: inline-flex; align-items: center; border: 1.5px solid var(--acc); border-radius: var(--r); background: var(--soft); }
[data-tpl="clinic"] .cl-planlist li > button:first-child { min-height: 44px; padding: 0 4px 0 12px; font-weight: 600; font-size: 15px; }
[data-tpl="clinic"] .cl-planlist li b { font-variant-numeric: tabular-nums; margin-right: 2px; }
[data-tpl="clinic"] .cl-planlist .cl-x { width: 40px; height: 40px; font-size: 24px; }
[data-tpl="clinic"] .cl-planlist li.cl-empty { border: 0; background: none; color: var(--dim); font-size: 15px; min-height: 44px; align-items: center; }
[data-tpl="clinic"] .cl-total { display: grid; gap: 2px; padding: 18px; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r); }
[data-tpl="clinic"] .cl-total-label { font-size: 13px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-total-sum { min-height: 56px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
[data-tpl="clinic"] .cl-total-sum b { font-size: clamp(40px, 11vw, 60px); font-weight: 700; letter-spacing: -0.055em; line-height: 1.05; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-total-sum span { font-size: 15px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-total-visits { font-size: 16px; font-weight: 600; min-height: 24px; }
[data-tpl="clinic"] .cl-total-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 8px; }
@media (min-width: 981px) {
  [data-tpl="clinic"] .cl-arches { display: none; }
  [data-tpl="clinic"] .cl-jaw-box { aspect-ratio: 330 / 616; max-width: 400px; margin-inline: auto; width: 100%; }
  [data-tpl="clinic"] .cl-jaw-box[data-arch="low"] .cl-jaw { transform: none; }
  [data-tpl="clinic"] .cl-jaw-wrap { grid-template-columns: minmax(320px, 400px) minmax(0, 560px); gap: 72px; justify-content: space-between; align-items: start; }
  [data-tpl="clinic"] .cl-jaw-main { position: sticky; top: calc(var(--head-h) + 16px); }
  [data-tpl="clinic"][data-style="b"] .cl-jaw-box::after { animation-name: cl-sweep-d !important; }
}
@keyframes cl-sweep-d { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 610px, 0); } }
@media (min-width: 640px) and (max-width: 980px) {
  [data-tpl="clinic"] .cl-jaw-box { max-width: 460px; margin-inline: auto; width: 100%; }
}
/* ——— отбеливание: до / после ——— */
[data-tpl="clinic"] .cl-whiten { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
[data-tpl="clinic"] .cl-ba { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); border-radius: var(--r); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
[data-tpl="clinic"] .cl-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-tpl="clinic"] .cl-ba-before { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
[data-tpl="clinic"] .cl-ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; z-index: 3; }
[data-tpl="clinic"] .cl-ba-handle { position: absolute; top: 0; bottom: 0; left: var(--p); width: 0; border-left: 2px solid var(--acc); z-index: 2; pointer-events: none; }
[data-tpl="clinic"][data-style="a"] .cl-ba-handle { border-left-color: #fff; }
[data-tpl="clinic"] .cl-ba-handle i { position: absolute; top: 50%; left: -23px; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: var(--acc); border: 3px solid var(--bg); }
[data-tpl="clinic"] .cl-ba-handle i::before, [data-tpl="clinic"] .cl-ba-handle i::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border: solid var(--on-acc); border-width: 0 0 2px 2px; }
[data-tpl="clinic"] .cl-ba-handle i::before { left: 9px; transform: rotate(45deg); }
[data-tpl="clinic"] .cl-ba-handle i::after { right: 9px; transform: rotate(-135deg); }
[data-tpl="clinic"] .cl-ba:has(input:focus-visible) { outline: 3px solid var(--acc); outline-offset: 3px; }
[data-tpl="clinic"] .cl-ba-tag, [data-tpl="clinic"] .cl-ba-ill { position: absolute; z-index: 1; padding: 4px 9px; font-size: 13px; font-weight: 650; background: var(--bg); color: var(--ink); border-radius: calc(var(--r) / 2); }
[data-tpl="clinic"] .cl-ba-tag { top: 10px; }
[data-tpl="clinic"] .cl-ba-tag-l { left: 10px; }
[data-tpl="clinic"] .cl-ba-tag-r { right: 10px; }
[data-tpl="clinic"] .cl-ba-ill { left: 10px; bottom: 10px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-whiten-side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
[data-tpl="clinic"] .cl-big b { font-size: clamp(72px, 22vw, 150px); font-weight: 700; letter-spacing: -0.07em; line-height: 0.9; color: var(--acc-ink); }
[data-tpl="clinic"] .cl-big span { display: block; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; margin-top: 6px; }
[data-tpl="clinic"] .cl-whiten-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding-top: 14px; border-top: 1px solid var(--line); width: 100%; }
[data-tpl="clinic"] .cl-whiten-price small { width: 100%; font-size: 13px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-whiten-price b { font-size: 38px; font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-whiten-price span { font-size: 15px; font-weight: 600; color: var(--dim); }
@media (min-width: 861px) {
  [data-tpl="clinic"] .cl-whiten { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 56px; align-items: center; }
}

/* ——— цены: бенто ——— */
[data-tpl="clinic"] .cl-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(132px, auto); gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
[data-tpl="clinic"] .cl-bento li { position: relative; display: flex; min-width: 0; border: 0 solid var(--line); border-width: 0 1px 1px 0; margin: 0 -1px -1px 0; }
[data-tpl="clinic"] .cl-bento li > button, [data-tpl="clinic"] .cl-bento li > div { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px; width: 100%; padding: 14px; text-align: left; overflow: hidden; transition: background-color 0.12s, color 0.12s; }
[data-tpl="clinic"] .cl-bento li > button:hover { background: var(--soft); }
[data-tpl="clinic"] .cl-bento li[data-span="big"], [data-tpl="clinic"] .cl-bento li[data-span="wide"] { grid-column: span 2; }
[data-tpl="clinic"] .cl-bento-name { font-size: 15px; font-weight: 650; line-height: 1.2; }
[data-tpl="clinic"] .cl-bento-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; order: -1; margin-bottom: auto; }
[data-tpl="clinic"] .cl-bento-price b { font-size: 32px; font-weight: 700; letter-spacing: -0.055em; line-height: 1; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-bento-price small { font-size: 13px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-bento-unit { font-size: 15px; color: var(--dim); line-height: 1.3; }
[data-tpl="clinic"] .cl-bento li[data-accent] > button, [data-tpl="clinic"] .cl-bento li[data-accent] > div { background: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-bento li[data-accent] small, [data-tpl="clinic"] .cl-bento li[data-accent] .cl-bento-unit { color: inherit; opacity: 0.85; }
[data-tpl="clinic"] .cl-bento li[data-accent] > button:hover { background: var(--ink); color: var(--bg); }
[data-tpl="clinic"] .cl-bento li[data-photo] img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; background: var(--tint); }
[data-tpl="clinic"] .cl-bento li[data-photo] > button, [data-tpl="clinic"] .cl-bento li[data-photo] > div { color: #fff; }
[data-tpl="clinic"] .cl-bento li[data-photo] > button::before, [data-tpl="clinic"] .cl-bento li[data-photo] > div::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(6, 12, 28, 0.5); }
[data-tpl="clinic"] .cl-bento li[data-photo] > button > span, [data-tpl="clinic"] .cl-bento li[data-photo] > div > span { position: relative; z-index: 2; }
[data-tpl="clinic"] .cl-bento li[data-photo] small, [data-tpl="clinic"] .cl-bento li[data-photo] .cl-bento-unit { color: #fff; opacity: 0.9; }
[data-tpl="clinic"] .cl-bento li[data-photo] > button:hover { background: transparent; }
[data-tpl="clinic"] .cl-bento-cap { font-size: 44px !important; }
@media (min-width: 861px) {
  [data-tpl="clinic"] .cl-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(168px, auto); }
  [data-tpl="clinic"] .cl-bento li[data-span="big"] { grid-column: span 2; grid-row: span 2; }
  [data-tpl="clinic"] .cl-bento li > button, [data-tpl="clinic"] .cl-bento li > div { padding: 20px; }
  [data-tpl="clinic"] .cl-bento-price b { font-size: 44px; }
  [data-tpl="clinic"] .cl-bento li[data-span="big"] .cl-bento-name { font-size: 28px; letter-spacing: -0.03em; }
  [data-tpl="clinic"] .cl-bento li[data-span="big"] .cl-bento-price b { font-size: 28px; }
  [data-tpl="clinic"] .cl-bento-name { font-size: 17px; }
}
[data-tpl="clinic"] .cl-packs { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
[data-tpl="clinic"] .cl-packs > li { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r); }
[data-tpl="clinic"] .cl-packs h3 { font-size: 26px; }
[data-tpl="clinic"] .cl-incl { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
[data-tpl="clinic"] .cl-incl li { display: flex; align-items: center; gap: 10px; }
[data-tpl="clinic"] .cl-incl li::before { content: ""; width: 14px; height: 2px; background: var(--acc); flex: none; }
[data-tpl="clinic"] .cl-pack-price { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
[data-tpl="clinic"] .cl-pack-price b { font-size: 44px; font-weight: 700; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-pack-price span { font-size: 15px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-pack-sub { font-size: 15px; color: var(--dim); min-height: 21px; margin-top: -8px; }
@media (min-width: 861px) { [data-tpl="clinic"] .cl-packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ——— врачи, отзывы: свайп-карусели на телефоне ——— */
[data-tpl="clinic"] .cl-filter { margin-bottom: 18px; }
[data-tpl="clinic"] .cl-snap { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); margin-inline: calc(var(--edge) * -1); padding: 2px var(--edge) 12px; scrollbar-width: none; overscroll-behavior-x: contain; }
[data-tpl="clinic"] .cl-snap::-webkit-scrollbar { display: none; }
[data-tpl="clinic"] .cl-snap > * { flex: 0 0 80%; scroll-snap-align: start; }
[data-tpl="clinic"] .cl-docs { min-height: 480px; }
[data-tpl="clinic"] .cl-doc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
[data-tpl="clinic"] .cl-doc img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: 50% 15%; background: var(--tint); }
[data-tpl="clinic"][data-style="b"] .cl-doc img { filter: saturate(0.85) brightness(0.92); }
[data-tpl="clinic"] .cl-doc-body { display: flex; flex-direction: column; gap: 4px; padding: 16px; flex: 1; }
[data-tpl="clinic"] .cl-doc h3 { font-size: 24px; }
[data-tpl="clinic"] .cl-doc-role { font-size: 15px; color: var(--dim); }
[data-tpl="clinic"] .cl-doc-years { font-size: 15px; }
[data-tpl="clinic"] .cl-doc-years b { font-size: 22px; letter-spacing: -0.04em; }
[data-tpl="clinic"] .cl-doc-next { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 8px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); }
[data-tpl="clinic"] .cl-doc-next small { font-size: 13px; color: var(--dim); font-weight: 600; }
[data-tpl="clinic"] .cl-doc .cl-btn { margin-top: auto; width: 100%; }
[data-tpl="clinic"] .cl-reviews > * { flex-basis: 84%; }
[data-tpl="clinic"] .cl-review { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
[data-tpl="clinic"] .cl-stars { color: var(--acc-ink); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-review blockquote { font-size: 20px; line-height: 1.25; letter-spacing: -0.025em; font-weight: 550; }
[data-tpl="clinic"] .cl-review figcaption { margin-top: auto; font-size: 14px; color: var(--dim); }
@media (min-width: 861px) {
  [data-tpl="clinic"] .cl-snap { overflow: visible; display: grid; margin-inline: 0; padding: 0; scroll-snap-type: none; }
  [data-tpl="clinic"] .cl-docs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; min-height: 0; }
  [data-tpl="clinic"] .cl-reviews { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}

/* ——— FAQ ——— */
[data-tpl="clinic"] .cl-faq-list { max-width: 860px; width: 100%; border-top: 1.5px solid var(--line-strong); }
[data-tpl="clinic"] .cl-faq-list details { border-bottom: 1px solid var(--line); }
[data-tpl="clinic"] .cl-faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; font-size: 20px; font-weight: 650; letter-spacing: -0.03em; cursor: pointer; list-style: none; }
[data-tpl="clinic"] .cl-faq-list summary::-webkit-details-marker { display: none; }
[data-tpl="clinic"] .cl-faq-list summary::after { content: "+"; font-size: 28px; font-weight: 400; color: var(--acc-ink); flex: none; }
[data-tpl="clinic"] .cl-faq-list details[open] summary::after { content: "−"; }
[data-tpl="clinic"] .cl-faq-list details p { padding: 0 0 20px; color: var(--dim); font-size: 17px; max-width: 56ch; }

/* ——— контакты ——— */
[data-tpl="clinic"] .cl-contacts-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
[data-tpl="clinic"] .cl-contacts-list { display: grid; gap: 0; border-top: 1.5px solid var(--line-strong); }
[data-tpl="clinic"] .cl-contacts-list > div { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
[data-tpl="clinic"] .cl-contacts-list h3 { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--dim); line-height: 1.3; }
[data-tpl="clinic"] .cl-contacts-list p { font-size: 18px; letter-spacing: -0.015em; }
[data-tpl="clinic"] .cl-map { position: relative; min-height: 280px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r); }
[data-tpl="clinic"] .cl-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
[data-tpl="clinic"] .cl-map small { position: absolute; left: 12px; bottom: 10px; padding: 4px 10px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--ink); border-radius: calc(var(--r) / 2); }
[data-tpl="clinic"] .m-bg { fill: #eef0ea; }
[data-tpl="clinic"] .m-park { fill: #dfe8d6; }
[data-tpl="clinic"] .m-river { fill: #d3e0f5; }
[data-tpl="clinic"] .m-road path { stroke: #ffffff; stroke-width: 9; fill: none; }
[data-tpl="clinic"] .m-minor path { stroke: #ffffff; stroke-width: 4; fill: none; opacity: 0.8; }
[data-tpl="clinic"][data-style="b"] .m-bg { fill: #0a1426; }
[data-tpl="clinic"][data-style="b"] .m-park { fill: #0e2a2f; }
[data-tpl="clinic"][data-style="b"] .m-river { fill: #0f2845; }
[data-tpl="clinic"][data-style="b"] .m-road path { stroke: #1a3354; }
[data-tpl="clinic"][data-style="b"] .m-minor path { stroke: #132a47; }
[data-tpl="clinic"] .cl-pin { position: absolute; left: 56%; top: 46%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--acc); border: 3px solid var(--bg); }
[data-tpl="clinic"] .cl-pin i { position: absolute; inset: -14px; border-radius: 50%; border: 2px solid var(--acc); opacity: 0.5; }
@media (min-width: 861px) { [data-tpl="clinic"] .cl-contacts-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; } [data-tpl="clinic"] .cl-map { min-height: 420px; } }

/* ——— подвал: имя возвращается на всю ширину ——— */
[data-tpl="clinic"] .cl-foot { padding: 40px var(--edge) 24px; border-top: 1px solid var(--line-strong); overflow: hidden; }
[data-tpl="clinic"] .cl-foot-name { font-size: clamp(40px, 11.6vw, 172px); font-weight: 750; letter-spacing: -0.07em; line-height: 0.85; color: var(--acc-ink); white-space: nowrap; }
[data-tpl="clinic"] .cl-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; font-size: 14px; color: var(--dim); }

/* ——— липкая панель на телефоне (зона большого пальца) ——— */
[data-tpl="clinic"] .cl-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); border-top: 1px solid var(--line-strong);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}
[data-tpl="clinic"] .cl-sticky a, [data-tpl="clinic"] .cl-sticky button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; font-weight: 650; font-size: 15px; border: 1.5px solid var(--line-strong); border-radius: var(--r); }
[data-tpl="clinic"] .cl-sticky .primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-sticky[data-hidden] { transform: translate3d(0, 110%, 0); }
@media (min-width: 761px) { [data-tpl="clinic"] .cl-sticky { display: none; } }
/* Панель решения открыта — у неё своя кнопка. */
@media (max-width: 760px) { [data-tpl="clinic"]:has(.cl-panel[data-open]) .cl-sticky { transform: translate3d(0, 110%, 0); } }

/* ——— окно записи: на телефоне на всю высоту снизу, на десктопе панель справа ——— */
[data-tpl="clinic"] dialog.cl-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; padding: 0; border: 0;
  width: 100%; max-width: none; height: calc(100dvh - 10px); max-height: none;
  background: var(--bg); color: var(--ink);
  border-top: 2px solid var(--acc); border-radius: var(--r) var(--r) 0 0; overflow: hidden;
}
[data-tpl="clinic"] dialog.cl-sheet[open] { display: flex; }
[data-tpl="clinic"][data-live] dialog.cl-sheet[open] { animation: cl-sheet-up 0.3s cubic-bezier(0.2, 0, 0, 1); }
[data-tpl="clinic"] dialog.cl-sheet::backdrop { background: rgba(5, 9, 20, 0.6); }
[data-tpl="clinic"] .cl-sheet-in { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
[data-tpl="clinic"] .cl-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 0 16px; min-height: 52px; }
[data-tpl="clinic"] .cl-sheet-head h2 { font-size: 26px; }
[data-tpl="clinic"] .cl-sheet-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
[data-tpl="clinic"] .cl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 16px 12px; }
[data-tpl="clinic"] .cl-steps li { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 3px solid var(--line); font-size: 13px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-steps li i { font-style: normal; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-steps li[data-state="done"] { border-top-color: var(--acc); color: var(--ink); }
[data-tpl="clinic"] .cl-steps li[data-state="now"] { border-top-color: var(--acc); color: var(--ink); }
[data-tpl="clinic"] .cl-steps li[data-state="now"] span { font-weight: 750; }
[data-tpl="clinic"] .cl-steps li i::after { content: " /"; opacity: 0.4; }
[data-tpl="clinic"] .cl-steps li { flex-direction: row; align-items: baseline; gap: 6px; }
[data-tpl="clinic"] .cl-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 20px; overscroll-behavior: contain; }
[data-tpl="clinic"] .cl-lab { margin: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-sheet-body section > .cl-lab:first-child { margin-top: 4px; }
[data-tpl="clinic"] .cl-svc { display: flex; flex-direction: column; gap: 8px; }
[data-tpl="clinic"] .cl-svc button { display: flex; align-items: center; min-height: 52px; padding: 0 16px; font-weight: 600; font-size: 17px; text-align: left; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
[data-tpl="clinic"] .cl-svc button[aria-pressed="true"] { border-color: var(--acc); background: var(--soft); box-shadow: inset 4px 0 0 var(--acc); }
[data-tpl="clinic"] .cl-plan { padding: 16px; border: 1.5px solid var(--acc); border-radius: var(--r); background: var(--soft); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
[data-tpl="clinic"] .cl-plan-title { font-size: 13px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-plan ul { display: flex; flex-direction: column; gap: 4px; width: 100%; }
[data-tpl="clinic"] .cl-plan li { display: flex; justify-content: space-between; gap: 10px; font-size: 17px; }
[data-tpl="clinic"] .cl-plan li span { font-weight: 700; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-plan-teeth { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-pickdocs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
[data-tpl="clinic"] .cl-pickdocs::-webkit-scrollbar { display: none; }
[data-tpl="clinic"] .cl-pickdocs button { flex: none; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 14px 6px 6px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
[data-tpl="clinic"] .cl-pickdocs button[aria-pressed="true"] { border-color: var(--acc); background: var(--soft); }
[data-tpl="clinic"] .cl-pickdocs img, [data-tpl="clinic"] .cl-any { width: 44px; height: 44px; border-radius: var(--r); object-fit: cover; object-position: 50% 15%; background: var(--tint); }
[data-tpl="clinic"] .cl-any { display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--acc-ink); }
[data-tpl="clinic"] .cl-pickdocs b { font-size: 15px; font-weight: 650; }
[data-tpl="clinic"] .cl-dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-height: 64px; }
[data-tpl="clinic"] .cl-dates button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
[data-tpl="clinic"] .cl-dates small { font-size: 12px; font-weight: 600; color: var(--dim); text-transform: lowercase; }
[data-tpl="clinic"] .cl-dates b { font-size: 20px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-dates button[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-dates button[aria-pressed="true"] small { color: inherit; }
[data-tpl="clinic"] .cl-dates button:disabled { opacity: 0.4; text-decoration: line-through; }
[data-tpl="clinic"] .cl-skel { grid-column: 1 / -1; background: var(--tint); border-radius: var(--r); }
[data-tpl="clinic"] .cl-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
[data-tpl="clinic"] .cl-slots button { min-height: 48px; font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
[data-tpl="clinic"] .cl-slots button[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
[data-tpl="clinic"] .cl-slots button:disabled { opacity: 0.4; text-decoration: line-through; }
[data-tpl="clinic"] .cl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
[data-tpl="clinic"] .cl-field label { font-size: 14px; font-weight: 600; color: var(--dim); }
[data-tpl="clinic"] .cl-field input { min-height: 56px; padding: 0 16px; font: inherit; font-size: 18px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r); }
[data-tpl="clinic"] .cl-field input[aria-invalid="true"] { border-color: #c4281c; }
[data-tpl="clinic"] .cl-sheet-foot { border-top: 1.5px solid var(--line-strong); padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
[data-tpl="clinic"] .cl-sum { display: grid; gap: 2px; font-size: 14px; }
[data-tpl="clinic"] .cl-sum > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; }
[data-tpl="clinic"] .cl-sum dt { color: var(--dim); font-weight: 600; }
[data-tpl="clinic"] .cl-sum dd { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
[data-tpl="clinic"] .cl-sheet-act { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
[data-tpl="clinic"] .cl-sheet-act .cl-btn { min-height: 52px; width: 100%; }
[data-tpl="clinic"] .cl-sheet-act .cl-btn:not(.ghost) { grid-column: span 2; }
[data-tpl="clinic"] .cl-success { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
[data-tpl="clinic"] .cl-success h3 { font-size: 32px; }
[data-tpl="clinic"] .cl-success dl { width: 100%; border-top: 1px solid var(--line); }
[data-tpl="clinic"] .cl-success dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
[data-tpl="clinic"] .cl-success dt { color: var(--dim); font-size: 14px; font-weight: 600; }
[data-tpl="clinic"] .cl-success dd { font-weight: 650; }
[data-tpl="clinic"] .cl-success .cl-btn { width: 100%; white-space: normal; text-align: center; }
@keyframes cl-sheet-up { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }
@keyframes cl-sheet-in { from { transform: translate3d(100%, 0, 0); } to { transform: none; } }
@media (min-width: 761px) {
  [data-tpl="clinic"] dialog.cl-sheet { inset: 0 0 0 auto; width: 480px; height: 100dvh; border-top: 0; border-left: 2px solid var(--acc); border-radius: 0; }
  [data-tpl="clinic"][data-live] dialog.cl-sheet[open] { animation: cl-sheet-in 0.3s cubic-bezier(0.2, 0, 0, 1); }
}

/* ——— появление секций (MotionLayer) и «живые» анимации: только transform / opacity ——— */
[data-tpl="clinic"] .rv { opacity: 0; transform: translate3d(0, 14px, 0); }
[data-tpl="clinic"] .rv-in { opacity: 1; transform: none; transition: opacity 0.4s cubic-bezier(0.2, 0, 0, 1), transform 0.4s cubic-bezier(0.2, 0, 0, 1); transition-delay: calc(var(--d, 0) * 60ms); }
@keyframes cl-scan { 0% { transform: translate3d(0, -100%, 0); opacity: 1; } 55% { transform: translate3d(0, 0, 0); opacity: 1; } 56%, 100% { transform: translate3d(0, 0, 0); opacity: 0; } }
@keyframes cl-sweep { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 300px, 0); } }
@keyframes cl-ping { 0% { transform: scale(0.6); opacity: 0.6; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  [data-tpl="clinic"][data-live] .cl-scan::after { animation: cl-scan 5.5s linear infinite; }
  [data-tpl="clinic"][data-live][data-style="b"] .cl-jaw-box::after { animation: cl-sweep 4.5s linear infinite alternate; }
  [data-tpl="clinic"][data-live] .cl-pin i { animation: cl-ping 2.4s ease-out infinite; }
  [data-tpl="clinic"][data-paused="1"] * { animation-play-state: paused !important; }
}
@media (prefers-reduced-motion: reduce) {
  [data-tpl="clinic"] *, [data-tpl="clinic"] *::before, [data-tpl="clinic"] *::after { transition-duration: 0.001ms !important; animation: none !important; scroll-behavior: auto !important; }
  [data-tpl="clinic"][data-style="b"] .cl-jaw-box::after { transform: translate3d(0, 150px, 0); }
}

@media (min-width: 981px) {
  [data-tpl="clinic"] .cl-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; align-items: start; }
  [data-tpl="clinic"] .cl-faq .cl-sec-head { margin-bottom: 0; }
  [data-tpl="clinic"] .cl-faq-list { max-width: none; }
}
