/* =====================================================================
   Кадры будущего, кабинет участника сезона 2026. Дизайн-система.
   Источник стиля: сайт кадры-будущего.рф (v2/site: main.css, landing.css, apply.css,
   spec/design_tokens.css). Те же цвета, градиент, шрифт Humanist 521, радиусы, бенто-карточки
   и поля формы как на /apply/. Описание классов: spec/30_design.md, живые примеры: web/_styleguide.html.

   Правила файла:
   - mobile-first: база = телефон 360-430, дальше @media (min-width: 720px) и (min-width: 1024px)
     (брейкпоинты spec/10_product.md, раздел 2.1);
   - чистый CSS без сборки, все пути относительные (кабинет живет под /kabinet-dev/);
   - цвета и отступы только через токены; компоненты берут локальные токены поверхности
     (--fg, --well, --track ...), поэтому одинаково работают на светлом фоне, белой, розовой,
     темной и градиентной карточке;
   - без text-transform: uppercase (правило текстов кабинета: без капса).
   ===================================================================== */

/* ---------- 1. Шрифты (self-hosted, как на сайте) ---------- */
@font-face { font-family: 'Humanist 521'; src: url('../fonts/Humanist521-Light.woff2') format('woff2');   font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Humanist 521'; src: url('../fonts/Humanist521-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Humanist 521'; src: url('../fonts/Humanist521-Bold.woff2') format('woff2');    font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- 2. Токены ---------- */
:root {
  /* палитра сайта (1:1 с main.css) */
  --c-bg: #F4EFE9;
  --c-surface: #FFFFFF;
  --c-surface-pink: #FBE3EC;
  --c-ink: #2B1F2C;
  --c-ink-2: #3A2B3C;
  --c-divider: #EEE8E1;
  --c-text: #2B1F2C;
  --c-text-soft: #5E5460;
  --c-text-muted: #756A73;
  --c-placeholder: #756A73;
  --c-on-dark-soft: #C9BFC7;
  --c-on-dark-muted: #A89CA6;
  --c-pink-text: #F6B9D0;
  --c-magenta-1: #EA4C6E;
  --c-magenta-2: #CC0E81;
  --c-magenta-hover: #B00B70;
  --grad-brand: linear-gradient(135deg, #EA4C6E, #CC0E81);
  --grad-line: linear-gradient(90deg, #EA4C6E, #CC0E81);
  --grad-flame: linear-gradient(0deg, #CC0E81 0%, #EA4C6E 58%, #F7A072 100%);

  /* статусы (дополнение кабинета; контраст текста к фону не ниже 4.5:1) */
  --c-ok: #1F7442;      --c-ok-bg: #E2F2E7;
  --c-warn: #8A4E00;    --c-warn-bg: #FBEAD2;
  --c-danger: #B00B70;  --c-danger-bg: #FBE3EC;

  /* цвета команд: по умолчанию как в сиде (spec/10_product.md 1.1); в кабинете цвет приходит из API
     (team.color, UserBrief.color) и ставится в style: --team / --avatar, текст поверх: KUI.teamVars(hex) */
  --team-1: #EA4C6E;
  --team-2: #7B3FE4;
  --team-3: #1F8A8A;
  --team-4: #E59A1A;

  /* полупрозрачности, тени, кольца */
  --a-ink-75: rgba(43,31,44,.75);
  --a-header-bg: rgba(244,239,233,.88);
  --ring-focus: 0 0 0 3px rgba(204,14,129,.85);
  --ring-error: 0 0 0 3px rgba(204,14,129,.45);
  --shadow-hover: 0 18px 40px rgba(43,31,44,.10);
  --shadow-hover-dark: 0 18px 40px rgba(43,31,44,.22);
  --shadow-segment: 0 2px 8px rgba(43,31,44,.12);
  --shadow-pop: 0 18px 40px rgba(43,31,44,.22);
  --shadow-bar: 0 12px 32px rgba(43,31,44,.28);
  --shadow-glow: 0 8px 22px rgba(204,14,129,.35);

  /* типографика */
  --font-sans: 'Humanist 521', 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fw-light: 300; --fw-regular: 400; --fw-bold: 700;
  --fs-display: 40px;  --ls-display: -1.5px;
  --fs-h1: 32px;       --ls-h1: -1px;
  --fs-h2: 24px;       --ls-h2: -.5px;
  --fs-h3: 20px;       --ls-h3: -.3px;
  --fs-lead: 18px;
  --fs-body: 16px;
  --fs-sm: 14px;
  --fs-xs: 13px;
  --fs-2xs: 12px;
  --fs-stat-xl: 56px;
  --fs-stat-l: 40px;
  --fs-stat-m: 28px;
  --lh-tight: .9; --lh-title: 1.1; --lh-body: 1.45; --lh-lead: 1.4;

  /* радиусы: телефон 28, планшет 32, десктоп 44 как на сайте */
  --r-card: 28px;
  --r-inner: 24px;
  --r-box: 24px;
  --r-row: 22px;
  --r-field: 18px;
  --r-seg: 14px;
  --r-icon-l: 16px;
  --r-icon-m: 14px;
  --r-icon-s: 12px;
  --r-icon-xs: 10px;
  --r-check: 9px;
  --r-pill: 999px;

  /* отступы: шкала 4px */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;
  --sp-7: 28px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* сетка */
  --container: 1280px;
  --gutter: 16px;
  --grid-gap: 12px;
  --pad-card: 20px;
  --pad-card-s: 16px;
  --page-gap: 24px;
  --appbar-h: 56px;
  --tabbar-h: 64px;
  --tabbar-space: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px));
  --sidenav-w: 264px;

  /* движение */
  --t-fast: all .2s ease;
  --t-hover: transform .35s ease, box-shadow .35s ease;
  --ease-out: cubic-bezier(.2,.8,.2,1);

  /* слои */
  --z-appbar: 50; --z-tabbar: 60; --z-toast: 80;

  /* ===== локальные токены поверхности: светлая страница (фон #F4EFE9) ===== */
  --fg: var(--c-text);
  --fg-soft: var(--c-text-soft);
  --fg-muted: var(--c-text-muted);
  --well: var(--c-surface);              /* «утопленные» элементы: поля, строки, чипы */
  --well-hover: var(--c-surface-pink);
  --line: rgba(43,31,44,.10);
  --line-strong: rgba(43,31,44,.22);
  --track: rgba(43,31,44,.08);           /* фон прогресс-баров, неактивные точки */
  --bar-a: var(--c-magenta-1);           /* заливка прогресса: начало и конец градиента */
  --bar-b: var(--c-magenta-2);
  --accent-bg: var(--grad-brand);        /* плитки, акцентные бейджи, пройденные этапы */
  --accent-fg: #FFFFFF;
  --accent-text: var(--c-magenta-2);     /* акцентный текст и ссылки */
  --inv-bg: var(--c-ink);                /* инверсия: темное на светлом, светлое на темном */
  --inv-fg: #FFFFFF;
  --me-bg: var(--c-surface-pink);        /* строка «это ты» в рейтингах */
  --wm-color: rgba(43,31,44,.05);        /* водяной знак КШ */
  --skel: #E9E2DA;                       /* скелетон: серые блоки с мягкой пульсацией */
  --seg-bg: #EAE2D9;                     /* дорожка сегмент-контрола */
  --placeholder: var(--c-placeholder);
  --ring: var(--ring-focus);
  --focus-gap: var(--c-bg);              /* зазор между кнопкой и кольцом фокуса = цвет поверхности */
}

@media (min-width: 720px) {
  :root {
    --gutter: 24px;
    --grid-gap: 16px;
    --pad-card: 24px;
    --pad-card-s: 20px;
    --page-gap: 28px;
    --r-card: 32px;
    --r-inner: 28px;
    --fs-display: 56px;  --ls-display: -2px;
    --fs-h1: 36px;       --ls-h1: -1.5px;
    --fs-h2: 26px;
    --fs-h3: 22px;
    --fs-lead: 20px;
    --fs-stat-xl: 72px;
    --fs-stat-l: 44px;
    --fs-stat-m: 32px;
  }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; --r-card: 44px; --pad-card: 32px; --page-gap: 32px; --fs-display: 64px; --fs-h1: 40px; }
}

/* ---------- 3. Поверхности ----------
   Светлая страница задана в :root. Белая карточка, розовая, темная и градиентная
   переопределяют локальные токены, и все вложенные компоненты подстраиваются сами. */
.card, .s-white, .lesson, .task, .sidenav, .tabbar {
  --well: var(--c-bg);
  --well-hover: var(--c-surface-pink);
  --line: var(--c-divider);
  --skel: var(--c-divider);
  --seg-bg: var(--c-bg);
  --focus-gap: var(--c-surface);
}
.card--pink, .s-pink {
  --fg-muted: #685C66;
  --well: var(--c-surface);
  --well-hover: rgba(255,255,255,.7);
  --line: rgba(204,14,129,.14);
  --line-strong: rgba(204,14,129,.3);
  --track: rgba(204,14,129,.14);
  --accent-text: var(--c-magenta-hover);
  --me-bg: var(--c-surface);
  --skel: rgba(255,255,255,.7);
  --seg-bg: rgba(255,255,255,.55);
  --focus-gap: var(--c-surface-pink);
}
.card--dark, .s-dark, .lesson--hero, .toast {
  --fg: #FFFFFF;
  --fg-soft: var(--c-on-dark-soft);
  --fg-muted: var(--c-on-dark-muted);
  --well: rgba(255,255,255,.08);
  --well-hover: rgba(255,255,255,.14);
  --line: rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.3);
  --track: rgba(255,255,255,.15);
  --accent-text: var(--c-pink-text);
  --inv-bg: #FFFFFF;
  --inv-fg: var(--c-ink);
  --me-bg: rgba(234,76,110,.24);
  --wm-color: rgba(255,255,255,.06);
  --skel: rgba(255,255,255,.10);
  --seg-bg: rgba(255,255,255,.08);
  --placeholder: var(--c-on-dark-muted);
  --ring: 0 0 0 3px var(--c-pink-text);
  --focus-gap: var(--c-ink);
}
.card--grad, .s-grad {
  --fg: #FFFFFF;
  --fg-soft: rgba(255,255,255,.92);
  --fg-muted: rgba(255,255,255,.86);
  --well: rgba(255,255,255,.16);
  --well-hover: rgba(255,255,255,.24);
  --line: rgba(255,255,255,.25);
  --line-strong: rgba(255,255,255,.5);
  --track: rgba(255,255,255,.28);
  --bar-a: #FFFFFF;
  --bar-b: #FFFFFF;
  --accent-bg: #FFFFFF;
  --accent-fg: var(--c-magenta-2);
  --accent-text: #FFFFFF;
  --inv-bg: #FFFFFF;
  --inv-fg: var(--c-magenta-2);
  --me-bg: rgba(255,255,255,.22);
  --wm-color: rgba(255,255,255,.16);
  --skel: rgba(255,255,255,.2);
  --seg-bg: rgba(255,255,255,.16);
  --placeholder: rgba(255,255,255,.8);
  --ring: 0 0 0 3px #FFFFFF;
  --focus-gap: var(--c-magenta-2);
}
/* целая страница на темной поверхности (экран QR на проекторе и т.п.): <body class="s-dark"> */
body.s-dark { background: var(--c-ink); color: #FFFFFF; --a-header-bg: rgba(43,31,44,.88); }

/* цвет команды и аватара. Из API: style="--team:#7B3FE4" (team.color) и style="--avatar:#7B3FE4" (UserBrief.color).
   --team: исходный цвет для полос, точек и столбиков. --team-strong: «плотный» оттенок для заливок с мелким
   текстом (аватары, бейджи, плитки): KUI.teamVars(hex) затемняет цвет, пока белый текст не даст 4.5:1
   (WCAG AA), или оставляет цвет с темным текстом, если тот читается. --team-fg: цвет текста на --team-strong.
   Для статичной разметки и примеров: data-team="1..4" (цвета сида). */
[data-team="1"] { --team: var(--team-1); --team-strong: #CE4361; --team-fg: #FFFFFF; }
[data-team="2"] { --team: var(--team-2); --team-strong: var(--team-2); --team-fg: #FFFFFF; }
[data-team="3"] { --team: var(--team-3); --team-strong: #1D8383; --team-fg: #FFFFFF; }
[data-team="4"] { --team: var(--team-4); --team-strong: var(--team-4); --team-fg: var(--c-ink); }  /* янтарный: белый 2.3:1, темный 6.7:1 */
.team-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--team, var(--c-magenta-2)); flex: none; }

/* ---------- 4. База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--appbar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--c-bg); color: var(--c-text);
  font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--c-magenta-hover); }
.card--dark a:not([class]):hover, .s-dark a:not([class]):hover { color: #FFFFFF; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
svg { display: block; }
input, textarea, button, select { font-family: inherit; font-size: inherit; color: inherit; margin: 0; }
button { cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { float: left; width: 100%; padding: 0; margin: 0; }
hr, .divider { border: 0; height: 1px; background: var(--line); margin: 0; width: 100%; }
:focus-visible { outline: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible { box-shadow: var(--ring); }
a:not([class]):focus-visible { border-radius: 4px; }
.sr-only, .vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
[hidden] { display: none !important; }

/* ---------- 5. Типографика ---------- */
.t-display { font-weight: 700; font-size: var(--fs-display); line-height: .92; letter-spacing: var(--ls-display); }
.t-h1 { font-weight: 700; font-size: var(--fs-h1); line-height: 1; letter-spacing: var(--ls-h1); }
.t-h2 { font-weight: 700; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: var(--ls-h2); }
.t-h3 { font-weight: 700; font-size: var(--fs-h3); line-height: var(--lh-title); letter-spacing: var(--ls-h3); }
.t-lead { font-weight: 300; font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--fg-soft); }
.card--dark .t-lead, .s-dark .t-lead { color: var(--c-pink-text); }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-sm { font-size: var(--fs-sm); line-height: 1.4; }
.t-xs { font-size: var(--fs-xs); line-height: 1.35; }
.t-soft { color: var(--fg-soft); }
.t-muted { color: var(--fg-muted); }
.t-accent { color: var(--accent-text); }
.t-bold { font-weight: 700; }
.t-num { font-variant-numeric: tabular-nums; }
.t-center { text-align: center; }
.t-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
/* Кикер. На сайте он в верхнем регистре; в кабинете без капса: строчный, с точкой-акцентом */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 400; font-size: var(--fs-xs); line-height: 1.2; letter-spacing: .2px; color: var(--fg-muted);
}
.kicker--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bg); flex: none; }

/* ---------- 6. Раскладка: шапка, полоса стенда, боковое меню, оболочка, страница, бенто ----------
   Телефон и планшет (до 1023): шапка .appbar сверху (56px) + таб-бар .tabbar снизу.
   Десктоп (от 1024): боковое меню .sidenav слева (264px), шапки и таб-бара нет, заголовок экрана .page-title в контенте. */
.appbar {
  position: sticky; top: 0; z-index: var(--z-appbar);
  background: var(--a-header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  padding-top: env(safe-area-inset-top, 0px);
}
.appbar__in {
  max-width: var(--container); margin: 0 auto; min-height: var(--appbar-h);
  padding: 6px var(--gutter); display: flex; align-items: center; gap: 8px;
}
.appbar__title { flex: 1; min-width: 0; font-weight: 700; font-size: 20px; line-height: 1.15; letter-spacing: -.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar__right { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.appbar__back {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; margin-left: -6px; border-radius: 50%;
  color: var(--c-text); background: transparent; border: 0; transition: background .2s ease;
}
.appbar__back:hover { background: var(--c-surface); color: var(--c-text); }
.appbar__back .icon { width: 24px; height: 24px; }
@media (min-width: 1024px) { .appbar { display: none; } .appbar.appbar--keep { display: block; } }

/* полоса демо-стенда под шапкой (DEV_MODE) */
.devbar {
  background: var(--c-surface-pink); color: var(--c-magenta-hover);
  font-size: var(--fs-xs); line-height: 1.35; text-align: center; padding: 6px var(--gutter);
}
.devbar b { font-weight: 700; }

/* логотип: знак (как favicon.svg) + название */
.brand { display: flex; align-items: center; gap: 10px; color: var(--c-text); min-width: 0; }
.brand:hover { color: var(--c-text); }
.brand__tile {
  width: 40px; height: 40px; border-radius: var(--r-icon-s); background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand__tile svg { width: 20px; height: 18px; fill: #FFFFFF; color: #FFFFFF; }
.brand__name { font-weight: 700; font-size: 18px; line-height: 1.05; white-space: nowrap; }
.brand__cap { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: 3px; white-space: nowrap; }

/* чипы в шапке: стрик и очки (тап открывает «Ачивки и стрик») */
.stat-chip, .streak-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 44px; padding: 0 14px 0 11px; border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-ink); font-weight: 700; font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums;
  white-space: nowrap; transition: background .2s ease;
}
.stat-chip:hover, .streak-pill:hover { background: var(--c-surface-pink); color: var(--c-ink); }
.stat-chip small { font-weight: 400; font-size: var(--fs-xs); color: var(--c-text-muted); }
.stat-chip .icon { width: 18px; height: 18px; color: var(--c-magenta-2); }
/* узкий телефон: в шапке только стрик, очки видны на «Сегодня» и в рейтинге */
@media (max-width: 399px) { .stat-chip { display: none; } .appbar__title { font-size: 18px; } }

/* боковое меню (от 1024) */
.sidenav { display: none; }
@media (min-width: 1024px) {
  .sidenav {
    position: sticky; top: 0; flex: none; width: var(--sidenav-w); height: 100vh; height: 100dvh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 16px; padding: 24px 16px 20px;
    background: var(--c-surface); color: var(--c-text); border-right: 1px solid var(--c-divider);
  }
}
.sidenav__brand { padding: 0 8px; }
.sidenav__stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  background: var(--c-surface-pink); border-radius: var(--r-field); padding: 12px 10px; text-align: center; color: var(--c-ink);
}
.sidenav__stats b { display: flex; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.sidenav__stats span { display: block; font-size: 12px; color: #685C66; margin-top: 4px; }
.sidenav__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidenav__link {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px; border-radius: 14px;
  color: var(--c-text); font-size: 15px; line-height: 1.2; transition: background .2s ease;
}
.sidenav__link .icon { width: 22px; height: 22px; color: var(--c-text-muted); }
.sidenav__link:hover { background: var(--c-bg); color: var(--c-text); }
.sidenav__link[aria-current="page"] { background: var(--c-surface-pink); color: var(--c-magenta-2); font-weight: 700; }
.sidenav__link[aria-current="page"] .icon { color: var(--c-magenta-2); }
.sidenav__link .count { margin-left: auto; }
.sidenav__link:focus-visible { box-shadow: var(--ring-focus); border-radius: 14px; }
.sidenav__sep { height: 1px; background: var(--c-divider); margin: 6px 12px; }
.sidenav__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid var(--c-divider); }
.sidenav__user { flex: 1; min-width: 0; }
.sidenav__name { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav__role { font-size: 12px; color: var(--c-text-muted); }

/* оболочка: на телефоне колонка с запасом под таб-бар; на десктопе меню + контент */
.shell { padding: 12px var(--gutter) var(--tabbar-space); }
.page { display: flex; flex-direction: column; gap: var(--page-gap); min-width: 0; width: 100%; max-width: var(--container); margin: 0 auto; }
@media (min-width: 1024px) {
  .shell { display: flex; align-items: flex-start; padding: 0; }
  .shell > .page { flex: 1; padding: 32px var(--gutter) 56px; max-width: calc(var(--container) + 2 * var(--gutter)); }
}
.page-title { display: none; font-weight: 700; font-size: 32px; line-height: 1.05; letter-spacing: -1px; }
@media (min-width: 1024px) { .page-title { display: block; } }
.page-head { display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 0; }
.page-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; }
.sec-head__title { font-weight: 700; font-size: 20px; line-height: 1.1; letter-spacing: -.4px; }
.sec-head__link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.sec-head__link .icon { width: 16px; height: 16px; }
@media (min-width: 720px) { .sec-head__title { font-size: 24px; } }
/* заголовок дня в расписании: «Сегодня, пт, 23 октября» */
.day-head { font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--c-text); padding: 8px 4px 0; }
.day-head small { font-weight: 400; color: var(--c-text-muted); font-size: inherit; }

/* Бенто-сетка: телефон 2 колонки (все на всю ширину, .is-half = половина),
   >=720: 6 колонок (по умолчанию на всю, .md-3 = половина, .md-2/.md-4), >=1024: .lg-2 = треть, .lg-4 = две трети, .lg-3, .lg-6 */
.bento { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
.bento > * { grid-column: 1 / -1; min-width: 0; }
.bento > .is-half { grid-column: span 1; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bento > * { grid-column: span 6; }
  .bento > .is-half { grid-column: span 3; }
  .bento > .md-2 { grid-column: span 2; }
  .bento > .md-3 { grid-column: span 3; }
  .bento > .md-4 { grid-column: span 4; }
  .bento > .md-6 { grid-column: span 6; }
}
@media (min-width: 1024px) {
  .bento > .lg-2 { grid-column: span 2; }
  .bento > .lg-3 { grid-column: span 3; }
  .bento > .lg-4 { grid-column: span 4; }
  .bento > .lg-6 { grid-column: span 6; }
}
/* «Сегодня»: в DOM война команд сразу после стрика (так ее видит телефон и скринридер),
   на десктопе ряд 3 по spec/10_product.md 5.1: война команд и ближайшая ачивка после заданий, объявлений и фильма */
@media (min-width: 1024px) {
  .today-bento > .today-war, .today-bento > .today-ach { order: 1; }
}
.today-war__sub { margin-top: 4px; }

/* утилиты раскладки */
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); min-width: 0; }
.stack--s { --gap: 8px; }
.stack--l { --gap: 20px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 8px); }
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.mt-auto { margin-top: auto; }
@media (max-width: 1023.98px) { .hide-mobile { display: none !important; } }
@media (min-width: 1024px) { .hide-desktop { display: none !important; } }

