/* Наши собственные display-правила (у .icon-btn, например, `display: flex`)
   перебивают UA-стиль для [hidden], и `el.hidden = true` ничего не прячет.
   Объявляем правило сами, иначе спрятанные кнопки остаются на экране. */
[hidden] { display: none !important; }

/* ---------- Экран / каркас ---------- */

#app {
    min-height: 100vh;
    background: var(--md-background);
    color: var(--md-on-background);
    display: flex;
    flex-direction: column;
    /* Контекст позиционирования для уходящего экрана (.screen-exit). */
    position: relative;
}

.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.screen-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.with-bottom-pad {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Слайд-переходы */
.screen-enter {
    transform: translateX(8%);
    opacity: 0;
    transition: transform 280ms cubic-bezier(.2,.7,.2,1), opacity 280ms ease;
}
.screen-enter:not(.screen-exit) {
    transform: translateX(0);
    opacity: 1;
}
.screen-exit {
    /* Оверлей поверх нового экрана, пока доигрывает анимация ухода: иначе
       два .screen (по 100vh) складываются в потоке в столбик, #app растёт
       до 200vh, и входящий экран на кадр встаёт под старым, а затем прыгает
       наверх — то самое мерцание. */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    transform: translateX(-8%);
    opacity: 0;
    transition: transform 280ms cubic-bezier(.2,.7,.2,1), opacity 280ms ease;
}

/* ---------- TopAppBar ---------- */

/* Шапка на фоне экрана: корень вкладки — крупный заголовок, экран со
   стрелкой «назад» — заголовок помельче, как TopAppBar в приложении. */
.topbar {
    display: flex;
    align-items: center;
    padding: 8px 8px 6px 20px;
    background: var(--md-background);
    color: var(--md-on-surface);
    min-height: 64px;
    gap: 4px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Внутри нативного WebView заголовок рисует хост, у нас остаются только
   кнопки действий — прижимаем их вправо и не занимаем высоту заголовка. */
.topbar-actions-only {
    min-height: 0;
    padding: 4px 8px;
    justify-content: flex-end;
    background: transparent;
}

.topbar-back {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    color: var(--md-on-surface);
    font-size: 22px;
    line-height: 1;
    /* Центрируем иконку в круге: без этого дефолтный padding кнопки
       прижимает SVG влево, и hover-фон оказывается смещён вправо. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}
.topbar-back:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }

.topbar-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.topbar:has(.topbar-back) { padding-left: 4px; }
.topbar-title-main {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-title-sub {
    font-size: 12px;
    color: var(--md-on-surface-variant);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* В мобильном клиенте VK его кнопки «о приложении» и «закрыть» висят в
   правом верхнем углу поверх нашей шапки — сдвигаем действия topBar
   левее, чтобы не перекрывались. Класс vk-mobile ставит main.js.
   ponytail: отступ под текущую ширину кнопок VK; если VK изменит их
   размер — поправить значение. */
.vk-mobile .topbar-actions { margin-right: 96px; }

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-on-surface);
}
.icon-btn:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }

/* ---------- Карточки ---------- */

.card {
    background: var(--md-surface-variant);
    color: var(--md-on-surface);
    border-radius: 12px;
    padding: 12px;
    margin: 8px 16px;
}
.card.clickable { cursor: pointer; transition: background 120ms; }
.card.clickable:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, var(--md-surface-variant)); }

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    transition: background 120ms, scale 150ms ease;
}
/* Нажатие — лёгкое сжатие у кнопок и плиток, как в приложении (pressScale). */
.btn:active:not(:disabled),
.icon-btn:active,
.preset-card:active,
.preset-own:active,
.pill-segment:active,
.nav-building:active,
.nav-recent-row:active { scale: 0.96; }
.icon-btn, .preset-card, .preset-own, .pill-segment, .nav-recent-row { transition: background-color 150ms ease, scale 150ms ease; }
@media (prefers-reduced-motion: reduce) {
    .btn:active, .icon-btn:active, .preset-card:active, .preset-own:active, .pill-segment:active,
    .nav-building:active, .nav-recent-row:active, .week-day:active, .filter-chip:active, .news-card:active,
    .group-card:active, .nav-variant:active, .nav-rail-btn:active, .qr-copy:active { scale: none; }
    .preset-variants, .bug-sent, .now-progress span, .nav-lesson-card { animation: none; }
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--md-primary);
    color: var(--md-on-primary);
}
.btn-primary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--md-primary) 90%, black);
}

.btn-tonal {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}
.btn-tonal:hover:not(:disabled) {
    background: color-mix(in srgb, var(--md-on-secondary-container) 10%, var(--md-secondary-container));
}

.btn-text {
    background: transparent;
    color: var(--md-primary);
}
.btn-text:hover:not(:disabled) {
    background: color-mix(in srgb, var(--md-primary) 12%, transparent);
}

/* ---------- Поля ввода ---------- */

