/* 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 {
  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-soft: #ececea;
  --green: #1f7a4d;
  --green-soft: #d9efe1;
  --green-dot: #34c37a;
  --blue-soft: #dfe9f5;
  --blue-ink: #2b4d7a;
  --orange: #b45309;
  --orange-soft: #fbeedd;
  --red-soft: #fdecea;
  --chart-mark: #1f7a4d;
  --tab-bg: rgba(255, 255, 255, .97);
  --tab-line: rgba(0, 0, 0, .07);
  --tab-ink: #5f6b64;
  --tab-active-bg: #1f7a4d;
  --tab-active-ink: #ffffff;
  --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;
  --disabled: #c9c9c5;
  --radius-card: 12px;
  --radius-button: 10px;
  --radius-cell: 8px;
  --font: "Onest", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* Тёмная тема. Без атрибута идём за системой (и за темой Telegram),
   с атрибутом — за выбором в профиле. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --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-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;
  --red-line: #53231f;
  --red: #e78077;
  --on-text: #0f0f0e;
  --on-text-soft: rgba(15, 15, 14, .65);
  --busy-bg: #050505;
  --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;
  --disabled: #55554f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --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-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;
  --red-line: #53231f;
    --red: #e78077;
    --on-text: #0f0f0e;
    --on-text-soft: rgba(15, 15, 14, .65);
    --busy-bg: #050505;
    --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;
    --disabled: #55554f;
  }
}

* { 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: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, summary { font: inherit; color: inherit; }
/* Поля не меньше 16px: иначе iOS приближает страницу при вводе и назад не возвращает. */
input, textarea, select { font-size: 16px; }
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; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-chevron { width: 20px; height: 20px; color: var(--placeholder); }
.icon-scout { width: 22px; height: 22px; stroke-width: 1.7; }

/* Верхняя панель */
.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; }
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: 3px;
  width: 68px;
  height: 52px;
  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 .icon { width: 21px; height: 21px; }
.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; }
.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))); }
/* Пока печатаешь, меню не мешает над клавиатурой. */
body.is-typing .tabbar { display: none; }
.top-bar-back { justify-content: flex-start; }
/* На корневых вкладках есть таббар — «назад» там некуда. */
body.has-tabbar .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: 17px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.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); }
.icon-button .icon { width: 18px; height: 18px; }
.brand { font-weight: 600; font-size: 20px; line-height: 1.1; letter-spacing: -.03em; }
/* Название приложения уже стоит в шапке Telegram — вместо второго логотипа
   показываем дату. */
.today-label {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-align: left;
  color: var(--text);
}
.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: 11px;
  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;
  background: color-mix(in srgb, #1c1c1a 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  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.is-visible { transform: translateY(var(--toast-drag, 0px)); opacity: 1; }
.toast.is-dragging { transition: none; }
.toast-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.toast-hint { color: rgba(255, 255, 255, .62); font-size: 13px; font-weight: 400; }
.toast-action { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 14px; font-weight: 600; }
.toast-action:active { background: rgba(255, 255, 255, .24); }
.top-title { font-weight: 500; font-size: 14px; }
.back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}
.me { display: flex; align-items: center; gap: 8px; text-align: right; }
.me-copy { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 0; }
.me-copy strong {
  max-width: 40vw;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Подпись под именем держим в одну строку — иначе «1 рекомендация» ломается пополам. */
.me-copy small { font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.me-copy small.attention { color: var(--orange); }

.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: 14px; }
.avatar-48 { width: 48px; height: 48px; font-size: 16px; }
.avatar-60 { width: 60px; height: 60px; font-size: 20px; }
.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: 20px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.hint { font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-title { font-size: 24px; 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: 12px; 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(--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: 13px; 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%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--text);
  border-radius: var(--radius-button);
  background: var(--text);
  color: var(--on-text);
  font-size: 14px;
  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.is-clean:disabled { opacity: 1; background: var(--surface); border-color: var(--line); color: var(--muted); }
.button-compact { width: auto; height: 40px; font-size: 13px; }
.button-small { position: relative; width: auto; height: 34px; padding: 0 14px; font-size: 13px; }
.button-small::after { content: ""; position: absolute; inset: -5px 0; }
.button-outline { background: var(--bg); color: var(--text); }
/* «Освободить место», «Отклонить» и т. п.: опасное действие остаётся красным и в контурной кнопке. */
.button-outline.link-danger { color: var(--red); border-color: var(--red); }
.button-danger { background: var(--red); color: #fff; }
.cta { display: flex; flex-direction: column; gap: 8px; }
.cta > small { font-size: 11px; 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: 13px; font-weight: 500; background: transparent; }
.hint-more > summary { cursor: pointer; list-style: none; color: var(--green); font-size: 13px; font-weight: 500; }
.hint-more > summary::-webkit-details-marker { display: none; }
.hint-more[open] > summary { margin-bottom: 6px; }

/* Полоса дней на главной */
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.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: 12px; color: var(--muted); }
.day strong { font-size: 15px; line-height: 1; }
.day.busy { background: var(--busy-bg); color: var(--busy-ink); border-color: var(--busy-edge); }
.day.busy span { color: var(--busy-ink-soft); }
.day.today { border-color: var(--text); background: var(--bg); }
.day.today span { color: var(--text); }
.day.today.busy { background: var(--busy-bg); }
.day.today.busy span { color: var(--busy-ink-soft); }

/* Согласие и удаление аккаунта */
.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; }
/* Пометка «Pro» у инструментов директора: маленькая, рядом с названием. */
.pro-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--green-soft); color: var(--green); font-size: 11px; 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: 12px; 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 { border-color: var(--red); color: var(--red); }
.danger-zone .button-outline:hover { opacity: .85; }
.legal { gap: 14px; padding-top: 24px; }
.legal .card-title-lg { font-size: 17px; }
.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); }
.row-icon { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-cell); }
.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: 15px; letter-spacing: -.01em; }
.row-card-dashed .row-copy strong { font-size: 14px; }
.row-copy small { font-size: 12px; color: var(--muted); }