/* ---------- 7. Карточки ---------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: var(--card-gap, 16px); min-width: 0;
  padding: var(--pad-card); border-radius: var(--r-card);
  background: var(--c-surface); color: var(--fg);
}
.card--pink { background: var(--c-surface-pink); }
.card--dark { background: var(--c-ink); }
.card--grad { background: var(--grad-brand); }
.card--well { background: var(--c-bg); --well: var(--c-surface); --focus-gap: var(--c-bg); }
.card--s { padding: var(--pad-card-s); border-radius: var(--r-inner); --card-gap: 12px; }
.card--flush { padding: 0; overflow: hidden; }
.card--center { align-items: center; text-align: center; }
.card--link { color: var(--fg); transition: var(--t-hover); cursor: pointer; }
.card--link:hover { color: var(--fg); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card--dark.card--link:hover { box-shadow: var(--shadow-hover-dark); }
a.card:focus-visible, .card--link:focus-visible { box-shadow: var(--ring); border-radius: var(--r-card); }
/* водяной знак КШ, как на темных и градиентных плитках сайта; место и размер: --wm-w, --wm-r, --wm-b/--wm-t */
.card--wm { overflow: hidden; isolation: isolate; }
.card--wm::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: var(--wm-w, 320px); aspect-ratio: 819 / 752;
  right: var(--wm-r, -110px); bottom: var(--wm-b, -100px); top: var(--wm-t, auto);
  background: var(--wm-color);
  -webkit-mask: url('../brand/ksh.svg') center / contain no-repeat; mask: url('../brand/ksh.svg') center / contain no-repeat;
}
.card--wm-top { --wm-t: -90px; --wm-b: auto; }
/* полоса слева убрана по решению Фархада 16.10: цвет команды остается в точках этапов и аватарах */
.has-stripe { position: relative; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.card__title { font-weight: 700; font-size: var(--fs-h3); line-height: var(--lh-title); letter-spacing: var(--ls-h3); }
.card__title--l { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: var(--ls-h2); }
.card__text { font-size: 15px; line-height: var(--lh-body); color: var(--fg-soft); }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); color: var(--accent-text); }
.card__more .icon { width: 16px; height: 16px; }

/* крупные цифры, как .stat-xl/.stat-l сайта */
.stat { font-weight: 700; font-size: var(--fs-stat-xl); line-height: .85; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.stat--l { font-size: var(--fs-stat-l); line-height: .9; letter-spacing: -1px; }
.stat--m { font-size: var(--fs-stat-m); line-height: .95; letter-spacing: -.5px; }
.stat__unit { font-size: .42em; letter-spacing: 0; margin-left: 4px; }
.stat__cap { font-size: 15px; line-height: 1.35; color: var(--fg-soft); margin-top: 10px; }

/* плитка: квадрат с иконкой или цифрой (лого-плитка, номер шага, иконка ачивки) */
.tile {
  --tile: 44px; width: var(--tile); height: var(--tile); border-radius: var(--r-icon-m); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent-fg);
  font-weight: 700; font-size: calc(var(--tile) * .4); line-height: 1; font-variant-numeric: tabular-nums;
}
.tile .icon { width: 50%; height: 50%; }
.tile--s { --tile: 32px; border-radius: var(--r-icon-xs); }
.tile--m { --tile: 40px; border-radius: var(--r-icon-s); }
.tile--l { --tile: 52px; border-radius: var(--r-icon-l); }
.tile--xl { --tile: 64px; border-radius: 20px; }
.tile--soft { background: var(--c-surface-pink); color: var(--c-magenta-2); }
.tile--white { background: #FFFFFF; color: var(--c-magenta-2); }
.tile--ink { background: var(--c-ink); color: #FFFFFF; }
.tile--well { background: var(--well); color: var(--fg); }
.tile--team, .team-tile { background: var(--team-strong, var(--team, var(--grad-brand))); color: var(--team-fg, #FFFFFF); }

/* ---------- 8. Иконки (assets/icons/sprite.svg) ---------- */
.icon {
  width: 24px; height: 24px; flex: none; display: block;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon--xs { width: 14px; height: 14px; }
.icon--s { width: 16px; height: 16px; }
.icon--m { width: 20px; height: 20px; }
.icon--l { width: 28px; height: 28px; }
.icon--xl { width: 32px; height: 32px; }
.icon--ksh { width: 22px; height: 20px; stroke: none; fill: currentColor; }

/* ---------- 9. Кнопки (как на сайте: пилюля 52px, градиент, белая, призрачная) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 28px; border: 0; border-radius: var(--r-pill);
  font-family: inherit; font-weight: 700; font-size: 17px; line-height: 1.2; text-align: center; white-space: nowrap;
  color: #FFFFFF; background: var(--grad-brand); text-decoration: none; cursor: pointer;
  transition: filter .2s ease, background .2s ease, color .2s ease, transform .1s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { color: #FFFFFF; filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--focus-gap), 0 0 0 6px rgba(204,14,129,.85); border-radius: var(--r-pill); }
.card--dark .btn:focus-visible, .s-dark .btn:focus-visible, .card--grad .btn:focus-visible { box-shadow: 0 0 0 3px var(--focus-gap), 0 0 0 6px #FFFFFF; }
.btn .icon { width: 20px; height: 20px; }
.btn--lg { min-height: 56px; padding: 16px 32px; font-size: 18px; }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; gap: 6px; }
.btn--sm .icon { width: 18px; height: 18px; }
.btn--block { width: 100%; }
/* в формах на телефоне основная кнопка во всю ширину */
@media (max-width: 719.98px) { .form .btn:not(.btn--sm):not(.btn--text):not(.btn--icon), .btn--block-m { width: 100%; } }
.btn--secondary { background: var(--c-surface); color: var(--c-ink); font-weight: 400; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--secondary:hover { background: var(--c-surface); color: var(--c-magenta-2); filter: none; box-shadow: inset 0 0 0 1.5px var(--c-magenta-2); }
.btn--danger { background: transparent; color: var(--c-magenta-2); box-shadow: inset 0 0 0 1.5px var(--c-magenta-2); }
.btn--danger:hover { background: var(--c-surface-pink); color: var(--c-magenta-hover); filter: none; }
.card--dark .btn--danger, .s-dark .btn--danger { color: var(--c-pink-text); box-shadow: inset 0 0 0 1.5px var(--c-pink-text); }
.btn--soft { background: var(--well); color: var(--fg); font-weight: 400; }
.btn--soft:hover { background: var(--well-hover); color: var(--fg); filter: none; }
.btn--white { background: #FFFFFF; color: var(--c-magenta-2); }
.btn--white:hover { color: var(--c-magenta-hover); filter: none; }
.btn--ghost { background: rgba(255,255,255,.12); color: #FFFFFF; font-weight: 400; }
.btn--ghost:hover { background: rgba(255,255,255,.2); filter: none; }
.btn--ink { background: var(--c-ink); color: #FFFFFF; }
.btn--ink:hover { background: var(--c-ink-2); filter: none; }
.btn--outline { background: transparent; color: var(--fg); font-weight: 400; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--outline:hover { background: var(--well); filter: none; color: var(--fg); }
.btn--text { background: transparent; color: var(--accent-text); min-height: 44px; padding: 8px 10px; }
.btn--text:hover { background: var(--well); color: var(--accent-text); filter: none; }
.btn--icon { width: 52px; padding: 0; }
.btn--icon.btn--sm { width: 44px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: none; transform: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--spin, #FFFFFF); border-right-color: transparent; animation: k-spin .7s linear infinite;
}
.btn--soft.is-loading, .btn--outline.is-loading, .btn--text.is-loading, .btn--secondary.is-loading, .btn--danger.is-loading, .btn--white.is-loading { --spin: var(--c-magenta-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row--stack { flex-direction: column; }
.btn-row--stack > .btn { width: 100%; }
/* действия, закрепленные над таб-баром (проверка работы куратором и т.п.) */
.action-bar {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px); z-index: 5;
  display: flex; gap: 8px; padding: 10px; border-radius: var(--r-row);
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-hover);
}
.action-bar > .btn { flex: 1; }
@media (min-width: 1024px) { .action-bar { bottom: 16px; } }
@keyframes k-spin { to { transform: rotate(360deg); } }

/* ---------- 10. Поля формы (как на /apply/) ---------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-weight: 400; font-size: var(--fs-xs); color: var(--fg-muted); padding-left: 6px; }
.field__hint { font-size: var(--fs-xs); line-height: 1.35; color: var(--fg-muted); padding-left: 6px; }
.field-error { font-size: var(--fs-xs); line-height: 1.3; color: var(--c-magenta-2); padding-left: 6px; }
.card--dark .field-error, .s-dark .field-error { color: var(--c-pink-text); }
.field-error:empty { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2 > .field--wide { grid-column: 1 / -1; } }

.input, .textarea, .select {
  display: block; width: 100%; border: 0; border-radius: var(--r-field);
  background: var(--well); color: var(--fg);
  padding: 16px 18px; font-size: 17px; line-height: 1.25;
  outline: none; transition: box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
.input:focus, .textarea:focus, .select:focus { box-shadow: var(--ring); }
.input--lg { font-size: 18px; padding: 18px 20px; }
.textarea { line-height: 1.45; resize: vertical; min-height: 128px; }
.select {
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%), linear-gradient(135deg, var(--fg) 50%, transparent 50%);
  background-position: calc(100% - 24px) 26px, calc(100% - 18px) 26px;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: 44px; cursor: pointer;
}
.select.is-empty { color: var(--placeholder); }
.select option { color: var(--c-ink); }
.input[disabled], .textarea[disabled], .select[disabled] { opacity: .55; cursor: not-allowed; }
/* только поля: у ввода кода кольцо рисуют ячейки, корень .otp рамку не получает */
.input.is-invalid, .textarea.is-invalid, .select.is-invalid { box-shadow: var(--ring-error); }
.otp.is-invalid { box-shadow: none; }
.input-wrap { position: relative; }
.input-wrap > .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--fg-muted); pointer-events: none; }
.input-wrap > .input { padding-left: 46px; }

/* сегмент-контрол (как возраст/класс в заявке); работает внутри карточки */
.seg { display: flex; background: var(--seg-bg); border-radius: var(--r-field); padding: 4px; gap: 4px; }
.seg--scroll { overflow-x: auto; scrollbar-width: none; }
.seg--scroll::-webkit-scrollbar { display: none; }
.seg--scroll .seg__label { flex: 1 0 auto; }
.seg__label {
  flex: 1 1 auto; min-width: 0; min-height: 44px; border-radius: var(--r-seg); padding: 8px 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  font-size: 15px; line-height: 1.2; color: var(--fg); cursor: pointer; transition: var(--t-fast); user-select: none;
}
button.seg__label { border: 0; background: transparent; font-family: inherit; }
.seg__label .count { margin-left: 2px; }
.seg__label .icon { width: 18px; height: 18px; flex: none; }
@media (max-width: 359.98px) { .seg__label .icon { display: none; } }
.seg__label:hover { color: var(--accent-text); }
.seg input:checked + .seg__label, .seg__label[aria-selected="true"], .seg__label[aria-pressed="true"] { background: var(--c-surface); color: var(--c-magenta-2); font-weight: 700; box-shadow: var(--shadow-segment); }
.seg input:focus-visible + .seg__label, button.seg__label:focus-visible { box-shadow: var(--ring); border-radius: var(--r-seg); }

/* чипы-переключатели (как направления в заявке) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 16px; line-height: 1.2; color: var(--fg);
  background: var(--well); border-radius: var(--r-pill); padding: 11px 18px;
  cursor: pointer; transition: var(--t-fast); user-select: none;
}
button.chip { border: 0; font-family: inherit; }
.chip:hover { color: var(--accent-text); }
.chips input:checked + .chip, .chip[aria-pressed="true"] { background: var(--grad-brand); color: #FFFFFF; font-weight: 700; }
.chips input:focus-visible + .chip { box-shadow: var(--ring); }
.chip--accent { font-weight: 700; color: var(--c-magenta-2); background: var(--c-surface-pink); }

/* чекбокс согласия (как в заявке) */
.consent { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check {
  width: 28px; height: 28px; border-radius: var(--r-check); flex: none; position: relative;
  background: var(--well); transition: var(--t-fast);
}
.check::after {
  content: ""; position: absolute; inset: 7px; background: #FFFFFF; opacity: 0; transform: scale(.6); transition: var(--t-fast);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
input:checked + .check, .consent input:checked ~ .check { background: var(--grad-brand); }
input:checked + .check::after, .consent input:checked ~ .check::after { opacity: 1; transform: none; }
input:focus-visible + .check { box-shadow: var(--ring); }
.check.is-invalid { box-shadow: var(--ring-error); }
.consent__text { font-size: var(--fs-sm); line-height: 1.45; color: var(--fg-soft); padding-top: 3px; }
.consent__text a { text-decoration: underline; text-decoration-color: rgba(204,14,129,.35); text-underline-offset: 2px; }

/* переключатель (согласия и настройки в профиле) */
.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer;
  background: var(--well); border-radius: var(--r-row); padding: 14px 16px; min-height: 64px;
}
.switch__text { display: block; min-width: 0; }
.switch__title { display: block; font-weight: 700; font-size: 16px; line-height: 1.25; }
.switch__hint { display: block; font-size: var(--fs-xs); color: var(--fg-muted); margin-top: 2px; }
.switch__track {
  position: relative; width: 50px; height: 30px; border-radius: var(--r-pill); flex: none;
  background: var(--line-strong); transition: background .2s ease;
}
.switch__track::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 4px rgba(43,31,44,.25); transition: transform .2s var(--ease-out);
}
.switch input:checked + .switch__track { background: var(--grad-brand); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }
.switch input:disabled + .switch__track { opacity: .5; }

/* загрузка файла (сдача задания файлом) */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 24px 16px; border-radius: var(--r-box); border: 2px dashed var(--line-strong);
  color: var(--fg-soft); cursor: pointer; transition: border-color .2s ease, background .2s ease;
}
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--c-magenta-2); background: var(--well); }
.dropzone:focus-within { box-shadow: var(--ring); }
.dropzone__title { font-weight: 700; font-size: 16px; color: var(--fg); }
.dropzone__hint { font-size: var(--fs-xs); color: var(--fg-muted); }
.file-chip {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--well); border-radius: var(--r-field); padding: 10px 8px 10px 12px;
}
.file-chip__name { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip__size { font-size: var(--fs-xs); color: var(--fg-muted); flex: none; }
/* файлы сдачи списком (схема 17): как страницы скана согласия, превью фото 44 точки */
.file-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; align-self: stretch; min-width: 0; }
.file-row { display: flex; align-items: center; gap: 10px; min-width: 0; background: var(--well); border-radius: var(--r-field); padding: 6px 4px 6px 6px; }
.file-row__thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--c-surface); color: var(--fg-soft); }
.file-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; padding: 2px 0; }
.file-row__body:hover .file-row__name { text-decoration: underline; }
.file-row__name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__size { font-size: var(--fs-xs); color: var(--fg-muted); }
.file-list + .dropzone, .file-list + .t-xs { margin-top: 8px; }

/* ---------- 11. Ввод 6-значного кода (JS: assets/js/kabinet-ui.js, data-otp) ----------
   Одно настоящее поле на 6 цифр (spec/10_product.md, раздел 4: inputmode=numeric, autocomplete=one-time-code, maxlength=6),
   поверх которого нарисованы 6 ячеек. Вставка, автозаполнение кода из письма и Backspace работают нативно,
   ячейки показывают цифры и активную позицию. */
.otp { position: relative; width: 100%; max-width: 392px; }
.otp__input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  opacity: 0; color: transparent; caret-color: transparent; background: transparent;
  font-size: 16px; /* не меньше 16, иначе iOS увеличивает страницу при фокусе */
  cursor: text; -webkit-appearance: none; appearance: none;
}
.otp__cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; pointer-events: none; }
.otp__cell {
  position: relative; height: 60px; border-radius: var(--r-field);
  display: flex; align-items: center; justify-content: center;
  background: var(--well); color: var(--fg);
  font-weight: 700; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums;
  transition: box-shadow .15s ease, background .15s ease;
}
.otp__cell.is-filled { background: var(--c-surface-pink); color: var(--c-ink); }
.card--dark .otp__cell.is-filled, .s-dark .otp__cell.is-filled { background: rgba(255,255,255,.18); color: #FFFFFF; }
.otp.is-focused .otp__cell.is-active { box-shadow: var(--ring); }
.otp.is-focused .otp__cell.is-active:not(.is-filled)::after {
  content: ""; width: 2px; height: 28px; border-radius: 1px; background: var(--c-magenta-2); animation: k-blink 1s steps(1) infinite;
}
.card--dark .otp.is-focused .otp__cell.is-active:not(.is-filled)::after, .s-dark .otp.is-focused .otp__cell.is-active:not(.is-filled)::after { background: var(--c-pink-text); }
.otp.is-invalid .otp__cell { box-shadow: var(--ring-error); }
.otp.is-invalid .otp__cells { animation: k-shake .4s ease; }
.otp.is-success .otp__cell { background: var(--c-ok-bg); color: var(--c-ok); }
.otp.is-busy { opacity: .6; pointer-events: none; }
.otp-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--fg-muted); }
@media (min-width: 400px) { .otp__cells { gap: 10px; } .otp__cell { height: 64px; font-size: 30px; } }
@keyframes k-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes k-blink { 50% { opacity: 0; } }

