@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/ibmplex-cyrillic-400.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/ibmplex-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/ibmplex-cyrillic-500.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/ibmplex-latin-500.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/ibmplex-cyrillic-700.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/ibmplex-latin-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Стиль "window" (Одно окно): запись на одном экране, концепт B. IBM Plex Sans, табличные цифры, плоские карточки с
   тонкой внутренней линией, один акцент на кнопке, выбранном и ближайшем времени. Специалист без фото - знак УП.Среды (контурный куб в
   круге цвета акцента), фото встаёт в тот же круг.
   Телефон: шапка организации, карточки специалистов, пошаговая запись с нижней полосой сводки.
   Широкий экран (от 1024px): страница организации - колонка организации слева, справа шаги записи по одному и
   закреплённая сводка "Ваша запись" (блок .wd, org-window.js); остальные страницы остаются в одной колонке. Цвета только через переменные. Светлую тему задаёт этот файл (акцент УП.Среды),
   "тёмную" и "фирменную" досчитывает сервер блоком <style nonce> (theme.py), здесь дополнены те переменные, которых он не
   задаёт. Фирменный цвет - только акцент организации из настроек, от логотипа цвет не берётся. */

/* ---------- Переменные: светлая тема ---------- */
:root,
html[data-theme="light"],
html[data-theme="brand"] {
  color-scheme: light;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
  --gut: 16px;
  --bg: #F4F5F4; --bg-deep: #ECEEED; --surface: #FFFFFF; --surface-2: #F8F9F8; --surface-3: #E8EBE9; --plate: #FFFFFF;
  --line: #E0E4E2; --line-strong: #C3CAC6;
  --ink: #131716; --ink-2: #454E4A; --ink-3: #5C6662;
  --accent: #2E7D32; --accent-hover: #1B5E20; --on-accent: #FFFFFF; --accent-ink: #2E7D32;
  --accent-soft: color-mix(in srgb, var(--accent) 8%, #FFFFFF); --accent-soft-ink: #1B5E20;
  --accent-line: color-mix(in srgb, var(--accent) 40%, #FFFFFF);
  --focus: #1B5E20;
  --danger: #B3261E; --danger-solid: #B3261E; --on-danger: #FFFFFF;
  --warn: #8A5A00;
  --scrim: rgba(19, 23, 22, 0.5);
  --logo-ring: rgba(19, 23, 22, 0.08); --logo-shadow: 0 6px 16px -6px rgba(19, 23, 22, 0.28); --logo-pad: 0px;
  --card-shadow: 0 1px 2px rgba(15, 25, 20, 0.04);
}
/* Фирменная: нейтральные тона и акцент приходят с сервера; серый для пустых плашек подтягиваем к акценту */
html[data-theme="brand"][data-design="window"] {
  --surface-3: color-mix(in srgb, var(--accent) 12%, #FFFFFF);
  --accent-soft-ink: var(--accent-ink);
  --focus: var(--accent-ink);
  --logo-ring: rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --surface-3: #262D2B; --plate: #F4F5F4;
  --ink: #EEF1F0; --ink-2: #B7C0BC; --ink-3: #9AA5A1;
  --focus: var(--accent-ink);
  --danger: #FF8A80; --danger-solid: #C62828;
  --warn: #E0A53A;
  --scrim: rgba(0, 0, 0, 0.7);
  --logo-ring: rgba(255, 255, 255, 0.18); --logo-shadow: none; --logo-pad: 4px;
  --card-shadow: none;
}
/* Служебные страницы (404, ошибки) не знают тему организации и идут за системной */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --bg: #0E1110; --bg-deep: #0A0D0C; --surface: #161A19; --surface-2: #1B2120; --surface-3: #262D2B; --plate: #F4F5F4;
    --line: #272E2C; --line-strong: #3B4441;
    --ink: #EEF1F0; --ink-2: #B7C0BC; --ink-3: #9AA5A1;
    --accent: #7FC184; --accent-hover: #9AD39E; --on-accent: #0A130B; --accent-ink: #7FC184;
    --accent-soft: color-mix(in srgb, var(--accent) 14%, #161A19); --accent-soft-ink: #BFE3C2;
    --accent-line: color-mix(in srgb, var(--accent) 45%, #161A19);
    --focus: #9AD39E;
    --danger: #FF8A80; --danger-solid: #C62828;
    --warn: #E0A53A;
    --scrim: rgba(0, 0, 0, 0.7);
    --logo-ring: rgba(255, 255, 255, 0.18); --logo-shadow: none; --logo-pad: 4px; --card-shadow: none;
  }
}

/* ---------- Основа ---------- */
body {
  font-family: var(--font); font-size: 15px; line-height: 1.4; color: var(--ink); background: var(--bg);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html { background: var(--bg); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.icon { stroke-width: 1.7; }
.page { max-width: 640px; margin: 0 auto; }
.content { padding: 0 var(--gut) 8px; }
.muted { color: var(--ink-2); }
.group, .card { background: none; border: 0; border-radius: 0; box-shadow: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: var(--r-md); font-size: 15.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-decoration: none;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost { background: none; color: var(--ink-2); }
.btn--danger { color: var(--danger); }
.btn--danger-fill { background: var(--danger-solid); color: var(--on-danger); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--surface-3); color: var(--ink-3); box-shadow: none; cursor: default; }
@media (hover: hover) {
  .btn--primary:not([disabled]):hover { background: var(--accent-hover); }
  .btn--secondary:not([disabled]):hover { background: var(--surface-2); }
}
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-md);
  background: none; color: var(--ink); text-decoration: none;
}
.icon-btn--round { box-shadow: inset 0 0 0 1px var(--line-strong); }
.icon-btn[disabled] { color: var(--line-strong); }
@media (hover: hover) { .icon-btn:not([disabled]):hover { background: var(--surface-3); } }
.link-btn {
  min-height: 44px; padding: 0 8px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--accent-ink); cursor: pointer;
}
.spinner { border-radius: 50%; }

/* ---------- Лицо организации: логотип (скруглён как значок приложения) или инициал на акценте ---------- */
.brand { display: flex; align-items: center; min-width: 0; }
.brand__plate {
  display: inline-block; align-self: flex-start; padding: var(--logo-pad); line-height: 0; background: var(--plate);
  border-radius: calc(17px + var(--logo-pad)); box-shadow: var(--logo-shadow);
}
html:not([data-theme="dark"]) .brand__plate { background: none; }
.brand__logo { width: auto; height: auto; max-width: 220px; max-height: 64px; border-radius: 14px; box-shadow: 0 0 0 1px var(--logo-ring); }
.brand__mark {
  display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 17px; background: var(--accent); color: var(--on-accent);
  box-shadow: var(--logo-shadow); font-size: 30px; font-weight: 700; line-height: 1;
}
/* На телефоне логотип и инициал меньше: 64px съедали первый экран */
@media (max-width: 1023px) {
  .brand__plate { border-radius: calc(13px + var(--logo-pad)); }
  .brand__logo { max-height: 44px; max-width: 180px; border-radius: 10px; }
  .brand__mark { width: 48px; height: 48px; border-radius: 13px; font-size: 23px; }
}

/* ---------- Аватар специалиста: круг с тонким кольцом, мягкая заливка акцентом, внутри куб УП.Среды. Фото - в тот же круг ---------- */
.avatar {
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 50%;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-line);
  line-height: 1; color: var(--accent-ink);
}
html[data-theme="dark"] .avatar { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.avatar:has(> img) { background: var(--surface-3); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .icon { width: 52%; height: 52%; stroke-width: 1.5; }
.who .avatar, .detail__row > .avatar, .avatar--sm { width: 40px; height: 40px; font-size: 15px; }

/* ---------- Организация: шапка ---------- */
.hero { padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 26px; }
.hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 -8px 14px 0; }
.hero__actions { display: flex; gap: 8px; }
.hero__title { font-size: 26px; line-height: 1.15; letter-spacing: -0.018em; text-wrap: balance; overflow-wrap: anywhere; }
.hero__desc { margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.contacts { display: grid; gap: 7px; margin-top: 14px; }
.contact { display: flex; align-items: center; gap: 10px; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.contact__icon { display: grid; place-items: center; flex: none; }
.contact__label { display: none; }
.contact__value { overflow-wrap: anywhere; }
.howto { display: none; }

.section-head { margin: 4px 0 14px; }
.section-title { font-size: 23px; line-height: 1.15; letter-spacing: -0.015em; }
.section-sub { margin-top: 4px; font-size: 14px; color: var(--ink-2); }

.minibar { background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); transition: transform 0.15s, visibility 0.15s; }
.minibar__in { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 var(--gut); max-width: 640px; margin: 0 auto; }
.minibar__name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Специалисты: карточки с ближайшим временем ---------- */
.spec-list { display: grid; gap: 10px; margin: 0; }
.spec {
  display: flex; flex-direction: column; gap: 14px; padding: 16px 14px; border-radius: var(--r-md); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--card-shadow);
}
.spec__head { display: flex; align-items: flex-start; gap: 14px; }
.spec__avatar { display: block; flex: none; }
.spec__who { flex: 1; min-width: 0; }
.spec__name { font-size: 16px; line-height: 1.25; font-weight: 650; text-wrap: balance; overflow-wrap: anywhere; }
.spec__title { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
.spec__head .icon-btn { width: 32px; height: 32px; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); position: relative; }
.spec__head .icon-btn::after { content: ""; position: absolute; inset: -6px; }
.spec__head .icon-btn .icon { width: 17px; height: 17px; }
.spec__head .icon-btn[aria-expanded="true"] { background: var(--surface-3); }
.about { margin-top: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.spec__about .about { margin-top: 0; }
.spec__near-label { margin-bottom: 8px; font-size: 12.5px; color: var(--ink-2); }
.near__full { display: inline; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chip {
  display: grid; place-items: center; height: 40px; border-radius: var(--r-sm); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14.5px; font-weight: 550; color: var(--ink);
}
.chip:nth-child(n+5) { display: none; }
@media (hover: hover) { .chip:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); } }
.spec__all { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.spec__cta { display: none; }
.no-slots { margin-bottom: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.card.empty, .empty {
  padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); font-size: 13px; line-height: 1.45; color: var(--ink-2);
}
.empty__icon { display: none; }
.empty__title { margin-bottom: 4px; font-size: 14.5px; font-weight: 650; color: var(--ink); }

.foot {
  max-width: 640px; margin: 24px auto 0; padding: 16px var(--gut) calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
}
.foot a { text-decoration: underline; text-underline-offset: 2px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.page .foot { max-width: none; margin: 24px 0 0; padding-left: var(--gut); padding-right: var(--gut); }
.page--org .foot, .page--org + .foot { padding-left: 20px; padding-right: 20px; }

/* ---------- Запись: шапка шага, лента шагов, карточка специалиста ---------- */
.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) 8px 0; }
.flow-head__title { min-width: 0; padding-left: 4px; }
.flow-head__name { font-size: 14px; line-height: 1.3; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-head__step { font-size: 12px; line-height: 1.3; color: var(--ink-3); }
.flow-head .icon-btn--round { box-shadow: none; }
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 0 var(--gut); }
.stepper li { position: relative; min-width: 0; padding-top: 7px; font-size: 11.5px; line-height: 1.3; color: var(--ink-3); white-space: nowrap; }
.stepper__bar { position: absolute; top: 0; right: 0; left: 0; height: 3px; border-radius: 2px; background: var(--line-strong); }
.stepper li.is-done .stepper__bar, .stepper li.is-current .stepper__bar { background: var(--accent); }
.stepper li.is-done { color: var(--ink-2); cursor: pointer; }
.stepper li.is-current { color: var(--ink); font-weight: 650; }
.stepper__label { overflow: hidden; text-overflow: ellipsis; }

.page--flow .content { padding-top: 14px; }
.page--flow .foot { display: none; }
.who { margin: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.who__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 12px 6px 12px 14px; }
.who__text { min-width: 0; }
.who__name { font-size: 14.5px; line-height: 1.3; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__sub { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__act { flex: none; }
.who__act .link-btn { margin: -12px 0; }
.who__more { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-top: 1px solid var(--line); background: none; font-size: 13px; font-weight: 600; color: var(--accent-ink); text-align: left; }
.who__more .icon { transition: transform 0.15s; }
.who__more[aria-expanded="true"] .icon { transform: rotate(180deg); }
.who .about { margin: 0 12px 12px; }

.stage { outline: none; }
.stage.enter { animation: fade 0.15s ease both; }
.step-title { margin: 20px 0 14px; font-size: 23px; line-height: 1.15; letter-spacing: -0.015em; }
.step-title--quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Услуги: карточка с крупной длительностью и ценой-меткой */
.services { display: grid; gap: 10px; }
.cat { margin: 4px 0 -2px 2px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.service { display: block; padding: 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.service.is-selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.service:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.service__input { top: 14px; right: 14px; left: auto; }
.service__radio { position: absolute; top: 14px; right: 14px; display: none; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: var(--on-accent); }
.service.is-selected .service__radio { display: grid; }
.service__radio .icon, .check__box .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.service__main { display: flex; flex-direction: column; gap: 12px; }
.service__name { display: block; padding-right: 30px; font-size: 16px; line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; }
.service__desc { display: block; margin-top: -6px; font-size: 13px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.service__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pill { display: inline-flex; align-items: center; font-size: 13px; color: var(--ink-2); }
.pill .icon { display: none; }
.svc__dur { align-items: baseline; gap: 5px; }
.svc__dur-num { font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.svc__price {
  padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line);
  font-size: 12.5px; font-weight: 600; color: var(--accent-ink); white-space: nowrap;
}
.service.is-selected .svc__price { background: var(--surface); }

/* Дата: сетка месяца; день со временем отмечен точкой, сегодня - чертой под числом, как в календаре */
.cal__head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 14px 0 4px; }
.cal__title { font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
.cal__nav { gap: 2px; }
.cal__nav-btn { color: var(--ink-2); }
.cal__nav-btn[disabled] { color: var(--line-strong); }
.cal__dow span { display: grid; place-items: center; height: 28px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.cal--month .cal__days { gap: 2px 0; }
.day {
  position: relative; display: grid; place-items: center; height: 44px; margin: 0 1px; padding: 0; border: 0; border-radius: 9px;
  background: none; font-size: 15.5px; font-weight: 400; color: var(--ink-3);
}
.day__dow { display: none; }
.day--avail { font-weight: 600; color: var(--ink); }
.day--avail::after { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: 0.6; }
.day--today { font-weight: 700; color: var(--ink); }
.day--today::after { content: ""; position: absolute; bottom: 5px; width: 14px; height: 2px; border-radius: 1px; background: var(--ink); opacity: 1; }
.day--sel, .day--sel:hover { background: var(--accent); color: var(--on-accent); font-weight: 650; }
.day--sel::after { display: none; }
.day[disabled] { cursor: default; }
@media (hover: hover) { .day--avail:not(.day--sel):hover { background: var(--surface-3); } }
.cal__skel .day { color: transparent; background: var(--surface-3); }
.cal__skel .day::after { display: none; }
.tz-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

/* Время: группы Утро, День, Вечер */
.times__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.times__title { font-size: 15px; line-height: 1.3; font-weight: 650; letter-spacing: 0; }
.times__count { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.slot-group { margin-bottom: 16px; }
.slot-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); }
.slot-group__head .icon { display: none; }
.slot-group__range { margin-left: auto; font-weight: 400; color: var(--ink-3); }
.slot-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot {
  display: grid; place-items: center; min-height: 44px; padding: 0; border: 0; border-radius: var(--r-sm); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14.5px; font-weight: 550; color: var(--ink);
}
@media (hover: hover) { .slot:not(.is-selected):not([disabled]):hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); } }
.slot[disabled], .slot.is-taken { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); font-weight: 400; text-decoration: line-through; text-decoration-color: var(--line-strong); }
.slot.is-selected { background: var(--accent); color: var(--on-accent); box-shadow: none; font-weight: 650; }
.skeleton { background-image: linear-gradient(90deg, var(--surface-3) 25%, var(--line) 50%, var(--surface-3) 75%); border-radius: var(--r-sm); }
.skeleton--slot { height: 44px; }
.times__title .skeleton--slot { width: 60%; height: 20px; }

/* ---------- Форма ---------- */
.fields { margin-top: 2px; }
.field { display: flex; flex-direction: column; margin-bottom: 12px; }
.field__label { order: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--ink-2); }
.field__opt { flex: none; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.field__opt--inline { margin-left: 4px; }
.field .input, .field .select { order: 2; }
.field__hint { order: 4; margin-top: 5px; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.field__error { order: 5; margin-top: 6px; font-size: 12.5px; line-height: 1.4; font-weight: 500; color: var(--danger); }
.input, .select {
  display: block; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: var(--r-md); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); font-size: 16px; line-height: 22px; outline: none;
  -webkit-appearance: none; appearance: none;
}
.select { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
textarea.input { min-height: 96px; padding: 12px 14px; resize: none; }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.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); }
.input:focus, .select:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.field--error .input, .field--error .select, .field--error .input:focus { box-shadow: inset 0 0 0 2px var(--danger); }
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; column-gap: 12px; min-height: 44px; padding: 6px 0; cursor: pointer; }
.check__input { top: 6px; left: 0; }
.check__box { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--on-accent); }
.check__input:checked + .check__box { background: var(--accent); box-shadow: none; }
.check__input:focus-visible + .check__box { outline: 2px solid var(--focus); outline-offset: 2px; }
.check__text { font-size: 13px; line-height: 1.4; color: var(--ink); }
.field--error .check__box { box-shadow: inset 0 0 0 2px var(--danger); }
.consent { margin: 12px 0 20px; }
.consent .field { margin-bottom: 4px; }
.consent__more { margin: 4px 0 8px 36px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.consent__more a, .consent .check__text a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent__more .link-btn { min-height: 28px; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent__text { margin: 0 0 8px 36px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
#form-banner:empty { display: none; }

.notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14px; line-height: 1.45; color: var(--ink); }
.notice .icon { margin-top: 1px; }
.notice--info { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.notice--warn { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); box-shadow: inset 0 0 0 1px var(--warn); }
.notice--error { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); box-shadow: inset 0 0 0 1px var(--danger); color: var(--danger); font-weight: 500; }
.notice__body { flex: 1; min-width: 0; }
.notice__body a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.notice__action { margin-top: 8px; }

/* ---------- Нижняя полоса сводки: выбранное слева, главная кнопка справа ---------- */
.actionbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(var(--gut), calc((100% - 640px) / 2)) calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--line);
}
.actionbar__sum { display: flex; flex-direction: column-reverse; flex: 1; min-width: 0; }
.actionbar__small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actionbar__strong { display: block; font-size: 14.5px; line-height: 1.3; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actionbar .btn { flex: none; padding: 0 20px; }
.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: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actionbar__pair .btn { padding: 0 12px; }

/* ---------- Запись у клиента ---------- */
.pagebar { display: flex; align-items: center; min-height: 56px; padding: env(safe-area-inset-top, 0px) var(--gut) 0; }
.pagebar__back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; max-width: 100%; margin-left: -8px; padding: 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.pagebar__back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { padding: 14px 0 0; }
.status__badge { margin-bottom: 4px; }
.status__badge--ok { display: grid; place-items: center; width: 56px; height: 56px; margin-top: 4px; border-radius: 16px; background: var(--accent); color: var(--on-accent); }
.status__badge--ok .icon { stroke-width: 2.2; }
.status__title { margin-top: 18px; font-size: 23px; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
.status__badge:not(.status__badge--ok) + .status__title, .badge + .status__title { margin-top: 10px; }
.status__text { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; background: var(--surface-3); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.badge--ok { background: var(--accent-soft); color: var(--accent-soft-ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.badge--off { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.group.detail { margin-top: 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.detail__row { display: flex; gap: 14px; padding: 13px 14px; }
.detail__row + .detail__row { border-top: 1px solid var(--line); }
/* Значок строки шириной с аватар специалиста (40px): подписи всех строк начинаются с одной линии */
.detail__icon { display: grid; place-items: center; flex: none; width: 40px; margin-top: 2px; color: var(--accent-ink); }
.detail__text { flex: 1; min-width: 0; }
.detail__label { font-size: 12px; color: var(--ink-3); }
.detail__value { margin-top: 1px; font-size: 15px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.detail__sub { margin-top: 1px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
/* Дата и время: "Понедельник, 12 октября, 10:30", ниже мелко "до 11:00, UTC+3". Части складываются порядком flex,
   запятые и "до" рисуют псевдоэлементы */
.when__vis { display: flex; flex-wrap: wrap; align-items: baseline; margin-top: 1px; font-size: 15px; line-height: 1.35; font-weight: 600; }
.when__weekday { order: 1; margin-right: 0.28em; }
.when__weekday::first-letter { text-transform: uppercase; }
.when__weekday::after { content: ","; }
.when__dm { order: 2; margin-right: 0.28em; }
.when__dm::after { content: ","; }
.when__start { order: 3; }
.when__vis::after { content: ""; order: 4; flex-basis: 100%; height: 0; }
.when__end { order: 5; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.when__end::before { content: "до "; }
.when__tz { order: 6; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.when__tz::before { content: ", "; white-space: pre; }
.manage-msg:empty { display: none; }
.manage-msg, .page--manage .notice { margin-top: 14px; }
.page--manage .notice { margin-bottom: 0; }
.resched { margin-top: 18px; }
.resched__actions { margin-top: 14px; }

/* ---------- Документы и служебные страницы ---------- */
.doc__title { margin: 14px 0 14px; font-size: 26px; line-height: 1.15; letter-spacing: -0.018em; }
.doc__body { padding: 0; }
.doc__body p { font-size: 14.5px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.doc__body p + p { margin-top: 12px; }
.err { padding: 56px var(--gut) 24px; }
.err__art { display: none; }
.err__title { font-size: 26px; line-height: 1.15; letter-spacing: -0.018em; }
.err__text { max-width: 36ch; margin: 10px 0 24px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.page--error .foot { margin-top: 40px; }

/* ---------- Листы ---------- */
.sheet-backdrop { background: var(--scrim); animation: fade 0.15s ease both; }
.sheet { background: var(--surface); color: var(--ink); border-radius: var(--r-lg) var(--r-lg) 0 0; animation: sheet-up 0.2s ease both; }
.sheet__head { padding: 8px 4px 8px 20px; border-bottom: 1px solid var(--line); }
.sheet__title { font-size: 17px; line-height: 22px; overflow-wrap: anywhere; }
.sheet__body { padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
.sheet__actions { display: grid; gap: 10px; margin-top: 18px; }
.calmenu__link { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.calmenu li:last-child .calmenu__link { border-bottom: 0; color: var(--accent-ink); }
@media (hover: hover) { .calmenu__link:hover { background: var(--surface-2); } }
.sheet__text { font-size: 14.5px; 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: 2px; }
.options { display: block; margin: 0 -20px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 20px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 16px; text-align: left; color: var(--ink); }
.option:hover, .option:focus-visible { background: var(--surface-2); }
.option:focus-visible { outline-offset: -2px; }
.option[aria-selected="true"] { font-weight: 650; }
.option[aria-selected="true"] .icon { color: var(--accent-ink); stroke-width: 2.2; }
@media (min-width: 600px) { .sheet { border-radius: var(--r-lg); animation-name: pop-in; } }


/* ======================================================================================================
   Запись по шагам (концепт v5): блок .wd из org_window.html, шаги строит org-window.js на любой ширине.
   Телефон: организация сверху, шаги в одну колонку, сводка полосой снизу после первого выбора.
   От 1024px: организация слева, справа три шага и закреплённая сводка "Ваша запись". Общая разметка .page--org скрыта.
   ====================================================================================================== */
.page--org, .page--org + .foot, .minibar { display: none; }
.wd { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.wd__org { display: contents; }
.wd__brand { order: 1; padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 0; }
.wd__title { order: 2; padding: 0 20px; margin-top: 16px; font-size: 26px; line-height: 1.15; letter-spacing: -0.018em; text-wrap: balance; overflow-wrap: anywhere; }
.wd__desc { order: 3; padding: 0 20px; margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.wd__contacts { order: 4; display: grid; gap: 4px; padding: 14px 20px 0; }
.wd__stage { order: 5; padding: 22px var(--gut) 28px; }
.wd__foot { order: 6; display: flex; flex-direction: column; gap: 6px; padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.wd__foot a { align-self: flex-start; text-decoration: underline; text-underline-offset: 2px; }
.wd-ct { display: flex; align-items: center; gap: 12px; padding: 4px 0; font-size: 14px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.wd-ct small { display: none; }
.wd-ct__icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; color: var(--accent-ink); }
.wd__head h2 { font-size: 22px; line-height: 1.15; letter-spacing: -0.015em; }
.wd__head p { margin: 6px 0 16px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
/* На экране "Вы записаны" подсказка "Выберите специалиста, услугу и время" уже не к месту */
.wd__stage:has(.wd-panel.is-done) .wd__head p { display: none; }
.wd-noscript { padding: 20px; display: grid; gap: 8px; font-size: 15px; }
.wd-noscript a { text-decoration: underline; text-underline-offset: 3px; }

/* Полоса шагов */
.wd-prog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.wd-prog[hidden] { display: none; }
.wd-prog__i { position: relative; min-width: 0; padding-top: 9px; font-size: 11.5px; line-height: 1.3; color: var(--ink-3); }
.wd-prog__bar { position: absolute; top: 0; right: 0; left: 0; height: 3px; border-radius: 2px; background: var(--line-strong); }
.wd-prog__i.is-done .wd-prog__bar, .wd-prog__i.is-current .wd-prog__bar { background: var(--accent); }
.wd-prog__i.is-done { color: var(--ink-2); }
.wd-prog__i.is-link { cursor: pointer; }
.wd-prog__i.is-current { color: var(--ink); font-weight: 700; }
.wd-prog__t { display: block; overflow-wrap: anywhere; }
/* На телефоне подписи шагов короткие ("Специалист"), чтобы все три стояли в одну строку */
.wd-prog__short { display: none; }
@media (max-width: 599px) {
  .wd-prog__full { display: none; }
  .wd-prog__short { display: inline; }
  .wd-prog__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Карточка шага: высота по содержимому, Назад и Далее под ней */
.wd-layout[hidden], .wd-donecard[hidden], .wd-bar[hidden] { display: none; }
.wd-layout { display: block; }
.wd-main { min-width: 0; }
.wd-card { border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--card-shadow); }
.wd-card__body { padding: 18px 16px 8px; }
.wd-card__h { margin-bottom: 14px; font-size: 22px; line-height: 1.15; letter-spacing: -0.015em; }
.wd-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 16px; }
.wd-back[hidden] { display: none; }
.wd-nav > .wd-next { margin-left: auto; }
.wd-hint { padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); font-size: 13px; line-height: 1.45; color: var(--ink-2); }

/* Шаг 1: специалисты, раскрытие услуг плашками */
.wd-splist { display: grid; gap: 12px; }
.wd-sp { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.wd-sp.is-selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.wd-sp__top { display: flex; align-items: center; gap: 14px; }
.wd-sp__tx { flex: 1; min-width: 0; }
.wd-sp__name { font-size: 16.5px; line-height: 1.25; font-weight: 650; letter-spacing: 0; text-wrap: balance; }
.wd-sp__pick { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.wd-sp__pick::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); }
.wd-sp__pick:focus-visible { outline: none; }
.wd-sp__pick:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.wd-sp__role { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.wd-info { position: relative; z-index: 2; display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); cursor: pointer; }
.wd-info .icon { width: 17px; height: 17px; }
.wd-info[aria-expanded="true"] { background: var(--surface-3); }
.wd-sp__about { font-size: 13px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.wd-sp__near { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.wd-sp__label { flex: 1 1 100%; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.wd-sp__label b { font-weight: 650; color: var(--ink); }
.wd-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; flex: 1 1 100%; }
.wd-chip { position: relative; z-index: 2; display: grid; place-items: center; height: 40px; padding: 0; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14.5px; font-weight: 550; color: var(--ink); cursor: pointer; }
@media (hover: hover) { .wd-chip:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); } }
/* "Выбран" стоит на мягкой подложке выбранного специалиста: цвет текста для неё (в тёмной теме акцент давал 4.1:1) */
.wd-sp__ok { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-style: normal; font-size: 12.5px; font-weight: 650; color: var(--accent-soft-ink); }
.wd-svcb { padding-top: 14px; border-top: 1px solid var(--accent-line); }
.wd-cat { margin-bottom: 10px; font-size: 12.5px; font-weight: 650; color: var(--ink); }
.wd-svcs { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-svcs + .wd-cat { margin-top: 14px; }
.wd-svc {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 1 1 100%; min-width: 0; padding: 11px 16px;
  border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.wd-svc__name { font-size: 15.5px; line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; }
.wd-svc__meta { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.wd-svc.is-selected { background: var(--accent); box-shadow: none; color: var(--on-accent); }
/* Без прозрачности: при 0.88 белый на зелёном УП.Среды давал 4.4:1 - ниже нормы для мелкого текста */
.wd-svc.is-selected .wd-svc__meta { color: var(--on-accent); }
@media (hover: hover) { .wd-svc:not(.is-selected):hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); } }

/* Шаг 2: календарь и время, пикер даёт обе части */
.wd-when { display: grid; gap: 18px; }
.wd-when .cal__head { min-height: 36px; margin: 0 0 6px; }
.wd-when .cal__title { font-size: 16px; font-weight: 650; }
.wd-when .day { height: 40px; font-size: 14.5px; }
.wd-when .times__head { display: none; }
.wd-when .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wd-when .slot-group { margin-bottom: 14px; }
.wd-when .slot-group:last-child { margin-bottom: 0; }
.wd-tz { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

/* Шаг 3: анкета */
.wd-fgrid { display: grid; grid-template-columns: 1fr; gap: 2px 16px; }
.wd-fgrid .wd-full, .wd-fgrid .wd-half { min-width: 0; }
.wd-form .consent { margin: 8px 0 8px; }

/* Сводка: на телефоне полоса снизу после первого выбора */
.wd-sum { display: none; }
.wd-bar {
  position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gut) calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line);
}
.wd-bar__sum { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wd-bar__sum b { font-size: 14.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-bar__sum span { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-bar__btn { flex: none; }
.has-bar .wd-next { display: none; }
/* Полоса закреплена снизу: место под неё оставляем в конце страницы (после подвала), а не под карточкой, иначе она
   закрывала подвал (политика, оферта) и между карточкой и подвалом зияла пустота */
@supports selector(:has(*)) {
  body:has(.wd-panel.has-bar) { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@supports not selector(:has(*)) {
  .has-bar { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* Вы записаны */
.wd-donecard { padding: 22px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--card-shadow); }
.wd-done { display: grid; gap: 22px; align-items: start; }
.wd-done__tile { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--on-accent); }
.wd-done__tile .icon { stroke-width: 2.2; }
.wd-done__text { max-width: 44ch; margin-top: 16px; font-size: 15px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.wd-done__acts { display: grid; gap: 6px; max-width: 300px; margin-top: 20px; }
.wd-done__lnk { display: grid; place-items: center; min-height: 44px; font-size: 14px; font-weight: 650; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.wd-ticket { border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.wd-ticket__row { padding: 13px 14px; }
.wd-ticket__row + .wd-ticket__row { border-top: 1px solid var(--line); }
.wd-ticket__k { font-size: 12px; color: var(--ink-3); }
.wd-ticket__v { margin-top: 1px; font-size: 15px; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
.wd-ticket__s { margin-top: 1px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }

@media (min-width: 600px) {
  .wd-svc { flex: 0 1 auto; }
  .wd-fgrid { grid-template-columns: 1fr 1fr; }
  .wd-fgrid .wd-full { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .wd { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
  .wd__org { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 44px 28px 28px; }
  .wd__brand, .wd__title, .wd__desc, .wd__contacts, .wd__foot { order: 0; padding-left: 0; padding-right: 0; }
  .wd__brand { padding-top: 0; }
  .wd__title { margin-top: 28px; font-size: clamp(22px, 2.1vw, 30px); }
  .wd__desc { margin-top: 12px; font-size: 15px; line-height: 1.5; }
  .wd__contacts { gap: 12px; margin-top: 28px; padding-top: 0; }
  .wd-ct { gap: 12px; padding: 0; font-size: 15px; font-weight: 500; }
  .wd-ct small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); }
  .wd-ct__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .wd__foot { margin-top: auto; padding-top: 16px; padding-bottom: 0; border-top: 1px solid var(--line); }
  /* Шаги сверху, на одной высоте с колонкой организации: по центру экрана заголовок прыгал при каждой смене шага
     (у шагов разная высота) */
  .wd__stage { display: flex; flex-direction: column; justify-content: flex-start; min-height: 100vh; min-height: 100dvh; padding: 44px 32px 40px; }
  .wd__stage > * { width: 100%; max-width: 980px; }
  .wd__head h2 { font-size: 30px; line-height: 1.1; }
  .wd__head p { margin: 8px 0 22px; font-size: 15px; }
  .wd-prog { margin-bottom: 20px; }
  .wd-prog__i { font-size: 13.5px; }
  .wd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
  .wd-layout[hidden] { display: none; }
  .wd-card__body { padding: 24px 26px 10px; }
  .wd-card__h { margin-bottom: 18px; font-size: 24px; }
  /* Полоса Назад/Далее - часть карточки: стоит внутри её рамки (рамка карточки - внутренняя тень, фон полосы её
     перекрывал, и линия обрывалась у полосы), углы полосы на 1px меньше углов карточки */
  .wd-nav { margin: 14px 1px 1px; padding: 14px 25px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px); }
  .has-bar .wd-next { display: inline-flex; }
  .wd-bar { display: none; }
  body:has(.wd-panel.has-bar) { padding-bottom: 0; }
  .has-bar { padding-bottom: 0; }
  .wd-sum { display: block; position: sticky; top: 32px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--card-shadow); }
  .wd-sum__h { padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.2; }
  .wd-sum__r { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .wd-sum__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .wd-sum__pair .wd-sum__r { min-width: 0; }
  .wd-sum__k { margin-bottom: 4px; font-size: 12px; color: var(--ink-3); }
  .wd-sum__v { font-size: 14.5px; line-height: 1.3; font-weight: 650; overflow-wrap: anywhere; }
  .wd-sum__v.is-empty { font-weight: 400; color: var(--ink-3); }
  .wd-sum__s { margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
  .wd-sum__who { display: flex; align-items: center; gap: 10px; }
  .wd-sum__tz { padding-top: 12px; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
  .wd-donecard { padding: 28px 26px 32px; }
  .wd-done { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; }
}
@media (min-width: 1180px) {
  .wd { grid-template-columns: 340px minmax(0, 1fr); }
  .wd__stage { padding: 44px 40px 40px; }
  .wd-layout { grid-template-columns: minmax(0, 1fr) 296px; }
  .wd-when { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  .wd-sp__near { flex-wrap: nowrap; }
  .wd-sp__label { flex: none; }
  .wd-chips { flex: 0 1 300px; }
}

/* Блок записи внутри своей страницы (org_window.html без колонки организации): одна колонка по ширине места, которое дал автор */
.wd--bare, .wd--bare .wd__stage { display: block; min-height: 0; }
.wd--bare .wd__stage { padding: 0; }
.wd--bare .wd__stage > * { max-width: none; }
@media (min-width: 1024px) {
  .wd--bare { display: block; }
  .wd--bare .wd__stage { display: block; min-height: 0; padding: 0; }
}