.period-pair { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }

.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: 15px; 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: 12px; color: var(--muted); }

.directory-legend { margin-top: -4px; font-size: 12px; 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: 10px; }
/* Ссылка мелкая, но площадь под палец та же, что у .link: невидимый слой вокруг. */
.beta-note .beta-write::before { content: ""; position: absolute; inset: -12px -8px; }
.beta-note .hint { flex: 1 1 auto; font-size: 12px; line-height: 1.3; color: var(--text-soft); }
.beta-close { flex: 0 0 auto; width: 30px; height: 30px; 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: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.beta-note .beta-write:active { opacity: .85; }

/* Два главных действия — первое, что видно после шапки. */
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 118px;
  padding: 14px;
  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: 16px; line-height: 1.2; letter-spacing: -.01em; }
.action-tile small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.action-tile .row-icon { width: 40px; height: 40px; }
.action-tile:first-child { background: var(--green); border-color: var(--green); color: var(--on-text); }
.action-tile:first-child small { color: var(--on-text); opacity: .88; }
.action-tile:first-child .row-icon { background: color-mix(in srgb, var(--on-text) 16%, transparent); color: var(--on-text); }
.action-tile:first-child:hover { background: var(--green); }

.note-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; font-size: 12px; color: var(--muted); }
.how { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--radius-card); background: var(--surface); font-size: 13px; 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: 11px;
}
.sponsor > span { color: var(--muted); }
.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: 20px; 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; }
.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: 20px; 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: 13px; 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;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  font-size: 13px;
  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: 8px; 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: 13px;
  font-weight: 500;
}
.chips button.active { border-color: var(--text); background: var(--text); color: var(--on-text); font-weight: 500; }
.chips button:disabled { opacity: .6; }
.chips-choice { flex-wrap: wrap; overflow: visible; }
.chips-choice button { height: 34px; padding: 0 12px; font-size: 13px; }

.person { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.person-summary { display: flex; align-items: center; 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: 15px; }
/* Должность не обрезаем: длинная переносится на строку под статусом, максимум две строки. */
.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 140px; min-width: 0; }
.person-summary .pill { padding: 3px 8px; font-size: 11px; 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: 12px; 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); }
.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: center; }
.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 .icon { width: 20px; height: 20px; }
.star-toggle.is-active { color: var(--orange); }
.star-toggle.is-active .icon { fill: var(--orange); }
.person-details { display: flex; flex-direction: column; gap: 14px; padding: 4px 14px 14px; border-top: 1px solid var(--line-soft); }
.person-details > *:first-child { padding-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 10px; border-radius: var(--radius-button); background: var(--surface); font-size: 13px; font-weight: 500; }
.person-bio { font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.person-projects { display: flex; flex-direction: column; gap: 8px; }
.person-projects strong { font-size: 12px; color: var(--muted); font-weight: 500; }
.person-projects p { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.person-projects p small { font-size: 12px; color: var(--muted); }
.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: 11px; font-weight: 500; }
#profile-role-badge { align-self: flex-start; }
.rec-badge .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.verified-badge { display: inline-flex; width: 17px; height: 17px; vertical-align: -3px; flex: none; cursor: pointer; }
.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: 15px; }
.verified-copy .link { align-self: flex-start; font-size: 13px; }
.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: 12px; }
.legend-samples { flex-wrap: wrap; gap: 6px; }
.review-reason { margin: 0; color: var(--red); }
.review-inline { display: block; color: var(--red); font-size: 11px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.verified-badge-legend { width: 26px; height: 26px; cursor: default; }
.verified-copy small { font-size: 13px; 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(--red-soft); color: var(--red); font-size: 11px; font-weight: 500; white-space: nowrap; }
.name-reset-button { color: var(--red); border-color: var(--red-line); }
.recommendation { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius-button); background: var(--surface); }
.recommendation-text { font-size: 13px; 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: 12px;
  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: var(--bg); }