/* Поле поиска — как OutlinedTextField с иконкой лупы в приложении. */
.text-field {
    width: calc(100% - 32px);
    margin: 8px 16px;
    padding: 14px 14px 14px 46px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238e9099'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") no-repeat 14px center / 22px;
    color: var(--md-on-surface);
    border: 1px solid var(--md-outline);
    border-radius: 4px;
    outline: none;
    font-size: 15px;
}
.text-field::placeholder { color: var(--md-on-surface-variant); }
.text-field:focus { border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); }

/* Сегменты с галочкой — как SegmentedButton в приложении. */
.segmented {
    display: flex;
    margin: 8px 16px;
    border: 1px solid var(--md-outline);
    border-radius: 20px;
    overflow: hidden;
}
.segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--md-on-surface);
    cursor: pointer;
}
.segment + .segment { border-left: 1px solid var(--md-outline); }
.segment.active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.segment.active::before { content: '✓'; }

/* ---------- Спиннер ---------- */

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid color-mix(in srgb, var(--md-primary) 30%, transparent);
    border-top-color: var(--md-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ---------- Пустое состояние ---------- */

.empty-state {
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    color: var(--md-on-surface-variant);
}
.empty-state-title {
    color: var(--md-on-surface);
    font-size: 16px;
    font-weight: 600;
}
.empty-state-subtitle {
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Нижняя шторка (для контекстного меню пары) ---------- */

.bottom-sheet-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: scrim-fade 220ms ease;
}
.bottom-sheet {
    background: var(--md-surface);
    color: var(--md-on-surface);
    border-radius: 24px 24px 0 0;
    padding: 16px 20px 32px;
    width: 100%;
    max-width: 600px;
    animation: sheet-slide 280ms cubic-bezier(.2,.7,.2,1);
}
.bottom-sheet-handle {
    width: 32px;
    height: 4px;
    background: var(--md-outline-variant);
    border-radius: 2px;
    margin: 0 auto 12px;
}

@keyframes scrim-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes sheet-slide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ---------- Строки выбора (Оформление, мастера) ---------- */

.picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* Выбранная тема и язык — заливка и галочка, как OptionRow в приложении. */
.picker-row.selected {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    font-weight: 700;
}
.picker-row.selected .picker-check { color: var(--md-on-primary-container); }
.picker-label {
    font-size: 14px;
}
.picker-check {
    color: var(--md-primary);
    font-size: 18px;
    font-weight: 700;
}

/* ---------- Строки редактора цветов ---------- */

.color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    color: var(--md-on-surface);
}
.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--md-outline-variant);
    flex-shrink: 0;
}
.color-row-text { flex: 1; min-width: 0; }
.color-row-label { font-size: 15px; font-weight: 500; }
.color-row-hint { font-size: 12px; color: var(--md-on-surface-variant); margin-top: 2px; }

