/* Onest со своего сервера: Google Fonts из России отвечает не всегда и это лишний внешний запрос. */
@font-face { font-family: "Onest"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Onest-Regular.woff2?v=1") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 500 600; font-style: normal; font-display: swap; src: url("/fonts/Onest-SemiBold.woff2?v=1") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/Onest-Bold.woff2?v=1") format("woff2"); }

:root {
  --icon-size: 24px;
  --icon-stroke: 1.8;
  --icon-inline-size: 16px;
  --control-face: 35px;
  --control-target: 44px;
  --control-inset: 4px;
  --control-inset-end: calc(var(--control-target) - var(--control-face) - var(--control-inset));
  --control-padding: 12px;
  --verified-badge-size: 18px;
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f3f3f1;
  --card-fill: #f3f3f1;
  --text: #111111;
  --text-soft: #4a4a46;
  --muted: #6b6b65;
  --placeholder: #b0afaa;
  /* Подсказка в поле читается на солнце: 4.5:1 на белом. */
  --placeholder-text: #77766f;
  --switch-off: #8a8984;
  --field-line: #e1e1dd;
  --line: #e8e8e6;
  --line-strong: #cfcfca;
  --line-soft: #ececea;
  --green: #1c7347;
  --green-soft: #d9efe1;
  --green-dot: #34c37a;
  --project-blue: #1f497d;
  --reserve-stripe: #c69725;
  --blue-soft: #dfe9f5;
  --blue-ink: #2b4d7a;
  --orange: #a14a07;
  --orange-soft: #fbeedd;
  --red-soft: #fdecea;
  --chart-mark: #1c7347;
  --tab-bg: rgba(255, 255, 255, .97);
  --tab-line: rgba(0, 0, 0, .07);
  --tab-ink: #5f6b64;
  --tab-active-bg: #1c7347;
  --tab-active-ink: #ffffff;
  --nav-bg: #fafaf8;
  --red-line: #f4c3bd;
  --red: #b42318;
  --on-text: #ffffff;
  --on-text-soft: rgba(255, 255, 255, .7);
  --busy-bg: #111111;
  --busy-ink: #ffffff;
  --busy-ink-soft: rgba(255, 255, 255, .7);
  --busy-edge: transparent;
  --radio-fill: var(--text);
  --radio-cut: var(--bg);
  --knob: #ffffff;
  --camera-guide: #ffffff; /* овал поверх видео камеры: белый в любой теме */
  --disabled: #c9c9c5;
  --past: #767671; /* 4.6:1 на белом (аудит 23.10: было 3.5) */
  --radius-card: 12px;
  --radius-button: 10px;
  --radius-cell: 8px;
  /* Карточки: белые с мягкой тенью (как у Airbnb, владелец 20.10), внутри карточки серое. */
  --card-bg: #ffffff;
  --card-inner: #f3f3f1;
  --card-shadow: 0 0 0 1px rgba(0, 0, 0, .03), 0 2px 6px rgba(0, 0, 0, .05), 0 4px 10px rgba(0, 0, 0, .07);
  --switch-shadow: 0 1px 2px rgba(0, 0, 0, .16), 0 3px 8px rgba(0, 0, 0, .14);
  /* Мятная главная плитка (вариант Б): мягче сплошного зелёного, тёмный текст читается 7.5:1. */
  --mint-bg: #d9efe1;
  --mint-line: #9fd4b4;
  --mint-ink: #14532d;
  --mint-ink-soft: #24603d;
  --font: "Onest", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --type-title: 20px;
  --type-section: 16px;
  --type-subheading: 15px;
  --type-body: 14px;
  --type-small: 13px;
  --type-caption: 12px;
  --type-control: 16px;
}

/* Тёмная тема. Без атрибута идём за системой (и за темой Telegram),
   с атрибутом — за выбором в профиле. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --card-bg: #1b1b19;
  --card-inner: #0f0f0e;
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  --switch-shadow: 0 2px 10px color-mix(in srgb, var(--tab-active-bg) 40%, transparent);
  --mint-bg: #1d3b2a;
  --mint-line: #2f6247;
  --mint-ink: #a6e8c4;
  --mint-ink-soft: #8fcfac;
  --bg: #0f0f0e;
  --surface: #1b1b19;
  --card-fill: #1b1b19;
  --text: #f1f1ee;
  --text-soft: #c6c6c0;
  --muted: #94948d;
  --placeholder: #6a6a63;
  --placeholder-text: #87877f;
  --switch-off: #6a6a64;
  --field-line: #2e2e2b;
  --line: #2b2b28;
  --line-strong: #44443f;
  --line-soft: #242421;
  --green: #4ec98a;
  --green-soft: #15311f;
  --green-dot: #34c37a;
  --blue-soft: #1c2a3b;
  --blue-ink: #a8c6ea;
  --orange: #e0913f;
  --orange-soft: #3a2a17;
  --red-soft: #2d1614;
  --chart-mark: #37a56d;
  --tab-bg: rgba(34, 34, 32, .97);
  --tab-line: rgba(255, 255, 255, .09);
  --tab-ink: #a8b3ad;
  --tab-active-bg: #4ec98a;
  --tab-active-ink: #0f0f0e;
  --nav-bg: #161615;
  --red-line: #53231f;
  --red: #e78077;
  --on-text: #0f0f0e;
  --on-text-soft: rgba(15, 15, 14, .65);
  --busy-bg: #050505;
  --pattern-edge: rgba(241, 241, 238, .38);
  --busy-ink: #f1f1ee;
  --busy-ink-soft: rgba(241, 241, 238, .7);
  --busy-edge: rgba(241, 241, 238, .34);
  --radio-fill: transparent;
  --radio-cut: var(--text);
  --knob: #0f0f0e;
  --camera-guide: #ffffff; /* овал поверх видео камеры: белый в любой теме */
  --disabled: #55554f;
  --past: #84847e; /* 4.6:1 на карточке #1b1b19 (было 3.4) */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
  --card-bg: #1b1b19;
  --card-inner: #0f0f0e;
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  --switch-shadow: 0 2px 10px color-mix(in srgb, var(--tab-active-bg) 40%, transparent);
  --mint-bg: #1d3b2a;
  --mint-line: #2f6247;
  --mint-ink: #a6e8c4;
  --mint-ink-soft: #8fcfac;
    --bg: #0f0f0e;
    --surface: #1b1b19;
  --card-fill: #1b1b19;
    --text: #f1f1ee;
    --text-soft: #c6c6c0;
    --muted: #94948d;
    --placeholder: #6a6a63;
    --placeholder-text: #87877f;
    --switch-off: #6a6a64;
    --field-line: #2e2e2b;
    --line: #2b2b28;
    --line-strong: #44443f;
    --line-soft: #242421;
    --green: #4ec98a;
    --green-soft: #15311f;
    --green-dot: #34c37a;
    --blue-soft: #1c2a3b;
    --blue-ink: #a8c6ea;
    --orange: #e0913f;
    --orange-soft: #3a2a17;
  --red-soft: #2d1614;
  --chart-mark: #37a56d;
  --tab-bg: rgba(34, 34, 32, .97);
  --tab-line: rgba(255, 255, 255, .09);
  --tab-ink: #a8b3ad;
  --tab-active-bg: #4ec98a;
  --tab-active-ink: #0f0f0e;
  --nav-bg: #161615;
  --red-line: #53231f;
    --red: #e78077;
    --on-text: #0f0f0e;
    --on-text-soft: rgba(15, 15, 14, .65);
    --busy-bg: #050505;
    --pattern-edge: rgba(241, 241, 238, .38);
  --pattern-edge: rgba(241, 241, 238, .38);
    --busy-ink: #f1f1ee;
    --busy-ink-soft: rgba(241, 241, 238, .7);
    --busy-edge: rgba(241, 241, 238, .34);
    --radio-fill: transparent;
    --radio-cut: var(--text);
    --knob: #0f0f0e;
    --camera-guide: #ffffff; /* овал поверх видео камеры: белый в любой теме */
    --disabled: #55554f;
    --past: #84847e;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
/* Без «резинки» iOS: при сильном рывке вверх страница отпружинивала вместе с шапкой и рацией. */
html, body { overscroll-behavior-y: none; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--type-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select, summary { font: inherit; color: inherit; }
/* Поля не меньше 16px: иначе iOS приближает страницу при вводе и назад не возвращает. */
input, textarea, select { font-size: var(--type-control); }
button { padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }
strong { font-weight: 500; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(32px, env(safe-area-inset-bottom));
}

.screen { display: flex; flex-direction: column; gap: 16px; }
/* Свайп главная ↔ виджеты (bindPager в app.js): соседний экран на время жеста лежит поверх и едет рядом. */
#content { position: relative; }
/* Во время свайпа части экранов уходят за край, и страница становилась шире экрана: на iPhone её можно
   было сдвинуть вбок, и всё «ехало» (владелец 23.10, видео). clip, а не hidden: прокрутку не создаёт. */
html, body { overflow-x: clip; }
/* Вбок жест ведёт наш код (bindPager), браузеру остаётся только прокрутка вверх-вниз. */
#home-view, #widgets-view { touch-action: pan-y; }
/* Без фона: сам экран во всю ширину стоит на месте, едут только его части, и фон закрыл бы уходящий экран. */
.screen.pager-in { position: absolute; left: 0; right: 0; z-index: 2; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* Единый набор: assets/icons/manifest.json, сетка 24, рация залитая. */
.icon { width: var(--icon-size); height: var(--icon-size); fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-chevron { color: var(--placeholder); }

/* Верхняя панель */
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
/* Шапка экрана закреплена жёстко поверх страницы (fixed, не sticky): в Telegram на iPhone липкая
   шапка ёрзала при прокрутке. Контент начинается под ней за счёт отступа у экрана. Линия снизу —
   только когда прокрутили. */
.screen > .top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  margin: 0;
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.screen:has(> .top-bar) { padding-top: 58px; }
/* Компьютер и планшет: шапка во всю ширину окна, а её содержимое по той же колонке 560 px, что и
   экран. Иначе дата уезжает в левый край окна, а аватар в правый, далеко от остального. */
@media (min-width: 600px) {
  .screen > .top-bar { padding-right: max(18px, calc(50% - 262px)); padding-left: max(18px, calc(50% - 262px)); }
}
body.has-tabbar .screen:has(> .top-bar-dup:not(:has(> .top-actions))) { padding-top: 0; }
body.is-scrolled .screen > .top-bar { border-bottom-color: var(--line); }

/* Нижнее меню — плавающая капсула. */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 26px;
  background: var(--tab-bg);
  border: 1px solid var(--tab-line);
  box-shadow: 0 10px 28px rgba(20, 60, 40, .16);
  transform: translateX(-50%);
}
.tabbar[hidden] { display: none; }
/* Текст только для читалок: в имени кнопки есть, на экране — нет. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 68px;
  height: var(--control-target);
  padding: 0 4px;
  border-radius: 20px;
  color: var(--tab-ink);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  transition: background-color .15s ease, color .15s ease;
}
.tab { position: relative; }
.tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; font-style: normal; }
.row-badge { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: var(--type-caption); font-style: normal; font-weight: 700; line-height: 22px; text-align: center; }
.tab-badge.is-dot { min-width: 8px; width: 8px; height: 8px; padding: 0; border-radius: 50%; top: 9px; left: calc(50% + 8px); }
.tab.is-active { background: var(--tab-active-bg); color: var(--tab-active-ink); font-weight: 600; }
/* Запас под нижнее меню — внутри экрана, а не у общей обёртки. Шапка экрана липнет к верху
   только в пределах своего экрана: короткий экран (главная) с запасом снаружи докручивался
   ниже своего края и утаскивал шапку с рацией за собой. */
.screen:not([hidden]) { min-height: calc(100vh - max(18px, env(safe-area-inset-top)) - max(32px, env(safe-area-inset-bottom))); }
body.has-tabbar .app-shell { padding-bottom: 0; }
body.has-tabbar .screen:not([hidden]) {
  min-height: calc(100vh - max(18px, env(safe-area-inset-top)));
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}
body.has-tabbar .cta-sticky { bottom: calc(74px + max(14px, env(safe-area-inset-bottom))); }
/* Фокус с клавиатуры подкручивается выше нижнего меню, а не прячется под ним (аудит 25.10, SC 2.4.11). */
html:has(body.has-tabbar) { scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
/* Пока печатаешь, меню не мешает над клавиатурой. */
body.is-typing .tabbar { display: none; }
.top-bar-back { justify-content: flex-start; }
/* На корневых вкладках есть таббар — «назад» там некуда. */
body.has-tabbar.is-root-view .top-bar-back .back { display: none; }
body.has-tabbar .top-bar-back.top-bar-dup { display: none; }
/* Внутренний экран с крупным заголовком: в полоске «назад» тот же текст появляется только после прокрутки,
   когда крупный ушёл наверх. На самом верху остаётся одна стрелка. */
.screen:has(.page-title) > .top-bar-back > .top-title { opacity: 0; transition: opacity .18s ease; }
body.is-scrolled .screen:has(.page-title) > .top-bar-back > .top-title { opacity: 1; }
body.has-tabbar .top-bar-back .top-title { font-size: var(--type-section); }
.top-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.icon-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  transition: background .15s ease;
}
.icon-button:hover { background: var(--surface); }
.brand { font-weight: 600; font-size: var(--type-title); line-height: 1.1; letter-spacing: -.03em; }
/* Название приложения уже стоит в шапке Telegram — вместо второго логотипа
   показываем дату. */
.today-label {
  position: relative;
  min-width: 0;
  white-space: normal;
  font-size: var(--type-section);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-align: left;
  color: var(--text);
}
.today-label::before { content: ""; position: absolute; inset: -12px -6px; }
.today-label.is-special { color: var(--green); }

.beta-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--red);
  color: var(--on-text);
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Снекбар как в приложениях Яндекса: снизу над меню, во всю ширину, короткий текст
   и одно действие справа. Смахивается вниз или закрывается тапом. */
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 440px;
  min-height: 52px;
  margin: 0 auto;
  padding: 10px 10px 10px 16px;
  border-radius: 18px;
  /* Владелец 27.10: подсказка не чёрная, а как карточка, белая с тенью. Тень сильнее карточной: тост висит над экраном. */
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--text);
  font-size: var(--type-body);
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  box-shadow: var(--card-shadow), 0 12px 32px rgba(0, 0, 0, .16);
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  transition: opacity .2s ease, transform .32s cubic-bezier(.2, .9, .25, 1.05);
  touch-action: none;
}
.toast:not(.has-action) { padding-right: 16px; }
/* Над нижним меню, пока оно на экране. */
body.has-tabbar:not(.is-typing):not(.assistant-open) .toast { bottom: calc(76px + max(14px, env(safe-area-inset-bottom))); }
.toast:not(.is-visible) { pointer-events: none; }
.toast.is-visible { transform: translateY(var(--toast-drag, 0px)); opacity: 1; pointer-events: auto; }
.toast.is-dragging { transition: none; }
.toast-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.toast-hint { color: var(--muted); font-size: var(--type-small); font-weight: 400; }
/* Кнопка в подсказке как «Выбрать» в шаблонах: мятная плашка. */
.toast-action { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: 12px; background: var(--mint-bg); color: var(--mint-ink); font-size: var(--type-body); font-weight: 600; }
.toast-action:active { background: color-mix(in srgb, var(--mint-bg) 80%, var(--mint-ink)); }
.top-title { font-weight: 500; font-size: var(--type-body); }
.back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}
.avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-weight: 500;
}
.avatar.tone-green { background: var(--green-soft); color: var(--green); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-36 { width: 36px; height: 36px; font-size: var(--type-body); }
.avatar-48 { width: 48px; height: 48px; font-size: var(--type-section); }
.avatar-60 { width: 60px; height: 60px; font-size: var(--type-title); }
.avatar-64 { width: 64px; height: 64px; font-size: 22px; }

/* Карточки */
.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
}
.card-stack { display: flex; flex-direction: column; gap: 16px; }
.card-head { display: flex; flex-direction: column; gap: 4px; }
.card-title-lg { font-size: var(--type-section); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.hint { font-size: var(--type-small); line-height: 1.5; color: var(--text-soft); }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-title { font-size: var(--type-title); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }

.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.card-links { display: flex; align-items: center; gap: 16px; }
.legend { display: flex; align-items: center; gap: 12px; font-size: var(--type-caption); color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 5px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--pattern-edge, var(--line)); }
.swatch.busy { background: var(--busy-bg); box-shadow: inset 0 0 0 1px var(--busy-edge); }

.link { position: relative; color: var(--green); font-size: var(--type-small); font-weight: 500; }
/* Ссылки-кнопки 19 px высотой: расширяем область нажатия, не меняя вид. */
.link::before { content: ""; position: absolute; inset: -12px -6px; }
.link:hover { opacity: .8; }
.link-danger { color: var(--red); }

/* Кнопки */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: var(--control-target);
  padding: 3px var(--control-padding);
  --control-stroke: var(--text);
  border-radius: var(--radius-button);
  background-color: var(--text);
  color: var(--on-text);
  font-size: var(--type-small);
  font-weight: 500;
  transition: opacity .15s ease;
}
.button:hover { opacity: .88; }
.button:disabled { opacity: .5; }
/* «Сохранить» до правок: спокойная серая, чёрной становится, когда есть что сохранять. */
.button { transition: background-color .25s ease, color .25s ease, opacity .2s ease; }
/* Мятная маленькая: «Взять» в откликах, как «Выбрать» у быстрых шаблонов и «✓ Взять» в боте. На карточке чёрная одна. */
.button.button-mint { background-color: var(--mint-bg); color: var(--mint-ink); }
.button.is-clean:disabled { opacity: 1; background-color: var(--surface); --control-stroke: var(--line); color: var(--muted); }
.button-compact, .button-small { width: auto; }
.button-outline { background-color: var(--bg); color: var(--text); }
/* Контурная любого размера: тонкая серая рамка, чёрная обводка слишком тяжёлая. Раньше серой была
   только маленькая, и одинаковые по смыслу кнопки выглядели по-разному (аудит 21.10). */
.button-outline:not(.link-danger) { --control-stroke: var(--line-strong); }
/* «Освободить место», «Отклонить» и т. п.: опасное действие остаётся красным и в контурной кнопке. */
.button-outline.link-danger { color: var(--red); --control-stroke: var(--red); }
.button-danger { background: var(--red); color: #fff; }
.cta { display: flex; flex-direction: column; gap: 8px; }
.cta > small { font-size: var(--type-caption); color: var(--muted); text-align: center; }
.cta-sticky { position: sticky; z-index: 5; bottom: 0; padding: 8px 0 max(0px, env(safe-area-inset-bottom)); background: var(--bg); }
/* Под липкой кнопкой до таббара контент не просвечивает. */
body.has-tabbar .cta-sticky::after { content: ""; position: absolute; left: -18px; right: -18px; top: 100%; height: calc(74px + max(14px, env(safe-area-inset-bottom))); background: var(--bg); }
.sheet-danger { align-self: center; padding: 10px 14px; color: var(--red); font-size: var(--type-small); font-weight: 500; background: transparent; }
.hint-more > summary { cursor: pointer; list-style: none; color: var(--green); font-size: var(--type-small); font-weight: 500; }
.hint-more > summary::-webkit-details-marker { display: none; }
.hint-more[open] > summary { margin-bottom: 6px; }

/* Полоса дней на главной */
.day-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max(54px, calc((100% - 36px) / 6.5));
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 3px;
}
.day[aria-expanded="true"] { outline: 2px solid var(--text); outline-offset: 1px; }
.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  border: 1.5px solid transparent;
  border-radius: var(--radius-cell);
  background: var(--surface);
  color: var(--text);
  transition: transform .12s ease;
}
.day:active { transform: scale(.96); }
.day span { font-size: var(--type-caption); color: var(--muted); }
.day strong { font-size: var(--type-subheading); line-height: 1; }
.day.today { background: var(--mint-bg); color: var(--mint-ink); }
.day.today span { color: inherit; font-weight: 600; }
.day .swatch { width: 65%; height: 4px; }
.day:not(.busy) .swatch { visibility: hidden; }
.status-card .swatch.busy:not(.has-color) { background: var(--text-soft); box-shadow: none; }

/* Согласие и удаление аккаунта */
.consent-screen { padding-top: 24px; }
/* OpenStreetMap не умеет тёмную тему: в тёмной приглушаем плитки фильтром, подписи остаются читаемыми. */
.map-osm-dark .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) brightness(.95) contrast(.9); }
/* Гость (без имени): строки и карточки только для своих спрятаны, регистрация в шторке по действию. */
body.is-guest [data-member] { display: none !important; }
body:not(.is-guest) [data-guest] { display: none !important; }
/* Пометка «Pro» у инструментов директора: маленькая, рядом с названием. */
.pro-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--green-soft); color: var(--green); font-size: var(--type-caption); font-weight: 600; line-height: 1.5; vertical-align: 2px; }
.pro-tag.is-off { background: var(--surface); color: var(--muted); }
.guest-gate-consent { font-size: var(--type-caption); line-height: 1.4; }
.guest-gate-consent a { color: var(--green); font-weight: 500; }
#guest-gate .form .cta { margin-top: 4px; }
#guest-gate .page-head { display: none; }
.consent-link { text-align: center; }
.danger-zone { border-color: var(--line); }
.danger-zone .button-outline { --control-stroke: var(--red); color: var(--red); }
.danger-zone .button-outline:hover { opacity: .85; }
.legal { gap: 14px; padding-top: 24px; }
.legal .card-title-lg { font-size: var(--type-section); }
.legal .card-stack { gap: 8px; }

/* Откликнувшиеся на запрос */
.responder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line-soft);
}
.responder:first-child { padding-top: 0; border-top: 0; }
body.sheet-open { overflow: hidden; }
.is-invalid { outline: 2px solid var(--red); outline-offset: 2px; border-radius: var(--radius-button, 12px); }
.responder-head { display: flex; align-items: flex-start; gap: 10px; }
.responder-head .pill { flex: 0 0 auto; margin-top: 2px; white-space: nowrap; }
.responder .row-copy { flex: 1 1 auto; min-width: 0; }
.responder .row-copy small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.responder .button-small { flex: 1 1 0; width: auto; }

/* Строка-карточка (действие) */
.row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  transition: background .15s ease;
}
.row-card:hover { background: var(--surface); }
.row-card-dashed { padding: 14px 16px; border: 1.5px dashed var(--line); }
/* «Инструменты» ячейками по два (владелец 25.10): та же карточка, иконка над подписью, без стрелки. */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tools-grid > .row-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; min-width: 0; }
.tools-grid > .row-card .icon-chevron { display: none; }
.tools-grid > .row-card .row-icon { width: 40px; height: 40px; }
.tools-grid > .row-card .row-copy small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tools-grid > [hidden] { display: none; }
.tools-grid > [data-assist-only] { display: none; }
.tools-grid > .tools-label { grid-column: 1 / -1; margin-top: 4px; }
.row-icon { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.row-icon-green { background: var(--green-soft); color: var(--green); }
.row-card-dashed .row-icon { width: 40px; height: 40px; }
.row-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.row-copy strong { font-size: var(--type-subheading); letter-spacing: -.01em; }
.row-card-dashed .row-copy strong { font-size: var(--type-body); }
.row-copy small { font-size: var(--type-caption); color: var(--muted); }

.project-month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.project-month-grid .button { padding: 0 8px; font-size: var(--type-small); }

.progress-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  transition: background .15s ease;
}
.progress-card:hover { background: var(--surface); }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-head strong { font-size: var(--type-subheading); letter-spacing: -.01em; }
.progress-track { display: block; overflow: hidden; width: 100%; height: 6px; border-radius: 999px; background: var(--surface); }
.progress-fill { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width .3s ease; }
.progress-card small { font-size: var(--type-caption); color: var(--muted); }

.directory-legend { margin-top: -4px; font-size: var(--type-caption); color: var(--muted); }

/* Бета — тише: одна строка, мелко. */
.beta-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 10px;
  border: 1px solid var(--red-line);
  border-radius: 14px;
  background: var(--red-soft);
}
.beta-note .beta-tag { padding: 2px 6px; font-size: var(--type-caption); }
/* Ссылка мелкая, но площадь под палец та же, что у .link: невидимый слой вокруг. */
.beta-note .beta-write::before { content: ""; position: absolute; inset: -12px -8px; }
.beta-note .hint { flex: 1 1 auto; font-size: var(--type-small); line-height: 1.3; color: var(--text-soft); }
.beta-close { flex: 0 0 auto; width: 40px; height: 40px; margin: -5px -5px -5px 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
.beta-close:active { background: var(--surface); }
.beta-note .beta-write {
  position: relative;
  padding: 0;
  background: none;
  color: var(--red);
  font-size: var(--type-caption);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.beta-note .beta-write:active { opacity: .85; }

/* Три пути к людям в ряд, первое, что видно после шапки (владелец 22.10, вариант Б). */
.home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.action-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  transition: background .15s ease;
}
.action-tile:hover { background: var(--surface); }
.action-tile strong { font-size: var(--type-body); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.action-tile small { font-size: var(--type-caption); line-height: 1.35; color: var(--muted); }
.action-tile .row-icon { width: 36px; height: 36px; }
.action-tile:first-child { background: var(--mint-bg); border-color: var(--mint-line); color: var(--mint-ink); }
.action-tile:first-child small { color: var(--mint-ink-soft); }
.action-tile:first-child .row-icon { background: color-mix(in srgb, var(--mint-ink) 12%, transparent); color: var(--mint-ink); }
.action-tile:first-child:hover { background: var(--mint-bg); }

.note-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; font-size: var(--type-caption); color: var(--muted); }
.how { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--radius-card); background: var(--surface); font-size: var(--type-small); line-height: 1.5; color: var(--text-soft); }