.recommendation .button.is-active { border-color: var(--green); color: var(--green); }
.calendar-access-button.is-active { border-color: var(--green); color: var(--green); }
.recommendations-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.recommendations-card .row-icon { width: 36px; height: 36px; }
.recommendations-card .row-icon .icon { width: 16px; height: 16px; }
.recommendations-card p { font-size: 13px; line-height: 1.45; }
.empty-state, .inline-loading { padding: 28px 14px; border: 1px solid var(--line); border-radius: var(--radius-card); color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 14px; 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; }
.card-form label, .range label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-form .field-title, .card-form label > span, .range label > span { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; 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: 12px; 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: 14px;
  /* 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;
}
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: 12px; 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: 15px; letter-spacing: -.01em; }
.switch-row > span small { font-size: 12px; 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: 20px; 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: 16px; letter-spacing: -.01em; }
.identity-copy small { font-size: 12px; line-height: 1.4; color: var(--muted); }
.identity-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }

.project-editor-heading { display: flex; align-items: center; justify-content: space-between; }
.project-editor-heading strong { font-size: 14px; }
.project-editor .hint { font-size: 11px; }

/* Календарь */
.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: 13px;
  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-settings { margin-top: 8px; }
.calendar-tools .button.is-active { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.range { border: 1px solid var(--line); border-radius: var(--radius-card); }
.range summary { padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--green); cursor: pointer; list-style: none; }
.range summary::-webkit-details-marker { display: none; }
.range summary::before { content: "+ "; }
.range[open] summary::before { content: "− "; }
.settings-panel[open] summary::before { content: ""; }
.range-body { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
/* Настройки в профиле: анкета выше, всё техническое — свёрнуто. */
.settings-panel summary { display: flex; align-items: center; font-size: 16px; font-weight: 600; color: var(--text); padding: 14px 16px; }
.settings-panel summary::before { content: ""; }
.settings-panel summary::after { content: "›"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--muted); transform: rotate(90deg); transition: transform .15s ease; }
.settings-panel[open] summary::after { transform: rotate(-90deg); }
.settings-panel .range-body { padding: 0 12px 12px; }
.month { display: flex; flex-direction: column; gap: 12px; }
.month-head { display: flex; align-items: center; justify-content: space-between; }
.month-head strong { font-size: 15px; text-transform: capitalize; }
.month-head span { font-size: 12px; color: var(--muted); }
.weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays { font-size: 12px; 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: 14px;
  font-weight: 500;
}
.cell:disabled { background: transparent; color: var(--disabled); }
.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, .day.busy.has-color { background: var(--project); border-color: var(--project); color: var(--project-ink, #fff); }
.day.busy.has-color span { color: inherit; opacity: .8; }
.cell.today.busy.has-color, .day.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 .25s 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 .34s 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: 26px; 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-title { font-size: 20px; font-weight: 600; }
.sheet-row { display: flex; align-items: center; gap: 8px; }
@keyframes sheet-up { from { transform: translateY(48px); 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: 15px; }
.shift-card small, .shift-address small { color: var(--muted); font-size: 13px; }
.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; }
}

/* Плавное появление: экраны проявляются, карточки и строки мягко выплывают снизу по очереди.
   На экранах только прозрачность — transform сломал бы закреплённые снизу панели. */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen:not([hidden]) { animation: fade-in .26s ease-out both; }
.screen:not([hidden]) > .row-card,
.screen:not([hidden]) > .card,
#directory-list > .card,
#taken-shifts > *,
.colleague-project,
#tasks-list > * { animation: rise-in .36s cubic-bezier(.2, .8, .2, 1) both; }
.screen:not([hidden]) > :nth-child(2), #directory-list > :nth-child(2), .colleague-project:nth-child(3) { animation-delay: 30ms; }
.screen:not([hidden]) > :nth-child(3), #directory-list > :nth-child(3), .colleague-project:nth-child(4) { animation-delay: 60ms; }
.screen:not([hidden]) > :nth-child(4), #directory-list > :nth-child(4), .colleague-project:nth-child(5) { animation-delay: 90ms; }
.screen:not([hidden]) > :nth-child(5), #directory-list > :nth-child(5) { animation-delay: 120ms; }
.screen:not([hidden]) > :nth-child(6), #directory-list > :nth-child(6) { animation-delay: 150ms; }
.screen:not([hidden]) > :nth-child(n+7), #directory-list > :nth-child(n+7) { animation-delay: 180ms; }
.skeleton-card { animation: fade-in .2s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !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: 12px; color: var(--text-soft); }
.paste-panel textarea { min-height: 120px; }

.chips-wrap { gap: 6px; }
.chips-wrap button { height: 30px; padding: 0 10px; font-size: 12px; }

/* Ставки: строки «роль — вилка». */
.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: 14px; font-weight: 500; }
.rate-value { flex: 0 0 auto; font-size: 14px; 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: 13px; 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: 13px; 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: 13px; font-weight: 600; color: var(--text); }
.digest ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0 0 0 16px; font-size: 13px; 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: 14px; 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: 12px; 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: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.month-summary strong { font-size: 15px; 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: 15px; 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: 14px; font-weight: 600; }
.role-inbox-copy small { font-size: 12px; 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: 12px; 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: 11px; 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: 13px; color: var(--text); }
.bar-row b { font-size: 13px; 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: 13px; line-height: 1.5; font-family: var(--font); }
.button.is-confirm { background: var(--red); border-color: var(--red); color: #fff; }

.kinopoisk-link { align-self: flex-start; font-size: 14px; }
.optional-mark { font-weight: 400; color: var(--muted); font-size: 12px; }

.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: 15px; font-weight: 500; }
.visibility-option small { font-size: 13px; line-height: 1.4; color: var(--text-soft); }
.section-label { margin: 18px 4px 8px; font-size: 13px; font-weight: 500; color: var(--muted); }

.catalog-roles-row { margin: 0 -16px; padding: 0 16px; }
.chips-small button { height: 32px; padding: 0 12px; font-size: 13px; }
.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: 13px; font-weight: 500; }
.filters-toggle .icon { width: 16px; height: 16px; }
.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: 11px; line-height: 18px; text-align: center; }
.filters-toggle em[hidden] { display: none; }
.catalog-filters { gap: 14px; }
.filter-switches { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-check { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-button); font-size: 13px; cursor: pointer; }
.filter-check:has(input:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.filter-check input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label { font-size: 13px; color: var(--muted); }
#catalog-filters-reset { align-self: flex-start; font-size: 13px; }

.filmography-upload { gap: 8px; }
.filmography-upload strong { font-size: 15px; font-weight: 500; }
.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: 13px; }
.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 input { width: 64px; height: 44px; text-align: center; font-size: 17px; 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: 14px; 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 .person-summary { padding-right: 48px; }
/* Отступ под крестик нужен только шапке карточки, а не всей карточке: иначе справа пустая полоса. */
.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: 13px; 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; }
.person-sheet-full { width: 100%; }

