/* ==========================================================================
   Подслушано Ртищево — main.css
   Дизайн-система «Вечерний Ртищево». Без фреймворков и внешних ресурсов.
   Структура:
   1. Шрифты  2. Токены (светлая/тёмная тема)  3. Reset  4. Типографика
   5. Раскладка  6. Шапка, нижняя навигация, подвал  7. Кнопки  8. Формы
   9. Уведомления  10. Бейджи, теги, статусы  11. Лента и карточки
   12. Статья  13. Соцсети  14. Чат  15. Личные сообщения  16. Предложка
   17. Кабинет  18. Вход и код  19. Пустые состояния, скелетоны, модалки
   20. Панель управления  21. Утилиты
   ========================================================================== */

/* 1. Шрифты (OFL, локально, woff2, латиница + кириллица) ------------------- */
/* Inter Variable (оси wght 100–900 и opsz 14–32: крупные кегли автоматически получают «дисплейный» рисунок)
   и Lora Variable. Пакеты @fontsource-variable/inter и @fontsource-variable/lora, лицензия OFL 1.1. */
@font-face { font-family: "Inter"; src: url("../fonts/inter-cyrillic-opsz-normal.7af197bf2ea6.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-opsz-normal.4b73e2ff3024.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-cyrillic-wght-normal.f617fd584ca5.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-wght-normal.9577af3ccda5.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-cyrillic-wght-italic.d866603498cc.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-wght-italic.1640b0b69ef0.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* 2. Токены --------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Бренд: цвета сняты с логотипа */
  --brand-sky: #6B2194;      /* небо над городом */
  --brand-sky-2: #832593;    /* небо у краёв круга */
  --brand-glow: #C0389A;     /* закатное свечение за домами */
  --brand-ground: #3E135A;   /* земля и силуэт города */
  --brand-lights: #FBC773;   /* огни в окнах поезда */
  --grad-dusk: linear-gradient(160deg, #3E135A 0%, #6B2194 48%, #A42E95 82%, #C0389A 100%);

  /* Поверхности и текст */
  --c-bg: #F7F5FA;
  --c-surface: #FFFFFF;
  --c-surface-2: #EFEBF4;
  --c-surface-3: #E5DFEC;
  --c-overlay: rgba(28, 12, 40, .55);
  --c-border: #E2DCE9;
  --c-border-strong: #8D829A;     /* 3.6:1 к белому — границы полей */
  --c-text: #1C1424;              /* 16.5:1 */
  --c-text-2: #4E4459;            /* 8.5:1 */
  --c-text-3: #6E6479;            /* 5.2:1 — подписи, время */

  /* Основной (фиолетовый) */
  --c-primary: #6B2194;           /* 9.3:1 к белому */
  --c-primary-hover: #5A1A80;
  --c-primary-active: #4A1469;
  --c-on-primary: #FFFFFF;
  --c-primary-soft: #EFE6F7;
  --c-primary-soft-text: #5A1A80;

  /* Акцент (малиновый, из свечения) */
  --c-accent: #B02A82;            /* 6.0:1 к белому */
  --c-accent-hover: #971F6F;
  --c-accent-soft: #FBE7F2;
  --c-accent-soft-text: #9C2373;

  /* Смысловые */
  --c-danger: #B3261E;
  --c-danger-hover: #961E17;
  --c-danger-soft: #FCE8E6;
  --c-danger-soft-text: #A1221B;
  --c-warning: #FBC773;           /* фон, текст на нём — тёмный */
  --c-warning-soft: #FFF1D6;
  --c-warning-soft-text: #7A4E00;
  --c-on-warning: #2B1A00;
  --c-success: #1E7A4E;
  --c-success-soft: #E2F3EA;
  --c-success-soft-text: #1E6B45;
  --c-info-soft: #E5EEFA;
  --c-info-soft-text: #1F57A6;
  --c-neutral-soft: #EFEBF4;
  --c-neutral-soft-text: #4E4459;

  --c-focus: #8B3FC4;
  --c-selection: #E3CFF4;
  --c-own-bubble: #6B2194;
  --c-own-bubble-text: #FFFFFF;
  --c-skeleton: #ECE7F1;
  --c-skeleton-shine: #F7F4FA;

  /* Типографика */
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-read: "Lora", Georgia, "Times New Roman", serif;
  --fs-12: .75rem;   --fs-13: .8125rem; --fs-14: .875rem; --fs-16: 1rem;
  --fs-18: 1.125rem; --fs-20: 1.25rem;  --fs-24: 1.5rem;   --fs-30: 1.875rem;
  --fs-38: 2.375rem; --fs-48: 3rem;
  --lh-tight: 1.15; --lh-snug: 1.3; --lh-ui: 1.5; --lh-read: 1.7;

  /* Отступы — шаг 4px */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;
  --gutter: 16px;
  --container: 1200px;
  --measure: 680px;
  --header-h: 64px;
  --tabbar-h: 64px;
  --tap: 44px;

  /* Радиусы — по иерархии: крупное мягче */
  --r-xs: 6px; --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Тени — с фиолетовым оттенком, только у «парящих» элементов */
  --shadow-1: 0 1px 2px rgba(45, 15, 70, .06);
  --shadow-2: 0 8px 24px -10px rgba(45, 15, 70, .25), 0 2px 6px -2px rgba(45, 15, 70, .08);
  --shadow-3: 0 28px 64px -16px rgba(35, 8, 55, .45);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 160ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --c-bg: #150D1D; --c-surface: #1E1428; --c-surface-2: #281C34; --c-surface-3: #33253F;
    --c-overlay: rgba(6, 2, 10, .7);
    --c-border: #33263F; --c-border-strong: #7C6D8B;
    --c-text: #EEE8F4; --c-text-2: #BDB1CA; --c-text-3: #968AA4;
    --c-primary: #B98AE6; --c-primary-hover: #C9A2EE; --c-primary-active: #D7B6F5; --c-on-primary: #1E0A30;
    --c-primary-soft: #38214F; --c-primary-soft-text: #D7B6F5;
    --c-accent: #F28CC8; --c-accent-hover: #F7A8D7; --c-accent-soft: #42193A; --c-accent-soft-text: #F7A8D7;
    --c-danger: #FF8A80; --c-danger-hover: #FFA59C; --c-danger-soft: #3D1818; --c-danger-soft-text: #FFA59C;
    --c-warning: #FBC773; --c-warning-soft: #33260B; --c-warning-soft-text: #FBC773; --c-on-warning: #2B1A00;
    --c-success: #7FD8A8; --c-success-soft: #15301F; --c-success-soft-text: #7FD8A8;
    --c-info-soft: #172843; --c-info-soft-text: #93BBFF;
    --c-neutral-soft: #2E2239; --c-neutral-soft-text: #CFC4DB;
    --c-focus: #D7B6F5; --c-selection: #4D2C6B;
    --c-own-bubble: #5A2283; --c-own-bubble-text: #F7EEFF;
    --c-skeleton: #2A1E35; --c-skeleton-shine: #352842;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 10px 28px -10px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
    --shadow-3: 0 28px 64px -16px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #150D1D; --c-surface: #1E1428; --c-surface-2: #281C34; --c-surface-3: #33253F;
  --c-overlay: rgba(6, 2, 10, .7);
  --c-border: #33263F; --c-border-strong: #7C6D8B;
  --c-text: #EEE8F4; --c-text-2: #BDB1CA; --c-text-3: #968AA4;
  --c-primary: #B98AE6; --c-primary-hover: #C9A2EE; --c-primary-active: #D7B6F5; --c-on-primary: #1E0A30;
  --c-primary-soft: #38214F; --c-primary-soft-text: #D7B6F5;
  --c-accent: #F28CC8; --c-accent-hover: #F7A8D7; --c-accent-soft: #42193A; --c-accent-soft-text: #F7A8D7;
  --c-danger: #FF8A80; --c-danger-hover: #FFA59C; --c-danger-soft: #3D1818; --c-danger-soft-text: #FFA59C;
  --c-warning: #FBC773; --c-warning-soft: #33260B; --c-warning-soft-text: #FBC773; --c-on-warning: #2B1A00;
  --c-success: #7FD8A8; --c-success-soft: #15301F; --c-success-soft-text: #7FD8A8;
  --c-info-soft: #172843; --c-info-soft-text: #93BBFF;
  --c-neutral-soft: #2E2239; --c-neutral-soft-text: #CFC4DB;
  --c-focus: #D7B6F5; --c-selection: #4D2C6B;
  --c-own-bubble: #5A2283; --c-own-bubble-text: #F7EEFF;
  --c-skeleton: #2A1E35; --c-skeleton-shine: #352842;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 10px 28px -10px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
  --shadow-3: 0 28px 64px -16px rgba(0, 0, 0, .8);
}

@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 32px; } }

/* 3. Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { min-height: 100dvh; }
img, picture, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
[hidden] { display: none !important; }
dialog { padding: 0; border: 0; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* 4. Базовая типографика -------------------------------------------------- */
body {
  font-optical-sizing: auto;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-ui);
  font-size: var(--fs-16);
  line-height: var(--lh-ui);
  font-feature-settings: "cv11", "ss01";  /* однопалубная a, открытые цифры Inter */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--c-selection); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); letter-spacing: -.015em; color: var(--c-text); text-wrap: balance; }