/* Живой образец в редакторе темы: рисуется цветами палитры, а не темы. */
.tp-hint { margin: 8px 16px 0; font-size: 12px; color: var(--md-on-surface-variant); }
.tp {
    margin: 8px 16px;
    border-radius: 16px;
    border: 1px solid var(--md-outline-variant);
    overflow: hidden;
    cursor: pointer;
}
.tp-top { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.tp-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tp-row { display: flex; align-items: center; gap: 6px; align-self: stretch; }
.tp-grow { flex: 1; }
.tp-bar { padding: 3px 0; }
.tp-dot { width: 20px; height: 20px; border-radius: 50%; }
.tp-days { display: flex; gap: 6px; }
.tp-day {
    flex: 1;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.tp-day > span { padding: 6px; }
.tp-card { border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* Отступ у плашки, а не у текста — иначе до цвета плашки не дотянуться. */
.tp-label { border-radius: 6px; padding: 2px 6px; font-size: 12px; font-weight: 500; }
.tp-progress { align-self: stretch; height: 4px; margin: 4px 0; border-radius: 2px; overflow: hidden; }
.tp-progress > div { height: 100%; }
.tp-line { flex: 1; padding: 6px 0; }
.tp-line > div { height: 1px; }
.color-row-value { font-size: 12px; color: var(--md-on-surface-variant); font-family: monospace; }

/* Готовые темы: карточка рисуется цветами своей палитры, а не текущей темы. */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px 16px;
}
.preset-card {
    padding: 10px;
    border-radius: 12px;
    border: 1px solid;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.preset-card.selected { border: 2px solid var(--md-primary); padding: 9px; }
.preset-dots { display: flex; align-items: center; gap: 4px; }
.preset-dot { width: 16px; height: 16px; border-radius: 50%; }
.preset-check { margin-inline-start: auto; display: flex; }
.preset-check svg { width: 16px; height: 16px; }
.preset-wide { grid-column: 1 / -1; }
/* Вариации раскрытой темы — сразу под её рядом, во всю ширину. */
.preset-variants {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    animation: hint-in 240ms cubic-bezier(.2, 0, 0, 1);
}
.preset-own {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    border-radius: 12px;
    background: var(--md-surface);
    box-shadow: inset 0 0 0 1px var(--md-outline-variant);
    color: var(--md-on-surface);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
}
.preset-own > span:nth-child(2) { flex: 1; }
.preset-own.selected { box-shadow: inset 0 0 0 2px var(--md-primary); }
.preset-own svg { width: 20px; height: 20px; color: var(--md-on-surface-variant); }
.preset-own.selected svg { color: var(--md-primary); }
.preset-own-dot {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: conic-gradient(#e53935, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935);
}
.lang-group { margin-top: 0; }
.lang-group .wizard-option { border-radius: 0; padding: 0 16px; }
.lang-group .wizard-option[aria-checked="true"] { background: transparent; }
.preset-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.color-picker { max-height: 92vh; overflow-y: auto; }
.color-picker .color-preview {
    display: flex;
    overflow: hidden;
    width: 100%;
    height: 44px;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px var(--md-outline-variant);
    margin: 16px 0;
}
.color-picker .color-preview > span {
    flex: 1;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 500;
}
/* Круг оттенков: conic-gradient от 3 часов, как и угол в pick(). */
.color-wheel {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background:
        radial-gradient(closest-side, #fff, rgba(255, 255, 255, 0)),
        conic-gradient(from 90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    touch-action: none;
    cursor: crosshair;
}
.color-wheel-shade {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #000;
    pointer-events: none;
}
.color-wheel-thumb {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .4);
    pointer-events: none;
}
.color-picker .hex-input {
    grid-column: span 2;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}
.slider-row {
    display: grid;
    grid-template-columns: 110px 1fr 32px;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}
.slider-row-wide { grid-template-columns: 72px 1fr 40px; }
.slider-row input[type=range] {
    width: 100%;
    accent-color: var(--md-primary);
}
.slider-value {
    text-align: right;
    color: var(--md-on-surface-variant);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}
.color-picker-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* ---------- Календарь / Учебный план ---------- */

.section-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--md-primary);
    margin-bottom: 8px;
}
.section-subtitle.primary { color: var(--md-primary); }
.section-subtitle.error   { color: var(--md-error); }

.meta-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}
.meta-label { color: var(--md-on-surface-variant); }
.meta-value { color: var(--md-on-surface); text-align: end; }

.holidays-card .holiday-row {
    padding: 4px 0;
    font-size: 13px;
    color: var(--md-on-surface);
}

.activity-row {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    align-items: stretch;
}
.activity-bar {
    width: 3px;
    border-radius: 1.5px;
    flex-shrink: 0;
}
.activity-bar.activity-primary   { background: var(--md-primary); }
.activity-bar.activity-error     { background: var(--md-error); }
.activity-bar.activity-secondary { background: var(--md-secondary); }
.activity-bar.activity-tertiary  { background: var(--md-tertiary); }
.activity-bar.activity-muted     { background: var(--md-outline); }
.activity-text { flex: 1; }
.activity-title { font-size: 14px; color: var(--md-on-surface); }
.activity-date { font-size: 12px; color: var(--md-on-surface-variant); }

/* ---------- Мастера ---------- */

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    padding: 16px;
}

.error-banner {
    margin: 12px 16px;
    padding: 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--md-error) 15%, transparent);
    color: var(--md-error);
    font-size: 13px;
    line-height: 1.4;
}

/* ---------- Поиск преподавателей ---------- */

.fav-star {
    color: var(--md-tertiary);
    font-size: 18px;
    margin-right: 8px;
}
.icon-btn.starred {
    color: var(--md-tertiary);
}
.topbar-toggle {
    padding: 4px 12px !important;
}

/* ---------- Дисциплины учебного плана ---------- */

.discipline-card { gap: 6px; display: flex; flex-direction: column; }
.discipline-name { font-size: 14px; font-weight: 600; }
.discipline-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.discipline-meta { font-size: 12px; color: var(--md-on-surface-variant); }

/* ---------- Сравнение ---------- */

/* Шапка с именами групп едет вместе со списком — без неё на середине
   недели уже не помнишь, какая колонка чья. Имена — плашками своих цветов. */
.compare-head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 16px;
    padding: 10px 0 8px;
    border: 0;
    background: var(--md-background);
}
.compare-head-cell {
    padding: 6px 4px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.compare-head-cell.side-0 { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.compare-head-cell.side-1 { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
/* День сравнения — отдельная карточка, как ComparisonDayCard в приложении. */
.compare-day {
    margin: 0 16px 12px;
    padding: 12px 12px 4px;
    background: var(--md-surface);
    border-radius: 20px;
}
.compare-day h3 { padding-bottom: 8px; font-size: 14px; font-weight: 600; }
.compare-row {
    display: grid;
    grid-template-columns: 44px 1fr 1fr;
    align-items: stretch;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--md-outline-variant);
    font-size: 13px;
}
.compare-row:last-child { border-bottom: none; }
.compare-time { font-size: 12px; font-weight: 600; color: var(--md-primary); font-variant-numeric: tabular-nums; }
.compare-time span { display: block; font-weight: 400; color: var(--md-on-surface-variant); }
.compare-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 12px;
    background: var(--md-surface-variant);
}
.compare-cell-text { flex: 1; min-width: 0; }
.compare-cell small { display: block; margin-top: 1px; font-size: 11px; color: var(--md-on-surface-variant); }
.compare-cell.same { grid-column: span 2; background: color-mix(in srgb, var(--md-secondary) 14%, transparent); }
.compare-cell.same em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--md-secondary); }
.compare-cell.none {
    justify-content: center;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--md-outline-variant);
    font-size: 12px;
    color: var(--md-on-surface-variant);
}
.compare-subject { font-size: 13px; line-height: 1.3; }


