/* Токены вида школы одним модулем (приказ 236 п. 1, П3): шрифты макета и цвета `--tg-theme-*` с запасными, светлая и
   тёмная тема. Берут Mini App (`worker/miniapp_css.ts`: токены и компоненты `worker/miniapp.css`) и сборка комнаты урока
   и тетради (`board/room2.css`, `board/board.css` через `@import`). Второго набора токенов нет.
   Тёмная тема по `prefers-color-scheme`, `data-theme="dark"` (тема Telegram, `applyTgTheme`) или `data-tg="dark"`. */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/static/golos-text-cyrillic.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/static/golos-text-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/static/unbounded-cyrillic.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/static/unbounded-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --tg-theme-bg-color: #FFFFFF;
  --tg-theme-secondary-bg-color: #F2F1F5;
  --tg-theme-section-bg-color: #FFFFFF;
  --tg-theme-text-color: #121014;
  --tg-theme-hint-color: #6F6876;
  --tg-theme-subtitle-text-color: #69626F;
  --tg-theme-section-header-text-color: #6F6876;
  --tg-theme-link-color: #C2275A;
  --tg-theme-button-color: #D12C62;
  --tg-theme-button-text-color: #FFFFFF;
  --tg-theme-accent-text-color: #C2275A;
  --tg-theme-section-separator-color: #E4E1E8;
  --tg-theme-bottom-bar-bg-color: #F2F1F5;
  --accent: #D12C62;
  --on-accent: #FFFFFF;
  --accent-ink: #C2275A;
  --school-tint: #FBE4EC;
  --school-chip: #E8E6EC;
  --school-success: #167A46;
  --school-success-soft: #E0F3E8;
  --school-hero: #C8255A;
  --school-hero-2: #E9517F;
  --school-on-hero: #FFFFFF;
  --school-on-hero-soft: rgba(255, 255, 255, .2);
  --av-bg: #F7BCD0;
  --av-fg: #6A1232;
  /* приказ 123 (ДИЗАЙН_СИСТЕМА_362 р. 1.1): «опасно» (Telegram destructive_text_color), «ждёт» (жёлтая пара аватара 098),
     три пары аватаров 098; новых цветов нет, только имена */
  --tg-theme-destructive-text-color: #C62828;
  --av1-bg: #F6D58C; --av1-fg: #5A3B00;
  --av2-bg: #F7BCD0; --av2-fg: #6A1232;
  --av3-bg: #A9E0D6; --av3-fg: #0D4A41;
  --school-warn-soft: var(--av1-bg);
  --school-warn: var(--av1-fg);
  --school-danger-soft: color-mix(in srgb, var(--tg-theme-destructive-text-color) 14%, transparent);
  --shadow: rgba(48, 20, 40, .20);
  /* приказ 128 (ДИЗАЙН_СИСТЕМА_362 р. 1.1, компонент 15): тост */
  --school-toast-bg: rgba(24, 20, 28, .9);
  --school-toast-fg: #FFFFFF;
  --font-display: "Unbounded", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* приказ 263 п. 4: безопасные отступы: система (вырез, полоса «Домой») и поверх неё элементы Telegram в полноэкранном
     режиме (Bot API 8.0: `safeAreaInset` и `contentSafeAreaInset`, переменные `--tg-safe-area-inset-*`,
     `--tg-content-safe-area-inset-*`); без Telegram только `env()` */
  --safe-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-left: calc(max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) + var(--tg-content-safe-area-inset-left, 0px));
  --safe-right: calc(max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) + var(--tg-content-safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-tg="light"]) {
    --tg-theme-bg-color: #1A171D;
    --tg-theme-secondary-bg-color: #0F0D11;
    --tg-theme-section-bg-color: #1D1A20;
    --tg-theme-text-color: #F4F1F6;
    --tg-theme-hint-color: #8E8794;
    --tg-theme-subtitle-text-color: #ABA4B1;
    --tg-theme-section-header-text-color: #9A93A0;
    --tg-theme-link-color: #FF7EA6;
    --tg-theme-button-color: #D7306A;
    --tg-theme-destructive-text-color: #FF6B66;
    --tg-theme-button-text-color: #FFFFFF;
    --tg-theme-accent-text-color: #FF86AC;
    --tg-theme-section-separator-color: #2D2931;
    --tg-theme-bottom-bar-bg-color: #0F0D11;
    --accent-ink: #FF86AC;
    --school-tint: #3A1C2A;
    --school-chip: #27232B;
    --school-success: #57CC8C;
    --school-success-soft: #163326;
    --school-hero: #A81F4C;
    --school-hero-2: #D93F72;
    --school-on-hero-soft: rgba(255, 255, 255, .16);
    --av-bg: #62223D;
    --av-fg: #FFD0E0;
    --av1-bg: #5E4614; --av1-fg: #FFE2A3;
    --av2-bg: #62223D; --av2-fg: #FFD0E0;
    --av3-bg: #164E47; --av3-fg: #BDF1E7;
    --school-toast-bg: rgba(244, 241, 246, .94); --school-toast-fg: #121014;
    color-scheme: dark;
  }
}
:root[data-theme="dark"], :root[data-tg="dark"] {
  --tg-theme-bg-color: #1A171D;
  --tg-theme-secondary-bg-color: #0F0D11;
  --tg-theme-section-bg-color: #1D1A20;
  --tg-theme-text-color: #F4F1F6;
  --tg-theme-hint-color: #8E8794;
  --tg-theme-subtitle-text-color: #ABA4B1;
  --tg-theme-section-header-text-color: #9A93A0;
  --tg-theme-link-color: #FF7EA6;
  --tg-theme-button-color: #D7306A;
  --tg-theme-destructive-text-color: #FF6B66;
  --tg-theme-button-text-color: #FFFFFF;
  --tg-theme-accent-text-color: #FF86AC;
  --tg-theme-section-separator-color: #2D2931;
  --tg-theme-bottom-bar-bg-color: #0F0D11;
  --accent-ink: #FF86AC;
  --school-tint: #3A1C2A;
  --school-chip: #27232B;
  --school-success: #57CC8C;
  --school-success-soft: #163326;
  --school-hero: #A81F4C;
  --school-hero-2: #D93F72;
  --school-on-hero-soft: rgba(255, 255, 255, .16);
  --av-bg: #62223D;
  --av-fg: #FFD0E0;
  --av1-bg: #5E4614; --av1-fg: #FFE2A3;
  --av2-bg: #62223D; --av2-fg: #FFD0E0;
  --av3-bg: #164E47; --av3-fg: #BDF1E7;
  --school-toast-bg: rgba(244, 241, 246, .94); --school-toast-fg: #121014;
  color-scheme: dark;
}