h1 { font-size: var(--fs-30); }
h2 { font-size: var(--fs-24); }
h3 { font-size: var(--fs-20); line-height: var(--lh-snug); letter-spacing: -.01em; }
h4 { font-size: var(--fs-18); line-height: var(--lh-snug); letter-spacing: -.005em; }
@media (min-width: 768px) {
  h1 { font-size: var(--fs-38); }
  h2 { font-size: var(--fs-30); }
}
p { text-wrap: pretty; }
small, .text-small { font-size: var(--fs-14); }
.text-muted { color: var(--c-text-3); }
.text-secondary { color: var(--c-text-2); }

a:not([class]) { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:not([class]):hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: var(--r-xs); }
:focus:not(:focus-visible) { outline: none; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--c-primary); color: var(--c-on-primary); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: var(--s-3); }

/* 5. Раскладка ------------------------------------------------------------ */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.page { padding-block: var(--s-6) var(--s-12); }
.page--narrow .container, .container--narrow { max-width: calc(var(--measure) + var(--gutter) * 2); }
.container--form { max-width: calc(560px + var(--gutter) * 2); }

.layout { display: grid; gap: var(--s-8); }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-10); align-items: start; }
  .layout__aside { position: sticky; top: calc(var(--header-h) + var(--s-6)); display: grid; gap: var(--s-6); }
}
.layout__aside { display: grid; gap: var(--s-6); align-content: start; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-4); margin-bottom: var(--s-6); }
.page-head__title { font-size: var(--fs-30); }
.page-head__lead { color: var(--c-text-2); margin-top: var(--s-2); max-width: 60ch; }
@media (min-width: 768px) { .page-head__title { font-size: var(--fs-38); } }

.section { margin-top: var(--s-12); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.section__title { font-size: var(--fs-20); }
.section__link { font-size: var(--fs-14); font-weight: 600; color: var(--c-primary); text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
.section__link:hover { text-decoration: underline; text-underline-offset: .2em; }

.box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-5); }
@media (min-width: 768px) { .box { padding: var(--s-6); } }
.box__title { font-size: var(--fs-18); margin-bottom: var(--s-4); }

.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-6); }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.divider { border: 0; border-top: 1px solid var(--c-border); margin-block: var(--s-6); }

/* 6. Шапка ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--c-surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner { display: flex; align-items: center; gap: var(--s-4); height: var(--header-h); }
.site-header__actions { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }

.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--c-text); min-height: var(--tap); flex-shrink: 0; border-radius: var(--r-pill); }
.brand__logo { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(62, 19, 90, .12); }
.brand__text { display: grid; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; }
.brand__city { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; color: var(--c-primary); }
@media (min-width: 768px) {
  .brand__logo { width: 44px; height: 44px; }
  .brand__name, .brand__city { font-size: 1.1875rem; }
}

.site-nav { display: none; }
@media (min-width: 960px) {
  .site-nav { display: flex; align-items: center; gap: 0; margin-left: var(--s-2); min-width: 0; }
  .site-nav .site-nav__link { padding: 0 var(--s-2); font-size: var(--fs-15, .9375rem); }
}
@media (min-width: 960px) and (max-width: 1279px) {
  .site-header .header-user__name { display: none; }
}
.site-nav__link {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-md);
  color: var(--c-text-2); font-weight: 500; font-size: var(--fs-16); text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-nav__link:hover { background: var(--c-surface-2); color: var(--c-text); }
.site-nav__link[aria-current="page"] { color: var(--c-primary); background: var(--c-primary-soft); font-weight: 600; }
.site-nav__count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--c-accent); color: #fff; font-size: var(--fs-12); font-weight: 700; display: inline-grid; place-items: center; }
:root[data-theme="dark"] .site-nav__count { color: #2A0A20; }

.site-header .site-header__login { display: none; }
@media (min-width: 600px) { .site-header .site-header__login { display: inline-flex; } }
.site-header__social { display: none; }
@media (min-width: 1600px) { .site-header__social { display: flex; gap: var(--s-1); margin-right: var(--s-2); } }

.icon-btn {
  display: inline-grid; place-items: center; position: relative;
  width: var(--tap); height: var(--tap); border-radius: var(--r-md);
  color: var(--c-text-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.icon-btn:active { background: var(--c-surface-3); }
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn__dot { position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 2px var(--c-surface); }

/* Переключатель темы: показываем иконку той темы, в которую переключит */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.header-user { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-2) 0 var(--s-1); border-radius: var(--r-pill); text-decoration: none; color: var(--c-text); font-weight: 500; }
.header-user:hover { background: var(--c-surface-2); }
.header-user__name { display: none; }
@media (min-width: 1100px) { .header-user__name { display: inline; } }

/* Нижняя навигация (телефон и планшет < 960px) */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 0 max(var(--s-1), env(safe-area-inset-right)) env(safe-area-inset-bottom) max(var(--s-1), env(safe-area-inset-left));
  background: color-mix(in srgb, var(--c-surface) 94%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--c-border);
}
.tabbar__item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--tabbar-h); color: var(--c-text-3); text-decoration: none;
  font-size: 11.5px; font-weight: 500; letter-spacing: .01em;
}
.tabbar__item .icon { width: 24px; height: 24px; }
.tabbar__item[aria-current="page"] { color: var(--c-primary); font-weight: 600; }
.tabbar__item[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 0 0 3px 3px; background: var(--c-primary); }
.tabbar__item--accent .tabbar__plus { width: 44px; height: 32px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--c-primary); color: var(--c-on-primary); }
.tabbar__item--accent .tabbar__plus .icon { width: 22px; height: 22px; }
.tabbar__badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--c-accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--c-surface); }
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
/* «＋ Добавить»: меню выбора без JS (details/summary) */
.tabbar__add { min-width: 0; }
.tabbar__add > summary { width: 100%; }
.tabbar__add > summary { list-style: none; cursor: pointer; }
.tabbar__add > summary::-webkit-details-marker { display: none; }
.tabbar__add > summary:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -4px; border-radius: var(--r-md); }
.tabbar__menu {
  position: fixed; left: var(--s-3); right: var(--s-3); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s-2));
  display: grid; gap: var(--s-1); padding: var(--s-2); border-radius: var(--r-lg);
  background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--shadow-3);
}
.tabbar__menu-item { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); color: var(--c-text); text-decoration: none; }
.tabbar__menu-item:hover, .tabbar__menu-item:focus-visible { background: var(--c-primary-soft, color-mix(in srgb, var(--c-primary) 10%, transparent)); }
.tabbar__menu-item .icon { width: 24px; height: 24px; flex: none; color: var(--c-primary); }
.tabbar__menu-item span { display: grid; gap: 2px; }
.tabbar__menu-item small { color: var(--c-text-3); font-size: 13px; }
@media (min-width: 960px) {
  .tabbar { display: none; }
  body.has-tabbar { padding-bottom: 0; }
}