/* ---------- Поиск аудиторий ---------- */

.room-card { display: flex; flex-direction: column; gap: 6px; }
.room-card-title { font-size: 16px; font-weight: 700; color: var(--md-primary); }
.room-slot {
    display: grid;
    grid-template-columns: 40px 100px 1fr;
    gap: 8px;
    font-size: 13px;
}
.room-day { color: var(--md-on-surface-variant); font-weight: 600; }
.room-time { color: var(--md-primary); font-weight: 600; }
.room-subject {
    color: var(--md-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-slot { margin-bottom: 4px; }
.room-slot-body { min-width: 0; }
.room-slot-meta {
    color: var(--md-on-surface-variant);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Заочка ---------- */

.zaoch-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px 16px;
    background: var(--md-surface);
    position: sticky;
    top: 0;  /* липнет к верху .screen-body, по той же причине что и .date-tabs-row */
    z-index: 5;
}
.zaoch-tab {
    padding: 8px 14px;
    border-radius: 18px;
    background: var(--md-surface-variant);
    color: var(--md-on-surface-variant);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.zaoch-tab.active {
    background: var(--md-primary);
    color: var(--md-on-primary);
}
.zaoch-schedule { padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.zaoch-day-card {
    background: var(--md-surface-variant);
    border-radius: 12px;
    padding: 16px;
}
.zaoch-day-title {
    color: var(--md-primary);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}
.zaoch-lesson-row { display: flex; gap: 12px; align-items: flex-start; }
.zaoch-lesson-divider { height: 1px; background: var(--md-outline-variant); margin: 8px 0; }
.zaoch-lesson-time { color: var(--md-primary); font-weight: 600; font-size: 13px; min-width: 90px; }
.zaoch-lesson-body { display: flex; flex-direction: column; gap: 2px; }
.zaoch-lesson-subject { color: var(--md-on-surface); font-size: 14px; }
.zaoch-lesson-meta { color: var(--md-on-surface-variant); font-size: 13px; }
.zaoch-lesson-exam { color: var(--md-error); font-weight: 700; font-size: 12px; }
/* Пара в карточке дня преподавателя — как mobile TeacherLessonRow. */
.teacher-lesson .lesson-subject { margin: 4px 0 2px; }
.teacher-lesson-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lesson-chip-freq {
    background: color-mix(in srgb, var(--md-outline-variant) 50%, transparent);
    color: var(--md-on-surface-variant);
}
.lesson-chip-group {
    background: var(--md-tertiary-container);
    color: var(--md-on-tertiary-container);
}

/* ---------- Конфиденциальность ---------- */

.privacy-link { display: flex; flex-direction: column; gap: 2px; }
.privacy-text {
    padding: 0 16px 24px;
    color: var(--md-on-surface);
    font-size: 14px;
    line-height: 1.5;
}
/* Списки внутри абзаца разделены одиночным переводом строки. */
.privacy-text p { margin-bottom: 12px; white-space: pre-line; }

/* ---------- Новости ---------- */

/* Карточка новости: дата, заголовок, две строки текста. */
.news-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: calc(100% - 32px);
    margin: 0 16px 10px;
    padding: 14px 16px;
    border-radius: 20px;
    background: var(--md-surface);
    text-align: left;
    transition: scale 150ms ease;
}
.news-card:active { scale: 0.98; }
.news-card-title { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--md-on-surface); text-wrap: balance; }
.news-card-date { font-size: 12px; color: var(--md-on-surface-variant); }
.news-card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--md-on-surface-variant);
}

/* Статья: дата, крупный заголовок, текст удобной длины строки. */
.news-article { max-width: 640px; padding: 4px 20px 32px; color: var(--md-on-surface); }
.news-article-date { font-size: 13px; color: var(--md-on-surface-variant); }
.news-article-title { font-size: 26px; font-weight: 600; line-height: 1.2; margin: 6px 0 16px; text-wrap: balance; }

.news-body { font-size: 15px; line-height: 1.6; }
.news-body h1, .news-body h2, .news-body h3 { font-weight: 700; line-height: 1.3; margin: 20px 0 8px; }
.news-body h1 { font-size: 20px; }
.news-body h2 { font-size: 18px; }
.news-body h3 { font-size: 16px; }
.news-body p { margin: 0 0 12px; }
.news-body ul, .news-body ol { margin: 0 0 12px; padding-left: 22px; }
.news-body li { margin-bottom: 4px; }
.news-body a { color: var(--md-primary); }
.news-body img { display: block; width: 100%; height: auto; margin: 4px 0 16px; border-radius: 16px; outline: 1px solid rgb(127 127 127 / 0.15); outline-offset: -1px; }
.news-body blockquote {
    margin: 0 0 12px;
    padding: 4px 12px;
    border-left: 3px solid var(--md-primary);
    color: var(--md-on-surface-variant);
}
.news-body code {
    background: var(--md-surface-variant);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}