/* плашка демо-режима (DEV_MODE=1): «Демо: код 042517» + «Подставить» */
.devnote {
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  background: var(--c-surface-pink); color: var(--c-ink); border-radius: var(--r-field); padding: 8px 8px 8px 14px;
  font-size: var(--fs-sm);
}
.devnote__text { flex: 1; min-width: 0; }
.devnote__code { font-weight: 700; font-size: 18px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.devnote .btn { flex: none; }

/* ---------- 12. Бейджи, счетчики, очки, аватары ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-xs); line-height: 1.2; white-space: nowrap;
  background: var(--well); color: var(--fg-soft);
}
.badge .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.badge--accent { background: var(--accent-bg); color: var(--accent-fg); }
.badge--soft { background: var(--c-surface-pink); color: var(--c-magenta-hover); }
.card--pink .badge--soft, .s-pink .badge--soft, .card--pink .pts--chip, .s-pink .pts--chip { background: var(--c-surface); }
.badge--dark { background: var(--inv-bg); color: var(--inv-fg); }
.badge--ok { background: var(--c-ok-bg); color: var(--c-ok); }
.badge--warn { background: var(--c-warn-bg); color: var(--c-warn); }
.badge--danger { background: var(--c-danger-bg); color: var(--c-danger); }
.badge--outline { background: var(--c-surface); color: var(--c-ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.badge--magenta { background: var(--c-magenta-2); color: #FFFFFF; }
.badge--green { background: #237F47; color: #FFFFFF; }
.badge--dashed { background: transparent; color: var(--fg-soft); box-shadow: none; outline: 1.5px dashed var(--line-strong); outline-offset: -1.5px; }
.badge--team { background: var(--team-strong, var(--team, var(--grad-brand))); color: var(--team-fg, #FFFFFF); }
.badge--lg { padding: 9px 16px; font-size: var(--fs-sm); }
.badge--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.count {
  display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--c-magenta-2); color: #FFFFFF; font-weight: 700; font-size: 12px; line-height: 20px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.count--dot { min-width: 10px; width: 10px; height: 10px; padding: 0; }

.pts { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pts .icon { width: 16px; height: 16px; }
.pts--chip { background: var(--c-surface-pink); color: var(--c-magenta-hover); border-radius: var(--r-pill); padding: 6px 12px 6px 9px; font-size: var(--fs-sm); }
.pts--minus { color: var(--fg-muted); }

.avatar {
  --size: 40px; position: relative; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--avatar, var(--team-strong, var(--team, var(--grad-brand)))); color: var(--avatar-fg, var(--team-fg, #FFFFFF));
  font-weight: 700; font-size: calc(var(--size) * .36); line-height: 1; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { --size: 24px; font-size: 10px; }   /* 24 * .36 = 8.6px не читается */
.avatar--sm { --size: 32px; }
.avatar--lg { --size: 56px; }
.avatar--xl { --size: 88px; }
.avatar--ring { box-shadow: 0 0 0 3px var(--focus-gap); }
.avatar--more { background: var(--inv-bg); color: var(--inv-fg); }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack > .avatar { box-shadow: 0 0 0 2px var(--focus-gap); }
.avatar-stack > .avatar + .avatar { margin-left: calc(var(--size) * -.3); }

/* ---------- 13. Прогресс ---------- */
.progress {
  --value: 0; position: relative; height: 8px; border-radius: var(--r-pill);
  background: var(--track); overflow: hidden;
}
.progress__bar {
  display: block; height: 100%; width: calc(var(--value) * 1%); min-width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); transition: width .6s var(--ease-out);
}
.progress--s { height: 4px; }
.progress--l { height: 12px; }
.progress--team .progress__bar { background: var(--team, linear-gradient(90deg, var(--bar-a), var(--bar-b))); }
.progress-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); color: var(--fg-muted); margin-top: 8px; }
.progress-meta b { color: var(--fg); font-weight: 700; font-variant-numeric: tabular-nums; }

/* сегментный прогресс: шаги задания, дни до бонуса */
.segbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.segbar > span { height: 8px; border-radius: var(--r-pill); background: var(--track); }
.segbar > .is-done { background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); }
.segbar > .is-current { background: var(--bar-a); opacity: .45; }

/* кольцо: посещаемость, цель недели */
.ring { --value: 0; --size: 88px; --thick: 10px; position: relative; width: var(--size); height: var(--size); display: inline-grid; place-items: center; flex: none; text-align: center; }
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--bar-a), var(--bar-b) calc(var(--value) * 1%), var(--track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
}
.ring__val { position: relative; font-weight: 700; font-size: calc(var(--size) * .26); line-height: 1; font-variant-numeric: tabular-nums; }
.ring__cap { display: block; font-weight: 400; font-size: 11px; color: var(--fg-muted); margin-top: 3px; letter-spacing: 0; }
.ring--l { --size: 120px; --thick: 12px; }
.ring--s { --size: 56px; --thick: 7px; }