/* Mini App по макету (приказы 095, 096; `switches.miniapp_v2`): общие стили всех экранов Э1-Э4 одним файлом.
   Цвета: `--tg-theme-*` из themeParams Telegram (ставит скрипт `MINI_THEME_JS`), без Telegram запасные цвета макета;
   тёмная тема по `prefers-color-scheme` или `data-theme="dark"` (скрипт ставит по фону Telegram). Шрифты макета
   (приказ 119a п. 1): Golos Text (текст) и Unbounded (заголовки, крупные цифры, hero) своими файлами `/static/<файл>`
   (worker/site_static.ts, SIL OFL 1.1), кириллица и латиница переменным весом; CSP страниц только `font-src 'self'`.
   Блоки `@font-face` ниже берёт и оболочка Э1-Э2 и экранов 098 (worker/web_mini.ts). */
/* Токены (шрифты, цвета, тёмная тема) в `worker/school_tokens.css` (приказ 236); страницы берут оба файла через
   `worker/miniapp_css.ts`. */
* { box-sizing: border-box; }
/* переход между экранами (приказ 282 п. 4): каждое нажатие отправляет форму и грузит новую страницу; переход между
   страницами своего адреса плавной сменой (cross-document View Transitions: Chrome 126+, Safari 18.2+), старый экран
   виден до готового нового вместо белого; где не поддерживается, правило пропускается */
@view-transition { navigation: auto; }
body {
  margin: 0 auto;
  max-width: 560px;
  min-height: 100vh;
  background: var(--tg-theme-secondary-bg-color);
  color: var(--tg-theme-text-color);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
/* радио, галочки, ползунки и полосы всех экранов (ученик и `/tm`) цветом школы (326b ответ 6); правилом по элементам, а
   не у `body`: страница `/tm` до 6 КБ gzip (313b п. 4) без него, оно приходит со стилями экрана, где такой элемент есть */
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--accent); }
a { color: var(--accent-ink); }
form { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select, textarea, input[type="text"], input[type="email"], input[type="search"] {
  font: inherit; font-size: 16px; color: inherit;
  background: var(--tg-theme-bg-color);
  border: 1px solid var(--tg-theme-section-separator-color);
  border-radius: 10px; padding: 8px 10px;
}
textarea { width: 100%; }
input[type="search"] { width: 100%; min-height: 44px; box-sizing: border-box; }
.content { padding: calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) 24px calc(16px + var(--safe-left)); display: flex; flex-direction: column; gap: 14px; }
.content > * { flex-shrink: 0; }
.press { transition: transform .16s ease, filter .16s ease; }
.press:active { transform: scale(.97); filter: brightness(.94); }

/* общие элементы школы */
.h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.hint { margin: 0; color: var(--tg-theme-hint-color); font-size: 14px; }
.sub { color: var(--tg-theme-subtitle-text-color); font-size: 13px; }
.notice { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--school-tint); font-weight: 600; }
.num { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.sec-h {
  margin: 4px 16px -6px;
  font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-ink);
  display: flex; justify-content: space-between; gap: 8px;
}
.sec-h em { font-style: normal; text-transform: none; letter-spacing: 0; }
.list { background: var(--tg-theme-section-bg-color); border-radius: 14px; overflow: hidden; }
.list.pad { padding: 12px 16px; display: grid; gap: 10px; }
.list.pad > h2 { margin: 0; font-size: 15px; font-weight: 600; }
.list.pad p { margin: 0; }
.row { position: relative; width: 100%; min-height: 48px; padding: 10px 16px; display: flex; align-items: center; gap: 12px; text-align: left; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--tg-theme-section-separator-color); }
.row .main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row .main b { font-weight: 500; font-size: 15.5px; }
details.row { display: block; }
details.row > summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
details.row > summary::-webkit-details-marker { display: none; }
details.row > summary::after { content: "›"; color: var(--tg-theme-hint-color); font-size: 20px; }
details.row[open] > summary::after { transform: rotate(90deg); }
details.row .more { margin-top: 8px; display: grid; gap: 8px; font-size: 14px; }
.av {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--av-bg); color: var(--av-fg);
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .02em;
}
.btn {
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--school-chip); color: var(--tg-theme-text-color);
  font-size: 14.5px; font-weight: 600;
}
.bottom {
  position: sticky; bottom: 0;
  padding: 10px 16px calc(14px + var(--safe-bottom));
  background: var(--tg-theme-bottom-bar-bg-color);
  border-top: 1px solid var(--tg-theme-section-separator-color);
}
.mainbtn {
  width: 100%; height: 50px; border-radius: 12px;
  background: var(--accent); color: var(--on-accent);
  font-size: 16px; font-weight: 600;
}