.news-body pre {
    background: var(--md-surface-variant);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0 0 12px;
}
.news-body pre code { background: none; padding: 0; }
.news-body table { border-collapse: collapse; width: 100%; margin: 0 0 12px; }
.news-body th, .news-body td {
    border: 1px solid var(--md-outline-variant);
    padding: 6px 10px;
    text-align: left;
}

/* ---------- Карточка пары: значок закрепления, текст заметки ---------- */

.lesson-meta-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lesson-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--md-tertiary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lesson-pin-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    background: color-mix(in srgb, var(--md-primary) 15%, transparent);
    color: var(--md-primary);
}

/* ---------- Нижняя шторка пары ---------- */

.lesson-sheet {
    padding: 16px 20px 32px;
}
.lesson-sheet-subject {
    font-size: 16px;
    font-weight: 700;
    color: var(--md-on-surface);
    margin-bottom: 4px;
}
.lesson-sheet-meta {
    font-size: 13px;
    color: var(--md-on-surface-variant);
    margin-bottom: 12px;
}
.lesson-sheet-action {
    width: 100%;
    text-align: center;
    padding: 14px 4px;
    font-size: 15px;
    color: var(--md-primary);
    border-radius: 8px;
    background: transparent;
}
.lesson-sheet-action:hover {
    background: color-mix(in srgb, var(--md-primary) 8%, transparent);
}
.lesson-sheet-action.action-danger {
    color: var(--md-error);
}
.lesson-sheet-action.action-danger:hover {
    background: color-mix(in srgb, var(--md-error) 8%, transparent);
}

/* Переключатель-капсула (pillSegments): подложка выбранного переезжает. */
.pill-segments {
    position: relative;
    display: flex;
    margin: 4px 16px 0;
    padding: 3px;
    border-radius: 14px;
    background: var(--md-surface-variant);
}
.pill-thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / var(--n));
    border-radius: 11px;
    background: var(--md-surface);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
    transition: translate 240ms cubic-bezier(.2, 0, 0, 1);
}
.pill-segment {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    min-height: 38px;
    padding: 4px 6px;
    border-radius: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
    font-size: 14px;
    font-weight: 500;
    color: var(--md-on-surface-variant);
    transition: color 150ms ease;
}
.pill-segments.is-tall .pill-segment { min-height: 44px; }
.pill-segment small { font-size: 11px; font-weight: 400; opacity: 0.85; }
.pill-segment[aria-selected="true"] { color: var(--md-on-surface); }
@media (prefers-reduced-motion: reduce) { .pill-thumb { transition: none; } }

/* Общие части шторок: заголовок, пояснение, кнопки справа внизу. */
.sheet-title { font-size: 20px; font-weight: 500; }
.sheet-sub {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--md-on-surface-variant);
    text-wrap: pretty;
}
.sheet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* Шторка «Сообщить об ошибке» (bug-report.js). */
.bug-sheet { max-height: 92dvh; overflow-y: auto; }
.bug-label { display: block; margin-top: 16px; }
.bug-label > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--md-on-surface-variant); }
.bug-field {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--md-outline);
    border-radius: 16px;
    background: transparent;
    color: var(--md-on-surface);
    font: inherit;
    font-size: 15px;
    resize: vertical;
}
.bug-field:focus { outline: none; border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); }
.bug-count { margin-top: 4px; text-align: right; font-size: 12px; color: var(--md-on-surface-variant); font-variant-numeric: tabular-nums; }
.bug-attach { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px 0; cursor: pointer; }
.bug-status { min-height: 0; margin-top: 8px; font-size: 13px; color: var(--md-error); }
.bug-status:empty { display: none; }
.bug-send { gap: 8px; }
.bug-send svg { width: 18px; height: 18px; }
.bug-sent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px 24px;
    text-align: center;
    animation: hint-in 240ms cubic-bezier(.2, 0, 0, 1);
}
.bug-sent-ic {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}
.bug-sent-ic svg { width: 32px; height: 32px; }
.bug-sent b { font-size: 17px; font-weight: 600; }
.bug-sent span { font-size: 14px; color: var(--md-on-surface-variant); }