/* Мобильное меню-шторка (поиск, разделы, соцсети) */
.drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.drawer.is-open { display: block; }
.drawer__backdrop { position: absolute; inset: 0; background: var(--c-overlay); animation: fade-in 180ms var(--ease); }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
  background: var(--c-surface); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; overflow-y: auto;
  animation: slide-in 220ms var(--ease);
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5); border-bottom: 1px solid var(--c-border); }
.drawer__body { padding: var(--s-5); display: grid; gap: var(--s-6); }
.drawer__nav { display: grid; gap: var(--s-1); }
.drawer__nav a { display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: 0 var(--s-3); border-radius: var(--r-md); text-decoration: none; font-weight: 500; }
.drawer__nav a:hover { background: var(--c-surface-2); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
body.is-locked { overflow: hidden; }

/* Подвал: силуэт города и огни поезда — фирменный мотив */
.site-footer { margin-top: calc(var(--s-16) + 56px); color: #E9DDF3; background: var(--brand-ground); position: relative; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -55px; height: 56px; pointer-events: none;
  background: var(--brand-ground);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56V33H18V24H23V38H49V32H54V25H80V18H120V8H125V31H155V16H173V9H178V16H192V17H214V33H232V19H272V14H312V23H352V26H378V19H383V34H409V22H414V12H454V42H476V20H506V18H546V29H572V28H598V34H600V56Z'/%3E%3C/svg%3E") repeat-x bottom / 600px 56px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56V33H18V24H23V38H49V32H54V25H80V18H120V8H125V31H155V16H173V9H178V16H192V17H214V33H232V19H272V14H312V23H352V26H378V19H383V34H409V22H414V12H454V42H476V20H506V18H546V29H572V28H598V34H600V56Z'/%3E%3C/svg%3E") repeat-x bottom / 600px 56px;
}
.site-footer__train { height: 10px; margin-bottom: var(--s-8); padding-top: var(--s-8); box-sizing: content-box; }
.site-footer__inner { display: grid; gap: var(--s-8); padding-bottom: var(--s-8); }
@media (min-width: 768px) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer .brand__city { color: var(--brand-lights); }
.site-footer__about { margin-top: var(--s-3); color: #CDBBDD; max-width: 38ch; font-size: var(--fs-14); }
.site-footer__title { font-family: var(--font-ui); font-size: var(--fs-14); font-weight: 600; color: #fff; margin-bottom: var(--s-2); letter-spacing: 0; }
.site-footer__links { display: grid; }
.site-footer__links a { color: #E2D3EE; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-14); }
.site-footer__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: var(--s-5) var(--s-6); font-size: var(--fs-13); color: #BBA6CE; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); justify-content: space-between; }
.site-footer :focus-visible { outline-color: var(--brand-lights); }

/* Огни поезда: ряд светящихся окон. Используется в подвале, как индикатор загрузки и маркер «срочно» */
.lights { display: flex; gap: 6px; align-items: center; }
.lights i { display: block; width: 18px; height: 6px; border-radius: 2px; background: var(--brand-lights); box-shadow: 0 0 8px rgba(251, 199, 115, .55); }
.lights i:nth-child(3n) { width: 12px; }
.lights--run i { animation: window-blink 1.4s var(--ease) infinite; }
.lights--run i:nth-child(2) { animation-delay: .12s; } .lights--run i:nth-child(3) { animation-delay: .24s; }
.lights--run i:nth-child(4) { animation-delay: .36s; } .lights--run i:nth-child(5) { animation-delay: .48s; }
.lights--run i:nth-child(6) { animation-delay: .6s; }
@keyframes window-blink { 0%, 100% { opacity: .25; box-shadow: none; } 40% { opacity: 1; } }

/* 7. Кнопки --------------------------------------------------------------- */
.btn {
  --btn-bg: var(--c-surface); --btn-fg: var(--c-text); --btn-bd: var(--c-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 var(--s-5);
  border: 1px solid var(--btn-bd); border-radius: var(--r-md);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: var(--fs-16); line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform 80ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --btn-bg: var(--c-surface-2); }
.btn:active { transform: translateY(1px); --btn-bg: var(--c-surface-3); }
.btn--primary { --btn-bg: var(--c-primary); --btn-fg: var(--c-on-primary); --btn-bd: var(--c-primary); }
.btn--primary:hover { --btn-bg: var(--c-primary-hover); --btn-bd: var(--c-primary-hover); }
.btn--primary:active { --btn-bg: var(--c-primary-active); --btn-bd: var(--c-primary-active); }
.btn--accent { --btn-bg: var(--c-accent); --btn-fg: #fff; --btn-bd: var(--c-accent); }
.btn--accent:hover { --btn-bg: var(--c-accent-hover); --btn-bd: var(--c-accent-hover); }
.btn--secondary { --btn-bg: var(--c-primary-soft); --btn-fg: var(--c-primary-soft-text); --btn-bd: transparent; }
.btn--secondary:hover { --btn-bg: color-mix(in srgb, var(--c-primary-soft) 80%, var(--c-primary) 20%); }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--c-text-2); }
.btn--ghost:hover { --btn-bg: var(--c-surface-2); --btn-fg: var(--c-text); }
.btn--danger { --btn-bg: var(--c-danger); --btn-fg: #fff; --btn-bd: var(--c-danger); }
.btn--danger:hover { --btn-bg: var(--c-danger-hover); --btn-bd: var(--c-danger-hover); }
.btn--danger-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--c-danger); }
.btn--danger-ghost:hover { --btn-bg: var(--c-danger-soft); }
:root[data-theme="dark"] .btn--accent, :root[data-theme="dark"] .btn--danger { --btn-fg: #22071A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--accent, :root:not([data-theme="light"]) .btn--danger { --btn-fg: #22071A; } }
.btn--sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-14); border-radius: var(--r-sm); }
.btn--sm.btn--touch { min-height: var(--tap); } /* маленькая визуально, но 44px для пальца */
.btn--lg { min-height: 52px; padding: 0 var(--s-6); font-size: var(--fs-18); }
.btn--block { width: 100%; }
.btn--icon { width: var(--tap); padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 8. Формы ---------------------------------------------------------------- */
.form { display: grid; gap: var(--s-5); }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-2); }
.form__row { display: grid; gap: var(--s-5); }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: var(--s-2); align-content: start; }
.field__label { font-weight: 600; font-size: var(--fs-14); color: var(--c-text); }
.field__optional { font-weight: 400; color: var(--c-text-3); }
.field__hint { font-size: var(--fs-13); color: var(--c-text-3); line-height: 1.45; }
.field__error { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-14); color: var(--c-danger); font-weight: 500; line-height: 1.4; }
.field__error .icon { width: 18px; height: 18px; margin-top: 1px; }
.field__counter { font-size: var(--fs-13); color: var(--c-text-3); text-align: right; font-variant-numeric: tabular-nums; }
.field__control { position: relative; }
.field__control .input { padding-right: 52px; }
.field__control .icon-btn { position: absolute; right: 2px; top: 2px; }

.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid var(--c-border-strong); border-radius: var(--r-md);
  font-size: var(--fs-16); /* 16px — iOS не зумит поле */
  line-height: 1.4;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--c-text-3); opacity: 1; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--c-text-2); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 35%, transparent); }
.input:disabled, .textarea:disabled, .select:disabled { background: var(--c-surface-2); color: var(--c-text-3); cursor: not-allowed; border-color: var(--c-border); }
.input[readonly] { background: var(--c-surface-2); }
.textarea { min-height: 140px; resize: vertical; line-height: var(--lh-ui); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857A92' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field--invalid .input, .field--invalid .textarea, .field--invalid .select, .input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--c-danger); box-shadow: 0 0 0 1px var(--c-danger); }
.field--invalid .field__label { color: var(--c-danger); }

.search { position: relative; }
.search .input { padding-left: 46px; border-radius: var(--r-pill); background: var(--c-surface); }
.search > .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--c-text-3); pointer-events: none; }

/* Чекбокс и радио */
.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; min-height: var(--tap); padding-block: 10px; line-height: 1.45; }
.check__box { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--c-border-strong); border-radius: 6px; background: var(--c-surface); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur), border-color var(--dur); }
.check__box[type="radio"] { border-radius: 50%; }
.check__box:checked { background: var(--c-primary); border-color: var(--c-primary); }
.check__box[type="checkbox"]:checked::after { content: ""; width: 12px; height: 7px; border: 2.5px solid var(--c-on-primary); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check__box[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-on-primary); }
.check__box:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.check__text { font-size: var(--fs-16); color: var(--c-text); }
.check__text small { display: block; color: var(--c-text-3); font-size: var(--fs-14); margin-top: 2px; }
.field--invalid .check__box { border-color: var(--c-danger); }

/* Переключатель */
.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 56px; cursor: pointer; }
.switch__input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 48px; height: 28px; margin: 0; border-radius: var(--r-pill); background: var(--c-surface-3); border: 1px solid var(--c-border-strong); position: relative; cursor: pointer; transition: background-color var(--dur) var(--ease); }
.switch__input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--dur) var(--ease); }
.switch__input:checked { background: var(--c-primary); border-color: var(--c-primary); }
.switch__input:checked::after { transform: translateX(20px); }
.switch__input:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }

/* Сегменты (радио в виде кнопок) */
.segmented { display: inline-flex; padding: 3px; gap: 3px; background: var(--c-surface-2); border-radius: var(--r-md); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 var(--s-4); border-radius: 9px; font-weight: 500; font-size: var(--fs-14); color: var(--c-text-2); cursor: pointer; }
.segmented input:checked + span { background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-1); font-weight: 600; }
.segmented input:focus-visible + span { outline: 3px solid var(--c-focus); }

/* 9. Уведомления ---------------------------------------------------------- */
.alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-md); background: var(--c-info-soft); color: var(--c-info-soft-text); font-size: var(--fs-14); line-height: 1.5; }
.alert .icon { margin-top: 1px; }
.alert__title { font-weight: 600; font-size: var(--fs-16); display: block; margin-bottom: 2px; }
.alert p { color: inherit; }
.alert--success { background: var(--c-success-soft); color: var(--c-success-soft-text); }
.alert--error { background: var(--c-danger-soft); color: var(--c-danger-soft-text); }
.alert--warning { background: var(--c-warning-soft); color: var(--c-warning-soft-text); }
.alert--neutral { background: var(--c-surface-2); color: var(--c-text-2); }