/* Э3 «Мои уроки» и деньги Э4: плашка на фоне школы */
.hero {
  position: relative; overflow: hidden;
  padding: 18px; border-radius: 22px;
  background: linear-gradient(150deg, var(--school-hero-2), var(--school-hero) 62%);
  color: var(--school-on-hero);
  display: grid; gap: 12px;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  border: 26px solid var(--school-on-hero-soft);
  pointer-events: none;
}
.hero .k { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--school-on-hero); }
.hero .t .num { font-size: 26px; line-height: 1.15; }
.hero .tch { display: flex; gap: 10px; align-items: center; }
.hero .tch .av { background: var(--school-on-hero-soft); color: var(--school-on-hero); }
.hero .tch b { font-size: 15.5px; font-weight: 600; }
.hero .foot { position: relative; z-index: 1; font-size: 12.5px; color: var(--school-on-hero); }
.hero form, .hero a { position: relative; z-index: 1; }
.btn-on-hero {
  width: 100%; height: 48px; border-radius: 12px;
  background: var(--school-on-hero); color: var(--school-hero);
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.hero .btn { background: var(--school-on-hero-soft); color: var(--school-on-hero); width: 100%; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { padding: 14px; border-radius: 16px; background: var(--tg-theme-section-bg-color); display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tile .lbl { font-size: 13px; color: var(--tg-theme-subtitle-text-color); }
.tile .num { font-size: 28px; line-height: 1.15; }
.tile .sub b { color: var(--school-success); font-weight: 600; }
.pack { padding: 14px 16px; display: grid; gap: 10px; }
.cells { display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); gap: 4px; }
.cells i { height: 8px; border-radius: 4px; background: var(--school-chip); }
.cells i.done { background: var(--tg-theme-hint-color); opacity: .55; }
.cells i.booked { background: var(--accent); }
.cells i.free { background: var(--school-tint); box-shadow: inset 0 0 0 1.5px var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--tg-theme-subtitle-text-color); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 6px; border-radius: 3px; display: inline-block; }
.legend i.done { background: var(--tg-theme-hint-color); opacity: .55; }
.legend i.booked { background: var(--accent); }
.legend i.free { background: var(--school-tint); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* Э4 экран преподавателя */
.lessons .row { min-height: 50px; padding-block: 7px; }
.time { width: 50px; flex: none; display: grid; font-variant-numeric: tabular-nums; }
.time b { font-size: 15.5px; font-weight: 600; }
.time small { font-size: 12px; color: var(--tg-theme-subtitle-text-color); }
.past .main b, .past .time b { color: var(--tg-theme-subtitle-text-color); }
.done-mark { font-size: 12.5px; color: var(--school-success); white-space: nowrap; }
.join-sm {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px;
  background: var(--accent); color: var(--on-accent);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.week { padding: 10px 12px; display: grid; gap: 6px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; height: 62px; }
.bar { display: grid; justify-items: center; align-content: end; gap: 4px; font-variant-numeric: tabular-nums; }
.bar .n { font-size: 13px; font-weight: 600; color: var(--tg-theme-subtitle-text-color); }
.bar i { display: block; width: 26px; border-radius: 7px 7px 3px 3px; background: var(--school-chip); }
.bar.today i { background: var(--accent); }
.bar.today .n { color: var(--accent-ink); }
.bar.zero i { height: 4px !important; border-radius: 2px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--tg-theme-hint-color); }
.days .today { color: var(--accent-ink); font-weight: 600; }
.earn { gap: 10px; }
.earn > .num { font-size: 30px; line-height: 1.1; }
.earn .split { font-size: 13px; color: var(--school-on-hero); margin-top: -4px; }
.pay2 {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding-top: 12px; border-top: 1px solid var(--school-on-hero-soft);
}
.pay2 > div { display: grid; gap: 2px; align-content: start; min-width: 0; }
.pay2 .k2 { font-size: 12.5px; color: var(--school-on-hero); }
.pay2 .num { font-size: 18px; line-height: 1.25; }
.pay2 .s2 { font-size: 12px; line-height: 1.3; color: var(--school-on-hero); }

/* приказ 119: «Назад» и главная кнопка страницы (в Telegram их заменяют `BackButton` и `MainButton`), строки «Ещё» */
.back { align-self: start; padding: 8px 14px; border-radius: 16px; background: var(--tg-theme-section-bg-color); font-size: 14px; font-weight: 500; }
html.tg .back, html.tg .bottom { display: none; }
.hero .line { position: relative; z-index: 1; font-size: 14.5px; line-height: 1.35; color: var(--school-on-hero); }
.hero .t .num.sm { font-size: 22px; }
.more-list form + form .row::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--tg-theme-section-separator-color); }
.ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--school-tint); color: var(--accent-ink); }
.ic svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chev { flex: none; width: 8px; height: 13px; stroke: var(--tg-theme-hint-color); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* приказ 119a: строка пакета и строка под преподавателем на hero, как в макете 098 */
.pack .top2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pack .top2 b { font-weight: 600; }
.hero .tch > span:last-child { font-size: 13px; color: var(--school-on-hero); }
.hero .tch b { display: block; color: var(--school-on-hero); }

/* приказ 123: компоненты дизайн-системы 362 (`prikazy/362-vlozheniya/ДИЗАЙН_СИСТЕМА_362.md` р. 2, классы как в
   `МАКЕТ_362.html` блок 2); одна оболочка с экранами 096-119 */
.st { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--school-chip); color: var(--tg-theme-subtitle-text-color); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st.ok { background: var(--school-success-soft); color: var(--school-success); }
.st.warn { background: var(--school-warn-soft); color: var(--school-warn); }
.st.acc { background: var(--school-tint); color: var(--accent-ink); }
.st.bad { background: var(--school-danger-soft); color: var(--tg-theme-destructive-text-color); }
.hero .st { background: var(--school-on-hero-soft); color: var(--school-on-hero); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--school-chip); color: var(--tg-theme-subtitle-text-color); font-size: 12.5px; font-weight: 500; }
.who-head { display: flex; gap: 12px; align-items: center; }
.who-head .main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.who-head b { font-size: 18px; font-weight: 600; line-height: 1.2; }
.who-head .av { width: 48px; height: 48px; font-size: 15px; }
.av.a1 { background: var(--av1-bg); color: var(--av1-fg); }
.av.a2 { background: var(--av2-bg); color: var(--av2-fg); }
.av.a3 { background: var(--av3-bg); color: var(--av3-fg); }
.row.ind + .row.ind::before { left: 58px; }
.row .end { flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.row.danger b { color: var(--tg-theme-destructive-text-color); }
.ic.warn { background: var(--school-warn-soft); color: var(--school-warn); }
.ic.ok { background: var(--school-success-soft); color: var(--school-success); }
.ic.mute { background: var(--school-chip); color: var(--tg-theme-subtitle-text-color); }
.ic.bad { background: var(--school-danger-soft); color: var(--tg-theme-destructive-text-color); }
button.tile { text-align: left; }
.tile.wide { grid-column: 1 / -1; }
.tile .row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile .line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.linkbtn { min-height: 44px; margin: -10px -8px -10px 0; padding: 0 8px; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.hist { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: var(--tg-theme-subtitle-text-color); }
.hist li { display: flex; justify-content: space-between; gap: 8px; }
.hist b { font-weight: 500; color: var(--tg-theme-text-color); font-variant-numeric: tabular-nums; }
.tile-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 6px; }
.btn2 { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; background: var(--school-tint); color: var(--accent-ink); font-size: 15px; font-weight: 600; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 10px; background: var(--school-chip); }
.seg button { position: relative; z-index: 1; height: 44px; font-size: 13px; font-weight: 600; }
.seg .thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 8px; background: var(--tg-theme-section-bg-color); box-shadow: 0 1px 3px var(--shadow); transition: transform .28s cubic-bezier(.3, .7, .2, 1); }
.seg[data-v="b"] .thumb { transform: translateX(100%); }
.wkbox { padding: 14px; display: grid; gap: 10px; }
.wk { display: grid; grid-template-columns: 28px repeat(7, minmax(0, 1fr)); column-gap: 4px; row-gap: 2px; font-variant-numeric: tabular-nums; }
.wk .dh { font-size: 11.5px; text-align: center; color: var(--tg-theme-hint-color); padding-bottom: 4px; }
.wk .dh.we { color: var(--tg-theme-subtitle-text-color); }
.wk .hl { font-size: 10px; line-height: 6px; color: var(--tg-theme-subtitle-text-color); white-space: nowrap; }
.wk i { height: 6px; border-radius: 2px; background: var(--school-chip); }
.wk i.on { background: var(--accent); opacity: .85; }
.wk i.next { background: var(--school-success); opacity: 1; }
.wk-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--tg-theme-subtitle-text-color); }
.wk-foot b { color: var(--tg-theme-text-color); font-weight: 600; }
.scale { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 16px; font-size: 14px; }
.scale .cells { --n: 2; width: 52px; }
.scale .cells i.done { background: var(--accent); opacity: 1; }
.empty { padding: 18px; text-align: center; border-radius: 18px; background: var(--tg-theme-section-bg-color); }
.empty.big { display: grid; justify-items: center; gap: 8px; padding: 22px 18px; }
.empty.big b { font-size: 16px; font-weight: 600; }
.numform { display: flex; gap: 8px; padding: 10px 16px; align-items: center; }
.numform input { flex: 1; min-width: 0; min-height: 44px; font: inherit; font-size: 16px; color: inherit; background: var(--tg-theme-bg-color); border: 1px solid var(--tg-theme-section-separator-color); border-radius: 10px; padding: 8px 10px; }
.numform button { min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--school-chip); font-weight: 600; }
.wm { margin: 0; font-size: 11.5px; color: var(--tg-theme-hint-color); text-align: center; }
.scrim { position: fixed; inset: 0; z-index: 6; background: rgba(10, 6, 12, .42); opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; max-width: 560px; margin: 0 auto; padding: 8px calc(16px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(16px + var(--safe-left)); border-radius: 18px 18px 0 0; background: var(--tg-theme-secondary-bg-color); display: grid; gap: 12px; transform: translateY(105%); transition: transform .28s cubic-bezier(.3, .7, .2, 1); }
.sheet .grab { justify-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--tg-theme-hint-color); opacity: .5; }
.sheet h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.sheet .hint { margin-top: -6px; }
body.sheet-on .scrim { opacity: 1; pointer-events: auto; }
.sheet.on { transform: none; }
.bottom .btn2 { margin-top: 8px; }