/* Шторка «Поделиться маршрутом» (qr-sheet.js). */
.qr-sheet-title {
    font-size: 20px;
    font-weight: 500;
}
.qr-sheet-caption {
    font-size: 14px;
    line-height: 1.45;
    color: var(--md-on-surface-variant);
    margin-top: 6px;
    text-wrap: pretty;
}
.qr-sheet-image {
    display: block;
    width: 100%;
    max-width: 232px;
    aspect-ratio: 1;
    margin: 16px auto 4px;
    border-radius: 20px;
    box-shadow: 0 0 0 1px var(--md-outline-variant);
    /* Код всегда на белом: на тёмной теме тёмные модули иначе сливаются с фоном. */
    background: #fff;
    opacity: 0;
    transition: opacity 160ms ease;
}
.qr-sheet-image.is-loaded {
    opacity: 1;
}
.qr-sheet-note {
    font-size: 12px;
    color: var(--md-on-surface-variant);
    text-align: center;
}
/* Место под подсказку держим всегда — иначе кнопки прыгают, когда она появляется. */
.qr-sheet-hint {
    min-height: 18px;
    font-size: 13px;
    text-align: center;
    color: var(--md-primary);
}
.qr-copy {
    width: 100%;
    height: 48px;
    gap: 8px;
    border-radius: 24px;
    margin-top: 4px;
    transition: background 120ms, scale 150ms ease;
}
.qr-copy:active { scale: 0.96; }
/* Иконка «скопировать» сменяется галочкой: обе в DOM, крест-фейд. */
.qr-copy-ic { position: relative; width: 20px; height: 20px; }
.qr-copy-ic svg {
    position: absolute;
    inset: 0;
    width: 20px;
    height: 20px;
    transition: opacity 200ms cubic-bezier(.2, 0, 0, 1), scale 200ms cubic-bezier(.2, 0, 0, 1), filter 200ms cubic-bezier(.2, 0, 0, 1);
}
.qr-copy-ic svg + svg, .qr-copy.is-done .qr-copy-ic svg:first-child { opacity: 0; scale: 0.25; filter: blur(4px); }
.qr-copy.is-done .qr-copy-ic svg + svg { opacity: 1; scale: 1; filter: none; }
.qr-sheet-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
/* flex:1 обязателен: .lesson-sheet-action тянет width:100%, и во флекс-строке две такие
   кнопки ужались бы по длине текста, получив разную ширину. */
.qr-sheet-action {
    flex: 1;
    width: auto;
    text-align: center;
    font-weight: 600;
}
.lesson-sheet-divider {
    height: 1px;
    background: var(--md-outline-variant);
    margin: 8px 0;
}

/* ---------- Диалог заметки ---------- */

.note-dialog {
    background: var(--md-surface);
    color: var(--md-on-surface);
    border-radius: 24px;
    padding: 20px 20px 16px;
    width: calc(100% - 32px);
    max-width: 420px;
    margin: auto;
    animation: dialog-enter 200ms ease;
}
.note-dialog-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}
.note-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--md-surface-variant);
    color: var(--md-on-surface);
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 96px;
    outline: none;
}
.note-textarea:focus { border-color: var(--md-primary); }
/* Выбор «только эта дата / каждую неделю» под полем заметки. */
.note-repeat-tabs { padding: 12px 0 0; position: static; background: none; flex-wrap: wrap; }
.note-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 12px;
}
.note-dialog-actions .action-danger { color: var(--md-error); }
.export-dialog-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--md-on-surface-variant);
}

/* Центрируем диалог заметки (переопределяем flex-end у scrim по умолчанию). */
.bottom-sheet-scrim:has(.note-dialog) {
    align-items: center;
}

/* ---------- Диалог «Сообщить об ошибке» ---------- */

/* Тот же диалог, что и у заметки, но выше: под текстом ещё тумблер с
   пояснением, поэтому на низких экранах разрешаем прокрутку. */
.bug-report-dialog {
    max-height: 85dvh;
    overflow-y: auto;
}
.bug-report-attach { margin-top: 14px; }
/* Контакт — одна строка под текстом обращения. */
.bug-report-contact { min-height: 0; resize: none; margin-top: 8px; }
.bug-report-status { margin-top: 10px; }
.theme-paste-error { margin-top: 8px; color: var(--md-error); }

@keyframes dialog-enter {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- Обновление потягиванием ---------- */

.pull-refresh-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translateY(-40px);
    opacity: 0;
    z-index: 100;
}
.pull-refresh-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid color-mix(in srgb, var(--md-primary) 30%, transparent);
    border-top-color: var(--md-primary);
    border-radius: 50%;
    transition: transform 100ms linear;
}
.pull-refresh-indicator.ready .pull-refresh-spinner {
    transform: rotate(180deg);
}
.pull-refresh-indicator.refreshing .pull-refresh-spinner {
    animation: spin 1s linear infinite;
}


/* ---------- Нижняя панель (tab-bar.js) ---------- */

/* Капсула над контентом: расписание, навигатор, кнопка в центре, меню.
   Все кнопки одинаковые, у выбранной — подложка и подпись. */