.sponsor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--text);
  font-size: var(--type-caption);
}
.sponsor > span { color: var(--muted); }
.sponsor-logo { display: inline-flex; padding: 6px; margin: -6px; color: var(--text); border-radius: 8px; }
.sponsor-logo:active { opacity: .7; }
.sponsor .sponsor-contacts a { color: var(--green); text-decoration: none; }
.dev-badge { color: var(--orange); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* Состояния загрузки и ошибки */
.state-card { display: grid; place-items: center; gap: 10px; min-height: 240px; padding: 30px 20px; text-align: center; }
.state-card h2 { font-size: var(--type-title); font-weight: 500; letter-spacing: -.02em; }
.muted { color: var(--muted); line-height: 1.5; }
/* Заставка при запуске: две рации перекликаются, название и полоска загрузки. Поверх экрана, уходит плавно. */
.splash { position: fixed; inset: 0; z-index: 60; min-height: 100vh; min-height: 100dvh; align-content: center; gap: 0; background: var(--bg); transition: opacity .28s ease; }
.splash.is-leaving { opacity: 0; pointer-events: none; }
.splash-radios { overflow: visible; animation: rise-in .4s ease-out both; }
/* Светлая тема — чёрный силуэт с прорезями, тёмная — контур без заливки. */
.splash-radio .shape { fill: var(--radio-fill); stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.splash-radio .cut { fill: none; stroke: var(--radio-cut); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.splash-led { fill: var(--line); }
.splash-radio-l .splash-led { animation: splash-led-l 2.6s infinite; }
.splash-radio-r .splash-led { animation: splash-led-r 2.6s infinite; }
/* Искра на кончике антенны той рации, что говорит: лучики мерцают, потом — у второй. */
.splash-spark { fill: none; stroke: var(--green); stroke-width: 1.6; stroke-linecap: round; opacity: 0; }
.splash-spark-l { animation: splash-spark-l 2.6s infinite; }
.splash-spark-r { animation: splash-spark-r 2.6s infinite; }
.splash-spark g { transform-box: fill-box; transform-origin: center; animation: splash-flick .4s infinite; }
@keyframes splash-spark-l { 0%, 44% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes splash-spark-r { 0%, 50% { opacity: 0; } 52%, 94% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes splash-flick { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .5; } }
.splash-sub { transition: opacity .18s ease; }
.splash-sub.is-swapping { opacity: 0; }
.splash-name { margin-top: 22px; font-size: var(--type-title); font-weight: 500; letter-spacing: -.02em; color: var(--text); animation: rise-in .4s .12s ease-out both; }
.splash-sub { margin: 6px 0 22px; font-size: var(--type-small); color: var(--muted); animation: rise-in .4s .2s ease-out both; }
.splash .loader { animation: rise-in .4s .28s ease-out both; }
@keyframes splash-led-l { 0%, 44% { fill: var(--green); } 46%, 100% { fill: var(--line); } }
@keyframes splash-led-r { 0%, 50% { fill: var(--line); } 52%, 94% { fill: var(--green); } 96%, 100% { fill: var(--line); } }
.loader { width: 40px; height: 3px; overflow: hidden; border-radius: 999px; background: var(--line); }
.loader::after { display: block; width: 18px; height: 3px; border-radius: inherit; background: var(--text); content: ""; animation: scan 1s ease-in-out infinite alternate; }

/* Каталог */
.date-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--control-target);
  padding: 0 var(--control-padding);
  --control-stroke: var(--line);
  border-radius: var(--radius-button);
  font-size: var(--type-small);
  font-weight: 500;
  cursor: pointer;
}
.date-field > span { flex: 1 1 auto; }
.date-field em { font-style: normal; color: var(--green); }
.date-field { width: 100%; text-align: left; background: var(--bg); color: var(--text); }

.period-picker { display: flex; flex-direction: column; gap: 14px; }
.period-actions { display: flex; align-items: center; gap: 12px; }
.period-actions .button { margin-left: auto; }
.cell.range { background: var(--green-soft); color: var(--green); }
.cell.edge { background: var(--green); color: var(--on-text); border-color: var(--green); }
.chips { display: flex; gap: 0 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  background: var(--bg);
  color: var(--text-soft);
  font-size: var(--type-small);
  font-weight: 500;
}
.chips button.active { background-color: var(--text); color: var(--on-text); font-weight: 500; }
.chips button:disabled { opacity: .6; }
.chips-choice { flex-wrap: wrap; gap: 0 6px; overflow: visible; }
.chips-choice button { padding: 0 var(--control-padding); font-size: var(--type-small); }

.person { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.person-summary { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 12px 14px; text-align: left; color: var(--text); }
.person-summary .row-copy { gap: 5px; }
.person-summary .row-copy strong { font-size: var(--type-subheading); line-height: 1.35; overflow-wrap: anywhere; }
/* Должность не обрезаем: длинная переносится на строку под статусом, максимум две строки. */
.person-summary .row-copy small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; line-height: 1.3; }
.person-summary .row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.person-summary .row-meta small { flex: 1 1 100%; min-width: 0; }
.person:not(.is-open) .project-inline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-summary .pill { padding: 3px 8px; font-size: var(--type-caption); border-radius: 7px; }
.pill { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-button); font-size: var(--type-caption); font-weight: 500; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.available { background: var(--green-soft); color: var(--green); }
.pill.available i { background: var(--green-dot); }
/* По просьбе владельца (07.11): пауза выделяется красным, независимо от занятых дат. */
.pill.paused { background: var(--red-soft); color: var(--red); }
.pill.busy { background: var(--surface); color: var(--text-soft); }
.pill.unknown { background: var(--surface); color: var(--muted); }
/* В каталоге «статус неизвестен» в две строки — иначе он съедает место под именем. */
.person-summary .pill.unknown { white-space: nowrap; }
.person-summary .pill i { flex: none; }

.person-row { display: flex; align-items: flex-start; }
.person-row .person-summary { flex: 1 1 auto; min-width: 0; }
.star-toggle {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-right: 2px;
  border: none;
  background: transparent;
  color: var(--placeholder);
}
.star-toggle.is-active { color: var(--orange); }
.star-toggle.is-active .icon { fill: var(--orange); }
.star-toggle .icon { width: 20px; height: 20px; }
.person:not(.is-open) .star-toggle { margin-top: 12px; }
/* Раскрытая карточка целиком белая: строка под свайп серая и иначе остаётся серой шапкой (владелец 21.10, вариант б). */
.person.is-open .person-swipe > .person-row { background: var(--card-bg); }
.person.is-open { overflow: visible; background: transparent; box-shadow: none; border-color: transparent; }
.person.is-open .person-swipe { overflow: visible; }
.person.is-open .person-row { margin: 0; }
.person.is-open .person-summary { padding: 0; }
.person.is-open .person-summary .row-copy strong { font-size: var(--type-section); overflow-wrap: anywhere; }
.person.is-open .person-summary .row-copy small { display: block; overflow: visible; font-size: var(--type-caption); }
.person.is-open .person-summary .row-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
.person.is-open .person-summary .row-meta small { flex: auto; }
.person-details { display: flex; flex-direction: column; gap: 16px; padding: 16px 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 10px; border-radius: var(--radius-button); background: var(--surface); font-size: var(--type-small); font-weight: 500; }
.person-bio { font-size: var(--type-body); line-height: 1.5; color: var(--text-soft); white-space: pre-line; }
.person-projects { display: flex; flex-direction: column; gap: 0; }
.person-project { border-bottom: 1px solid var(--line-soft); }
.person-project:last-of-type { border-bottom: 0; }
.person-project > .request-summary { padding: 16px 0; }
div.person-project > .request-summary { cursor: default; }
.person-project:first-child > .request-summary { padding-top: 0; }
.person-project > .request-body { padding: 0 0 16px; }
.person-project .request-summary-copy { overflow-wrap: anywhere; }
.person-project .request-summary-copy > .link { display: inline-flex; align-self: flex-start; align-items: center; min-height: 44px; }
.person-project .request-summary-copy > .link::before { inset: 0; }
.person-projects > .link { align-self: flex-start; margin-top: 16px; }
.rec-badge { display: inline-flex; align-items: center; gap: 3px; vertical-align: 1px; padding: 1px 6px; border-radius: 6px; background: var(--green-soft); color: var(--green); font-size: var(--type-caption); font-weight: 500; }
.rec-badge .icon { width: var(--icon-inline-size); height: var(--icon-inline-size); stroke-width: var(--icon-stroke); }
.verified-badge { display: inline-flex; width: var(--verified-badge-size); height: var(--verified-badge-size); vertical-align: -3px; flex: none; cursor: pointer; }
/* Ширина рации входит в последний фрагмент имени, даже если длинная фамилия переносится. */
.verified-name-text { padding-inline-end: calc(var(--verified-badge-size) + .25em); }
.verified-name-text + .verified-badge { margin-inline-start: calc(0px - var(--verified-badge-size)); }
.verified-badge svg { width: 100%; height: 100%; display: block; }
.verified-badge[hidden] { display: none; }
.verified-card { display: flex; align-items: center; gap: 12px; }
.own-badge-card { display: flex; align-items: flex-start; gap: 12px; }
.own-badge-img { width: 44px; height: 44px; margin: 0; flex: none; vertical-align: 0; }
.own-badge-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.own-badge-copy .identity-actions { flex-wrap: wrap; column-gap: 16px; row-gap: 8px; }
.own-badge-copy .button { white-space: nowrap; }
.verified-card .verified-badge-large { width: 34px; height: 34px; vertical-align: 0; }
.verified-card:not(.is-done) .verified-badge-large { filter: grayscale(1); opacity: .45; }
.verified-copy { display: flex; flex-direction: column; gap: 3px; }
.verified-copy strong { font-size: var(--type-subheading); }
.verified-copy .link { align-self: flex-start; font-size: var(--type-small); }
.legend-list { display: flex; flex-direction: column; gap: 16px; }
.legend-row { display: flex; flex-direction: column; gap: 6px; }
#about-statuses { scroll-margin-top: 84px; }
.legend-row .hint { margin: 0; }
.legend-sample { display: flex; align-items: center; min-height: 26px; }
.legend-sample .pill { white-space: nowrap; font-size: var(--type-caption); }
.legend-samples { flex-wrap: wrap; gap: 6px; }
.review-reason { margin: 0; color: var(--red); }
.review-inline { display: block; color: var(--red); font-size: var(--type-caption); font-weight: 600; line-height: 1.3; white-space: nowrap; }
.verified-badge-legend { width: 26px; height: 26px; cursor: default; }
.verified-copy small { font-size: var(--type-small); line-height: 1.45; color: var(--text-soft); }
.review-badge { display: inline-flex; align-items: center; vertical-align: 1px; padding: 1px 6px; border-radius: 6px; background: var(--line); color: var(--text-soft); font-size: var(--type-caption); font-weight: 500; white-space: nowrap; }
.name-reset-button { color: var(--red); border-color: var(--red-line); }
.recommendation { display: flex; flex-direction: column; gap: 16px; }
.recommendation-text { font-size: var(--type-small); line-height: 1.45; color: var(--text-soft); }
.rec-names { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-name {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: var(--type-caption);
  line-height: 1.5;
  white-space: nowrap;
}
button.rec-name { cursor: pointer; }
button.rec-name:active { background: var(--surface); }
.rec-name.is-plain { color: var(--muted); border-style: dashed; }
.rec-more { color: var(--muted); }
.recommendation .button { align-self: flex-start; background-color: var(--bg); }
.recommendation .button.is-active { --control-stroke: var(--green); color: var(--green); }
.calendar-access-button.is-active { border-color: var(--green); color: var(--green); }
.calendar-access-button:disabled { opacity: .5; }
.person > .calendar-access-button { margin-top: 16px; }
.person:not(.is-open):not(.person-in-sheet) > .calendar-access-button { display: none; }
.person:is(.is-open, .person-in-sheet) .person-summary .row-meta .person-day-status { display: none; }
.empty-state, .inline-loading { padding: 28px 14px; border: 1px solid var(--line); border-radius: var(--radius-card); color: var(--muted); font-size: var(--type-small); line-height: 1.5; text-align: center; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: var(--type-body); color: var(--text-soft); }
.empty-state p { margin: 0; max-width: 32ch; }
.empty-state .button { width: auto; }
/* Скелеты: карточка-заглушка на время загрузки. */
.skeleton-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-card); }
.skeleton { display: block; background: var(--surface); border-radius: 8px; animation: skeleton-pulse 1.2s ease-in-out infinite; }
.skeleton-avatar { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; }
.skeleton-lines { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; }
.skeleton-line { height: 12px; width: 70%; }
.skeleton-line.short { width: 45%; }
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Формы */
.form, #request-form-state { display: flex; flex-direction: column; gap: 16px; }
.card-form { display: flex; flex-direction: column; gap: 14px; }
/* «Детали смены» в форме запроса: главное наверху, остальное по нажатию. */
.request-details { border-top: 1px solid var(--line); padding-top: 14px; }
.request-details > summary { display: flex; flex-direction: column; gap: 2px; padding-right: 28px; position: relative; cursor: pointer; list-style: none; min-height: 44px; justify-content: center; }
.request-details > summary::-webkit-details-marker { display: none; }
.request-details > summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.request-details[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.request-details-title { font-size: var(--type-subheading); font-weight: 500; color: var(--text); }
.request-details > summary small { font-size: var(--type-small); color: var(--muted); }
.request-details > summary small.is-filled { color: var(--green); }
.request-details-body { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }
.card-form label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-form .field-title, .card-form label > span { display: flex; justify-content: space-between; gap: 8px; font-size: var(--type-caption); color: var(--muted); }
.card-form label > span em { font-style: normal; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { display: flex; justify-content: space-between; gap: 8px; font-size: var(--type-caption); color: var(--muted); }
.field-label em { font-style: normal; }
input:not([type="checkbox"]), textarea, select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  outline: none;
  background: var(--bg);
  color: var(--text);
  font-size: var(--type-control);
  /* Telegram на iOS красит каретку своим акцентом — в светлой теме она
     оказывается белой на белом. */
  caret-color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease;
}
/* iOS центрирует нативные поля даты и режет их по ширине содержимого. */
input[type="date"], input[type="month"] {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
  /* iOS ставит значение даты к верху поля: высота строки как у поля без рамки, текст по центру. */
  line-height: 42px;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator { margin-left: auto; }
input::placeholder, textarea::placeholder { color: var(--placeholder-text); }
input:not([type="checkbox"]):focus, textarea:focus, select:focus { border-color: var(--text); }
/* Своя стрелка: нативная в тёмной теме остаётся чёрной. */
select {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-message { font-size: var(--type-caption); color: var(--green); text-align: center; }
.form-message.error { color: var(--red); }

.switch-row { display: flex; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 12px !important; padding-top: 4px; }
.switch-row > span { display: flex !important; flex-direction: column; gap: 3px; color: var(--text) !important; }
.switch-row > span strong { font-size: var(--type-subheading); letter-spacing: -.01em; }
.switch-row > span small { font-size: var(--type-caption); color: var(--muted); }
.switch-row.is-disabled > span,
.switch-row.is-disabled > span strong { color: var(--muted) !important; }
.switch-row.is-disabled > span small { color: var(--muted); }
/* Вся строка — подпись тумблера: тап по тексту переключает, цель не меньше 44px. */
label.switch-row { min-height: 44px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
label.switch-row.is-disabled { cursor: default; }
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 13px;
  background: var(--switch-off);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background .15s ease;
}
.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  content: "";
  transition: transform .15s ease;
}
.switch:checked { background: var(--text); }
.switch:checked::after { transform: translateX(18px); }
.switch:disabled { cursor: default; opacity: .6; }

.success { align-items: center; padding: 32px 20px; text-align: center; }
.success-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 22px; }
.success h3 { margin-bottom: 6px; font-size: var(--type-title); font-weight: 500; letter-spacing: -.02em; }
.success .button { margin-top: 18px; }

/* Профиль */
.identity { display: flex; align-items: center; gap: 14px; padding: 14px; }
.identity-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
.identity-copy strong { font-size: var(--type-section); letter-spacing: -.01em; }
.identity-copy small { font-size: var(--type-caption); line-height: 1.4; color: var(--muted); }
.identity-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.identity-actions .button { white-space: nowrap; }

.project-editor-heading { display: flex; align-items: center; justify-content: space-between; }
.project-editor .hint { font-size: var(--type-small); }
.film-card { display: flex; align-items: flex-start; gap: 12px; min-width: 0; width: 100%; }
.film-card .row-copy { min-width: 0; overflow-wrap: anywhere; }
.film-card .row-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--type-caption); }
.film-poster { flex: 0 0 auto; width: 64px; height: 96px; object-fit: cover; border-radius: var(--radius-cell); background: var(--surface); }

/* Календарь */
.calendar-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* «Сегодня» живёт в закреплённой шапке справа: маленькая ссылка, не капсула над кнопками.
   Показывается, только когда сегодняшний день ушёл с экрана. */
.calendar-today {
  margin-left: auto;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: var(--green);
  font: inherit;
  font-size: var(--type-small);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.calendar-today[hidden] { display: none; }
.calendar-tools .button { width: 100%; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; white-space: normal; line-height: 1.25; }
.calendar-tools-hint { margin-top: -4px; }
.calendar-tools .button.is-active { background-color: var(--green-soft); --control-stroke: var(--green); color: var(--green); }
.range { border: 1px solid var(--line); border-radius: var(--radius-card); }
/* Настройки в профиле: анкета выше, всё техническое — свёрнуто. */
.month { display: flex; flex-direction: column; gap: 12px; }
.month-head { display: flex; align-items: center; justify-content: space-between; }
.month-head strong { font-size: var(--type-subheading); text-transform: capitalize; }
.month-head span { font-size: var(--type-caption); color: var(--muted); }
.weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays { font-size: var(--type-caption); color: var(--muted); text-align: center; }
.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-cell);
  background: var(--surface);
  color: var(--text);
  font-size: var(--type-body);
  font-weight: 500;
}
/* Прошлые дни приглушены, но читаются: контраст не ниже 3:1. */
.cell:disabled { background: transparent; color: var(--past); }
/* Прошедшие дни открываются на просмотр (владелец 21.10). Пустой прошлый день тихий, как раньше;
   занятый виден так же, как будущий: ради него в прошлое и листают. */
.cell.past:not(.busy) { background: transparent; color: var(--past); }
.cell.today { border-color: var(--text); background: var(--bg); font-weight: 500; }
.cell.busy { background: var(--busy-bg); color: var(--busy-ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--busy-edge); }
/* Цвета проектов из КПП. Белые цифры на них читаются с запасом 4.5:1;
   оранжевый светлее остальных, на нём цифры тёмные. */