.tiles > form { display: grid; }
.tiles > form > .tile { width: 100%; height: 100%; }
.hero > form { position: relative; z-index: 1; }
/* приказ 125a: компонент 19 «Звёзды» (ДИЗАЙН_СИСТЕМА_362 р. 2): пять звёзд в ряд, каждая формой, нажатие сразу
   записывает оценку; разметка 1...5 (клавиатура и диктор по порядку): при касании или фокусе в ряду залиты все,
   звёзды правее выбранной снова пустые */
.stars { display: flex; justify-content: center; gap: 4px; padding: 4px 0; }
.stars form { display: flex; }
.stars button { width: 52px; height: 52px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--tg-theme-hint-color); display: grid; place-items: center; cursor: pointer; }
.stars svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.stars button.on, .stars:has(form:hover) button, .stars:has(form:focus-within) button { color: var(--accent); }
.stars button.on svg, .stars:has(form:hover) svg, .stars:has(form:focus-within) svg { fill: currentColor; }
.stars:has(form:hover) form:hover ~ form button, .stars:has(form:focus-within) form:focus-within ~ form button { color: var(--tg-theme-hint-color); }
.stars:has(form:hover) form:hover ~ form svg, .stars:has(form:focus-within) form:focus-within ~ form svg { fill: none; }
.stars button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details.row .more form .row.danger { width: 100%; padding: 10px 0 0; border-top: 1px solid var(--tg-theme-section-separator-color); background: none; }
.hero > form .btn { min-height: 44px; }
/* приказ 125: подпись сетки недели на экранах 098 (там заголовок раздела без своих правил 096) */
.sec-h:has(> em) { display: flex; justify-content: space-between; gap: 8px; }
.sec-h > em { font-style: normal; text-transform: none; letter-spacing: 0; }