/* Фильмография: предложение повысить роль */
.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: 14px; 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: 14px; 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: 12px; color: var(--muted); }
.chips-multi button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
#request-bring-other { margin-top: 8px; }
.chips-multi { flex-wrap: wrap; overflow: visible; }
.chips-multi button { height: 34px; padding: 0 12px; font-size: 13px; }

/* Чужой график: выбранные дни и кнопка «Позвать» */
#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: 13px; color: var(--text-soft); }

/* Запрос голосом */
/* Два способа не заполнять форму руками — с объяснением, что произойдёт. */
.request-quick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.row-card-quick { padding: 10px 14px; }
.row-card-quick .row-icon { font-size: 20px; }
.row-card-quick .row-copy strong { font-size: 15px; }
.row-card-quick .row-copy small { font-size: 12.5px; line-height: 1.35; }
.row-card-quick.is-active { border-color: var(--green); background: var(--green-soft); }
.voice-card { gap: 10px; margin-bottom: 12px; }
.voice-head { display: flex; flex-direction: column; gap: 4px; }
.voice-hint { font-size: 13px; font-style: italic; }
.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: 13px; color: var(--text); }
.invite-status-line { font-size: 13px; }

/* Вход без 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; }
.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; }
.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: 14px; }
.role-inbox-person strong { cursor: pointer; }

.responder-strikes { color: var(--red); font-size: 12px; }
.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: 11px; 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; }
.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: 16px; font-weight: 600; letter-spacing: -.01em; }
.request-summary-copy small { font-size: 13px; color: var(--text-soft); }
.request-counts { font-size: 12.5px; color: var(--muted); }
.request-counts .request-state { font-weight: 600; color: var(--text-soft); }
.request-card.is-pending .request-state { color: var(--orange); }
.request-card.is-filled .request-state { color: var(--green); }
.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-chevron { transform: rotate(-90deg); }
.request-card[open] .request-summary { border-bottom: 1px solid var(--line-soft); }
.request-body { padding: 14px 16px 16px; }
.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 .icon { width: 18px; height: 18px; }
.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: 17px; font-weight: 600; }
.tasks-title-input:focus { outline: none; border-bottom-color: var(--green); }
.page-title-input { font-size: 22px; 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: 13px; 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: 15px; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.checklist-text small { display: block; margin-top: 2px; font-size: 12px; 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: 20px; 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: 13px; 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, .day.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, .day.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: #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: #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: #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: #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: #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: #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, .day.busy.has-color { background-repeat: var(--project-repeat, repeat); }
/* Тёмные узоры на тёмной теме теряют край: тонкий нейтральный контур. */
.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: 17px;
  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: 20px; 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: 13px; line-height: 1.3; pointer-events: none; overflow-wrap: anywhere; }