.toast-region { position: fixed; z-index: 80; left: var(--s-3); right: var(--s-3); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s-3)); display: grid; gap: var(--s-2); pointer-events: none; }
@media (min-width: 960px) { .toast-region { left: auto; right: var(--s-6); bottom: var(--s-6); width: 380px; } }
.toast-region--static { position: static; width: auto; pointer-events: auto; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: start;
  padding: var(--s-3) var(--s-2) var(--s-3) var(--s-4);
  background: #2A1838; color: #F4ECFA; border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  animation: toast-in 260ms var(--ease);
}
:root[data-theme="dark"] .toast { background: #3A2A4A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #3A2A4A; } }
.toast__icon { margin-top: 10px; width: 22px; height: 22px; }
.toast--success .toast__icon { color: #7FD8A8; }
.toast--error .toast__icon { color: #FF9C91; }
.toast--warning .toast__icon { color: var(--brand-lights); }
.toast--info .toast__icon { color: #C9A2EE; }
.toast__body { padding-block: 9px; font-size: var(--fs-14); line-height: 1.45; color: #D9C9E6; }
.toast__title { display: block; font-size: var(--fs-16); font-weight: 600; color: #fff; margin-bottom: 1px; }
.toast__close { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: var(--r-md); color: #CDBBDD; }
.toast__close:hover { background: rgba(255,255,255,.1); color: #fff; }
.toast__close:focus-visible { outline-color: var(--brand-lights); }
.toast.is-leaving { animation: toast-out 200ms var(--ease) forwards; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }

/* 10. Бейджи, теги, статусы ---------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-13); font-weight: 600; text-decoration: none; white-space: nowrap; background: var(--c-neutral-soft); color: var(--c-neutral-soft-text); }
a.badge { min-height: 26px; }
a.badge:hover { filter: brightness(.96); }
.badge--city { background: var(--c-primary-soft); color: var(--c-primary-soft-text); }
.badge--incidents { background: var(--c-danger-soft); color: var(--c-danger-soft-text); }
.badge--ads { background: var(--c-warning-soft); color: var(--c-warning-soft-text); }
.badge--culture { background: var(--c-accent-soft); color: var(--c-accent-soft-text); }
.badge--sport { background: var(--c-success-soft); color: var(--c-success-soft-text); }
.badge--urgent { background: var(--c-danger); color: #fff; }
:root[data-theme="dark"] .badge--urgent { color: #2A0806; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge--urgent { color: #2A0806; } }
.badge--pinned { background: var(--c-warning); color: var(--c-on-warning); }
.badge .icon { width: 14px; height: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-sm); border: 1px solid var(--c-border); color: var(--c-text-2); font-size: var(--fs-14); text-decoration: none; background: var(--c-surface); }
.tag::before { content: "#"; color: var(--c-text-3); margin-right: 1px; }
.tag:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* Статусы: точка + слово, цвет дублирует смысл, но не заменяет его */
.status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: var(--r-pill); font-size: var(--fs-13); font-weight: 600; white-space: nowrap; background: var(--c-neutral-soft); color: var(--c-neutral-soft-text); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* статьи */
.status--draft { background: var(--c-neutral-soft); color: var(--c-neutral-soft-text); }
.status--review { background: var(--c-info-soft); color: var(--c-info-soft-text); }
.status--published { background: var(--c-success-soft); color: var(--c-success-soft-text); }
.status--scheduled { background: var(--c-primary-soft); color: var(--c-primary-soft-text); }
.status--scheduled::before { border-radius: 2px; }
.status--unpublished { background: transparent; color: var(--c-text-2); box-shadow: inset 0 0 0 1px var(--c-border-strong); }
.status--unpublished::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
/* материалы предложки */
.status--new { background: var(--c-accent-soft); color: var(--c-accent-soft-text); }
.status--needs-info { background: var(--c-warning-soft); color: var(--c-warning-soft-text); }
.status--accepted { background: var(--c-success-soft); color: var(--c-success-soft-text); }
.status--rejected { background: var(--c-danger-soft); color: var(--c-danger-soft-text); }
/* пользователи */
.status--blocked { background: var(--c-danger-soft); color: var(--c-danger-soft-text); }
.status--active { background: var(--c-success-soft); color: var(--c-success-soft-text); }

.role { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; background: var(--c-primary-soft); color: var(--c-primary-soft-text); }
.role--mod { background: var(--c-success-soft); color: var(--c-success-soft-text); }

.counter { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--c-accent); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .counter { color: #2A0A20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .counter { color: #2A0A20; } }

/* 11. Лента и карточки ---------------------------------------------------- */
/* Сводка дня — единственное «громкое» место ленты: закатный градиент из логотипа */
.today {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-xl); padding: var(--s-6) var(--s-5) var(--s-5);
  background: var(--grad-dusk); color: #fff;
}
.today::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46px; z-index: -1;
  background: var(--brand-ground); opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56V33H18V24H23V38H49V32H54V25H80V18H120V8H125V31H155V16H173V9H178V16H192V17H214V33H232V19H272V14H312V23H352V26H378V19H383V34H409V22H414V12H454V42H476V20H506V18H546V29H572V28H598V34H600V56Z'/%3E%3C/svg%3E") repeat-x bottom / 520px 46px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56V33H18V24H23V38H49V32H54V25H80V18H120V8H125V31H155V16H173V9H178V16H192V17H214V33H232V19H272V14H312V23H352V26H378V19H383V34H409V22H414V12H454V42H476V20H506V18H546V29H572V28H598V34H600V56Z'/%3E%3C/svg%3E") repeat-x bottom / 520px 46px;
}
.today__date { font-size: var(--fs-14); color: #EAD9F5; font-weight: 500; }
.today__title { color: #fff; font-size: var(--fs-24); margin-top: var(--s-1); max-width: 22ch; }
.today__list { margin-top: var(--s-4); display: grid; gap: var(--s-2); padding: 0; list-style: none; max-width: 52ch; }
.today__list li { display: flex; gap: var(--s-3); align-items: baseline; font-size: var(--fs-16); line-height: 1.45; }
.today__list li::before { content: ""; flex-shrink: 0; width: 12px; height: 5px; border-radius: 2px; background: var(--brand-lights); box-shadow: 0 0 8px rgba(251,199,115,.6); transform: translateY(-3px); }
.today__list a { color: #fff; text-decoration: none; }
.today__list a:hover { text-decoration: underline; text-underline-offset: .2em; }
.today__foot { position: relative; margin-top: var(--s-10); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.today .btn { --btn-bg: #fff; --btn-fg: #4A1469; --btn-bd: #fff; }
.today .btn:hover { --btn-bg: #F3EAFA; }
.today .btn--ghost { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.3); }
.today .btn--ghost:hover { --btn-bg: rgba(255,255,255,.2); }
.today :focus-visible { outline-color: var(--brand-lights); }
@media (min-width: 768px) {
  .today { padding: var(--s-8) var(--s-8) var(--s-6); }
  .today__title { font-size: var(--fs-30); }
}

.feed-toolbar { display: grid; gap: var(--s-3); margin-block: var(--s-6) var(--s-4); }
.chips { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-2); font-weight: 500; font-size: var(--fs-14); text-decoration: none; transition: background-color var(--dur), border-color var(--dur), color var(--dur); }
.chip::after { content: ""; position: absolute; } /* hit area helper */
.chip { position: relative; }
.chip::after { inset: -2px 0; } /* 40px + 4px = 44px сенсорная зона */
.chip:hover { border-color: var(--c-border-strong); color: var(--c-text); }
.chip[aria-current="true"], .chip.is-active { background: var(--c-text); border-color: var(--c-text); color: var(--c-bg); }

.feed { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .feed { gap: var(--s-5); } }

.news-card {
  position: relative; display: grid; gap: var(--s-3);
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: var(--s-4);
  transition: border-color var(--dur) var(--ease);
}
.news-card:hover { border-color: var(--c-border-strong); }
.news-card:focus-within { border-color: var(--c-primary); }
.news-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.news-card__title { font-size: var(--fs-20); line-height: 1.25; letter-spacing: -.01em; }
.news-card__title a { text-decoration: none; color: inherit; }
.news-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* вся карточка кликабельна */
.news-card__title a:focus-visible { outline: none; }
.news-card__title a:focus-visible::after { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.news-card__excerpt { color: var(--c-text-2); font-size: var(--fs-16); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__media { margin: calc(var(--s-4) * -1) calc(var(--s-4) * -1) 0; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--c-surface-2); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__media + .news-card__top { margin-top: var(--s-1); }
.news-card__meta, .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); font-size: var(--fs-14); color: var(--c-text-3); }
.meta__item { display: inline-flex; align-items: center; gap: 6px; }
.meta__item .icon { width: 16px; height: 16px; }
.meta__author { color: var(--c-text-2); font-weight: 500; }
.news-card__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); margin-top: var(--s-1); border-top: 1px solid var(--c-border); }
.news-card__actions { position: relative; z-index: 1; display: flex; gap: var(--s-1); margin-right: calc(var(--s-2) * -1); }

@media (min-width: 640px) {
  .news-card { padding: var(--s-5); }
  .news-card__media { margin: calc(var(--s-5) * -1) calc(var(--s-5) * -1) 0; }
  .news-card--row { grid-template-columns: 1fr 200px; column-gap: var(--s-5); }
  .news-card--row .news-card__media { grid-column: 2; grid-row: 1 / span 4; margin: 0; border-radius: var(--r-md); aspect-ratio: 4 / 3; align-self: start; }
  .news-card--row > :not(.news-card__media) { grid-column: 1; }
  .news-card--row .news-card__footer { grid-column: 1 / -1; }
}
@media (min-width: 768px) {
  .news-card--lead .news-card__title { font-size: var(--fs-30); line-height: 1.15; }
  .news-card--lead .news-card__excerpt { font-size: var(--fs-18); }
  .news-card--lead .news-card__media { aspect-ratio: 21 / 9; }
}

/* Закреплённая: тёплый «огонёк» сверху */
.news-card--pinned { border-color: color-mix(in srgb, var(--brand-lights) 70%, var(--c-border)); background: linear-gradient(180deg, color-mix(in srgb, var(--c-warning-soft) 70%, var(--c-surface)) 0, var(--c-surface) 120px); }
.news-card--pinned::before { content: ""; position: absolute; top: -1px; left: var(--s-5); width: 56px; height: 4px; border-radius: 0 0 4px 4px; background: var(--brand-lights); box-shadow: 0 0 12px rgba(251,199,115,.8); }

/* Срочная: красная кромка слева, метка «Срочно» */
.news-card--urgent { border-color: color-mix(in srgb, var(--c-danger) 45%, var(--c-border)); box-shadow: inset 4px 0 0 var(--c-danger); }
.news-card--urgent .news-card__title { color: var(--c-text); }
.urgent-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.load-more { display: grid; justify-items: center; gap: var(--s-3); margin-top: var(--s-6); }
.load-more__hint { font-size: var(--fs-14); color: var(--c-text-3); }
.load-more .btn.htmx-request, .load-more.is-loading .btn { pointer-events: none; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1); margin-top: var(--s-8); }
.pagination__link { min-width: var(--tap); height: var(--tap); padding: 0 var(--s-2); display: inline-grid; place-items: center; border-radius: var(--r-md); color: var(--c-text-2); text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.pagination__link:hover { background: var(--c-surface-2); color: var(--c-text); }
.pagination__link[aria-current="page"] { background: var(--c-primary); color: var(--c-on-primary); font-weight: 700; }
.pagination__link[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.pagination__gap { min-width: 24px; display: inline-grid; place-items: center; color: var(--c-text-3); }

/* Компактный список (боковая колонка, «Похожие») */
.mini-list { display: grid; list-style: none; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--c-border); }
.mini-item { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); padding-block: var(--s-3); text-decoration: none; color: inherit; align-items: start; }
.mini-item:hover .mini-item__title { color: var(--c-primary); }
.mini-item__title { display: block; font-weight: 600; font-size: var(--fs-16); line-height: 1.35; transition: color var(--dur); }
.mini-item__meta { display: block; margin-top: 4px; font-size: var(--fs-13); color: var(--c-text-3); }
.mini-item__thumb { width: 72px; height: 56px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-surface-2); }

/* 12. Статья -------------------------------------------------------------- */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); font-size: var(--fs-14); color: var(--c-text-3); margin-bottom: var(--s-4); }
.breadcrumbs a { color: var(--c-text-2); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.breadcrumbs a:hover { color: var(--c-primary); text-decoration: underline; }
.breadcrumbs .icon { width: 14px; height: 14px; }

.article { max-width: var(--measure); }
.article__header { display: grid; gap: var(--s-4); }
.article__title { font-size: var(--fs-30); line-height: 1.12; letter-spacing: -.02em; }
@media (min-width: 768px) { .article__title { font-size: var(--fs-48); line-height: 1.06; } }
.article__lead { font-size: var(--fs-20); line-height: 1.5; color: var(--c-text-2); font-weight: 400; }
.article__byline { display: flex; align-items: center; gap: var(--s-3); padding-block: var(--s-4); border-block: 1px solid var(--c-border); }
.article__byline-text { display: grid; font-size: var(--fs-14); line-height: 1.4; }
.article__byline-name { font-weight: 600; color: var(--c-text); }
.article__byline-meta { color: var(--c-text-3); display: flex; flex-wrap: wrap; column-gap: var(--s-3); }
.article__figure { margin-block: var(--s-6); }
.article__figure img { width: 100%; border-radius: var(--r-lg); background: var(--c-surface-2); aspect-ratio: 3 / 2; object-fit: cover; }
.article__figure figcaption { margin-top: var(--s-2); font-size: var(--fs-14); color: var(--c-text-3); line-height: 1.45; }
@media (min-width: 1024px) { .article__figure--wide { margin-inline: -60px; } }

/* Текст для длинного чтения: Lora, 18–19px, интерлиньяж 1.7, ~65 знаков */
.prose { font-family: var(--font-read); font-size: 1.125rem; line-height: var(--lh-read); color: var(--c-text); font-feature-settings: "kern", "liga"; hyphens: auto; -webkit-hyphens: auto; }
@media (min-width: 768px) { .prose { font-size: 1.1875rem; } }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { font-family: var(--font-display); margin-top: 1.8em; hyphens: manual; }
.prose h2 { font-size: var(--fs-24); }
.prose h3 { font-size: var(--fs-20); }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--c-primary); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--c-primary); }
.prose blockquote { margin-inline: 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--brand-glow); font-style: italic; color: var(--c-text-2); }
.prose strong { font-weight: 650; }
.prose figure img { border-radius: var(--r-md); }
.prose .callout { font-family: var(--font-ui); font-size: var(--fs-16); line-height: 1.55; background: var(--c-surface-2); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); }

.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--c-border); }
.share-bar__label { width: 100%; font-weight: 600; font-size: var(--fs-14); color: var(--c-text-2); }
@media (min-width: 640px) { .share-bar__label { width: auto; margin-right: var(--s-2); } }
.share-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-4) 0 var(--s-3); border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-14); text-decoration: none; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); transition: background-color var(--dur), border-color var(--dur); }
.share-btn:hover { border-color: var(--c-border-strong); background: var(--c-surface-2); }
.share-btn .soc-icon { width: 24px; height: 24px; }
.share-btn.is-done { color: var(--c-success); border-color: currentColor; }

