/* Стиль "editorial" (деловой): спокойная редакционная вёрстка. Ведёт типографика, а не карточки:
   бумажный фон, Source Serif 4 для заголовков, имён и цифр дат, Golos Text для интерфейса, блоки разделены
   тонкими линиями и воздухом, сетка 8px. Монограмма специалиста в тонком кольце, ближайшее время - тихие
   текстовые кнопки с подчёркиванием, дата - недельная лента, поля с подчёркиванием.
   Никаких декоративных кругов, пятен и картинок. Файл самодостаточный: soft к нему не подключается.
   Цвета читают только переменные. Светлая тема задана здесь, "тёмную" и "фирменную" досчитывает сервер из
   акцента организации (theme.py) блоком <style nonce>; нейтральные тона этих тем здесь подправлены
   в тёплую сторону (бумага и тёплый уголь), акцент остаётся тем, что посчитал сервер.
   Раскладка и механика - в base.css. Перечень классов - в README, "Стили оформления". */

@font-face { font-family: 'Source Serif 4'; font-weight: 400 700; font-style: normal; font-display: swap;
  src: url(../fonts/sourceserif-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Source Serif 4'; font-weight: 400 700; font-style: normal; font-display: swap;
  src: url(../fonts/sourceserif-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; }
@font-face { font-family: 'Golos Text'; font-weight: 400 700; font-style: normal; font-display: swap;
  src: url(../fonts/golos-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 400 700; font-style: normal; font-display: swap;
  src: url(../fonts/golos-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; }

/* ---------- Переменные: светлая тема (бумага) ---------- */
:root,
html[data-theme="light"],
html[data-theme="brand"] {
  color-scheme: light;
  --serif: 'Source Serif 4', 'PT Serif', Georgia, 'Times New Roman', serif;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bg: #F7F4EC; --bg-deep: #EFEBDF;
  --surface: #FBF9F3; --surface-2: #EFEBDF; --plate: transparent; --plate-pad: 0px;
  --line: #DDD7C8; --line-strong: #B9B3A2;
  --ink: #1B1A17; --ink-2: #4D4A42; --ink-3: #686356;
  --accent: #1E5A3A; --accent-hover: #174A2F; --on-accent: #FBF9F3; --accent-ink: #1E5A3A;
  --accent-soft: #E4E6DC; --accent-soft-ink: #174A2F; --accent-line: rgba(30, 90, 58, 0.38);
  --danger: #A33A2A; --danger-bg: #F6E4DF; --danger-solid: #A33A2A;
  --warn-bg: #F5EBD3; --warn-ink: #6B4A0B; --warn-line: #B7861F;
  --scrim: rgba(27, 26, 23, 0.45);
  --shadow-pop: 0 24px 56px -24px rgba(27, 26, 23, 0.4);
  --rule: var(--ink);
  --av-0: transparent; --av-0t: var(--ink);
}

/* Фирменная: сервер даёт акцент и нейтральные тона от акцента, здесь основа остаётся бумажной
   (чуть подкрашенной акцентом), шапка бумажная, акцент ведёт действия, ссылки, выбранное и верхнюю линию */
html[data-design="editorial"][data-theme="brand"] {
  --bg: color-mix(in srgb, var(--accent) 3%, #F7F4EC);
  --bg-deep: color-mix(in srgb, var(--accent) 5%, #EFEBDF);
  --surface: color-mix(in srgb, var(--accent) 2%, #FBF9F3);
  --surface-2: color-mix(in srgb, var(--accent) 5%, #F1EDE1);
  --rule: var(--accent-ink);
}

/* ---------- Переменные: тёмная (тёплый уголь; акцент досчитывает сервер) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1C1A17; --bg-deep: #161411; --surface: #211F1B; --surface-2: #27241F;
  --plate: rgba(255, 255, 255, 0.94); --plate-pad: 6px 10px;
  --line: rgba(239, 235, 225, 0.13); --line-strong: rgba(239, 235, 225, 0.26);
  --ink: #EFEBE1; --ink-2: #BDB7A9; --ink-3: #A29C88;
  --accent: #8FCBA7; --accent-hover: #A5D6B9; --on-accent: #11241A; --accent-ink: #8FCBA7;
  --accent-soft: #26302A; --accent-soft-ink: #B5DCC5; --accent-line: rgba(143, 203, 167, 0.4);
  --danger: #EE9A8B; --danger-bg: rgba(238, 154, 139, 0.13); --danger-solid: #B5402F;
  --warn-bg: rgba(240, 190, 90, 0.13); --warn-ink: #F1CC85; --warn-line: #C79A3A;
  --scrim: rgba(0, 0, 0, 0.62);
  --shadow-pop: 0 24px 56px -20px rgba(0, 0, 0, 0.85);
  --rule: var(--ink);
}
html[data-design="editorial"][data-theme="dark"] {
  --bg: color-mix(in srgb, var(--accent) 3%, #1C1A17);
  --bg-deep: color-mix(in srgb, var(--accent) 3%, #161411);
  --surface: color-mix(in srgb, var(--accent) 3%, #211F1B);
  --surface-2: color-mix(in srgb, var(--accent) 5%, #27241F);
  --line: rgba(239, 235, 225, 0.13); --line-strong: rgba(239, 235, 225, 0.26);
  --ink: #EFEBE1; --ink-2: #BDB7A9; --ink-3: #A29C88;
  --av-0t: #EFEBE1;
}
/* Служебные страницы (404, ошибки) не знают тему организации и идут за системной */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --bg: #1C1A17; --bg-deep: #161411; --surface: #211F1B; --surface-2: #27241F;
    --plate: rgba(255, 255, 255, 0.94); --plate-pad: 6px 10px;
    --line: rgba(239, 235, 225, 0.13); --line-strong: rgba(239, 235, 225, 0.26);
    --ink: #EFEBE1; --ink-2: #BDB7A9; --ink-3: #A29C88;
    --accent: #8FCBA7; --accent-hover: #A5D6B9; --on-accent: #11241A; --accent-ink: #8FCBA7;
    --accent-soft: #26302A; --accent-soft-ink: #B5DCC5; --accent-line: rgba(143, 203, 167, 0.4);
    --danger: #EE9A8B; --danger-bg: rgba(238, 154, 139, 0.13); --danger-solid: #B5402F;
    --warn-bg: rgba(240, 190, 90, 0.13); --warn-ink: #F1CC85; --warn-line: #C79A3A;
    --scrim: rgba(0, 0, 0, 0.62);
    --shadow-pop: 0 24px 56px -20px rgba(0, 0, 0, 0.85);
    --rule: var(--ink);
    --av-0t: #EFEBE1;
  }
}
/* Рамка полей и чекбоксов: заметнее волосяной линии, считается от текста и фона текущей темы */
:root { --ctl: color-mix(in srgb, var(--ink-3) 72%, var(--bg)); }

/* ---------- Основа ---------- */
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-decoration: none; }
h1, h2, h3, h4 { font-weight: 500; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 2px; }
.page { max-width: 560px; margin: 0 auto; }
.content { padding: 0 24px; }
.muted { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums lining-nums; }

/* Блоки без карточек: группа - просто область, строки внутри разделены линиями */
.group, .card { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 4px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600; letter-spacing: 0.005em; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ctl); font-weight: 500; font-size: 15px; }
.btn--ghost { background: transparent; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.btn--danger { color: var(--danger); }
.btn--secondary.btn--danger { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.btn--danger-fill { background: var(--danger-solid); color: #FFFFFF; }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.btn .icon { margin-right: -2px; }
@media (hover: hover) {
  .btn--primary:hover { background: var(--accent-hover); }
  .btn--secondary:hover { border-color: var(--ink-2); }
  .btn--ghost:hover { color: var(--ink); }
  .btn--danger:hover { background: var(--danger-bg); }
}
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 4px; background: none; color: var(--ink-2); text-decoration: none;
}
.icon-btn--round { background: none; border: 0; box-shadow: none; }
.icon-btn[aria-expanded="true"] { color: var(--accent-ink); }
.icon-btn[disabled] { opacity: 0.3; }
@media (hover: hover) { .icon-btn:not([disabled]):hover { color: var(--ink); background: var(--surface-2); } }
.link-btn {
  min-height: 44px; padding: 0 2px; border: 0; background: none; font-size: 14px; font-weight: 500;
  color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer;
}

/* ---------- Лицо организации: логотип или инициал ---------- */
.brand { display: flex; align-items: center; min-width: 0; }
.brand__plate {
  display: inline-flex; align-items: center; height: 40px; padding: var(--plate-pad); border-radius: 4px;
  background: var(--plate); min-width: 0;
}
.brand__logo { max-height: 36px; max-width: 220px; width: auto; height: auto; object-fit: contain; }
.brand__mark {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 4px;
  background: var(--accent); color: var(--on-accent); font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1;
}

/* ---------- Монограмма специалиста: инициалы антиквой в тонком кольце ---------- */
.avatar {
  display: grid; place-items: center; flex: none; overflow: hidden; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--ctl); background: transparent; color: var(--ink);
  font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: 0.04em; line-height: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
html[data-theme="brand"] .avatar { border-color: color-mix(in srgb, var(--accent-ink) 55%, var(--bg)); }
.av-1, .av-2, .av-3, .av-4, .av-5 { background: transparent; color: var(--ink); }

/* ---------- Организация: шапка ---------- */
.hero { padding: 0; }
.hero__top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px;
  padding: env(safe-area-inset-top, 0px) 24px 0; border-bottom: 1px solid var(--line);
}
.hero__actions { display: none; }
.hero__title, .hero__desc, .contacts, .howto { margin-left: 24px; margin-right: 24px; }
.hero__title {
  margin-top: 40px; font-family: var(--serif); font-weight: 480; font-size: clamp(30px, 9.6vw, 40px); line-height: 1.08;
  letter-spacing: -0.012em; text-wrap: balance; overflow-wrap: anywhere;
}
.hero__title::before {
  content: "Онлайн-запись"; content: "Онлайн-запись" / ""; display: block; margin-bottom: 16px;
  font-family: var(--font); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-ink);
}
.hero__desc { margin-top: 16px; max-width: 34ch; font-size: 17px; line-height: 26px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.contacts { margin-top: 32px; border-top: 1px solid var(--line); }
.contacts li { border-bottom: 1px solid var(--line); }
.contact { display: flex; align-items: center; gap: 16px; min-height: 52px; font-size: 16px; color: var(--ink); }
a.contact:hover .contact__value { color: var(--accent-ink); }
.contact__icon { display: grid; place-items: center; flex: none; color: var(--ink-3); }
html[data-theme="brand"] .contact__icon { color: var(--accent-ink); }
.contact__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.contact__value { overflow-wrap: anywhere; }
.howto { display: none; }

.section-head { padding: 48px 0 20px; }
.section-title { font-family: var(--serif); font-weight: 480; font-size: 24px; line-height: 1.2; letter-spacing: -0.005em; }
.section-sub { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-3); }

/* Узкая строка при прокрутке */
.minibar {
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px); transition: transform 0.2s ease, visibility 0.2s;
}
.minibar__in { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px 0 24px; max-width: 560px; margin: 0 auto; }
.minibar__name { flex: 1; min-width: 0; font-family: var(--serif); font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minibar .icon-btn { color: var(--accent-ink); }

/* ---------- Список специалистов: строки с линиями ---------- */
.spec-list { border-top: 2px solid var(--rule); }
.spec { padding: 24px 0 12px; border-bottom: 1px solid var(--line); animation: fade 0.3s ease both; }
.spec:last-child { border-bottom: 0; }
.spec__head { display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 56px; }
.spec__avatar { display: block; flex: none; }
.spec__who { flex: 1; min-width: 0; }
.spec__name { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -0.003em; overflow-wrap: anywhere; }
.spec__name a { color: var(--ink); }
@media (hover: hover) { .spec__name a:hover { color: var(--accent-ink); } }
.spec__title {
  margin-top: 6px; font-size: 11.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3); overflow-wrap: anywhere;
}
.spec__head .icon-btn { width: 36px; margin: 0 -6px 0 0; color: var(--ink-3); }
.spec__about { margin-left: 64px; }
.about {
  margin: 4px 0 8px; padding: 2px 0 2px 14px; border-left: 2px solid var(--line-strong);
  font-size: 14px; line-height: 22px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere;
}
.spec__near { display: flex; flex-wrap: wrap; align-items: center; margin: 4px 0 0 64px; min-width: 0; }
.spec__near-label { order: 0; flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.chips { order: 2; display: flex; flex-wrap: wrap; flex: 0 0 100%; margin-left: -10px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; color: var(--accent-ink);
  text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 1px; text-underline-offset: 7px;
}
.chip:nth-child(n+4) { display: none; }
@media (hover: hover) { .chip:hover, .spec__all:hover { text-decoration-color: currentColor; } }
.spec__all {
  order: 1; display: inline-flex; align-items: center; min-height: 32px; padding: 0; margin-left: 12px; font-size: 13px; color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.spec__cta { display: none; }
.spec--idle .spec__near { display: block; }
.no-slots { font-size: 14px; line-height: 20px; color: var(--ink-3); }
.spec--idle .spec__near .btn { width: auto; min-height: 44px; margin-top: 4px; padding: 0 18px; }

.empty { padding: 24px 0; text-align: left; color: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty__icon { display: none; }
.empty__title { margin-bottom: 4px; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.25; color: var(--ink); }

.foot { margin-top: 56px; padding: 24px 24px calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-3); }
.page--org + .foot { margin-top: 0; padding-left: max(24px, calc((100% - 512px) / 2)); padding-right: max(24px, calc((100% - 512px) / 2)); }
.page--org .content { padding-bottom: 8px; }
.foot a { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); }
.foot__links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.foot__sign { margin-top: 4px; }

/* ---------- Запись: шапка шага, прогресс, выбранный специалист ---------- */
.flow-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 4px; min-height: 56px; padding: env(safe-area-inset-top, 0px) 14px 0 14px; }
.flow-head__back { margin-left: -4px; }
.flow-head__title { min-width: 0; padding-left: 4px; }
.flow-head__name { font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 22px; }
.flow-head__step { font-size: 11.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.flow-head__close { color: var(--ink-3); }
.stepper { display: flex; gap: 4px; padding: 0; }
.stepper li { flex: 1; min-width: 0; }
.stepper__bar { height: 2px; background: var(--line); transition: background 0.25s; }
.stepper li.is-done .stepper__bar, .stepper li.is-current .stepper__bar { background: var(--accent); }
.stepper li.is-done { cursor: pointer; }
.stepper__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.who { border-bottom: 1px solid var(--line); }
.who__row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 16px 0; }
.who .avatar { width: 40px; height: 40px; font-size: 15px; }
.who__text { flex: 1; min-width: 0; }
.who__name { font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 22px; overflow-wrap: anywhere; }
.who__sub { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__act { flex: none; margin-right: -2px; }
.who__more {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0;
  border: 0; border-top: 1px solid var(--line); background: none; font-size: 13.5px; color: var(--ink-2); text-align: left;
}
.who__more .icon { transition: transform 0.2s ease; }
.who__more[aria-expanded="true"] .icon { transform: rotate(180deg); }
.who .about { margin: 0 0 14px; }

.stage { outline: none; }
.stage.enter { animation: fade 0.25s ease both; }
.step-title { margin: 32px 0 8px; font-family: var(--serif); font-weight: 480; font-size: 32px; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
.step-title--quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; margin: 0; }

/* Услуги: список с верхней линией */
.services { margin-top: 24px; border-top: 2px solid var(--rule); }
.service {
  display: flex; align-items: flex-start; gap: 16px; padding: 24px 0; cursor: pointer; border-bottom: 1px solid var(--line);
}
.service:focus-within { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.service__radio {
  order: 2; display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  border: 1.5px solid var(--ctl); background: transparent; color: var(--on-accent);
}
.service.is-selected .service__radio { background: var(--accent); border-color: var(--accent); }
.service__main { display: block; flex: 1; min-width: 0; }
.service__name { display: block; font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.service__desc { display: block; margin-top: 8px; max-width: 34ch; font-size: 15px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }
.service__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.pill .icon { color: var(--ink-3); }
.pill--accent { font-weight: 600; color: var(--accent-ink); }
/* Длительность и цена: одна строка, число и единица (.svc__dur-num, .svc__dur-unit) слитно */
.svc__dur-num { font-variant-numeric: tabular-nums lining-nums; }
.svc__dur-unit { margin-left: 0; }
@media (hover: hover) { .service:hover .service__name { color: var(--accent-ink); } }
.cat { margin: 32px 0 -8px; font-size: 11.5px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.cat + .service, .services > .cat:first-child { margin-top: 24px; }

/* Дата: недельная лента */
.cal__head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 24px; }
.cal__title { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.2; }
.cal__nav { margin-right: -10px; }
.cal__nav .icon-btn, .cal__nav-btn { color: var(--ink-2); }
.cal__nav-btn[disabled] { opacity: 0.35; }
.cal--strip .cal__days {
  margin: 8px -24px 0; padding: 0 24px 16px; scroll-padding: 0 24px; border-bottom: 1px solid var(--line);
}
.day {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none;
  width: calc((min(100vw, 560px) - 48px) / 6.5); min-height: 76px; padding: 8px 0 0; border: 0; border-radius: 0;
  background: none; color: var(--ink);
}
.day__dow { font-size: 11.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.day__num {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 4px;
  font-family: var(--serif); font-size: 21px; line-height: 1; font-weight: 500; font-variant-numeric: lining-nums; color: var(--ink);
  transition: background 0.15s, color 0.15s;
}
@media (hover: hover) { .day:not([disabled]):not(.day--sel):hover .day__num { background: var(--surface-2); } }
.day[disabled] { cursor: default; }
.day[disabled] .day__dow, .day[disabled] .day__num { color: var(--ink-3); opacity: 0.5; font-weight: 400; }
.day--today:not(.day--sel) .day__num { color: var(--accent-ink); }
.day--today .day__num::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 14px; height: 2px; margin-left: -7px; background: currentColor; }
.day--sel .day__num { background: var(--accent); color: var(--on-accent); }
.day--sel .day__dow { color: var(--ink); }
.cal__skel .day__num { background: var(--surface-2); color: transparent; }
.cal__skel .day__dow { color: var(--line); }
.tz-note { margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
/* Сетка месяца (на случай, если календарь переключат на неё): тот же язык, без карточек */
.cal--month { margin-top: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cal--month .cal__head { margin-top: 8px; }
.cal--month .cal__dow span { padding: 8px 0 6px; text-align: center; font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.cal--month .day { width: auto; min-height: 48px; flex-direction: row; justify-content: center; padding: 2px 0; }
.cal--month .day__num { width: 44px; height: 44px; font-size: 18px; }
.cal--month .day--avail .day__num { color: var(--accent-ink); }
.cal--month .day--sel .day__num { color: var(--on-accent); }

/* Время: Утро, День, Вечер */
.times__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 24px; }
.times__title { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; }
.times__count { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.slot-group { margin-top: 24px; }
.slot-group__head { display: flex; align-items: center; gap: 12px; font-size: 11.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.slot-group__head .icon { display: none; }
.slot-group__name { display: flex; align-items: center; flex: 1; gap: 12px; }
.slot-group__name::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.slot-group__range { font-weight: 400; letter-spacing: 0.04em; }
.slot-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.slot {
  min-height: 44px; border: 1px solid var(--ctl); border-radius: 4px; background: transparent; color: var(--ink);
  font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums lining-nums;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
@media (hover: hover) { .slot:hover { border-color: var(--accent-ink); color: var(--accent-ink); } }
.slot.is-selected, .slot.is-selected:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.skeleton { border-radius: 4px; background-image: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); }
.skeleton--slot { height: 44px; }
.times__title .skeleton--slot { width: 60%; height: 28px; }

/* ---------- Форма: поля с подчёркиванием ---------- */
.fields { padding-top: 0; }
.field { position: relative; display: flex; flex-direction: column; margin-top: 28px; }
.field__label { order: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.field__opt { flex: none; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.field__opt--inline { margin-left: 4px; }
.field .input, .field .select, .field .check { order: 2; }
.field__hint { order: 4; margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.field__error { order: 5; margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--danger); }
.input {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--ctl); border-radius: 0;
  background: transparent; font-size: 17px; line-height: 24px; font-weight: 400; color: var(--ink); outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { min-height: 96px; padding: 12px 0; resize: none; }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus { border-bottom-color: var(--accent-ink); box-shadow: 0 1px 0 0 var(--accent-ink); }
.select {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 48px; margin: 0; padding: 0;
  border: 0; border-bottom: 1px solid var(--ctl); border-radius: 0; background: none;
  font-size: 17px; line-height: 24px; text-align: left; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select.is-empty .select__value { color: var(--ink-3); }
.select .icon { color: var(--ink-2); }
.select:focus-visible { outline: none; border-bottom-color: var(--accent-ink); box-shadow: 0 1px 0 0 var(--accent-ink); }
.field:focus-within .field__label { color: var(--ink); }
.field--error .input, .field--error .select, .field--error .input:focus { border-bottom-color: var(--danger); box-shadow: 0 1px 0 0 var(--danger); }
.field--error .field__label { color: var(--danger); }

.check { display: flex; align-items: flex-start; gap: 14px; padding: 4px 0; cursor: pointer; }
.fields .check { padding: 12px 0 0; }
.check__box {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-top: -1px; border-radius: 3px;
  background: transparent; border: 1.5px solid var(--ctl); color: var(--on-accent); transition: background 0.15s, border-color 0.15s;
}
.check__input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check__input:focus-visible + .check__box { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.check__text { flex: 1; min-width: 0; font-size: 14px; line-height: 22px; color: var(--ink-2); }
.check__text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.field--error .check__box { border-color: var(--danger); }

.consent { margin: 32px 0 0; padding: 0; }
.consent .field { margin-top: 0; }
.consent .field + .field { margin-top: 16px; }
.consent__more { margin: 4px 0 0 38px; font-size: 13px; line-height: 20px; color: var(--ink-2); }
.consent__more a, .consent__more .link-btn { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.consent__more .link-btn { min-height: 28px; padding: 0; font-size: 13px; font-weight: 400; }
.consent__more a:hover, .consent__more .link-btn:hover, .check__text a:hover { text-decoration-color: var(--accent-ink); }
.consent__text { margin: 8px 0 0 38px; padding: 4px 0 4px 14px; border-left: 2px solid var(--line-strong); font-size: 13px; line-height: 20px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
#form-banner:empty { display: none; }
.form { padding-bottom: 8px; }

.notice {
  display: flex; align-items: flex-start; gap: 12px; margin: 24px 0 0; padding: 12px 14px;
  border-left: 2px solid var(--accent); background: var(--surface-2); color: var(--ink); font-size: 14px; line-height: 21px;
}
.notice .icon { margin-top: 1px; color: var(--accent-ink); }
.notice--info { border-left-color: var(--accent); }
.notice--warn { border-left-color: var(--warn-line); }
.notice--warn .icon { color: var(--warn-ink); }
.notice--error { border-left-color: var(--danger); background: var(--danger-bg); }
.notice--error .icon { color: var(--danger); }
.notice__body { flex: 1; min-width: 0; }
.notice__body a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.notice__action { margin-top: 8px; }

/* ---------- Нижняя панель действий ---------- */
.actionbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px max(24px, calc((100% - 512px) / 2)) calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); border-top: 1px solid var(--line);
}
.actionbar__sum { flex: 1; min-width: 0; }
.actionbar__small { display: block; font-size: 11.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actionbar__strong { display: block; margin-top: 1px; font-family: var(--serif); font-size: 18px; line-height: 24px; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.actionbar .btn { flex: none; }
.actionbar--solo .actionbar__sum { display: none; }
.actionbar--solo .btn { flex: 1; }
.actionbar--stack { flex-direction: column; align-items: stretch; gap: 8px; }
.actionbar--stack .btn { flex: none; }
.actionbar__pair { display: flex; gap: 8px; }
.actionbar__pair .btn { flex: 1; min-height: 48px; padding: 0 12px; }

/* ---------- Страница записи (управление) ---------- */
.pagebar { padding: env(safe-area-inset-top, 0px) 24px 0; border-bottom: 1px solid var(--line); }
.pagebar__back { display: inline-flex; align-items: center; gap: 4px; min-height: 56px; max-width: 100%; margin-left: -6px; padding-right: 12px; font-size: 15px; color: var(--ink-2); }
.pagebar__back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .pagebar__back:hover { color: var(--ink); } }
.status { padding: 40px 0 8px; animation: fade 0.35s ease both; }
.status__badge { display: block; margin-bottom: 16px; color: var(--accent-ink); }
.status__badge .icon { width: 32px; height: 32px; stroke-width: 1.6; }
.status__title { margin: 12px 0 0; font-family: var(--serif); font-weight: 480; font-size: 36px; line-height: 1.1; letter-spacing: -0.012em; }
.status__badge + .status__title { margin-top: 0; }
.status__text { max-width: 36ch; margin-top: 12px; font-size: 16px; line-height: 24px; color: var(--ink-2); }
.badge { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.badge--ok { color: var(--accent-ink); }
.badge--off { color: var(--danger); }

/* Квитанция: тёплая плашка с верхней линией, "Когда" крупно и первой */
.detail { display: flex; flex-direction: column; margin-top: 32px; padding: 0 20px 4px; background: var(--surface-2); border-top: 2px solid var(--rule); border-bottom: 1px solid var(--line); }
.detail__row { display: block; min-height: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.detail__row--when { order: -1; border-top: 0; }
.detail .avatar, .detail__icon { display: none; }
.detail__label { margin-bottom: 2px; font-size: 11.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.detail__value { font-size: 16px; line-height: 24px; font-weight: 400; overflow-wrap: anywhere; }
/* Дата и время: одна антиквенная строка "Четверг, 8 октября, 10:30", ниже мелко "до 11:00, UTC+3".
   Части (.when__*) складываются порядком flex, запятые рисуют псевдоэлементы */
.when__vis { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.28em; }
.when__weekday, .when__dm, .when__start { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; font-variant-numeric: lining-nums; }
.when__weekday { order: 1; }
.when__weekday:not(:last-child)::after, .when__dm:has(~ .when__start)::after { content: ","; }
.when__dm { order: 2; }
.when__start { order: 3; }
.when__vis::after { content: ""; order: 4; flex-basis: 100%; height: 0; }
.when__end, .when__tz { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.when__end { order: 5; }
.when__end::before { content: "до "; }
.when__end:not(:last-child)::after { content: ","; }
.when__tz { order: 6; }
.detail__sub { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.manage-msg:empty { display: none; }
.manage-msg { margin-top: 8px; }
.page--manage .notice { margin-top: 24px; }
.resched { margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--line); animation: fade 0.28s ease both; }
.resched .step-title { margin-top: 24px; font-size: 28px; }
.resched__actions { margin-top: 24px; }

/* ---------- Документы и служебные страницы ---------- */
.doc__title { margin: 32px 0 20px; font-family: var(--serif); font-weight: 480; font-size: 32px; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; }
.doc__body { padding: 24px 0 8px; border-top: 2px solid var(--rule); }
.doc__body p { font-family: var(--serif); font-size: 16.5px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.doc__body p + p { margin-top: 14px; }
.err { padding: 96px 24px 24px; text-align: left; }
.err__art { display: block; width: 48px; height: 2px; margin-bottom: 28px; background: var(--rule); }
.err__art .icon { display: none; }
.err__title { font-family: var(--serif); font-weight: 480; font-size: 36px; line-height: 1.1; letter-spacing: -0.012em; text-wrap: balance; }
.err__text { max-width: 36ch; margin: 12px 0 32px; font-size: 16px; line-height: 24px; color: var(--ink-2); }

/* ---------- Листы ---------- */
.sheet-backdrop { background: var(--scrim); animation: fade 0.2s ease both; }
.sheet {
  background: var(--surface); color: var(--ink); border-top: 2px solid var(--rule); border-radius: 0;
  box-shadow: var(--shadow-pop); animation: sheet-up 0.26s ease both;
}
.sheet__head { padding: 12px 10px 4px 24px; }
.sheet__title { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 26px; overflow-wrap: anywhere; }
.sheet__body { padding: 8px 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.sheet__actions { display: grid; gap: 8px; margin-top: 24px; }
.sheet__text { font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.sheet__text p + p { margin-top: 10px; }
.sheet__text a { text-decoration: underline; text-underline-offset: 3px; }
.options { margin: 0; border-top: 1px solid var(--line); }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 0;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
  font-size: 16px; text-align: left; color: var(--ink);
}
.option:hover, .option:focus-visible { color: var(--accent-ink); outline-offset: -2px; }
.option[aria-selected="true"] { color: var(--accent-ink); font-weight: 600; }
@media (min-width: 600px) { .sheet { animation-name: pop-in; border: 1px solid var(--line-strong); border-top: 2px solid var(--rule); } }

/* ---------- Широкий экран: слева название и контакты (закреплены), справа список специалистов ---------- */
@media (min-width: 960px) {
  .minibar { display: none; }
  .page--org {
    display: grid; grid-template-columns: clamp(400px, 39%, 640px) 1fr; max-width: none; margin: 0; min-height: 100vh; align-items: start;
  }
  .page--org .hero { display: flex; flex-direction: column; padding: 40px 56px 40px 80px; }
  .page--org .hero__top { min-height: 0; padding: 0; border-bottom: 0; }
  .page--org .hero__title, .page--org .hero__desc, .page--org .contacts, .page--org .howto { margin-left: 0; margin-right: 0; }
  .page--org .hero__title { margin-top: 56px; font-size: clamp(38px, 3.3vw, 52px); line-height: 1.04; letter-spacing: -0.018em; }
  .page--org .hero__title::before { margin-bottom: 16px; }
  .page--org .hero__desc { margin-top: 24px; font-size: 18px; line-height: 28px; max-width: 32ch; }
  .page--org .contacts { margin-top: 32px; }
  .howto { display: block; margin-top: 32px; }
  .howto__title { font-family: var(--font); font-size: 11.5px; line-height: 16px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
  .howto__list { margin-top: 8px; }
  .howto__list li { display: flex; align-items: baseline; gap: 16px; padding: 6px 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
  .howto__num { flex: none; width: 20px; font-family: var(--serif); font-size: 18px; line-height: 20px; font-weight: 500; color: var(--accent-ink); font-variant-numeric: lining-nums; }
  .page--org .content { min-height: 100vh; padding: 134px 96px 48px 80px; border-left: 1px solid var(--line); }
  .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 0 0 20px; }
  .section-title { font-size: 32px; }
  .section-sub { margin: 0; font-size: 11.5px; line-height: 16px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; }
  .spec { display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 28px; align-items: center; padding: 40px 0; }
  .spec__head { grid-column: 1; grid-row: 1; gap: 28px; }
  .spec__about { grid-column: 1 / -1; grid-row: 2; margin-left: 100px; }
  .spec__near { grid-column: 2; grid-row: 1; margin: 0; }
  .spec--idle .spec__near { align-self: center; }
  .spec .avatar { width: 72px; height: 72px; font-size: 24px; }
  .spec__name { font-size: 26px; line-height: 1.18; }
  .spec__title { margin-top: 8px; }
  .spec__head .icon-btn { margin-right: 0; }
  .spec__near-label { font-size: 13px; }
  .chips { margin-left: -10px; }
  .page--org + .foot { padding-left: 80px; padding-right: 96px; }
  .page--org + .foot .foot__links, .page--org + .foot .foot__sign { max-width: none; }
}
@media (min-width: 960px) and (min-height: 760px) {
  .page--org .hero { position: sticky; top: 0; min-height: 100vh; }
  .howto { margin-top: auto; padding-top: 40px; }
}
