/* hse app web. Стиль приложения без Liquid Glass: матовые поверхности, один акцент Вышки.
   Сетка 4px, радиусы из Tokens.swift (8/12/16/20), системный шрифт. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px;

  --bg: #000;
  --surface: #1c1c1e;
  --raised: #2c2c2e;
  --step: rgba(255, 255, 255, 0.06);
  --step-hover: rgba(255, 255, 255, 0.1);
  --hairline: rgba(255, 255, 255, 0.1);
  --text: #fff;
  --text-2: #aeaeb2;
  --muted: #8e8e93;
  --accent: #0047bb;
  --accent-hover: #0a56d6;
  --accent-text: #6ea4ff;
  --on-accent: #fff;
  --danger: #ff6961;
  --danger-fill: #d70015;
  --ok: #30d158;
  --warn: #ff9f0a;
  --overlay: rgba(0, 0, 0, 0.6);
  --lens: rgba(255, 255, 255, 0.14);
  --sheet: #1c1c1e;
  --sheet-card: #2c2c2e;
  --r-xl: 24px; --r-sheet: 28px;

  --c-blue: #0a84ff; --c-indigo: #5e5ce6; --c-teal: #40c8e0; --c-green: #30d158; --c-orange: #ff9f0a;
  --c-red: #ff453a; --c-pink: #ff375f; --c-purple: #bf5af2; --c-gray: #8e8e93;
}

:root[data-theme="light"] {
  --bg: #fff;
  --surface: #f2f2f7;
  --raised: #fff;
  --step: rgba(0, 0, 0, 0.05);
  --step-hover: rgba(0, 0, 0, 0.09);
  --hairline: rgba(0, 0, 0, 0.1);
  --text: #111;
  --text-2: #55555a;
  --muted: #6c6c70;
  --accent-text: #0047bb;
  --danger: #c4120a;
  --danger-fill: #d70015;
  --ok: #1f8f3a;
  --overlay: rgba(0, 0, 0, 0.35);
  --lens: rgba(0, 0, 0, 0.09);
  --sheet: #f2f2f7;
  --sheet-card: #fff;

  --c-blue: #007aff; --c-indigo: #5856d6; --c-teal: #1f9cb3; --c-green: #28a745; --c-orange: #e08600;
  --c-red: #e5352b; --c-pink: #e0244a; --c-purple: #a041d1; --c-gray: #8e8e93;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
/* Обводка фокуса — только при работе с клавиатуры (класс kbd ставит theme-boot.js по Tab);
   после касаний и кликов синих рамок нет. */
:focus, :focus-visible { outline: none; }
html.kbd :focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.noscript { padding: 24px; }

/* Поверхности */
.card { background: var(--surface); border-radius: var(--r-lg); }
:root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }

/* Кнопки */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--r-sm); background: var(--step); color: var(--text); font-weight: 500;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease), opacity 150ms var(--ease);
}
.button:hover { background: var(--step-hover); }
.button:active { transform: scale(0.98); }
.button:disabled { opacity: 0.45; cursor: default; transform: none; }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-danger { background: var(--danger-fill); color: #fff; }
.button-danger:hover { background: #e8222f; }
.button-quiet { background: transparent; color: var(--danger); }
.button-quiet:hover { background: var(--step); }
.button-small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.button-wide { width: 100%; }
.icon-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-xs);
  background: transparent; color: var(--text-2); transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.icon-button:hover { background: var(--step); color: var(--text); }

/* Поля */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { font-size: 13px; color: var(--text-2); }
.field-hint { font-size: 12px; color: var(--muted); }
.field-input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: var(--r-sm);
  background: var(--raised); color: var(--text); transition: border-color 150ms var(--ease);
}
:root[data-theme="light"] .field-input { background: var(--bg); }
.field-input:focus-visible { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-text); }
.field-input[readonly], .field-input:disabled { opacity: 0.6; }
.field-input-compact { width: auto; }
.field-textarea { padding: 12px; min-height: 96px; resize: vertical; line-height: 1.45; }
.field-select { min-width: 156px; width: auto; padding-right: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-field { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.check-field input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.form-error { color: var(--danger); font-size: 13px; }
.form-note { color: var(--text-2); font-size: 13px; background: var(--step); padding: 12px; border-radius: var(--r-sm); }
.counter { font-family: var(--mono); font-variant-numeric: tabular-nums; justify-self: end; }
.spacer { flex: 1; }


/* ===== Каркас приложения: телефонная колонка, как в iOS-приложении ===== */
html { touch-action: manipulation; -webkit-tap-highlight-color: transparent; background: var(--bg); }
body { overscroll-behavior-y: none; min-height: 100dvh; }
#app { min-height: 100dvh; }
.app { width: 100%; max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
.noselect, .hdr, .tabbar, .seg, .strip { user-select: none; -webkit-user-select: none; }

/* Шапка: колокольчик слева, профиль справа, содержимое по центру. Контент ездит под ней. */
.screen { min-height: 100dvh; padding-bottom: calc(62px + 16px + 28px + env(safe-area-inset-bottom)); }
/* Только прозрачность: transform у предка привязал бы position: fixed (нижний бар, «+») к странице. */
.app { animation: fade-in 320ms var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.screen-head {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  padding: calc(8px + env(safe-area-inset-top)) 16px 12px; display: grid; gap: 12px;
}
.screen-head::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background: linear-gradient(var(--bg), transparent);
}
.hdr { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.hdr-mid { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.hdr-title { font-size: 20px; line-height: 1.2; font-weight: 600; text-align: center; }
.hdr-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text);
  transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.hdr-btn:active { transform: scale(0.94); }
.hdr-btn .dot { position: absolute; }
.hdr-pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.screen-body { padding: 4px 16px 0; display: grid; gap: 28px; align-content: start; }

/* Секции ленты и списков */
.sec { display: grid; gap: 8px; }
.sec-head, .lsec-head, .task-sec-head { padding: 0 16px; font-size: 17px; line-height: 1.3; font-weight: 500; color: var(--muted); }
.sec-head.is-caps { font-size: 15px; }
.sec-count { font: 600 12px/1 var(--mono); margin-left: 6px; color: var(--muted); opacity: 0.7; }
.nodata { text-align: center; color: var(--muted); font-size: 13px; padding: 12px 16px; }
.screen-body > .nodata { padding-top: 32px; }
.rows-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.rows-card > * + * { margin-top: 0; }
.list-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; width: 100%; border: 0; background: transparent; text-align: left; }
.list-row + .list-row { border-top: 1px solid var(--hairline); }
.list-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list-title { font-size: 17px; }
.list-sub { font-size: 13px; color: var(--muted); }
.chev { color: var(--muted); opacity: 0.7; flex: none; display: grid; }

/* Нижнее меню: капсула вкладок и отдельный круг поиска */
.tabbar {
  position: fixed; left: 50%; bottom: 0; z-index: 10; width: min(560px, 100%); transform: translateX(-50%);
  display: flex; gap: 12px; padding: 0 16px calc(8px + env(safe-area-inset-bottom)); pointer-events: none;
}
.tabs {
  flex: 1; display: flex; align-items: center; height: 62px; padding: 4px; border-radius: 999px; pointer-events: auto;
  background: var(--surface); border: 1px solid var(--hairline); 
}
.tab { flex: 1; height: 100%; display: grid; place-items: center; border-radius: 999px; color: var(--text); transition: background-color 200ms var(--ease); }
.tab.is-active { background: var(--lens); }
.tab-search {
  flex: none; width: 62px; height: 62px; border-radius: 50%; pointer-events: auto; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--hairline);  color: var(--text);
}
.tab-search.is-active { background: var(--lens); }
.fab {
  position: fixed; z-index: 9; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--text);
  right: max(16px, calc(50% - 280px + 16px)); bottom: calc(62px + 8px + 12px + env(safe-area-inset-bottom));
  transition: transform 150ms var(--ease);
}
.fab:active { transform: scale(0.94); }

/* Сегменты в шапке */
.seg { display: inline-flex; align-items: center; height: 44px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hairline); }
.seg button { height: 100%; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.seg button[aria-pressed="true"] { background: var(--lens); color: var(--text); }

/* Полоса дней недели */
.strip { display: flex; align-items: center; gap: 2px; padding: 8px; border-radius: var(--r-xl, 24px); background: var(--surface); border: 1px solid var(--hairline); }
.strip-arrow { flex: none; width: 20px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); padding: 0; }
.strip-cell { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 4px 0; border: 0; border-radius: 999px; background: transparent; transition: background-color 200ms var(--ease); }
.strip-cell.is-selected { background: var(--lens); }
.strip-name { font-size: 11px; font-weight: 500; color: var(--muted); }
.strip-num { width: 30px; height: 30px; display: grid; place-items: center; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text); }
.strip-cell.is-empty .strip-num { color: var(--muted); }
.strip-cell.is-today .strip-num { color: var(--accent-text); }
.weekbar { display: flex; align-items: center; justify-content: center; gap: 12px; }
.weekbar button { width: 32px; height: 36px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.weekbar span { min-width: 180px; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Меню-троеточие */
.menu { position: absolute; z-index: 20; min-width: 200px; padding: 6px; border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--hairline);  }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-xs); background: transparent; text-align: left; font-size: 16px; }
.menu button[aria-checked="true"] { background: var(--step); }
.menu-scrim { position: fixed; inset: 0; z-index: 19; }

/* Расписание */
.day-block { display: grid; gap: 12px; }
.day-name { font-size: 15px; font-weight: 500; color: var(--muted); }
.day-name b { font-size: 11px; font-weight: 500; color: var(--text); text-transform: none; margin-left: 6px; }
.day-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.day-empty { text-align: center; color: var(--muted); font-size: 15px; padding: 16px; }