.tab-bar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 40;
    max-width: 560px;
    margin: 0 auto;
    height: 64px;
    padding: 0 8px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: color-mix(in srgb, var(--md-surface) 88%, transparent);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--md-outline-variant) 70%, transparent),
                0 12px 32px -12px rgba(0, 0, 0, 0.5);
    transition: translate 240ms cubic-bezier(.2, 0, 0, 1), opacity 200ms ease;
}
.tab-bar.hidden,
.tab-bar.typing {
    translate: 0 calc(100% + 32px);
    opacity: 0;
    pointer-events: none;
}
/* Место под панелью, чтобы она не закрывала конец списка. */
body.has-tab-bar .screen-body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
body.has-tab-bar .nav-screen {
    bottom: calc(92px + env(safe-area-inset-bottom));
    height: auto;
    min-height: 0;
    max-height: none;
}

.tab-btn {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 13px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: var(--md-on-surface-variant);
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 240ms cubic-bezier(.2, 0, 0, 1), color 150ms ease, scale 150ms ease;
}
.tab-btn:active { scale: 0.96; }
.tab-btn[aria-current="page"] {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}
/* Контур и заливка лежат друг на друге и перетекают при выборе. */
.tab-ic {
    position: relative;
    width: 24px;
    height: 24px;
    flex: none;
}
.tab-ic svg {
    position: absolute;
    inset: 0;
    width: 24px;
    height: 24px;
    transition: opacity 150ms ease, scale 150ms ease, filter 150ms ease;
}
.tab-ic svg:last-child,
.tab-btn[aria-current="page"] .tab-ic svg:first-child {
    opacity: 0;
    scale: 0.25;
    filter: blur(4px);
}
.tab-btn[aria-current="page"] .tab-ic svg:last-child {
    opacity: 1;
    scale: 1;
    filter: none;
}
.tab-label {
    display: grid;
    grid-template-columns: 0fr;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: grid-template-columns 240ms cubic-bezier(.2, 0, 0, 1), margin 240ms cubic-bezier(.2, 0, 0, 1);
}
.tab-label > span { min-width: 0; }
.tab-btn[aria-current="page"] .tab-label {
    grid-template-columns: 1fr;
    margin-inline-start: 6px;
}

/* Шторка «Кнопка в центре». */
/* Вариантов у своей кнопки семь — на низком экране шторка прокручивается. */
.center-sheet { max-height: 90dvh; overflow-y: auto; }
.center-sheet-title {
    font-size: 20px;
    font-weight: 600;
}
.center-sheet-hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--md-on-surface-variant);
    margin: 6px 0 10px;
}
.center-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 10px 12px;
    margin: 0 -12px;
    width: calc(100% + 24px);
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--md-on-surface);
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.center-opt[aria-checked="true"] {
    background: color-mix(in srgb, var(--md-primary) 10%, transparent);
}
.center-opt-icon {
    width: 44px;
    height: 44px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--md-surface-variant);
    color: var(--md-on-surface-variant);
}
.center-opt[aria-checked="true"] .center-opt-icon {
    background: var(--md-primary);
    color: var(--md-on-primary);
}
.center-opt-text { flex: 1; min-width: 0; }
.center-opt-text b { display: block; font-size: 15px; font-weight: 500; }
.center-opt-text span { display: block; font-size: 13px; color: var(--md-on-surface-variant); margin-top: 2px; }
.radio-dot {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 10px;
    box-shadow: inset 0 0 0 2px var(--md-outline);
}
.center-opt[aria-checked="true"] .radio-dot {
    box-shadow: inset 0 0 0 2px var(--md-primary), inset 0 0 0 6px var(--md-surface), inset 0 0 0 10px var(--md-primary);
}

@media (prefers-reduced-motion: reduce) {
    .tab-bar, .tab-btn, .tab-ic svg, .tab-label { transition: none; }
}

/* ---------- График учебного процесса ---------- */

.calendar-body { padding: 4px 16px 16px; }
.calendar-body .menu-section-title { padding: 20px 4px 8px; }
.now-card {
    padding: 16px;
    border-radius: 20px;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
}
.now-card h2 { font-size: 20px; font-weight: 600; line-height: 1.25; text-wrap: balance; }
.now-progress {
    height: 4px;
    margin-top: 12px;
    border-radius: 2px;
    overflow: hidden;
    background: color-mix(in srgb, var(--md-on-primary-container) 20%, transparent);
}
.now-progress span {
    display: block;
    height: 100%;
    background: var(--md-on-primary-container);
    transform-origin: left;
    animation: progress-grow 700ms cubic-bezier(.2, 0, 0, 1);
}
.now-chip {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--md-on-primary-container) 12%, transparent);
    font-size: 12px;
    font-weight: 500;
}
.sem-card { padding: 16px; border-radius: 20px; background: var(--md-surface); }
.sem-range { font-size: 14px; font-weight: 500; color: var(--md-on-surface-variant); }
.sem-track { position: relative; margin: 10px 0 12px; }
.sem-line { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.sem-line i { display: block; min-width: 2px; }
.sem-today {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 16px;
    margin-left: -1px;
    background: var(--md-on-surface);
}
.sem-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.sem-row i { flex: none; width: 8px; height: 8px; border-radius: 4px; }
.sem-row b { flex: 1; min-width: 0; font-weight: 400; }
.sem-row.current b { font-weight: 600; }
.sem-row span { font-size: 12px; color: var(--md-on-surface-variant); font-variant-numeric: tabular-nums; }
.activity-primary { background: var(--md-primary); }
.activity-error { background: var(--md-error); }
.activity-tertiary { background: var(--md-tertiary); }
.activity-secondary { background: var(--md-secondary); }
.activity-muted { background: var(--md-outline); }
.holiday-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.holiday-chips span {
    padding: 6px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--md-error) 12%, transparent);
    font-size: 13px;
}
.kv-card { padding: 8px 16px; border-radius: 20px; background: var(--md-surface); }
.kv-card div { display: flex; gap: 12px; padding: 5px 0; font-size: 14px; }
.kv-card span { flex: 1; color: var(--md-on-surface-variant); }
.kv-card b { font-weight: 600; text-align: right; }