.article-reactions { display: flex; gap: var(--s-4); color: var(--c-text-3); font-size: var(--fs-14); margin-top: var(--s-4); }

/* 13. Соцсети ------------------------------------------------------------- */
/* Иконки VK и MAX — инлайн-SVG с классом soc-icon. Цвета площадок: VK #0077FF, MAX — фирменный градиент. */
.soc-icon { width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; }
.soc-link { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-md); }
.soc-link:hover { background: var(--c-surface-2); }
.site-footer .soc-link:hover { background: rgba(255,255,255,.1); }

.social-block { display: grid; gap: var(--s-3); }
@media (min-width: 640px) { .social-block--row { grid-template-columns: 1fr 1fr; } }
.social-card {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-4); align-items: center;
  padding: var(--s-4); border-radius: var(--r-lg); border: 1px solid var(--c-border); background: var(--c-surface);
  text-decoration: none; color: inherit; transition: border-color var(--dur) var(--ease);
}
.social-card:hover { border-color: var(--c-border-strong); }
.social-card .soc-icon { width: 48px; height: 48px; border-radius: 14px; grid-row: span 2; }
.social-card__name { font-weight: 700; font-size: var(--fs-16); }
.social-card__text { font-size: var(--fs-14); color: var(--c-text-2); line-height: 1.4; }
.social-card__cta { grid-column: 1 / -1; margin-top: var(--s-3); }
.social-card__cta .btn { width: 100%; }
.btn--vk { --btn-bg: #0077FF; --btn-bd: #0077FF; --btn-fg: #fff; }
.btn--vk:hover { --btn-bg: #0066DB; --btn-bd: #0066DB; }
.btn--max { --btn-bg: #5A2CE0; --btn-bd: #5A2CE0; --btn-fg: #fff; }
.btn--max:hover { --btn-bg: #4A20C4; --btn-bd: #4A20C4; }

/* 14. Чат ----------------------------------------------------------------- */
.chat-page { display: grid; gap: var(--s-6); }
@media (min-width: 1024px) { .chat-page { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }

.chat {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  height: calc(100dvh - var(--header-h) - var(--tabbar-h) - 32px);
  min-height: 480px; overflow: hidden;
}
@media (min-width: 960px) { .chat { height: calc(100dvh - var(--header-h) - 48px); } }
@media (max-width: 639px) {
  .chat-page--full { margin-inline: calc(var(--gutter) * -1); }
  .chat-page--full .chat { border-radius: 0; border-inline: 0; height: calc(100dvh - var(--header-h) - var(--tabbar-h)); }
  .page:has(.chat-page--full) { padding-block: 0; }
}
.chat__head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); border-bottom: 1px solid var(--c-border); min-height: 60px; }
.chat__head-text { display: grid; line-height: 1.3; min-width: 0; flex: 1; }
.chat__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-18); }
.chat__online { font-size: var(--fs-13); color: var(--c-text-3); display: inline-flex; align-items: center; gap: 6px; }
.chat__online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-success); }

.chat__rules { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); background: var(--c-warning-soft); color: var(--c-text); border-bottom: 1px solid var(--c-border); font-size: var(--fs-14); line-height: 1.45; }
.chat__rules .icon { color: var(--c-warning-soft-text); margin-top: 1px; }
.chat__rules-title { font-weight: 600; }
.chat__rules details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--s-3); }
.chat__rules details summary::-webkit-details-marker { display: none; }
.chat__rules details[open] summary .icon-chev { transform: rotate(180deg); }
.chat__rules ol { margin-top: var(--s-2); padding-left: 1.2em; color: var(--c-text-2); }
.chat__rules-body { flex: 1; min-width: 0; }

.chat__feed { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); overscroll-behavior: contain; scroll-behavior: smooth; }
@media (min-width: 640px) { .chat__feed { padding: var(--s-5); } }
.day-divider { align-self: center; margin-block: var(--s-3); padding: 4px 12px; border-radius: var(--r-pill); background: var(--c-surface-2); color: var(--c-text-3); font-size: var(--fs-13); font-weight: 500; }
.new-divider { display: flex; align-items: center; gap: var(--s-3); color: var(--c-accent); font-size: var(--fs-13); font-weight: 600; margin-block: var(--s-3); }
.new-divider::before, .new-divider::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .4; }