.day-popup small { color: var(--muted); font-size: 12px; }
.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: 11px; 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: 13px; }
.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; }

.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 { width: 18px; height: 18px; flex: none; stroke: var(--muted); fill: none; stroke-width: 2; }
.catalog-search input { flex: 1; min-height: 44px; border: 0; background: transparent; color: var(--text); font: inherit; 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: 11px; font-style: normal; font-weight: 600; vertical-align: 1px; white-space: nowrap; }

.group-row { display: grid; grid-template-columns: 1fr 64px 84px 36px; gap: 8px; align-items: center; }
.group-row input { 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; }
.group-row button { height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.request-group-line { font-size: 13px; color: var(--muted); }
.request-group-line b { color: var(--text); }
@media (max-width: 420px) { .group-row { grid-template-columns: 1fr 56px 76px 32px; } }

.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; padding: 10px 12px; border-radius: 10px; background: var(--surface); color: var(--text-soft); white-space: pre-line; }
.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-text { margin: 0; font-size: 16px; 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)); }
#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; }
.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: 16px; 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: 13px; color: var(--muted); text-align: center; }
.game-hint b { color: var(--ink, #141414); }

.person-record { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.person-record summary { cursor: pointer; font-size: 14px; }
.person-record .record-line { margin: 6px 0 0; font-size: 13px; line-height: 1.35; }
.person-record .record-line p { margin: 0; }
.person-record .record-removed { color: var(--muted); }
.person-record .record-quote { color: var(--text-soft); padding-left: 14px; }
.person-record .record-strike { color: var(--red); }
.person-record .hint { margin-top: 8px; }

.phone-link { display: inline-flex; align-items: center; gap: 6px; }
.phone-icon { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

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

.project-confirmed { font-style: normal; font-size: 12px; 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: 13px; 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: 13px; 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: 14px; font-weight: 500; }
.projects-confirmed small { font-size: 13px; 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-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: 14px; }
.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); }
.crew-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.crew-candidates .crew-slot { cursor: default; }
.crew-call { flex: none; font-weight: 600; }
.crew-called { flex: none; color: var(--muted); font-size: 13px; }
/* Отказ виден сразу: красным, как и другие отказы. */
.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; gap: 6px; }
.crew-team-remove { padding: 0 2px; font-size: 13px; }
.crew-search { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; 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: 16px; font-weight: 600; }
.colleague-project > small { font-size: 13px; color: var(--muted); margin-top: -4px; }
.colleague-project > small.colleague-confirmed { color: var(--green); }
.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: 14px; font-weight: 500; }
.colleague-row .row-copy small { font-size: 12px; color: var(--muted); }
.colleague-row .row-copy small.colleague-asks { color: var(--green); }
.colleague-row .button-small { flex: none; }