/* ---------- Рабочий учебный план ---------- */

.curriculum-head { margin: 4px 16px 0; }
.curriculum-head small { font-size: 12px; font-weight: 500; opacity: 0.85; }
.curriculum-head h2 { margin-top: 2px; }
.curriculum-head p { margin-top: 4px; font-size: 13px; opacity: 0.85; }
.filter-chips { display: flex; gap: 8px; padding: 12px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.filter-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--md-outline-variant);
    color: var(--md-on-surface);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 150ms ease, scale 150ms ease;
}
.filter-chip b { font-weight: 600; color: var(--md-on-surface-variant); }
.filter-chip:active { scale: 0.96; }
.filter-chip[aria-pressed="true"] {
    background: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
    box-shadow: none;
}
.filter-chip[aria-pressed="true"] b { color: inherit; }
.discipline-list { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 16px; }
.discipline-list .discipline-card { margin: 0; padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--md-surface); }
.discipline-list .discipline-name { font-size: 16px; }

/* ---------- Мастер параметров плана и графика ---------- */

.wizard-steps { display: flex; gap: 4px; padding: 4px 16px; }
.wizard-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--md-surface-variant); transition: background-color 200ms ease; }
.wizard-steps i.done { background: var(--md-primary); }
.wizard-picked { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 0; }
.wizard-picked button {
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--md-surface-variant);
    color: var(--md-on-surface-variant);
    font-size: 12px;
}
.wizard-picked b { color: var(--md-on-surface); font-weight: 600; }
.wizard-options { display: flex; flex-direction: column; padding: 0 16px; }
.wizard-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 0 12px 0 8px;
    border-radius: 16px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: var(--md-on-surface);
    transition: background-color 150ms ease;
}
.wizard-option > span:first-child { flex: 1; }
.wizard-option[aria-checked="true"] { background: var(--md-surface); }
.radio {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px var(--md-on-surface-variant);
    transition: box-shadow 150ms ease;
}
[aria-checked="true"] > .radio { box-shadow: inset 0 0 0 2px var(--md-primary), inset 0 0 0 5px var(--md-surface), inset 0 0 0 10px var(--md-primary); }
.wizard-actions { padding: 8px 16px 16px; }

/* ---------- Экзамены: карточка с плиткой даты и сводка сессии ---------- */

.exam-list { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 16px; }
.session-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: var(--md-surface);
}
.session-summary-ic {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--md-error) 16%, transparent);
    color: var(--md-error);
}
.session-summary-ic svg { width: 22px; height: 22px; }
.session-summary b { font-weight: 600; }
.exam-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: var(--md-surface);
}
.exam-date {
    flex: none;
    width: 54px;
    align-self: flex-start;
    padding: 8px 0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    line-height: 1.15;
}
.exam-date b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-date span { font-size: 12px; font-weight: 500; }
.exam-date small { font-size: 11px; opacity: 0.8; }
.exam-body { flex: 1; min-width: 0; }
.exam-body .lesson-time-row { min-height: 30px; }
.exam-body .lesson-time { font-weight: 600; color: var(--md-primary); font-variant-numeric: tabular-nums; }
.exam-body .lesson-subject { font-size: 16px; font-weight: 600; margin-top: 2px; }
.exam-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; font-size: 13px; color: var(--md-on-surface-variant); }
.exam-soon { font-weight: 500; color: var(--md-primary); }

/* ---------- Расписание преподавателя: дни заголовками, пары карточками ---------- */

.lesson-cards { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px; }
.day-head { padding: 12px 4px 0; font-size: 14px; font-weight: 600; }
.day-head span { font-weight: 400; color: var(--md-on-surface-variant); }
.lesson-cards .lesson-card { margin: 0; background: var(--md-surface); border-radius: 18px; padding: 12px 12px 14px 16px; }
.lesson-cards .lesson-time { font-weight: 600; color: var(--md-primary); font-variant-numeric: tabular-nums; }
.lesson-cards .lesson-subject { font-size: 16px; font-weight: 600; }
.lesson-cards .teacher-lesson-chips { margin-top: 8px; }
.pill-segments + .pill-segments { margin-top: 8px; }