.msg { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: var(--s-2); align-items: end; max-width: min(560px, 88%); }
.msg + .msg:not(.msg--cont) { margin-top: var(--s-3); }
.msg__avatar { grid-row: 1 / span 2; align-self: end; }
.msg--cont .msg__avatar { visibility: hidden; }
.msg__bubble { position: relative; padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--c-surface-2); color: var(--c-text); line-height: 1.45; overflow-wrap: anywhere; }
.msg--cont .msg__bubble { border-radius: 6px 18px 18px 6px; }
.msg__author { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-13); font-weight: 600; color: var(--c-primary); margin-bottom: 2px; }
.msg--cont .msg__author { display: none; }
.msg__text { font-size: var(--fs-16); }
.msg__text p + p { margin-top: .4em; }
.msg__foot { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; color: var(--c-text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.msg__img { margin: 4px -8px 4px; border-radius: 12px; overflow: hidden; max-width: 320px; }
.msg__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.msg__quote { margin: 2px 0 6px; padding: 4px 10px; border-left: 3px solid var(--c-primary); border-radius: 4px; background: color-mix(in srgb, var(--c-primary) 8%, transparent); font-size: var(--fs-14); }
.msg__quote b { display: block; color: var(--c-primary); font-size: var(--fs-13); }
.msg__menu-btn { position: absolute; top: 2px; right: -48px; opacity: 0; transition: opacity var(--dur); }
.msg:hover .msg__menu-btn, .msg:focus-within .msg__menu-btn, .msg.is-menu-open .msg__menu-btn { opacity: 1; }
@media (hover: none) { .msg__menu-btn { opacity: .7; } }

.msg--own { align-self: flex-end; grid-template-columns: minmax(0, 1fr); }
.msg--own .msg__avatar, .msg--own .msg__author { display: none; }
.msg--own .msg__bubble { background: var(--c-own-bubble); color: var(--c-own-bubble-text); border-radius: 18px 18px 6px 18px; }
.msg--own.msg--cont .msg__bubble { border-radius: 18px 6px 6px 18px; }
.msg--own .msg__foot { color: color-mix(in srgb, var(--c-own-bubble-text) 72%, transparent); }
.msg--own .msg__menu-btn { right: auto; left: -48px; }
.msg--own .msg__quote { border-left-color: #fff; background: rgba(255,255,255,.14); }
.msg--own .msg__quote b { color: inherit; }

.msg--deleted .msg__bubble { background: transparent; border: 1px dashed var(--c-border-strong); color: var(--c-text-3); font-style: italic; font-size: var(--fs-14); }
.msg--system { align-self: center; max-width: 90%; text-align: center; font-size: var(--fs-13); color: var(--c-text-3); display: block; margin-block: var(--s-2); }
.msg--mod .msg__author::after { content: "модератор"; font-weight: 600; font-size: 11px; color: var(--c-success-soft-text); background: var(--c-success-soft); padding: 1px 6px; border-radius: 4px; }

/* Меню действий над сообщением (popover) */
.menu { position: absolute; z-index: 30; min-width: 220px; padding: var(--s-1); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--shadow-2); display: grid; }
.menu__item { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: 0 var(--s-3); border-radius: 8px; font-size: var(--fs-14); font-weight: 500; text-align: left; color: var(--c-text); text-decoration: none; }
.menu__item:hover, .menu__item:focus-visible { background: var(--c-surface-2); outline: none; }
.menu__item .icon { color: var(--c-text-3); }
.menu__item--danger { color: var(--c-danger); }
.menu__item--danger .icon { color: currentColor; }
.menu__sep { height: 1px; background: var(--c-border); margin: var(--s-1) 0; }
.msg .menu { top: 34px; right: -40px; }
.msg--own .menu { right: auto; left: -40px; }
@media (max-width: 639px) {
  .msg .menu, .msg--own .menu { position: fixed; left: var(--s-3); right: var(--s-3); top: auto; bottom: calc(var(--tabbar-h) + var(--s-3)); min-width: 0; box-shadow: var(--shadow-3); border-radius: var(--r-lg); padding: var(--s-2); }
}

.composer { border-top: 1px solid var(--c-border); padding: var(--s-2); background: var(--c-surface); }
.composer__reply { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); margin-bottom: var(--s-2); border-left: 3px solid var(--c-primary); background: var(--c-surface-2); border-radius: 6px; font-size: var(--fs-14); }
.composer__reply > div { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer__row { display: flex; align-items: flex-end; gap: var(--s-1); }
.composer__input { flex: 1; min-height: var(--tap); max-height: 160px; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--c-border); background: var(--c-surface-2); resize: none; line-height: 1.4; font-size: var(--fs-16); overflow-y: auto; }
.composer__input:focus { outline: none; border-color: var(--c-primary); background: var(--c-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 30%, transparent); }
.composer__send { width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center; background: var(--c-primary); color: var(--c-on-primary); flex-shrink: 0; transition: background-color var(--dur); }
.composer__send:hover { background: var(--c-primary-hover); }
.composer__send:disabled { background: var(--c-surface-3); color: var(--c-text-3); cursor: not-allowed; }
.composer__hint { font-size: var(--fs-12); color: var(--c-text-3); padding: 4px var(--s-3) 0; }
.composer--locked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--c-surface-2); font-size: var(--fs-14); color: var(--c-text-2); }