/* Имя — ссылка на профиль */
.person-link { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.person-link.colleague-name { font-size: 14px; font-weight: 500; color: var(--text); }
.person-link-inline { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.colleague-row .avatar { cursor: pointer; }
.project-confirm-button { text-align: left; }
.project-confirm-button.is-quiet { color: var(--muted); font-size: 12px; }
.project-other-time { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Чипы-действия: «Подробнее», телефон. Высота 36px — легко попасть пальцем. */
.taken-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.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: 13px; font-weight: 500; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip-button:active { background: var(--surface); }
.chip-button.phone-link { color: var(--green); }

/* ---- Мягкий стиль (как у Лавки): заливка вместо рамок, круглые чипы, сегменты ---- */
/* Сегменты «Все / Свободны / Заняты»: серая дорожка, выбранный — белая таблетка. */
.segmented { display: flex; gap: 0; padding: 4px; border-radius: 999px; background: var(--surface); overflow: visible; }
.segmented button, .chips-small.segmented button { flex: 1 1 0; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.segmented button.active { background: var(--bg); color: var(--text); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
/* Чипы — залитые, без рамки, круглые; выбранный — тёмный. */
.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: var(--text); color: var(--on-text); }
.filter-check:has(input:checked) { background: var(--green-soft); color: var(--green); }
/* Поиск и дата — мягкие поля без рамки. */
#directory-view .catalog-search, #directory-view .date-field { border: 0; border-radius: 999px; background: var(--surface); }
/* Карточки людей — мягкая заливка и большой радиус вместо рамки. */

/* Мягкие карточки по всему приложению: заливка вместо рамки, большое скругление.
   Внутри карточки «поверхность» — белая: поля, чипы и плашки читаются на сером. */
:root { --radius-card: 20px; }
.card, .row-card, .action-tile, .progress-card, .how { border-color: transparent; background: var(--card-fill); --surface: var(--bg); }
.row-card:hover, .progress-card:hover, .action-tile:hover { background: var(--card-fill); }
.action-tile:first-child, .action-tile:first-child:hover { background: var(--green); }
.role-inbox { border-color: var(--green); }
.row-card .row-icon:not(.row-icon-green) { background: var(--bg); }
.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); }
/* Фокус в полях — как у кнопок и textarea: кольцо, а не только тёмная рамка. */
input:not([type="checkbox"]):focus-visible, select:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
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: 30px; 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: 16px; 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: 8px; }
.assistant-suggest button { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--card-fill); color: var(--text); font-size: 13px; 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: transparent; color: var(--green); box-shadow: inset 0 0 0 1px var(--line); }
.assistant-thread { display: flex; flex-direction: column; gap: 8px; }
.assistant-bubble { max-width: 88%; padding: 10px 14px; font-size: 15px; 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: 13px; 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: 13px; 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); animation: voice-pulse 1.2s ease-in-out infinite; }
.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: 14px; }
.assistant-title { margin-bottom: -6px; }
.assistant-new { align-self: center; height: 34px; padding: 0 14px; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.assistant-new[hidden] { display: none; }
.assistant-bubble.is-earlier { opacity: .7; }
.assistant-sub { font-size: 16px; 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 { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; 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: 12px; height: 24px; }
.assistant-mic.is-recording .mic-idle { display: none; }
.assistant-mic.is-recording .mic-live { display: block; animation: radio-ptt .35s ease-out; }
.assistant-mic.is-recording .mic-live .cut { stroke: var(--red); }
@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: 6px; }
.assistant-actions .chip-button { background: var(--card-fill); border-color: transparent; height: 32px; font-size: 13px; }

/* Карточка «Роль»: пустые подсказка и ряд кнопок не оставляют дыру; «Готов выйти и как» — отдельным блоком с воздухом. */
#role-request-hint:empty, #role-request-buttons:empty { display: none; }
#extra-roles: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; }
/* Правка поиска в шторке: без серой подложки, поля серые на белом — как в остальных формах шторки. */
.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: var(--card-fill); border-color: transparent; }
.search-edit .card-form .search-categories button:not(.active) { background: var(--card-fill); }
/* Период одним заходом: поле-кнопка и календарь под ним. */
.range-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; background: var(--card-fill); color: var(--text); font-size: 16px; 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: 12px; color: var(--muted); }
.card-form .range-toggle { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--bg); font-size: 14px; }
.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: 20px; }
.range-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.range-weekday { font-size: 11px; color: var(--muted); padding-bottom: 4px; }
.range-day { height: 38px; border-radius: 10px; background: transparent; color: var(--text); font-size: 15px; }
.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; }

/* Календарь: один месяц на экран, стрелки, выбранный день, шторка дня. */
#calendar-months .month-head { gap: 8px; }
.month-title { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; 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: 14px; 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; }

.month-title strong { color: var(--text); font-size: 17px; }