/* Планер: таймлайн */
.timeline { overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); }
.tl-head, .tl-grid { display: grid; grid-template-columns: var(--gut, 48px) repeat(var(--cols), minmax(0, 1fr)); }
.tl-head { border-bottom: 1px solid var(--hairline); }
.tl-day { display: grid; justify-items: center; gap: 0; min-height: 48px; padding: 6px 0; border: 0; border-left: 1px solid var(--hairline); background: transparent; color: var(--muted); font-size: 11px; }
.tl-day-num { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text); text-transform: none; }
.tl-day.is-today .tl-day-num { color: var(--accent-text); }
.tl-scroll { position: relative; }
.tl-grid { position: relative; }
.hours { position: relative; }
.hour-label { position: absolute; right: 4px; transform: translateY(-50%); font: 400 11px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.hours .hour-label:first-child { transform: translateY(2px); }
.timeline-col { position: relative; border-left: 1px solid var(--hairline); }
.hour-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--hairline); }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); pointer-events: none; z-index: 3; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.is-week .event { padding: 2px 3px; border-radius: 6px; }
.is-week .event-title { font-size: 11px; -webkit-line-clamp: 3; }
.is-week .flag-mark { position: absolute; left: 2px; right: 2px; height: 16px; z-index: 2; display: flex; align-items: center; gap: 2px; color: var(--c-red); font-size: 11px; overflow: hidden; white-space: nowrap; border-radius: 4px; background: color-mix(in srgb, var(--c-red) 16%, var(--surface)); }

/* Задачи */
.task-sec { display: grid; gap: 8px; }
.task-sec-head { display: flex; align-items: baseline; gap: 6px; }
.task-sec-head .n { font-size: 13px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.task-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px 8px 16px; min-height: 52px; }
.task-row + .task-row { border-top: 1px solid var(--hairline); }
.check { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.check.is-done { color: var(--ok); }
.is-important:not(.is-done) .check { color: var(--danger); }
.task-main { flex: 1; min-width: 0; display: grid; gap: 2px; border: 0; background: transparent; text-align: left; padding: 0; }
.task-title { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.is-done .task-title { color: var(--muted); text-decoration: line-through; font-weight: 400; }
.is-important:not(.is-done) .task-title { color: var(--danger); }
.task-meta { font-size: 11px; color: var(--muted); }
.task-meta.is-overdue { color: var(--danger); }
.task-more { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }

/* Профиль, шторки */
.sheet {
  width: min(560px, 100%); height: calc(100dvh - 12px - env(safe-area-inset-top)); max-height: none; margin: auto auto 0; padding: 0; border: 0;
  border-radius: var(--r-sheet, 28px) var(--r-sheet, 28px) 0 0; background: var(--sheet); color: var(--text); overflow: hidden;
}
.sheet::backdrop { background: var(--overlay); }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up 320ms var(--ease) both; }
@keyframes sheet-up { from { transform: translateY(24%); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { padding: 16px 16px 12px; display: flex; flex: none; }
.sheet-head .hdr { width: 100%; }
.sheet .hdr-btn { background: var(--sheet-card); }
.sheet-scroll { flex: 1; overflow-y: auto; padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 24px; align-content: start; -webkit-overflow-scrolling: touch; }
.sheet .rows-card, .sheet .card-flat { background: var(--sheet-card); }
.student-card { background: var(--sheet-card); border-radius: var(--r-lg); padding: 12px 16px; display: grid; gap: 8px; width: 100%; border: 0; text-align: left; color: inherit; }
.student-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.student-top svg { margin-left: auto; width: 36px; height: 36px; }
.student-name { font-size: 20px; font-weight: 600; }
.student-line { font-size: 13px; }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px; border: 0; background: transparent; text-align: left; font-size: 17px; min-height: 52px; color: inherit; }
.menu-tile { width: 32px; height: 32px; border-radius: var(--r-xs); background: var(--step); display: grid; place-items: center; color: var(--muted); flex: none; }
.menu-row .grow { flex: 1; }
.block-head { font-size: 15px; font-weight: 500; color: var(--muted); padding: 0 0 8px 0; }
.stack { display: grid; gap: 24px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 4px; border: 0; background: transparent; color: var(--accent-text); font-size: 17px; }
.field-row-inline { display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 52px; }
.field-row-inline + .field-row-inline { border-top: 1px solid var(--hairline); }
.field-row-inline .grow { flex: 1; min-width: 0; }
.value { color: var(--muted); font-size: 15px; text-align: right; overflow-wrap: anywhere; }
.danger-text { color: var(--danger); }
.center-btn { display: block; width: 100%; padding: 14px 16px; border: 0; background: transparent; font-size: 17px; text-align: center; }
.foot-note { font-size: 13px; color: var(--muted); padding: 0 16px; }
.note { display: flex; gap: 16px; padding: 16px; color: var(--text-2); background: var(--sheet-card); border-radius: var(--r-lg); }
.note h2 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.note p { font-size: 13px; }
.note-icon { color: var(--accent-text); flex: none; }

/* Память */
.mem-list { background: var(--sheet-card); border-radius: var(--r-lg); overflow: hidden; }
.mem-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: transparent; text-align: left; color: inherit; }
.mem-item + .mem-item { border-top: 1px solid var(--hairline); }
.mem-item .t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.mem-item .t b { font-weight: 500; font-size: 16px; }
.mem-item .t span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-editor { background: var(--sheet-card); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 16px; }

/* Поиск */
.search-field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hairline); color: var(--muted); flex: 1; }
.search-field input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: none; color: var(--text); font-size: 16px; }