/* 15. Личные сообщения ---------------------------------------------------- */
.dm { display: grid; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; height: calc(100dvh - var(--header-h) - var(--tabbar-h) - 32px); min-height: 520px; }
@media (min-width: 960px) { .dm { grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--header-h) - 48px); } }
@media (max-width: 959px) {
  .dm[data-view="list"] .dm__thread { display: none; }
  .dm[data-view="thread"] .dm__list { display: none; }
}
.dm__list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--c-border); }
.dm__list-head { padding: var(--s-4); display: grid; gap: var(--s-3); border-bottom: 1px solid var(--c-border); }
.dm__list-head h1 { font-size: var(--fs-24); }
.dialogs { list-style: none; padding: var(--s-1); margin: 0; overflow-y: auto; flex: 1; }
.dialog-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 2px var(--s-3); align-items: center; padding: var(--s-3); border-radius: var(--r-md); text-decoration: none; color: inherit; min-height: 72px; }
.dialog-item:hover { background: var(--c-surface-2); }
.dialog-item[aria-current="true"] { background: var(--c-primary-soft); }
.dialog-item .avatar { grid-row: span 2; }
.dialog-item__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-item__time { font-size: var(--fs-13); color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.dialog-item__preview { font-size: var(--fs-14); color: var(--c-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-item__end { display: flex; justify-content: flex-end; }
.dialog-item--unread .dialog-item__name { font-weight: 700; }
.dialog-item--unread .dialog-item__preview { color: var(--c-text); font-weight: 500; }
.dialog-item--unread .dialog-item__time { color: var(--c-accent); font-weight: 600; }
.dialog-item__read { width: 18px; height: 18px; color: var(--c-primary); }

.dm__thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dm__thread .chat__feed { background: var(--c-bg); }
.dm__blocked { padding: var(--s-4); text-align: center; color: var(--c-text-2); font-size: var(--fs-14); background: var(--c-surface-2); }

.msg__status { width: 16px; height: 16px; }

/* Аватар: фото или инициалы на одном из 6 фирменных оттенков */
.avatar { --size: 40px; width: var(--size); height: var(--size); border-radius: 50%; flex-shrink: 0; display: inline-grid; place-items: center; overflow: hidden; background: var(--c-primary-soft); color: var(--c-primary-soft-text); font-weight: 700; font-size: calc(var(--size) * .38); letter-spacing: -.02em; position: relative; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { --size: 28px; } .avatar--sm { --size: 36px; } .avatar--md { --size: 48px; } .avatar--lg { --size: 72px; } .avatar--xl { --size: 96px; }
.avatar--c1 { background: #EFE6F7; color: #5A1A80; } .avatar--c2 { background: #FBE7F2; color: #8F1F69; }
.avatar--c3 { background: #E2F3EA; color: #1E6B45; } .avatar--c4 { background: #FFF1D6; color: #7A4E00; }
.avatar--c5 { background: #E5EEFA; color: #1F57A6; } .avatar--c6 { background: #F1EDE6; color: #5C4B32; }
:root[data-theme="dark"] .avatar--c1 { background: #3D2557; color: #DCC2F5; }
:root[data-theme="dark"] .avatar--c2 { background: #4A1F3F; color: #F7B6DC; }
:root[data-theme="dark"] .avatar--c3 { background: #173A28; color: #9BE3BC; }
:root[data-theme="dark"] .avatar--c4 { background: #3D2E0E; color: #F8D48C; }
:root[data-theme="dark"] .avatar--c5 { background: #1A2E4D; color: #A9C8FF; }
:root[data-theme="dark"] .avatar--c6 { background: #36302A; color: #E3D3BC; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .avatar--c1 { background: #3D2557; color: #DCC2F5; }
  :root:not([data-theme="light"]) .avatar--c2 { background: #4A1F3F; color: #F7B6DC; }
  :root:not([data-theme="light"]) .avatar--c3 { background: #173A28; color: #9BE3BC; }
  :root:not([data-theme="light"]) .avatar--c4 { background: #3D2E0E; color: #F8D48C; }
  :root:not([data-theme="light"]) .avatar--c5 { background: #1A2E4D; color: #A9C8FF; }
  :root:not([data-theme="light"]) .avatar--c6 { background: #36302A; color: #E3D3BC; }
}
.avatar-wrap { position: relative; display: inline-flex; }
.avatar-wrap__online { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-success); box-shadow: 0 0 0 2px var(--c-surface); }

/* 16. Предложка ----------------------------------------------------------- */
.submit-layout { display: grid; gap: var(--s-8); }
@media (min-width: 1024px) { .submit-layout { grid-template-columns: minmax(0, 640px) 1fr; gap: var(--s-12); align-items: start; } }

.dropzone {
  position: relative; display: grid; justify-items: center; gap: var(--s-2); text-align: center;
  padding: var(--s-8) var(--s-5); border: 2px dashed var(--c-border-strong); border-radius: var(--r-lg);
  background: var(--c-surface); color: var(--c-text-2); cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.dropzone:hover { border-color: var(--c-primary); background: color-mix(in srgb, var(--c-primary-soft) 45%, var(--c-surface)); }
.dropzone.is-dragover { border-color: var(--c-primary); border-style: solid; background: var(--c-primary-soft); }
.dropzone:focus-within { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.dropzone__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--c-primary-soft); color: var(--c-primary); margin-bottom: var(--s-1); }
.dropzone__icon .icon { width: 26px; height: 26px; }
.dropzone__title { font-weight: 600; color: var(--c-text); font-size: var(--fs-16); }
.dropzone__title u { color: var(--c-primary); text-underline-offset: .2em; }
.dropzone__hint { font-size: var(--fs-13); color: var(--c-text-3); line-height: 1.5; }
.field--invalid .dropzone { border-color: var(--c-danger); }

.file-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s-3); list-style: none; padding: 0; }
.file-preview { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-2); border: 1px solid var(--c-border); aspect-ratio: 1; }
.file-preview img, .file-preview video { width: 100%; height: 100%; object-fit: cover; }
.file-preview__info { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(20, 6, 30, .78)); color: #fff; font-size: 11.5px; line-height: 1.3; }
.file-preview__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-preview__remove { position: absolute; top: 2px; right: 2px; width: var(--tap); height: var(--tap); display: grid; place-items: center; }
.file-preview__remove span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 6, 30, .7); color: #fff; }
.file-preview__remove:hover span { background: var(--c-danger); }
.file-preview__type { position: absolute; top: 8px; left: 8px; padding: 2px 6px; border-radius: 5px; background: rgba(20, 6, 30, .7); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.file-preview__type .icon { width: 13px; height: 13px; }
.file-preview--video { background: #2A1838; display: grid; place-items: center; }
.file-preview--error { border: 2px solid var(--c-danger); }
.file-preview--error .file-preview__info { background: var(--c-danger); padding-top: 6px; }
.file-preview__progress { position: absolute; left: 8px; right: 8px; top: 50%; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.file-preview__progress i { display: block; height: 100%; background: #fff; }

.steps-aside { display: grid; gap: var(--s-4); }
.process { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
.process li { position: relative; padding: 0 0 var(--s-5) 44px; counter-increment: step; }
.process li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c-primary-soft); color: var(--c-primary-soft-text); font-weight: 700; font-size: var(--fs-14); }
.process li:not(:last-child)::after { content: ""; position: absolute; left: 14.5px; top: 32px; bottom: 4px; width: 1px; background: var(--c-border-strong); opacity: .5; }
.process b { display: block; font-weight: 600; }
.process span { color: var(--c-text-2); font-size: var(--fs-14); }

.success-panel { text-align: center; display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-8) var(--s-5); }
.success-panel__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--c-success-soft); color: var(--c-success); }
.success-panel__icon .icon { width: 32px; height: 32px; }

/* 17. Личный кабинет ------------------------------------------------------ */
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; padding: var(--s-5); border-radius: var(--r-xl); background: var(--c-surface); border: 1px solid var(--c-border); }
.profile-head__name { font-size: var(--fs-24); }
.profile-head__meta { color: var(--c-text-3); font-size: var(--fs-14); margin-top: 2px; }
.profile-head__actions { grid-column: 1 / -1; display: flex; gap: var(--s-2); flex-wrap: wrap; }
@media (min-width: 768px) {
  .profile-head { grid-template-columns: auto 1fr auto; padding: var(--s-6); }
  .profile-head__actions { grid-column: auto; }
}
.avatar-edit { position: relative; }
.avatar-edit__btn { position: absolute; right: -4px; bottom: -4px; width: 36px; height: 36px; border-radius: 50%; background: var(--c-surface); border: 1px solid var(--c-border); display: grid; place-items: center; color: var(--c-text-2); box-shadow: var(--shadow-1); }
.avatar-edit__btn::after { content: ""; position: absolute; inset: -4px; }

.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--c-border); overflow-x: auto; scrollbar-width: none; margin-block: var(--s-6) var(--s-6); }
.tabs::-webkit-scrollbar { display: none; }
.tabs__link { flex-shrink: 0; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-3); color: var(--c-text-2); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs__link:hover { color: var(--c-text); }
.tabs__link[aria-selected="true"], .tabs__link[aria-current="page"] { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }

.profile-grid { display: grid; gap: var(--s-6); }
@media (min-width: 1024px) { .profile-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

.list { list-style: none; padding: 0; margin: 0; }
.list-row { display: flex; align-items: center; gap: var(--s-3); padding-block: var(--s-3); min-height: 56px; }
.list > li + li > .list-row, .list > .list-row + .list-row { border-top: 1px solid var(--c-border); }
.list-row__main { flex: 1; min-width: 0; }
.list-row__title { font-weight: 600; line-height: 1.35; }
.list-row__title a { text-decoration: none; color: inherit; }
.list-row__title a:hover { color: var(--c-primary); }
.list-row__sub { font-size: var(--fs-13); color: var(--c-text-3); margin-top: 2px; }

.danger-zone { border-color: color-mix(in srgb, var(--c-danger) 35%, var(--c-border)); }

/* 18. Вход, регистрация, код --------------------------------------------- */
.auth { min-height: calc(100dvh - var(--header-h)); display: grid; place-items: start center; padding: var(--s-8) var(--gutter) var(--s-12); }
@media (min-width: 768px) { .auth { place-items: center; padding-block: var(--s-12); } }
.auth-card { width: 100%; max-width: 440px; }
@media (min-width: 560px) { .auth-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-xl); padding: var(--s-8); box-shadow: var(--shadow-2); } }
.auth-card__logo { width: 56px; height: 56px; border-radius: 50%; margin-bottom: var(--s-5); }
.auth-card__title { font-size: var(--fs-30); }
.auth-card__lead { color: var(--c-text-2); margin-top: var(--s-2); margin-bottom: var(--s-6); }
.auth-card__foot { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--c-border); text-align: center; color: var(--c-text-2); font-size: var(--fs-14); }
.auth-card__foot a { font-weight: 600; }
.auth-steps { display: flex; gap: var(--s-2); margin-bottom: var(--s-5); }
.auth-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--c-surface-3); }
.auth-steps i.is-done { background: var(--c-primary); }

.yandex-note { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-surface-2); font-size: var(--fs-14); color: var(--c-text-2); line-height: 1.45; }
.yandex-note__mark { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: #FC3F1D; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px; font-family: var(--font-ui); }

.code-input { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-2); max-width: 360px; }
@media (min-width: 400px) { .code-input { gap: 10px; } }
.code-input__cell {
  width: 100%; min-width: 0; height: 60px; text-align: center;
  font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid var(--c-border-strong); border-radius: var(--r-md); background: var(--c-surface); color: var(--c-text);
  caret-color: var(--c-primary);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.code-input__cell:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 35%, transparent); }
.code-input__cell.is-filled { border-color: var(--c-primary); background: var(--c-primary-soft); }
.code-input.is-invalid .code-input__cell { border-color: var(--c-danger); background: var(--c-danger-soft); animation: shake 300ms var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.resend { font-size: var(--fs-14); color: var(--c-text-3); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); }
.resend__timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--c-text-2); }

/* 19. Пустые состояния, скелетоны, модалки ------------------------------- */
.empty-state { display: grid; justify-items: center; text-align: center; gap: var(--s-3); padding: var(--s-10) var(--s-5); }
.empty-state__art { width: 120px; height: 72px; margin-bottom: var(--s-2); color: var(--c-primary); }
.empty-state__title { font-size: var(--fs-20); }
.empty-state__text { color: var(--c-text-2); max-width: 40ch; }
.empty-state .btn { margin-top: var(--s-2); }

.skeleton { position: relative; overflow: hidden; background: var(--c-skeleton); border-radius: var(--r-xs); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--c-skeleton-shine), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton--line { height: 14px; }
.skeleton--title { height: 22px; }
.skeleton--badge { height: 26px; width: 80px; border-radius: var(--r-pill); }
.skeleton--media { aspect-ratio: 16 / 9; border-radius: var(--r-md); }
.skeleton-card { display: grid; gap: var(--s-3); padding: var(--s-5); border: 1px solid var(--c-border); border-radius: var(--r-lg); background: var(--c-surface); }
.loading-row { display: flex; align-items: center; justify-content: center; gap: var(--s-3); color: var(--c-text-3); font-size: var(--fs-14); padding: var(--s-4); }
.loading-row .lights i { background: var(--c-primary); box-shadow: none; }

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; padding: 0; background: transparent; width: 100%; max-width: none; height: 100%; max-height: none; }
.modal:not([open]) { display: none; }
.modal::backdrop { background: var(--c-overlay); }
.modal--static { position: relative; inset: auto; height: auto; z-index: 1; display: grid; place-items: center; padding: var(--s-6) 0; background: var(--c-overlay); border-radius: var(--r-lg); }
.modal__dialog { width: 100%; max-width: 480px; max-height: 90dvh; overflow-y: auto; background: var(--c-surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-3); animation: sheet-in 240ms var(--ease); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 640px) {
  .modal { place-items: center; padding: var(--s-6); }
  .modal__dialog { border-radius: var(--r-xl); animation-name: modal-in; }
  .modal--static .modal__dialog { width: calc(100% - 48px); }
}
.modal--static .modal__dialog { border-radius: var(--r-xl); width: calc(100% - 24px); }
@keyframes sheet-in { from { transform: translateY(32px); opacity: 0; } }
@keyframes modal-in { from { transform: scale(.97); opacity: 0; } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-3) 0 var(--s-6); }
.modal__title { font-size: var(--fs-20); padding-top: 10px; }
.modal__body { padding: var(--s-3) var(--s-6) var(--s-5); color: var(--c-text-2); display: grid; gap: var(--s-4); }
.modal__foot { display: flex; flex-direction: column-reverse; gap: var(--s-2); padding: 0 var(--s-6) var(--s-6); }
@media (min-width: 480px) { .modal__foot { flex-direction: row; justify-content: flex-end; } }