/* Помощник — классический чат: переписка сверху вниз, поле ввода прибито к низу экрана. */
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 { margin-left: auto; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--card-fill); color: var(--text); font-size: 13px; 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: 16px; line-height: 22px; color: var(--text); outline: none; resize: none;
}
.assistant-screen .assistant-ask.assistant-composer { border-radius: 0; background: transparent; 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 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: 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; }
#taken-shifts.is-collapsed { padding: 10px 10px 10px 16px; }
.taken-strip { display: flex; align-items: center; gap: 6px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.taken-strip-copy { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.taken-strip-copy strong { font-size: 15px; }
.taken-strip-copy small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.taken-strip .taken-status { margin: 0; }

/* ---------- Плавность везде ---------- */
/* Кнопки мягко «нажимаются», цвета переключаются без щелчка. */
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); }
.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 .24s ease both; }
.sheet.is-closing .sheet-panel { animation: sheet-down .24s 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(60px); opacity: 0; } }
/* Всё, что появляется на экране, — мягко поднимается. */
:is(.calendar-plate, .calendar-day-card, .taken-strip, .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-duration: .01ms !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-chevron { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
.taken-chevron.is-up { transform: rotate(-90deg); }
.taken-title-row { gap: 2px; }
.taken-strip .taken-control { align-self: center; }
/* Анимированное содержимое шторки не должно перекрывать крестик. */
.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: 14px; 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; }
.taken-strip > .taken-control:last-child { margin-right: -4px; }

/* ⚙︎ в шапке календаря и «Выбрать несколько дней». */
.calendar-gear { margin-left: 8px; color: var(--text); }
.calendar-gear .icon { width: 20px; height: 20px; }
.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: 15px; }
.calendar-pick-bar .button:disabled { opacity: .45; }
.calendar-tools-sheet .tool-glyph { font-size: 18px; font-weight: 600; }
.calendar-tools-sheet #calendar-settings { border: 0; margin-top: 0; }
.calendar-tools-sheet #calendar-settings > summary { display: none; }
.calendar-tools-sheet #calendar-settings > .range-body { padding: 0; }
.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: 15px; }
.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 { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.probe-tester input { width: 20px; height: 20px; 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: 15px; 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: 12px; 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: 14px; 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: 12px; 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: 13px; 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 { position: absolute; inset: 0 0 0 auto; display: flex; align-items: stretch; opacity: 0; transition: opacity .15s ease; }
.person-swipe.is-left .swipe-actions { 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: 11px; }
.swipe-action small { font-size: 12px; }
.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: 20px; 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: 13px; 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: 14px; }
.stats-figures { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; 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: 13px; 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: 15px; 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: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crew-lead-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; font-size: 13px; }
.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: 14px; }

/* Разбор разговоров: диалог раскрывается плавно, реплики пузырями, подозрения — красные метки. */
.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: 11.5px; }
.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: 13px; 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: 13px; 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: 14px; }
.filmography-tip { margin: 0; font-size: 13px; 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: 8px; }
.action-chips .link:not(.link-danger) { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--bg); color: var(--text-soft); font-size: 13px; white-space: nowrap; }
.action-chips .link:not(.link-danger)::before { inset: -4px -2px; }
.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: 14px; }

/* Ветка проекта на главной: как в метро — станции на линии цвета проекта. */
.home-route { display: grid; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.route-line { --route: 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: 17px; 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: 13px; 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 {
  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: 15px; font-weight: 600; }
.route-copy small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.route-action { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 13px; 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); }
.route-clash { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fbf1dc; color: #5a3d00; font-size: 14px; }
.route-cta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px; width: 100%; padding: 13px; border: 1.5px solid var(--line); border-radius: var(--radius-button); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.route-cta span { color: var(--muted); font-size: 14px; }
.route-more { justify-self: start; }
@keyframes route-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .route-line { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .route-clash { background: #3a2c10; color: #f3d9a4; } }
:root[data-theme="dark"] .route-clash { background: #3a2c10; color: #f3d9a4; }
.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); }
/* Отклик на поиск: строка — в профиль, «Написать» — заметной кнопкой. */
.search-responder.is-tappable { cursor: pointer; transition: background .2s ease; }
.search-responder.is-tappable:active { background: color-mix(in srgb, var(--muted) 10%, transparent); }
.responder-write { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--green-soft); color: var(--green); font: inherit; font-size: 14px; 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: 14px; 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: 15px; color: var(--text); padding: 2px 0; }
.period-remove { border: 0; background: none; color: var(--muted); font-size: 20px; 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: 15px; }
.day-owner-option small { margin-left: auto; color: var(--muted); font-size: 13px; }
.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: 12px; 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 { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; 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: 8px; }
.target-chips[hidden] { display: none; }
.target-chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.target-chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.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: 15px; 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; padding: 6px 12px; font-size: 14px; }
.tasks-group { margin: 14px 4px 2px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.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: 14px; 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: 14px; }
.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: 14px; }
.callsheet-conflict .target-chip { background: var(--bg); }
.callsheet-conflict .target-chip.is-on { background: var(--text); color: var(--bg); }

/* «Сообщить, когда освободится» */
.watch-button { white-space: normal; }
.watch-button.is-active { border-color: var(--text); color: var(--text); }
.period-dates[hidden] { display: none; }
.watched-by { margin: 8px 0 0; text-align: center; }

/* Профиль после разбора 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: 13px; 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: 14px; }
.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%; }

/* ---------- Шапка: рация (помощник) и аватар (профиль) ---------- */
.me-copy { display: none; }
.me { position: relative; }
.me-dot { position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid var(--bg); }
.radio-btn { position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--on-text); }
.radio-btn .icon { width: 22px; height: 22px; }
.radio-spark { position: absolute; top: -3px; right: -4px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); color: var(--green); font-size: 12px; line-height: 1; }
.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], .me-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; }