.c-blue { --project: #2f6fdb; }
.c-green { --project: #15834a; }
.c-red { --project: #cf3b3b; }
.c-orange { --project: #e07b1a; --project-ink: #111111; }
.c-purple { --project: #7f4ded; }
.c-teal { --project: #0a7f8b; }
.c-pink { --project: #c73a80; }
.c-brown { --project: #8d6e4f; }
.cell.busy.has-color { background: var(--project); border-color: var(--project); color: var(--project-ink, #fff); }
.cell.today.busy.has-color { box-shadow: inset 0 0 0 2px var(--bg); }
.color-dot { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--project, var(--text)); }
.color-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.color-chip { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: var(--project, var(--text)); box-shadow: inset 0 0 0 3px var(--bg); cursor: pointer; }
.color-chip[aria-checked="true"] { border-color: var(--text); }
.color-chip-custom { position: relative; display: inline-block; overflow: hidden; }
.color-chip-custom.is-empty { background: conic-gradient(#e5484d, #f5a524, #f5e04b, #46a758, #3e8ed0, #8e4ec6, #e5484d); }
.color-chip-custom input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }

/* Карточка смены поверх экрана. */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: fade-in .18s ease both; }
.sheet-panel { position: relative; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background: var(--bg); animation: sheet-up .20s cubic-bezier(.2, .8, .2, 1); }
.sheet-grip { width: 36px; height: 4px; margin: 0 auto 2px; border-radius: 2px; background: var(--line); }
.sheet-close { position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border-radius: 50%; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.sheet-close:active { background: var(--surface); }
.sheet-panel:focus { outline: none; }
.sheet-panel > .sheet-title, .sheet-panel > .stack > :first-child { padding-right: 44px; }
/* Первый в шторке целый список (меню календаря): отступ под крестик только заголовку, карточки на всю ширину. */
.sheet-panel > .stack > .stack:first-child { padding-right: 0; }
.sheet-panel > .stack > .stack:first-child > .sheet-title:first-child { padding-right: 44px; }
.sheet-title { font-size: var(--type-title); font-weight: 600; }
.sheet-row { display: flex; align-items: center; gap: 8px; }
@keyframes sheet-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* День из КПП: точка под числом — подробности в списке смен ниже. */
.cell.shift { position: relative; }
.cell.shift::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.shift-card { display: flex; flex-direction: column; gap: 6px; }
.shift-head { display: flex; align-items: center; gap: 8px; }
.shift-card .shift-head strong { font-size: var(--type-subheading); }
.shift-card small, .shift-address small { color: var(--muted); font-size: var(--type-small); }
.shift-address { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shift-address input { flex: 1 1 180px; min-width: 0; }

@keyframes scan { from { transform: translateX(-8px); } to { transform: translateX(30px); } }

@media (max-width: 360px) {
  .app-shell { padding-right: 14px; padding-left: 14px; }
  .catalog-roles-row { margin: 0 -14px; padding: 0 14px; }
  .responder-head { flex-wrap: wrap; }
  .responder-head .pill { white-space: normal; }
  .tab { width: 56px; font-size: 10px; }
  .screen > .top-bar { padding-right: 14px; padding-left: 14px; }
  .card-foot { flex-wrap: wrap; }
  .chips button { padding: 0 12px; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.skeleton-card { animation: fade-in .2s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  /* Без переходов: с .01ms смена темы и тосты на миг оставляли старые цвета и положение под пальцем. */
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition: none !important; scroll-behavior: auto !important; }
}

.paste-block { display: flex; flex-direction: column; gap: 10px; }
.paste-panel { display: flex; flex-direction: column; gap: 10px; }
.paste-panel code { font-size: var(--type-caption); color: var(--text-soft); }
.paste-panel textarea { min-height: 120px; }

.chips-wrap { gap: 0 6px; }
.chips-wrap button { height: 30px; padding: 0 10px; font-size: var(--type-caption); }

/* Ставки: строки «роль — вилка». */
.rate-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.rate-row:first-of-type { border-top: 0; padding-top: 0; }
.rate-row .row-copy { gap: 2px; }
.rate-row strong { font-size: var(--type-body); font-weight: 500; }
.rate-value { flex: 0 0 auto; font-size: var(--type-body); font-weight: 600; text-align: right; white-space: nowrap; }
.rate-warning { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: var(--radius-button); background: color-mix(in srgb, var(--red) 10%, transparent); font-size: var(--type-small); line-height: 1.45; color: var(--red); }

/* Запрос: время, вложенные блоки денег и сбора, подробности в карточке */
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#request-money, #request-pickup { display: flex; flex-direction: column; gap: 14px; }
.request-details { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: var(--type-small); line-height: 1.4; color: var(--text-soft); }
.request-details li::before { content: "•"; margin-right: 6px; color: var(--muted); }

/* Выжимка вызывного */
.digest { display: flex; flex-direction: column; gap: 12px; }
.digest h4 { margin: 0 0 4px; font-size: var(--type-small); font-weight: 600; color: var(--text); }
.digest ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0 0 0 16px; font-size: var(--type-small); line-height: 1.45; color: var(--text-soft); }
.digest .link { display: inline; padding: 0; font-size: inherit; }
.digest-share { display: grid; grid-template-columns: minmax(0, 1fr) 9.5em; gap: 8px; }
.digest-share .button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; padding-right: 10px; }
.digest-save { width: 100%; margin: 14px 0 4px; }
.digest-settings { padding-top: 4px; border-top: 1px solid var(--line); }
.digest-settings summary { padding: 10px 0 6px; font-size: var(--type-body); color: var(--green); cursor: pointer; list-style: none; }
.digest-settings summary::-webkit-details-marker { display: none; }
.digest-settings > .hint { margin: 0 0 10px; }
.swatch.has-color { background: var(--project); }
.legend { flex-wrap: wrap; row-gap: 4px; }

/* Запрос из вызывного и подписка на календарь */
.request-from-callsheet { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.calendar-feed-link { padding: 10px 12px; border-radius: var(--radius-button); background: var(--surface); font-size: var(--type-caption); line-height: 1.4; word-break: break-all; color: var(--text-soft); }

/* Цифры сервиса за месяц — на главной. */
.month-summary { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--green-soft); border-color: transparent; }
.month-summary-kicker { font-size: var(--type-caption); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.month-summary strong { font-size: var(--type-subheading); font-weight: 600; }
.month-summary .hint { color: var(--text-soft); }

/* Итоги года. */
.year-list { gap: 0; padding: 4px 16px; }
.year-row { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.year-row:last-child { border-bottom: 0; }
.year-row strong { min-width: 64px; font-size: 34px; font-weight: 600; letter-spacing: -.03em; color: var(--green); line-height: 1; }
.year-row span { font-size: var(--type-subheading); color: var(--text); }
.year-note { text-align: center; }

/* Заявки на роль у создателя. */
.role-inbox { border-color: var(--green); }
.role-inbox-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.role-inbox-row:first-child { border-top: 0; padding-top: 0; }
.role-inbox-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.role-inbox-copy strong { font-size: var(--type-body); font-weight: 600; }
.role-inbox-copy small { font-size: var(--type-caption); color: var(--muted); }
.role-inbox-actions { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }

/* Статистика для создателя. */
.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--bg); }
.stat-tile strong { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.stat-tile span { font-size: var(--type-caption); color: var(--muted); }
.day-chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.day-bar { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; cursor: pointer; }
.day-bar i { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--chart-mark); opacity: .85; }
.day-bar.is-zero i { background: var(--line); opacity: 1; }
.day-bar.is-picked i, .day-bar:hover i { opacity: 1; }
.day-bar.is-picked::after { content: ""; position: absolute; inset: 0 -1px auto; height: 100%; border-radius: 4px; background: color-mix(in srgb, var(--chart-mark) 10%, transparent); z-index: -1; }
.day-chart-axis { display: flex; justify-content: space-between; font-size: var(--type-caption); color: var(--muted); }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; }
.bar-row span { font-size: var(--type-small); color: var(--text); }
.bar-row b { font-size: var(--type-small); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.bar-row b small { font-weight: 400; color: var(--muted); }
.bar-row .bar-track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.bar-row .bar-track i { display: block; height: 100%; border-radius: 999px; background: var(--chart-mark); }
.analytics-note { text-align: center; }

/* Рассылка создателя. */
.broadcast-text { min-height: 360px; font-size: var(--type-control); line-height: 1.5; font-family: var(--font); }
.button.is-confirm { background-color: var(--red); --control-stroke: var(--red); color: #fff; }

.kinopoisk-link { align-self: flex-start; font-size: var(--type-body); }
.optional-mark { font-weight: 400; color: var(--muted); font-size: var(--type-caption); }

.visibility-options { gap: 4px; padding: 6px; }
.visibility-option { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; cursor: pointer; }
.visibility-option:has(input:checked) { background: var(--green-soft); }
.visibility-option input[type="radio"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0;
  border: 2px solid var(--line); border-radius: 50%; background: var(--bg);
}
.visibility-option input[type="radio"]:checked { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--bg); }
.visibility-option span { display: flex; flex-direction: column; gap: 2px; }
.visibility-option strong { font-size: var(--type-subheading); font-weight: 500; }
.visibility-option small { font-size: var(--type-small); line-height: 1.4; color: var(--text-soft); }
.section-label { margin: 18px 4px 8px; font-size: var(--type-small); font-weight: 500; color: var(--muted); }
.guide-shot { margin: 0; }
.guide-shot figcaption { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--type-body); }
.guide-shot figcaption .icon { width: var(--icon-inline-size); height: var(--icon-inline-size); flex: none; }
.guide-shot img { display: block; max-width: 100%; height: auto; }
#about-view > section, #about-details-view > section { padding: 12px; }
#about-intro, #about-steps { gap: 8px; }
#about-view .page-title { margin-block: 6px 10px; }
#about-intro p { margin: 0; }
.about-summary-box { padding: 12px; border-radius: var(--radius-cell); background: var(--green-soft); }
.about-summary-box .badge-mint { color: var(--green); font-weight: 600; }
.guide-list { margin: 0; padding-left: 22px; }
.guide-list > li + li { margin-top: 16px; }
.guide-list li::marker { color: var(--muted); font-size: var(--type-small); }
.guide-list .button { height: auto; margin-top: 4px; padding: 3px var(--control-padding); }
.guide-list .hint, .guide-questions p { margin: 4px 0 0; }
.guide-questions, #about-features { gap: 0; }
#about-features .request-summary { padding: 12px 16px 12px 0; }
#about-features .request-body { padding: 0 0 12px; }
.guide-questions h3 { margin-bottom: 4px; }
.guide-questions details + details, #about-features details + details { border-top: 1px solid var(--line-soft); }
.guide-questions summary { cursor: pointer; padding: 9px 0; font-size: var(--type-body); }
.guide-questions details[open] p { margin: 0 0 12px; }
.guide-shot .shot-dark { display: none; }
:root[data-theme="dark"] .guide-shot .shot-light { display: none; }
:root[data-theme="dark"] .guide-shot .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .guide-shot .shot-light { display: none; }
  :root:not([data-theme="light"]) .guide-shot .shot-dark { display: block; }
}
.guide-bubble-buttons { display: flex; gap: 6px; margin-top: 10px; }
.guide-bubble-buttons span { flex: 1; padding: 8px 4px; border-radius: 12px; background: var(--surface); color: var(--text); font-size: var(--type-small); font-weight: 600; text-align: center; }
.search-share-buttons { flex-direction: column; margin-top: 0; }
.search-share-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.catalog-roles-row { margin: 0 -16px; padding: 0 16px; }
/* Справа мягко гаснет, пока есть что листать: видно, что чипы продолжаются. */
.catalog-roles-row .chips.has-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.chips-small button { padding: 0 var(--control-padding); font-size: var(--type-small); }
.filters-toggle { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--bg); color: var(--text); font-size: var(--type-small); font-weight: 500; }
.filters-toggle em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--text); color: var(--on-text); font-size: var(--type-caption); line-height: 18px; text-align: center; }
.filters-toggle em[hidden] { display: none; }
.catalog-filter-bar { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@media (max-width: 360px) {
  .catalog-filter-bar > .chips-choice button { padding-inline: 8px; }
}
.catalog-filters { gap: 8px; }
.filter-switches { display: flex; flex-wrap: wrap; gap: 0 8px; }
.filter-check { display: inline-flex; align-items: center; gap: 8px; padding: 2px var(--control-padding); border-radius: var(--radius-button); font-size: var(--type-small); cursor: pointer; }
.filter-check input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: var(--type-small); color: var(--muted); }
#catalog-filters-reset { align-self: flex-start; font-size: var(--type-small); }

.filmography-upload { gap: 8px; }
.filmography-upload .hint { margin: 0; }

/* QR-код приглашения */
.invite-qr-toggle { align-self: flex-start; margin: -2px 0 2px 4px; }
.invite-qr { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.invite-qr[hidden] { display: none; }
.invite-qr-image { margin: 0 auto; width: 220px; max-width: 100%; aspect-ratio: 1; display: grid; place-items: center; color: var(--text-soft); font-size: var(--type-small); }
.invite-qr-image svg { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Сколько человек нужно */
.people-stepper { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; }
.people-stepper button { width: 44px; height: 44px; border-radius: var(--radius-button); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; }
.people-stepper button:disabled { opacity: .4; }
.people-stepper-small { gap: 6px; }
.people-stepper.people-stepper-small button { width: 32px; height: 32px; font-size: 18px; }
.people-stepper.people-stepper-small input { width: 44px; height: 32px; min-height: 32px; padding: 0; font-size: var(--type-control); }
.people-stepper input { width: 64px; height: 44px; text-align: center; font-size: var(--type-section); font-weight: 600; padding: 0; -moz-appearance: textfield; }
.people-stepper input::-webkit-outer-spin-button, .people-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.people-stepper.is-shaking { animation: stepper-shake .4s ease; }
@keyframes stepper-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Отклики: взять или отказать, профиль по тапу */
.responder-who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.responder-who .row-copy { min-width: 0; }
.responder-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-left: 48px; }
/* Отказ: приглушаем, но текст остаётся читаемым (без opacity на буквах). */
.responder.is-declined .avatar { opacity: .5; }
.responder.is-declined .row-copy strong { color: var(--text-soft); font-weight: 500; }
.pill.muted { background: var(--surface); color: var(--text-soft); }
.request-progress { font-size: var(--type-body); font-weight: 600; color: var(--text); }
.request-progress.is-filled { color: var(--green); }
/* Карточка человека внутри шторки: без второй рамки, крестик не наезжает на имя. */
.person-in-sheet { box-shadow: none; border: 0; border-radius: 0; margin-top: 22px; }
.person-in-sheet:not(.is-open) > .calendar-access-button { margin-top: 0; }
.person-in-sheet .person-summary { padding-right: 48px; }
.person-in-sheet.is-open .person-row { column-gap: 0; padding-inline: 10px; }
.person-in-sheet.is-open .person-summary { gap: 12px; padding-right: 0; }
.person-in-sheet.is-open .person-summary .avatar { width: 56px; height: 56px; }
.person-in-sheet.is-open .person-summary .row-copy strong { font-size: var(--type-title); }
.person-in-sheet.is-open .person-summary .row-copy small { font-size: var(--type-small); }
.person-in-sheet .person-details > :is(.card, .watch-button) { box-shadow: none; border: 1px solid var(--line); }
.person-in-sheet .person-details > .person-actions { padding: 0; border: 0; background: none; }
.person-contact-actions > .button { flex: 1; min-width: 0; padding-inline: 10px; white-space: nowrap; }
.person-in-sheet .person-details > .request-card > .request-summary { padding: 12px 16px; min-height: 56px; }
/* Отступ под крестик нужен только шапке карточки, а не всей карточке: иначе справа пустая полоса. */
.sheet-panel > .stack > .person-in-sheet { padding-right: 0; }
.owner-tools { margin-top: 4px; border: 1px dashed var(--line); border-radius: var(--radius-button, 12px); padding: 0 12px; }
.owner-tools > summary { cursor: pointer; list-style: none; padding: 10px 0; font-size: var(--type-small); font-weight: 500; color: var(--muted); }
.owner-tools > summary::-webkit-details-marker { display: none; }
.owner-tools[open] > summary { color: var(--text); }
.owner-tools > .button { display: block; width: 100%; margin: 0 0 10px; }
#shift-sheet .sheet-panel { overscroll-behavior-y: contain; }
#shift-sheet .sheet-backdrop { touch-action: none; }
@media (prefers-reduced-motion: reduce) {
  .sheet-panel .person-in-sheet, .sheet-panel .person-in-sheet * { transition: none !important; }
}

/* Фильмография: предложение повысить роль */
.filmography-upload .paste-block { margin-top: 2px; }
.filmography-role { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--green-soft, var(--surface)); }
.filmography-role p:first-child { font-size: var(--type-body); line-height: 1.45; }
.crowd-note { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.crowd-note p:first-child { font-size: var(--type-body); font-weight: 600; }
.crowd-note .button { align-self: flex-start; }

/* Ссылки и координаты в запросе */
.rich-text { white-space: pre-line; overflow-wrap: anywhere; }
.rich-link { color: var(--green); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.coords { white-space: nowrap; }
.coords-copy { padding: 1px 6px; border: 1px dashed var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; cursor: copy; }

/* Позвать на смену */
.invite-button { width: 100%; }
.invite-into { width: 100%; height: auto; min-height: 44px; padding: 10px 14px; text-align: left; white-space: normal; line-height: 1.3; }
.invite-or { margin-top: 6px; }
#invite-sheet .sheet-panel { gap: 12px; }
#invite-form label { display: grid; gap: 6px; }
#invite-form label > span { display: flex; justify-content: space-between; gap: 8px; font-size: var(--type-caption); color: var(--muted); }
.chips-multi button.active { background-color: var(--text); color: var(--bg); }
#request-bring-other { margin-top: 8px; }
.chips-multi { flex-wrap: wrap; overflow: visible; }
.chips-multi button { padding: 0 var(--control-padding); font-size: var(--type-small); }

/* Чужой график: выбранные дни и кнопка «Позвать» */
#person-calendar-months .cell.edge { background: var(--text); color: var(--bg); }
#person-calendar-months .cell.range { background: var(--green-soft); }
#person-calendar-months button.cell { border: 0; font: inherit; cursor: pointer; }
.person-invite-bar { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.person-invite-bar span { font-size: var(--type-small); color: var(--text-soft); }

/* Запрос голосом */
/* Два способа не заполнять форму руками — с объяснением, что произойдёт. */
.request-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.row-card-quick { padding: 10px 14px; }
.row-card-quick .row-icon { font-size: var(--type-title); }
.row-card-quick .row-copy strong { font-size: var(--type-section); }
.row-card-quick .row-copy small { font-size: 12.5px; line-height: 1.35; }
.voice-card { gap: 10px; margin-bottom: 12px; }
.voice-head { display: flex; flex-direction: column; gap: 4px; }
.voice-hint { font-size: var(--type-small); }
.voice-record.is-recording { background: var(--red); border-color: var(--red); color: #fff; animation: voice-pulse 1.4s ease-in-out infinite; }
@keyframes voice-pulse { 50% { opacity: .75; } }

.invite-status { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); font-size: var(--type-small); color: var(--text); }
.invite-status-line { font-size: var(--type-small); }

/* Вход без Telegram */
.web-login { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; }
.web-login-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 8px; }
.web-login-brand img { border-radius: 18px; box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.web-login-brand .page-title { margin: 8px 0 0; }
.web-login-code { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.web-login .button { text-align: center; text-decoration: none; }
#worker-login .button { min-height: 44px; }
.web-login-qr summary { color: var(--green); cursor: pointer; list-style: none; }
.web-login-qr summary::-webkit-details-marker { display: none; }
.web-login-qr svg { display: block; width: 180px; height: 180px; margin: 8px auto 0; background: #fff; border-radius: 8px; }
/* Лендинг на экране входа: те же карточки, кнопки и токены, что в приложении. */
.lp { display: flex; flex-direction: column; gap: 32px; margin-top: 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.lp-hero { display: flex; flex-direction: column; gap: 12px; }
.lp-title { margin: 0; font-size: var(--type-title); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; }
.lp-lead { margin: 0; font-size: var(--type-subheading); line-height: 1.5; color: var(--text-soft); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lp-actions .button { flex: 1 1 180px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.lp-note { margin: 0; font-size: var(--type-caption); color: var(--muted); }
.lp-section { display: flex; flex-direction: column; gap: 12px; }
.lp-h { margin: 0; font-size: var(--type-title); font-weight: 500; letter-spacing: -.02em; }
.lp-roles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lp-roles li { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-button); font-size: var(--type-small); font-weight: 500; }
.lp-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.lp-item { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 2px; align-content: start; }
.lp-item .row-icon { grid-row: span 2; }
.lp-item h3 { margin: 2px 0 0; font-size: var(--type-subheading); font-weight: 600; }
.lp-item .hint { margin: 0; }
.lp-steps { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: lp; }
.lp-steps li { position: relative; display: flex; flex-direction: column; gap: 2px; padding-left: 40px; counter-increment: lp; }
.lp-steps li::before { content: counter(lp); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--on-text); font-size: var(--type-small); font-weight: 600; }
.lp-steps strong { font-size: var(--type-subheading); font-weight: 600; }
.lp-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 32px; text-align: center; }
.lp-foot .button { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 320px; }
@media (min-width: 720px) {
  .lp-grid { grid-template-columns: 1fr 1fr; }
  .lp-title { font-size: var(--type-title); }
}
.install-card { display: flex; flex-direction: column; gap: 10px; }

.role-inbox-links { display: flex; gap: 16px; margin-top: 6px; }
.role-inbox-links .link { padding: 0; font-size: var(--type-body); }
.role-inbox-person strong { cursor: pointer; }

.responder-strikes { color: var(--red); font-size: var(--type-caption); }
.strike-badge { display: inline-flex; align-items: center; vertical-align: 1px; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); font-size: var(--type-caption); font-weight: 600; }
.strike-inline { color: var(--red); white-space: normal; }

/* Выбор, кому отправить выжимку: длинный список листается внутри шторки */
.team-picker-list { max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.team-picker-list .switch-row { padding: 6px 0; }

/* ---------- Мои запросы: свёрнутые карточки ---------- */
.requests-filters { margin-bottom: 2px; }
#requests-filters, #searches-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
#requests-filters { grid-template-columns: repeat(3, minmax(max-content, 1fr)); }
#requests-filters button, #searches-filters button { min-width: 0; height: 44px; padding-inline: 2px; font-size: var(--type-small); white-space: nowrap; }
body.has-tabbar.is-root-view #requests-view.response-focused .top-bar-back .back { display: inline-flex; }
.pill.shift-status { display: inline-flex; align-self: flex-start; width: fit-content; min-height: 24px; padding: 3px 8px; }
.chip-count { margin-left: 4px; font-weight: 600; opacity: .7; }
.request-card { padding: 0; overflow: hidden; }
.request-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.request-summary::-webkit-details-marker { display: none; }
.request-dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--muted); }
.request-dot.is-pending { background: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 18%, transparent); }
.request-dot.is-open { background: var(--green-dot); }
.request-dot.is-filled { background: var(--green); }
.request-dot.is-closed { background: var(--line); }
.request-summary-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.request-summary-copy strong { font-size: var(--type-section); font-weight: 600; letter-spacing: -.01em; }
.request-summary-copy small { font-size: var(--type-small); color: var(--text-soft); }
.request-counts { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.request-chevron { flex: 0 0 auto; align-self: center; font-size: 22px; line-height: 1; color: var(--muted); transform: rotate(90deg); transition: transform .15s ease; }
.request-card[open] > .request-summary > .request-chevron { transform: rotate(-90deg); }
.request-card[open] > .request-summary { border-bottom: 1px solid var(--line-soft); }
.request-body { padding: 14px 16px 16px; }
.shift-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.shift-steps li { padding-top: 5px; border-top: 3px solid var(--line); text-align: center; color: var(--muted); font-size: var(--type-small); }
.shift-steps .is-done { border-color: var(--green); }
.shift-steps [aria-current="step"] { border-color: var(--green); color: var(--green); font-weight: 700; }
.shift-team-preview h4 { margin: 0; }
.shift-team-preview ul { padding: 0; margin: 6px 0 0; list-style: none; }
.shift-team-preview li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 6px 0; overflow-wrap: anywhere; }
.shift-team-preview li + li { border-top: 1px solid var(--line-soft); }
.shift-team-preview small { font-size: var(--type-small); }
.shift-confirmed { color: var(--green); }
.shift-card-danger { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.shift-card-danger .link { min-height: 44px; }
.request-card.is-closed .request-summary-copy strong { color: var(--text-soft); }

/* Задачи и чек-листы */
.tasks-record { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tasks-record.is-recording { background: var(--red); border-color: var(--red); color: #fff; animation: voice-pulse 1.4s ease-in-out infinite; }
.tasks-type textarea { width: 100%; margin: 8px 0; }
.tasks-title-input { width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--type-section); font-weight: 600; }
.tasks-title-input:focus { outline: none; border-bottom-color: var(--green); }
.page-title-input { font-size: var(--type-title); letter-spacing: -.01em; }
#checklist-view .page-head { display: flex; flex-direction: column; gap: 8px; }
#checklist-view .page-head .hint { margin: 0; }

.checklist { display: flex; flex-direction: column; }
.checklist-section { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 4px 6px; font-size: var(--type-small); font-weight: 600; color: var(--muted); text-transform: none; }
.checklist-section:first-child { margin-top: 4px; }
.checklist-section small { font-weight: 500; font-variant-numeric: tabular-nums; }
.checklist-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line-soft); background: var(--bg); cursor: pointer; }
.checklist-item.is-draft { cursor: default; padding-left: 4px; }
.checklist-item.is-draft::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--green-dot); }
.checklist-item input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--green); cursor: pointer; }
.checklist-text { flex: 1; min-width: 0; font-size: var(--type-subheading); line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.checklist-text small { display: block; margin-top: 2px; font-size: var(--type-caption); color: var(--muted); }
.checklist-item.is-done .checklist-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--placeholder); }
.checklist-remove { flex: none; width: 32px; height: 32px; margin: -5px -6px -5px 0; border-radius: 8px; background: transparent; color: var(--placeholder); font-size: var(--type-title); line-height: 1; }
.checklist-remove:hover, .checklist-remove:focus-visible { color: var(--red); background: var(--red-soft); }

.checklist-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.checklist-add select { flex: 1 1 100%; min-width: 0; }
.checklist-add input { flex: 1; min-width: 0; }
.checklist-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.checklist-actions .link { align-self: center; padding: 6px; }

.checklist-row { align-items: center; }
.checklist-row .row-copy { gap: 3px; }
.progress-track-small { height: 4px; margin-top: 6px; }
.checklist-count { flex: none; font-size: var(--type-small); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tasks-templates, .tasks-mine { margin-top: 4px; }

/* Особые цвета и узоры. Узор лежит в --project-img и масштабируется через --u:
   1px на образце в ~90px, меньше на кружках и днях календаря. --project-halo
   обводит цифры на узоре, чтобы они читались на любом участке. */
.color-dot[class*=" c-"], .color-chip[class*=" c-"], .swatch.has-color, .cell.busy.has-color {
  background-color: var(--project);
  background-image: var(--project-img, none);
  background-size: var(--project-size, auto);
  background-position: var(--project-pos, 0 0);
}
.cell.busy.has-color { --u: .5px; text-shadow: 0 0 2px var(--project-halo, transparent), 0 0 2px var(--project-halo, transparent), 0 0 4px var(--project-halo, transparent), 0 0 4px var(--project-halo, transparent), 0 0 6px var(--project-halo, transparent); }
.color-chip { --u: .4px; }
.color-dot { --u: .12px; }
.swatch.has-color { --u: .14px; }
.c-amanita { --project: #d62828; --project-img: radial-gradient(circle at 20% 24%, #fff 0 9%, transparent calc(9% + .6px)), radial-gradient(circle at 62% 16%, #fff 0 6%, transparent calc(6% + .6px)), radial-gradient(circle at 82% 52%, #fff 0 10%, transparent calc(10% + .6px)), radial-gradient(circle at 40% 62%, #fff 0 7%, transparent calc(7% + .6px)), radial-gradient(circle at 12% 84%, #fff 0 5%, transparent calc(5% + .6px)), radial-gradient(circle at 64% 86%, #fff 0 6%, transparent calc(6% + .6px)); --project-ink: #ffffff; --project-halo: #7a0f0f; }
.c-khaki { --project: #6b7a3a; --project-ink: #ffffff; --project-halo: #39411d; }
.c-camo { --project: #7a7f4a; --project-img: radial-gradient(ellipse 34% 22% at 18% 26%, #4f5a2c 98%, transparent), radial-gradient(ellipse 28% 30% at 58% 18%, #5d4a32 98%, transparent), radial-gradient(ellipse 30% 22% at 84% 48%, #4f5a2c 98%, transparent), radial-gradient(ellipse 26% 28% at 36% 68%, #a3a06a 98%, transparent), radial-gradient(ellipse 30% 20% at 74% 86%, #5d4a32 98%, transparent), radial-gradient(ellipse 22% 26% at 8% 86%, #4f5a2c 98%, transparent); --project-ink: #ffffff; --project-halo: #2c331a; }
.c-checker { --project: #f4f4f0; --project-img: conic-gradient(#111 25%, transparent 0 50%, #111 0 75%, transparent 0); --project-size: calc(30 * var(--u)) calc(30 * var(--u)); --project-ink: #ffffff; --project-halo: #000000; }
.c-stripes { --project: #f4f6fa; --project-img: repeating-linear-gradient(0deg, #f4f6fa 0 calc(8 * var(--u)), #1f4e9c calc(8 * var(--u)) calc(16 * var(--u))); --project-ink: #ffffff; --project-halo: #0d2a5c; }
.c-gaffer { --project: #7d8085; --project-img: repeating-linear-gradient(45deg, rgba(255,255,255,.10) 0 calc(2 * var(--u)), transparent calc(2 * var(--u)) calc(4 * var(--u))), repeating-linear-gradient(-45deg, rgba(0,0,0,.12) 0 calc(2 * var(--u)), transparent calc(2 * var(--u)) calc(4 * var(--u))); --project-ink: #ffffff; --project-halo: #2a2c30; }
.c-hazard { --project: #f5c400; --project-img: repeating-linear-gradient(45deg, #f5c400 0 calc(12 * var(--u)), #161616 calc(12 * var(--u)) calc(24 * var(--u))); --project-ink: #ffffff; --project-halo: #000000; }
.c-film { --project-line: var(--green); --project: #1b1a18; --project-img: repeating-linear-gradient(90deg, #efe9d6 0 calc(8 * var(--u)), transparent calc(8 * var(--u)) calc(18 * var(--u))), repeating-linear-gradient(90deg, #efe9d6 0 calc(8 * var(--u)), transparent calc(8 * var(--u)) calc(18 * var(--u))); --project-size: 100% calc(9 * var(--u)), 100% calc(9 * var(--u)); --project-pos: 0 calc(8 * var(--u)), 0 calc(100% - calc(8 * var(--u))); --project-ink: #ffffff; --project-halo: #000000; }
.c-pinstripe { --project-line: var(--green); --project: #1d2a44; --project-img: repeating-linear-gradient(90deg, transparent 0 calc(13 * var(--u)), rgba(255,255,255,.6) calc(13 * var(--u)) calc(14 * var(--u))); --project-ink: #ffffff; --project-halo: #0b1224; }
.c-polka { --project: #1f4e9c; --project-img: radial-gradient(circle, #fff 0 calc(2.5 * var(--u)), transparent calc(calc(2.5 * var(--u)) + .5px)), radial-gradient(circle, #fff 0 calc(2.5 * var(--u)), transparent calc(calc(2.5 * var(--u)) + .5px)); --project-size: calc(16 * var(--u)) calc(16 * var(--u)); --project-pos: 0 0, calc(8 * var(--u)) calc(8 * var(--u)); --project-ink: #ffffff; --project-halo: #0d2a5c; }
.c-noir { --project-line: var(--green); --project: #0a0a0a; --project-img: linear-gradient(115deg, #0a0a0a 0 36%, #e8e6df 36% 44%, #0a0a0a 44% 62%, #cfcdc6 62% 64%, #0a0a0a 64%); --project-ink: #ffffff; --project-halo: #000000; }
.c-technicolor { --project: #e63946; --project-img: linear-gradient(120deg, #e63946 0 33%, #fed766 33% 66%, #2ab7ca 66%); --project-ink: #111111; --project-halo: rgba(255,255,255,.85); }
.c-sepia { --project: #a98356; --project-img: radial-gradient(rgba(0,0,0,.28) 1px, transparent 1.6px), radial-gradient(rgba(255,255,255,.22) 1px, transparent 1.6px); --project-size: 5px 5px, 7px 7px; --project-pos: 0 0, 2px 3px; --project-ink: #ffffff; --project-halo: #4a3620; }
.c-vhs { --project-line: var(--green); --project: #10102a; --project-img: repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 3px), linear-gradient(transparent 28%, rgba(255,45,149,.6) 28% 35%, transparent 35% 62%, rgba(0,229,255,.55) 62% 67%, transparent 67%); --project-ink: #ffffff; --project-halo: #000000; }
.c-forest { --project-line: var(--green); --project: #24503a; --project-img: linear-gradient(135deg, #14291d 25%, transparent 25%), linear-gradient(225deg, #14291d 25%, transparent 25%), linear-gradient(315deg, #14291d 25%, transparent 25%), linear-gradient(45deg, #14291d 25%, transparent 25%); --project-size: calc(28 * var(--u)) calc(28 * var(--u)); --project-pos: calc(-14 * var(--u)) 0, calc(-14 * var(--u)) 0, 0 0, 0 0; --project-ink: #ffffff; --project-halo: #0d1a12; }
.c-digital { --project: #7a8450; --project-img: linear-gradient(#4a5530, #4a5530), linear-gradient(#4a5530, #4a5530), linear-gradient(#5d4a32, #5d4a32), linear-gradient(#5d4a32, #5d4a32), linear-gradient(#a3a06a, #a3a06a), linear-gradient(#a3a06a, #a3a06a), linear-gradient(#3c4526, #3c4526), linear-gradient(#3c4526, #3c4526); --project-size: 22% 16%, 14% 20%, 18% 14%, 12% 22%, 20% 14%, 14% 16%, 16% 12%, 10% 18%; --project-pos: 6% 10%, 70% 8%, 40% 30%, 84% 42%, 12% 52%, 56% 60%, 30% 84%, 78% 82%; --project-ink: #ffffff; --project-halo: #2a3018; }
.c-sunset { --project: #ff5e78; --project-img: linear-gradient(180deg, #2b1055 0%, #7a2a7a 30%, #ff5e78 60%, #ffb347 85%, #ffd27a 100%); --project-ink: #ffffff; --project-halo: #2b1055; }
.c-neon { --project-line: var(--green); --project: #14041f; --project-img: linear-gradient(135deg, #14041f 0 34%, #ff3cac 34% 39%, #14041f 39% 55%, #2bd2ff 55% 60%, #14041f 60%); --project-ink: #ffffff; --project-halo: #14041f; }
.c-digital, .c-film { --project-repeat: no-repeat; }
.c-film { --project-repeat: repeat-x; }
.color-dot[class*=" c-"], .color-chip[class*=" c-"], .swatch.has-color, .cell.busy.has-color { background-repeat: var(--project-repeat, repeat); }
/* Тёмные узоры на тёмной теме теряют край: тонкий нейтральный контур. */
.cell.busy.has-color { box-shadow: inset 0 0 0 1px var(--pattern-edge, transparent); }
.swatch.has-color { box-shadow: 0 0 0 1px var(--pattern-edge, transparent); }
.color-chip[class*=" c-"] { box-shadow: inset 0 0 0 3px var(--bg), 0 0 0 1px rgba(128, 128, 128, .45); }
.color-dot[class*=" c-"] { box-shadow: 0 0 0 1px rgba(128, 128, 128, .4); }
/* Цифры на узорах крупнее и жирнее, иначе сливаются с рисунком. */
:is(.cell, .day).busy.has-color:is(.c-photo, .c-beach, .c-umbrella, .c-chair, .c-sun, .c-palm, .c-suitcase, .c-plane, .c-drink, .c-amanita, .c-khaki, .c-camo, .c-checker, .c-stripes, .c-gaffer, .c-hazard, .c-film, .c-pinstripe, .c-polka, .c-noir, .c-technicolor, .c-sepia, .c-vhs, .c-forest, .c-digital, .c-sunset, .c-neon) {
  font-size: var(--type-section);
  font-weight: 800;
  text-shadow: 0 0 2px var(--project-halo), 0 0 2px var(--project-halo), 0 0 3px var(--project-halo), 0 0 4px var(--project-halo), 0 0 4px var(--project-halo), 0 0 7px var(--project-halo), 0 0 7px var(--project-halo);
}
/* Сегодня выбран в календаре запроса: .today ниже .edge по файлу и перекрашивал фон
   в белый, а цифра оставалась белой. Выбор побеждает «сегодня». */
.cell.today.edge { background: var(--green); color: var(--on-text); border-color: var(--green); }
.cell.today.range { background: var(--green-soft); color: var(--green); }
#person-calendar-months .cell.today.edge { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Своё фото проекта: картинку JS кладёт в --project-img вместе с затемнением. */
.c-photo { --project: #4b4b4b; --project-size: cover; --project-pos: center; --project-repeat: no-repeat; --project-ink: #ffffff; --project-halo: #000000; }
.color-chip-photo { position: relative; display: inline-block; overflow: hidden; background: var(--surface); border: 2px dashed var(--muted); box-shadow: none; }
.color-chip-photo::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: var(--type-title); line-height: 1; }
.color-chip-photo.has-image { border: 2px solid transparent; background-size: cover; background-position: center; box-shadow: inset 0 0 0 3px var(--bg); }
.color-chip-photo.has-image::after { content: none; }
.color-chip-photo[aria-checked="true"] { border-color: var(--text); }
.color-chip-photo input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }

/* Подсказка по занятому дню: наведение мыши, долгое нажатие или тап в чужом графике. */
.day-popup { position: fixed; z-index: 80; display: flex; flex-direction: column; gap: 2px; max-width: 220px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: var(--type-small); line-height: 1.3; pointer-events: none; overflow-wrap: anywhere; }
.day-popup small { color: var(--muted); font-size: var(--type-caption); }
.cell, .day { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.day-popup strong { font-weight: 600; }

/* Линейные иллюстрации на белом (отпуск, отдых). В ячейке линия бледная, чтобы цифра читалась,
   в кружке и точке — насыщенная. */
.c-beach { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(-1 -6) scale(.86)'%3E%3Cpath d='M6 30C6 17 18 9 32 9s26 8 26 21'/%3E%3Cpath d='M6 30q6.5-7 13-0 6.5-7 13 0 6.5-7 13 0 6.5-7 13 0'/%3E%3Cpath d='M32 9v0M19 30C20 21 25 12 32 9M45 30C44 21 39 12 32 9M32 30V9'/%3E%3Cpath d='M32 30v25'/%3E%3Cpath d='M32 6v3'/%3E%3C/g%3E%3Cg transform='translate(24 24) scale(.6)'%3E%3Cpath d='M8 14l8-6 20 28-8 6z'/%3E%3Cpath d='M14 11l19 26M11 16l19 26' opacity='0'/%3E%3Cpath d='M28 42l8-6 21-3-2 8z'/%3E%3Cpath d='M36 36l-14 22'/%3E%3Cpath d='M55 41l-8 17'/%3E%3Cpath d='M32 40l14 18'/%3E%3Cpath d='M6 58h52'/%3E%3C/g%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(-1 -6) scale(.86)'%3E%3Cpath d='M6 30C6 17 18 9 32 9s26 8 26 21'/%3E%3Cpath d='M6 30q6.5-7 13-0 6.5-7 13 0 6.5-7 13 0 6.5-7 13 0'/%3E%3Cpath d='M32 9v0M19 30C20 21 25 12 32 9M45 30C44 21 39 12 32 9M32 30V9'/%3E%3Cpath d='M32 30v25'/%3E%3Cpath d='M32 6v3'/%3E%3C/g%3E%3Cg transform='translate(24 24) scale(.6)'%3E%3Cpath d='M8 14l8-6 20 28-8 6z'/%3E%3Cpath d='M14 11l19 26M11 16l19 26' opacity='0'/%3E%3Cpath d='M28 42l8-6 21-3-2 8z'/%3E%3Cpath d='M36 36l-14 22'/%3E%3Cpath d='M55 41l-8 17'/%3E%3Cpath d='M32 40l14 18'/%3E%3Cpath d='M6 58h52'/%3E%3C/g%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.c-umbrella { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 30C6 17 18 9 32 9s26 8 26 21'/%3E%3Cpath d='M6 30q6.5-7 13-0 6.5-7 13 0 6.5-7 13 0 6.5-7 13 0'/%3E%3Cpath d='M32 9v0M19 30C20 21 25 12 32 9M45 30C44 21 39 12 32 9M32 30V9'/%3E%3Cpath d='M32 30v25'/%3E%3Cpath d='M32 6v3'/%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 30C6 17 18 9 32 9s26 8 26 21'/%3E%3Cpath d='M6 30q6.5-7 13-0 6.5-7 13 0 6.5-7 13 0 6.5-7 13 0'/%3E%3Cpath d='M32 9v0M19 30C20 21 25 12 32 9M45 30C44 21 39 12 32 9M32 30V9'/%3E%3Cpath d='M32 30v25'/%3E%3Cpath d='M32 6v3'/%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.c-chair { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 14l8-6 20 28-8 6z'/%3E%3Cpath d='M14 11l19 26M11 16l19 26' opacity='0'/%3E%3Cpath d='M28 42l8-6 21-3-2 8z'/%3E%3Cpath d='M36 36l-14 22'/%3E%3Cpath d='M55 41l-8 17'/%3E%3Cpath d='M32 40l14 18'/%3E%3Cpath d='M6 58h52'/%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 14l8-6 20 28-8 6z'/%3E%3Cpath d='M14 11l19 26M11 16l19 26' opacity='0'/%3E%3Cpath d='M28 42l8-6 21-3-2 8z'/%3E%3Cpath d='M36 36l-14 22'/%3E%3Cpath d='M55 41l-8 17'/%3E%3Cpath d='M32 40l14 18'/%3E%3Cpath d='M6 58h52'/%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.c-sun { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='32' cy='24' r='9'/%3E%3Cpath d='M32 6v4M32 38v4M14 24h4M46 24h4M19 11l3 3M45 11l-3 3M19 37l3-3M45 37l-3-3'/%3E%3Cpath d='M6 50q6-6 13 0t13 0 13 0 13 0'/%3E%3Cpath d='M6 58q6-6 13 0t13 0 13 0 13 0'/%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='32' cy='24' r='9'/%3E%3Cpath d='M32 6v4M32 38v4M14 24h4M46 24h4M19 11l3 3M45 11l-3 3M19 37l3-3M45 37l-3-3'/%3E%3Cpath d='M6 50q6-6 13 0t13 0 13 0 13 0'/%3E%3Cpath d='M6 58q6-6 13 0t13 0 13 0 13 0'/%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.c-palm { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M31 58c0-14 1-26 5-38'/%3E%3Cpath d='M36 20c-8-7-18-6-24 0 8-2 15 0 24 0zM36 20c-2-9 3-16 12-16-3 5-4 9-12 16zM36 20c8-5 16-3 20 4-8-3-13-1-20-4zM36 20c-9 1-14 8-14 15 5-8 9-11 14-15z'/%3E%3Cpath d='M8 58h48'/%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M31 58c0-14 1-26 5-38'/%3E%3Cpath d='M36 20c-8-7-18-6-24 0 8-2 15 0 24 0zM36 20c-2-9 3-16 12-16-3 5-4 9-12 16zM36 20c8-5 16-3 20 4-8-3-13-1-20-4zM36 20c-9 1-14 8-14 15 5-8 9-11 14-15z'/%3E%3Cpath d='M8 58h48'/%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.c-suitcase { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='20' width='44' height='32' rx='5'/%3E%3Cpath d='M24 20v-5a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v5'/%3E%3Cpath d='M10 34h44M28 34v4h8v-4'/%3E%3Cpath d='M18 52v4M46 52v4'/%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='20' width='44' height='32' rx='5'/%3E%3Cpath d='M24 20v-5a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v5'/%3E%3Cpath d='M10 34h44M28 34v4h8v-4'/%3E%3Cpath d='M18 52v4M46 52v4'/%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.c-plane { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 38l52-22-14 36-12-14-10 8 2-14z'/%3E%3Cpath d='M34 38l24-22'/%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 38l52-22-14 36-12-14-10 8 2-14z'/%3E%3Cpath d='M34 38l24-22'/%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.c-drink { --project: #ffffff; --project-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%238dbca3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 14h36L32 36z'/%3E%3Cpath d='M32 36v20M22 56h20'/%3E%3Cpath d='M40 14l8-9M46 8l6 3'/%3E%3Cpath d='M19 20h26'/%3E%3C/svg%3E"); --project-img-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%231f6f4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 14h36L32 36z'/%3E%3Cpath d='M32 36v20M22 56h20'/%3E%3Cpath d='M40 14l8-9M46 8l6 3'/%3E%3Cpath d='M19 20h26'/%3E%3C/svg%3E"); --project-size: 86%; --project-pos: center; --project-repeat: no-repeat; --project-ink: #111111; --project-halo: #ffffff; }
.color-chip:is(.c-beach, .c-umbrella, .c-chair, .c-sun, .c-palm, .c-suitcase, .c-plane, .c-drink), .color-dot:is(.c-beach, .c-umbrella, .c-chair, .c-sun, .c-palm, .c-suitcase, .c-plane, .c-drink), .swatch.has-color:is(.c-beach, .c-umbrella, .c-chair, .c-sun, .c-palm, .c-suitcase, .c-plane, .c-drink) { background-image: var(--project-img-strong); }
.color-chip:is(.c-beach, .c-umbrella, .c-chair, .c-sun, .c-palm, .c-suitcase, .c-plane, .c-drink), .color-dot:is(.c-beach, .c-umbrella, .c-chair, .c-sun, .c-palm, .c-suitcase, .c-plane, .c-drink) { background-size: 90%; }
:is(.cell, .day).busy.has-color:is(.c-beach, .c-umbrella, .c-chair, .c-sun, .c-palm, .c-suitcase, .c-plane, .c-drink) { border-color: #cfd9d3; box-shadow: none; }

/* Пометка в каталоге: этого человека ты уже звал лично. */
.invited-inline { color: var(--green); white-space: normal; overflow-wrap: anywhere; }
.invited-busy, .invited-declined { color: var(--muted); }
.invited-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: var(--type-caption); font-weight: 600; line-height: 1.5; vertical-align: 1px; white-space: nowrap; }

.recent-events { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
.recent-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: var(--type-small); }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-row select { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); padding: 0 10px; font: inherit; font-size: var(--type-control); }

.catalog-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 0 12px; margin: 12px 0; }
.catalog-search .icon { flex: none; stroke: var(--muted); fill: none; stroke-width: 1.6; }
.catalog-search input { flex: 1; min-height: 44px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--type-control); outline: none; min-width: 0; }

.row-card-soon { opacity: 0.55; filter: grayscale(1); cursor: default; }
.row-card-soon:hover { background: inherit; }
.soon-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: var(--type-caption); font-style: normal; font-weight: 600; vertical-align: 1px; white-space: nowrap; }

/* Группа запроса в две строки: название и «×», ниже «Человек» и «Начало» по половине ширины (QA 25.10, SC-02). */
.group-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; grid-template-areas: "title title remove" "count start start"; gap: 8px; align-items: end; }
.group-row .group-title { grid-area: title; }
.group-row .group-remove { grid-area: remove; }
.group-row .group-count { grid-area: count; }
.group-row .group-start { grid-area: start; }
.group-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.group-row input { width: 100%; min-width: 0; height: 44px; padding: 0 10px; border-radius: var(--radius-button); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: var(--type-control); }
.group-row button { height: 44px; border: 0; background: transparent; color: var(--muted); font-size: var(--type-title); }
.request-group-line { font-size: var(--type-small); color: var(--muted); }
.request-group-line b { color: var(--text); }

.photo-step-preview { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; align-self: center; }
.taken-row { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.taken-row:first-of-type { border-top: 0; padding-top: 0; }
.taken-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.taken-open { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.taken-more { color: var(--green); font-weight: 500; }
.taken-details { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.taken-details li { padding-left: 16px; position: relative; color: var(--text); }
.taken-details li:before { content: "•"; position: absolute; left: 0; color: var(--muted); }
.taken-comment { margin: 0; white-space: pre-line; }
#home-view[data-mode="people"] #taken-shifts[hidden] + #seeker-responses { display: none; }
.taken-author { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.photo-review-row { display: flex; gap: 12px; align-items: flex-start; }
.photo-review-image { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; background: var(--line-soft); }
.quote-card { display: flex; flex-direction: column; gap: 6px; }
#quote-author { align-self: flex-end; }
.quote-text { margin: 0; font-size: var(--type-section); line-height: 1.4; font-style: italic; white-space: pre-line; }

/* Под отчёт */
.receipt-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.receipt-row:first-child { border-top: 0; }
.receipt-row .row-copy { flex: 1 1 auto; min-width: 0; }
.receipt-row .link { flex: 0 0 auto; }
.row-card.is-muted { opacity: .7; }
.inline-prompt { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.inline-prompt input { flex: 1 1 auto; min-width: 0; }

/* Именной значок от создателя */
.custom-badge { display: inline-block; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: -5px; margin-left: 2px; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.person-in-sheet .custom-badge { width: 32px; height: 32px; vertical-align: -9px; }
.owner-role-chips { margin-bottom: 10px; }
.owner-tools > .hint { margin: 4px 0; }


/* Mini Apps 2.0: полный экран. Telegram отдаёт отступы системных панелей через CSS-переменные,
   шапка и контент уезжают под них. */
body.is-fullscreen .screen > .top-bar {
  padding-top: calc(10px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
body.is-fullscreen { padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
/* Отступ под системную шапку уже даёт body: у обёртки свой «safe-area» не нужен, иначе над заголовком
   экрана воздух в два раза больше (на iPhone около 50 px лишних). */
body.is-fullscreen .app-shell { padding-top: 18px; }
#fullscreen-toggle { margin-left: 6px; font-size: 18px; line-height: 1; }
#calendar-today + #fullscreen-toggle { margin-left: 6px; }
.location-card .hint { margin-bottom: 0; }


/* Пасхалка «Площадка»: монохром, зелёный акцент, во весь экран поверх всего. */
.game { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--bg); color: var(--ink, #141414); padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)); }
.game[hidden] { display: none; }
/* Полный экран Telegram: сверху его кнопки «Закрыть» и «⌄ ⋯», счёт и крестик уходили под них (владелец 25.10).
   Отступ на высоту этих кнопок, как у титров. */
body.is-fullscreen .game { padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 12px); }
.game-top { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.game-title { font-weight: 700; }
.game-score { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--green); }
.game-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: var(--type-section); cursor: pointer; }
.game-stage { position: relative; flex: 1; min-height: 0; display: flex; }
#game-canvas { flex: 1; width: 100%; height: 100%; min-height: 0; border-radius: 16px; background: var(--green-soft); touch-action: manipulation; display: block; }
.game-hint { margin-top: 10px; font-size: var(--type-small); color: var(--muted); text-align: center; }
.game-hint b { color: var(--ink, #141414); }


/* Номер не рвётся на две строки и не сжимается, когда рядом длинная подпись (машина и госномер, 17.10). */
.phone-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.phone-icon { width: var(--icon-size); height: var(--icon-size); flex: none; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }

.taken-head .row-copy { gap: 4px; }
.taken-status { align-self: flex-start; padding: 3px 8px; font-size: var(--type-caption); border-radius: 7px; margin-bottom: 4px; }
.taken-head .row-copy > strong { font-weight: 600; }

.project-confirmed { font-style: normal; font-size: var(--type-caption); font-weight: 500; color: var(--green); background: var(--green-soft); border-radius: 7px; padding: 1px 7px; vertical-align: 1px; }
.project-confirm-button { display: block; font-size: var(--type-small); margin-top: 2px; }
.projects-confirm { display: flex; flex-direction: column; gap: 4px; margin: 6px 2px 4px; }
.projects-confirm .link { align-self: flex-start; }
.projects-confirmed summary { font-size: var(--type-small); color: var(--muted); cursor: pointer; }
.projects-confirmed > div { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px 5px; padding-left: 12px; border-left: 2px solid var(--line); }
.projects-confirmed p { margin: 0; display: flex; flex-direction: column; gap: 1px; }
.projects-confirmed strong { font-size: var(--type-body); font-weight: 500; }
.projects-confirmed small { font-size: var(--type-small); color: var(--green); }

/* Состав проекта */
.crew-back { align-self: flex-start; }
.crew-progress { display: flex; flex-direction: column; gap: 6px; }
.crew-progress-line { display: flex; justify-content: space-between; align-items: baseline; }
.crew-bar { height: 8px; border-radius: 6px; background: var(--surface); overflow: hidden; }
.crew-bar i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.crew-group { display: flex; flex-direction: column; }
.crew-group-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.crew-slot { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.crew-group .crew-slot:first-of-type { border-top: 0; }
.crew-slot .row-copy small { color: var(--muted); }
/* Табель: предупреждение (оплата третьему лицу) оранжевым, как остальные предупреждения. */
.crew-slot .row-copy small.attention { color: var(--orange); }
/* Ставки Kinorates: сумма читается сразу, предупреждение об архивной ставке оранжевым, как «внимание» в табеле. */
@media (max-width: 1099px) {
  .sheet-panel:has(.kinorates-title) {
    height: 85vh;
    height: 85svh;
    overscroll-behavior-y: contain;
  }
  .sheet-panel:has(.kinorates-title) > .sheet-grip { flex: none; }
  #crew-sheet:has(.kinorates-title) .sheet-backdrop { touch-action: none; }
  html:has(#crew-sheet:not([hidden]) .kinorates-title) { overflow-y: hidden; }
}
.kinorates-results .crew-slot:not([hidden]) { animation: none; }
.crew-slot .row-copy small.kinorates-money { color: var(--text); font-weight: 500; }
.hint.attention-text { color: var(--orange); }
/* Неутверждённое время смены на плитке КПП (владелец 28.10). */
.wg-sub .attention, .wg-kpp-head small.attention { color: var(--orange); }
.crew-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 600; font-size: var(--type-body); }
.crew-av-empty { background: var(--surface); color: var(--muted); border: 1px dashed var(--line); }
.pill.crew-wait { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
/* Подписи разделов обычными буквами, как .section-label: капслок был только тут (аудит 21.10). */
.crew-label { font-size: var(--type-small); font-weight: 500; color: var(--muted); margin-top: 6px; }
.crew-candidates .crew-slot { cursor: default; }
.timesheet-member { border-top: 1px solid var(--line); padding: 6px 0; }
.timesheet-member > .request-details { border: 0; padding: 0; }
.timesheet-member > .request-details > summary { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
.timesheet-member .row-copy strong, .timesheet-member-meta small { overflow-wrap: anywhere; }
.timesheet-member-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.timesheet-member .request-details-body { align-items: stretch; gap: 8px; padding: 6px 0 8px; }
.timesheet-member-docs { margin-left: 42px; }
.timesheet-member-docs .hint { font-size: var(--type-caption); }
.crew-call { flex: none; font-weight: 600; }
.crew-called { flex: none; color: var(--muted); font-size: var(--type-small); }
/* Отказ виден сразу: красным, как и другие отказы. */
.crew-called.is-declined { color: var(--red); font-weight: 500; }
.crew-base-search { display: flex; flex-direction: column; gap: 8px; }
.crew-base-search .crew-slot { animation: rise-in .22s ease both; }
.crew-add { border-style: dashed; }
.crew-applicant { align-items: flex-start; }
.crew-applicant-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; max-width: 46%; }
.crew-team { display: flex; flex-direction: column; gap: 8px; }
.crew-chat { display: flex; flex-direction: column; gap: 10px; }
.crew-chat .row-copy { display: flex; flex-direction: column; gap: 4px; }
.crew-chat-members { display: flex; flex-direction: column; }
.day-plans { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 6px; }
.day-plan-link { align-self: flex-start; font-weight: 600; }
.day-plan-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px; border-radius: 14px; background: var(--surface); animation: rise-in .22s ease-out both; }
.day-plan-row input { grid-column: 1; min-width: 0; }
.day-plan-row .day-plan-remove { grid-column: 2; grid-row: 1; align-self: start; padding: 6px 4px; }
.day-plan-rows .stack { gap: 8px; }
.day-plan-preview { white-space: pre-line; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--text); }
.crew-chat-member { animation: rise-in .25s ease-out both; }
.crew-slot:disabled { opacity: 1; cursor: default; }
.crew-team-people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crew-team-people .pill { max-width: 100%; padding: 3px 8px; overflow-wrap: anywhere; }
.crew-team-manager { display: inline-grid; grid-template-columns: minmax(0, 1fr); align-items: center; max-width: 100%; }
.crew-team-manager > * { grid-area: 1 / 1; }
.crew-team-manager .pill { padding-inline-end: 44px; }
.crew-team-remove { justify-self: end; width: 44px; height: 44px; padding: 0; font-size: var(--type-small); }
.crew-team-remove::before { inset: 0; }
.crew-search { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: var(--type-control); background: var(--bg); color: var(--text); }
.photo-review-approved summary { cursor: pointer; color: var(--green); font-weight: 600; padding: 4px 0; }
.photo-review-approved[open] summary { margin-bottom: 8px; }
.photo-review-approved .photo-review-row { margin-top: 10px; }

/* Поиск по проекту в каталоге */
.catalog-project { width: 100%; }
.project-inline { color: var(--green); white-space: normal; }
.filter-check-inline { align-self: flex-start; }

/* Коллеги по проектам */
#open-colleagues { margin-top: 4px; }
.colleague-project { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg, transparent); }
.colleague-project > strong { font-size: var(--type-section); font-weight: 600; }
.colleague-project > small { font-size: var(--type-small); color: var(--muted); margin-top: -4px; }
.colleague-row { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.colleague-row .row-copy { flex: 1 1 auto; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.colleague-row .row-copy strong { font-size: var(--type-body); font-weight: 500; }
.colleague-row .row-copy small { font-size: var(--type-caption); color: var(--muted); }
.colleague-row .row-copy small.colleague-asks { color: var(--green); }

/* Имя — ссылка на профиль */
.person-link { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.person-link.colleague-name { font-size: var(--type-body); font-weight: 500; color: var(--text); }
#calendar-access-requests-list .person-link { overflow-wrap: anywhere; }
.person-link-inline { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.colleague-row .avatar { cursor: pointer; }
.people-list { display: flex; flex-direction: column; gap: 0; }
.recommender-row { width: 100%; min-height: 60px; padding: 12px 0; border: 0; }
.recommender-row + .recommender-row { border-top: 1px solid var(--line-soft); }
.recommender-row .row-copy { cursor: inherit; }
.recommender-row .row-copy strong { line-height: 1.35; overflow-wrap: anywhere; }
.recommender-row .row-copy small { line-height: 1.4; }
.recommender-row .icon-chevron { width: var(--icon-inline-size); height: var(--icon-inline-size); }
.colleague-entry { border-top: 1px solid var(--line-soft); }
.colleague-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 12px 46px; }
.project-confirm-button { text-align: left; }
.project-confirm-button.is-quiet { color: var(--muted); font-size: var(--type-caption); }
.project-other-time { display: block; font-size: var(--type-caption); color: var(--muted); margin-top: 2px; }

/* Кнопки «Подробнее» и телефона переносятся целиком. */
.taken-chips { display: flex; flex-wrap: wrap; gap: 0 6px; }
.chip-button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: var(--type-small); font-weight: 500; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip-button:active { background-color: var(--surface); }
.chip-button.phone-link { color: var(--green); }

/* ---- Мягкий стиль (как у Лавки): заливка вместо рамок, круглые чипы, сегменты ---- */
/* Сегменты «Все / Свободны / Заняты»: серая дорожка, выбранный — белая таблетка. */
.segmented { position: relative; isolation: isolate; display: flex; gap: 0; padding: 0 3px; border-radius: 999px; overflow: visible; }
.segmented::before { content: ""; position: absolute; z-index: -1; inset: var(--control-inset) 0 var(--control-inset-end); border-radius: inherit; background: var(--surface); pointer-events: none; }
.segmented button, .chips-small.segmented button { flex: 1 1 0; min-height: var(--control-target); border-radius: 999px; background-color: transparent; color: var(--muted); font-size: var(--type-small); font-weight: 600; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.segmented button.active { background-color: var(--bg); color: var(--text); --control-shadow: var(--switch-shadow); }
/* Чипы — залитые, без рамки, круглые; выбранный — тёмный. */
.chips:not(.segmented) button,
.filter-check,
.filters-toggle { border: 0; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; }
.chips:not(.segmented) button.active { background-color: var(--text); color: var(--on-text); }
.filter-check:has(input:checked) { background-color: var(--green-soft); color: var(--green); }
/* Поиск и дата — мягкие поля без рамки. */
#directory-view .catalog-search, #crewlist-view .catalog-search { border: 0; border-radius: 999px; background: var(--surface); }
#directory-view .catalog-search { margin: 0; }
#directory-view .date-field { --control-stroke: transparent; border-radius: 999px; background-color: var(--surface); }
/* Карточки людей — мягкая заливка и большой радиус вместо рамки. */

/* Мягкие карточки по всему приложению: заливка вместо рамки, большое скругление.
   Внутри карточки «поверхность» — белая: поля, чипы и плашки читаются на сером. */
:root { --radius-card: 20px; }
.card, .row-card, .action-tile, .progress-card, .how { border-color: transparent; background: var(--card-bg); box-shadow: var(--card-shadow); --surface: var(--card-inner); }
.row-card:hover, .progress-card:hover, .action-tile:hover { background: var(--card-bg); }
.action-tile:first-child, .action-tile:first-child:hover { background: var(--mint-bg); box-shadow: none; border: 1px solid var(--mint-line); }
.role-inbox { border-color: var(--green); }
.row-card .row-icon:where(:not(.row-icon-green)) { background: var(--card-inner); }
.person-in-sheet { background: var(--bg); --surface: var(--card-fill); }
/* Поля — залитые, без рамки; рамка появляется только в фокусе. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select { border-color: transparent; background: var(--surface); border-radius: 14px; }
/* В анкетах белое поле на сером почти не видно — тонкая граница держит форму поля. */
.card-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .card-form textarea, .card-form select { border-color: var(--field-line); }
.card-form input:not([type="checkbox"]):not([type="radio"]):focus, .card-form textarea:focus, .card-form select:focus { border-color: var(--text); }
/* Фокус в полях ввода: только тёмная рамка, без второго кольца вокруг (владелец 15.10: двойная обводка лишняя).
   Кольцо остаётся у кнопок, ссылок, галочек и переключателей. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus { border-color: var(--text); }
.catalog-search input { background: transparent; }

/* Помощник на главной: «Что нужно?», строка вопроса, подсказки, ответ бота. */
.assistant { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 18px; }
#open-assistant .row-icon { font-size: 18px; }
.assistant-title { font-size: var(--type-title); font-weight: 600; letter-spacing: -.5px; line-height: 1.15; }
.assistant-ask { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 26px; background: var(--card-fill); }
.assistant-ask input:not([type]) , .assistant-ask input { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; background: transparent; font-size: var(--type-section); color: var(--text); outline: none; }
.assistant-ask input:focus { border: 0; }
.assistant-ask button { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--on-text); font-size: 18px; font-weight: 700; }
.assistant-ask button:disabled { opacity: .5; }
.assistant-suggest { display: flex; flex-wrap: wrap; gap: 0 6px; }
.assistant-suggest button { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--card-fill); color: var(--text); font-size: var(--type-small); font-weight: 600; white-space: nowrap; }
.assistant-suggest button[hidden] { display: none; }
.assistant-suggest:not(.is-open) .suggest-extra { display: none; }
.assistant-suggest .suggest-more { background-color: transparent; color: var(--green); --control-stroke: var(--line); }
.assistant-thread { display: flex; flex-direction: column; gap: 8px; }
.assistant-bubble { max-width: 88%; padding: 10px 14px; font-size: var(--type-subheading); line-height: 1.45; white-space: pre-line; animation: rise-in .25s ease-out both; -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.assistant-copy-row { align-self: flex-start; display: flex; gap: 4px; margin: -4px 0 0 2px; animation: rise-in .25s ease-out both; }
.assistant-copy { padding: 4px 8px; border-radius: 999px; background: transparent; color: var(--muted); font-size: var(--type-small); font-weight: 600; }
.assistant-copy:active { color: var(--green); }
.assistant-block { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; padding: 12px 14px 8px; border-radius: 14px; background: var(--bg); }
.assistant-block:first-child { margin-top: 0; }
.assistant-block:last-child { margin-bottom: 0; }
.assistant-block-text { white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.assistant-block-copy { align-self: flex-start; margin-left: -8px; padding: 4px 8px; border-radius: 999px; background: transparent; color: var(--green); font-size: var(--type-small); font-weight: 600; }
.assistant-me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--text); color: var(--on-text); }
.assistant-bot { align-self: flex-start; border-radius: 18px 18px 18px 6px; background: var(--card-fill); color: var(--text); }
.assistant-bot.is-typing { color: var(--muted); }
/* Плавный чат: сообщение мягко въезжает снизу, карточки проявляются после текста, «думает» — три точки. */
.assistant-screen .assistant-bubble { animation: assistant-in .36s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes assistant-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.assistant-card, .assistant-todos { animation: assistant-in .32s cubic-bezier(.2, .8, .2, 1) .06s both; }
.assistant-dots { display: inline-flex; gap: 5px; padding: 6px 2px; }
.assistant-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: assistant-dot 1.2s ease-in-out infinite; }
.assistant-dots i:nth-child(2) { animation-delay: .15s; }
.assistant-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes assistant-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .assistant-screen .assistant-bubble, .assistant-card, .assistant-todos, .assistant-dots i { animation: none; } }
/* Таймер из помощника: крупный отсчёт, как цифры на плитке «Таймер». */
.assistant-timer .assistant-timer-left { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.assistant-timer .hint { white-space: normal; }
.assistant-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg); white-space: pre-line; font-size: var(--type-body); }
.assistant-title { margin-bottom: -6px; }
#assistant-style { align-items: flex-start; min-height: 44px; justify-content: center; text-align: left; }
.assistant-new { align-self: center; height: 34px; padding: 0 14px; border-radius: 999px; background: transparent; color: var(--muted); font-size: var(--type-small); font-weight: 600; }
.assistant-new[hidden] { display: none; }
.assistant-bubble.is-earlier { opacity: .7; }
.assistant-sub { font-size: var(--type-section); color: var(--muted); }
.assistant-mic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: transparent !important; color: var(--muted) !important; display: inline-flex; align-items: center; justify-content: center; }
.assistant-mic .icon { fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; }
.assistant-mic { position: relative; }
.assistant-mic.is-recording { background: var(--red) !important; color: #fff !important; animation: voice-pulse 1.2s ease-in-out infinite; }
/* Запись: от кнопки расходятся кольца, поле подсвечено красным и считает секунды. */
.assistant-mic.is-recording::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--red); animation: mic-ring 1.3s ease-out infinite; pointer-events: none; }
@keyframes mic-ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
/* Кнопка: обычно микрофон, в записи рация. Рация в кнопке белая на красном, окошко и полоски красные. */
.assistant-mic .mic-live { display: none; width: var(--icon-size); height: var(--icon-size); }
.assistant-mic.is-recording .mic-idle { display: none; }
.assistant-mic.is-recording .mic-live { display: block; animation: radio-ptt .35s ease-out; }
@keyframes radio-ptt { 0% { transform: scale(.6) rotate(-12deg); } 60% { transform: scale(1.12) rotate(4deg); } 100% { transform: none; } }
.assistant-composer.is-listening::before { box-shadow: inset 0 0 0 2px var(--red); }
.assistant-composer.is-listening textarea::placeholder { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .assistant-mic.is-recording::after { animation: none; inset: -3px; opacity: .8; } .assistant-mic.is-recording .mic-live { animation: none; } }
.assistant-actions { display: flex; flex-wrap: wrap; gap: 0 6px; }
.assistant-actions .chip-button { background-color: var(--card-fill); --control-stroke: transparent; font-size: var(--type-small); }

/* Карточка «Роль»: пустые подсказка и ряд кнопок не оставляют дыру; «Готов выйти и как» — отдельным блоком с воздухом. */
#role-request-hint:empty, #role-request-buttons:empty { display: none; }
#extra-roles:not([hidden]), #deputy-areas:not([hidden]) { display: flex; flex-direction: column; gap: 10px; }

/* Статус приглашения — плашка, а не кнопка: цветная точка вместо крестика, мягкий фон в тон приложения. */
.taken-status.declined { background: var(--red-soft); color: var(--red); }
.taken-status.available { background: var(--green-soft); color: var(--green); }

/* «Оплатил в срок N из M» в карточке человека: зелёным, когда всё в срок. */
.pay-record { font-weight: 600; }
.pay-record.is-good { color: var(--green); }

/* Переработка: с какого времени считается — под суммой. */
.overtime-after { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.overtime-after[hidden] { display: none; }

/* «В конце периода» — дата оплаты. */
.payment-date { display: flex; flex-direction: column; gap: 6px; }
.payment-date[hidden] { display: none; }

/* Формы «Состав проекта»: на всю ширину (отступ под крестик — только у заголовка). */
.sheet-panel > .stack > .crew-form:first-child { padding-right: 0; }
.crew-form > .sheet-title { padding-right: 44px; }
/* Подложка полей выше сбрасывает фон со стрелкой, для выбора должности возвращаем её. */
.crew-form select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
/* Правка поиска в шторке: без серой подложки, поля серые на белом — как в остальных формах шторки. */
.search-edit .card-form { padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
.search-edit .card-form :is(input:not([type="checkbox"]), textarea, .range-toggle) { background-color: var(--card-fill); border-color: transparent; --control-stroke: transparent; }
.search-edit .card-form .search-categories button:not(.active) { background-color: var(--card-fill); }
/* Период одним заходом: поле-кнопка и календарь под ним. */
.range-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 var(--control-padding); border-radius: var(--radius-button); background-color: var(--card-fill); color: var(--text); font-size: var(--type-small); text-align: left; }
.range-toggle .range-empty { color: var(--placeholder); }
.card-form .range-field { display: flex; flex-direction: column; gap: 6px; }
.card-form .range-field > span { font-size: var(--type-caption); color: var(--muted); }
.card-form .range-toggle { --control-stroke: var(--line); background-color: var(--bg); }
.range-glyph { color: var(--muted); }
.range-panel { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 16px; background: var(--card-fill); }
.range-panel[hidden] { display: none; }
.range-head { display: flex; align-items: center; justify-content: space-between; }
.range-nav { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); color: var(--text); font-size: var(--type-title); }
.range-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.range-weekday { font-size: var(--type-caption); color: var(--muted); padding-bottom: 4px; }
.range-day { height: 38px; border-radius: 10px; background: transparent; color: var(--text); font-size: var(--type-subheading); }
.range-day.is-today { font-weight: 700; }
.range-day:disabled { color: var(--muted); opacity: .35; }
.range-day.in-range { background: var(--green-soft); color: var(--green); border-radius: 0; }
.range-day.is-edge { background: var(--text); color: var(--on-text); border-radius: 10px; }
.range-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.range-actions .button { width: auto; padding: 0 18px; }

/* «Уйдёт 8 из 14: старшие админы и замы, Москва…» — под кнопкой рассылки. */
.crew-audience { margin-top: -4px; text-align: center; }

/* Календарь: один месяц на экран, стрелки, выбранный день, шторка дня. */
.month-nav { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--text); font-size: 22px; flex: none; }
.month-nav:disabled { opacity: .3; }
#calendar-months .cell.selected { box-shadow: 0 0 0 2px var(--green); }
#calendar-months .cell.busy.selected { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--green); }
.calendar-plate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--red-soft); color: var(--red); font-size: var(--type-body); font-weight: 600; }
.calendar-plate[hidden] { display: none; }
.calendar-plate .button { width: auto; padding: 0 16px; flex: none; }
.calendar-day-card, .day-shift { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--card-fill); color: var(--text); text-align: left; }
.calendar-day-card[hidden] { display: none; }
.calendar-day-card .row-copy, .day-shift .row-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.calendar-day-card small, .day-shift small { color: var(--muted); }
.day-mark { flex: none; width: 12px; height: 36px; border-radius: 6px; background: var(--line); }
.day-mark.busy { background: var(--busy-bg); }
.day-mark.busy.has-color { background: var(--project); background-image: var(--project-img, none); background-size: cover; }
.day-status { width: 100%; }
.day-status button { flex: 1; }

/* Помощник — классический чат: переписка сверху вниз, поле ввода прибито к низу экрана. */
body.assistant-open .tabbar { display: none; }
body.assistant-open .app-shell { padding-bottom: 0; }
body.assistant-open .screen:not([hidden]) { padding-bottom: 0; }
.assistant-screen .assistant { margin: 0; gap: 14px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.assistant-intro { display: flex; flex-direction: column; gap: 12px; padding-top: 12vh; }
.assistant-intro[hidden] { display: none; }
/* «Разговоры» и «Новый» рядом справа: отступ слева только у первой. */
.assistant-screen .top-bar .assistant-new:not([hidden]) ~ .assistant-new { margin-left: 8px; }
.assistant-screen .top-bar .assistant-new { margin-left: auto; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--card-fill); color: var(--text); font-size: var(--type-small); font-weight: 600; }
.assistant-composer {
  position: fixed; z-index: 25; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 560px); padding: 8px 18px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--bg) 14px);
  align-items: flex-end;
}
.assistant-composer textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 132px; padding: 11px 0; border: 0; background: transparent;
  font: inherit; font-size: var(--type-section); line-height: 22px; color: var(--text); outline: none; resize: none;
}
/* Под полем и вокруг него — фон экрана: переписка уходит под поле и не просвечивает. */
.assistant-screen .assistant-ask.assistant-composer { border-radius: 0; background: linear-gradient(to bottom, transparent, var(--bg) 14px); padding-left: 18px; }
.assistant-composer::before { content: ""; position: absolute; inset: 8px 18px max(12px, env(safe-area-inset-bottom)); border-radius: 26px; background: var(--card-fill); z-index: -1; }
.assistant-composer textarea { margin-left: 16px; }
/* Подсказка в поле всегда одной строкой: длинная обрезается многоточием, а не переносится под край. */
.assistant-composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assistant-composer button { margin-bottom: 2px; }
.assistant-screen .assistant-bubble { max-width: 86%; }
/* Кнопки — внутри «пилюли» поля, с отступом от края. */
.assistant-screen .assistant-ask.assistant-composer { padding: 14px 24px calc(max(12px, env(safe-area-inset-bottom)) + 6px) 18px; }

/* Главная подсказка «Что ты умеешь?» — заметнее остальных. */
.assistant-suggest .suggest-main { background-color: var(--green); color: var(--on-text); }

.taken-title-row { display: flex; align-items: center; gap: 6px; }
.taken-title-row .card-title { flex: 1; margin: 0; }
.taken-control { flex: none; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 18px; line-height: 1; }

/* ---------- Плавность везде ---------- */
/* Кнопки мягко «нажимаются», цвета переключаются без щелчка. */
button, .button, .chip-button, a.button {
  transition: transform .14s ease, background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease, box-shadow .2s ease;
}
button:active:not(:disabled), .button:active, .chip-button:active { transform: scale(.97); }
/* Кнопка-ссылка (<a class="button">) выглядит как кнопка: без подчёркивания ссылки (владелец 17.10). */
a.button { text-decoration: none; }
.segmented button, .chips button, .day-status button { transition: background-color .22s ease, color .22s ease, box-shadow .22s ease, transform .14s ease; }
/* Закрытие шторки: копия уезжает вниз, фон гаснет. */
.sheet.is-closing { pointer-events: none; }
.sheet.is-closing .sheet-backdrop { animation: fade-out .16s ease both; }
.sheet.is-closing .sheet-panel { animation: sheet-down .16s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes sheet-down { from { transform: none; opacity: 1; } to { transform: translateY(12px); opacity: 0; } }
/* Всё, что появляется на экране, — мягко поднимается. */
:is(.calendar-plate, .calendar-day-card, .taken-row, .crew-slot, .request-card, .card-form, .form-message, .empty-state):not([hidden]) {
  animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) both;
}
details[open] > :not(summary) { animation: rise-in .26s ease-out both; }
#day-sheet-body > * { animation: rise-in .26s cubic-bezier(.2, .8, .2, 1) both; }
.assistant-intro:not([hidden]) { animation: fade-in .3s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
}
/* Приглашение: аккуратные кнопки — без кругов, тонкие иконки. */
.taken-control { min-width: 32px; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; }
.taken-control:active { background: var(--surface); }
.taken-title-row { gap: 2px; }
/* Анимированное содержимое шторки не должно перекрывать крестик. */
.sheet-close { z-index: 3; }

/* «Что дальше» под ответом помощника. */
.assistant-next { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: -2px; animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) .08s both; }
.assistant-next button { max-width: 92%; min-height: 36px; padding: 7px 14px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: var(--type-body); font-weight: 500; text-align: left; line-height: 1.3; }

/* Плавная смена содержимого: снимок старого поверх, пока растворяется. */
.is-morphing { position: relative; }
.morph-ghost { position: absolute; top: 0; left: 0; pointer-events: none; box-sizing: border-box; }
/* Раскрытие <details> анимирует высоту — свои анимации содержимого не нужны, иначе «двоится». */
details[open] > :not(summary) { animation: fade-in .32s ease-out both; }

/* Нижнее меню почти непрозрачное, без размытия: backdrop-filter на iPhone пересчитывается на каждом
   кадре прокрутки, и список под меню идёт туго. Тень держит меню отдельно от серых карточек. */
.tabbar {
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .06);
}

/* Крестик у отказанного приглашения совпадает по размеру с крестиком BETA. */
.taken-control { width: 36px; min-width: 36px; height: 36px; }
.taken-title-row > .taken-control:last-child { margin-right: -10px; }

/* ⚙︎ в шапке календаря и «Выбрать несколько дней». */
.calendar-gear { margin-left: 8px; color: var(--text); }
.calendar-today[hidden] + .calendar-gear { margin-left: auto; }
.calendar-pick { width: 100%; }
.calendar-pick[hidden] { display: none; }
#calendar-months .cell.picked { position: relative; box-shadow: 0 0 0 2px var(--green); font-weight: 700; }
#calendar-months .cell.busy.picked { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--green); }
#calendar-months .cell:not(.busy).picked { background: var(--green-soft); color: var(--green); }
#calendar-months .cell.picked::after {
  content: "✓\FE0E"; position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--green); color: var(--on-text); font-size: 9px; line-height: 15px; text-align: center; font-weight: 700;
}
.calendar-pick-bar { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--card-fill); }
.calendar-pick-bar[hidden] { display: none; }
.calendar-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar-pick-head strong { font-size: var(--type-subheading); }
.calendar-pick-bar .button:disabled { opacity: .45; }
.calendar-tools-sheet .tool-glyph { font-size: 18px; font-weight: 600; }
.calendar-tools-sheet #range-panel[hidden], .calendar-tools-sheet #calendar-settings[hidden] { display: none; }
.calendar-tools-sheet .row-card { width: 100%; }

/* «Предложить смену или проект» */
.offer-choice { width: 100%; }
.offer-choice .tool-glyph { font-size: 18px; font-weight: 600; }
.offer-heading { margin-top: 6px; font-size: var(--type-subheading); }
.offer-project { display: flex; flex-direction: column; gap: 8px; }
.offer-slot { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; height: auto; min-height: 40px; padding: 8px 14px; }
.offer-sub { margin-top: -6px; }

/* Пробная рассылка: кому из ★ Избранного */
.probe-testers { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--card-fill); }
.probe-testers[hidden] { display: none; }
.probe-tester, .card-form label.probe-tester { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; font-size: var(--type-body); cursor: pointer; }
.probe-tester > span, .card-form label.probe-tester > span { display: block; flex: 1; min-width: 0; font-size: inherit; color: var(--text); overflow-wrap: anywhere; }
.probe-tester input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--green); }

/* «Смена | Проект» в начале запроса */
.request-kind { margin-bottom: 4px; }
.request-kind[hidden], #request-project-panel[hidden], #request-shift-part[hidden] { display: none; }
#request-shift-part { display: flex; flex-direction: column; gap: inherit; }
.offer-other { align-self: flex-start; }
.request-project-card { width: 100%; text-align: left; }
.invite-card { width: 100%; text-align: left; cursor: pointer; }
.invite-card .row-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.invite-card .taken-control { margin-left: auto; align-self: flex-start; }
.group-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: var(--type-subheading); line-height: 1.4; }

/* Поиски коллег */
.search-card { display: flex; flex-direction: column; gap: 6px; }
.search-manage { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.search-responders + .search-manage { border-top: 0; padding-top: 4px; }
.search-card .button { align-self: flex-start; margin-top: 4px; }
.search-card .identity-actions { flex-wrap: wrap; column-gap: 16px; row-gap: 6px; }
.search-status { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: var(--type-caption); font-weight: 600; transition: background .25s ease, color .25s ease; }
.search-status.is-live { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.search-status.is-found { background: var(--green-soft); color: var(--green); }
.search-card .link.search-found { transition: color .25s ease, border-color .25s ease, background .25s ease; }
.search-card .link.search-found.is-done { color: var(--green); border-color: var(--green); opacity: 1; }
.search-status.is-off { background: color-mix(in srgb, var(--muted) 10%, transparent); color: var(--muted); }
.search-card .identity-actions .link { white-space: nowrap; }
.search-details { margin: 2px 0 0; font-size: var(--type-body); line-height: 1.4; }
.search-categories { flex-wrap: wrap; }
#request-search-panel[hidden] { display: none; }
#request-kind [hidden] { display: none; }

/* Выбор, кому отправить вакансию: тап по строке, на аватаре галочка. */
.crew-slot.is-pickable { cursor: pointer; }
.crew-slot.is-picked .crew-av { background: var(--green); color: var(--on-text); }
.crew-slot.is-picked { background: var(--green-soft); border-radius: 14px; margin-inline: -8px; padding-inline: 8px; }

/* «Standby Crew в цифрах»: плитки итогов и месяцы с полоской смен. */
.stats-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stats-totals > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--radius-card); background: var(--card-fill); }
.stats-totals strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-totals small { font-size: var(--type-caption); color: var(--muted); }
.stats-month { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.stats-totals { animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.stats-month small { font-size: var(--type-small); color: var(--muted); }
.stats-bar { display: block; height: 6px; border-radius: 3px; background: var(--card-fill); overflow: hidden; }
.stats-bar::after { content: ""; display: block; width: var(--w, 0%); height: 100%; border-radius: 3px; background: var(--green); transition: width .4s ease; }
.stats-totals > div:last-child:nth-child(odd) { grid-column: span 2; }

/* Свайп по карточке в каталоге: под строкой — действия справа и пасхалка слева. */
.person-swipe { position: relative; overflow: hidden; }
.person-swipe > .person-row { position: relative; z-index: 1; background: var(--card-fill); touch-action: pan-y; will-change: transform; }
.swipe-actions { visibility: hidden; position: absolute; inset: 0 0 0 auto; display: flex; align-items: stretch; opacity: 0; transition: opacity .15s ease; }
.person-swipe.is-left .swipe-actions { visibility: visible; opacity: 1; }
.swipe-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 72px; padding: 0 6px; background: var(--bg); color: var(--text); font-size: var(--type-caption); }
.swipe-action small { font-size: var(--type-caption); }
/* Decorative SVG/use nodes must not become separate native touch targets. */
.swipe-action > * { pointer-events: none; }
.swipe-action + .swipe-action { border-left: 1px solid var(--line); }
.swipe-action.is-main { background: var(--green); color: var(--on-text); }
.swipe-glyph { font-size: var(--type-title); line-height: 1; }
.swipe-egg { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; width: min(80%, 300px); padding: 0 16px; background: var(--text); color: var(--on-text); font-size: var(--type-small); font-weight: 600; line-height: 1.35; opacity: 0; transition: opacity .2s ease; }
.person-swipe.is-right .swipe-egg { opacity: 1; }

/* Цифры сервиса на главной — компактная строка: жирная цифра и короткая подпись, переносится только между парами. */
.stats-row { gap: 8px; padding: 11px 12px 11px 16px; }
.stats-row .row-copy strong { font-size: var(--type-body); }
.stats-figures { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--type-caption); color: var(--muted); }
.stats-figures > span { white-space: nowrap; animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.stats-figures > span:nth-child(2) { animation-delay: 50ms; }
.stats-figures > span:nth-child(3) { animation-delay: 100ms; }
.stats-figures b { margin-right: 3px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* Панель после проигрыша в «Площадке»: под надписью «Запнулся…», плавно всплывает. */
.game-over { position: absolute; left: 50%; top: calc(50% + 18px); display: flex; flex-direction: column; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); text-align: center; animation: game-over-in .32s cubic-bezier(.2, .8, .2, 1) both; }
.game-over[hidden] { display: none; }
.game-over small { font-size: var(--type-small); color: var(--text-soft); }
.game-share { padding: 11px 18px; border: 0; border-radius: 999px; background: var(--green); color: var(--on-text); font: inherit; font-size: var(--type-subheading); font-weight: 600; cursor: pointer; transition: transform .15s ease; }
.game-share:active { transform: scale(.97); }
@keyframes game-over-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Отклики из лички в шторке позиции: статус чипами, строки плавно появляются. */
.crew-leads { display: flex; flex-direction: column; }
.crew-lead { animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.crew-lead .row-copy { gap: 4px; flex: 1; min-width: 0; }
.crew-lead.is-no .row-copy > strong, .crew-lead.is-no .row-copy > small { opacity: .55; }
.crew-lead-note { color: var(--text-soft) !important; }
.crew-lead-status { margin-top: 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; max-width: 100%; }
.crew-lead-status button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 32px; padding: 5px 4px; font-size: var(--type-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crew-lead-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; font-size: var(--type-small); }
.crew-lead-edit { display: flex; align-items: stretch; gap: 8px; margin-top: 6px; animation: rise-in .25s ease-out both; }
.crew-lead-edit input { flex: 1; min-width: 0; height: 44px; padding-top: 0; padding-bottom: 0; }
.crew-lead-edit .button { width: auto; height: 44px; padding: 0 16px; font-size: var(--type-body); }

/* Разбор разговоров: диалог раскрывается плавно, реплики пузырями, подозрения — красные метки. */
.review-dialog { border-top: 1px solid var(--line); padding: 10px 0; animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.review-dialog summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; cursor: pointer; list-style: none; }
.review-dialog summary::-webkit-details-marker { display: none; }
.review-flags { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.review-flag { padding: 2px 8px; border-radius: 999px; background: var(--red-soft, #fbe4e1); color: var(--red, #b3261e); font-size: var(--type-caption); }
.review-body { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; animation: rise-in .28s ease-out both; }
.review-msg { margin: 0; padding: 8px 11px; border-radius: 14px; font-size: var(--type-small); line-height: 1.4; white-space: pre-wrap; max-width: 88%; }
.review-msg.is-user { align-self: flex-end; background: var(--green-soft); }
.review-msg.is-assistant { align-self: flex-start; background: var(--surface); }
.review-verdict { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: var(--type-small); border-left: 3px solid var(--green); }
.review-body .button { align-self: flex-start; width: auto; }

/* Подсказки к фильмографии: что добавить — появляются плавно под кнопкой. */
.filmography-advice { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--green-soft); animation: rise-in .3s cubic-bezier(.2, .8, .2, 1) both; }
.filmography-advice strong { font-size: var(--type-body); }
.filmography-tip { margin: 0; font-size: var(--type-small); color: var(--text-soft); animation: rise-in .3s ease-out both; }
.filmography-tip::before { content: "• "; color: var(--green); font-weight: 700; }
.filmography-advice .button { align-self: flex-start; width: auto; margin-top: 4px; }

/* Чипы-действия: основные решения — таблетками, как статусы; опасные («Убрать», «Закрыть») остаются ссылками и уходят в конец. */
.action-chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0 6px; }
.action-chips .link:not(.link-danger) { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--bg); color: var(--text-soft); font-size: var(--type-small); white-space: nowrap; }
.action-chips .link:not(.link-danger)::before { inset: 0; }
.action-chips .link-danger { order: 2; padding: 0 4px; }

/* Кто откликнулся на мой поиск */
.search-responders { display: flex; flex-direction: column; margin-top: 4px; border-top: 1px solid var(--line); }
.search-responder { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); animation: rise-in .25s ease-out both; }
.search-responder:last-child { border-bottom: 0; }
.search-responder .row-copy { flex: 1; min-width: 0; }
.search-responder-links { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }

/* Кандидат руками в «Из лички» */
.crew-lead-add { margin-top: 6px; }
.crew-lead-new { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; animation: rise-in .25s ease-out both; }
.crew-lead-new input { height: 44px; padding-top: 0; padding-bottom: 0; }
.crew-lead-new .button { align-self: flex-start; height: 44px; padding: 0 20px; font-size: var(--type-body); }

/* Подробности выбранного дня и станции в шторке календаря. */
.home-route { display: grid; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.home-day-actions { flex-wrap: wrap; }
.home-day-actions > .link { flex: 1; min-height: 44px; white-space: nowrap; }
.route-line { --route: var(--project-line, var(--project, var(--green))); display: grid; gap: 10px; animation: route-in .32s ease-out both; }
.route-line + .route-line { padding-top: 14px; border-top: 1px solid var(--line); }
.route-line.c-photo { --route: var(--green); }
.route-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.route-head strong { font-size: var(--type-section); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-head small { margin-left: auto; color: var(--muted); font-size: var(--type-small); white-space: nowrap; }
.route-badge { width: 14px; height: 14px; border-radius: 4px; flex: none; background: var(--route); }
.route-stations { display: grid; }
.route-station { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 10px; align-items: start; }
.route-dot { position: relative; display: flex; justify-content: center; align-self: stretch; }
.route-dot i { position: relative; z-index: 1; width: 15px; height: 15px; margin-top: 2px; border-radius: 50%; background: var(--bg); border: 3.5px solid var(--route); box-sizing: border-box; }
.route-dot::after { content: ""; position: absolute; top: 10px; bottom: -10px; width: 4px; border-radius: 2px; background: var(--route); }
.route-station:last-child .route-dot::after { display: none; }
.route-station.is-done .route-dot i { background: var(--route); }
.route-station.is-next .route-dot i { border-color: var(--text); }
.route-station.is-next .route-dot::after, .route-station.is-wait .route-dot::after, .route-station.is-line-dashed .route-dot::after {
  background: repeating-linear-gradient(var(--line) 0 5px, transparent 5px 9px);
}
.route-copy { display: grid; gap: 1px; padding-bottom: 14px; min-width: 0; }
.route-station:last-child .route-copy { padding-bottom: 0; }
.route-copy strong { font-size: var(--type-subheading); font-weight: 600; }
.route-copy small { color: var(--muted); font-size: var(--type-small); overflow-wrap: anywhere; }
.route-action { border: 0; background: none; padding: 2px 0; font: inherit; font-size: var(--type-small); font-weight: 600; color: var(--green); white-space: nowrap; cursor: pointer; }
.route-action.is-main { background: var(--text); color: var(--bg); border-radius: 999px; padding: 6px 12px; margin-top: -3px; }
.route-action.is-soft { background: var(--green-soft); border-radius: 999px; padding: 6px 12px; margin-top: -3px; }
.route-action:active { transform: scale(.97); }
@keyframes route-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .route-line { animation: none; } }
.route-actions { display: grid; justify-items: end; gap: 6px; }
.route-action.is-quiet { color: var(--muted); font-weight: 500; padding: 0; }
.route-station.is-skip .route-dot i { background: var(--muted); border-color: var(--muted); }
.day-route { margin: 4px 0 6px; }
/* «Нашлось, Изменить, Поделиться» — в одну строку тремя равными чипами. */
.search-manage .action-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.search-manage .action-chips .link { display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; font-size: clamp(12px, 3.3vw, 13px); white-space: nowrap; min-width: 0; }
/* Контакты в карточке — настройка, а не действие: спокойным серым. */
.search-card .link.search-contact { color: var(--text-soft); }
/* Отклик на поиск: строка — в профиль, «Написать» — заметной кнопкой. */
.responder-write { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--green-soft); color: var(--green); font: inherit; font-size: var(--type-body); font-weight: 600; white-space: nowrap; cursor: pointer; }
.responder-write:active { transform: scale(.97); }

/* Свои проекты: строка над календарём и выбор «Чей это день?». */
.calendar-projects { display: grid; gap: 6px; margin: 4px 0 12px; }
.project-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.project-chips::-webkit-scrollbar { display: none; }
.project-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 8px 13px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: var(--type-body); font-weight: 600; white-space: nowrap; cursor: pointer; }
.project-chip .swatch { width: 12px; height: 12px; border-radius: 4px; }
.project-chip .swatch:not(.has-color) { background: var(--muted); }
.project-chip.is-add { border-style: dashed; color: var(--green); background: transparent; }
.project-chip:active, .day-owner-option:active { transform: scale(.97); }
.period-list { display: grid; gap: 10px; }
.period-row { display: grid; gap: 6px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; }
.period-head { display: flex; align-items: center; gap: 8px; }
.period-title { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: var(--type-subheading); color: var(--text); padding: 2px 0; }
.period-remove { border: 0; background: none; color: var(--muted); font-size: var(--type-title); line-height: 1; cursor: pointer; padding: 0 4px; }
.period-dates { display: grid; gap: 8px; }
.period-dates .date-field { width: 100%; }
.period-dates .period-picker { margin: 0; padding: 12px; }
.period-dates input { min-width: 0; }
.period-add { justify-self: start; }
.day-owner { display: grid; gap: 8px; }
.day-owner-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.day-owner-option .swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.day-owner-option strong { font-size: var(--type-subheading); }
.day-owner-option small { margin-left: auto; color: var(--muted); font-size: var(--type-small); }
.day-owner-option.is-active { border-color: var(--text); }
.day-owner-option.is-add { border-style: dashed; color: var(--green); }
.period-hints { display: flex; flex-wrap: wrap; gap: 5px; margin-top: -2px; }
.period-hints[hidden] { display: none; }
.period-hint { border: 0; border-radius: 999px; padding: 3px 9px; background: var(--surface); color: var(--text-soft); font: inherit; font-size: var(--type-caption); cursor: pointer; }
.period-hint:active { transform: scale(.96); }
#save-busy-dates.is-idle, #save-busy-dates.is-idle:disabled { opacity: 1; border-color: transparent; background: var(--surface); color: var(--text-soft); box-shadow: none; transition: background .25s ease, color .25s ease; }
.plan-field { position: relative; }
.plan-field textarea { width: 100%; padding-right: 56px; }
.plan-mic { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg); color: var(--text); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.08); cursor: pointer; transition: background .2s ease, color .2s ease, transform .15s ease; }
.plan-mic .icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.plan-mic:active { transform: scale(.94); }
.plan-mic.is-recording { background: var(--red); color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
.plan-mic.is-busy { opacity: .5; }
/* Задачи: проект и день, фильтр, группы */
.target-chips { display: flex; flex-wrap: wrap; gap: 0 6px; }
.target-chips[hidden] { display: none; }
.target-chip { --control-stroke: var(--line); border-radius: 999px; padding: 2px var(--control-padding); background-color: var(--bg); color: var(--text); font: inherit; font-size: var(--type-small); cursor: pointer; }
.target-chip.is-on { --control-stroke: var(--text); background-color: var(--text); color: var(--bg); }
.target-chip:active { transform: scale(.96); }
.target-chips input.target-date { width: auto; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: var(--bg); color: var(--text); font: inherit; font-size: var(--type-section); min-height: 38px; }
.target-chips input.target-date.is-on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.tasks-filter { margin: 2px 0 12px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.tasks-filter::-webkit-scrollbar { display: none; }
.tasks-filter .target-chip { flex: none; }
.tasks-group { margin: 14px 4px 2px; font-size: var(--type-small); font-weight: 500; color: var(--muted); }
.tasks-group:first-child { margin-top: 0; }
.tasks-done { margin-top: 10px; }
.tasks-done > summary { cursor: pointer; padding: 8px 4px; color: var(--muted); font-size: var(--type-body); list-style: none; }
.tasks-done > summary::-webkit-details-marker { display: none; }
.tasks-done > summary::before { content: "›\FE0E"; display: inline-block; margin-right: 8px; transition: transform .2s ease; }
.tasks-done[open] > summary::before { transform: rotate(90deg); }
.tasks-done > .row-card + .row-card { margin-top: 8px; }
.tasks-tidy { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--green-soft); color: var(--text); font-size: var(--type-body); }
.checklist-meta-link { cursor: pointer; color: var(--green); }
.callsheet-conflict { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: var(--red-soft); color: var(--text); margin-bottom: 10px; }
.callsheet-conflict ul { margin: 0; padding-left: 18px; font-size: var(--type-body); }
.callsheet-conflict .target-chip { background-color: var(--bg); }
.callsheet-conflict .target-chip.is-on { background-color: var(--text); color: var(--bg); }
/* Вопрос «Похоже на «…». Загружаю туда?»: тот же блок выбора, но спокойный, не красный. */
.callsheet-conflict.is-question { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.callsheet-conflict.is-question .target-chip:not(.is-on) { background-color: var(--surface); }

.period-dates[hidden] { display: none; }
.watched-by { margin-top: 8px; }
.watched-by > summary { min-height: 44px; justify-content: center; align-items: center; }
.watched-by li + li { border-top: 1px solid var(--line-soft); }
.watched-by ul { display: grid; margin: 0; text-align: center; list-style: none; }

/* Профиль после разбора Impeccable: шаги до значка кнопками, роль одной строкой, сохранение — только по делу. */
.verified-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.verified-step { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: var(--type-small); font-weight: 600; position: relative; }
.verified-step::after { content: ""; position: absolute; inset: -5px 0; }
.verified-step:active { transform: scale(.97); }
.role-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.role-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.role-line .link { flex: none; margin-top: 4px; font-size: var(--type-body); }
.switch-card { gap: 4px; }
.switch-card .card-head { margin-bottom: 8px; }
.role-copy { flex: 1 1 auto; }
.profile-save { margin: 0 -2px; padding-top: 10px; }
.profile-save[hidden] { display: none; }
#share-card > .button { width: 100%; }
#share-card .field-pair { gap: 8px; }

/* ---------- Шапка: подписанный вход в помощника ---------- */
.radio-btn { position: relative; flex: none; height: 40px; padding: 0 10px; white-space: nowrap; }
/* Тот же силуэт рации, что в боте и синем значке, цвет наследуется от кнопки. */
.radio-live { width: var(--icon-size); height: var(--icon-size); overflow: visible; }
.radio-dot { position: absolute; bottom: -1px; right: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.radio-dot[hidden] { display: none; }
/* На вкладках пара кнопок стоит справа в шапке экрана. */
.top-bar-back > .top-actions { margin-left: auto; }
body.has-tabbar .top-bar-back.top-bar-dup:has(> .top-actions) { display: flex; }
/* Большой заголовок экрана есть на каждой вкладке — маленький в шапке не повторяем. */
body.has-tabbar .top-bar-back:has(> .top-actions) > .top-title { visibility: hidden; }

.summary-accent { color: var(--green); font-weight: 600; }

/* «Мой график» и плашка: что сегодня видят коллеги. */
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; font-size: var(--type-small); font-weight: 600; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.status-free { background: var(--green-soft); color: var(--green); }
.status-busy { background: var(--text); color: var(--bg); }
.status-none { background: var(--orange-soft); color: var(--orange); }

/* Каталог: разослать запрос всем подходящим. */

/* Рация: дела на сегодня над разговором. */
.assistant-today { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; padding: 14px 16px; border-radius: var(--radius-card); background: var(--card-fill); }
.assistant-today[hidden] { display: none; }
.assistant-today-title { margin: 0; font-size: var(--type-subheading); font-weight: 600; }
.assistant-today-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.assistant-today-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--type-body); }
.today-task { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 0; }
.today-content { display: flex; align-items: flex-start; gap: 10px; }
.today-task .today-text { overflow-wrap: anywhere; }
.today-task .form-message { margin: 0; }
.today-text { flex: 1; min-width: 0; }
.today-when { flex: none; color: var(--muted); font-size: var(--type-caption); }
.today-when.is-late { color: var(--red); }
/* Дела прямо в ответе помощника: сделанное вычеркнуто. */
.assistant-todos { list-style: none; margin: 10px 0 0; padding: 0; }
.assistant-today-row.is-done .today-text { text-decoration: line-through; color: var(--muted); }
.assistant-today-row.is-done .today-when { display: none; }

/* Своё время для поисков: «С» и «До» в одну строку. */
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-pair[hidden] { display: none; }

/* Цвета: обычные на виду, узоры и картинки под «Ещё». */
.color-fold { flex-basis: 100%; }
.color-fold > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: var(--type-subheading); cursor: pointer; list-style: none; }
.color-fold > summary::-webkit-details-marker { display: none; }
.color-fold > summary::after { content: "›"; color: var(--muted); transition: transform .15s ease; }
.color-fold[open] > summary::after { transform: rotate(90deg); }
.color-fold > .color-chips { margin-top: 6px; }
.color-chip.color-dot { width: 24px; height: 24px; cursor: inherit; }

/* «Мой график» сворачивается в строку. */
.status-toggle { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Заголовок карточки не «сжимается» при нажатии, как кнопка: иначе вся шапка дёргается и серебрится. */
.status-toggle:active:not(:disabled) { transform: none; }
.status-right { display: inline-flex; align-items: center; gap: 8px; }
.status-chevron { color: var(--muted); transform: rotate(-90deg); transition: transform .2s ease; }
.status-card.is-folded .status-chevron { transform: rotate(90deg); }
/* Всегда раскрыт: заголовок не кнопка, стрелки нет. */
.status-card.is-fixed-open .status-chevron { display: none; }
.status-card.is-fixed-open .status-toggle { cursor: default; pointer-events: none; }
.status-card.is-fixed-open .status-toggle .status-pill { pointer-events: auto; }
/* «Ищу смены» виден и в свёрнутой карточке: это главная кнопка соискателя (владелец и Слава 26.10). */
.status-card.is-folded > :not(.status-toggle):not(.open-to-work-row) { display: none; }
.status-card.is-folded .status-head { margin: 0; }
.status-card.is-folded #status-hint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-warn { color: var(--orange); }
/* Вкладки по ширине подписи: «Инструменты» длиннее «Главной». Меню не шире экрана. */
.tabbar { max-width: calc(100vw - 16px); }
.tab { width: auto; min-width: 0; flex: 1 1 auto; padding: 0 8px; }
@media (max-width: 360px) {
  .tab { padding: 0 4px; font-size: 10px; }
}

/* Рация в записи использует общий символ. */
.radio-glyph { width: var(--icon-size); height: var(--icon-size); overflow: visible; }

/* Чипы ролей в каталоге выходят за края намеренно (прокрутка), страница при этом не должна ехать вбок. */
#directory-view { overflow-x: clip; gap: 10px; }

/* Прогресс профиля на главной — одной строкой с тонкой полоской. */
#profile-progress { gap: 6px; padding: 12px 14px; }
#profile-progress .progress-head strong { font-size: var(--type-body); font-weight: 500; }
#profile-progress .progress-track { height: 4px; }
#profile-progress > small { display: none; }

/* Именной значок: пример «как это выглядит» и серая карточка, пока профиль не полный. */
.own-badge-example { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px dashed var(--line); }
.own-badge-example[hidden] { display: none; }
.own-badge-example-label { font-size: var(--type-caption); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.own-badge-example-row { display: flex; align-items: center; gap: 10px; }
.own-badge-example-copy { display: flex; flex-direction: column; min-width: 0; }
.own-badge-example-copy strong { font-size: var(--type-subheading); font-weight: 500; }
.own-badge-example-copy small { font-size: var(--type-caption); color: var(--muted); }
.example-badge { width: 22px; height: 22px; vertical-align: -5px; margin-left: 2px; }
.example-avatar { background: var(--green-soft); color: var(--green); }
.own-badge-card.is-locked .own-badge-example { filter: grayscale(1); opacity: .75; }
.own-badge-card.is-locked .card-title-lg { color: var(--muted); }
.own-badge-locked { color: var(--orange); }
/* «Мой график» — заголовок как у соседних строк главной, без крупного кегля. */
.status-head { font-size: var(--type-section); letter-spacing: -.01em; }
.own-badge-example-copy { flex: 1; }
/* График новичка: без тревоги. Давно пришёл и не заполнил — мягко оранжевым. */
.calendar-plate.is-new { background: var(--green-soft); color: var(--green); }
.calendar-plate.is-empty { background: var(--orange-soft); color: var(--orange); }
.status-new { background: var(--green-soft); color: var(--green); }

/* Выбор точки на карте: на весь экран, булавка по центру, поиск сверху, адрес и кнопка снизу. */
body.map-open { overflow: hidden; }
body.map-open .tabbar { display: none; }
.map-picker { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 200; background: var(--bg); }
.map-picker[hidden] { display: none; }
.map-stage { position: relative; flex: 1; min-height: 0; }
.map-canvas { position: absolute; inset: 0; background: var(--card-fill); }
.map-pin { position: absolute; left: 50%; top: 50%; z-index: 500; transform: translate(-50%, -100%); pointer-events: none; transition: transform .15s ease; }
.map-pin .icon { width: 46px; height: 46px; fill: var(--green); stroke: #fff; stroke-width: 1.4; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
.map-picker.is-moving .map-pin { transform: translate(-50%, calc(-100% - 10px)); }
.map-top { position: absolute; z-index: 600; top: 0; left: 0; right: 0; display: flex; gap: 10px; padding: calc(12px + env(safe-area-inset-top) + var(--tg-content-safe-area-inset-top, 0px)) 16px 0; }
.map-round { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bg); color: var(--text); box-shadow: 0 4px 16px rgba(0, 0, 0, .16); }
.map-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 24px; background: var(--bg); box-shadow: 0 4px 16px rgba(0, 0, 0, .16); }
.map-search .icon { flex: none; color: var(--muted); }
.map-picker .map-search input#map-query, .map-picker .map-search input#map-query:focus, .map-picker .map-search input#map-query:focus-visible { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--text); font-size: var(--type-section); outline: none; }
.map-picker .map-search input::-webkit-search-cancel-button { display: none; }
.map-results { position: absolute; z-index: 600; top: calc(70px + env(safe-area-inset-top) + var(--tg-content-safe-area-inset-top, 0px)); left: 16px; right: 16px; margin: 0; padding: 6px 0; list-style: none; border-radius: 18px; background: var(--bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); max-height: 50vh; overflow-y: auto; }
.map-results[hidden] { display: none; }
.map-results button { display: block; width: 100%; padding: 12px 16px; background: none; color: var(--text); font-size: var(--type-subheading); text-align: left; }
.map-results .map-empty { padding: 12px 16px; color: var(--muted); font-size: var(--type-body); }
.map-locate { position: absolute; z-index: 600; right: 16px; bottom: 22px; }
.map-bottom { position: relative; z-index: 600; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--bg); box-shadow: 0 -6px 24px rgba(0, 0, 0, .12); }
.map-label { color: var(--muted); font-size: var(--type-small); }
.map-address { font-size: var(--type-section); font-weight: 600; line-height: 1.3; }
.map-coords { color: var(--muted); font-size: var(--type-caption); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.map-picker .leaflet-control-attribution { font-size: 10px; }

/* Поиск в каталоге: поле внутри плашки без своей коробки и рамки (общий стиль полей её рисовал
   поверх плашки при нажатии). Фокус видно по самой плашке. */
#crew-sheet .catalog-search input[type="search"],
.catalog-search input[type="search"], .catalog-search input[type="search"]:focus, .catalog-search input[type="search"]:focus-visible {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none;
}
.catalog-search input[type="search"]::-webkit-search-cancel-button { display: none; }
#directory-view .catalog-search:focus-within, #crewlist-view .catalog-search:focus-within { box-shadow: inset 0 0 0 1px var(--muted); }

/* Направления зама под строкой ролей: чуть ближе к ней, чем следующая карточка. */
.catalog-areas-row { margin-top: -6px; }

/* «Мои запросы»: второй ряд фильтров по типу и подсказка в пустом разделе. */
.requests-kinds { margin-top: -4px; margin-bottom: 2px; }
.requests-kinds[hidden] { display: none; }
#requests-list > .section-label:first-child { margin-top: 6px; }
.requests-kind-empty { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; }
.requests-kind-empty strong { font-size: var(--type-subheading); font-weight: 500; }
.requests-kind-empty p { margin: 0; }

/* ---------- Компьютер: меню слева, колонка экрана, панель справа ---------- */
/* Один сайт на всё: телефон видит нынешний вид, экран от 1100 px раскладку как у веб-приложения.
   Нижняя капсула становится меню слева и видна на всех экранах, шторка с человеком и днём календаря
   открывается панелью справа, остальные шторки окном по центру. */
@media (min-width: 1100px) {
  /* Вся раскладка в рамке по центру окна (как у документации GramIO): на большом мониторе меню не
     прилипает к левому краю, по бокам спокойное поле. */
  :root {
    --frame-w: 1320px;
    --frame-left: max(0px, calc((100vw - var(--frame-w)) / 2));
    --nav-w: 232px;
    --panel-w: 400px;
    --main-w: min(680px, calc(min(100vw, var(--frame-w)) - var(--nav-w) - var(--panel-w) - 96px));
  }
  body { background: linear-gradient(to right, var(--nav-bg) calc(var(--frame-left) + var(--nav-w)), var(--bg) 0); }
  .app-shell { width: auto; max-width: none; margin: 0 0 0 calc(var(--frame-left) + var(--nav-w)); padding-right: 48px; padding-left: 48px; }
  .screen { max-width: var(--main-w); }
  .screen > .top-bar { right: auto; left: calc(var(--frame-left) + var(--nav-w)); width: calc(var(--main-w) + 96px); padding-right: 48px; padding-left: 48px; }
  body.has-tabbar .screen:not([hidden]) { padding-bottom: 48px; }

  .tabbar {
    top: 0; bottom: 0; left: 0; transform: none;
    width: calc(var(--frame-left) + var(--nav-w)); max-width: none;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 80px 14px 20px calc(var(--frame-left) + 14px);
    border: 0; border-right: 1px solid var(--line); border-radius: 0;
    background: var(--nav-bg); box-shadow: none;
  }
  .tabbar::before {
    content: "Standby Crew"; position: absolute; top: 26px; left: calc(var(--frame-left) + 26px);
    padding-left: 40px; font-size: var(--type-section); font-weight: 700; line-height: 30px; color: var(--text);
  }
  .tabbar::after {
    content: "sc"; position: absolute; top: 26px; left: calc(var(--frame-left) + 26px); width: 30px; height: 30px; border-radius: 9px;
    background: var(--green); color: #fff; font-size: var(--type-small); font-weight: 700; line-height: 30px; text-align: center;
  }
  .tab { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; width: auto; height: 44px; padding: 0 14px; gap: 12px; border-radius: 12px; font-size: var(--type-body); }
  .tab:hover:not(.is-active) { background: var(--surface); color: var(--text); }
  .tab-badge { position: static; margin-left: auto; }
  body.is-typing .tabbar { display: flex; }

  /* Шторки: окном по центру, а человек и день календаря панелью справа, список остаётся живым. */
  body.sheet-open { overflow: auto; }
  .sheet { align-items: center; }
  .sheet-panel { max-width: 520px; max-height: 84vh; border-radius: 18px; animation: fade-in .2s ease both; }
  .sheet-grip { display: none; }
  #shift-sheet, #day-sheet { inset: 0 var(--frame-left) 0 auto; width: var(--panel-w); align-items: stretch; pointer-events: none; }
  #shift-sheet .sheet-backdrop, #day-sheet .sheet-backdrop { display: none; }
  #shift-sheet .sheet-panel, #day-sheet .sheet-panel {
    max-width: none; max-height: none; height: 100vh; padding: 22px 24px 24px;
    border-left: 1px solid var(--line); border-radius: 0; box-shadow: -12px 0 32px rgba(0, 0, 0, .06);
    pointer-events: auto; animation: panel-in .20s cubic-bezier(.2, .8, .2, 1);
  }
  .person.is-selected { box-shadow: inset 0 0 0 2px var(--green); }
  .person-summary { cursor: pointer; }
  .person:not(.is-open):hover { background: var(--surface); }

  /* Поле помощника и плавающие кнопки по колонке экрана, а не по центру окна. */
  .assistant-composer { left: calc(var(--frame-left) + var(--nav-w) + 48px); width: var(--main-w); padding-right: 0; padding-left: 0; transform: none; }
  /* Меню слева не мешает полю ввода, поэтому в чате оно остаётся. */
  body.assistant-open .tabbar { display: flex; }
  /* Всплывашка по центру колонки, а не окна; в чате над полем ввода. */
  .toast,
  body.has-tabbar:not(.is-typing):not(.assistant-open) .toast {
    left: calc(var(--frame-left) + var(--nav-w) + 48px);
    right: calc(100vw - var(--frame-left) - var(--nav-w) - 48px - var(--main-w));
    bottom: 24px;
  }
  body.assistant-open .toast { bottom: 104px; }
}
@keyframes panel-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Компьютер: колонка экрана по центру места справа от меню, слева и справа поровну воздуха. Открылась
   панель справа (человек, день календаря) — колонка отходит к меню, чтобы панель её не закрывала.
   Без меню (вход с компьютера) — всё по центру окна и без серой полосы слева. */
@media (min-width: 1100px) {
  :root { --main-left: calc(var(--frame-left) + var(--nav-w) + (min(100vw, var(--frame-w)) - var(--nav-w) - var(--main-w) - 96px) / 2); }
  body:has(#shift-sheet:not([hidden])), body:has(#day-sheet:not([hidden])) { --main-left: calc(var(--frame-left) + var(--nav-w)); }
  body:not(.has-tabbar), body:has(#web-login:not([hidden])), body:has(#tabbar[hidden]) { --main-left: calc((100vw - var(--main-w) - 96px) / 2); background: var(--bg); }
  .app-shell { margin-left: var(--main-left); transition: margin-left .24s ease; }
  body:has(#web-login:not([hidden])) .tabbar { display: none; }
  .screen > .top-bar { left: var(--main-left); transition: left .24s ease; }
  .assistant-composer { left: calc(var(--main-left) + 48px); }
  .toast,
  body.has-tabbar:not(.is-typing):not(.assistant-open) .toast {
    left: calc(var(--main-left) + 48px);
    right: calc(100vw - var(--main-left) - 48px - var(--main-w));
  }
}
@media (min-width: 1100px) and (prefers-reduced-motion: reduce) {
  .app-shell, .screen > .top-bar { transition: none; }
}

/* Гость в помощнике: после третьего ответа мягкая плашка «впиши имя». */
.assistant-guest-nudge { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 4px 0 8px; padding: 14px 16px; border-radius: 16px; background: var(--green-soft); color: var(--text); }
.assistant-guest-nudge p { margin: 0; font-size: var(--type-body); line-height: 1.45; }

/* Кто свободен в ответе помощника: каждый человек чипом с ролью и днями, тап открывает профиль. */
.assistant-people { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; white-space: normal; }
.assistant-person { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-fill); color: var(--text); text-align: left; }
.assistant-person strong { font-size: var(--type-body); font-weight: 600; }
.assistant-person small { font-size: var(--type-caption); color: var(--muted); }
.assistant-person:hover { border-color: var(--green); }

/* Титры (пасхалка): чёрный экран, всё по центру, один размер текста. */
.credits-mark { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 32px auto 8px; padding: 8px 16px; background: none; border: 0; color: var(--muted); font: inherit; font-size: var(--type-small); cursor: default; -webkit-tap-highlight-color: transparent; }
.credits-mark img { width: 40px; height: 40px; border-radius: 10px; }
body.credits-open { overflow: hidden; }
.credits { position: fixed; inset: 0; z-index: 1000; background: #0b0b0b; color: #ecece7; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; text-align: center; font-size: var(--type-subheading); line-height: 1.5; animation: credits-in .6s ease both; }
.credits::-webkit-scrollbar { display: none; }
.credits-roll { max-width: 520px; margin: 0 auto; padding: 100vh 18px; padding: 100dvh 18px; }
.credits-card { position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; opacity: 0; transition: opacity 2.4s ease; pointer-events: none; }
.credits-card.is-shown { opacity: 1; }
/* Уход в чёрное: медленнее появления, без рывка. */
.credits-card.is-gone { opacity: 0; transition: opacity 3.2s ease-in-out; }
.credits-logo { display: block; width: 72px; height: 72px; margin: 0 auto; border-radius: 18px; }
.credits-controls { position: fixed; inset: 0; z-index: 1001; pointer-events: none; }
.credits-controls > * { pointer-events: auto; }
.credits-sound { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 62px; display: inline-flex; align-items: center; height: 40px; min-width: 40px; padding: 0; border-radius: 20px; border: 0; background: rgba(255, 255, 255, .1); color: #ecece7; font: inherit; font-size: var(--type-body); white-space: nowrap; cursor: pointer; transition: background .3s ease, color .3s ease; }
.credits-sound svg { flex: none; width: var(--icon-size); height: var(--icon-size); margin: 0 10px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.credits-sound-cross { opacity: 0; transition: opacity .2s ease; }
.credits-sound.is-off .credits-sound-cross { opacity: 1; }
.credits-sound-label { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .35s ease, opacity .25s ease, margin .35s ease; }
.credits-sound.is-open .credits-sound-label { max-width: 160px; margin-right: 16px; margin-left: -2px; opacity: 1; }
.credits-sound.is-off.is-open { background: rgba(255, 255, 255, .92); color: #0b0b0b; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .credits-sound, .credits-sound-label, .credits-sound-cross { transition: none; } }
.credits-hint { position: fixed; left: 24px; right: 24px; bottom: calc(18% + env(safe-area-inset-bottom, 0px)); width: fit-content; margin: 0 auto; padding: 14px 22px; border: 0; border-radius: 999px; background: #ecece7; color: #0b0b0b; font: inherit; font-size: var(--type-subheading); font-weight: 600; cursor: pointer; animation: credits-hint-in .8s ease both, credits-hint-pulse 2.4s ease-in-out 1s infinite; }
.credits-hint[hidden] { display: none; }
@keyframes credits-hint-in { from { opacity: 0; } }
@keyframes credits-hint-pulse { 50% { box-shadow: 0 0 0 10px rgba(236, 236, 231, .12); } }
@media (prefers-reduced-motion: reduce) { .credits-hint { animation: none; } }
body.is-fullscreen .credits-sound { top: calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + 14px); }
.credits-brand { margin-top: 16px; font-weight: 600; letter-spacing: .03em; }
.credits section { margin-top: 34px; }
.credits-title { font-weight: 400; }
.credits-names { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.credits-name { white-space: nowrap; }
.credits-dot.is-edge { visibility: hidden; }
.credits-sponsor { margin-top: 70px !important; }
.credits-sponsor svg { display: block; margin: 10px auto 0; color: #ecece7; }
.credits-end { position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 0 18px; opacity: 0; transition: opacity 2.4s ease; pointer-events: none; }
.credits-end.is-final { opacity: 1; pointer-events: auto; }
.credits-join { margin-top: 36px; padding: 14px 24px; border: 0; border-radius: 999px; background: #ecece7; color: #0b0b0b; font: inherit; font-size: var(--type-subheading); font-weight: 600; cursor: pointer; opacity: 0; transition: opacity 1.6s ease 2s; }
.credits-end.is-final .credits-join { opacity: 1; }
.credits-sign img { display: block; width: 72px; height: 72px; margin: 0 auto; border-radius: 18px; }
.credits-end.is-static { position: static; transform: none; margin-top: 70px; padding: 0; }
.credits-close { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #ecece7; font-size: var(--type-section); cursor: pointer; }
body.is-fullscreen .credits-close { top: calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + 14px); }
@keyframes credits-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .credits { animation: none; } .credits-roll { padding-top: 30vh; } }

/* Аренда стаффа Allset Rent (web/chunks/rent.js). Строки как .row-card, кнопки .button-small.button-outline. */
.row-icon-logo { border-radius: var(--radius-cell); background: var(--surface); color: var(--text); }
.row-icon-logo svg { width: 40px; height: 16px; }
.rent-logo { display: inline-flex; margin-bottom: 6px; color: var(--text); }
.rent-logo svg { width: 96px; height: 37px; }
.rent-items { display: flex; flex-direction: column; padding: 4px 16px; }
.rent-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rent-item:last-child { border-bottom: 0; }
.rent-photo { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: var(--radius-cell); background: var(--surface); }
.rent-photo img { width: 100%; height: 100%; object-fit: cover; }
.rent-photo .icon { color: var(--muted); }
.rent-name { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--type-body); line-height: 1.3; }
.rent-name small { font-size: var(--type-caption); color: var(--muted); }
.rent-qty { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.rent-qty .button-small { width: 34px; padding: 0; }
.rent-qty b { min-width: 20px; text-align: center; font-weight: 600; }
.rent-order-lines { display: flex; flex-direction: column; gap: 4px; color: var(--text-soft); }

/* «Сделать фото»: кадр 3:4 и овал под лицо. Превью фронталки зеркалим, как в обычной камере телефона;
   снимок показываем как есть, каким его увидят коллеги. */
.camera-frame { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius-card); background: var(--surface); }
.camera-frame video, .camera-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-frame video { transform: scaleX(-1); }
.camera-frame video[hidden], .camera-frame img[hidden] { display: none; }
.camera-oval { position: absolute; top: 44%; left: 50%; width: 62%; aspect-ratio: 3 / 4; border: 3px solid var(--camera-guide); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
/* Камера на весь экран (владелец 17.10, скрин с iPhone: «окно сделать больше»): кадр забирает всё место
   между подсказкой и кнопкой, панель не прокручивается. */
.camera-sheet .sheet-panel { height: 100vh; height: 100dvh; max-height: none; overflow: hidden; border-radius: 0; padding-top: max(10px, env(safe-area-inset-top)); }
.camera-sheet .sheet-panel > .stack { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.camera-sheet .camera-frame { flex: 1; min-height: 0; aspect-ratio: auto; }
/* Пока снимок проверяется, он пульсирует, как скелетон загрузки (владелец 17.10: «не видишь, что происходит»). */
.camera-frame img.is-checking { animation: skeleton-pulse 1.2s ease-in-out infinite; }
/* Фото из Telegram проверяется: аватар пульсирует, как снимок в шторке камеры. */
.avatar.is-checking { animation: skeleton-pulse 1.2s ease-in-out infinite; }
/* Окно плеера трека дня (/listen, владелец 16.10): виджет Яндекс Музыки и запасная кнопка. */
.listen { display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.listen-player { padding: 0; overflow: hidden; }
.listen-player iframe { display: block; width: 100%; height: 180px; border: 0; }

/* «Ищу работу / Ищу людей» на главной: тот же переключатель, что «Смена / Проект / Поиск» в запросе. */
.home-mode[hidden] { display: none; }
.home-mode button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
/* Досье сохраняет более тонкий контур при общем размере иконок. */
.home-mode .icon { stroke-width: 1.4; }
/* Выбранный режим залит зелёным, как «Главная» в нижнем меню (владелец 22.10, вариант А): мятный сливался
   с мятной карточкой под ним, и переключатель не замечали. */
/* Тень на выбранной кнопке (владелец 22.10): без неё кнопка плоская. Своя, сильнее общей: на зелёной заливке
   тень обычного переключателя не видна. */
.home-mode button.active { background-color: var(--tab-active-bg); color: var(--tab-active-ink); }

/* В «Ищу работу» плиток нет: главное там табло соискателя (вариант Б). */
#home-view[data-mode="work"] .home-actions { display: none; }
/* Кружки под плитками: значок как в строках, подпись снизу. Скрытые выпадают, остальные делят ширину. */
.home-acts { display: flex; gap: 6px; }
.home-act { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 4px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--type-caption); line-height: 1.2; text-align: center; }
/* Белый кружок с тенью, как карточки и плитки (владелец 22.10): мятный плоский выглядел ненажимаемым. */
.home-act .row-icon { position: relative; width: var(--control-face); height: var(--control-face); border-radius: var(--radius-button); background: var(--card-bg); box-shadow: var(--card-shadow); color: var(--green); }
.home-act .row-badge { position: absolute; top: -6px; right: -8px; }
/* Категории поиска используют тот же ряд иконок. Выбор зависит только от aria-pressed,
   чтобы наведение и «залипший» hover на телефоне не стирали выбранную заливку. */
.search-category-switch { display: grid; grid-template-columns: repeat(5, minmax(64px, 1fr)); gap: 4px; overflow-x: auto; padding: 4px 0 8px; }
.search-category { white-space: normal; justify-content: flex-start; }
.search-category .row-icon { color: var(--text-soft); }
.search-category[aria-pressed="true"] { color: var(--mint-ink); font-weight: 500; }
.search-category[aria-pressed="true"] .row-icon { background: var(--mint-bg); color: var(--mint-ink); box-shadow: none; }
@media (max-width: 360px) {
  .search-category { font-size: 11px; }
}
.seeker-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--mint-line); border-radius: var(--radius-card); background: var(--mint-bg); color: var(--mint-ink); }
.seeker-card[hidden] { display: none; }
/* «Пауза» ссылкой (владелец 27.10, вариант 1): справа от заголовка или строкой внизу под линией. */
.seeker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seeker-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--mint-line); font-size: var(--type-body); }
.seeker-foot[hidden], .seeker-head [hidden] { display: none; }
/* «Пауза» чипом со значком (владелец 27.10, вариант 2): видно, что это кнопка. */
.seeker-card .chip-button { flex: 0 0 auto; }
/* Статус поиска плашкой, как «день занят» у «Моего графика»; «Приостановить поиск» белой кнопкой (владелец 29.10). */
.seeker-card .button.seeker-pause { display: inline-flex; align-items: center; gap: 6px; background-color: var(--bg); color: var(--text); --control-stroke: var(--line); }
.seeker-pause[hidden], #seeker-pill[hidden] { display: none; }
.status-paused { background: var(--surface); color: var(--muted); }
#request-caravan-box[hidden], #cars-stepper[hidden] { display: none; }
/* Пауза в карточке (владелец 29.10): выбор срока раскрывается под кнопкой, без шторки. */
.seeker-pause-box { display: grid; gap: 10px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--mint-line); }
.seeker-pause-box[hidden], #pause-date-box[hidden], #pause-date-save[hidden] { display: none; }
.seeker-pause-options { display: flex; flex-wrap: wrap; gap: 0 6px; }
.seeker-pause-options .chip-button[aria-pressed="true"] { background-color: var(--text); color: var(--bg); --control-stroke: var(--text); }
.seeker-pause-actions { display: flex; align-items: center; gap: 16px; }
/* Тумблер поиска крупнее обычного и зелёный: это статус «в поиске», а не настройка (владелец 30.10). */
.seeker-card .switch.seeker-switch { width: 52px; height: 32px; border-radius: 16px; }
.seeker-card .switch.seeker-switch::after { width: 26px; height: 26px; }
.seeker-card .switch.seeker-switch:checked { background: var(--green); }
.seeker-card .switch.seeker-switch:checked::after { transform: translateX(20px); }
.seeker-switch[hidden] { display: none; }
.seeker-card .link { font-size: var(--type-body); }
.seeker-card[data-pending="false"]:is([data-step="2"], [data-step="3"]) { border-color: color-mix(in srgb, var(--mint-line) 50%, var(--card-bg)); background: color-mix(in srgb, var(--mint-bg) 72%, var(--card-bg)); }
.seeker-card:is([data-step="0"], [data-step="1"]) { border-color: color-mix(in srgb, var(--red-line) 60%, var(--card-bg)); background: color-mix(in srgb, var(--red-soft) 78%, var(--card-bg)); color: var(--text); }
.seeker-card:is([data-step="0"], [data-step="1"]) p, .seeker-until { color: var(--muted); }
.seeker-until { font-weight: 400; }
.seeker-card:has(#seeker-action[hidden]):has(#seeker-text[hidden]):has(#seeker-pause-box[hidden]) { padding: 4px 14px; gap: 0; }
#seeker-title { font-size: var(--type-body); }
.seeker-switch-target { display: flex; align-items: center; justify-content: flex-end; min-width: 52px; min-height: 44px; }
.seeker-switch-target:has(input[hidden]) { display: none; }
.seeker-steps { display: flex; align-items: center; gap: 6px; font-size: var(--type-small); font-weight: 600; }
.seeker-steps[hidden] { display: none; }
.seeker-steps i { width: 28px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--mint-ink) 18%, transparent); }
.seeker-steps i.on { background: var(--mint-ink); }
.seeker-steps span { margin-left: 4px; }
/* Заголовок как у «Найти» (17px): 23px, потом и 20px выбивались из главной (владелец 21.10, вариант Б). */
.seeker-card strong { font-size: var(--type-section); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.seeker-card p { margin: 0; font-size: var(--type-subheading); line-height: 1.4; color: var(--mint-ink-soft); }
.seeker-card .button { align-self: flex-start; width: auto; margin-top: 4px; padding: 0 20px; border-radius: 999px; background-color: var(--mint-ink); color: var(--mint-bg); }

/* Разговоры помощника: строка как .row-card, справа тихая ссылка «Изменить»; правка прямо в строке. */
.threads-list { display: flex; flex-direction: column; gap: 8px; }
.thread-row { display: flex; align-items: center; gap: 8px; }
.thread-row .row-card { flex: 1 1 0; width: auto; min-width: 0; }
.thread-row .row-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row .link { flex: 0 0 auto; width: auto; margin: 0; padding: 8px 4px; }
.thread-edit { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius-card); background: var(--card-bg); box-shadow: var(--card-shadow); }
.thread-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- Виджеты (владелец 22.10): плитки под рукой, вход свайпом влево с главной ---------- */
.page-head.widgets-head { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.widgets-edit { flex: none; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: var(--type-body); font-weight: 600; }
.widgets-edit[aria-pressed="true"] { background: var(--text); color: var(--bg); }
/* Четыре колонки: большой во всю строку, половина в две, маленький квадрат в одну (как на iPhone). */
.widgets-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
/* Внутри плитки «поверхность» как у других карточек (--card-inner): в тёмной теме кнопки и чипы
   иначе сливались с плиткой, у обеих был #1b1b19. */
.wg { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 150px; padding: 14px; border-radius: var(--radius-card); background: var(--card-bg); box-shadow: var(--card-shadow); color: var(--text); --surface: var(--card-inner); }
.wg-l { grid-column: span 4; min-height: 0; }
.wg-h { grid-column: span 2; }
.wg-s { grid-column: span 1; aspect-ratio: 1; min-height: 0; justify-content: space-between; gap: 2px; padding: 10px; }
/* «Вызывной» на 4 блока: вся ширина и высота двух половинок (2 × 150 + 10). Блоки, что выбрал человек, сеткой 2 × 2. */
.wg-x { grid-column: span 4; min-height: 310px; }
.wg-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
.wg-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--mint-ink) 7%, transparent); }
.wg-block .wg-facts { flex-wrap: wrap; gap: 6px 14px; margin: 0; }
.wg-block .wg-facts b { font-size: var(--type-section); }
.wg-block .wg-hours { margin-top: 0; }
.wg-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wg-value { overflow: hidden; font-size: 19px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.wg-label { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.2; text-overflow: ellipsis; }
.wg-mint .wg-label { color: var(--mint-ink-soft); }
.wg-arc { width: 100%; height: 50px; margin-top: auto; color: var(--text); }
.wg-bar { height: 6px; margin-top: 2px; overflow: hidden; border-radius: 3px; background: var(--surface); }
.wg-bar i { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.wg-row.wg-col { flex-direction: column; }
/* Кнопки столбиком («Домой»: Такси и Маршрут) той же высоты, что везде: с flex-basis 0 они сжимались (23.10). */
.wg-row.wg-col .wg-btn { flex: 0 0 auto; }
.wg-kpp > div { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.wg-kpp-head { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--type-body); text-align: left; }
.wg-kpp .wg-kpp-head .wg-day { flex: none; width: 92px; white-space: nowrap; }
.wg-kpp-place { display: block; align-self: stretch; padding: 0 0 0 102px; justify-content: flex-start; overflow: hidden; max-width: 100%; font-size: var(--type-caption); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.wg-people-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wg-mint { background: var(--mint-bg); color: var(--mint-ink); box-shadow: inset 0 0 0 1px var(--mint-line); }
.wg-kicker { display: flex; align-items: center; gap: 6px; font-size: var(--type-caption); font-weight: 600; color: var(--muted); }
/* Зелёные акценты на белых плитках (владелец 23.10, вариант А: «прям всё монохром»): иконка в заголовке,
   главная кнопка и первая быстрая кнопка таймера. Мятная плитка («Смена» в день смены) остаётся как есть. */
.wg:not(.wg-mint) .wg-kicker .icon { color: var(--green); }
.wg:not(.wg-mint) .wg-btn-main { background: var(--tab-active-bg); color: var(--tab-active-ink); }
.wg:not(.wg-mint) .wg-chips button:first-child { background: var(--green-soft); color: var(--green); }
.wg-mint .wg-kicker, .wg-mint .wg-sub { color: var(--mint-ink-soft); }
.wg-title { font-size: var(--type-section); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.wg-big { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wg-sub { font-size: var(--type-small); line-height: 1.35; color: var(--muted); }
.wg-warn { font-size: var(--type-small); font-weight: 600; color: var(--blue-ink); }
.wg-soon { color: var(--orange); }
.wg-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.wg-btn { display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; min-width: 0; height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: var(--type-body); font-weight: 600; white-space: nowrap; }
.wg-btn-main { background: var(--text); color: var(--bg); }
.wg-mint .wg-btn { background: color-mix(in srgb, var(--mint-ink) 12%, transparent); color: var(--mint-ink); }
.wg-mint .wg-btn-main { background: var(--mint-ink); color: var(--mint-bg); }
.wg-facts { display: flex; gap: 16px; margin: 2px 0 4px; }
.wg-facts span { display: flex; flex-direction: column; font-size: var(--type-caption); color: var(--mint-ink-soft); }
.wg-facts b { font-size: var(--type-title); letter-spacing: -.01em; color: var(--mint-ink); font-variant-numeric: tabular-nums; }
.wg-list { display: flex; flex-direction: column; margin-top: 2px; }
.wg-list > * { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: var(--type-body); text-align: left; }
.wg-list > :first-child { border-top: 0; }
.wg-list small { color: var(--muted); font-size: var(--type-caption); }
.wg-list .wg-day { flex: none; width: 52px; font-weight: 600; }
.wg-list .wg-grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-todo i { flex: none; width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.wg-todo.done { color: var(--muted); text-decoration: line-through; }
.wg-todo.done i { background: var(--green); box-shadow: none; }
.wg-sun-dot { fill: var(--orange); }
.wg-route { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.wg-route div { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--type-body); }
.wg-route i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.wg-route i.home { background: var(--muted); }
.wg-route small { display: block; overflow: hidden; color: var(--muted); font-size: var(--type-caption); text-overflow: ellipsis; white-space: nowrap; }
.wg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.wg-chips button { padding: 7px 10px; border: 0; border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: var(--type-small); font-weight: 600; }
/* «Обед через 2 ч 15 мин» в плитке смены: заметнее подписи, но тише крупных цифр. */
.wg-next { font-size: var(--type-body); font-weight: 600; }
.wg-mint .wg-bar { background: color-mix(in srgb, var(--mint-ink) 12%, transparent); }
.wg-mint .wg-bar i { background: var(--mint-ink); }
.wg-count { display: flex; justify-content: space-between; gap: 8px; font-size: var(--type-small); }
.wg-count b { font-variant-numeric: tabular-nums; }
.wg-people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.wg-people button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--type-caption); }
.wg-people .avatar { width: 48px; height: 48px; font-size: var(--type-section); }
.wg-people small { overflow: hidden; max-width: 100%; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.wg-note { font-size: var(--type-body); line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.wg-tap { cursor: pointer; }
/* Стрелки внутри плитки: снаружи они наезжали на крестик соседней. */
/* Меню по зажатию плитки (openWidgetMenu), как на экране «Домой» iPhone: фон темнеет, плитка приподнята,
   рядом меню с размерами и действиями. Плитка в гриде прячется, пока её копия поднята. */
.wg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: scale .18s ease; }
.wg.wg-pressing { scale: .97; }
.wg.wg-hidden { visibility: hidden; }
.wg-menu-layer { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background .2s ease, backdrop-filter .2s ease, -webkit-backdrop-filter .2s ease; }
.wg-menu-layer.open { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wg-lifted { position: fixed; margin: 0; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); transition: scale .22s cubic-bezier(0.22, 0.9, 0.3, 1); pointer-events: none; }
.wg-menu-layer.open .wg-lifted { scale: 1.04; }
.wg-menu { --surface: var(--card-inner); position: fixed; width: 240px; padding: 6px; border-radius: 16px; background: var(--card-bg); box-shadow: 0 16px 40px rgba(0, 0, 0, .22); opacity: 0; scale: .9; transition: opacity .2s ease, scale .22s cubic-bezier(0.22, 0.9, 0.3, 1); }
.wg-menu-layer.open .wg-menu { opacity: 1; scale: 1; }
.wg-menu-sizes { display: flex; gap: 6px; padding: 6px; }
.wg-menu-size { display: flex; flex: 1 1 0; align-items: center; justify-content: center; height: 40px; border-radius: 10px; background: var(--surface); color: var(--text); }
.wg-menu-size.active { background: var(--text); color: var(--bg); }
.wg-menu-size:disabled { opacity: .35; }
.wg-menu-size i { display: block; border: 1.6px solid currentColor; border-radius: 3px; }
.wg-menu-size-s i { width: 9px; height: 9px; }
.wg-menu-size-h i { width: 14px; height: 14px; }
.wg-menu-size-l i { width: 24px; height: 14px; }
.wg-menu-size-x i { width: 24px; height: 24px; }
.wg-menu-why { display: block; padding: 0 10px 6px; color: var(--muted); font-size: var(--type-caption); line-height: 1.3; }
.wg-menu-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border-top: 1px solid var(--line); color: var(--text); font-size: var(--type-subheading); text-align: left; }
.wg-menu-row.danger { color: var(--red); }
/* Плюс в углу плитки «Дела»: новое дело сразу отсюда, как в «Напоминаниях» iPhone. */
.wg-corner { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 18px; font-weight: 600; line-height: 1; }
/* Погода по часам: значок и температура сверху, ниже часы колонками. */
.wg-weather-head { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.wg-weather-head .icon { width: 28px; height: 28px; grid-row: span 2; }
.wg-weather-head .wg-sub { grid-column: 2; }
.wg-hours { display: flex; justify-content: space-between; gap: 4px; margin-top: auto; }
.wg-hours span { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.wg-hours small { color: var(--muted); font-size: 11px; }
.wg-hours b { font-size: var(--type-small); font-weight: 600; font-variant-numeric: tabular-nums; }
.wg-source { color: var(--muted); font-size: 10px; }
/* Половинка погоды: часы строкой «20 +9°», размер плитки как у соседей (вариант А, 23.10). */
.wg-hours-line span { flex-direction: row; align-items: baseline; gap: 4px; }
/* Длинное название в половинке в две строки: размер плитки не растёт, кнопка не уходит вниз. */
.wg-h .wg-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wg-tools { position: absolute; top: -8px; bottom: -10px; left: -8px; right: 8px; display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; z-index: 2; }
.wg-tools button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--text); color: var(--bg); font: inherit; font-size: var(--type-subheading); font-weight: 700; line-height: 1; pointer-events: auto; }
.widgets-grid.editing .wg { animation: wg-jiggle .3s ease-in-out infinite alternate; }
.widgets-grid.editing .wg:nth-child(2n) { animation-delay: .15s; }
/* Перетаскиваемая плитка: над остальными, чуть крупнее, с тенью; дрожание на ней не нужно. */
.widgets-grid .wg.wg-dragging { z-index: 5; scale: 1.04; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); animation: none; }
.widgets-grid.editing .wg { touch-action: none; }
/* Стопка: ячейка с прокруткой вверх-вниз и защёлкиванием, внутри обычные плитки во всю её высоту. */
/* Обрезает содержимое дорожка, не сама стопка: иначе крестик «Изменить экран» срезался по углу (23.10, скрин). */
.wg.wg-stack { padding: 0; overflow: visible; background: var(--card-bg); box-shadow: var(--card-shadow); }
.wg-stack.wg-h { height: 186px; min-height: 0; }
.wg-stack.wg-l { height: 210px; }
/* Листает код (widgetStackSwipe): своя прокрутка браузера откатывала короткий свайп. Вбок жест уходит экранам. */
.wg-stack-track { height: 100%; overflow: hidden; touch-action: pan-x; overscroll-behavior: contain; border-radius: var(--radius-card); }
.wg-stack-track > .wg { height: 100%; min-height: 0; overflow: hidden; box-shadow: none; }
.wg-stack-dots { position: absolute; top: 50%; right: 5px; display: flex; flex-direction: column; gap: 4px; translate: 0 -50%; pointer-events: none; }
.wg-stack-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); opacity: .35; }
.wg-stack-dots i.on { opacity: 1; }
.widgets-grid.editing .wg-stack .wg { animation: none; }
@keyframes wg-jiggle { from { transform: rotate(-.5deg); } to { transform: rotate(.5deg); } }
@media (prefers-reduced-motion: reduce) { .widgets-grid.editing .wg { animation: none; } }
.widgets-add { width: 100%; margin-top: 12px; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-card); background: none; color: var(--muted); font: inherit; font-size: var(--type-subheading); font-weight: 600; }
.widgets-add-list { display: flex; flex-direction: column; gap: 8px; }
.widget-links-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; align-items: center; }
.widget-pick { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
/* В маленькой плитке кнопки меньше: крестик и две стрелки должны влезть в четверть строки. */
.wg-s .wg-tools { right: -4px; }
.wg-s .wg-tools button { width: 22px; height: 22px; font-size: var(--type-small); }
.wg:not(.wg-mint) .wg-facts span { color: var(--muted); }
.wg:not(.wg-mint) .wg-facts b { color: var(--text); }

/* Компьютер с мышью: колесо листает страницу, а не ряд вбок, и скрытая полоса прокрутки прятала
   «Админов площадки» и дальше (тестировщик 26.10, Telegram Desktop). Пилюли переносятся на вторую строку,
   переключатель «Все | Свободны | Заняты» не переносим. */
@media (hover: hover) and (pointer: fine) {
  .chips:not(.segmented), .project-chips, .tasks-filter { flex-wrap: wrap; overflow-x: visible; }
}
/* Календарь: компактный месяц, неделя и список используют те же плашки и токены. */
#calendar-view { gap: 12px; padding-bottom: 110px; }
body.has-tabbar #calendar-view > .top-bar-back:has(> .top-actions) > .top-title { display: none; }
#calendar-view > #next-shift, #calendar-view > #shifts-block { display: none; }
#calendar-months .month { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; gap: 6px; }
#calendar-months .month-head { display: grid; grid-template-columns: auto auto auto 1fr auto auto; gap: 4px; align-items: center; }
#calendar-months .month-head > strong { grid-column: 1 / 4; font-size: var(--type-title); color: var(--text); }
#calendar-months .month-head .calendar-density { grid-column: 4 / -1; justify-self: end; width: min(100%, 164px); }
#calendar-months .month-today { min-height: 44px; padding: 0 8px; font-size: var(--type-small); }
#calendar-months .month-today:disabled { color: var(--muted); }
#calendar-months .calendar-layers { grid-column: 5; }
#calendar-months .month-nav, #calendar-months .calendar-layers, #calendar-months .calendar-add { width: 44px; height: 44px; padding: 4px; border: 0; border-radius: var(--radius-cell); background: var(--surface); background-clip: content-box; color: var(--text); font-size: var(--type-title); }
#calendar-months .calendar-layers .icon { width: 20px; height: 20px; }
.calendar-density { margin: 0; padding: 0; }
.calendar-density button { padding-inline: 4px; font-size: var(--type-small); }
.calendar-density button.active { --control-shadow: none; }
.month-grid.cal-v2 { column-gap: 0; row-gap: 0; }
.month-grid.cal-v2 > span { border-top: 1px solid var(--line); }
.month-grid.cal-v2 .cell { position: relative; height: 80px; flex-direction: column; justify-content: flex-start; padding-top: 3px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); overflow: visible; }
.month-grid.cal-detail .cell { height: 102px; min-width: 0; gap: 3px; padding: 5px 1px; overflow: hidden; }
#calendar-months .month-grid.cal-detail .cell { height: var(--month-cell-height, auto); min-height: 44px; gap: 1px; padding: 3px 1px; }
.cell-markers { display: var(--month-markers, none); max-width: 100%; align-items: center; justify-content: center; gap: 2px; }
.cell-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--project, var(--muted)); }
.cell-dot.numbered { width: auto; height: auto; min-width: 0; padding-inline: 1px; border-radius: 3px; background: color-mix(in srgb, var(--project, var(--line-strong)) 20%, var(--bg)); font-size: var(--type-caption); line-height: 13px; overflow: hidden; text-overflow: ellipsis; }
.cell-markers-more { color: var(--muted); font-size: var(--type-caption); line-height: 13px; }
#calendar-months .cal-detail :is(.cell-event, .cell-more) { line-height: 14px; }
#calendar-months .cal-detail .cell-more { display: var(--month-labels, block); }
#calendar-months .cal-detail .cell-event { display: var(--month-labels, -webkit-box); -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; }
#calendar-months .weekdays { column-gap: 0; }
@media (max-width: 599px) {
  #calendar-months :is(.weekdays, .month-grid.cal-detail, .calendar-week-grid) { margin-inline: -18px; }
}
@media (max-width: 360px) {
  #calendar-months :is(.weekdays, .month-grid.cal-detail, .calendar-week-grid) { margin-inline: -14px; }
}
@media (max-width: 599px) and (max-height: 730px) {
  .month-grid.cal-detail { --month-cell-height: clamp(44px, 8dvh, 52px); --month-labels: none; --month-markers: flex; }
}
@media (max-width: 599px) and (max-height: 900px) {
  .month-grid.cal-detail.cal-crowded { --month-cell-height: clamp(44px, 8dvh, 52px); --month-labels: none; --month-markers: flex; }
}
.cell-event { display: block; flex: none; width: 100%; min-width: 0; padding: 1px 3px; border-radius: 3px; background: color-mix(in srgb, var(--project, var(--line-strong)) 20%, var(--bg)); color: var(--text); font-size: var(--type-caption); font-weight: 400; line-height: 16px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-more { color: var(--muted); font-size: var(--type-caption); line-height: 16px; }
.cell-event.is-shift { display: flex; gap: 2px; }
.cell-event-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.month-grid.cal-compact .cell { height: 46px; }
.month-grid.cal-v2 .cell:disabled, .month-grid.cal-v2 .cell.past { background: transparent; color: var(--past); }
.cell-num { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; font-size: var(--type-small); font-weight: 500; }
.month-grid.cal-v2 .cell.today .cell-num { background: var(--green); color: var(--on-text); font-weight: 600; }
.month-grid.cal-v2 .cell.selected:not(.today) .cell-num { background: var(--text); color: var(--bg); font-weight: 600; }
.month-grid.cal-v2 .cell.picked .cell-num { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.cell-plate { position: absolute; z-index: 1; left: 1px; top: calc(28px + var(--lane, 0) * 13px); width: calc(var(--span, 1) * 100% - 2px); height: 11px; border-radius: 3px; background: color-mix(in srgb, var(--project, var(--line-strong)) 20%, var(--bg)); box-shadow: inset 2px 0 0 var(--project, var(--line-strong)); pointer-events: none; }
.cell-plate.is-plain { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cell-plate.is-rest { background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--bg) 6px 9px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cell-plate.is-todo { background: transparent; box-shadow: none; border-bottom: 1px dotted var(--project, var(--muted)); }
.cell-plate.is-invite { background: var(--orange-soft); box-shadow: none; border: 1px dashed var(--orange); }
.cell-plate.is-shift { height: 13px; background: var(--project, var(--text)); box-shadow: none; }
.cell-plate.is-shift .cell-caption { display: flex; gap: 1px; padding: 0 2px; line-height: 13px; font-weight: 700; color: var(--project-ink, #fff); }
.cell-shift-number { flex: none; }
.cell-plate.is-shift.is-plain .cell-caption { color: var(--bg); }
.cell-plate.is-rest.has-color { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--project) 20%, var(--bg)) 0 6px, var(--bg) 6px 9px); box-shadow: inset 2px 0 0 var(--project); }
.cell-plate.is-todo.has-color, .cell-plate.is-invite.has-color { background: color-mix(in srgb, var(--project) 20%, var(--bg)); border-color: var(--project); }
.cell-plate.c-photo { background-image: var(--project-img); background-size: cover; }
.cell-caption { display: block; padding: 0 3px 0 5px; font-size: 9px; font-weight: 500; line-height: 11px; color: var(--text); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-plate.is-plain .cell-caption, .cell-plate.is-rest .cell-caption { color: var(--text-soft); }
.month-grid.cal-v2 .cell.past .cell-plate { opacity: .65; }
#calendar-months .month-grid.cal-v2 .cell.selected { box-shadow: none; }
.month-grid.cal-compact .cell-plate { top: calc(28px + var(--lane, 0) * 4px); left: 3px; width: calc(var(--span, 1) * 100% - 6px); height: 3px; border-radius: 1px; background: var(--project, var(--line-strong)); box-shadow: none; }
.month-grid.cal-compact .cell-plate.is-shift { height: 4px; }
.month-grid.cal-compact .cell-plate.is-rest { background: repeating-linear-gradient(90deg, var(--project, var(--line-strong)) 0 4px, transparent 4px 7px); }
.month-grid.cal-compact .cell-plate.is-invite { background: transparent; border: 1px dashed var(--project, var(--orange)); }
.month-grid.cal-compact .cell-caption { display: none; }
.calendar-week { display: grid; gap: 10px; }
.calendar-month-back { text-align: left; text-transform: capitalize; }
.calendar-day-detail { border-top: 1px solid var(--line); padding-top: 16px; }
.calendar-day-detail[hidden] { display: none; }
.calendar-shift-detail { border-left: 3px solid var(--project, var(--line-strong)); }
.calendar-shift-actions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.calendar-shift-actions > .button { white-space: nowrap; }
.calendar-call-time { font-size: 30px; line-height: 1.1; }
.calendar-agenda { display: grid; gap: 0; }
.calendar-agenda-date { padding: 18px 0 6px; font-size: var(--type-caption); font-weight: 500; color: var(--green); }
.calendar-month-agenda .calendar-agenda-date { padding-top: 2px; }
.calendar-month-agenda .calendar-event-row { min-height: 44px; padding-block: 3px; }
.calendar-month-agenda .calendar-event-row .row-copy { gap: 1px; }
.calendar-event-row { display: flex; align-items: flex-start; width: 100%; gap: 10px; padding: 12px 0; text-align: left; color: var(--text); border-bottom: 1px solid var(--line); }
.calendar-event-time { flex: 0 0 52px; font-size: 11px; color: var(--muted); }
.calendar-event-row .row-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; border-left: 3px solid var(--project, var(--line-strong)); padding-left: 10px; }
.calendar-event-row strong { font-size: var(--type-body); overflow-wrap: anywhere; }
.calendar-event-row .row-copy small { font-size: var(--type-caption); color: var(--muted); }
.calendar-event-row.is-invite .row-copy { border-left: 2px dashed var(--project, var(--orange)); }
.calendar-event-row.is-todo .row-copy { border-left: 2px dotted var(--project, var(--muted)); }
.calendar-event-row.is-done strong, .calendar-todo-row.is-done > span { text-decoration: line-through; color: var(--muted); }
.calendar-empty { padding-top: 20px; }
.calendar-filter-row { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.calendar-filter-row .switch-row { flex: 1; min-width: 0; padding: 10px 0; }
.calendar-filter-row .switch-row strong, .calendar-source-row .switch-row strong { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.calendar-filter-row .link { font-size: 11px; }
.calendar-filter-swatch { display: inline-block; flex: 0 0 12px; height: 12px; border-radius: 3px; background: var(--project, var(--line-strong)); }
.calendar-filter-swatch.is-rest { background: repeating-linear-gradient(135deg, var(--project, var(--line-strong)) 0 2px, var(--bg) 2px 4px); }
.calendar-todo-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--type-body); }
.calendar-todo-row input { width: 20px; height: 20px; flex: none; accent-color: var(--project, var(--green)); }
.calendar-todo-row.has-color { border-left: 2px dotted var(--project); padding-left: 10px; }
.calendar-todo-row > span { flex: 1; }
.calendar-todo-entry { display: flex; align-items: center; gap: 8px; min-width: 0; }
.calendar-todo-entry > .calendar-todo-row { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.calendar-todo-edit { flex: none; min-height: 44px; }
.calendar-todo-edit::before { inset: 0; }
.calendar-hours .calendar-todo-entry { flex-direction: row; align-items: center; min-height: 44px; padding-block: 0; }
#calendar-months .calendar-week-nav { display: flex; }
.calendar-day-detail:has(> .card-title-lg + .button) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.calendar-day-detail:has(> .card-title-lg + .button) > * { grid-column: 1 / -1; }
.calendar-day-detail:has(> .card-title-lg + .button) > .card-title-lg { grid-column: 1; }
.calendar-day-detail:has(> .card-title-lg + .button) > .card-title-lg + .button { grid-column: 2; justify-self: end; width: auto; }
.calendar-hours { position: relative; margin: 10px 0; }
.calendar-hour-line, .calendar-hour-lanes { position: absolute; left: 46px; right: 0; }
.calendar-hour-line { border-top: 1px solid var(--line); }
.calendar-hour-line small { position: absolute; right: calc(100% + 6px); transform: translateY(-50%); color: var(--muted); font-size: var(--type-caption); font-variant-numeric: tabular-nums; }
.calendar-hour-lanes { inset-block: 0; }
.calendar-hours .calendar-hour-event {
  position: absolute; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  gap: 1px; min-width: 0; min-height: 0; overflow: hidden; padding: 4px 6px; text-align: left;
  border: 0; border-inline-start: 3px solid var(--project, var(--blue-ink)); border-radius: 5px;
  background: var(--blue-soft); color: var(--text);
}
.calendar-hour-event.has-color { background: color-mix(in srgb, var(--project) 17%, var(--bg)); }
.calendar-hour-event strong, .calendar-hour-event > span { font-size: var(--type-small); line-height: 1.2; overflow-wrap: anywhere; }
.calendar-hour-event small { font-size: var(--type-caption); font-variant-numeric: tabular-nums; }
.calendar-hours .calendar-todo-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; column-gap: 5px; }
.calendar-hours .calendar-todo-row small { grid-column: 2; }
.calendar-day-detail > .calendar-event-row { padding-block: 4px; align-items: center; border-bottom: 0; }
.calendar-day-detail > .calendar-event-row .row-copy { padding: 5px 8px; background: var(--surface); border-radius: 4px; }
#calendar-layers-sheet #calendar-projects { gap: 0; }
#calendar-layers-sheet .crew-label { margin: 14px 0 6px; }
#calendar-layers-sheet .calendar-filter-row .switch-row { padding: 6px 0; }
#calendar-layers-sheet #calendar-projects > .link { align-self: flex-start; margin: 10px 0; }
#calendar-tools-menu > .account-group { padding: 0; border: 0; border-radius: 0; }
#calendar-tools-menu > .account-group > .row-card { padding-block: 8px; }
#calendar-tools-menu .account-group .row-copy strong { font-size: var(--type-body); }
#calendar-tools-menu .account-group .row-icon { width: 36px; height: 36px; background: var(--green-soft); color: var(--green); }
#calendar-tools-menu .account-group .row-icon .icon { width: 20px; height: 20px; }

/* Полное имя и подтверждение выхода читаются в одной строке участника на узком экране. */
.responder-who .pill { align-self: flex-start; white-space: normal; margin-top: 4px; }
.responder-who .row-copy strong { white-space: normal; overflow-wrap: anywhere; }
.responder-contact-hint { padding-left: 48px; overflow-wrap: anywhere; }
.shift-message-preview { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }

/* Поиск использует существующие плитки, быстрые запросы остаются рядом с ним. */
#home-view[data-mode="work"] #home-find { display: none; }

/* Личный кабинет: действующие поля открываются отдельно, на первом экране остаётся обзор. */
.account-home { gap: 16px; }
.account-identity { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); background: var(--bg); box-shadow: none; }
.account-identity-row { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; column-gap: 12px; }
.account-photo { grid-row: span 2; position: relative; display: grid; place-items: center; width: 56px; height: 56px; }
.account-photo .avatar { width: 56px; height: 56px; }
.account-photo-edit { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--bg); border-radius: 50%; color: var(--text); background: var(--bg); }
.account-photo-edit .icon { width: 16px; height: 16px; }
.account-photo .avatar img { object-position: center 30%; }
.account-name { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; min-height: 44px; text-align: left; overflow-wrap: anywhere; }
.account-name #profile-name { font-size: var(--type-title); font-weight: 500; line-height: 1.2; }
.account-name-badge { cursor: inherit; }
.account-name-badge.is-pending { filter: grayscale(1); }
.account-name .icon { flex: none; width: 16px; height: 16px; }
#account-search-status { justify-self: start; display: inline-flex; align-items: center; min-height: var(--control-target); padding: 0; }
#account-search-status .pill { min-height: 24px; gap: 5px; padding-inline: 8px; font-size: var(--type-caption); }
#account-search-status .pill.paused { background: var(--surface); color: var(--text-soft); }
#account-search-status .paused i { border-inline: 2px solid currentColor; border-radius: 0; background: none; }
#account-search-status .icon { width: 12px; height: 12px; transform: rotate(90deg); }
#profile-search-options .row-card { min-height: var(--control-target); padding-block: 6px; font-size: var(--type-body); }
#profile-search-options .icon { width: var(--icon-inline-size); height: var(--icon-inline-size); }
#profile-search-options .status-check { margin-left: auto; color: var(--green); visibility: hidden; }
#profile-search-options [aria-pressed="true"] .status-check { visibility: visible; }
.account-rec-links { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.account-rec-link { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-width: 0; min-height: 56px; padding: 0; text-align: left; color: var(--text-soft); font-size: var(--type-small); }
.account-rec-link + .account-rec-link { border-left: 1px solid var(--line); padding-left: 16px; }
.account-rec-value { display: flex; align-items: center; gap: 6px; width: 100%; color: var(--green); }
.account-rec-value strong { font-size: var(--type-title); line-height: 1.2; font-weight: 500; }
.account-rec-value .icon { width: 18px; height: 18px; }
.account-rec-value .icon-chevron { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
.account-progress { gap: 8px; min-height: 44px; padding: 8px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.account-progress:hover { background: none; }
.account-progress .progress-track { background: var(--line); }
.account-badge-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; text-align: left; }
.account-badge-row .verified-badge { flex: none; width: 20px; height: 20px; }
.account-badge-row .verified-badge.is-pending { filter: grayscale(1); opacity: .6; }
.account-badge-row .row-copy strong { font-size: var(--type-small); }
.account-badge-row .row-copy small { font-size: var(--type-caption); }
.account-badge-row > .icon-chevron { flex: none; width: 16px; height: 16px; color: var(--muted); }
.account-group { padding: 0 16px; box-shadow: none; border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.account-group > .row-card, .account-group > .request-card > .row-card { min-height: 62px; padding: 12px 0; border: 0; border-radius: 0; background: none; box-shadow: none; gap: 12px; }
.account-group > .request-card { border: 0; border-radius: 0; box-shadow: none; background: none; }
.account-group > .request-card > .request-body { padding-inline: 0; }
.account-group > .request-card .row-icon > .request-dot { margin: 0; }
.account-group > :is(.row-card, .request-card) + :is(.row-card, .request-card) { border-top: 1px solid var(--line); }
.account-group .row-card:hover { background: none; }
.account-group .row-icon { width: var(--icon-size); height: var(--icon-size); color: var(--text-soft); background: none; }
.account-group .row-copy strong { font-size: var(--type-subheading); font-weight: 500; }
.account-group .row-copy small { font-size: var(--type-small); }
.account-group #pending-payout .row-card { gap: 12px; }
.account-group .icon-chevron { width: 18px; height: 18px; }
.account-count { flex: none; font-size: var(--type-small); color: var(--muted); }
.account-group #projects-summary, .account-group #colleagues-summary, .account-group #projects-confirm-text { display: none; }
.profile-account-details .account-panel > summary { display: none; }
.profile-account-details .account-panel { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.profile-account-details .account-panel > .request-body { padding: 0; }
.profile-account-details .account-panel[open] > :not(summary) { animation: none; }
.profile-account-details #account-panels, .profile-account-details #profile-form { display: flex; flex-direction: column; gap: 16px; }
.profile-account-details .account-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#account-completion-panel { gap: 12px; }
#account-checklist { gap: 0; padding: 8px 12px; }
#account-checklist .account-check { min-height: 32px; }
#account-checklist .account-check + .account-check { border-top: 1px solid var(--line); }
#account-checklist .account-check > .link { flex: none; min-height: 44px; padding: 0; white-space: nowrap; }
#account-completion-panel #verified-card { padding: 12px; align-items: flex-start; gap: 10px; }
#account-completion-panel .verified-badge-large { flex: none; width: 26px; height: 26px; }
#account-completion-panel .verified-copy { min-width: 0; }
#account-completion-panel .verified-copy .link { margin: 0; min-height: 44px; }
.profile-account-details:has(#account-completion-panel:not([hidden])) { gap: 8px; }

/* Touch targets occupy real layout space: invisible overlapping halos can select a neighbour. */
@media (pointer: coarse) {
  :where(button, a[href], summary, [role="button"], [role="tab"]) {
    min-width: var(--control-target);
    min-height: var(--control-target);
  }
  #tabbar .tab { min-width: var(--control-target); }
  .link::before, .today-label::before { inset: 0; }
}

/* Поиск ставок в шторке повторяет единую плашку каталога. */
#crew-sheet .catalog-search { margin: 0; border: 0; border-radius: var(--radius-button); background: var(--surface); }
#crew-sheet .catalog-search:focus-within { box-shadow: inset 0 0 0 1px var(--muted); }

.crew-chat-primary { background: var(--project-blue); color: white; }
.crew-chat .action-chips > .button { min-height: 44px; }
:is(#crew-sheet, #invite-sheet, #place-sheet) form .button[type="submit"] {
  position: sticky;
  bottom: env(safe-area-inset-bottom, 0px);
  z-index: 1;
}
.calendar-busy-stripe {
  position: absolute;
  bottom: 2px;
  width: min(36px, 84%);
  height: 4px;
  border-radius: 2px;
  background: var(--muted);
  pointer-events: none;
}
#strip-legend .swatch[data-kind="project"], .calendar-busy-stripe[data-kind="project"] { background: var(--blue-ink); }
#strip-legend .swatch[data-kind="personal"] { background: var(--muted); }
#strip-legend .swatch[data-kind="split"], .calendar-busy-stripe[data-kind="split"] { background: linear-gradient(90deg, var(--blue-ink) 50%, var(--blue-soft) 50%); }
.calendar-busy-stripe[data-kind="reserve"] { background: transparent; border-top: 4px dashed var(--reserve-stripe); }

:is(#crew-sheet, #invite-sheet, #place-sheet) { bottom: var(--sheet-keyboard-inset, 0px); }
:is(#crew-sheet, #invite-sheet, #place-sheet) .sheet-panel { max-height: min(85vh, 100%); }

.day .swatch.calendar-busy-stripe { position: static; width: min(36px, 84%); }

/* Список группы: отдельные карточки, ФИО и должность видны до раскрытия. */
#crewlist-view { gap: 12px; }
#crewlist-view > .catalog-search { margin: 0; }
#crewlist-people { gap: 8px; }
#crewlist-people:empty { display: none; }
.crew-person { display: block; min-width: 0; padding: 10px 12px; color: var(--text); }
/* Раскрытая карточка плотная. Контакты одним блоком, действия переносятся целиком при нехватке места. */
.crew-person-body { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.crew-person-extra { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--type-small); }
.crew-person > summary { min-height: 44px; gap: 1px; }
.crew-person > summary strong { font-size: var(--type-body); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.crew-person > summary small { overflow-wrap: anywhere; line-height: 1.3; }
.crew-person-contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; padding: 2px 10px; border-radius: 10px; background: var(--surface); }
.crew-person-contacts.is-single { grid-template-columns: minmax(0, 1fr); }
.crew-person-contact { display: flex; align-items: center; min-width: 0; min-height: 40px; padding: 0; border: 0; background: none; font: inherit; font-size: var(--type-small); line-height: 1.3; text-align: left; text-decoration: none; overflow-wrap: anywhere; word-break: break-word; }
.crew-person-copy { color: var(--text); font-weight: 500; cursor: pointer; }
.crew-person-telegram { color: var(--green); }
.crew-person-email { grid-column: 1 / -1; color: var(--green); font-size: var(--type-caption); border-top: 1px solid var(--line); }
.crew-person-contacts.is-single .crew-person-email { border-top: 0; }
.crew-person-actions { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; }
.crew-person-actions > .button { flex: 1 0 auto; min-height: 44px; padding-inline: 6px; white-space: nowrap; }
.crew-dept-head { margin: 6px 2px -2px; font-size: var(--type-caption); font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.crew-dept-head:first-child { margin-top: 0; }
.crewlist-upload { gap: 8px; padding: 12px; }
.crewlist-upload-title { margin: 0; font-size: var(--type-body); font-weight: 600; }
.crewlist-upload .hint { margin: 0; }
.crewlist-link { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.crewlist-link input { width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box; }
.crewlist-link .button { width: 100%; min-height: 44px; }
.crewlist-delete { align-self: center; min-height: 44px; padding-inline: 12px; }
.crewlist-actions { flex-wrap: wrap; }
.crewlist-actions > .button { flex: 1 1 auto; min-height: 44px; padding-inline: 10px; }
#crew-sheet form.crew-roster-form .button[type="submit"] { position: relative; bottom: auto; z-index: auto; }
.crew-compose-people { max-height: 40vh; overflow-y: auto; }
.crew-compose-bulk { display: flex; flex-wrap: wrap; gap: 0 6px; margin: -4px 0 4px; }
.crew-compose-bulk .button-small { height: 44px; }
.crew-compose-count { margin: 0; font-variant-numeric: tabular-nums; }
.checklist-section.crew-compose-dept { align-items: center; gap: 12px; margin: 12px 0 0; padding: 0 12px; }
.checklist-section.crew-compose-dept:first-child { margin-top: 0; }
.crew-compose-dept label { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.crew-compose-dept input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--green); cursor: pointer; }
.crew-compose-dept-name { min-width: 0; overflow-wrap: anywhere; }

/* Список группы: быстрые цеха (владелец 13.11). «Фильтры» первой, одна строка с прокруткой вбок, без переноса. */
.crewlist-depts { display: block; overflow-x: auto; scroll-padding-inline: 16px; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.crewlist-depts::-webkit-scrollbar { display: none; }
.crewlist-depts[hidden], .crewlist-depts-row[hidden] { display: none; }
.crewlist-depts-row { display: flex; flex-wrap: nowrap; gap: 6px; width: max-content; }
.crewlist-depts .crewlist-chip { white-space: nowrap; max-width: min(240px, calc(100vw - 80px)); }
.crewlist-chip-label { overflow: hidden; text-overflow: ellipsis; }
.crewlist-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-soft);
  font-size: var(--type-small);
  font-weight: 500;
  white-space: nowrap;
}
.crewlist-chip .icon { width: 16px; height: 16px; }
.crewlist-chip.active { --control-stroke: var(--text); background-color: var(--text); color: var(--on-text); }
.crewlist-chip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.crew-person-new { box-shadow: inset 0 0 0 2px var(--green); }

/* «Составить список» (владелец 13.11): поля списка и разовые люди. */
.crew-compose-fields-title { margin: 8px 0 0; }
label.crew-compose-field { min-height: 44px; }
label.crew-compose-field input:disabled { opacity: .6; }
.compose-extra { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); }
.compose-extra .checklist-text small.hint { display: block; }
.compose-extra > .button { align-self: flex-start; max-width: 100%; white-space: normal; }

/* ---------- Карта смен ---------- */
.row-card-soon .icon-chevron { display: none; }
.shift-map-upload { display: grid; gap: 8px; }
.shift-map-upload .hint { margin: 0; }
.shift-map-card .row-copy small { white-space: normal; }
.shift-map-wait { margin: 0; }
.shift-map-summary { display: grid; gap: 10px; }
.shift-map-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shift-map-stat { display: grid; gap: 2px; padding: 10px 8px; border-radius: 12px; background: var(--surface); text-align: center; }
.shift-map-stat b { font-size: 1.25rem; line-height: 1.1; }
.shift-map-stat small { color: var(--muted); font-size: var(--type-caption); }
.shift-map-conflicts, .shift-map-changes { display: grid; gap: 6px; }
.shift-map-conflicts { border: 1px solid color-mix(in srgb, #d9822b 55%, transparent); }
.shift-map-conflicts p, .shift-map-changes p { margin: 0; font-size: var(--type-caption, 0.85rem); overflow-wrap: anywhere; }
.shift-map-changes summary { font-weight: 600; cursor: pointer; }
.shift-map-actions { display: grid; gap: 8px; }
.shift-map-actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.shift-map-actions-row .button { flex: 1 1 auto; min-width: 0; }
.shift-map-day { display: grid; gap: 8px; }
details.shift-map-day, details.shift-map-changes { display: block; }
details.shift-map-day[open] > summary, details.shift-map-changes[open] > summary { margin-bottom: 10px; }
details.shift-map-day > .shift-map-points + .button { margin-top: 10px; }
.shift-map-day > summary { font-weight: 600; cursor: pointer; }
.shift-map-day-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.shift-map-day-head small { color: var(--muted); }
.shift-map-night { display: inline-flex; align-items: center; gap: 8px; font-size: var(--type-caption, 0.85rem); }
.shift-map-points { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shift-map-point { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.shift-map-point-view, .shift-map-point-single { grid-template-columns: 28px minmax(0, 1fr); }
.shift-map-point:has(> .shift-map-form) { grid-template-columns: 1fr; }
.shift-map-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; font-size: 0.85rem; }
.shift-map-point-copy { display: grid; gap: 2px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.shift-map-point-copy strong, .shift-map-point-copy small { overflow-wrap: anywhere; }
.shift-map-point-copy small { color: var(--muted); }
.shift-map-check { justify-self: start; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, #d9822b 18%, transparent); color: #b5651d; font-size: var(--type-caption, 0.8rem); font-weight: 600; }
[data-theme="dark"] .shift-map-check { color: #f0a55a; }
.shift-map-order { display: flex; flex-direction: column; gap: 2px; }
.shift-map-order .icon-button { width: 32px; height: 32px; }
.shift-map-order .icon-button:disabled { opacity: 0.3; cursor: default; }
.shift-map-up { transform: rotate(-90deg); }
.shift-map-down { transform: rotate(90deg); }
.shift-map-form { display: grid; gap: 8px; }
.shift-map-form .hint { margin: 0; }
.shift-map-delete { justify-self: center; }
.shift-map-next { display: grid; gap: 6px; }
.shift-map-kicker { color: var(--muted); font-size: var(--type-caption, 0.8rem); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.shift-map-next-date { font-size: 1.4rem; line-height: 1.15; }
.shift-map-sheet { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: var(--type-caption, 0.8rem); font-weight: 600; }
.shift-map-sheet.ready { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.shift-map-canvas { height: 220px; margin: 4px 0; border-radius: 14px; overflow: hidden; background: var(--surface); }
.shift-map-static { display: block; width: 100%; height: 100%; object-fit: cover; }
.shift-map-canvas .shift-map-marker { width: 28px; height: 28px; transform: translate(-50%, -50%); cursor: default; }
.shift-map-marker span { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; background: #2f7d4f; color: #fff; font: 700 13px/1 Onest, sans-serif; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.shift-map-entry-box { margin: 4px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--surface); font-size: var(--type-caption, 0.85rem); overflow-wrap: anywhere; }
.shift-map-point-view .shift-map-actions-row { margin-top: 6px; }
/* «Карты» (владелец 13.11): новая карта из КПП календаря или вручную, версия источника в черновике. */
.shift-map-source .row-copy small { white-space: normal; overflow-wrap: anywhere; }
.shift-map-file-name { color: var(--muted); }
.shift-map-callsheet { display: grid; gap: 8px; margin: 8px 0 4px; }
.shift-map-callsheet .row-card { width: 100%; }
.shift-map-source-line { color: var(--muted); overflow-wrap: anywhere; }
.shift-map-manual { display: grid; gap: 10px; }
.shift-map-purpose { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.shift-map-purpose legend { width: 100%; margin-bottom: 6px; padding: 0; color: var(--muted); font-size: var(--type-caption, 0.85rem); }
.shift-map-purpose .chip { position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font-size: var(--type-small); font-weight: 500; cursor: pointer; }
.shift-map-purpose .chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.shift-map-purpose .chip:has(input:checked) { --control-stroke: var(--green); background-color: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); font-weight: 600; }
.shift-map-purpose .chip:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.shift-map-add-point { justify-self: start; }
.shift-map-add-day { justify-self: stretch; }
.shift-map-share { margin-top: 4px; }

/* В форме смены основные поля стоят рядом, обязательный контекст остаётся открытым. */
#request-view:has(#request-form-state:not([hidden]) > .page-head[hidden]) #request-top-title { opacity: 1; }
#request-form .request-core { gap: 12px; }
#request-form .request-compact-pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: start; }
#request-form .request-quantity-pair { grid-template-columns: auto minmax(0, 1fr); }
#request-form .request-quantity-pair .people-stepper input { width: 44px; }
#request-form .request-compact-pair > * { min-width: 0; }
#request-start { width: 100%; min-width: 0; }
#request-form:not(.has-restored-draft) .request-draft-note,
#request-form.has-restored-draft .request-new-note { display: none; }
#request-form > #request-details { padding: 16px; }
@media (max-width: 360px) {
  #request-form .request-quantity-pair { grid-template-columns: minmax(0, 1fr); }
}

/* Одна высота плашки. Прозрачные края входят в саму кнопку и принимают нажатие. */
:where(.button, .chip-button, .back, .icon-button, .target-chip, .range-toggle,
       .people-stepper button, .crewlist-chip, .shift-map-purpose .chip,
       .action-chips .link, .segmented button, .assistant-suggest button) { position: relative; }
:is(.button, .chip-button, .back, .icon-button, .date-field, .crewlist-chip, .shift-map-purpose .chip,
    .chips button, .segmented button, .filters-toggle, .filter-check, .assistant-suggest button,
    .target-chip, .range-toggle, .people-stepper button, .toast-action, .wg-menu-size,
    .action-chips .link:not(.link-danger)) {
  box-sizing: border-box;
  min-height: var(--control-target);
  border: solid transparent;
  border-width: var(--control-inset) var(--control-inline-end, 0px)
                var(--control-inset-end) var(--control-inline-start, 0px);
  background-clip: padding-box;
}
:is(.back, .icon-button, .people-stepper button) {
  min-width: var(--control-target);
  --control-inline-start: var(--control-inset);
  --control-inline-end: var(--control-inset-end);
}
.chip-button, .back, .icon-button:where(:not(.star-toggle)), .people-stepper button, .crewlist-chip,
.shift-map-purpose .chip, .action-chips .link:where(:not(.link-danger)) { --control-stroke: var(--line); }
:is(.button, .chip-button, .back, .icon-button, .date-field, .crewlist-chip, .shift-map-purpose .chip,
    .target-chip, .range-toggle, .people-stepper button, .action-chips .link:not(.link-danger),
    .segmented button.active, .assistant-suggest .suggest-more)::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--control-stroke, transparent);
  border-radius: inherit;
  box-shadow: var(--control-shadow, none);
  pointer-events: none;
}
:where(.button, .chip-button, .filters-toggle, .date-field, .back) > .icon {
  width: var(--icon-inline-size);
  height: var(--icon-inline-size);
}