/* Заглушка загрузки и вход */
.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.login-card { width: min(400px, 100%); padding: 32px; display: grid; gap: 20px; background: var(--surface); border-radius: var(--r-lg); }
.login-card h1, .login-card h2 { font-size: 22px; font-weight: 600; }
.login-help { color: var(--muted); font-size: 13px; }
.card { background: var(--surface); border-radius: var(--r-lg); }

.toast {
  position: fixed; left: 50%; bottom: calc(62px + 24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; max-width: calc(100vw - 32px);
  padding: 12px 16px; border-radius: var(--r-sm); background: var(--raised); color: var(--text); font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.sync-pill { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sync-dot.is-ok { background: var(--ok); }
.sync-dot.is-bad { background: var(--danger); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Редакторы: на телефоне снизу, на широком экране по центру */
@media (max-width: 599px) {
  .dialog { width: 100%; max-width: none; margin: auto auto 0; border-radius: var(--r-sheet, 28px) var(--r-sheet, 28px) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dialog-narrow { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
}
@media (min-width: 600px) { .sheet { height: min(860px, calc(100dvh - 48px)); margin: auto; border-radius: var(--r-sheet, 28px); } }

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

/* События и цвета */
.event {
  --c: var(--c-gray);
  position: absolute; display: grid; align-content: start; gap: 2px; padding: 4px 8px; overflow: hidden; text-align: left;
  border: 0; border-left: 3px solid var(--c); border-radius: 8px;
  background: color-mix(in srgb, var(--c) 24%, var(--surface)); color: var(--text); z-index: 2; cursor: pointer;
  transition: background-color 150ms var(--ease);
}
.event:hover { background: color-mix(in srgb, var(--c) 34%, var(--surface)); }
.event.is-compact { padding: 2px 6px; }
.event-title { font-size: 13px; font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.event-time { font: 400 11px/1.2 var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.chip {
  --c: var(--c-gray);
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 24px; padding: 0 8px; border: 0; border-radius: 6px;
  background: color-mix(in srgb, var(--c) 24%, var(--surface)); color: var(--text); font-size: 12px;
}
.chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.chip { cursor: pointer; }
.chip-task { background: color-mix(in srgb, var(--c-red) 18%, var(--surface)); color: var(--text); }
.chip-task svg { color: var(--c-red); flex: none; }
.event-blue, .chip-blue, .swatch-blue { --c: var(--c-blue); }
.event-indigo, .chip-indigo, .swatch-indigo { --c: var(--c-indigo); }
.event-teal, .chip-teal, .swatch-teal { --c: var(--c-teal); }
.event-green, .chip-green, .swatch-green { --c: var(--c-green); }
.event-orange, .chip-orange, .swatch-orange { --c: var(--c-orange); }
.event-red, .chip-red, .swatch-red { --c: var(--c-red); }
.event-pink, .chip-pink, .swatch-pink { --c: var(--c-pink); }
.event-purple, .chip-purple, .swatch-purple { --c: var(--c-purple); }
.event-gray, .chip-gray, .swatch-gray, .swatch-auto { --c: var(--c-gray); }
/* Пары из ЕЛК в планере — всегда акцент Вышки, как в приложении */
.event-pair { --c: var(--accent); }
/* Диалог */
.dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text);
}
.dialog-narrow { width: min(420px, calc(100vw - 32px)); }
.dialog::backdrop { background: var(--overlay); }
.dialog[open] { animation: rise 220ms var(--ease) both; display: flex; flex-direction: column; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 20px; }
.dialog-head h2 { font-size: 17px; font-weight: 600; }
.dialog-body { padding: 16px 20px; overflow-y: auto; }
.dialog-foot { display: flex; align-items: center; gap: 8px; padding: 0 20px 20px; }
.dialog-text { color: var(--text-2); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--c); display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px var(--surface); font: 600 12px/1 var(--font); color: #fff;
  transition: border-color 150ms var(--ease);
}
.swatch-auto { background: transparent; box-shadow: none; border: 1.5px dashed var(--muted); color: var(--muted); }
.swatch[aria-checked="true"] { border-color: var(--text); }
.swatch-auto[aria-checked="true"] { border: 1.5px solid var(--text); color: var(--text); }
.hdr-spacer { flex: none; width: 44px; height: 44px; }
.check-ring { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; }
.check.is-done .check-ring, .is-done .check-ring { background: var(--ok); border-color: var(--ok); color: #fff; }
.mem-item.is-selected { background: var(--step); }
.sep { display: none; }
a.menu-row { text-decoration: none; }

/* ===== Выбор версии (RoleLoginScreen): четыре кнопки снизу и ссылки на документы ===== */
.roles { min-height: 100dvh; display: flex; justify-content: center; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); }
.roles-inner { width: min(560px, 100%); display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; }
.role-btn {
  height: 50px; width: 100%; border: 0; border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: 17px; font-weight: 600; transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.role-btn.is-primary { background: var(--accent); color: #fff; }
.role-btn:active { transform: scale(0.98); }
.role-links { margin-top: 8px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; }
.role-link { border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.login-back { justify-self: center; border: 0; background: transparent; color: var(--muted); font-size: 15px; padding: 4px 8px; }

/* ===== Выбор веб-портала ===== */
.portal-hub { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.portal-menu { position: relative; width: min(320px, 100%); }
.portal-trigger { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; transition: transform 150ms var(--ease), background-color 150ms var(--ease); }
.portal-trigger:active { transform: scale(0.98); }
.portal-trigger:focus-visible, .portal-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.portal-links { position: absolute; bottom: calc(100% + 10px); width: 100%; display: grid; gap: 2px; padding: 6px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface); box-shadow: 0 10px 24px rgb(0 0 0 / 16%); }
.portal-links[hidden] { display: none; }
.portal-link { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--r-xs); color: var(--text); font-size: 16px; text-decoration: none; transition: background-color 150ms var(--ease); }
.portal-link:hover { background: var(--step); }

/* ===== Сгруппированные списки (insetGrouped) ===== */
.lsec { display: grid; gap: 8px; }
.lsec-foot { padding: 0 16px; font-size: 13px; color: var(--muted); }
.lcard > .lrow + .lrow, .lcard > .lrow + .nodata, .lcard > .nodata + .lrow { border-top: 1px solid var(--hairline); }
.lrow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px;
  border: 0; background: transparent; color: inherit; text-align: left; font-size: 17px;
}
button.lrow { cursor: pointer; transition: background-color 150ms var(--ease); }
button.lrow:active { background: var(--step); }
button.lrow:disabled { opacity: 0.45; cursor: default; }
.lrow-top { align-items: flex-start; }
.lrow-col { flex-direction: column; align-items: stretch; gap: 8px; }
.lrow-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lrow-line { overflow-wrap: anywhere; }
.lrow-value { flex: none; text-align: right; font-size: 15px; }
.lrow-kicker { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.lrow-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.lrow-action { color: var(--accent-text); gap: 10px; }
.lrow-action.is-danger { color: var(--danger); }
.lrow-link { color: var(--accent-text); gap: 8px; min-height: 40px; }
.lrow-name { display: flex; align-items: center; gap: 6px; border: 0; padding: 0; background: transparent; color: inherit; text-align: left; }
.lrow-field { padding: 6px 16px; }
.lrow-input { width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; padding: 6px 0; resize: vertical; outline: none; line-height: 1.4; }
.lrow-input::placeholder { color: var(--muted); }
.lrow .chev { margin-left: auto; }
.lrow-main + .chev { margin-left: 0; }

/* Текстовые стили по шкале SF */
.caption { font-size: 12px; } .footnote { font-size: 13px; } .subhead { font-size: 15px; } .body { font-size: 17px; }
.headline { font-size: 17px; font-weight: 600; } .title3 { font-size: 20px; line-height: 1.25; } .title2 { font-size: 22px; line-height: 1.2; }
.semibold { font-weight: 600; } .medium { font-weight: 500; }
.muted { color: var(--muted); } .faint { color: var(--muted); opacity: 0.6; } .accent { color: var(--accent-text); }
.red { color: var(--c-red); } .red-soft { color: color-mix(in srgb, var(--c-red) 75%, transparent); } .orange { color: var(--c-orange); }
.mono { font-variant-numeric: tabular-nums; }
.strike { text-decoration: line-through; }
.pre { white-space: pre-wrap; }
.clamp1, .clamp2, .clamp3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
.clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }

/* Строка пары: время столбиком */
.timecol { flex: none; width: 48px; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.timecol-a { font-size: 15px; font-weight: 600; }
.timecol-b { font-size: 12px; color: var(--muted); }
.hw-badge { justify-self: start; padding: 2px 6px; border-radius: 999px; background: var(--c-red); color: #fff; font-size: 11px; font-weight: 600; }
.today-tag { margin-left: 6px; }

/* Листалка недели и полоса дней (WeekNavigator) */
.weeknav { display: grid; gap: 8px; }
.weeknav .weekbar { justify-content: space-between; }
.weeknav .weekbar button { width: 44px; height: 44px; color: var(--text); }
.weeknav .weekbar span { min-width: 0; font-size: 15px; font-weight: 500; }
.daystrip { display: flex; }
.daystrip-cell { flex: 1; min-width: 0; height: 50px; display: grid; place-content: center; justify-items: center; gap: 2px; border: 0; border-radius: 999px; background: transparent; transition: background-color 200ms var(--ease); }
.daystrip-cell.is-selected { background: var(--step); }
.daystrip-name { font-size: 11px; color: var(--muted); }
.daystrip-num { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--text); }
.daystrip-cell.is-selected .daystrip-num { font-weight: 600; }
.daystrip-cell.is-empty .daystrip-num { color: var(--muted); }
.daystrip-cell.is-today .daystrip-num { color: var(--accent-text); }

/* Шапка: точка «к проверке», заголовок вложенного экрана, кнопки справа */
.hdr-btn { position: relative; }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.hdr-title-sm { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-trail { display: flex; flex: none; }
.link-btn { flex: none; border: 0; padding: 4px 0; background: transparent; color: var(--accent-text); font-size: 13px; font-weight: 600; }
.hdr-link { font-size: 17px; font-weight: 400; min-height: 44px; padding: 0 4px; }
.stack-md { display: grid; gap: 12px; }
.stack-tight { display: grid; gap: 8px; }
.stack-tight .seg { width: 100%; }
.stack-tight .seg button { flex: 1; padding: 0 8px; }
.search-inline { flex: none; }
.pin { display: inline-flex; margin-right: 4px; color: var(--muted); vertical-align: -1px; }

/* Отметки за пару: посещаемость, «Оценка +», лента оценок */
.marks { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--step); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill-soft { background: color-mix(in srgb, var(--step) 50%, transparent); padding: 0 3px 0 10px; }
.pill-plus { width: 24px; height: 24px; display: grid; place-items: center; border: 0; padding: 0; border-radius: 50%; background: var(--step); color: var(--text); }
.grade-strip { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.grade-strip::-webkit-scrollbar { display: none; }
.grade-chip { flex: none; min-width: 34px; height: 30px; padding: 0 6px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.grade-picker { display: grid; gap: 16px; }
.grade-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; }
.grade-cell { height: 48px; border: 0; border-radius: var(--r-sm); background: var(--step); color: var(--text); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.grade-grid-tight .grade-cell { height: 40px; font-size: 17px; border-radius: var(--r-xs); }
.grade-cell.is-on { background: var(--accent); color: #fff; }

/* Журнал группы: фамилии закреплены слева, пары листаются вбок */
.journal-card { padding: 8px 0; }
.journal-scroll { overflow-x: auto; scrollbar-width: none; }
.journal-scroll::-webkit-scrollbar { display: none; }
.journal { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.journal th, .journal td { height: 40px; padding: 0; border-bottom: 1px solid var(--hairline); text-align: center; }
.journal thead th { border-bottom: 0; color: var(--muted); font-size: 11px; font-weight: 600; }
.journal tbody tr:last-child > * { border-bottom: 0; }
.journal .j-name { position: sticky; left: 0; z-index: 1; min-width: 132px; max-width: 132px; padding: 0 8px 0 16px; text-align: left; background: var(--surface); }
.j-link { border: 0; padding: 0; background: transparent; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 108px; }
.j-cell { min-width: 40px; width: 40px; }
.j-date { display: block; font-size: 11px; font-weight: 400; }
.j-kind { display: block; font-size: 11px; font-weight: 400; opacity: 0.6; }
.j-btn { width: 40px; height: 40px; border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 12px; }
.j-btn.is-grade { color: var(--text); font-size: 13px; font-weight: 600; }
.j-btn.is-absent { color: var(--c-red); font-weight: 600; }
.j-btn.is-excused { color: var(--muted); font-size: 11px; font-weight: 600; }
.j-btn.is-late { color: var(--c-orange); }
.j-btn.is-present { opacity: 0.6; }
.j-sum { min-width: 48px; font-size: 13px; padding: 0 4px; }

/* Ведомость */
.st-top { display: flex; align-items: center; gap: 12px; }
.st-top > :first-child { flex: 1; min-width: 0; }
.st-final { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-cells { display: flex; flex-wrap: wrap; gap: 16px; }
.st-cell { min-width: 40px; display: grid; justify-items: center; gap: 1px; border: 0; padding: 0; background: transparent; color: var(--text); }
.st-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.st-value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-cell.is-exam .st-value { color: var(--accent-text); }

/* Карточка пары: отдельные матовые блоки */
.info-block { display: grid; gap: 8px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); }
.info-title { font-size: 12px; font-weight: 500; color: var(--muted); }
.info-kicker { font-size: 13px; color: var(--muted); }
.info-head { font-size: 20px; font-weight: 600; line-height: 1.25; }
.info-fact { display: grid; gap: 4px; }
.info-label { font-size: 11px; font-weight: 500; color: var(--muted); }
.info-value { font-size: 15px; }
.formula { font-size: 15px; }
.scores { display: grid; gap: 4px; padding-top: 8px; }
.score-row { display: flex; justify-content: space-between; font-size: 15px; }
.info-block.is-plain { background: none; border-color: transparent; }
.info-link { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.info-link:hover { background: var(--raised); }
.info-block.is-hw { background: color-mix(in srgb, var(--c-red) 9%, var(--bg)); border-color: color-mix(in srgb, var(--c-red) 30%, transparent); }
.is-hw .info-title { color: var(--c-red); }
.hw-item { display: grid; gap: 2px; }
.hw-title { font-size: 15px; font-weight: 500; color: var(--c-red); }
.hw-due { font-size: 12px; color: color-mix(in srgb, var(--c-red) 75%, transparent); }

/* Стопка анонсов и новостей, дата-бейдж */
.date-badge { flex: none; width: 44px; height: 48px; border-radius: var(--r-sm); background: var(--step); display: grid; place-content: center; justify-items: center; line-height: 1.1; }
.date-badge b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.date-badge span { font-size: 11px; color: var(--muted); }
.stack-card { position: relative; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; margin-bottom: 0; }
.stack-card.has-more { margin-bottom: 8px; }
.stack-card.has-more::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -8px; height: 24px; border-radius: 0 0 var(--r-lg) var(--r-lg); background: var(--surface); opacity: 0.55; }
.stack-front { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface); transition: transform 150ms var(--ease); }
.stack-card:active .stack-front { transform: scale(0.98); }
.stack-count { flex: none; font-size: 13px; color: var(--muted); }

/* Зачётка */
.gb-summary { align-items: flex-start; }
.gb-stat { flex: 1; display: grid; gap: 2px; }

/* Карточка студента в профиле */
.course-badge { margin-left: -16px; width: 40px; height: 24px; display: grid; place-items: center; border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--step); color: var(--muted); font-size: 13px; font-weight: 600; }
.student-prog { font-size: 15px; }
.student-line .muted { color: var(--muted); }

/* Переключатель (Toggle) */
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 999px; background: var(--step-hover); cursor: pointer; transition: background-color 200ms var(--ease); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform 200ms var(--ease); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(20px); }

/* Редакторы задания и объявления */
.form-sec { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.checks { display: grid; gap: 4px; }
.links { display: grid; gap: 4px; }
.link-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent-text); }
.link-row > span { flex: 1; min-width: 0; }
.link-add { display: flex; gap: 8px; }
.link-add .field-input { flex: 1; }
.hdr-mid > .hdr-title-sm { min-width: 0; max-width: 100%; }
.lrow > .chev { align-self: center; }

/* MARK: 20.11.2026 — номер пары, ДЗ у пары, выбор даты, оценки, справочник, уведомления, задачи */
.accent-text { color: var(--accent-text); }
.caption2 { font-size: 11px; line-height: 1.3; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.linklike { border: 0; background: transparent; padding: 0; color: var(--accent-text); font: inherit; text-align: left; cursor: pointer; }

.pair-kind { display: inline-flex; align-items: center; gap: 6px; }
.pair-num { display: inline-grid; place-items: center; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 4px; background: var(--step); font-size: 11px; font-weight: 600; color: var(--muted); }
.hw-inline { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 8px; border-radius: var(--r-xs); background: rgba(255, 59, 48, 0.1); }
.hw-inline-main { display: grid; gap: 2px; min-width: 0; }

.sheet.dp-sheet { height: fit-content; max-height: calc(100dvh - 12px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.dp-head .hdr-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dp-sheet[open] { gap: 12px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 0; }
.dp-pill { flex: none; min-height: 38px; padding: 0 10px; font-size: 15px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--sheet-card); color: var(--text); }
.dp-pill.accent-text { color: var(--accent-text); }
.dp-nav { display: flex; align-items: center; gap: 4px; padding: 0 20px; }
.dp-month { font-size: 17px; font-weight: 600; }
.dp-nav .grow { flex: 1; }
.dp-arrow { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--accent-text); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; padding: 0 12px; }
.dp-wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding-bottom: 4px; }
.dp-day { justify-self: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.dp-day.is-today { color: var(--accent-text); font-weight: 600; }
.dp-day.is-selected { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.dp-go { margin: 4px 16px 0; min-height: 50px; border-radius: 999px; font-size: 17px; }

.grade-row { display: grid; gap: 10px; padding: 12px 16px; }
.grade-top { display: flex; align-items: flex-start; gap: 12px; }
.grade-badge { display: grid; justify-items: end; flex: none; line-height: 1.1; }
.grade-info { display: grid; gap: 8px; }
.grade-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; }
.grade-seg { position: relative; flex-basis: 0; min-width: 2px; background: var(--step); }
.grade-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.grade-legend { display: grid; gap: 4px; }
.grade-item { display: flex; align-items: center; gap: 8px; }
.grade-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.grade-score { min-width: 30px; text-align: right; }

.hb-page { padding-bottom: 24px; }
.hb-head { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.hb-icon { position: relative; flex: none; width: 68px; height: 68px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--step); overflow: hidden; }
.hb-icon img { width: 52px; height: 52px; }
.hb-corner { position: absolute; top: 0; left: 0; width: 0; height: 0; border-top: 14px solid transparent; border-right: 14px solid transparent; }
.hb-campuses { display: flex; gap: 6px; overflow-x: auto; padding: 0 4px; }
.hb-chip { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--step); color: var(--text); font-size: 12px; font-weight: 500; text-decoration: none; }
.hb-chip.is-selected { background: var(--accent); color: var(--on-accent); }
.hb-group { display: grid; gap: 8px; }
.hb-group-title { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 17px; font-weight: 600; }
.hb-tag { width: 4px; height: 18px; border-radius: 2px; background: var(--muted); }
.hb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hb-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 124px; padding: 12px; border: 0; border-radius: var(--r-sm); background: var(--surface); color: var(--text); text-align: left; text-decoration: none; overflow: hidden; }
.hb-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hb-card-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.hb-blocks { display: grid; gap: 12px; padding: 0 4px; }
.hb-h2 { margin-top: 8px; }
.rich { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.rich a { color: var(--accent-text); }
.hb-li { display: flex; align-items: flex-start; gap: 10px; }
.hb-li.is-indent { padding-left: 20px; }
.hb-li-icon { flex: none; width: 26px; color: var(--accent-text); display: grid; place-items: center; padding-top: 1px; }
.hb-li-n { flex: none; min-width: 18px; text-align: right; }
.hb-li-dot { flex: none; width: 5px; height: 5px; margin-top: 9px; border-radius: 50%; background: var(--muted); }
.hb-fold { padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface); }
.hb-fold summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.hb-fold summary::after { content: '⌄'; color: var(--muted); }
.hb-fold[open] summary { margin-bottom: 12px; }
.hb-note { padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: var(--r-xs); background: var(--step); }
.hb-promo { display: grid; gap: 8px; padding: 16px; border-radius: var(--r-sm); background: #102d69; color: #fff; }
.hb-promo-link { display: flex; align-items: flex-start; gap: 8px; border: 0; background: transparent; color: #fff; padding: 0; font-size: 15px; text-align: left; text-decoration: none; }
.hb-table { overflow-x: auto; border-radius: var(--r-sm); background: var(--surface); }
.hb-table table { border-collapse: collapse; min-width: 100%; }
.hb-table th, .hb-table td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); min-width: 90px; }
.hb-button { justify-content: center; text-decoration: none; }

.notice-row { align-items: flex-start; gap: 12px; }
.notice-top { display: flex; gap: 8px; }
.notice-filter { padding: 0 16px; }
.menu-tile.red { color: #ff453a; }

.tasks-bar { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 0; }
.task-notes { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Заметки: самостоятельный спокойный поток, без имитации стекла iOS. */
.note-composer { display: grid; gap: 12px; padding: 16px; }
.note-composer .button { justify-self: end; }
.note-section { display: grid; gap: 8px; }
.note-section h2 { padding: 0 16px; font-size: 17px; font-weight: 500; color: var(--muted); }
.notes-list { overflow: hidden; border-radius: var(--r-lg); background: var(--surface); }
.note-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 64px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--hairline); background: transparent; color: var(--text); text-align: left; }
.note-row:last-child { border-bottom: 0; }
.note-row:hover { background: var(--step); }
.note-row-main { flex: 1; min-width: 0; display: grid; gap: 3px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.note-title { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; }
.note-title svg { color: var(--accent-text); flex: none; }
.note-preview, .note-meta { overflow: hidden; color: var(--muted); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.note-meta { font-variant-numeric: tabular-nums; }
.note-more { flex: none; opacity: 0; }
.note-row:hover .note-more, .note-row:focus-within .note-more { opacity: 1; }
.note-checklist { display: grid; gap: 8px; }
.note-check-row { display: flex; align-items: center; gap: 8px; }
.note-check-row > input[type="checkbox"] { flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.note-check-row .field-input { flex: 1; min-width: 0; }
.note-search { min-height: 40px; }
.task-flag { flex: none; color: #ff9f0a; display: grid; }
.task-row.is-child { padding-left: 44px; }
.task-row.sub-toggle { min-height: 36px; padding-left: 52px; }
.quick-row { min-height: 48px; }
.quick-plus { flex: none; width: 24px; display: grid; place-items: center; color: var(--muted); }
.quick-input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; color: var(--text); font-size: 16px; }
.quick-input:focus-visible { outline: none; }
.tasks.is-columns { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.tasks.is-columns .task-sec { flex: none; width: min(300px, 82vw); scroll-snap-align: start; }
.sub-list { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.sub-item.is-done { color: var(--muted); text-decoration: line-through; }
.grade-item .grow, .notice-top .grow, .grade-top .grow { flex: 1; min-width: 0; }

/* MARK: поиск с категориями и историей */
.s-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; }
.s-chips::-webkit-scrollbar { display: none; }
.s-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; }
.s-chip.is-selected { background: rgba(0, 71, 187, 0.18); color: var(--accent-text); border-color: transparent; }
.s-empty { display: grid; justify-items: center; gap: 8px; padding: 64px 24px; text-align: center; color: var(--muted); }
.s-empty h2 { color: var(--text); margin: 8px 0 0; }
.s-empty p { margin: 0; }
.s-head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.lsec-head:has(.s-head) { display: flex; }
.s-row { gap: 12px; }
.s-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--step); color: var(--accent-text); font-weight: 600; font-size: 16px; }
.s-avatar.is-big { width: 88px; height: 88px; font-size: 30px; }
.s-card { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 8px 16px; }
.s-card h2, .s-card p { margin: 0; }
/* Строка-кнопка вокруг готовой строки списка (предмет «Модуля» → страница дисциплины) */
.row-button { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.row-button:hover { background: var(--step); }

/* Аккаунты: регистрация и онбординг */
.form-warning { border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 8px; background: var(--step); }
.form-warning p { margin: 0; font-size: 13px; color: var(--text-2); }
.form-warning .is-unavailable { opacity: 0.45; cursor: default; }
.form-warning .form-unavailable { color: var(--text-2); }
.combobox { position: relative; }
.combobox-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%); max-height: 264px; overflow: auto; }
.combobox-item { padding: 9px 10px; border-radius: var(--r-sm, 8px); font-size: 14px; cursor: pointer; }
.combobox-item:hover, .combobox-item:focus { background: var(--step); outline: none; }
.nowrap { white-space: nowrap; }

/* Выбор студентов в задании преподавателя */
.pick-list { display: grid; gap: 2px; max-height: 280px; overflow: auto; border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 6px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm, 8px); cursor: pointer; }
.pick-row:hover { background: var(--step); }
.pick-row input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