/* 20. Панель управления --------------------------------------------------- */
.panel-body { background: var(--c-bg); }
.panel { display: grid; min-height: 100dvh; }
@media (min-width: 1024px) { .panel { grid-template-columns: 260px minmax(0, 1fr); } }

.panel-sidebar { background: var(--brand-ground); color: #E4D6F0; display: flex; flex-direction: column; }
.panel-sidebar .brand { color: #fff; padding: var(--s-4) var(--s-5); }
.panel-sidebar .brand__city { color: var(--brand-lights); }
.panel-sidebar__label { padding: var(--s-5) var(--s-5) var(--s-2); font-size: var(--fs-13); color: #A992BE; font-weight: 500; }
.panel-nav { display: grid; gap: 2px; padding: 0 var(--s-3); }
.panel-nav__link { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-sm); color: #E4D6F0; text-decoration: none; font-weight: 500; font-size: var(--fs-14); }
.panel-nav__link .icon { color: #B9A2CF; }
.panel-nav__link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.panel-nav__link[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-lights); }
.panel-nav__link[aria-current="page"] .icon { color: var(--brand-lights); }
.panel-nav__link .counter { margin-left: auto; background: var(--brand-lights); color: #2B1A00; }
.panel-sidebar__foot { margin-top: auto; padding: var(--s-4) var(--s-5); border-top: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-14); }
.panel-sidebar__foot .avatar { --size: 36px; }
.panel-sidebar :focus-visible { outline-color: var(--brand-lights); }
.panel-sidebar__close { display: none; }

@media (max-width: 1023px) {
  .panel-sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 70; transform: translateX(-100%); transition: transform 220ms var(--ease); overflow-y: auto; }
  .panel-sidebar.is-open { transform: none; box-shadow: var(--shadow-3); }
  .panel-sidebar__close { display: inline-grid; color: #E4D6F0; margin-left: auto; }
  .panel-sidebar__head { display: flex; align-items: center; padding-right: var(--s-2); }
  .panel-scrim { position: fixed; inset: 0; z-index: 65; background: var(--c-overlay); }
}
@media (min-width: 1024px) {
  .panel-sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
  .panel-topbar__menu, .panel-scrim { display: none !important; }
}

.panel-main { min-width: 0; }
.panel-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s-2); min-height: 64px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--c-surface) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--c-border); }
.panel-topbar__title { font-size: var(--fs-18); font-family: var(--font-display); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-topbar__actions { margin-left: auto; display: flex; gap: var(--s-1); align-items: center; }
@media (max-width: 479px) {
  .panel-topbar__actions .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .panel-topbar__actions .btn { width: var(--tap); padding: 0; }
}
.panel-content { padding: var(--s-6) var(--gutter) var(--s-12); max-width: 1400px; }
.panel-content .page-head__title { font-size: var(--fs-30); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (min-width: 1100px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); } }
.stat-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-4); display: grid; gap: var(--s-1); align-content: start; min-width: 0; }
@media (min-width: 768px) { .stat-card { padding: var(--s-5); } }
.stat-card__label { font-size: var(--fs-14); color: var(--c-text-2); font-weight: 500; display: flex; align-items: center; gap: var(--s-2); }
.stat-card__label .icon { color: var(--c-text-3); width: 18px; height: 18px; }
.stat-card__value { font-family: var(--font-display); font-size: var(--fs-30); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: var(--s-1); }
.stat-card__trend { font-size: var(--fs-13); color: var(--c-text-3); }
.stat-card__trend b { font-weight: 600; }
.trend-up { color: var(--c-success); } .trend-down { color: var(--c-danger); }
.stat-card--attention { border-color: color-mix(in srgb, var(--brand-lights) 70%, var(--c-border)); background: color-mix(in srgb, var(--c-warning-soft) 60%, var(--c-surface)); }
.stat-card__spark { height: 36px; margin-top: var(--s-2); color: var(--c-primary); }
.stat-card__spark svg { width: 100%; height: 100%; }

.panel-grid { display: grid; gap: var(--s-6); margin-top: var(--s-6); }
@media (min-width: 1200px) { .panel-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }

.chart { display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; gap: 6px; height: 180px; padding-top: var(--s-2); }
.chart__bar { background: var(--c-primary); border-radius: 4px 4px 0 0; min-height: 4px; opacity: .85; position: relative; }
.chart__bar:hover { opacity: 1; }
.chart__bar--today { background: var(--c-accent); opacity: 1; }
.chart-axis { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; font-size: 11px; color: var(--c-text-3); text-align: center; margin-top: var(--s-2); font-variant-numeric: tabular-nums; }
.chart-axis span:nth-child(even) { visibility: hidden; }
@media (min-width: 768px) { .chart-axis span:nth-child(even) { visibility: visible; } }

.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-4); }
.filters .search { flex: 1 1 260px; }
.filters .select { width: auto; min-width: 0; flex: 1 1 140px; max-width: 220px; min-height: var(--tap); padding-block: 8px; }
.filters .input { min-height: var(--tap); padding-block: 8px; }

.status-tabs { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--s-4); border-bottom: 1px solid var(--c-border); }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs a { flex-shrink: 0; display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-3); text-decoration: none; color: var(--c-text-2); font-weight: 500; font-size: var(--fs-14); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.status-tabs a[aria-current="true"] { color: var(--c-text); border-bottom-color: var(--c-primary); font-weight: 600; }
.status-tabs .num { font-variant-numeric: tabular-nums; color: var(--c-text-3); font-weight: 500; }

.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3); margin-bottom: var(--s-3); border-radius: var(--r-md); background: var(--c-primary-soft); color: var(--c-primary-soft-text); font-size: var(--fs-14); font-weight: 600; }

.table-wrap { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow-x: auto; }
.table { width: 100%; font-size: var(--fs-14); }
.table th { text-align: left; font-weight: 600; color: var(--c-text-2); font-size: var(--fs-13); padding: var(--s-3) var(--s-4); background: var(--c-surface-2); white-space: nowrap; }
.table th:first-child { border-top-left-radius: var(--r-lg); }
.table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--c-border); vertical-align: middle; }
.table tbody tr:hover { background: color-mix(in srgb, var(--c-surface-2) 55%, transparent); }
.table tbody tr.is-selected { background: color-mix(in srgb, var(--c-primary-soft) 60%, transparent); }
.table__title { font-weight: 600; color: var(--c-text); text-decoration: none; display: block; line-height: 1.35; max-width: 44ch; }
.table__title:hover { color: var(--c-primary); }
.table__sub { font-size: var(--fs-13); color: var(--c-text-3); margin-top: 2px; display: flex; gap: 4px var(--s-3); flex-wrap: wrap; align-items: center; }
.table__sub > span { display: inline-flex; align-items: center; gap: 4px; }
.table__num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table__actions { text-align: right; white-space: nowrap; width: 1%; }
.table__check { width: 1%; padding-right: 0 !important; }
.table__check .check { min-height: 0; padding: 0; }
.table-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--c-border); font-size: var(--fs-14); color: var(--c-text-3); }
.table-foot .pagination { margin: 0; }

/* На телефоне таблица превращается в стопку карточек */
@media (max-width: 767px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { position: relative; padding: var(--s-4); padding-left: 52px; border-top: 1px solid var(--c-border); }
  .table--stack tbody tr:first-child { border-top: 0; }
  .table--stack td { border: 0; padding: 0; }
  .table--stack td + td { margin-top: var(--s-2); }
  .table--stack td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 96px; color: var(--c-text-3); font-size: var(--fs-13); }
  .table--stack .table__check { position: absolute; left: 14px; top: 12px; width: auto; }
  .table--stack .table__num { text-align: left; }
  .table--stack .table__actions { text-align: left; width: auto; margin-top: var(--s-3); }
}

.queue-item__files { display: inline-flex; align-items: center; gap: 4px; color: var(--c-text-3); }
.sender { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.sender__name { font-weight: 500; white-space: nowrap; }
.sender__anon { font-size: var(--fs-12); color: var(--c-text-3); }

.activity { list-style: none; padding: 0; display: grid; }
.activity li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); padding-block: var(--s-3); font-size: var(--fs-14); line-height: 1.45; }
.activity li + li { border-top: 1px solid var(--c-border); }
.activity time { display: block; color: var(--c-text-3); font-size: var(--fs-13); }

.detail-drawer { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-5); display: grid; gap: var(--s-4); }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); width: 100%; }
.note { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-warning-soft); font-size: var(--fs-14); color: var(--c-text); line-height: 1.5; }
.note__author { font-weight: 600; color: var(--c-warning-soft-text); font-size: var(--fs-13); }

/* 21. Утилиты ------------------------------------------------------------- */
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.w-full { width: 100%; }
.only-mobile { } @media (min-width: 960px) { .only-mobile { display: none !important; } }
.only-desktop { display: none !important; } @media (min-width: 960px) { .only-desktop { display: revert !important; } }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