/* ползунок своей ставки (приказ 124, ДИЗАЙН_СИСТЕМА_362 р. 3, МАКЕТ_362 экран 3): зоны рисует сервер, клиент только двигает */
.rate { padding: 16px; border-radius: 18px; background: var(--tg-theme-section-bg-color); display: grid; gap: 10px; }
.rate .big { font-size: 40px; line-height: 1.05; }
.rate .line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.slider { position: relative; height: 44px; margin: 4px 0 0; }
.slider .track { position: absolute; left: 15px; right: 15px; top: 17px; height: 10px; border-radius: 5px; overflow: hidden; display: flex; background: var(--school-chip); }
.slider .track span { height: 100%; }
.z-ops { background: var(--school-success); opacity: .55; }
.z-own { background: var(--school-warn-soft); }
.z-low { background: repeating-linear-gradient(135deg, var(--school-warn-soft) 0 6px, var(--school-chip) 6px 10px); }
.slider input { position: absolute; inset: 0; width: 100%; height: 44px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.slider input::-moz-range-track { height: 44px; background: transparent; }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: 7px; border-radius: 50%; background: #FFFFFF; border: 3px solid var(--accent); box-shadow: 0 2px 6px var(--shadow); }
.slider input::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; border: 3px solid var(--accent); }
.slider input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.ticks { position: relative; height: 16px; margin: 0 15px; font-size: 11px; color: var(--tg-theme-subtitle-text-color); font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ticks span::before { content: ""; position: absolute; left: 50%; top: -6px; width: 1px; height: 4px; background: currentColor; }
.zbox { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.3; background: var(--school-success-soft); color: var(--school-success); transition: background .2s, color .2s; }
.zbox[data-z="own"], .zbox[data-z="low"] { background: var(--school-warn-soft); color: var(--school-warn); }

/* карточка решения владельца и переключатель (приказ 127, 362-4; компоненты 6 и 18 `ДИЗАЙН_СИСТЕМА_362.md`, классы и
   значения из `МАКЕТ_362.html` дословно): одна главная кнопка `.yes` и «Нет» `.no` у каждой карточки */
.cards { display: grid; gap: 10px; }
.dcard { padding: 14px; border-radius: 18px; background: var(--tg-theme-section-bg-color, #FFFFFF); display: grid; gap: 10px; transition: opacity .25s, transform .25s; }
.dcard.gone { opacity: 0; transform: translateX(40px); }
.dcard .top3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dcard h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.dcard p { margin: 0; font-size: 13.5px; color: var(--tg-theme-subtitle-text-color, #69626F); white-space: pre-line; overflow-wrap: anywhere; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.acts form { display: contents; }
.yes { flex: 1; min-height: 44px; padding: 6px 12px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.yes[disabled] { background: var(--school-chip, #E8E6EC); color: var(--tg-theme-hint-color, #6F6876); }
.no { flex: none; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--school-chip, #E8E6EC); color: var(--tg-theme-text-color, #121014); font-size: 14.5px; font-weight: 600; }
.contact { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--tg-theme-secondary-bg-color, #F2F1F5); font-size: 13.5px; }
.contact b { font-weight: 600; }
.tgl { flex: none; position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--school-chip, #E8E6EC); transition: background .2s; }
.tgl::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.tgl[aria-checked="true"] { background: var(--school-success, #167A46); }
.tgl[aria-checked="true"]::after { transform: translateX(20px); }
/* hero «Ждут вашего решения»: число и бейдж в строку, как в макете; «Решить следующее» ссылкой на верхнюю карточку */
.hero .t { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero .badge { padding: 4px 10px; border-radius: 999px; background: var(--school-on-hero-soft, rgba(255, 255, 255, .2)); font-size: 12.5px; font-weight: 600; }
a.mainbtn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
/* ссылка главной кнопкой на прежней странице (приказ 274 п. 2): цвет текста кнопки, не ссылки `.legacy a` */
.legacy a.mainbtn { color: var(--on-accent); }
/* крутилка числа `.stepper` (ДИЗАЙН_СИСТЕМА_362 компонент 8): кнопки 44×44, у края гаснет, число Unbounded */
.stepper { display: flex; align-items: center; gap: 10px; flex: none; }
.stepper form { margin: 0; }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; background: var(--school-tint); color: var(--accent-ink); font-size: 22px; font-weight: 600; }
.stepper button:disabled { opacity: .35; }
.stepper .num { min-width: 2ch; text-align: center; font-size: 22px; }

/* приказ 128: «Мои условия» блогера (МАКЕТ_362 экран 8; ДИЗАЙН_СИСТЕМА_362 р. 2: hero со шкалой дней, плитки, шкала
   `.prog` и `.posts`, строки с бейджем, коды `.codeline` с «Скопировать», тост 15) */
.hero .t { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tiles > .tile, .codeline .sub, .row .main { min-width: 0; overflow-wrap: anywhere; }
.hero .badge { padding: 4px 10px; border-radius: 999px; background: var(--school-on-hero-soft); font-size: 12.5px; font-weight: 600; }
.hero .hday { position: relative; z-index: 1; display: grid; gap: 6px; }
.prog { height: 8px; border-radius: 4px; background: var(--school-chip); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.hero .prog { background: var(--school-on-hero-soft); }
.hero .prog i { background: var(--school-on-hero); }
.row .main .prog { margin: 6px 0 2px; }
.posts { position: relative; height: 34px; margin: 4px 6px 0; }
.posts .ln { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--school-chip); }
.posts .ln i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.posts .pt { position: absolute; top: 3px; transform: translateX(-50%); display: grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--tg-theme-subtitle-text-color); font-variant-numeric: tabular-nums; }
.posts .pt i { width: 16px; height: 16px; border-radius: 50%; background: var(--tg-theme-section-bg-color); border: 2px solid var(--school-chip); }
.posts .pt.done i { background: var(--school-success); border-color: var(--school-success); }
.posts .pt.due i { border-color: var(--accent); }
.posts .pt.due { color: var(--accent-ink); font-weight: 600; }
.codes { display: grid; gap: 8px; }
.codeline { display: flex; align-items: center; gap: 10px; }
.codeline .main { flex: 1; min-width: 0; display: grid; }
.codeline .code { flex: none; padding: 4px 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.copy { min-height: 44px; padding: 0 10px; color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 112px; z-index: 5; max-width: 528px; margin: 0 auto; padding: 11px 14px; border-radius: 12px; background: var(--school-toast-bg); color: var(--school-toast-fg); font-size: 13.5px; text-align: center; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: none; }
/* приказ 126 (МАКЕТ_362.html дословно): плашка «Что сделать» нажатием целиком, шкала шагов кандидата на hero */
.notice.btnlike { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; min-height: 48px; border: 0; color: var(--tg-theme-text-color); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.notice.btnlike span:not(.ic) { flex: 1; }
.steps { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; }
.steps li { list-style: none; display: grid; gap: 6px; font-size: 12px; line-height: 1.2; color: var(--school-on-hero, #FFFFFF); }
.steps li i { height: 6px; border-radius: 3px; background: var(--school-on-hero-soft, rgba(255,255,255,.2)); }
.steps li.done i { background: var(--school-on-hero, #FFFFFF); opacity: .7; }
.steps li.now i { background: var(--school-on-hero, #FFFFFF); }
.steps li.now { color: var(--school-on-hero, #FFFFFF); font-weight: 600; }

/* приказ 148 (`barter_deals`): плитки выбора листа «Предложение блогеру» (плитка каталога 128 с отметкой, классом
   `.tiles.pick`, своего компонента выбора в 362 нет) и три плитки «Начисления» в ряд у блогера */
.tiles.pick .tile .lbl { font-size: 14px; color: var(--tg-theme-text-color); }
.tiles.pick .tile .num:empty { display: none; }
.tiles.pick .tile[aria-pressed="true"] { background: var(--school-tint); box-shadow: inset 0 0 0 2px var(--accent); }
.tiles.pick .tile:disabled { opacity: .45; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.three .tile .num { font-size: 22px; }
.tiles.three .tile { hyphens: none; overflow-wrap: normal; word-break: keep-all; font-size: 13px; padding-left: 10px; padding-right: 10px; }
.mainbtn[disabled] { opacity: 0.45; filter: grayscale(1); cursor: default; }

/* приказ 260: прежние страницы W- (`/my`, `/paid`, тест уровня, тетрадь, игры, комната по ссылке) в общей оболочке
   (`legacyPage`, `worker/web.ts`): тело в `.content.legacy`, элементы разметки видом компонентов модуля: заголовок `.h1`,
   секция `.list.pad`, подпись `.sec-h`, кнопка `.btn2`, главная `.mainbtn`, опасная строкой `danger`, поля 44 px.
   Цвета только токенами; текст 16 px, подписи от 13 px, цели касания от 44 px. */
.back { min-height: 44px; }
.legacy { font-size: 16px; line-height: 1.45; }
.legacy > form#back { margin-bottom: -4px; }
.legacy h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.legacy h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); }
.legacy h3 { margin: 0; font-size: 16px; font-weight: 600; }
.legacy section, .legacy fieldset { margin: 0; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--tg-theme-section-bg-color); display: grid; gap: 10px; min-width: 0; }
.legacy fieldset legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font-weight: 600; }
.legacy p { margin: 0; overflow-wrap: anywhere; }
.legacy ul, .legacy ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.legacy a { color: var(--accent-ink); }
.legacy small, .legacy .sub { font-size: 13px; color: var(--tg-theme-subtitle-text-color); }
.legacy form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.legacy form > p { flex-basis: 100%; }
.legacy form button:not(.back):not(.mainbtn):not(.danger), .legacy a > button, .legacy > button {
  flex: 1 1 100%; min-height: 46px; padding: 8px 14px; border-radius: 12px;
  background: var(--school-tint); color: var(--accent-ink); font-size: 16px; font-weight: 600;
}
.legacy a:has(> button) { display: block; text-decoration: none; }
.legacy a > button { width: 100%; }
.legacy .mainbtn { flex: 1 1 100%; height: auto; min-height: 50px; }
.legacy button.danger { flex: 1 1 100%; min-height: 46px; padding: 8px 14px; border-radius: 12px; background: var(--school-danger-soft); color: var(--tg-theme-destructive-text-color); font-size: 16px; font-weight: 600; }
.legacy select, .legacy textarea, .legacy input[type="text"], .legacy input[type="email"], .legacy input[type="number"], .legacy input[type="search"], .legacy input:not([type]) {
  flex: 1 1 100%; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; font-size: 16px;
  border: 1px solid var(--tg-theme-section-separator-color); background: var(--tg-theme-bg-color); color: var(--tg-theme-text-color);
}
.legacy textarea { min-height: 96px; resize: vertical; }
.legacy label { display: flex; align-items: center; gap: 10px; min-height: 44px; flex: 1 1 100%; }
.legacy label:has(textarea), .legacy label:has(input[type="email"]), .legacy label:has(input[type="text"]), .legacy label:has(input:not([type])), .legacy label:has(select) { display: grid; gap: 6px; align-items: start; }
.legacy form > br, .legacy label + br, .legacy fieldset br { display: none; }
.legacy input[type="checkbox"], .legacy input[type="radio"] { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.legacy details { font-size: 15px; }
.legacy details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--accent-ink); }
.legacy img { max-width: 100%; height: auto; border-radius: 12px; }
.legacy svg { max-width: 100%; height: auto; }
.legacy table { width: 100%; border-collapse: collapse; }
.legacy pre { white-space: pre-wrap; overflow-wrap: anywhere; }
/* состояния (п. 6): пустое `.empty`, ошибка `.empty.err`, загрузка `.empty.load` одним компонентом */
.empty.err { color: var(--tg-theme-destructive-text-color); background: var(--school-danger-soft); }
.empty.load { color: var(--tg-theme-hint-color); }

/* приказ 261: раздел «команда»: Mini App команды `/tm` (`body.team.tm`) и `/mini/team` (`.team`), экран бота одним
   рендером `worker/team_screen.ts`: заголовок `.h1`, текст карточкой `.list.pad.txt`, строки `.row.go`, опасные
   `.row.danger` отдельной группой ниже, чипы выбора, главная `.mainbtn` (в Telegram `MainButton`). Прежний свой CSS
   `/tm` (`worker/miniapp_team_page.ts`) и `STYLE` `worker/web_team.ts` здесь, второго файла нет. */
div.team { display: contents; }
.team .msg { display: grid; gap: 10px; }
.team .txt { overflow-wrap: anywhere; }
.team .txt p { white-space: pre-line; font-size: 16px; line-height: 1.45; }
.team .prot, .team .protect { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.team button.row, .team a.row { border: 0; background: none; color: var(--tg-theme-text-color); font: inherit; text-decoration: none; cursor: pointer; }
.team .row.go .main b { color: var(--accent-ink); font-weight: 500; }
.team .row.danger .main b { color: var(--tg-theme-destructive-text-color); font-weight: 500; }
.team .row .ext { flex: none; color: var(--tg-theme-hint-color); font-size: 16px; }
.team .list > form + form .row::before, .team .list > form + a.row::before, .team .list > a.row + form .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--tg-theme-section-separator-color); }
.team .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; overflow: visible; }
.team .chips > form { display: contents; }
.team .chip { height: auto; min-height: 44px; white-space: normal; padding: 8px 14px; border: 0; border-radius: 22px; background: var(--school-chip); color: var(--tg-theme-text-color); font: inherit; font-size: 15px; cursor: pointer; }
.team .chip[aria-pressed="true"] { background: var(--school-tint); color: var(--accent-ink); font-weight: 600; }
.team textarea { width: 100%; min-height: 96px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--tg-theme-section-separator-color); background: var(--tg-theme-section-bg-color); color: var(--tg-theme-text-color); font: inherit; font-size: 16px; }
.team .backbar { padding: 14px 16px 0; }
.team .bottom > form { display: grid; }
.tm main { padding-bottom: 96px; }
.tm .input { display: flex; flex-direction: column; gap: 8px; }
.tm .cardph { display: block; width: 100%; border-radius: 14px; }
.tm main [hidden] { display: none !important; }
.tm .file { display: block; width: 100%; padding: 12px; border: 1px dashed var(--tg-theme-section-separator-color); border-radius: 12px; background: var(--tg-theme-section-bg-color); color: var(--tg-theme-subtitle-text-color); }
.tm .bottom.fix { position: fixed; left: 0; right: 0; }
.tm .wk.edit { grid-template-rows: auto; grid-auto-rows: 44px; }
.tm .wk.edit i { height: 44px; border-radius: 6px; cursor: pointer; }
.tm .wk.edit .hl { line-height: 44px; }
.tm .wk.edit i.on { background: var(--accent); }
.tm main .bottom { position: static; }
.tm .mainbtn:disabled { opacity: .45; cursor: default; }
.tm .swap { animation: swapIn .28s ease; }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tm .dots { display: flex; gap: 6px; justify-content: center; padding: 40px 0; }
.tm .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--tg-theme-hint-color); animation: tmDot 1s infinite; }
.tm .dots i:nth-child(2) { animation-delay: .15s; }
.tm .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tmDot { 50% { opacity: .3; } }
/* плитки сумм и чисел (п. 3): одного размера в ряду, цифры `--font-display`, подписи от 13 px (T-01, T-15, P-01, O-01, N-01) */
.tiles { grid-auto-rows: 1fr; }
.tile { align-content: start; min-height: 92px; }
.tile .num { font-family: var(--font-display); font-size: 24px; }
.tile .lbl, .tile .sub { font-size: 13px; }
/* бейдж длинной строкой («тестовый бот: ...» на N-01) переносится, а не уводит страницу вбок на 390 px */
.st { max-width: 100%; height: auto; min-height: 26px; white-space: normal; }

/* приказ 263a (ответ директора 06.11 на вопрос 1 доклада 263): мелкий текст на плашке hero белый без приглушения на
   прозрачной тёмной подложке `--hero-scrim` строкой, у кнопок, бейджей и аватара на плашке подложка `--hero-scrim-ctrl`
   поверх `--school-on-hero-soft`; каждая пара от 4,5:1 на светлом конце градиента и на кольце `::after` в обеих темах
   (tests/worker/kontrast_263.test.ts). Цвета бренда `--school-hero*`, градиент и расположение прежние; крупный текст
   (от 24 px) без подложки, норма 3:1. Текст над кольцом (`z-index`), иначе кольцо ложится поверх подложки. */
.hero > .k, .hero > .t, .hero > .tch { position: relative; z-index: 1; }
.hero .k, .hero .foot, .hero .line, .hero > span:not([class]), .hero .tch > span:last-child, .hero .num.sm, .earn .split, .pay2 .k2, .pay2 .num, .pay2 .s2 {
  position: relative; z-index: 1; justify-self: start;
  margin-left: -6px; padding: 0 6px; border-radius: 6px;
  background: var(--hero-scrim); color: var(--school-on-hero);
}
.steps li { padding: 0 4px; border-radius: 6px; background: var(--hero-scrim); color: var(--school-on-hero); }
.hero .badge, .hero .st, .hero .btn, .hero .tch .av {
  position: relative; z-index: 1;
  background: linear-gradient(var(--hero-scrim-ctrl), var(--hero-scrim-ctrl)), var(--school-on-hero-soft);
  color: var(--school-on-hero);
}
.hero { --hero-scrim: rgba(0, 0, 0, .26); --hero-scrim-ctrl: rgba(0, 0, 0, .32); }
/* приказ 262: страницы кандидата `/apply`, WC-01..WC-04, «новая ссылка» (`applyPage`, `worker/web_apply.ts`) в общей
   оболочке `.content.legacy.apply`, модуль файлом (CSP страниц `style-src 'self'`, без скриптов). Группы полей `.list.pad`,
   переключатели и галочки строками `.row`, поля 16 px и цели касания от 44 px, ошибка под полем цветом «опасно», одна
   главная кнопка `.mainbtn` внизу (`.bottom`), отзыв заявки строкой `danger` ниже прочих. Цвет ошибки и опасного: токен
   `--tg-theme-destructive-text-color`, смешанный с цветом текста темы (контраст от 4,5:1 в светлой и тёмной теме на фоне
   секции, страницы и плашки; сам токен не меняется). Без фиксированной ширины шире 328 px: 360 px без прокрутки вбок. */
.apply { --apply-danger: color-mix(in srgb, var(--tg-theme-destructive-text-color) 75%, var(--tg-theme-text-color)); overflow-x: clip; }
.apply .apply-home, .apply .lang-switch { margin: 0; font-size: 15px; }
.apply .apply-home a, .apply .lang-switch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.apply .apply-home a { color: var(--tg-theme-text-color); }
.apply .apply-home + .lang-switch { align-self: flex-end; margin-top: -58px; }
.apply .apply-form { display: grid; gap: 14px; min-width: 0; }
.apply-form fieldset { min-width: 0; gap: 8px; }
.apply-form legend { overflow-wrap: anywhere; }
.apply-form label { overflow-wrap: anywhere; min-width: 0; }
.apply-form input[type="text"], .apply-form input[type="email"], .apply-form select, .apply-form textarea { width: 100%; max-width: 100%; min-height: 44px; font-size: 16px; }
.apply .list.pad > .row { min-height: 44px; padding: 8px 0; }
.apply .list.pad > .row + .row::before { left: 34px; }
.apply-form .opt.lives-us { display: none; }
.apply-form:has(select[name="country"] option[value="US"]:checked) .opt.lives-us { display: flex; }
.apply-form details { border-top: 1px solid var(--tg-theme-section-separator-color); }
.apply-form .slots { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 10px; }
.apply-form .slot { flex: 0 0 auto; display: inline-flex; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--school-chip); font-size: 15px; }
.apply-form .slot:has(input:checked) { background: var(--school-tint); color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 0 0 2px var(--accent); }
.apply .err { margin: 0; color: var(--apply-danger); font-size: 14px; font-weight: 600; }
.apply .notice.err { font-size: 15px; }
.apply .bottom { margin: 0 -16px -24px; }
.apply a.row.danger { min-height: 48px; text-decoration: none; }
.apply .row.danger b, .apply button.danger { color: var(--apply-danger); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* приказ 262: проверка связи `/check` (`worker/check_web.ts`, разметка `board/check.ts`): видео и громкость карточками
   `.list.pad`, итог проверки плашкой `.notice` (отметка «да / нет» точкой цвета), рамка доски карточкой, «Проверить»
   главной кнопкой внизу. Цвета только токенами. */
.check h2 { margin: 0; font-size: 15px; font-weight: 600; }
.check video { display: block; width: 100%; max-height: 240px; border-radius: 12px; background: var(--tg-theme-secondary-bg-color); }
.check meter { display: block; width: 100%; height: 14px; }
.check .itog ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-weight: 500; overflow-wrap: anywhere; }
.check .itog li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--tg-theme-hint-color); }
.check .itog li.ok::before { background: var(--school-success); }
.check .itog li.bad::before { background: var(--tg-theme-destructive-text-color); }
.check .board iframe { display: block; width: 100%; height: 240px; border: 0; }
.check .bottom { margin: 0 -16px -24px; }
.check .mainbtn:disabled { opacity: .45; cursor: default; }
/* приказ 253: карточка брони нажимается целиком: кнопка «Оплатить пробный» растянута слоем на всю плашку (та же форма) */
.hero.held > form, .hero.held > form .btn-on-hero { position: static; }
.hero.held > form .btn-on-hero::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
/* приказ 326 п. 3: акценты токенами школы `--accent` (кнопка, радио, галочки), `--on-accent` (текст на ней, 4,9:1),
   `--accent-ink` (ссылки, заголовки разделов) из worker/school_tokens.css, а не `--tg-theme-*`: тема Telegram их перезаписывает */
/* приказ 326 п. 1: формула школы над карточкой урока Э3: первая строка акцентом, вторая серым */
.tagline { margin: -6px 0 0; display: grid; gap: 1px; font-size: 14.5px; line-height: 1.3; }
.tagline b { font-weight: 600; color: var(--accent-ink); }
.tagline span { color: var(--tg-theme-subtitle-text-color); }
/* приказ 326 п. 5: заглушка фото силуэтом в цвете школы (вместо буквы), оценка или «Новый», строка профиля, лист профиля */
.av.ph { background: var(--school-tint); color: var(--accent-ink); }
.av.ph svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.hero .tch .av { object-fit: cover; }
.hero .tch .av.ph { background: var(--school-on-hero-soft); color: var(--school-on-hero); }
.av.lg { width: 72px; height: 72px; }
.who .trate { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.pfl { justify-self: start; min-height: 24px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.pfl::after { content: " \203A"; }
.sheet.pf { max-height: 88vh; overflow-y: auto; }
/* закрытый лист не виден и не берёт фокус (за краем экрана он попадал в снимок во весь рост и в обход Tab) */
.sheet:not(.on) { visibility: hidden; transition: transform .28s cubic-bezier(.3, .7, .2, 1), visibility 0s .28s; }
.sheet.pf .head { display: flex; gap: 14px; align-items: center; }
.sheet.pf .who { display: grid; gap: 2px; }
.sheet.pf .who b { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.pf-sec { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--tg-theme-section-bg-color); }
.pf-sec p { margin: 0; font-size: 15px; line-height: 1.45; }
.pf-h { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); }
.sheet.pf .mainbtn { width: 100%; min-height: 50px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 600; }
/* приказ 326 п. 7: при нижней «Оплатить» кнопка карточки брони без своего вида, остаётся слоем касания на всю карточку */
.hero.held.one > form .btn-on-hero { height: 0; min-height: 0; margin: 0; padding: 0; border: 0; background: none; font-size: 0; overflow: hidden; }
/* приказ 326 п. 6: поле промокода раскрыто, подпись поля почты и отметка «обязательно» */
.field .lbl { font-size: 14px; font-weight: 600; color: var(--tg-theme-text-color); }
.field .req { font-weight: 500; color: var(--tg-theme-subtitle-text-color); }
.field.mail-f .sub { font-size: 12.5px; }
.promo-f .pr-row { display: flex; gap: 8px; }
.promo-f input { flex: 1; min-width: 0; text-transform: uppercase; }
.promo-f button { flex: none; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--school-tint); color: var(--accent-ink); font-weight: 600; }
/* приказ 326 п. 8: подпись «Часовой пояс» с отступом от края карточки, список поясов на всю ширину */
.tz-box { padding: 12px 16px; }
#fs { display: grid; gap: 14px; }
/* приказ 326 п. 5: «о себе» на карточке каталога две строки, целиком в профиле */
.tcard .who .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tz-box select { width: 100%; min-height: 44px; font: inherit; font-size: 16px; color: var(--tg-theme-text-color); background: var(--tg-theme-section-bg-color); border: 1px solid var(--tg-theme-section-separator-color); border-radius: 10px; padding: 0 10px; }