/* ---------- Главная: «Найти на смену» на всю ширину ---------- */
.home-actions:has(> .action-wide:only-child) { grid-template-columns: 1fr; }
.action-wide small { max-width: 34ch; }
.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: 13px; 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); }

/* Каталог: разослать запрос всем подходящим. */
.catalog-broadcast { margin-top: 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.catalog-broadcast .cta-note { color: var(--muted); font-size: 12px; text-align: center; }

/* Рация: дела на сегодня над разговором. */
.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: 15px; 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: 14px; }
.today-check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); background: transparent; }
.today-check:disabled { background: var(--green); border-color: var(--green); }
.today-text { flex: 1; min-width: 0; }
.today-when { flex: none; color: var(--muted); font-size: 12px; }
.today-when.is-late { color: var(--red); }
.row-card.in-tabbar { display: none; }

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

/* Цвета: обычные на виду, узоры и картинки под «Ещё». */
.color-more { flex-basis: 100%; }
.color-more > summary { display: inline-flex; align-items: center; min-height: 36px; color: var(--green); font-size: 13px; font-weight: 500; cursor: pointer; list-style: none; }
.color-more > summary::-webkit-details-marker { display: none; }
.color-more > summary::after { content: "›"; margin-left: 6px; transition: transform .15s ease; }
.color-more[open] > summary::after { transform: rotate(90deg); }
.color-more > .color-chips { margin-top: 6px; }

/* «Мой график» сворачивается в строку. */
.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 { width: 18px; height: 18px; color: var(--muted); transform: rotate(-90deg); transition: transform .2s ease; }
.status-card.is-folded .status-chevron { transform: rotate(90deg); }
.status-card.is-folded > :not(.status-toggle), .status-card.is-folded .status-toggle .hint { display: none; }
.status-card.is-folded .status-head { margin: 0; }
.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; }
}

/* «Найти» — плотная строка: значок слева, заголовок и подпись справа. */
.action-tile.action-wide {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-areas: "icon title" "icon sub";
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  min-height: 0;
  padding: 14px 16px;
}
.action-wide .row-icon { grid-area: icon; }
.action-wide strong { grid-area: title; align-self: end; font-size: 17px; }
.action-wide small { grid-area: sub; align-self: start; max-width: none; }
/* Рация в шапке — рисунок с заставки, белым контуром. */
.radio-glyph { width: 14px; height: 29px; overflow: visible; }
.radio-glyph .shape { fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.radio-glyph .cut { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

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

/* Прогресс профиля на главной — одной строкой с тонкой полоской. */
#profile-progress { gap: 6px; padding: 12px 14px; }
#profile-progress .progress-head strong { font-size: 14px; 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: 11px; 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: 15px; font-weight: 500; }
.own-badge-example-copy small { font-size: 12px; 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: 15px; 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); }
.swipe-glyph .icon { width: 20px; height: 20px; }

/* Выбор точки на карте: на весь экран, булавка по центру, поиск сверху, адрес и кнопка снизу. */
.map-pick { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: -4px; padding: 6px 0; background: none; color: var(--green); font-size: 14px; font-weight: 600; }
.map-pick .icon { width: 18px; height: 18px; }
body.map-open { overflow: hidden; }
body.map-open .tabbar { display: none; }
.map-picker { position: fixed; inset: 0; z-index: 200; background: var(--bg); }
.map-picker[hidden] { display: none; }
.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-round .icon { width: 22px; height: 22px; }
.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; width: 20px; height: 20px; 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: 16px; 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: 15px; text-align: left; }
.map-results .map-empty { padding: 12px 16px; color: var(--muted); font-size: 14px; }
.map-locate { position: absolute; z-index: 600; right: 16px; bottom: calc(190px + env(safe-area-inset-bottom)); }
.map-bottom { position: absolute; z-index: 600; left: 0; right: 0; bottom: 0; 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: 13px; }
.map-address { font-size: 17px; font-weight: 600; line-height: 1.3; }
.map-coords { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.map-picker .leaflet-bottom { bottom: calc(168px + env(safe-area-inset-bottom)); }
.map-picker .leaflet-control-attribution { font-size: 10px; }

/* Поиск в каталоге: поле внутри плашки без своей коробки и рамки (общий стиль полей её рисовал
   поверх плашки при нажатии). Фокус видно по самой плашке. */
.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 { box-shadow: inset 0 0 0 1px var(--muted); }

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

/* «К сегодня» под названием месяца, когда ушли в другой месяц. */
.month-today { min-height: 0; margin-top: 2px; padding: 2px 6px; font-size: 13px; }

/* «Мои запросы»: второй ряд фильтров по типу и подсказка в пустом разделе. */
.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: 15px; font-weight: 500; }
.requests-kind-empty p { margin: 0; }