/* ---------- 14. Рейтинг: таблица и война команд ---------- */
.rank { width: 100%; border-collapse: separate; border-spacing: 0 6px; table-layout: fixed; margin: -6px 0; }
.rank col.rank__c-place { width: 44px; }
.rank col.rank__c-pts { width: 68px; }
.rank th {
  font-weight: 400; font-size: var(--fs-xs); color: var(--fg-muted); text-align: left;
  padding: 0 10px; height: 24px; vertical-align: bottom; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank th:first-child { padding-right: 0; }
.rank td { background: var(--well); padding: 8px 10px; vertical-align: middle; height: 60px; }
.rank td:first-child { border-radius: 18px 0 0 18px; padding-right: 0; }
.rank td:last-child { border-radius: 0 18px 18px 0; }
.rank .rank__pts { text-align: right; }
.rank tr.is-me td { background: var(--me-bg); }
.rank__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank__who > .avatar { --size: 32px; }
.rank__who > div { min-width: 0; }
.rank__name .team-dot { margin-right: 6px; vertical-align: 1px; }
.rank__name { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.rank__sub { font-size: 12px; line-height: 1.3; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.rank__score { display: block; font-weight: 700; font-size: 17px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rank tr.rank__gap td { background: transparent; height: 20px; padding: 0; text-align: center; color: var(--fg-muted); letter-spacing: 3px; }
.place {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--fg);
}
.place--1 { background: var(--accent-bg); color: var(--accent-fg); }
.place--2 { background: var(--inv-bg); color: var(--inv-fg); }
.place--3 { background: var(--c-surface-pink); color: var(--c-magenta-hover); }
.delta { display: inline-flex; align-items: center; gap: 1px; font-weight: 700; font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.delta .icon { width: 13px; height: 13px; stroke-width: 2.8; }
.delta--up { color: var(--c-ok); }
.delta--down { color: var(--c-danger); }
.delta--same { color: var(--fg-muted); }
.card--dark .delta--up, .s-dark .delta--up { color: #7FD6A0; }
.card--dark .delta--down, .s-dark .delta--down { color: var(--c-pink-text); }
@media (min-width: 720px) {
  .rank col.rank__c-place { width: 64px; }
  .rank col.rank__c-pts { width: 120px; }
  .rank td { padding: 10px 16px; height: 64px; }
  .rank__who > .avatar { --size: 40px; }
  .rank th { padding: 0 16px; }
  .rank__name { font-size: 16px; }
  .rank__sub { font-size: 13px; }
}

/* война команд */
.war { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.war__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px;
  background: var(--well); border-radius: var(--r-row); padding: 12px 14px 14px 12px;
}
.war__row.is-mine { box-shadow: inset 0 0 0 2px var(--c-magenta-2); }
.card--dark .war__row.is-mine, .s-dark .war__row.is-mine { box-shadow: inset 0 0 0 2px var(--c-pink-text); }
.war__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.war__name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; line-height: 1.2; min-width: 0; }
.war__name .icon { width: 18px; height: 18px; color: var(--accent-text); }
.war__sub { font-size: 12px; color: var(--fg-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.war__pts { font-weight: 700; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.war__bar { --value: 0; height: 8px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; margin-top: 10px; }
.war__bar > span { display: block; height: 100%; width: calc(var(--value) * 1%); border-radius: inherit; background: var(--team, var(--grad-line)); transition: width .8s var(--ease-out); }

/* ---------- 15. Команда: карточка, куратор, состав ---------- */
.team-card { --card-gap: 18px; }
.team-card__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.team-card__head > div { min-width: 0; flex: 1; }
.team-tile {
  width: 52px; height: 52px; border-radius: var(--r-icon-l); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 24px; line-height: 1;
}
.team-card__title { font-weight: 700; font-size: var(--fs-h3); line-height: 1.1; letter-spacing: var(--ls-h3); }
.team-card__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.team-card__name .team-card__title { overflow-wrap: anywhere; min-width: 0; }
.team-rename { margin-top: 4px; }
.team-rename[hidden] { display: none; }
.team-card__film { font-size: var(--fs-sm); color: var(--fg-soft); margin-top: 4px; }
.team-card__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.team-card__stat { background: var(--well); border-radius: 18px; padding: 12px; min-width: 0; }
.team-card__stat b { display: block; font-weight: 700; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.team-card__stat span { display: block; font-size: 12px; color: var(--fg-muted); margin-top: 6px; }

/* плашка человека (куратор, лектор), как expert-plate сайта */
.plate { display: flex; align-items: center; gap: 12px; background: var(--well); border-radius: var(--r-row); padding: 10px 14px 10px 10px; min-width: 0; color: var(--fg); }
.plate > div { min-width: 0; flex: 1; }
.plate__name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.plate__cap { font-size: var(--fs-xs); color: var(--accent-text); margin-top: 2px; }
.plate__end { flex: none; color: var(--fg-muted); }
a.plate:hover { background: var(--well-hover); color: var(--fg); }

.members { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 720px) { .members { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.member { display: flex; align-items: center; gap: 12px; background: var(--well); border-radius: 18px; padding: 8px 14px 8px 8px; min-width: 0; }
.member__body { flex: 1; min-width: 0; }
.member__name { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member__role { font-size: var(--fs-xs); color: var(--accent-text); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member__pts { flex: none; font-weight: 700; font-size: 15px; color: var(--fg-soft); font-variant-numeric: tabular-nums; }
.member.is-me { background: var(--me-bg); }

/* ---------- 16. Занятие ---------- */
.lesson {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px;
  padding: 16px; border-radius: var(--r-inner); background: var(--c-surface); color: var(--fg); min-width: 0;
}
.lesson__date {
  align-self: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 76px; padding: 10px 4px; border-radius: 18px; background: var(--well); text-align: center;
}
.lesson__day { font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.lesson__month { font-size: var(--fs-xs); line-height: 1; color: var(--fg-soft); }
.lesson__wd { font-size: 12px; line-height: 1; color: var(--fg-muted); }
.lesson__body { min-width: 0; display: flex; flex-direction: column; }
.lesson__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lesson__time { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: var(--fs-sm); color: var(--fg-soft); font-variant-numeric: tabular-nums; }
.lesson__time .icon { width: 16px; height: 16px; }
.lesson__title { font-weight: 700; font-size: 18px; line-height: 1.15; letter-spacing: -.2px; margin-top: 10px; }
.lesson__info { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: var(--fs-sm); color: var(--fg-soft); }
.lesson__info li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lesson__info .icon { width: 16px; height: 16px; color: var(--fg-muted); }
.lesson__info .avatar { --size: 24px; }
.lesson__bring { margin-top: 12px; background: var(--well); border-radius: 14px; padding: 10px 12px; font-size: var(--fs-sm); line-height: 1.4; color: var(--fg-soft); }
.lesson__bring b { color: var(--fg); }
.lesson__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lesson.is-today .lesson__date, .lesson--hero .lesson__date { background: var(--accent-bg); color: var(--accent-fg); }
.lesson.is-today .lesson__month, .lesson.is-today .lesson__wd,
.lesson--hero .lesson__month, .lesson--hero .lesson__wd { color: rgba(255,255,255,.9); }
.lesson.is-past { opacity: .7; }
.lesson.is-cancelled .lesson__title { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--fg-muted); }
.lesson__old { text-decoration: line-through; color: var(--fg-muted); font-weight: 400; }
/* в расписании по дням: слева время крупно (.lesson--time > .lesson__when) */
.lesson--time { grid-template-columns: 60px minmax(0, 1fr); }
.lesson__when { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.lesson__start { font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: -.3px; }
.lesson__end { font-size: var(--fs-xs); color: var(--fg-muted); }
.lesson__kind { font-size: var(--fs-xs); color: var(--fg-muted); }
.lesson--time .lesson__title { margin-top: 2px; }
/* главное занятие на экране «Сегодня»: темная плитка с водяным знаком */
.lesson--hero { background: var(--c-ink); border-radius: var(--r-card); padding: var(--pad-card); gap: 16px; overflow: hidden; isolation: isolate; }
.lesson--hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: 300px; aspect-ratio: 819 / 752; right: -100px; bottom: -90px;
  background: var(--wm-color);
  -webkit-mask: url('../brand/ksh.svg') center / contain no-repeat; mask: url('../brand/ksh.svg') center / contain no-repeat;
}
.lesson--hero .lesson__title { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: var(--ls-h2); }
.lesson--hero .lesson__info { font-size: 15px; }
@media (min-width: 720px) {
  .lesson { grid-template-columns: 76px minmax(0, 1fr); gap: 18px; padding: 20px; }
  .lesson--time { grid-template-columns: 72px minmax(0, 1fr); }
  .lesson__date { min-height: 88px; }
  .lesson__day { font-size: 30px; }
  .lesson--hero { grid-template-columns: 96px minmax(0, 1fr); gap: 24px; padding: var(--pad-card); }
  .lesson--hero .lesson__date { min-height: 108px; border-radius: 22px; }
  .lesson--hero .lesson__day { font-size: 40px; }
  .lesson--hero::after { width: 420px; right: -140px; bottom: -130px; }
}

/* ---------- 17. Трекер фильма: вертикальный таймлайн и мини-этапы ---------- */
.tracker { list-style: none; display: flex; flex-direction: column; }
.tracker__step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding-bottom: 20px; }
.tracker__step:last-child { padding-bottom: 0; }
.tracker__step::before {
  content: ""; position: absolute; left: 19px; top: 46px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--track);
}
.tracker__step:last-child::before { display: none; }
.tracker__step.is-done::before { background: var(--team, linear-gradient(180deg, var(--bar-a), var(--bar-b))); }
.tracker__dot {
  position: relative; width: 40px; height: 40px; border-radius: var(--r-icon-s);
  display: flex; align-items: center; justify-content: center; background: var(--well); color: var(--fg-muted);
}
.tracker__dot .icon { width: 20px; height: 20px; }
.tracker__step.is-done .tracker__dot { background: var(--team, var(--accent-bg)); color: var(--team-fg, var(--accent-fg)); }
.tracker__step.is-current .tracker__dot { background: var(--inv-bg); color: var(--inv-fg); }
.tracker__step.is-current .tracker__dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 16px; border: 2px solid var(--c-magenta-1);
  animation: k-pulse 2s ease-out infinite;
}
.tracker__body { min-width: 0; padding-top: 9px; }
.tracker__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tracker__name { font-weight: 700; font-size: 17px; line-height: 1.2; }
.tracker__step:not(.is-done):not(.is-current) .tracker__name { color: var(--fg-soft); font-weight: 400; }
.tracker__meta { font-size: var(--fs-xs); color: var(--fg-muted); margin-top: 3px; }
.tracker__body > .progress, .tracker__body > .segbar { margin-top: 10px; }
@keyframes k-pulse { 0% { opacity: .9; transform: scale(.92); } 70% { opacity: 0; transform: scale(1.18); } 100% { opacity: 0; transform: scale(1.18); } }

/* Трекер в строку (spec/10_product.md 3.6): 6 кругов, соединенных линией; телефон 28px, десктоп 40px.
   Пройден: залит цветом команды с галочкой; в работе: обводка цветом команды и точка внутри; не начат: серая обводка.
   Подписи 11px под кругами, длинные переносятся по слогам (hyphens: auto, нужен lang="ru" у html).
   Размер зависит от ширины самой полосы (container query): уже 480px круги 28px, шире 40px.
   Цвет команды: [data-team] или style="--team:#hex" на контейнере; без команды бренд. .stages--compact: подпись только у текущего. */
.stages { --n: 6; list-style: none; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: start; container-type: inline-size; }
.stages__item { --dot: 28px; }
.stages__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.stages__item + .stages__item::before {
  content: ""; position: absolute; top: calc(var(--dot) / 2 - 1.5px); right: calc(50% + var(--dot) / 2 + 3px); width: calc(100% - var(--dot) - 6px);
  height: 3px; border-radius: 3px; background: var(--track);
}
.stages__item.is-done + .stages__item::before { background: var(--team, var(--c-magenta-2)); }
.stages__dot {
  position: relative; width: var(--dot); height: var(--dot); border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px var(--line-strong); color: var(--team-fg, #FFFFFF);
}
.stages__dot .icon { width: 60%; height: 60%; stroke-width: 2.6; }
.stages__item.is-done .stages__dot { background: var(--team, var(--grad-brand)); box-shadow: none; }
.stages__item.is-current .stages__dot { box-shadow: inset 0 0 0 2.5px var(--team, var(--c-magenta-2)); }
.stages__item.is-current .stages__dot::after { content: ""; width: 38%; height: 38%; border-radius: 50%; background: var(--team, var(--c-magenta-2)); }
.stages__label {
  font-size: 11px; line-height: 1.15; color: var(--fg-muted); max-width: 100%;
  -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere;
}
.stages__item.is-done .stages__label { color: var(--fg-soft); }
.stages__item.is-current .stages__label { font-weight: 700; color: var(--fg); }
.stages--compact .stages__item:not(.is-current) .stages__label { display: none; }
.stages-now { font-size: var(--fs-sm); color: var(--fg-soft); }
.stages-now b { color: var(--fg); }
.stages-now__due, .tracker__due { margin-top: 6px; }
.stage-due { display: inline-flex; align-items: center; gap: 4px; }
.badge.stage-due { white-space: normal; flex: 0 1 auto; max-width: 100%; }
.stage-due .icon { width: 14px; height: 14px; flex: none; }
.stage-due--plain { font-size: var(--fs-xs); font-weight: 700; color: var(--accent-text); }
.stage-due--plain.is-late { color: var(--c-danger); }
.stage-due--plain.is-soon { color: var(--c-warn); }
@container (min-width: 380px) { .stages__label { font-size: 12px; } }
@container (min-width: 480px) { .stages__item { --dot: 40px; } .stages__label { font-size: 13px; } }
.stages--s .stages__item { --dot: 20px; }
.stages--s .stages__dot .icon { stroke-width: 3; }

/* ---------- 18. Ачивки ---------- */
.ach-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .ach-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1024px) { .ach-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ach {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 176px;
  padding: 16px; border-radius: var(--r-inner); background: var(--well); color: var(--fg);
}
.ach__icon {
  width: 52px; height: 52px; border-radius: var(--r-icon-l); flex: none;
  display: flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent-fg);
}
.ach__icon .icon { width: 26px; height: 26px; }
.ach__title { font-weight: 700; font-size: 16px; line-height: 1.2; margin-top: auto; }
.ach__text { font-size: var(--fs-xs); line-height: 1.35; color: var(--fg-muted); }
.ach__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ach__foot .progress { flex: 1; }
.ach__count { font-size: 12px; font-weight: 700; color: var(--fg-soft); font-variant-numeric: tabular-nums; }
.ach.is-new .ach__icon { box-shadow: var(--shadow-glow); }
.ach.is-new::after {
  content: "новая"; position: absolute; top: 14px; right: 14px; padding: 4px 9px; border-radius: var(--r-pill);
  background: var(--inv-bg); color: var(--inv-fg); font-weight: 700; font-size: 11px; line-height: 1.2;
}
.ach.is-locked .ach__icon { background: var(--track); color: var(--fg-muted); }
.ach.is-locked .ach__title { color: var(--fg-soft); }
.ach.is-locked::after {
  content: ""; position: absolute; top: 16px; right: 16px; width: 18px; height: 18px; background: var(--fg-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='10.5' width='14' height='10.5' rx='2.5'/%3E%3Cpath d='M8 10.5v-3a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='10.5' width='14' height='10.5' rx='2.5'/%3E%3Cpath d='M8 10.5v-3a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* ачивка-номинация (привязана к номинации финала): темная */
.ach--special { background: var(--c-ink); color: #FFFFFF; --fg-soft: var(--c-on-dark-soft); --fg-muted: var(--c-on-dark-muted); --track: rgba(255,255,255,.15); --inv-bg: #FFFFFF; --inv-fg: var(--c-ink); }
.ach--special .ach__icon { background: #FFFFFF; color: var(--c-magenta-2); }
.ach--special.is-locked .ach__icon { background: rgba(255,255,255,.12); color: var(--c-on-dark-muted); }

/* ---------- 19. Стрик: огонь, карточка, пилюля ---------- */
.flame {
  --fs: 1em; position: relative; display: inline-block; flex: none;
  width: calc(var(--fs) * .84); height: var(--fs);
  background: var(--grad-flame);
  -webkit-mask: url('../brand/flame.svg') center / contain no-repeat; mask: url('../brand/flame.svg') center / contain no-repeat;
  transform-origin: 50% 100%;
}
.flame::after {
  content: ""; position: absolute; inset: 0; background: #FFD9C7; opacity: .9;
  -webkit-mask: url('../brand/flame-core.svg') center / contain no-repeat; mask: url('../brand/flame-core.svg') center / contain no-repeat;
}
.flame--s { --fs: 18px; }
.flame--m { --fs: 28px; }
.flame--l { --fs: 48px; }
.flame--xl { --fs: 88px; }
.flame--anim { animation: k-flicker 2.6s ease-in-out infinite; }
.flame.is-off { background: var(--line-strong); }
.flame.is-off::after { display: none; }
@keyframes k-flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  25% { transform: scale(1.03, .97) rotate(-2deg); }
  50% { transform: scale(.98, 1.04) rotate(1.5deg); }
  75% { transform: scale(1.02, .99) rotate(-1deg); }
}

.streak { --card-gap: 20px; }
.streak__top { display: flex; align-items: center; gap: 16px; }
.streak__num { font-weight: 700; font-size: var(--fs-stat-xl); line-height: .85; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.streak__cap { font-size: 15px; color: var(--fg-soft); margin-top: 8px; }
.streak__best { font-size: var(--fs-xs); color: var(--fg-muted); margin-top: 4px; }
.streak__week { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.streak__day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; line-height: 1; color: var(--fg-muted); }
.streak__mark {
  width: 100%; max-width: 40px; aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--well); color: var(--accent-fg);
}
.streak__mark .icon { width: 55%; height: 55%; stroke-width: 2.6; }
.streak__day.is-done .streak__mark { background: var(--accent-bg); }
.streak__day.is-today { color: var(--fg); font-weight: 700; }
.streak__day.is-today .streak__mark { box-shadow: inset 0 0 0 2px var(--c-magenta-1); }
.streak__day.is-today.is-done .streak__mark { box-shadow: var(--shadow-glow); }
.streak__day.is-missed .streak__mark { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--fg-muted); }
.streak__goal { display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); color: var(--fg-soft); }
.streak__goal b { color: var(--fg); }

.streak-pill .flame, .stat-chip .flame { --fs: 22px; }
.streak-pill.is-off { color: var(--c-text-muted); }

/* ---------- 20. Таб-бар (до 1023) ----------
   spec/10_product.md 2.3: закреплен снизу, белый, 64px + safe-area, граница сверху --c-divider, ровно 5 пунктов,
   иконка 24 + подпись 12, активный --c-magenta-2 жирный, остальные --c-text-muted, бейдж в углу иконки («9+»). */
.tabbar {
  position: fixed; z-index: var(--z-tabbar); left: 0; right: 0; bottom: 0;
  background: var(--c-surface); border-top: 1px solid var(--c-divider);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar__list { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: 640px; height: var(--tabbar-h); margin: 0 auto; }
.tabbar__link {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 100%; padding: 0 2px; color: var(--c-text-muted); font-size: 12px; line-height: 1.1; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: color .2s ease;
}
.tabbar__link:hover { color: var(--c-text); }
.tabbar__link:focus-visible { box-shadow: inset var(--ring-focus); border-radius: 12px; }
.tabbar__icon { position: relative; width: 24px; height: 24px; }
.tabbar__icon .icon { width: 24px; height: 24px; }
.tabbar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar__link[aria-current="page"] { color: var(--c-magenta-2); font-weight: 700; }
.tabbar__count { position: absolute; top: -6px; left: 14px; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 5px; box-shadow: 0 0 0 2px var(--c-surface); }
@media (min-width: 1024px) { .tabbar { display: none; } }
/* статичное превью (стайлгайд, документация) */
.tabbar--static { position: relative; z-index: auto; border: 1px solid var(--c-divider); border-radius: 20px; overflow: hidden; padding-bottom: 0; }
@media (min-width: 1024px) { .tabbar--static { display: block; } }

/* ---------- 21. Тосты (JS: KUI.toast) ---------- */
.toasts {
  position: fixed; z-index: var(--z-toast); left: 12px; right: 12px;
  bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; width: 100%; max-width: 440px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px 12px 12px; border-radius: var(--r-field);
  background: var(--c-ink); color: #FFFFFF; box-shadow: var(--shadow-pop);
  font-size: 15px; line-height: 1.35;
  animation: k-toast-in .32s var(--ease-out);
}
.toast.is-leaving { animation: k-toast-out .2s ease forwards; }
.toast__icon {
  width: 32px; height: 32px; border-radius: var(--r-icon-xs); flex: none;
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); color: #FFFFFF;
}
.toast__icon .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-weight: 700; }
.toast__text { color: var(--c-on-dark-soft); font-size: var(--fs-sm); }
.toast__action { flex: none; border: 0; background: transparent; color: var(--c-pink-text); font-weight: 700; font-size: var(--fs-sm); padding: 8px 10px; border-radius: 12px; }
.toast__action:hover { background: rgba(255,255,255,.08); }
.toast__close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 12px; background: transparent; color: var(--c-on-dark-soft); display: flex; align-items: center; justify-content: center; }
.toast__close:hover { background: rgba(255,255,255,.08); color: #FFFFFF; }
.toast__close .icon { width: 18px; height: 18px; }
.toast--ok .toast__icon { background: #2E9E5B; }
.toast--error .toast__icon { background: var(--c-magenta-2); }
.toast--points .toast__icon { background: var(--grad-brand); }
.toast--points .toast__title { color: var(--c-pink-text); }
@media (min-width: 1024px) {
  .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; width: 420px; }
}
@keyframes k-toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes k-toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 22. Пустые состояния ----------
   spec/10_product.md 3.2: иконка 48px --c-text-muted, заголовок 18px, одна строка пояснения, при необходимости кнопка. */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 12px; }
.empty__icon { width: 48px; height: 48px; color: var(--fg-muted); margin-bottom: 4px; }
.empty__mark {
  width: 88px; aspect-ratio: 819 / 752; margin-bottom: 8px; background: var(--line);
  -webkit-mask: url('../brand/ksh.svg') center / contain no-repeat; mask: url('../brand/ksh.svg') center / contain no-repeat;
}
.card .empty__mark { background: var(--c-divider); }
.card--dark .empty__mark, .s-dark .empty__mark { background: rgba(255,255,255,.12); }
.empty__title { font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: -.2px; }
.empty__text { font-size: 15px; line-height: 1.45; color: var(--fg-muted); max-width: 340px; }
.empty .btn { margin-top: 8px; }
.empty--s { padding: 12px 8px; gap: 6px; }
.empty--s .empty__icon { width: 36px; height: 36px; }
/* ошибка загрузки: та же разметка + .empty--error (иконка i-alert акцентом) */
.empty--error .empty__icon { color: var(--accent-text); }

/* ---------- 23. Скелетоны ----------
   spec/10_product.md 3.2: серые блоки (--c-divider в карточке) с мягкой пульсацией, без нее при reduced motion. */
.skel {
  position: relative; display: block; width: var(--w, 100%); height: var(--h, 14px);
  border-radius: 8px; background: var(--skel); animation: k-pulse-soft 1.6s ease-in-out infinite;
}
.skel--text { --h: 14px; margin: 4px 0; }
.skel--title { --h: 24px; --w: 60%; border-radius: 10px; }
.skel--stat { --h: 48px; --w: 40%; border-radius: 12px; }
.skel--circle { width: var(--size, 40px); height: var(--size, 40px); border-radius: 50%; flex: none; }
.skel--tile { width: var(--size, 52px); height: var(--size, 52px); border-radius: var(--r-icon-l); flex: none; }
.skel--btn { --h: 52px; --w: 160px; border-radius: var(--r-pill); }
.skel--row { --h: 64px; border-radius: var(--r-row); }
.skel--card { --h: 180px; border-radius: var(--r-card); }
@keyframes k-pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ---------- 24. Прочее: строки списков, задание, ответ куратора, QR, вход ---------- */
.list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px;
  padding: 12px 14px 12px 12px; border-radius: var(--r-row); background: var(--well); color: var(--fg); text-align: left;
  border: 0; width: 100%; font: inherit; transition: background .2s ease;
}
a.row:hover, button.row:hover { background: var(--well-hover); color: var(--fg); }
a.row:focus-visible, button.row:focus-visible { box-shadow: var(--ring); border-radius: var(--r-row); }
.row__body { display: block; flex: 1; min-width: 0; }
.row__title { display: block; font-weight: 700; font-size: 16px; line-height: 1.25; }
.row__sub { display: block; font-size: var(--fs-xs); line-height: 1.35; color: var(--fg-muted); margin-top: 2px; }
.row__end { flex: none; display: flex; align-items: center; gap: 8px; color: var(--fg-muted); }
.row__end .icon { width: 20px; height: 20px; }
/* важное объявление: розовая полоса слева */
.row.is-important::after { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c-magenta-1); }
.row--l { min-height: 56px; }
.row.is-unread .row__title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-magenta-2); margin-right: 8px; vertical-align: middle; transform: translateY(-1px); }

/* карточка задания */
.task { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-inner); background: var(--c-surface); color: var(--fg); min-width: 0; }
.task__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task__title { font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: -.2px; }
.task__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--fs-sm); color: var(--fg-soft); }
.task__meta span { display: inline-flex; align-items: center; gap: 5px; }
.task__meta .icon { width: 16px; height: 16px; color: var(--fg-muted); }
.task__meta .badge .icon { width: 14px; height: 14px; color: currentColor; }
.task__deadline.is-soon { color: var(--c-warn); font-weight: 700; }
.task__deadline.is-late { color: var(--c-danger); font-weight: 700; }
.task__deadline.is-call { color: var(--accent-text); font-weight: 700; }
.task__deadline.is-soon .icon, .task__deadline.is-late .icon, .task__deadline.is-call .icon { color: currentColor; }
.task__text { font-size: 15px; line-height: 1.45; color: var(--fg-soft); }
.task__answer { display: flex; align-items: center; gap: 10px; background: var(--well); border-radius: var(--r-field); padding: 10px 12px; font-size: var(--fs-sm); min-width: 0; }
.task__answer .icon { width: 18px; height: 18px; color: var(--fg-muted); }
@media (min-width: 720px) { .task { padding: 22px; } }

/* ответ куратора / комментарий к этапу */
.reply { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.reply > .avatar { --size: 32px; }
.reply__bubble { min-width: 0; background: var(--well); border-radius: 4px 18px 18px 18px; padding: 10px 14px; font-size: var(--fs-sm); line-height: 1.45; color: var(--fg); }
.reply__who { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-weight: 700; font-size: var(--fs-xs); color: var(--accent-text); margin-bottom: 2px; }
.reply__who .icon { width: 14px; height: 14px; }
.reply__time { font-weight: 400; color: var(--fg-muted); margin-left: 6px; }
.reply--warn .reply__bubble { background: var(--c-warn-bg); color: var(--c-ink); }
.reply--warn .reply__who { color: var(--c-warn); }
.reply--ok .reply__bubble { background: var(--c-ok-bg); color: var(--c-ink); }
.reply--ok .reply__who { color: var(--c-ok); }

/* QR посещаемости */
.qr-box { width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto; padding: 16px; border-radius: var(--r-inner); background: #FFFFFF; display: grid; place-items: center; }
.qr-box > img, .qr-box > canvas, .qr-box > svg { width: 100%; height: 100%; image-rendering: pixelated; }

/* экран входа */
.auth { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.auth__main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 16px var(--gutter) 40px; }
.auth__card { width: 100%; max-width: 460px; }
@media (min-width: 720px) { .auth__main { align-items: center; padding-top: 24px; } }

/* ---------- 24b. Модалка (новая ачивка и т.п.) ----------
   Нативный <dialog class="modal">, открывать dialog.showModal(); внутри карточка любой поверхности (для ачивки .card--grad). */
.modal {
  width: calc(100% - 2 * var(--gutter)); max-width: 420px; max-height: calc(100dvh - 32px);
  margin: auto; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible;
}
.modal::backdrop { background: rgba(43,31,44,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal[open] { animation: k-pop .3s var(--ease-out); }
.modal__card { align-items: center; text-align: center; overflow: hidden; isolation: isolate; box-shadow: var(--shadow-pop); }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 1; }
.modal__icon { width: 96px; height: 96px; border-radius: 28px; display: flex; align-items: center; justify-content: center; background: #FFFFFF; color: var(--c-magenta-2); box-shadow: 0 12px 30px rgba(43,31,44,.2); }
.modal__icon .icon { width: 48px; height: 48px; }
.modal__title { font-weight: 700; font-size: 28px; line-height: 1.05; letter-spacing: -.5px; }
.modal__actions { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; margin-top: 4px; }
.modal__actions .btn { width: 100%; }
@keyframes k-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 25. Доступность движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   26. Экраны кабинета (web/app.js, web/js/*). Дополнение системы для живого фронта:
   только новые классы, существующие компоненты и стайлгайд не меняются.
   Цвета из локальных токенов поверхности, движение выключается при reduced motion (раздел 25).
   ===================================================================== */

/* ---------- 26.1 Каркас приложения ---------- */
.app { min-height: 100vh; min-height: 100svh; }
.view__in { display: flex; flex-direction: column; gap: var(--page-gap); min-width: 0; }
.skip-link {
  position: absolute; z-index: 100; left: 8px; top: -64px; padding: 10px 14px; border-radius: 12px;
  background: var(--c-ink); color: #FFFFFF; font-weight: 700; font-size: var(--fs-sm);
}
.skip-link:focus, .skip-link:focus-visible { top: calc(8px + env(safe-area-inset-top, 0px)); color: #FFFFFF; }
.devbar--inline { border-radius: 14px; }
.appbar__avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; }
.sidenav .seg--modes .seg__label { font-size: 14px; padding: 6px 8px; }
a.sidenav__stats { transition: background .2s ease; }
a.sidenav__stats:hover { background: #F8D3E1; color: var(--c-ink); }
a.sidenav__stats:focus-visible { box-shadow: var(--ring-focus); }
.page-note { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); line-height: 1.35; color: var(--c-text-muted); padding: 0 4px; }
.page-note .icon { flex: none; }
.boot { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: var(--gutter); }
.boot__mark {
  width: 72px; aspect-ratio: 819 / 752; background: var(--c-divider); animation: k-pulse-soft 1.6s ease-in-out infinite;
  -webkit-mask: url('../brand/ksh.svg') center / contain no-repeat; mask: url('../brand/ksh.svg') center / contain no-repeat;
}
/* подпрыгивание чипа стрика или блока очков после начисления */
.is-bump { animation: k-bump .65s var(--ease-out); }
@keyframes k-bump { 0% { transform: scale(1); } 30% { transform: scale(1.18); } 60% { transform: scale(.95); } 100% { transform: scale(1); } }

/* ---------- 26.2 Утилиты экранов ---------- */
.cluster.nowrap { flex-wrap: nowrap; }
.stack--start { align-items: flex-start; }
.stack--start > .plate, .stack--start > .notice, .stack--start > .consent-row, .stack--start > .dropzone, .stack--start > .form, .stack--start > [data-vk-form] { align-self: stretch; }
.cluster--s { --gap: 6px; }
.cluster--center { justify-content: center; }
.btn-row--center { justify-content: center; }
.split--wrap { flex-wrap: wrap; align-items: flex-start; }
.split--wrap > .chips--scroll { flex: 1 1 100%; }
.inline-icon { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.is-struck { text-decoration: line-through; text-decoration-thickness: 2px; }
.prose { font-size: 16px; line-height: 1.55; color: var(--fg); overflow-wrap: anywhere; }
.prose a { text-decoration: underline; text-decoration-color: rgba(204,14,129,.35); text-underline-offset: 2px; }
.badge--xs { padding: 2px 8px; font-size: 11px; vertical-align: 1px; }
.count--muted { background: var(--line-strong); color: var(--fg); }
.form--tight { gap: 14px; }
.textarea--s { min-height: 88px; }
.form-error { padding-left: 0; }
.seg--inline { display: inline-flex; align-self: flex-start; max-width: 100%; }
.seg__label.has-value::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-magenta-2); flex: none; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips--scroll .chip { flex: none; }
@media (min-width: 1024px) { .chips--scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; } }
.cards-grid { display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); }
.cards-list { list-style: none; display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); }
.cards-list > li { display: flex; min-width: 0; }
.cards-list > li > * { flex: 1; min-width: 0; }
@media (min-width: 720px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cards-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cards-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .cards-grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.layout-aside { display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .layout-aside { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
@media (max-width: 719.98px) { .card--flush-m { padding: 12px 10px; border-radius: var(--r-inner); } }
.skel-wrap { display: flex; flex-direction: column; gap: var(--page-gap); }
.skel-wrap .card { gap: 12px; }
.skel-greet { padding: 4px; }

/* плашка-уведомление внутри карточки: принято, предупреждение, отменено */
.notice {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-field);
  background: var(--well); color: var(--fg); font-size: var(--fs-sm); line-height: 1.4;
}
.notice > .icon { width: 20px; height: 20px; flex: none; margin-top: -1px; }
.notice--ok { background: var(--c-ok-bg); color: var(--c-ink); }
.notice--ok > .icon { color: var(--c-ok); }
.notice--warn { background: var(--c-warn-bg); color: var(--c-ink); }
.notice--warn > .icon { color: var(--c-warn); }
.notice--pink { background: var(--c-surface-pink); color: var(--c-ink); }
.notice--pink > .icon { color: var(--c-magenta-2); }
.card--pink .notice--pink { background: var(--c-surface); }
.notice--dark { background: rgba(255,255,255,.1); color: #FFFFFF; }

/* раскрывающийся блок (прошедшие события, описание задания, этапы) */
.fold__sum {
  list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px;
  border-radius: var(--r-row); background: var(--c-surface); color: var(--fg); font-weight: 700; cursor: pointer;
}
.fold__sum::-webkit-details-marker { display: none; }
.fold__sum::marker { content: ""; }
.fold__chev { color: var(--fg-muted); transition: transform .2s ease; }
.fold[open] > .fold__sum .fold__chev { transform: rotate(180deg); }
.fold[open] > .fold__sum { margin-bottom: 12px; }
.fold--plain > .fold__sum { background: var(--well); }
.fold__sum:focus-visible { box-shadow: var(--ring); }

/* строки списков: компактная, статичная, закрытая, удаление рядом */
.row--s { min-height: 52px; padding: 10px 12px; }
.row--static { cursor: default; }
.row.is-locked { opacity: .65; }
.row.is-cancelled .row__title { text-decoration: line-through; }
button.row { cursor: pointer; }
.row-wrap { display: flex; align-items: center; gap: 4px; }
.row-wrap > .row { flex: 1; min-width: 0; }

/* пары «подпись: значение» */
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
.kv > div { background: var(--well); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.kv dt { font-size: var(--fs-xs); color: var(--fg-muted); }
.kv dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; }
@media (min-width: 720px) { .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- 26.3 Вход ---------- */
.auth__top { width: 100%; max-width: var(--container); margin: 0 auto; padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 8px; }
.auth__grid { width: 100%; max-width: 460px; display: grid; gap: var(--grid-gap); }
.auth__card { gap: 18px; }
.auth__hero { display: none; }
.auth__demo { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth__demo .sec-head { padding: 0; }
@media (min-width: 1024px) {
  .auth__grid { max-width: 960px; grid-template-columns: minmax(0, 1fr) 440px; }
  .auth__hero { display: flex; min-height: 460px; }
  .auth__hero .t-display { margin-top: 24px; }
}

/* ---------- 26.4 Сегодня, расписание, событие ---------- */
.greet { gap: 4px; }
.kicker--live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-magenta-1); flex: none; animation: k-live 1.4s ease-in-out infinite; }
@keyframes k-live { 50% { opacity: .3; transform: scale(.7); } }
.lesson__hint { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.today-more { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.today-streak__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.today-streak__grid > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.today-streak__grid > div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.today-streak__num { --gap: 6px; flex-wrap: nowrap; }
.today-streak__goal { margin-top: auto; }
/* карточка события в расписании: вся карточка кликабельна через растянутую ссылку в заголовке */
.lesson--link { transition: var(--t-hover); }
.lesson--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.lesson .stretch { color: inherit; }
.lesson .stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-inner); }
.lesson .stretch:focus-visible { box-shadow: none; }
.lesson .stretch:focus-visible::after { box-shadow: var(--ring); }
.lesson.is-selected { box-shadow: inset 0 0 0 2px var(--c-magenta-2); }
.lesson__staff { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.schedule { gap: 18px; }
.day { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: calc(var(--appbar-h) + 12px); }
.schedule__foot { display: flex; justify-content: center; padding: 8px 0; }
.desk-split { display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
.desk-split__aside { display: none; }
@media (min-width: 1024px) {
  .desk-split { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); }
  .desk-split__aside { display: block; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; border-radius: var(--r-card); scrollbar-width: thin; }
}
.event-head { gap: 12px; }
.mat-group .sec-head { padding: 0; }
/* интерактивные лекции на «Материалах» (5.6): группа на спикера, внутри карточки лекций; на десктопе спикеры в две колонки */
.lec-block { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lec-speakers { display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .lec-speakers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lec-speaker__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lec-speaker__name { flex: 1; min-width: 0; font-weight: 700; font-size: var(--fs-h3); line-height: var(--lh-title); letter-spacing: var(--ls-h3); overflow-wrap: anywhere; }
.lec-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lec-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 14px; border-radius: var(--r-row); background: var(--well); }
.lec-card__title { font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: -.2px; overflow-wrap: anywhere; }
.lec-card__meta { font-size: var(--fs-xs); line-height: 1.35; color: var(--fg-muted); }
.lec-card .btn-row { align-self: stretch; margin-top: 4px; }
.lec-card .btn-row > .btn { flex: 1 1 auto; }
.ann__chev { transition: transform .2s ease; }
.ann[aria-expanded="true"] .ann__chev { transform: rotate(180deg); }
.ann__body { padding: 10px 14px 4px 58px; font-size: 15px; line-height: 1.5; color: var(--fg-soft); overflow-wrap: anywhere; }
.ann__body p { margin-top: 8px; }
.anns-full .ann__chev { display: none; }
.anns-full .ann__body { padding-left: 14px; }
.ann-head { padding: 0 4px; flex-wrap: wrap; }

/* ---------- 26.5 Задания ---------- */
.task-head { gap: 12px; }
.attempts { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.attempt { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-row); background: var(--c-bg); --well: var(--c-surface); min-width: 0; }
.attempt__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-sm); }
.attempt__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.task__answer--text { align-items: flex-start; }
.task__answer--text > span { min-width: 0; overflow-wrap: anywhere; }
.upload-progress { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 240px; }
.upload-progress .progress { width: 100%; }
.dropzone--s { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 14px 12px; }
.answer-text { background: var(--well); border-radius: var(--r-field); padding: 14px 16px; }

/* ---------- 26.6 Команда, ученики ---------- */
@media (min-width: 720px) { .members.members--one { grid-template-columns: minmax(0, 1fr); } }
a.member { color: var(--fg); transition: background .2s ease; }
a.member:hover { background: var(--well-hover); color: var(--fg); }
a.member:focus-visible { box-shadow: var(--ring); }
a.member.is-me:hover { background: var(--me-bg); }
.student-head { gap: 16px; }
.student-head__stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .student-head__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.team-card__stat b .flame { margin-right: 3px; vertical-align: -2px; }
.stu-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* список учеников команды (куратор 6.1, суперадмин 8.2): строка на ученика.
   Телефон (до 600px): 1-я линия аватар, имя, очки; 2-я посещаемость, задания, стрик, флаги. Шире: колонки с шапкой */
.stu-list { display: flex; flex-direction: column; gap: 6px; }
.stu-list__head { display: none; }
.stu-list__rows { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.stu-row {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0;
  padding: 10px 12px; border-radius: var(--r-row); background: var(--well); color: var(--fg); transition: background .2s ease;
}
a.stu-row:hover { background: var(--well-hover); color: var(--fg); }
a.stu-row:focus-visible { box-shadow: var(--ring); }
.stu-row__who { order: 0; flex: 1 1 calc(100% - 84px); display: flex; align-items: center; gap: 10px; min-width: 0; }
.stu-row__id { display: flex; flex-direction: column; min-width: 0; }
.stu-row__name { font-weight: 700; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.stu-row__role { font-size: 12px; line-height: 1.3; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stu-row.is-test .stu-row__name { color: var(--fg-soft); font-weight: 400; }
.stu-row__note { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--c-magenta-2); }
.stu-row__cell { display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stu-row__cell b { font-weight: 700; }
.stu-row__k { color: var(--fg-muted); font-size: 12px; }
.stu-row__sub { color: var(--c-magenta-hover); font-weight: 700; font-size: 12px; }
.stu-row__cell .flame { --fs: 14px; margin-right: 2px; vertical-align: -2px; }
.stu-row__pts { order: 1; flex: 0 0 auto; max-width: 74px; flex-direction: column; align-items: flex-end; gap: 0; }
.stu-row__pts b { font-size: 17px; }
.stu-row__pts .stu-row__k { order: 2; font-size: 11px; }
.stu-row__att { order: 2; margin-left: 42px; }
.stu-row__tasks { order: 3; }
.stu-row__streak { order: 4; }
.stu-row__flags { order: 5; flex: 1 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; min-width: 0; }
.stu-row__ok { display: none; }
.stu-row__notetext { order: 6; flex: 1 1 100%; margin-left: 42px; font-size: var(--fs-xs); line-height: 1.4; color: var(--c-ink); background: var(--c-surface-pink); border-radius: 12px; padding: 6px 10px; }
.badge--xs { padding: 3px 8px; font-size: 11px; gap: 4px; }
@media (min-width: 601px) {
  .stu-list__head, .stu-row {
    display: grid; grid-template-columns: minmax(0, 2.4fr) 64px 76px 60px 60px minmax(0, 1.8fr); column-gap: 12px; align-items: center;
  }
  .stu-list__head { padding: 0 14px; font-size: 12px; color: var(--fg-muted); }
  .stu-list__head > span:nth-child(n+2):nth-child(-n+5) { text-align: right; }
  .stu-row { padding: 8px 14px; min-height: 56px; row-gap: 6px; }
  .stu-row > * { order: 0; margin-left: 0; }
  .stu-row__who { flex: none; }
  .stu-row__cell { justify-content: flex-end; font-size: 14px; }
  .stu-row__cell .stu-row__k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stu-row__pts { max-width: none; flex-direction: row; align-items: baseline; }
  .stu-row__pts b { font-size: 15px; }
  .stu-row__flags { justify-content: flex-start; }
  .stu-row__ok { display: inline-flex; color: var(--c-ok); }
  .stu-row__notetext { grid-column: 1 / -1; margin-left: 42px; }
}
.consent-row { display: flex; align-items: center; gap: 12px; }
.more__me { flex-direction: row; align-items: center; gap: 12px; }
.profile-out { align-self: center; }
.reply--alert .reply__bubble { background: var(--c-surface-pink); color: var(--c-ink); }
.reply--alert .reply__who { color: var(--c-magenta-hover); }
.tracker__reply { margin-top: 8px; }

/* ---------- 26.7 Ачивки и стрик ---------- */
.flame-badge {
  width: 72px; height: 72px; border-radius: 22px; flex: none; display: flex; align-items: center; justify-content: center;
  background: #FFFFFF; box-shadow: 0 12px 30px rgba(43,31,44,.2);
}
.flame-badge--s { width: 44px; height: 44px; border-radius: 14px; box-shadow: none; }
.streak__unit { font-weight: 400; font-size: 18px; letter-spacing: 0; }
.streak__cal { gap: 6px; }
.streak__cal .streak__mark { max-width: 34px; }
.streak__date { font-size: 11px; font-variant-numeric: tabular-nums; }
.streak__day.is-out .streak__mark { background: transparent; box-shadow: none; }
.streak__day.is-out .streak__date { opacity: .5; }
.card--grad .streak__day.is-today .streak__mark { box-shadow: inset 0 0 0 2px #FFFFFF; }
.card--grad .streak__day.is-today.is-done .streak__mark { box-shadow: 0 0 0 3px rgba(255,255,255,.45); }
.ledger { list-style: none; display: flex; flex-direction: column; }
.ledger__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.ledger__row:last-child { border-bottom: 0; }
.ledger__date { font-size: var(--fs-xs); color: var(--fg-muted); }
.ledger__label { min-width: 0; overflow-wrap: anywhere; }
.ledger__amt { font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ledger__row.is-minus .ledger__amt, .ledger__row.is-minus .ledger__label { color: var(--fg-muted); }
.pts-head { --gap: 10px; align-items: baseline; }
.ach-group { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.ach-group + .ach-group { border-top: 1px solid var(--line); padding-top: 20px; }
.ach-group .sec-head { padding: 0; align-items: flex-start; }
.ach-group__title { font-size: 18px; }
@media (min-width: 720px) { .ach-group__title { font-size: 20px; } }
.ach-grid--s .ach { min-height: 112px; }

/* ---------- 26.8 Рейтинг и война команд ---------- */
.rating-head { display: flex; flex-direction: column; gap: 12px; }
.rating-head .split { flex-wrap: wrap; gap: 8px 12px; }
.rank tr.rank__link { cursor: pointer; }
/* ховер только там, где есть мышь: на телефоне он «прилипает» после тапа. Оттенок нейтральный,
   чтобы не путать с розовой строкой «это ты» */
@media (hover: hover) {
  .rank tr.rank__link:hover td { background: rgba(43,31,44,.04); }
  .rank tr.rank__link.is-me:hover td { background: var(--me-bg); }
}
.rank a.rank__name { color: var(--fg); }
.rank a.rank__name:hover { color: var(--accent-text); }
.rank .delta .flame { margin-right: 2px; }
.rank-pin {
  position: fixed; z-index: 55; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 0 auto; padding: 8px 18px 8px 8px; border: 0; border-radius: var(--r-pill);
  background: var(--c-ink); color: #FFFFFF; box-shadow: var(--shadow-bar); font-family: inherit; font-size: 15px; text-align: left; cursor: pointer;
  --inv-bg: #FFFFFF; --inv-fg: var(--c-ink); --fg: #FFFFFF; animation: k-toast-in .3s var(--ease-out);
}
.rank-pin .place { flex: none; background: rgba(255,255,255,.14); color: #FFFFFF; }
@media (min-width: 1024px) { .rank-pin { bottom: 20px; left: calc(var(--sidenav-w) + 32px); right: 32px; } }
/* пока плашка «Ты на N месте» видна, у экрана снизу запас на ее высоту: последняя ссылка не прячется под ней */
.view__in.has-pin { padding-bottom: 76px; }

.war-banner { flex-direction: row; align-items: center; gap: 12px; }
.war-stage { gap: 14px; overflow: hidden; }
.war-chart { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; height: 260px; padding-top: 8px; }
.war-col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; min-width: 0; }
.war-col__top { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-height: 44px; }
.war-col__pts { font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: -.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.war-crown { width: 22px; height: 22px; color: var(--c-magenta-2); animation: k-crown 2.4s ease-in-out infinite; }
.war-col__track { flex: 1; width: 100%; max-width: 72px; display: flex; align-items: flex-end; border-radius: 16px 16px 6px 6px; background: var(--track); }
.war-col__bar {
  display: block; width: 100%; height: 0; border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0) 45%), var(--team, var(--c-magenta-2));
  transition: height 1.1s var(--ease-out);
}
.war-chart.is-in .war-col__bar { height: calc(var(--h, 0) * 1%); }
.war-col:nth-child(2) .war-col__bar { transition-delay: .08s; }
.war-col:nth-child(3) .war-col__bar { transition-delay: .16s; }
.war-col:nth-child(4) .war-col__bar { transition-delay: .24s; }
.war-col.is-leader .war-col__bar { box-shadow: 0 -8px 28px rgba(204,14,129,.25); }
.war-col.is-mine .war-col__track { outline: 2px solid var(--c-magenta-2); outline-offset: 3px; }
.war-col__base { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 72px; max-width: 100%; min-width: 0; text-align: center; }
.team-tile.team-tile--s { width: 32px; height: 32px; border-radius: var(--r-icon-xs); font-size: 15px; }
.war-col__name { max-width: 100%; font-size: 12px; line-height: 1.2; color: var(--fg-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.war-col__me { font-size: 11px; font-weight: 700; color: var(--c-magenta-2); }
.war-share { display: flex; gap: 2px; height: 12px; border-radius: var(--r-pill); overflow: hidden; }
.war-share > span { flex-basis: 0; min-width: 4px; background: var(--team, var(--c-magenta-2)); }
@keyframes k-crown { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(-6deg); } }
@media (min-width: 720px) { .war-chart { height: 300px; gap: 16px; } .war-col__pts { font-size: 22px; } .war-col__name { font-size: 13px; } }
.war-cards { list-style: none; display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .war-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .war-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.war-card { gap: 14px; overflow: hidden; }
.war-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--team, var(--grad-line)); }
.war-card.is-mine { box-shadow: inset 0 0 0 2px var(--c-magenta-2); }
.war-card__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.war-card__name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 18px; line-height: 1.15; }
.war-card__pts { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.war-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-sm); color: var(--fg-soft); }
.war-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.war-card__wins { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 24px; color: var(--c-magenta-2); }
.war-card__wins .t-xs { margin-left: 4px; }
.war-card__film { display: flex; flex-direction: column; gap: 8px; }
/* мини-трекер без подписей (подпись этапа рядом текстом), для скринридера подписи остаются */
.stages--bare .stages__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 26.9 Куратор: проверка, посещаемость, фильм ---------- */
.review-card .task__head { align-items: center; }
.attach { display: inline-flex; gap: 6px; color: var(--fg-muted); }
.review-form { gap: 16px; }
@media (min-width: 1024px) { .review-form .action-bar { position: static; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } .review-form .action-bar > .btn { flex: 0 1 auto; } }
.action-bar .btn { white-space: normal; padding-left: 14px; padding-right: 14px; font-size: 15px; line-height: 1.15; }
.stepper { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 4px; border-radius: var(--r-pill); background: var(--well); }
.stepper .btn--soft { background: var(--c-surface); }
.stepper__val { min-width: 40px; text-align: center; font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.att-card { gap: 10px; }
.att-card.is-now { box-shadow: inset 0 0 0 2px var(--c-magenta-1); }
.att-card.is-cancelled .att-card__title { text-decoration: line-through; }
.att-card__title a { color: var(--fg); }
.att-card__title a:hover { color: var(--accent-text); }
.att-card__qr { align-self: center; }
.att-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-sm); color: var(--fg-soft); }
.att-counts b { color: var(--fg); font-variant-numeric: tabular-nums; }
.mark-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mark-group { display: flex; flex-direction: column; gap: 8px; }
.mark-group + .mark-group { margin-top: 14px; }
.mark-group__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.mark-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px; border-radius: var(--r-row); box-shadow: inset 0 0 0 1px var(--line); }
.mark-row__who { display: flex; align-items: center; gap: 10px; flex: 1 1 180px; min-width: 0; }
.mark-row__name { line-height: 1.2; overflow-wrap: anywhere; }
.mark-row__warn { margin-top: 4px; color: var(--c-warn); line-height: 1.3; }
/* призыв в соцрейтинге: прогресс дня и кнопка в ВК */
.soc-cta { gap: 12px; }
.soc-cta__title { font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: -.2px; margin-bottom: 4px; }
.soc-cta .btn { align-self: flex-start; }
.seg--marks { flex: 1 1 210px; }
.seg--marks .seg__label { min-height: 44px; padding: 6px 8px; font-size: 14px; }
.seg--marks .seg__label[disabled] { opacity: .5; cursor: not-allowed; }
.seg--marks .seg__label--present[aria-pressed="true"] { background: var(--c-ok); color: #FFFFFF; }
.seg--marks .seg__label--absent[aria-pressed="true"] { background: var(--c-magenta-2); color: #FFFFFF; }
.seg--marks .seg__label--excused[aria-pressed="true"] { background: var(--c-warn); color: #FFFFFF; }
.mark-row.is-flash { animation: k-flash .9s ease; }
@keyframes k-flash { 0% { background: var(--c-ok-bg); box-shadow: inset 0 0 0 2px var(--c-ok); } 100% { background: transparent; box-shadow: inset 0 0 0 1px var(--line); } }
.stage-list { list-style: none; display: flex; flex-direction: column; gap: var(--grid-gap); }
.stage-card { gap: 12px; }
.stage-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stage-card__dot { flex: none; }
.stage-card.is-done .stage-card__dot { background: var(--team, var(--accent-bg)); color: var(--team-fg, var(--accent-fg)); }
.stage-card.is-current .stage-card__dot { background: var(--inv-bg); color: var(--inv-fg); }
.stage-card.is-current { box-shadow: inset 0 0 0 2px var(--team, var(--c-magenta-2)); }
.stage-card.is-future { opacity: .6; }
.stage-card__name { display: block; font-weight: 700; font-size: 17px; line-height: 1.2; }
.stage-card__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: var(--fs-xs); font-weight: 400; color: var(--fg-muted); }
.stage-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.stage-card .fold__sum { background: transparent; padding: 0; min-height: 44px; font-weight: 400; }
.stage-card .fold[open] > .fold__sum { margin-bottom: 14px; }
.stage-form { padding-top: 4px; }

/* QR посещаемости на весь экран: белая страница, код по минимальной стороне экрана */
body.qr-mode { background: #FFFFFF; }
.qr-screen { display: flex; min-height: 100vh; min-height: 100svh; padding: calc(16px + env(safe-area-inset-top, 0px)) 24px calc(16px + env(safe-area-inset-bottom, 0px)); }
.qr-screen > .view__in { flex: 1; justify-content: center; }
.qr-view { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; margin: 0 auto; text-align: center; }
.qr-view__head { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 640px; }
.qr-view__head .skel { width: 240px; }
.qr-view__title { font-weight: 700; font-size: 24px; line-height: 1.1; letter-spacing: -.4px; }
.qr-view__code { width: min(calc(100vw - 48px), calc(100vh - 290px), 680px); width: min(calc(100vw - 48px), calc(100svh - 290px), 680px); min-width: 220px; aspect-ratio: 1; display: grid; place-items: center; }
.qr-view__img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.qr-view__skel { width: 100%; height: 100%; border-radius: 16px; }
.qr-view__count { font-size: 22px; line-height: 1.2; }
.qr-view__count b { font-weight: 700; font-size: 34px; font-variant-numeric: tabular-nums; }
.qr-view__timer { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(100%, 320px); }
.qr-view__timer .progress { width: 100%; }
.qr-view__closed { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; color: var(--fg); }
.qr-view--embedded .qr-view__code { width: min(100%, 420px); min-width: 0; }
.qr-embed { align-items: center; }

/* ---------- 26.10 Суперадмин ---------- */
.kpis { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px; border-radius: var(--r-inner); background: var(--c-surface); }
.kpi__val { font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi__cap { font-size: var(--fs-xs); color: var(--c-text-muted); }
.kpi__sub { font-size: 12px; color: var(--c-text-muted); }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); } .kpis.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.team-sums { display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .team-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .team-sums { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.team-sum { gap: 12px; }
.team-sum__facts { list-style: none; flex-direction: column; }
.team-sum__facts li { display: flex; align-items: center; gap: 6px; }
.team-sum__facts b { color: var(--fg); }
.lag-flags { margin-top: 6px; }
.feed { list-style: none; display: flex; flex-direction: column; }
.feed__row { display: flex; gap: 12px; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed__row:last-child { border-bottom: 0; }
.feed__body { flex: 1; min-width: 0; }
.feed__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--fs-xs); }
.feed__text { margin-top: 2px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.feed__req { margin-top: 4px; font-size: var(--fs-xs); font-style: italic; color: var(--fg-muted); overflow-wrap: anywhere; }
.person.is-inactive { opacity: .6; }
/* матрица посещаемости: листается внутри карточки, первая колонка закреплена */
.mx-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-field); }
.mx-wrap:focus-visible { box-shadow: var(--ring); }
.mx { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: var(--fs-sm); }
.mx th, .mx td { padding: 0; }
.mx__corner, .mx__who { position: sticky; left: 0; z-index: 2; background: var(--c-surface); text-align: left; }
.mx__corner { padding: 8px 10px 8px 0; vertical-align: bottom; font-weight: 400; font-size: var(--fs-xs); color: var(--fg-muted); }
.mx__who { width: 1%; white-space: nowrap; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); box-shadow: 1px 0 0 var(--line); font-weight: 400; }
.mx__person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mx__name { display: block; max-width: 150px; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx__pct { display: block; padding-left: 32px; font-size: 12px; color: var(--fg-muted); }
.mx__ev { min-width: 52px; max-width: 76px; padding: 8px 4px; vertical-align: bottom; text-align: center; font-weight: 400; }
.mx__date { display: block; font-weight: 700; font-size: 12px; white-space: nowrap; }
.mx__evt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; line-height: 1.15; color: var(--fg-muted); }
.mx__cell { height: 44px; text-align: center; border-bottom: 1px solid var(--line); }
.mx__cell .icon { display: inline-block; vertical-align: middle; }
.mx__cell.is-present { color: var(--c-ok); }
.mx__cell.is-absent { color: var(--c-danger); }
.mx__cell.is-na { color: var(--fg-muted); }
.mx__dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c-warn); vertical-align: middle; }
.mx tfoot th, .mx__tot { padding: 10px 4px; text-align: center; font-weight: 700; font-size: 12px; white-space: nowrap; }
.mx tfoot .mx__who { text-align: left; border-bottom: 0; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; }
.mx-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mx-legend .icon { display: inline-block; }
.mx-ev-bar { display: block; margin-top: 8px; }
.film-cols { display: grid; gap: var(--grid-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .film-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .film-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.film-col { gap: 14px; }
.film-col__full { display: none; }
@media (min-width: 1024px) {
  .film-col__full { display: block; }
  .film-col__fold, .film-col__row .stages { display: none; }
}

/* ---------- 26.11 Анимации геймификации ---------- */
/* продление стрика: карточка выезжает под шапкой, огонь разгорается, число дней перелистывается */
.burst {
  position: fixed; z-index: 90; inset: 0; display: flex; justify-content: center; align-items: flex-start;
  padding: calc(var(--appbar-h) + 24px + env(safe-area-inset-top, 0px)) 16px 0; pointer-events: none;
  background: rgba(244,239,233,.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: k-fade-in .3s ease both;
}
.burst.is-leaving { animation: k-fade-out .45s ease forwards; }
@keyframes k-fade-in { from { opacity: 0; } }
@keyframes k-fade-out { to { opacity: 0; } }
.burst__card {
  pointer-events: auto; display: flex; align-items: center; gap: 16px; max-width: 100%;
  padding: 18px 24px 18px 18px; border-radius: var(--r-card); background: var(--c-ink); color: #FFFFFF;
  box-shadow: var(--shadow-pop), 0 0 0 2px rgba(246,185,208,.45); animation: k-burst-in .55s var(--ease-out) both; cursor: pointer;
}
.burst__flame { position: relative; display: flex; flex: none; }
.burst__flame::before {
  content: ""; position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(247,160,114,.55), rgba(204,14,129,0) 66%); animation: k-glow 1.6s ease-in-out infinite;
}
.burst__flame .flame { --fs: 72px; animation: k-flame-rise .8s var(--ease-out) both, k-flicker 2.6s .8s ease-in-out infinite; }
.burst__body { min-width: 0; }
.burst__num { display: grid; height: 56px; overflow: hidden; font-weight: 700; font-size: 56px; line-height: 56px; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.burst__old, .burst__new { grid-area: 1 / 1; }
.burst__old { animation: k-num-out .5s .55s var(--ease-out) forwards; }
.burst__new { color: var(--c-pink-text); transform: translateY(100%); animation: k-num-in .5s .55s var(--ease-out) forwards; }
.burst__cap { margin-top: 4px; font-size: 15px; color: var(--c-on-dark-soft); }
.burst__pts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.burst__pts .pts--chip { background: rgba(255,255,255,.12); color: #FFFFFF; }
.burst__pts .burst__bonus { background: var(--grad-brand); }
.burst.is-leaving .burst__card { animation: k-burst-out .45s ease-in forwards; }
@keyframes k-burst-in { from { opacity: 0; transform: translateY(-24px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes k-burst-out { to { opacity: 0; transform: translateY(-40px) scale(.85); } }
@keyframes k-flame-rise { 0% { opacity: 0; transform: translateY(16px) scale(.4); } 60% { opacity: 1; transform: translateY(-4px) scale(1.12); } 100% { transform: none; } }
@keyframes k-num-out { to { opacity: 0; transform: translateY(-100%); } }
@keyframes k-num-in { to { transform: translateY(0); } }
@keyframes k-glow { 50% { opacity: .7; transform: scale(1.15); } }
.streak-pill.is-bump .flame { animation: k-flicker .8s ease-in-out 2; }

/* новая ачивка: иконка выпрыгивает, искры разлетаются */
.modal__icon--pop { position: relative; animation: k-icon-pop .7s .1s var(--ease-out) both; }
.modal__icon--dark { background: rgba(255,255,255,.1); color: #FFFFFF; box-shadow: none; }
.sparks { position: absolute; inset: 0; pointer-events: none; }
.sparks i {
  position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 2px; background: #FFFFFF; opacity: 0;
  transform: rotate(calc(var(--i) * 25.7deg)) translateY(-20px); animation: k-spark 1.1s .35s var(--ease-out) forwards;
}
.sparks i:nth-child(3n) { width: 6px; height: 6px; border-radius: 50%; background: #FFD9C7; }
.sparks i:nth-child(3n+1) { background: var(--c-pink-text); }
@keyframes k-spark {
  0% { opacity: 1; transform: rotate(calc(var(--i) * 25.7deg)) translateY(-24px) scale(1); }
  100% { opacity: 0; transform: rotate(calc(var(--i) * 25.7deg)) translateY(-92px) scale(.4); }
}
@keyframes k-icon-pop { 0% { opacity: 0; transform: scale(.3) rotate(-12deg); } 60% { opacity: 1; transform: scale(1.12) rotate(4deg); } 100% { transform: none; } }
.modal__nom { color: rgba(255,255,255,.92); }
.pts--on-grad { background: rgba(255,255,255,.2); color: #FFFFFF; }
.btn--on-grad, .btn--on-grad:hover { color: #FFFFFF; }
.btn--on-grad:hover { background: rgba(255,255,255,.14); }
.modal__card--plain { align-items: stretch; text-align: left; }

/* отметка по QR: галочка цветом команды рисуется */
.checkin { gap: 18px; padding-top: 40px; padding-bottom: 40px; }
.check-hero {
  width: 120px; height: 120px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--team, var(--grad-brand)); color: var(--team-fg, #FFFFFF); box-shadow: var(--shadow-glow);
}
.check-hero.is-wait { background: var(--c-bg); color: var(--fg-muted); box-shadow: none; animation: k-pulse-soft 1.4s ease-in-out infinite; }
.check-hero.is-wait .icon { width: 48px; height: 48px; }
.check-hero__svg { width: 72px; height: 72px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.check-hero__svg circle { stroke-width: 3; opacity: .35; }
.check-hero.is-new { animation: k-pop-in .5s var(--ease-out); }
.check-hero.is-new path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: k-draw .5s .25s ease-out forwards; }
@keyframes k-draw { to { stroke-dashoffset: 0; } }
@keyframes k-pop-in { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: none; } }

/* сканер QR внутри кабинета (BarcodeDetector) */
.scanner { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-inner); overflow: hidden; background: #000000; }
.scanner__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scanner__frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.9); border-radius: 20px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }

/* ---------- 27. Фото профиля, гид первого входа, модалка ВК (16.10) ---------- */
/* фото поверх инициалов: если не загрузилось, img убирается (widgets.js) и видны инициалы */
.avatar__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar--photo { background: var(--well, #EEE8E1); }

.avatar-edit { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.avatar-edit__pick { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.avatar-edit__pick:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.avatar-edit__badge {
  position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--c-ink); color: #FFFFFF;
  box-shadow: 0 0 0 3px var(--c-surface);
}
.avatar-edit__badge .icon { width: 16px; height: 16px; }
.avatar-edit__preview { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 3px var(--c-surface-pink); }
.avatar-edit__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.avatar-edit .progress { width: 140px; }
.avatar-edit__note { max-width: 280px; }

/* гид: на телефоне лист снизу на весь экран, на десктопе карточка 480 */
.modal--guide { max-width: 480px; }
.guide { --card-gap: 14px; align-items: stretch; text-align: left; min-height: 520px; max-height: calc(100dvh - 32px); }
.guide__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -10px -4px 0; }
.guide__skip { min-height: 40px; }
.guide__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 0 6px; }
.guide__step { display: flex; flex-direction: column; gap: 10px; }
.guide__step.is-fwd { animation: k-guide-fwd .28s var(--ease-out); }
.guide__step.is-back { animation: k-guide-back .28s var(--ease-out); }
@keyframes k-guide-fwd { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes k-guide-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.guide__icon {
  width: 72px; height: 72px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: var(--grad-brand); color: #FFFFFF; margin-bottom: 6px;
}
.guide__icon .icon { width: 36px; height: 36px; }
.guide__count { font-size: var(--fs-xs); color: var(--fg-muted); font-weight: 700; letter-spacing: .3px; }
.guide__title { font-weight: 700; font-size: 28px; line-height: 1.05; letter-spacing: -.5px; }
.guide__text { font-size: var(--fs-body); line-height: 1.45; color: var(--fg-soft); }
.guide__groups { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.guide__group { background: var(--well, #F4EFE9); border-radius: 16px; padding: 10px 14px; }
.guide__group-head { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); }
.guide__group-head span { color: var(--accent-text); font-weight: 700; white-space: nowrap; }
.guide__names { font-size: var(--fs-xs); line-height: 1.35; color: var(--fg-muted); margin-top: 2px; }
.guide__note { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); font-weight: 700; color: var(--accent-text); }
.guide__note .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.guide__note--soft { font-weight: 400; color: var(--fg-soft); }
.guide__foot { display: flex; flex-direction: column; gap: 14px; }
.guide__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.guide__dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong, #DDD3CB); transition: width .25s var(--ease-out), background .25s ease; }
.guide__dots i.is-on { width: 22px; background: var(--c-magenta-2); }
.guide__nav { display: flex; gap: 8px; }
.guide__nav .btn { flex: 1; padding-left: 16px; padding-right: 16px; }
.guide__nav [data-prev][hidden] { display: none; }
@media (max-width: 719px) {
  .modal--guide { width: 100%; max-width: none; max-height: 100dvh; margin: auto 0 0; }
  .modal--guide[open] { animation: k-sheet .32s var(--ease-out); }
  .guide { height: min(700px, 100dvh); min-height: 0; max-height: 100dvh; border-radius: var(--r-card) var(--r-card) 0 0;
    padding-bottom: calc(var(--pad-card) + env(safe-area-inset-bottom, 0px)); }
  .guide__title { font-size: 26px; }
}
@keyframes k-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* модалка «привяжи ВК и подпишись» */
.modal--vk { max-width: 460px; }
.vkp { --card-gap: 14px; }
.vkp__head { display: flex; align-items: center; gap: 10px; }
.vkp__steps { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.vkp__step { display: flex; gap: 12px; align-items: flex-start; background: var(--well, #F4EFE9); border-radius: 18px; padding: 12px 14px; }
.vkp__mark {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--c-surface); color: var(--c-ink); font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--line-strong, #DDD3CB);
}
.vkp__step.is-done .vkp__mark { background: var(--c-ok); color: #FFFFFF; box-shadow: none; }
.vkp__mark .icon { width: 16px; height: 16px; }
.vkp__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.vkp__label { font-weight: 700; line-height: 1.3; padding-top: 3px; }
.vkp__cap { font-size: var(--fs-xs); color: var(--fg-muted); margin-top: -4px; }
.vkp__hint { font-size: var(--fs-xs); line-height: 1.4; color: var(--fg-soft); }
.vkp__msg { font-size: var(--fs-sm); line-height: 1.4; color: var(--c-ok); }
.vkp__msg--warn { color: var(--c-warn); }
.vkp__form { align-self: stretch; }
.vkp .btn-row .btn { white-space: normal; }

/* профиль: строка про подписку */
.vk-sub { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.vk-sub .icon { width: 18px; height: 18px; flex: none; }
.vk-sub--ok { color: var(--c-ok); font-weight: 700; }
button.card__more { align-self: flex-start; padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
button.card__more:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: 6px; }

/* ---------- Режим «Посмотреть как» (20_api.md 3.9) ----------
   Яркая плашка фиксирована сверху на всех экранах; шапка, боковое меню и контент сдвигаются на ее высоту. */
:root { --viewas-h: 0px; }
body.is-viewas { --viewas-h: calc(44px + env(safe-area-inset-top, 0px)); padding-top: var(--viewas-h); }
.viewas-bar {
  position: fixed; z-index: calc(var(--z-tabbar) + 5); top: 0; left: 0; right: 0; height: var(--viewas-h);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0; background: var(--grad-brand); color: #FFFFFF;
  box-shadow: 0 2px 12px rgba(204,14,129,.35); display: flex; align-items: center; justify-content: center;
}
.viewas-bar__in { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; font-size: 15px; line-height: 1.2; }
.viewas-bar__icon { flex: none; width: 20px; height: 20px; }
.viewas-bar__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewas-bar__text b { font-weight: 700; }
.viewas-bar__sep { flex: none; opacity: .8; }
.viewas-bar__exit {
  flex: none; min-height: 32px; padding: 4px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: #FFFFFF; color: var(--c-magenta-2); font: inherit; font-weight: 700;
}
.viewas-bar__exit:hover { background: var(--c-surface-pink); }
.viewas-bar__exit:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.9); }
.viewas-bar__exit:disabled { opacity: .7; cursor: default; }
body.is-viewas .appbar { top: var(--viewas-h); padding-top: 0; }
@media (min-width: 1024px) {
  body.is-viewas .sidenav { top: var(--viewas-h); height: calc(100vh - var(--viewas-h)); height: calc(100dvh - var(--viewas-h)); }
}
@media (max-width: 399px) { .viewas-bar__in { font-size: 14px; gap: 6px; } .viewas-bar__icon { display: none; } }
.person .viewas-btn { white-space: nowrap; }
@media (max-width: 479px) { .person .viewas-btn span { display: none; } .person .viewas-btn { width: 44px; padding: 0; justify-content: center; } }

/* ---------- Анкета ученика из заявки (куратор своей команды, суперадмин) ----------
   Модалка шире обычной и прокручивается внутри. На 360px короткие факты по два в ряд, длинное на всю ширину.
   Длинные адреса, почты и «о себе» переносятся (overflow-wrap), горизонтальной прокрутки нет. */
.modal--anketa { max-width: 560px; }
.modal--anketa .modal__card { overflow-x: hidden; overflow-y: auto; max-height: calc(100dvh - 32px); overscroll-behavior: contain; --card-gap: 18px; }
/* карточка прокручивается целиком, «Закрыть» липнет к ее верху: на телефоне Escape нет, кнопка всегда под рукой.
   Отрицательные поля возвращают кнопку на место absolute-версии (12px от углов) и не сдвигают шапку вниз. */
.modal--anketa .modal__close {
  position: sticky; top: 12px; z-index: 2; align-self: flex-end; flex: none;
  margin: calc(12px - var(--pad-card)) calc(12px - var(--pad-card)) calc(var(--pad-card) - 56px - var(--card-gap)) 0;
  background: linear-gradient(var(--well), var(--well)), var(--c-surface);
}
.anketa { min-width: 0; }
.anketa__head { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 40px; }
.anketa__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.anketa__name { font-weight: 700; font-size: var(--fs-h3); line-height: var(--lh-title); letter-spacing: var(--ls-h3); overflow-wrap: anywhere; }
.anketa__sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.anketa__title { font-weight: 700; font-size: 17px; line-height: 1.2; }
.anketa__sub { font-weight: 700; font-size: var(--fs-sm); color: var(--fg-soft); margin: 0 0 6px; }
.kv.anketa__kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.anketa__kv .kv__wide { grid-column: 1 / -1; }
.anketa__kv dd { overflow-wrap: anywhere; }
.anketa__kv dd a { font-weight: 700; }
.anketa__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
/* у .badge flex: none и nowrap: длинный org_text шире карточки; здесь бейдж сжимается и переносится */
.anketa__tags .badge { flex: 0 1 auto; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.anketa__tags--row { margin-top: 6px; }
.anketa__about-box { background: var(--well); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.anketa__k { display: block; font-size: var(--fs-xs); color: var(--fg-muted); }
.anketa__about { margin-top: 4px; font-size: 15px; line-height: var(--lh-body); white-space: pre-line; overflow-wrap: anywhere; }
.anketa__link { display: inline-flex; align-items: flex-start; gap: 6px; max-width: 100%; font-weight: 700; overflow-wrap: anywhere; word-break: break-word; }
.anketa__link .icon { flex: none; margin-top: 3px; }
.anketa__link span { min-width: 0; }
.anketa__raw { overflow-wrap: anywhere; word-break: break-word; }
.anketa__ready { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.anketa__ready li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--well); border-radius: 14px; padding: 10px 12px; }
.anketa__ready-q { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.anketa__ready-q b { font-size: 15px; }
.anketa__contacts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 560px) { .anketa__contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.anketa__person { min-width: 0; }
.kv.anketa__kv.anketa__kv--one, .anketa__person .kv.anketa__kv { grid-template-columns: minmax(0, 1fr); }
.anketa__note { padding: 0; }
.anketa-row { align-items: flex-start; }
.anketa-row .avatar { margin-top: 2px; }
.anketa-row .row__end { align-self: center; }
.anketa-row__part { display: inline-flex; gap: 4px; vertical-align: 1px; }
.anketa-row.is-test .row__title { color: var(--fg-soft); font-weight: 400; }

/* ---------- согласие по документу 2026 v2 (app/consent_doc.py): страница родителя и карточка ученика ---------- */
.cdoc-short { background: var(--well); border-radius: var(--r-field); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.cdoc-short__title { font-weight: 700; font-size: var(--fs-sm); color: var(--fg); }
.cdoc-short ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); line-height: 1.45; color: var(--fg-soft); }
.cdoc-short__note { font-size: var(--fs-xs); line-height: 1.4; color: var(--fg-muted); }
.cdoc-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cdoc-items { display: flex; flex-direction: column; gap: 14px; border: 0; padding: 0; margin: 0; min-width: 0; }
.cdoc-items__legend { padding: 0; margin-bottom: 14px; font-weight: 700; font-size: var(--fs-body); color: var(--fg); }
.cdoc-item__title { display: block; font-weight: 700; color: var(--fg); }
.cdoc-item__ref { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--fg-muted); }
.cdoc-item__ref a { color: var(--accent-text); }
.cdoc-patr { display: none; flex-direction: column; gap: 8px; margin-left: 40px; }
.cdoc-form:has(input[name="distribution"]:checked) .cdoc-patr, .cdoc-form[data-dist="1"] .cdoc-patr { display: flex; }
.cdoc-form[data-dist="0"] .cdoc-patr { display: none; }
.cdoc-patr__label { font-size: var(--fs-sm); font-weight: 700; color: var(--fg); }
.cdoc-patr .seg { max-width: 360px; }
.cdoc-need { display: none; font-size: var(--fs-xs); color: var(--fg-muted); }
.cdoc-form:has([data-required]:not(:checked)) .cdoc-need, .cdoc-form[data-ready="0"] .cdoc-need { display: block; }
.cdoc-form[data-ready="1"] .cdoc-need { display: none; }
.cdoc-form:has([data-required]:not(:checked)) [data-go] { opacity: .5; pointer-events: none; }
.kv.cdoc-kv { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 380px) { .cdoc-patr { margin-left: 0; } }
/* карточка «Подтверди согласие участника» на «Сегодня» ученика: заметная, кабинет не блокирует */
.consent-card { box-shadow: 0 0 0 2px rgba(204,14,129,.32); }
.consent-card--done { box-shadow: none; background: transparent; padding: 0; }
.consent-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.consent-card__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 1024px) { .consent-card__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; } }
/* карточка «Важно: укажи почту родителя» над согласием участника: акцент сильнее, после отправки только плашка */
.pmail { box-shadow: 0 0 0 2px var(--c-magenta-2); }
.pmail--done { box-shadow: none; background: transparent; padding: 0; }
.pmail .card__title { color: var(--c-magenta-hover); }
.pmail__done { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.pmail__change {
  -webkit-appearance: none; appearance: none; border: 0; background: none; padding: 2px 0; margin: 0;
  font: inherit; font-size: var(--fs-xs); color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.pmail__change:hover { text-decoration-thickness: 2px; }
/* бонусы за согласия (app/consent_points.py): подсказка +20 на карточке «Сегодня» и в профиле */
.cbonus { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-field); background: var(--c-surface-pink); color: var(--c-ink); font-size: var(--fs-sm); line-height: 1.4; }
.cbonus > .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--c-magenta-2); }
.cbonus b { color: var(--c-magenta-hover); white-space: nowrap; }
.cbonus.is-done { background: var(--c-ok-bg); }
.cbonus.is-done > .icon, .cbonus.is-done b { color: var(--c-ok); }
/* сканы бумажного бланка у суперадмина (admin.js consents) */
.scan { --card-gap: 12px; }
.scan__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.scan__head .badge { vertical-align: 2px; margin-left: 4px; }
.scan__states .badge .icon { width: 14px; height: 14px; }
.scan__meta { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--fg-soft); }
.scan__img { position: relative; display: block; border-radius: var(--r-field); overflow: hidden; background: var(--well); }
.scan__img img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
/* схема 12: страницы скана; две и больше на широком экране рядом, на телефоне друг под другом */
.scan__pages { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .scan__pages--multi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.scan__page-no { position: absolute; top: 8px; left: 8px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-surface); color: var(--fg); font-size: var(--fs-xs); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.scan__files { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 0; }
/* страницы скана у ученика в профиле: превью, имя, размер, удалить */
.scan-pages { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; align-self: stretch; min-width: 0; }
.scan-page { display: flex; align-items: center; gap: 10px; min-width: 0; background: var(--well); border-radius: var(--r-field); padding: 6px 4px 6px 6px; }
.scan-page__thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--c-surface); color: var(--fg-soft); }
.scan-page__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-page__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.scan-page__name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-page__size { font-size: var(--fs-xs); color: var(--fg-muted); }
.scan__reject { display: flex; flex-direction: column; gap: 10px; }
.scan__reject[hidden], .scan__actions[hidden] { display: none; }
.scan__reject .chips { gap: 6px; }
.scan__actions { display: flex; gap: 10px; }
.scan__actions > .btn { flex: 1; }
.scan__reject .chip { min-height: 40px; padding: 8px 14px; font-size: var(--fs-sm); }

/* ---------- проверка работ суперадмином (screens/reviews.js, 10_product.md 8.11) ---------- */
.kpi--link { color: inherit; text-decoration: none; transition: var(--t-fast); }
.kpi--link:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.kpi--link .kpi__cap { color: var(--accent-text); }
.rv-filters { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rv-filter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rv-filter__label { font-size: var(--fs-xs); color: var(--fg-muted); padding: 0 4px; }
.rv-filter .chip { min-height: 40px; padding: 8px 14px; font-size: var(--fs-sm); }
.chip .count { margin-left: 2px; }
.chip[aria-pressed="true"] .count { background: #FFFFFF; color: var(--c-magenta-2); }
.rv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0 4px; }
.rv-bar .btn--text { padding-left: 6px; padding-right: 6px; }
.rv-all { margin-left: auto; align-items: center; }
.rv-all .consent__text { padding-top: 0; color: var(--fg); }
.rv-card { --card-gap: 12px; }
.rv-card.is-picked { box-shadow: 0 0 0 2px rgba(204,14,129,.45); }
.rv-card.is-test { background: var(--well); }
.rv-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rv-card__head .badge { vertical-align: 2px; margin-left: 2px; }
.rv-card__check { display: inline-flex; flex: none; cursor: pointer; padding: 6px; margin: -6px 0 -6px -6px; }
.rv-card__who { min-width: 0; }
.rv-card__task { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: var(--fs-sm); line-height: 1.5; }
.rv-long > .rv-long__sum { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.rv-long > .rv-long__sum::-webkit-details-marker { display: none; }
.rv-long__more { font-size: var(--fs-sm); font-weight: 700; color: var(--accent-text); }
.rv-long[open] > .rv-long__sum { display: none; }
.rv-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-card__actions[hidden], .rv-return[hidden] { display: none; }
.rv-return { gap: 10px; }
.rv-card__result { margin: 0; }
.rv-who { margin-top: 2px; }
.rv-bulk { align-items: center; flex-wrap: wrap; }
.rv-bulk[hidden] { display: none; }
.rv-all .check, .rv-card__check .check { background: var(--c-surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.rv-all input:focus-visible + .check, .rv-card__check input:focus-visible + .check { box-shadow: var(--ring); }
.rv-bulk > .btn { flex: 1 1 auto; }
.rv-bulk__n { flex: 1 0 100%; font-weight: 700; font-size: var(--fs-sm); padding: 0 4px; }
@media (min-width: 720px) { .rv-bulk__n { flex: 0 0 auto; margin-right: auto; } .rv-bulk > .btn { flex: 0 1 auto; } }
/* выбор для встречи у принятого вопроса (25.10): кто выбрал, кто снял, список для встречи */
.rv-pick { margin: 0; }
.rv-unpick { padding: 0 4px; }
.rv-meet__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0; }
.rv-meet__head .card__title { margin: 0; }
.rv-meet__head > .grow { flex: 1 1 260px; min-width: 0; }
.rv-meet__text { width: 100%; font-size: var(--fs-sm); white-space: pre-wrap; }

/* ---------- задание «Название команды»: бюллетень, итоги, ход у куратора (решение 21.10) ---------- */
.tn-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tn-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-row); background: var(--well); min-height: 52px; }
label.tn-opt { cursor: pointer; transition: var(--t-fast); }
label.tn-opt:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tn-opt input:checked ~ .tn-opt__name { font-weight: var(--fw-bold); }
.tn-opt.is-off { opacity: .5; cursor: default; }
.tn-opt.is-mine { color: var(--fg-muted); }
/* квадратик отметки виден на фоне строки: светлый фон и обводка (у .check и .tn-opt был один фон --well) */
.tn-opt .check { background: var(--c-surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tn-opt input:focus-visible ~ .check { box-shadow: var(--ring); }
.tn-opt.is-mine .check { opacity: .35; }
.tn-opt.is-static { min-height: 44px; }
.tn-opt__name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-body); }
.tn-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tn-result { display: grid; gap: 8px; }
.tn-result__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.tn-result__name { font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.tn-result__votes { margin-left: auto; font-size: var(--fs-sm); color: var(--fg-muted); white-space: nowrap; }
.tn-result__votes b { color: var(--fg); font-variant-numeric: tabular-nums; }
.tn-result:not(.is-winner) .progress__bar { background: var(--line-strong); }
.tn-result .btn { justify-self: start; }
.tn-people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tn-person { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); background: var(--well); font-size: var(--fs-xs); color: var(--fg-muted); }
.tn-person.is-done { color: var(--fg); }
.tn-person.is-done .icon { color: var(--c-ok); }
.tn-grid { display: grid; gap: var(--page-gap, 16px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.tn-group { display: grid; gap: 6px; }
.tn-group__title { margin: 0; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--fg-soft); }
/* управление голосованием отдельно от бюллетеня: внизу карточки, за линией */
.tn-manage { padding-top: 14px; border-top: 1px solid var(--line); }
.tn-due { margin: 0; }

/* ---------- задание-опрос (track = poll, решение 24.10): форма дат, сводка по дням ---------- */
.poll-dates { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.poll-dates > legend { padding: 0 0 0 6px; margin-bottom: 4px; font-weight: var(--fw-bold); color: var(--fg); font-size: var(--fs-sm); }
.poll-dates__grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .poll-dates__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.poll-dates input[type="date"] { min-height: 56px; text-align: left; }
.poll-dates input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.poll-dates[disabled] { opacity: .45; }
.poll-or { display: flex; align-items: center; gap: 12px; color: var(--fg-muted); font-size: var(--fs-xs); }
.poll-or::before, .poll-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.poll-none { align-items: center; padding: 14px 16px; border-radius: var(--r-row); background: var(--well); min-height: 56px; }
.poll-none .check { background: var(--c-surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.poll-none input:focus-visible ~ .check { box-shadow: var(--ring); }
.poll-none__text { font-size: var(--fs-body); }
.poll-form.is-none .poll-none { box-shadow: inset 0 0 0 1.5px var(--c-magenta-2); }
.poll-form .textarea { min-height: 96px; }
.poll-answer__main { margin: 0; font-weight: var(--fw-bold); font-size: var(--fs-body); }
.poll-answer__comment { margin: 0; }
.poll-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.poll-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-row); background: var(--well); min-width: 0; }
.poll-kpi b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.poll-kpi span { font-size: var(--fs-xs); color: var(--fg-muted); line-height: 1.25; }
.poll-kpi.is-wait b { color: var(--c-magenta-2); }
.poll-best { margin: 0; font-size: var(--fs-sm); }
.poll-days > summary { cursor: pointer; padding: 4px 0; }
.poll-bars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.poll-bar { display: grid; grid-template-columns: 76px minmax(0, 1fr) 28px; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.poll-bar__day { white-space: nowrap; font-variant-numeric: tabular-nums; }
.poll-bar__wd { color: var(--fg-muted); }
.poll-bar.is-weekend .poll-bar__day, .poll-grid tr.is-weekend th { color: var(--fg-muted); }
.poll-bar__n { text-align: right; font-variant-numeric: tabular-nums; }
.poll-bar:not(.is-best) .progress__bar { background: var(--line-strong); }
.poll-bar.is-best .poll-bar__n b { color: var(--c-magenta-2); }
.poll-grid { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: var(--fs-xs); }
.poll-grid th, .poll-grid td { padding: 6px 4px; text-align: center; white-space: nowrap; }
.poll-grid thead th { color: var(--fg-muted); font-weight: 400; vertical-align: bottom; }
.poll-grid thead th:first-child, .poll-grid tbody th { text-align: left; }
.poll-grid tbody th { font-weight: 400; font-variant-numeric: tabular-nums; }
.poll-grid tr.is-best th { font-weight: var(--fw-bold); color: var(--c-magenta-2); }
.poll-grid__c { border-radius: 6px; background: var(--well); font-weight: var(--fw-bold); min-width: 32px; }
.poll-grid__tn { display: block; margin: 2px auto 0; font-weight: var(--fw-bold); }
.poll-grid thead th .team-dot { display: block; margin: 0 auto; }
.poll-grid__note { margin: 6px 0 0; }
.poll-groups { display: grid; gap: 8px; }
@media (min-width: 960px) { .poll-groups { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.poll-group { border-radius: var(--r-row); background: var(--well); }
.poll-group__sum { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.poll-group__sum .t-muted { font-weight: 400; margin-left: auto; }
.poll-group__body { padding: 0 10px 12px; }
.poll-group .poll-person { background: var(--c-surface); }
.poll-card .card__head .cluster { align-items: center; }
.poll-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.poll-person { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: var(--r-row); background: var(--well); }
.poll-person__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.poll-person__name { font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.poll-person__ans { font-size: var(--fs-sm); }
.poll-person__ans.is-none { color: var(--fg-muted); }
.poll-person__comment { font-size: var(--fs-xs); color: var(--fg-soft); overflow-wrap: anywhere; }
.poll-teams-wrap { overflow-x: auto; margin: 0 -4px; }
.poll-teams { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.poll-teams th, .poll-teams td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.poll-teams thead th { color: var(--fg-muted); font-weight: 400; }
.poll-teams tbody th { font-weight: var(--fw-bold); white-space: nowrap; }

/* ---------- 28. Знатика: онлайн-курс киношколы (решение владельца 27.10; spec/10_product.md 3.5, 3.10, 3.11, 5.10, 5.10a) ----------
   Фиолетовая линия поверх стилей кабинета: токены на .zn (группа, экран, плитка, карточка) и на модалках/плашке.
   Внутри .zn акцентные токены кабинета (плитки, очки, полосы прогресса, метка «новая») становятся фиолетовыми.
   Белый мелкий текст на градиенте лежит на подложке с легким затемнением слева (контраст не ниже 3.9:1, как у фирменного градиента). */
.zn, .modal--zn, .burst--zn, .modal--zi {
  --zn-1: #8E6CFF; --zn-2: #5B2EE0; --zn-grad: linear-gradient(135deg, #9D7BFF, #5B2EE0); --zn-soft: #EEE8FF; --zn-ink: #22163F;
  --zn-veil: linear-gradient(100deg, rgba(34,22,63,.16), rgba(34,22,63,0) 65%);
}
.zn {
  --accent-bg: var(--zn-grad); --accent-fg: #FFFFFF; --accent-text: var(--zn-2);
  --bar-a: #9D7BFF; --bar-b: var(--zn-2); --inv-bg: var(--zn-ink); --inv-fg: #FFFFFF;
  --shadow-glow: 0 8px 22px rgba(91,46,224,.32);
}
.zn a:not([class]):hover, .zn .card__more:hover { color: #4220B8; }

/* плитка ачивки Знатики (на любом экране: группа, экран всех 20, карточка ученика, куратор) */
.ach.zn .ach__icon { background: var(--zn-grad); color: #FFFFFF; }
.ach.zn .pts { color: var(--zn-2); }
.ach.zn .progress__bar { background: linear-gradient(90deg, #9D7BFF, var(--zn-2)); }
.ach.zn.is-locked .ach__icon { background: var(--zn-soft); color: #9C8CCB; }
.ach.zn.is-locked .pts--minus { color: var(--zn-2); }
.ach.zn.is-new .ach__icon { box-shadow: 0 0 0 6px rgba(141,108,255,.18); }
.ach.zn.is-new::after { background: var(--zn-ink); color: #FFFFFF; }
/* темная плитка: мастера блоков, «Кинодел», «Первая пятерка» */
.ach.zn-rank { background: var(--zn-ink); color: #FFFFFF; --fg: #FFFFFF; --fg-soft: rgba(255,255,255,.78); --fg-muted: rgba(255,255,255,.66); --track: rgba(255,255,255,.15); }
.ach.zn-rank .ach__icon { background: #FFFFFF; color: var(--zn-2); }
.ach.zn-rank.is-locked .ach__icon { background: rgba(255,255,255,.12); color: rgba(255,255,255,.66); }
.ach.zn-rank .pts { color: #C9B8FF; }
.ach.zn.zn-rank .pts--minus { color: #C9B8FF; }
.ach.zn-rank .progress__bar { background: linear-gradient(90deg, #C9B8FF, #FFFFFF); }
.ach.zn-rank.is-new::after { background: #FFFFFF; color: var(--zn-ink); }
/* только что полученная: плитка один раз загорается (после модалки новой ачивки) */
.flip-earn { animation: k-zn-earn 1.2s cubic-bezier(.16,1,.3,1) both; }
@keyframes k-zn-earn {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(141,108,255,.35), 0 20px 40px rgba(91,46,224,.25); }
  100% { transform: none; box-shadow: 0 0 0 3px rgba(141,108,255,.25); }
}
.tile.zn, .zn .tile { background: var(--zn-grad); color: #FFFFFF; }
.badge--zn { background: var(--zn-soft, #EEE8FF); color: var(--zn-2, #5B2EE0); }
@media (min-width: 1024px) { .ach-grid.zn5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* очки по источникам: чипы под суммой (карточка «Очки») */
.ptsrow { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: -4px; }
.ptsrow__chip { display: inline-flex; align-items: baseline; gap: 5px; min-height: 32px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--well); color: var(--fg); font-size: var(--fs-xs); line-height: 1.5; }
.ptsrow__chip b { font-variant-numeric: tabular-nums; }
.ptsrow__chip--zn { background: #EEE8FF; color: #5B2EE0; font-weight: 700; }
a.ptsrow__chip--zn:hover { background: #E3DAFF; color: #4220B8; }
a.ptsrow__chip:focus-visible { box-shadow: 0 0 0 3px var(--focus-gap), 0 0 0 5px #5B2EE0; }

/* группа «Знатика» в «Ачивках»: светлый фиолетовый фон до краев карточки */
.ach-group.zn-group {
  margin: 4px -12px 0; padding: 20px 12px 16px; border-radius: 26px; border-top: 0;
  background: linear-gradient(180deg, #F6F2FF, #FFFFFF 70%);
}
@media (min-width: 720px) { .ach-group.zn-group { margin-inline: -16px; padding-inline: 16px; } }
.ach-group.zn-group + .ach-group { border-top: 0; }
.zn-group .ach-group__title { color: #3B1FA8; }
.zn-group .zn-group__sub { color: #6F5FA8; }
.zn-group .sec-head .badge { background: #EEE8FF; color: #5B2EE0; }
.zn-more {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 16px;
  border-radius: var(--r-pill); background: #EEE8FF; color: #5B2EE0; font-weight: 700; font-size: var(--fs-sm);
}
.zn-more:hover { background: #E3DAFF; color: #4220B8; }
.zn-more .icon { width: 16px; height: 16px; }
.zn-more:focus-visible { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px #5B2EE0; }

/* полоса «Путь кинодела»: значок, текущий модуль, 12 сегментов, «Открыть Знатику» */
.znl {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 20px;
  background: var(--zn-veil), var(--zn-grad); color: #FFFFFF;
}
.znl__l { display: flex; gap: 12px; align-items: center; flex: 1 1 260px; min-width: 0; }
.znl__txt { min-width: 0; }
.znl__txt b { display: block; font-size: 16px; line-height: 1.25; }
.znl__cap { display: block; font-size: 13px; line-height: 1.35; color: #FFFFFF; }
.znl__logo { width: 40px; height: 40px; border-radius: 12px; background: #FFFFFF; color: var(--zn-2); display: flex; align-items: center; justify-content: center; flex: none; }
.znl__logo .icon { width: 20px; height: 20px; }
.znl__path { display: flex; gap: 4px; flex: 1 1 220px; min-width: 0; }
.znl__path span { --w: 0%; flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.25); position: relative; overflow: hidden; }
.znl__path span.is-soon { background: rgba(255,255,255,.14); }
.znl__path span.on::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #FFFFFF; border-radius: 99px; transition: width 1.2s cubic-bezier(.16,1,.3,1); }
.znl__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--r-pill); background: #FFFFFF; color: var(--zn-2); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap;
}
.znl__btn:hover { color: #4220B8; background: #F6F2FF; }
.znl__btn .icon { width: 16px; height: 16px; }
.znl__btn:focus-visible { box-shadow: 0 0 0 3px var(--zn-2), 0 0 0 5px #FFFFFF; }
@media (max-width: 519px) { .znl__btn { flex: 1 1 100%; } }

/* экран всех 20 ачивок: герой с путем по блокам */
.zn-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 18px;
  padding: 24px; border-radius: var(--r-card); color: #FFFFFF;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.18), transparent 50%), var(--zn-veil), var(--zn-grad);
}
.zn-hero::after { content: ""; position: absolute; z-index: -1; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 26px solid rgba(255,255,255,.10); pointer-events: none; }
.zn-hero__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.zn-hero__main { flex: 1 1 320px; min-width: 0; }
.zn-hero__kicker { font-size: 13px; font-weight: 700; letter-spacing: .02em; }   /* без капса (правило кабинета), в макете капс */
.zn-hero__title { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.5px; margin: 6px 0 4px; overflow-wrap: anywhere; }
.zn-hero__sub { font-size: 15px; line-height: 1.4; }
.zn-hero__pts { text-align: right; flex: none; }
.zn-hero__pts b { display: block; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.zn-hero__pts span { font-size: var(--fs-sm); }
.zn-hero__cta { display: flex; }
.zn-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.zn-stage { background: rgba(255,255,255,.12); border-radius: 18px; padding: 12px 14px; }
.zn-stage__name { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; }
.zn-stage__name span { font-weight: 400; }
.zn-stage.is-soon .zn-dots { opacity: .55; }
.zn-dots { display: flex; gap: 6px; margin-top: 10px; }
.zn-dot { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.22); position: relative; overflow: hidden; }
.zn-dot i { --w: 0%; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #FFFFFF; border-radius: 99px; transition: width 1.2s cubic-bezier(.16,1,.3,1); }
@media (min-width: 720px) { .zn-hero { padding: 28px; } .zn-hero__title { font-size: 32px; } }
@media (max-width: 719px) { .zn-path { grid-template-columns: 1fr; } .zn-hero__pts { text-align: left; } }

/* весь курс: «Кинодел» большой картой, рядом «Первая пятерка» */
.zn-final { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.ach-grid.zn-final__list { grid-template-columns: minmax(0, 1fr); }
.zn-kino {
  display: flex; gap: 18px; align-items: center; min-height: 176px; padding: 22px; border-radius: var(--r-inner); color: #FFFFFF;
  background: radial-gradient(90% 120% at 0% 100%, #9D7BFF 0%, transparent 60%), #22163F;
}
.zn-kino__icon { width: 84px; height: 84px; border-radius: 26px; background: var(--zn-grad); color: #FFFFFF; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 10px 30px rgba(110,70,255,.45); }
.zn-kino__icon .icon { width: 44px; height: 44px; }
.zn-kino.is-earned .zn-kino__icon { background: #FFFFFF; color: var(--zn-2); }
.zn-kino__title { font-size: 26px; font-weight: 700; line-height: 1.1; }
.zn-kino__text { font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.8); margin: 4px 0 10px; }
.zn-chip { display: inline-flex; gap: 6px; align-items: center; margin: 0 4px 4px 0; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.12); font-weight: 700; font-size: 13px; }
.zn-chip .icon { width: 14px; height: 14px; }
@media (max-width: 719px) { .zn-final { grid-template-columns: 1fr; } .zn-kino { flex-direction: column; align-items: flex-start; } }

/* «Как начисляются очки»: карточка Знатики в боковой колонке */
.zn-rules { background: #F6F2FF; }
.zn-rules .zn-btn { align-self: flex-start; background: var(--zn-grad); }
.zn-rules .zn-btn:focus-visible { box-shadow: 0 0 0 3px #F6F2FF, 0 0 0 6px #5B2EE0; }

/* модалка новой ачивки Знатики: тот же диалог с искрами, градиент фиолетовый */
.modal--zn .card--grad {
  background: var(--zn-grad); --accent-fg: var(--zn-2); --inv-fg: var(--zn-2); --focus-gap: #6F4BEA; --wm-color: rgba(255,255,255,.14);
}
.modal--zn .modal__icon { color: var(--zn-2); box-shadow: 0 12px 30px rgba(34,22,63,.28); }
.modal--zn .btn--white, .modal--zn .btn--white:hover { color: var(--zn-2); }
.modal--zn .sparks i:nth-child(3n+1) { background: #D9CCFF; }
.modal--zn .sparks i:nth-child(3n) { background: #F0EBFF; }

/* плашка «+30 за урок»: как продление стрика, темная фиолетовая, книга со свечением */
.burst--zn .burst__card { max-width: min(520px, 100%); background: var(--zn-ink); box-shadow: 0 20px 50px rgba(34,22,63,.45), 0 0 0 2px rgba(157,123,255,.5); }
.burst__zn-ic { position: relative; flex: none; width: 64px; height: 64px; border-radius: 20px; background: var(--zn-grad); color: #FFFFFF; display: flex; align-items: center; justify-content: center; animation: k-flame-rise .8s var(--ease-out) both; }
.burst__zn-ic::before { content: ""; position: absolute; z-index: -1; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(157,123,255,.55), transparent 66%); animation: k-glow 1.6s ease-in-out infinite; }
.burst__zn-ic .icon { width: 32px; height: 32px; }
.burst--zn .burst__card { isolation: isolate; }
.burst--zn .burst__new { color: #C9B8FF; }
.burst--zn .burst__new--static { transform: none; animation: none; }
.burst--zn .burst__cap { color: rgba(255,255,255,.82); overflow-wrap: anywhere; }
.burst--zn .burst__pts .pts--chip { background: rgba(157,123,255,.3); color: #FFFFFF; }

/* интро «Знакомься, Знатика»: 4 карточки при входе; на телефоне до 519 px шторка снизу */
.modal--zi { max-width: 480px; }
.modal--zi[open] { animation: k-zi-pop .5s cubic-bezier(.16,1,.3,1); }
.zi__card { position: relative; width: 100%; max-height: calc(100dvh - 32px); overflow: hidden auto; overscroll-behavior: contain; background: #FFFFFF; color: var(--c-ink); border-radius: 32px; box-shadow: 0 30px 80px rgba(34,22,63,.45); }
.zi__slide.is-fwd { animation: k-zi-slide .45s cubic-bezier(.16,1,.3,1) both; }
.zi__slide.is-back { animation: k-zi-slide-back .45s cubic-bezier(.16,1,.3,1) both; }
.zi__hero { position: relative; isolation: isolate; overflow: hidden; padding: 28px 24px 26px; color: #FFFFFF; background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.22), transparent 55%), var(--zn-veil), var(--zn-grad); }
.zi__hero::before, .zi__hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; border: 22px solid rgba(255,255,255,.10); pointer-events: none; }
.zi__hero::before { width: 200px; height: 200px; right: -60px; top: -70px; }
.zi__hero::after { width: 120px; height: 120px; right: 70px; bottom: -80px; border-width: 14px; }
.zi__close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.zi__close:hover { background: rgba(255,255,255,.28); }
.zi__close .icon { width: 18px; height: 18px; }
.zi__close:focus-visible { box-shadow: 0 0 0 3px #FFFFFF; }
.zi__logo { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; background: rgba(255,255,255,.16); font-weight: 700; font-size: 14px; }
.zi__logo b { width: 30px; height: 30px; border-radius: 50%; background: #FFFFFF; color: var(--zn-2); display: flex; align-items: center; justify-content: center; }
.zi__logo .icon { width: 16px; height: 16px; }
.zi__kicker { margin-top: 18px; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.zi__title { margin: 6px 0 8px; font-size: 34px; line-height: 1.02; font-weight: 700; letter-spacing: -.5px; padding-right: 72px; }
.zi__lead { max-width: 310px; font-size: 15px; line-height: 1.45; }
.zi__bonus { position: absolute; right: 22px; bottom: 22px; z-index: 1; padding: 8px 12px; border-radius: 18px; background: #FFFFFF; color: var(--zn-2); font-weight: 700; text-align: center; line-height: 1.1; box-shadow: 0 10px 24px rgba(34,22,63,.25); transform: rotate(6deg); animation: k-zi-wob 2.4s ease-in-out infinite; }
.zi__bonus small { display: block; font-size: 11px; font-weight: 700; color: #5B4A8F; }
.zi__bonus span { font-size: 22px; }
.zi__big { margin: 8px 0 6px; font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -2px; }
.zi__big small { font-size: 18px; letter-spacing: 0; font-weight: 700; }
.zi__trophy { width: 96px; height: 96px; margin: 14px 0 4px; border-radius: 30px; background: #FFFFFF; color: var(--zn-2); display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 40px rgba(34,22,63,.35); animation: k-zi-wob 2.4s ease-in-out infinite; }
.zi__trophy .icon { width: 50px; height: 50px; }
.zi__body { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 22px; }
.zi__lesson { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: #F7F4FF; }
.zi__lrow { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.zi__lrow > .icon { width: 20px; height: 20px; flex: none; color: var(--zn-2); }
.zi__lrow b { flex: 1; min-width: 0; font-weight: 700; }
.zi__lrow em { font-style: normal; font-weight: 700; color: var(--zn-2); }
.zi__ring { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: conic-gradient(#6B3BF0 var(--p), #E3DAFF 0); }
.zi__ring::after { content: ""; width: 24px; height: 24px; border-radius: 50%; background: #F7F4FF; }
.zi__rgrid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zi__rt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: #F7F4FF; font-size: 13px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.zi__rt span { width: 38px; height: 38px; border-radius: 12px; background: var(--zn-grad); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.zi__rt span .icon { width: 20px; height: 20px; }
.zi__rt.is-lock span { background: #EEE8FF; color: #9C8CCB; }
.zi__ranks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: #6E6280; }
.zi__rank { padding: 4px 10px; border-radius: 99px; background: var(--zn-soft); color: var(--zn-2); font-weight: 700; }
.zi__rank--final { background: var(--zn-ink); color: #FFFFFF; }
.zi__dots { display: flex; justify-content: center; gap: 6px; }
.zi__dots i { width: 8px; height: 8px; border-radius: 99px; background: #E3DAFF; transition: width .3s; }
.zi__dots i.on { width: 26px; background: var(--zn-grad); }
.zi__nav { display: flex; gap: 10px; }
.zi__btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 20px; border: 0; border-radius: 99px;
  background: var(--zn-grad); color: #FFFFFF; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 10px 24px rgba(91,46,224,.35);
}
.zi__btn:hover { color: #FFFFFF; filter: brightness(1.06); }
.zi__btn .icon { width: 18px; height: 18px; }
.zi__btn:focus-visible { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 6px var(--zn-2); }
.zi__back { width: 54px; height: 54px; flex: none; border: 0; border-radius: 50%; background: #F2EEFF; color: var(--zn-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.zi__back .icon { width: 20px; height: 20px; }
.zi__back:focus-visible, .zi__later:focus-visible { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--zn-2); }
.zi__later { min-height: 44px; border: 0; border-radius: 99px; background: none; font: inherit; font-weight: 700; color: #6E6280; cursor: pointer; }
.zi__later:hover { color: var(--zn-2); }
.zi__note { font-size: 12px; text-align: center; color: #6E6280; }
@keyframes k-zi-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes k-zi-slide { from { opacity: 0; transform: translateX(28px); } }
@keyframes k-zi-slide-back { from { opacity: 0; transform: translateX(-28px); } }
@keyframes k-zi-wob { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(-3deg) translateY(-3px); } }
.zi__trophy { transform: none; }
@media (max-width: 519px) {
  .modal--zi { width: 100%; max-width: none; max-height: 100dvh; margin: auto 0 0; }
  .modal--zi[open] { animation: k-sheet .32s var(--ease-out); }
  .zi__card { max-height: 100dvh; border-radius: 28px 28px 0 0; }
  .zi__body { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .zi__title { font-size: 30px; }
  .zi__bonus { right: 16px; top: 64px; bottom: auto; }
  .zi__big { font-size: 56px; }
}

/* ---------- 19: перезапуск 03.11. Рейтинг до аварии серым (в сумму не входит) и баннер на главной ---------- */
.pre-crash { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); line-height: 1.2; font-weight: 400;
  color: var(--c-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pre-crash .icon { width: 12px; height: 12px; }
.rank__pts .pre-crash { display: flex; justify-content: flex-end; margin-top: 2px; }
.pre-crash-card__value { font-size: 22px; font-weight: 700; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.pre-crash-card .form { margin-top: 4px; }
.site-banner { border: 1px solid var(--c-line, rgba(0,0,0,.08)); }
.site-banner__title { margin-bottom: 4px; }
.site-banner p + p { margin-top: 6px; }
.view__in > .site-banner { margin-bottom: 16px; }

/* ================================================================ квиз восстановления октября (схема 20)
   Тап выбирает, выбранное подсвечивается, повторный тап снимает (как карточки квиза Знатики, 26.10).
   Серые баллы: ждут проверки куратора; зеленые: проверено. Зеленый токен только для этого списка (SPEC .2, раздел 4). */
:root { --rq-ok: var(--c-ok); --rq-ok-bg: var(--c-ok-bg); --rq-grey: var(--fg-muted); --rq-grey-bg: var(--track); }
.rq-progress { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--fg-muted); font-weight: 700; }
.rq-progress__bar { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.rq-progress__bar > span { display: block; height: 100%; width: calc(var(--value, 0) * 1%); background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); }
.rq-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; padding: 0; }
.rq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-row); background: var(--c-bg); }
.rq-row--off { opacity: .6; }
.rq-row--q { grid-template-columns: minmax(0, 1fr) auto; }
.rq-row__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-row__date { font-size: var(--fs-xs); color: var(--fg-muted); font-weight: 700; }
.rq-row__title { font-weight: 700; line-height: 1.25; }
.rq-row__sub { font-size: var(--fs-xs); color: var(--fg-soft); }
.rq-row__more { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.rq-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rq-pill { min-height: 44px; min-width: 64px; padding: 8px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--c-surface); color: var(--fg); font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.rq-pill[aria-pressed="true"] { background: var(--c-ink); border-color: var(--c-ink); color: #FFFFFF; }
.rq-pill--yes[aria-pressed="true"] { background: var(--c-magenta-2); border-color: var(--c-magenta-2); }
.rq-pill:focus-visible, .rq-card:focus-visible { box-shadow: var(--ring); outline: none; }
.rq-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rq-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; min-height: 56px; border-radius: var(--r-row); border: 1.5px solid var(--line); background: var(--c-bg); color: var(--fg); font: inherit; cursor: pointer; }
.rq-card[aria-pressed="true"] { background: var(--c-surface); border-color: var(--c-magenta-2); box-shadow: var(--shadow-segment); }
.rq-row .rq-card { background: var(--c-surface); }
.rq-row .rq-card[aria-pressed="true"] { background: var(--c-surface-pink); }
.rq-card__num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--track); color: var(--fg-soft); }
.rq-card[aria-pressed="true"] .rq-card__num { background: var(--c-magenta-2); color: #FFFFFF; }
.rq-card__body { display: flex; flex-direction: column; gap: 2px; }
.rq-card__label { font-weight: 700; }
.rq-card__sub { font-size: var(--fs-xs); color: var(--fg-muted); }
.rq-sub { font-weight: 700; font-size: var(--fs-body); margin: 16px 0 0; }
.rq-q { font-weight: 700; font-size: var(--fs-sm); margin: 4px 0 0; }
.rq-after { font-size: var(--fs-sm); color: var(--accent-text); font-weight: 700; margin: 6px 0 0; }
.rq-link { align-self: flex-start; padding-left: 0; }
.rq-text textarea { width: 100%; }
.rq-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px); padding: 8px; border-radius: var(--r-row); background: var(--c-surface); box-shadow: var(--shadow-segment); z-index: 5; }
@media (min-width: 1024px) { .rq-nav { bottom: 16px; } }
.rq-legend { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.rq-legend li { display: flex; align-items: center; gap: 8px; }
.rq-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.rq-chip--grey { background: var(--rq-grey-bg); color: var(--rq-grey); }
.rq-chip--green { background: var(--rq-ok-bg); color: var(--rq-ok); }
.rq-chip--muted { background: transparent; color: var(--fg-muted); border: 1px dashed var(--line-strong); }
.rq-chip--wait { background: var(--c-warn-bg); color: var(--c-warn); }
.rq-chip--hidden { display: none; }
.rq-green { color: var(--rq-ok); font-weight: 700; }
.rq-grey { color: var(--rq-grey); }
.rq-pending { color: var(--rq-grey); font-weight: 700; margin-top: 2px; }
.rq-sum__lines { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rq-sum__lines li { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); }
.rq-extra summary { cursor: pointer; color: var(--accent-text); font-weight: 700; font-size: var(--fs-sm); padding: 8px 0; }
.rq-extra .field { margin-top: 8px; }
.rq-home .btn { align-self: flex-start; }
.rq-wait { color: var(--c-warn); }
.rq-wait .icon { display: inline-block; vertical-align: -3px; margin-right: 4px; }
/* строка заявки у куратора: действия переносятся под текст, страница не шире экрана (иначе телефон уменьшает масштаб) */
.rq-claim { flex-wrap: wrap; }
.rq-claim .row__body { flex: 1 1 200px; min-width: 0; }
.rq-claim .row__end { flex: 1 1 auto; max-width: 100%; min-width: 0; justify-content: flex-end; }
.rq-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; max-width: 100%; }
.rq-acts select { max-width: 100%; }
.rq-menu > summary { list-style: none; }
.rq-menu > summary::-webkit-details-marker { display: none; }
.rq-menu[open] { flex-basis: 100%; }
.rq-menu__list { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 6px 0; }
.rq-staff .btn-row .btn { white-space: normal; max-width: 100%; height: auto; min-height: 40px; text-align: center; }
.rq-staff .table-wrap { max-width: 100%; }
.rq-flag { display: inline-flex; padding: 2px 8px; margin: 2px 4px 0 0; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; background: var(--track); color: var(--fg-soft); }
.rq-flag--over_control, .rq-flag--spot_failed, .rq-flag--too_fast { background: var(--c-warn-bg); color: var(--c-warn); }
.rq-flag--known_match { background: var(--rq-ok-bg); color: var(--rq-ok); }
.rq-flag--spot_check { background: var(--c-surface-pink); color: var(--c-magenta-hover); }
.rq-item .card__head { margin-bottom: 4px; }
.rq-staff .table-wrap { overflow-x: auto; }
.ach.is-pending .ach__badge { position: absolute; top: 12px; right: 12px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--rq-grey-bg); color: var(--rq-grey); font-size: var(--fs-xs); font-weight: 700; }
.ach.is-pending::after { display: none; }
@media (max-width: 420px) {
  .rq-row { grid-template-columns: 1fr; }
  .rq-pills { justify-content: flex-start; }
}
/* раунд фиксов 1: пояснение к серой строке видно без title; пункт над именем во «Флажках»; список «Октябрь» на
   телефоне: чип статуса строкой ниже, название на всю ширину */
.rq-pending__tip { color: var(--fg-muted); font-weight: 400; }
p.rq-pending__tip { margin: 2px 0 0; }
.rq-claim__item { margin: 0 0 2px; font-weight: 700; color: var(--fg-soft); }
@media (max-width: 480px) {
  .rq-claims .row { flex-wrap: wrap; row-gap: 6px; }
  .rq-claims .row__body { flex: 1 1 100%; }
  .rq-claims .row__end { flex: 1 1 100%; }
}

