/* Наши правки поверх Boron. Подключается последним. */

/* Шапка сливается со страницей, без полосы и цвета, кнопки плоские */
.app-topbar {
    background: var(--bs-body-bg) !important;
    border-bottom: 0;
}
.app-topbar .topbar-menu {
    min-height: var(--bs-topbar-height);
    align-items: center;
}
.app-topbar .btn,
.app-topbar .btn:hover,
.app-topbar .btn:active,
.app-topbar .btn.active {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--bs-secondary-color) !important;
}
.app-topbar .btn:hover {
    color: var(--bs-body-color) !important;
}
/* Разделы слева в шапке */
.top-nav {
    display: flex;
    gap: .5rem;
}
.top-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
}
.top-nav-link .ti {
    font-size: 1.35rem;
}
.top-nav-link:hover {
    color: var(--bs-body-color);
}
.top-nav-link.is-active {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.page-content > .page-container {
    padding-top: .5rem;
}

/* Блоки как бланк: рамка без тени */
.card {
    --bs-card-box-shadow: none;
    box-shadow: none !important;
}

/* Ту-ду как в Tivo, но в цвете: слева значок (◎ ждёт, ☑ сделано, ⊗ срыв), сделанное зачёркнуто,
   после названия эмоджи, справа «подробности». Фон пастельный по состоянию. */
.todo-list {
    list-style: none;
    margin: 0;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.todo-task {
    padding: 0;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    cursor: pointer;
    user-select: none;
    transition: background-color .15s, color .15s;
}
.todo-task.gu-mirror {
    opacity: .9;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);
    cursor: grabbing;
}
.todo-task.gu-transit {
    opacity: .3;
}
.todo-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
}
.todo-emoji {
    font-size: 1.05rem;
    line-height: 1;
}
.todo-more,
.todo-details button {
    border: 0;
    background: transparent;
    width: 2rem;
    height: 2rem;
    border-radius: var(--bs-border-radius);
    color: inherit;
    opacity: .6;
    font-size: 1.2rem;
}
.todo-more {
    margin-left: auto;
}
.todo-more:hover,
.todo-details button:hover {
    opacity: 1;
}
/* Подробности в той же строке слева от ⋯: маленькое поле, повтор, скрыть */
.todo-details {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
}
.todo-details[hidden] {
    display: none;
}
.is-detailed .todo-more {
    margin-left: 0;
    opacity: 1;
}
.todo-note {
    width: 4rem;
    text-align: center;
    height: 2rem;
    padding: 0 .5rem;
    border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
    border-radius: var(--bs-border-radius);
    background: color-mix(in srgb, var(--bs-body-bg) 35%, transparent);
    color: inherit;
    font-size: .8125rem;
    outline: 0;
}
.todo-note:focus {
    border-color: color-mix(in srgb, currentColor 55%, transparent);
}
.todo-note.is-invalid {
    border-color: var(--bs-danger);
}
/* Переключатель-иконка: включённый подсвечен фоном */
.btn-toggle.is-on {
    background: color-mix(in srgb, var(--bs-body-color) 14%, transparent) !important;
    opacity: 1 !important;
}
.todo-icon {
    font-size: 1.25rem;
    opacity: .7;
}
.todo-label {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .01em;
}
.todo-task.is-done .todo-label,
.todo-task.is-clean .todo-label {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}
.todo-task.is-late,
.todo-task.is-miss,
.todo-task.is-fail {
    background: color-mix(in srgb, var(--bs-danger) 28%, var(--bs-secondary-bg));
}
.todo-task.is-done,
.todo-task.is-clean {
    background: color-mix(in srgb, var(--bs-success) 32%, var(--bs-secondary-bg));
}

/* Шапки блоков. Свёрнутая — тонкая полоска без значков, клик раскрывает. Раскрытая отделена линией:
   слева действия, справа глаз (скрыть блок) и шеврон (свернуть). */
.block-head {
    display: none;
}
.block-head:not(.is-open) {
    display: block;
    height: 10px;
    min-height: 0;
    padding: 0;
    border: 0 !important;
    background: var(--bs-tertiary-bg);
    cursor: pointer;
}
.block-head:not(.is-open):hover {
    background: var(--bs-border-color-translucent);
}
.block-head:not(.is-open) > * {
    display: none !important;
}
.block-head.is-open {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 4.25rem;
    border-bottom: 1px solid var(--bs-border-color-translucent) !important;
}
.block-left {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}
.block-tools {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.quick-modes{
    display: flex;
    gap: .25rem;
}
.block-chevron,
.quick-modes button{
    border: 0;
    background: transparent;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    font-size: 1.35rem;
}

.block-chevron:hover,
.quick-modes button:hover{
    color: var(--bs-body-color);
}
.quick-modes button.is-active{
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.btn-add {
    border: 1px solid var(--bs-border-color) !important;
    box-shadow: none !important;
    color: var(--bs-body-color);
    font-size: 1.25rem;
}

.todo-body {
    overflow-y: auto;
}

/* Экран без прокрутки: блоки занимают высоту окна под шапкой */
.page-content {
    min-height: 0 !important;
}
.screen-fit {
    height: calc(100dvh - var(--bs-topbar-height) - 2rem);
    --bs-gutter-y: 1.5rem;
}
.screen-fit .card {
    margin-bottom: 0;
}

/* Свёрнутая шапка: тонкая полоска едва заметного цвета, клик по ней разворачивает */
.bar-strip {
    display: none;
}
.bar-collapsed .app-topbar {
    display: none;
}
.bar-collapsed .bar-strip {
    display: block;
    height: 8px;
    background: var(--bs-tertiary-bg);
    cursor: pointer;
}
.bar-collapsed .bar-strip:hover {
    background: var(--bs-border-color-translucent);
}
.bar-collapsed .page-content > .page-container {
    padding-top: 1.5rem;
}
.bar-collapsed .screen-fit {
    height: calc(100dvh - 3rem);
}
@media (max-width: 1199.98px) {
    .screen-fit {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    .screen-fit > :last-child {
        flex: 1 1 0;
        min-height: 0;
    }
}

/* Один общий хитмэп, клетки квадратные и максимальные: месяц делится на столько строк, сколько выгоднее блоку.
   Подпись 09/26 у первой строки месяца. Сегодня в обводке, выбранный день в пунктирной, будущее пустой рамкой. */
.hm-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}
.hm-map {
    display: flex;
    flex-direction: column;
    gap: var(--month-gap);
}
.hm-body {
    flex-direction: column;
}
.hm-info {
    margin-top: 1rem;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}
.hm-month-block {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}
.hm-row {
    display: grid;
    grid-template-columns: var(--label) repeat(var(--cols), var(--cell));
    grid-template-rows: var(--cell);
    gap: var(--gap);
    align-items: center;
}
.hm-month {
    height: var(--cell);
    line-height: var(--cell);
    overflow: visible;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--bs-secondary-color);
    text-align: right;
    padding-right: .5rem;
    white-space: nowrap;
}
.hm-cell {
    width: var(--cell);
    height: var(--cell);
    border-radius: 3px;
    background: var(--bs-tertiary-bg);
    cursor: pointer;
}
.hm-cell.is-out {
    visibility: hidden;
}
.hm-cell.is-future {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--bs-border-color-translucent);
    cursor: default;
}
.hm-cell.is-today {
    outline: 2px solid var(--bs-body-color);
    outline-offset: -2px;
}
.hm-cell.is-selected {
    outline: 2px dashed var(--bs-body-color);
    outline-offset: -2px;
}

.med-topics{
    display: flex;
    align-items: center;
    gap: .25rem;
}
.med-topics button {
    border: 0;
    background: transparent;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    font-size: 1.35rem;
}
.med-topics button.is-active {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.med-count {
    font-size: .75rem;
    margin-left: .1rem;
}
.med-next {
    width: auto;
    box-shadow: none;
}
.med-next[hidden] {
    display: none;
}

/* Лента записей: иконка направления, дата, текст, документы, напоминание */
.med-body {
    overflow-y: auto;
}

/* История направления: лента, год вехой, запись целиком */
.med-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 1.25rem 0 .25rem;
    color: var(--bs-secondary-color);
    font-size: 1.25rem;
}
.med-back:hover {
    color: var(--bs-body-color);
}

/* Календарь здоровья: день приёма закрашен, напоминание обведено пунктиром */
.hm-cell.has-visit {
    background: color-mix(in srgb, var(--bs-info) 55%, var(--bs-tertiary-bg));
}
.hm-cell.is-remind {
    outline: 2px dashed color-mix(in srgb, var(--bs-info) 80%, transparent);
    outline-offset: -2px;
}

/* Мелкие клетки (36 месяцев): подписи только у января и последнего месяца, мельче */
.hm-map.is-tiny .hm-month {
    visibility: hidden;
    font-size: 9px;
}
.hm-map.is-tiny .hm-month.is-key {
    visibility: visible;
}

/* Телефон: лента не выдавливает календарь, иконки направлений помещаются в шапку */
@media (max-width: 1199.98px) {
    .screen-fit > .block-col:first-child {
        max-height: 60%;
        min-height: 0;
    }
    .screen-fit > .block-col:first-child > .card {
        min-height: 0;
    }
}
@media (max-width: 575.98px) {
    .med-topics button,
    .block-head.is-open .block-chevron{
        min-width: 2rem;
        height: 2rem;
        font-size: 1.15rem;
    }
    .block-head.is-open {
        padding-left: .75rem;
        padding-right: .5rem;
    }
}

/* Шапка блока не сжимается, тело блока не выпускает сетку за свои границы */
.block-head {
    flex-shrink: 0;
}
.hm-body {
    overflow: hidden;
}
.screen-fit .card {
    min-height: 0;
}

/* Колонки не выше экрана: длинная лента прокручивается внутри своей карточки, а не растягивает строку */
.screen-fit > .block-col {
    max-height: 100%;
    min-height: 0;
}
.med-body,
.todo-body {
    flex: 1 1 auto;
    min-height: 0;
}

/* Сила: строка упражнения — название, вес, 4 клетки-подхода. Между группами отступ.
   Пустая клетка показывает серым повторы прошлого раза, сделанная — зелёная с числом. */
.train-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-top: 1.5rem;
}
.ex {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1rem;
    margin-bottom: .4rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}
/* Группы отступом не выделяются (Benji 2026-10-23): порядок и есть группы */
.ex.is-group {
    margin-top: 0;
}
.ex-title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ex-weight {
    display: inline-flex;
    align-items: baseline;
    gap: .2rem;
    font-size: .8rem;
    color: var(--bs-secondary-color);
    cursor: text;
}
.ex-weight input {
    width: 2.6rem;
    border: 0;
    border-bottom: 1px dashed color-mix(in srgb, currentColor 40%, transparent);
    background: transparent;
    color: var(--bs-body-color);
    text-align: right;
    font-size: .9rem;
    outline: 0;
}
.ex-weight.is-empty span {
    opacity: .4;
}
.ex-sets {
    display: inline-flex;
    gap: .35rem;
}
.ex-set {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid color-mix(in srgb, var(--bs-body-color) 14%, transparent);
    border-radius: var(--bs-border-radius);
    background: color-mix(in srgb, var(--bs-body-bg) 40%, transparent);
    color: var(--bs-body-color);
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    outline: 0;
    caret-color: transparent;
}
.ex-set::placeholder {
    color: var(--bs-secondary-color);
    opacity: .45;
    font-weight: 400;
}
.ex-set.is-done {
    border-color: transparent;
    background: color-mix(in srgb, var(--bs-success) 32%, var(--bs-tertiary-bg));
    caret-color: auto;
    cursor: text;
}
.ex-set.is-invalid {
    border-color: var(--bs-danger);
}
/* Вес тела в шапке */
.body-weight {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.25rem;
    color: var(--bs-secondary-color);
}
.body-weight input {
    width: 4.5rem;
    height: 2.25rem;
    text-align: right;
}
.body-weight .body-unit {
    font-size: .85rem;
}
/* Телефон: название строкой, под ним подходы и ⋯ в одну строку */
@media (max-width: 575.98px) {
    .ex {
        flex-wrap: wrap;
        row-gap: .4rem;
    }
    .ex-title {
        flex: 1 0 100%;
    }
    .ex-sets {
        margin-left: auto;
    }
}

.med-back span {
    font-size: .95rem;
    font-weight: 600;
}
/* Календарь здоровья */
.cal-body {
    flex: 1 1 auto;
    min-height: 0;
}
.cal-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.cal-nav button {
    border: 0;
    background: transparent;
    color: inherit;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--bs-border-radius);
    font-size: 1.15rem;
    opacity: .7;
}
.cal-nav button:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--bs-body-color) 10%, transparent);
}
.cal-title {
    margin-left: .5rem;
    font-weight: 600;
}
.med-calendar {
    height: 100%;
}
.med-calendar .fc-col-header-cell-cushion,
.med-calendar .fc-daygrid-day-number {
    color: var(--bs-secondary-color);
    font-size: .8rem;
    text-decoration: none;
}
.med-calendar .fc-day-today {
    background: color-mix(in srgb, var(--bs-body-color) 6%, transparent) !important;
}
.med-calendar .fc-event {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .1rem .35rem;
    border-radius: var(--bs-border-radius-sm);
    font-size: .75rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.med-calendar .fc-event span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.med-calendar .cal-visit {
    border: 0;
    background: color-mix(in srgb, var(--bs-info) 35%, var(--bs-tertiary-bg));
    color: var(--bs-body-color);
}
.med-calendar .cal-remind {
    border: 1px dashed color-mix(in srgb, var(--bs-info) 80%, transparent);
    background: transparent;
    color: var(--bs-info);
}

/* Сила: шапка — вес тела, наборы вкладками, добавление */
.train-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    min-width: 0;
}
.set-tabs {
    display: flex;
    gap: .25rem;
}
.set-tabs a {
    padding: .35rem .65rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    font-weight: 600;
    font-size: .875rem;
}
.set-tabs a:hover,
.set-tabs a.is-active {
    color: var(--bs-body-color);
    background: color-mix(in srgb, var(--bs-body-color) 10%, transparent);
}

.ex-details {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.ex-details[hidden] {
    display: none;
}
.ex-more,
.ex-hide {
    border: 0;
    background: transparent;
    color: inherit;
    width: 2rem;
    height: 2rem;
    opacity: .6;
    font-size: 1.1rem;
    border-radius: var(--bs-border-radius);
}
.ex-more:hover,
.ex-hide:hover,
.ex.is-detailed .ex-more {
    opacity: 1;
}
.med-topics button.is-invalid {
    outline: 1px solid var(--bs-danger);
}

.med-calendar .fc-daygrid-day {
    cursor: pointer;
}

/* Здоровье: сетка направлений 3 × 4 — квадратные плитки с иконкой, без подписей. Сетка вписывается в блок целиком. */
.med-body:has(.topic-grid) {
    container-type: size;
    display: flex;
    align-items: center;
    justify-content: center;
}
.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: .75rem;
    width: min(100cqw, 75cqh - 1rem, 30rem);
    aspect-ratio: 3 / 4;
}
.topic-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: calc(var(--bs-border-radius) * 2);
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: clamp(1.5rem, 9cqw, 2.75rem);
    transition: background-color .15s, color .15s;
}
.topic-tile.has-records {
    color: var(--bs-body-color);
}
a.topic-tile:hover,
.topic-tile.is-add:hover {
    color: var(--bs-body-color);
    background: color-mix(in srgb, var(--bs-body-color) 10%, var(--bs-tertiary-bg));
}
.topic-tile.is-off {
    background: transparent;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 10%, transparent);
}
.topic-tile.is-add {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--bs-body-color) 18%, transparent);
}

/* Шапка направления: назад, иконка, название, «+» */
.med-head {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.med-head .med-back {
    margin: 0;
    font-size: 1.2rem;
}
.med-head-icon {
    font-size: 1.35rem;
}

/* Запись направления: календарик даты слева, текст, документы миниатюрами и файлами, напоминание */
.rec-list {
    list-style: none;
    margin: 0;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.rec {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}
.rec.is-plan {
    background: transparent;
    border: 1px dashed color-mix(in srgb, var(--bs-info) 60%, transparent);
}
.rec-date {
    flex-shrink: 0;
    width: 3.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .35rem 0 .3rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    line-height: 1.1;
}
.rec-date b {
    font-size: 1.35rem;
}
.rec-date span {
    font-size: .75rem;
    color: var(--bs-secondary-color);
}
.rec-date small {
    font-size: .65rem;
    color: var(--bs-secondary-color);
    opacity: .75;
}
.is-plan .rec-date {
    color: var(--bs-info);
}
.rec-main {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: .2rem;
}
.rec-text {
    white-space: normal;
    overflow-wrap: anywhere;
}

.rec-docs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}
.rec-thumb {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: var(--bs-body-bg);
}
.rec-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rec-file {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    max-width: 14rem;
    height: 2.25rem;
    padding: 0 .75rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: .85rem;
}
.rec-file span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rec-next {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .6rem;
    font-size: .85rem;
    color: var(--bs-info);
}

/* Просмотр документа */
.doc-name {
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.doc-tab {
    color: var(--bs-secondary-color);
    font-size: 1.2rem;
}
.doc-body {
    display: flex;
    justify-content: center;
    padding: 0;
    height: 80vh;
}
.doc-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.doc-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.body-weight .body-save[hidden] {
    display: none;
}
.body-weight input.is-saved {
    border-color: var(--bs-success);
    box-shadow: 0 0 0 .15rem color-mix(in srgb, var(--bs-success) 30%, transparent);
}
.ex-add {
    background: transparent;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 18%, transparent);
    color: var(--bs-secondary-color);
    cursor: text;
}
.ex-add > i {
    font-size: 1.25rem;
}
.ex-add input {
    flex: 1 1 auto;
    min-width: 0;
    height: 2.4rem;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    outline: 0;
}
.ex-add .btn-add[hidden] {
    display: none;
}
.weight-chart {
    width: 100%;
    height: 100%;
}
.weight-chart[hidden] {
    display: none;
}
.body-weight .body-save {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 0;
    padding: 0;
    font-size: 1.1rem;
}
.body-weight input.is-invalid {
    background-image: none;
    padding-right: .75rem;
}

/* Аптечка на «дне»: выбор лекарства из списка с поиском */
.med-pick {
    flex: 1 1 auto;
    min-width: 0;
}
.med-pick[hidden]{
    display: none;
}
.med-pick .choices {
    margin: 0;
}
.med-pick .choices__inner {
    min-height: 2.5rem;
}
.quick-modes button.is-saved {
    color: var(--bs-success);
    background: color-mix(in srgb, var(--bs-success) 18%, transparent);
}
.todo-note[hidden],
.todo-edit[hidden] {
    display: none;
}

/* Светлая тема (2026-10-23): мягкие рамки вместо чёрных, пустые клетки и плитки заметнее, плашки календаря читаемые */

.med-calendar .fc-event,
.med-calendar .fc-event .fc-event-main {
    color: var(--bs-body-color) !important;
}
.med-calendar .cal-remind,
.med-calendar .cal-remind .fc-event-main {
    color: var(--bs-info) !important;
}

.med-pick .choices__inner {
    display: flex;
    align-items: center;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0 2.25rem 0 .75rem !important;
    border-radius: var(--bs-border-radius);
}
.med-pick .choices__list--single {
    padding: 0;
}
.med-pick .choices[data-type*=select-one]::after {
    right: .9rem;
    margin-top: -.15rem;
}
.med-pick .choices__list--dropdown {
    margin-top: .25rem;
    border-radius: var(--bs-border-radius);
}
.med-pick .choices__list--dropdown .choices__input {
    margin: .5rem;
    width: calc(100% - 1rem);
    height: 2.25rem;
    padding: 0 .75rem;
    border-radius: var(--bs-border-radius);
}
.med-pick .choices__list--dropdown .choices__item {
    padding: .55rem .75rem;
}
.med-pick .choices__placeholder {
    display: none;
}
.med-pick .choices__list--dropdown .choices__item {
    padding-left: 1.25rem;
}
.med-pick .choices__list--dropdown {
    border: 1px solid var(--bs-border-color) !important;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .18);
}

/* Скрытые задачи: 👁 в шапке «дня» показывает их бледными под списком, 👁 в строке возвращает */
.block-btn {
    border: 0;
    background: transparent;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    font-size: 1.35rem;
}
.block-btn:hover,
.block-btn.is-active {
    color: var(--bs-body-color);
}
.block-btn.is-active {
    background: var(--bs-tertiary-bg);
}
.todo-hidden-list {
    padding-top: 0;
}
.todo-hidden-list[hidden] {
    display: none;
}
.is-hidden-task {
    opacity: .5;
    cursor: default;
    background: transparent !important;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 20%, transparent);
}
.is-hidden-task:hover {
    opacity: .8;
}

/* Здоровье, третья версия (Benji, 2026-10-23): сетка 3 × 3, неактивные плитки без пунктира, лента старое сверху,
   новая запись внизу ленты внутри блока, запись открывается целиком, календарь без отступов. */
.topic-grid {
    grid-template-rows: repeat(3, 1fr);
    width: min(100cqw, 100cqh - 1rem, 30rem);
    aspect-ratio: 1;
}
.topic-grid[hidden] {
    display: none;
}
.topic-tile.is-off {
    border: 0;
    background: var(--bs-tertiary-bg);
    opacity: .35;
    cursor: default;
}
.cal-body {
    padding: 0;
}
.cal-body .fc-scrollgrid {
    border-left: 0;
    border-right: 0;
}
.rec[data-href] {
    cursor: pointer;
    transition: background-color .15s;
}
.rec[data-href]:hover {
    background: color-mix(in srgb, var(--bs-body-color) 9%, var(--bs-tertiary-bg));
}
.rec-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rec-meta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding-top: .25rem;
    font-size: .8rem;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}
.rec-meta .ti {
    color: var(--bs-info);
    font-size: .95rem;
}
.rec-list {
    padding-bottom: .75rem;
}
.rec.is-flat {
    padding: .6rem 1rem;
    align-items: center;
}
.rec.is-flat .rec-main {
    padding-top: 0;
}

/* Новая запись: свёрнутая — пунктирная строка с ⊕ внизу ленты, раскрытая — дата, текст, документы, напоминание */
.rec-new {
    margin: 0 0 1.5rem;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 18%, transparent);
    border-radius: var(--bs-border-radius);
}
.rec-new[hidden] {
    display: none;
}
.rec-new.is-standalone {
    margin-top: 1.5rem;
}
.rec-new:first-child,
.med-take:first-child {
    margin-top: 1.5rem;
}
.rec-new-open {
    width: 100%;
    height: 3rem;
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: 1.35rem;
}
.rec-new-open:hover {
    color: var(--bs-body-color);
}
.rec-new.is-open .rec-new-open,
.rec-new:not(.is-open) .rec-new-fields {
    display: none;
}
.rec-new-fields {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem;
}
.rec-new-top,
.rec-new-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.rec-new .rec-day,
.rec-new .med-next {
    width: auto;
    height: 2.5rem;
    box-shadow: none;
}
.rec-new .med-next[hidden] {
    display: none;
}
.rec-new textarea {
    resize: vertical;
    box-shadow: none;
}
.rec-new .btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rec-new .btn-toggle {
    border: 1px solid var(--bs-border-color) !important;
    box-shadow: none !important;
    color: var(--bs-secondary-color);
    font-size: 1.2rem;
    margin: 0;
    cursor: pointer;
}
.rec-new .btn-toggle.is-on {
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}
.rec-new-close {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
}
.rec-new-close:hover {
    color: var(--bs-body-color);
}
.rec-new .med-topics button.is-active {
    background: color-mix(in srgb, var(--bs-body-color) 14%, transparent);
    color: var(--bs-body-color);
}
.rec-new .med-topics.is-invalid button,
.rec-new .med-topics button.is-invalid {
    color: var(--bs-danger);
}

/* Запись целиком: дата и время, текст полностью, документы крупно, скрепка — дополнить */
.rec-page {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.rec-when {
    color: var(--bs-secondary-color);
    font-size: .9rem;
}
.rec-page.is-plan .rec-when {
    color: var(--bs-info);
}
.rec-body {
    font-size: 1.05rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.rec-page .rec-docs {
    margin-top: 0;
    align-items: flex-start;
}
.rec-thumb.is-big {
    width: 9rem;
    height: 9rem;
}
.rec-attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 25%, transparent);
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    font-size: 1.15rem;
    cursor: pointer;
}
.rec-thumb.is-big ~ .rec-attach {
    width: 9rem;
    height: 9rem;
    font-size: 1.5rem;
}
.rec-attach:hover {
    color: var(--bs-body-color);
}
.rec-attach.is-busy {
    opacity: .4;
    pointer-events: none;
}
.rec-attach.is-invalid {
    border-color: var(--bs-danger);
    color: var(--bs-danger);
}

/* Аптечка: внизу ленты выбор лекарства и ✓ */
.med-take {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1.5rem;
}
.med-take .med-pick {
    flex: 1 1 auto;
    min-width: 0;
}
.med-take .choices {
    margin: 0;
}
.med-take .btn-icon {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.med-head {
    min-height: 2.5rem;
}

.rec-new.is-standalone {
    width: 100%;
    align-self: flex-start;
}

/* «День»: новая задача — пунктирная строка в конце списка, как в «силе». ＋/− — знак задачи, ↻ — повтор. */
.todo-add {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: -.75rem 0 1.5rem;
    padding: .55rem .75rem .55rem 1.25rem;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 18%, transparent);
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    cursor: text;
}
.todo-add > i {
    font-size: 1.25rem;
}
.todo-add input {
    flex: 1 1 auto;
    min-width: 0;
    height: 2.4rem;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    outline: 0;
}
.todo-add .todo-sign,
.todo-add .todo-add-repeat {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: var(--bs-border-radius);
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: 1.1rem;
}
.todo-add .todo-sign:hover,
.todo-add .todo-add-repeat:hover {
    color: var(--bs-body-color);
}
.todo-add .todo-sign.is-dont {
    color: var(--bs-danger);
}
.todo-add .todo-add-repeat.is-on {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
.todo-add .btn-add {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.todo-add .btn-add[hidden] {
    display: none;
}
.block-btn:disabled {
    opacity: .3;
    cursor: default;
    color: var(--bs-secondary-color);
}

/* Сила: вес в строке упражнения, сохранение подсвечивается; хитмэп по неделям по центру блока */
.ex-weight {
    padding: .15rem .35rem;
    border-radius: var(--bs-border-radius);
    transition: background-color .3s;
}
.ex-weight:hover {
    background: color-mix(in srgb, var(--bs-body-color) 8%, transparent);
}
.ex-weight.is-saved {
    background: color-mix(in srgb, var(--bs-success) 30%, transparent);
}
.hm-map:has(.hm-weeks) {
    align-items: center;
}
.todo-add[hidden],
.todo-add-details[hidden] {
    display: none;
}
.todo-add-details {
    display: inline-flex;
    gap: .25rem;
}
.block-add.is-active {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}
.body-weight[hidden],
.ex-add[hidden] {
    display: none !important;
}
.ex-weight-save {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    width: 2rem;
    height: 2rem;
    border-radius: var(--bs-border-radius);
}
.ex-weight-save:hover {
    color: var(--bs-success);
}

/* Точка между блоками: клик по кругу — оба, левый, правый. Когда один блок развёрнут, точка стоит в поле у его края, не прилипая. */
.split-dot {
    position: relative;
    flex: 0 0 0;
    width: 0;
    padding: 0 !important;
    z-index: 5;
}
.split-dot button {
    position: absolute;
    top: 50%;
    left: 0;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 0;
    padding: 0;
    background: transparent;
}
.split-dot button::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    margin: 7px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--bs-body-color) 30%, transparent);
    transition: background-color .15s, transform .15s;
}
.split-dot button:hover::before {
    background: var(--bs-body-color);
    transform: scale(1.4);
}
.screen-fit[data-split=left] > .block-col:last-child,
.screen-fit[data-split=right] > .block-col:first-child {
    display: none !important;
}
.screen-fit:is([data-split=left], [data-split=right]) > .block-col {
    flex: 1 1 0;
    max-width: none;
    max-height: none;
}
/* Развёрнут левый — точка справа от него, правый — слева, в середине поля за краем карточки */
.screen-fit[data-split=left] .split-dot button {
    left: calc(16px - var(--bs-gutter-x) * .5);
}
.screen-fit[data-split=right] .split-dot button {
    left: calc(var(--bs-gutter-x) * .5 - 16px);
}
@media (max-width: 1199.98px) {
    .split-dot {
        width: 100%;
        height: 0;
        margin-top: 0 !important;
    }
    .split-dot button,
    .screen-fit[data-split] .split-dot button {
        top: calc(var(--bs-gutter-y) * .5);
        left: 50%;
    }
    .screen-fit[data-split=left] .split-dot button {
        top: calc(var(--bs-gutter-y) * .5 + 2px);
    }
    .screen-fit[data-split=right] .split-dot button {
        top: calc(var(--bs-gutter-y) * -.5 - 2px);
    }
}

/* Запись целиком: календарик даты, год и время, ✎; заголовок; текст; документы; следующий приём с годом */
.rec-page[hidden],
.rec-change[hidden] {
    display: none;
}
.rec-page .rec-when {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.rec-page .rec-date {
    background: var(--bs-tertiary-bg);
}
.rec-edit,
.rec-delete {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--bs-border-radius);
    font-size: 1.2rem;
}
.rec-edit:hover,
.rec-delete:hover {
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}
.rec-delete.is-armed {
    color: #fff;
    background: var(--bs-danger);
}
.rec-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
}
.rec-page .rec-next {
    align-self: flex-start;
    padding: .5rem .85rem;
    border-radius: var(--bs-border-radius);
    border: 1px dashed color-mix(in srgb, var(--bs-info) 60%, transparent);
    margin-top: 0;
    font-size: .95rem;
    gap: .5rem;
}
.rec-change {
    margin-top: 1.5rem;
}
.rec-title-in {
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: none;
}
.todo-add {
    padding-left: .6rem;
}
.todo-add .todo-sign {
    color: var(--bs-success);
    border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
}
.todo-add .todo-sign.is-dont {
    color: var(--bs-danger);
}

/* Вес упражнения в ⋯ — такая же клетка, как подход, без единиц. ✓ активна, когда число изменено; сохранено — зеленеет, ⋯ закрывается. */
.ex-details .ex-weight {
    padding: 0;
    background: transparent !important;
}
.ex-details .ex-weight input {
    width: 3.2rem;
    height: 2.4rem;
    border: 1px solid color-mix(in srgb, var(--bs-body-color) 30%, transparent);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ex-details .ex-weight input:focus {
    border-color: var(--bs-body-color);
}
.ex-details .ex-weight span {
    display: none;
}
.ex-weight-save {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid color-mix(in srgb, var(--bs-body-color) 30%, transparent);
    color: var(--bs-body-color);
}
.ex-weight-save:disabled {
    opacity: .3;
    cursor: default;
}
.ex-weight-save.is-saved {
    background: var(--bs-success);
    border-color: var(--bs-success);
    color: #fff;
    opacity: 1;
}

/* 🗑 в ⋯ задачи и упражнения: первый клик подсвечивает красным, второй удаляет из списка */
.todo-details .todo-remove.is-armed,
.ex-hide.is-armed {
    background: var(--bs-danger) !important;
    color: #fff !important;
    border-radius: var(--bs-border-radius);
}
/* Телефон: блоки делят экран поровну, развёрнутый — весь. Точка всегда под блоком, у правого развёрнутого — тоже снизу. */
@media (max-width: 1199.98px) {
    .screen-fit > .block-col {
        flex: 1 1 0;
        min-height: 0;
    }
    .screen-fit[data-split=right] > .split-dot {
        order: 3;
    }
    .screen-fit[data-split=right] .split-dot button {
        top: calc(var(--bs-gutter-y) * .5 + 2px);
    }
}

/* Подсказки в строке добавления: прежние задачи и упражнения списком под полем */
.todo-add,
.ex-add {
    position: relative;
}
.suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .25rem);
    z-index: 20;
    max-height: 18rem;
    overflow-y: auto;
    margin: 0;
    padding: .35rem;
    list-style: none;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-secondary-bg);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .2);
}
.suggest[hidden] {
    display: none;
}
.suggest li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .85rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-body-color);
    cursor: pointer;
}
.suggest li small {
    margin-left: auto;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}
.suggest li:hover,
.suggest li.is-active {
    background: var(--bs-tertiary-bg);
}

.suggest.is-up {
    top: auto;
    bottom: calc(100% + .25rem);
}

/* Тип задачи в ⋯: зелёный ＋ — сделать, красный − — удержаться */
.todo-details .todo-kind {
    color: var(--bs-success);
}
.todo-details .todo-kind.is-dont {
    color: var(--bs-danger);
}

/* Карточка ЧП: слева человек и критичное, справа документы и врачи. Подписи мелкие, по-русски и по-английски. */
.sos-body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
}
.sos-who {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sos-photo {
    flex-shrink: 0;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-tertiary-bg);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bs-secondary-color);
}
.sos-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sos-name b {
    font-size: 1.4rem;
    line-height: 1.2;
}
.sos-name span {
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}
.sos-blood {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .9rem;
    border-radius: var(--bs-border-radius);
    background: color-mix(in srgb, var(--bs-danger) 22%, transparent);
    color: var(--bs-danger);
    font-size: 1.35rem;
}
.sos-blood.is-empty {
    background: transparent;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 25%, transparent);
    color: var(--bs-secondary-color);
}
.sos-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary-color);
    margin-bottom: .3rem;
}
.sos-label span {
    opacity: .6;
}
.sos-value {
    font-size: 1rem;
    overflow-wrap: anywhere;
}
.sos-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.sos-list li {
    padding: .3rem .7rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}
.sos-empty {
    height: 2rem;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 18%, transparent);
    border-radius: var(--bs-border-radius);
}
.sos-critical {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    padding: 1rem;
    border-radius: var(--bs-border-radius);
    border: 1px solid color-mix(in srgb, var(--bs-danger) 40%, transparent);
}
.sos-field.is-alert .sos-list li {
    background: color-mix(in srgb, var(--bs-danger) 22%, transparent);
    color: var(--bs-body-color);
    font-weight: 600;
}
.is-contacts .sos-list {
    flex-direction: column;
}
.is-contacts .sos-list li {
    font-size: 1.05rem;
}
.sos-body a[href^="tel:"] {
    color: var(--bs-info);
    font-weight: 600;
    white-space: nowrap;
}
.sos-docs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.sos-doc {
    position: relative;
    padding: 1rem 1rem 1rem 3.25rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
    min-height: 5.5rem;
}
.sos-doc > .ti {
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    color: var(--bs-secondary-color);
}
.sos-doc.is-empty {
    background: transparent;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 18%, transparent);
}
@media (max-width: 575.98px) {
    .sos-critical,
    .sos-docs {
        grid-template-columns: 1fr;
    }
}
/* Печать: только карточка, без шапки и точки */
@media print {
    .app-topbar,
    .bar-strip,
    .split-dot {
        display: none !important;
    }
    .screen-fit {
        height: auto;
    }
}

.sos-name {
    flex: 1 1 auto;
}
.sos-blood {
    white-space: nowrap;
}
.sos-name span {
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .sos-who {
        flex-wrap: wrap;
    }
    .sos-name {
        flex-basis: calc(100% - 5.5rem);
    }
    .sos-blood {
        margin-left: 5.5rem;
        font-size: 1.15rem;
    }
}

/* Правка текста задачи на месте */
.todo-title {
    flex: 1 1 auto;
    min-width: 0;
    height: 2rem;
    padding: 0 .5rem;
    border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
    border-radius: var(--bs-border-radius);
    background: color-mix(in srgb, var(--bs-body-bg) 35%, transparent);
    color: inherit;
    font-size: 1rem;
    font-weight: 500;
    outline: 0;
}
.todo-title[hidden],
.todo-label[hidden] {
    display: none;
}
.todo-title.is-invalid {
    border-color: var(--bs-danger);
}

/* Иконки в ⋯ и в строке добавления — в квадратиках той же высоты, что поле числа */
.todo-details button,
.ex-details button,
.todo-add .todo-sign,
.todo-add .todo-add-repeat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent) !important;
    border-radius: var(--bs-border-radius);
    font-size: 1.05rem;
}
.todo-details,
.ex-details {
    gap: .4rem;
}
.todo-details button:hover,
.ex-details button:hover {
    border-color: color-mix(in srgb, currentColor 60%, transparent) !important;
}
.ex-details .ex-weight input,
.ex-details .ex-weight-save {
    height: 2rem;
}
.ex-details .ex-weight-save {
    width: 2rem;
}

/* Что отмечает хитмэп «дня»: кнопка с эмоджи или иконкой выбранного и список под ней */
.hm-pick {
    position: relative;
    margin-left: .5rem;
}
.hm-pick-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 2.5rem;
    padding: 0 .6rem;
    border: 1px solid color-mix(in srgb, var(--bs-body-color) 18%, transparent);
    border-radius: var(--bs-border-radius);
    background: transparent;
    color: var(--bs-body-color);
    font-size: 1.2rem;
}
.hm-pick-btn > .ti {
    font-size: .9rem;
    color: var(--bs-secondary-color);
}
.hm-pick-btn span b {
    font-weight: normal;
}

/* Карточка ЧП — постоянная страница без шапки: одна колонка по центру, прокрутка страницы */
body.is-bare .page-content {
    padding-top: 0;
}
.sos-page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2rem 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.sos-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}
.sos-stat {
    padding: .75rem 1rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}
.sos-stat.is-empty {
    background: transparent;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 18%, transparent);
}
.sos-stat .sos-value {
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 1.6rem;
}
.sos-label {
    text-transform: uppercase;
}
.sos-taken {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 12rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.sos-taken li {
    display: flex;
    gap: 1rem;
    padding: .4rem .75rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}
.sos-taken li span {
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .sos-page {
        padding-top: 1rem;
    }
    .sos-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* Буква аккаунта на месте выхода: всегда в обводке, без заливки; взведённая показывает ⇥ */
.account-btn {
    background: transparent !important;
}
.account-letter {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
}
.account-btn > .ti,
.account-btn.is-armed .account-letter {
    display: none;
}
.account-btn.is-armed > .ti {
    display: inline;
    color: var(--bs-danger);
}
.account-btn {
    border: 1.5px solid color-mix(in srgb, currentColor 55%, transparent) !important;
    width: 2.25rem;
    height: 2.25rem;
}
.sos-page a[href^="tel:"] {
    color: var(--bs-info);
    font-weight: 600;
    white-space: nowrap;
}
.sos-page {
    padding-left: 1rem;
    padding-right: 1rem;
}
.app-topbar .btn.account-btn,
.app-topbar .btn.account-btn:hover {
    border: 1.5px solid currentColor !important;
}
.sos-stat small {
    display: block;
    font-size: .75rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
}

/* Хитмэп «дня»: период и выбор — простые кнопки по кругу, дата выбранного дня в шапке */
.hm-period,
.hm-pick-btn {
    border: 0 !important;
    background: transparent;
    height: 2.5rem;
    min-width: 2.5rem;
    padding: 0 .5rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-body-color);
    font-size: 1rem;
    font-weight: 600;
}
.hm-pick-btn {
    margin-left: 0;
    font-size: 1.25rem;
    font-weight: normal;
}
.hm-period:hover,
.hm-pick-btn:hover {
    background: var(--bs-tertiary-bg);
}
.hm-date {
    margin-left: .5rem;
    color: var(--bs-secondary-color);
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hm-date.is-past {
    color: var(--bs-info);
    font-weight: 600;
}
.todo-task.is-before {
    display: none;
}
/* Буква аккаунта — как обычная кнопка шапки, без обводки (Benji) */
.app-topbar .btn.account-btn,
.app-topbar .btn.account-btn:hover {
    border-color: transparent !important;
}

/* Кнопка «Войти» и другие основные: вместо белой тени neubrutalism — мягкая тень оттенком фона */
.btn-primary {
    box-shadow: 3px 3px 0 0 color-mix(in srgb, var(--bs-body-color) 14%, transparent) !important;
}

/* Вход: форма по центру экрана */
.auth-bg .row {
    max-width: 26rem;
}
.auth-bg .row > [class*=col-] {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
}
.todo-emoji[hidden],
.todo-emoji:empty {
    display: none;
}

/* «Сила»: что делали в выбранный день — под хитмэпом: упражнение, подходы, вес */
.hm-day {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    max-height: 40%;
    overflow-y: auto;
    flex-shrink: 0;
}
.hm-day[hidden],
.hm-day:empty {
    display: none;
}
.hm-day li {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .35rem .75rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
    font-size: .9rem;
}
.hm-day li b {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}
.hm-day li small {
    min-width: 3.5rem;
    text-align: right;
    color: var(--bs-secondary-color);
}

/* Период хитмэпа — как прежние кнопки 3 · 6 · 12: обычный вес, без подложки */
.hm-period {
    font-weight: 400;
    font-size: .9rem;
    color: var(--bs-secondary-color);
}
.hm-period:hover {
    color: var(--bs-body-color);
}

/* «Сила» справа: хитмэп и день — две панели в ряд, клик по дню сдвигает влево */
.hm-body:has(.hm-slide) {
    overflow: hidden;
}
.hm-slide {
    display: flex;
    width: 200%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    transition: transform .3s ease;
}
.hm-slide[hidden] {
    display: none;
}
.hm-slide.is-day {
    transform: translateX(-50%);
}
.hm-pane {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}
.hm-pane-day {
    justify-content: flex-start;
    padding: 0 .25rem;
}
.hm-day-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
    color: var(--bs-secondary-color);
}
.hm-back {
    border: 0;
    background: transparent;
    color: inherit;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--bs-border-radius);
    font-size: 1.2rem;
}
.hm-back:hover {
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}
.hm-pane-day .hm-day {
    margin: 0;
    max-height: none;
    overflow-y: auto;
}
.hm-pane-day .hm-day:empty::before {
    content: '—';
    color: var(--bs-secondary-color);
    padding-left: .75rem;
}
.hm-pane-day .hm-day:empty {
    display: block;
}
.hm-slide {
    align-self: flex-start;
    flex: 0 0 auto;
    height: 100%;
}
/* Неактивная панель не выглядывает из-под отступа карточки */
.hm-pane {
    transition: visibility .3s;
}
.hm-slide:not(.is-day) .hm-pane-day,
.hm-slide.is-day .hm-pane:first-child {
    visibility: hidden;
}
/* Вес тела в шапке «силы»: значок, поле и ✓ одной высоты, как кнопки шапки */
.body-weight {
    align-items: center;
}
.body-weight input,
.body-weight .body-save {
    height: 2.5rem !important;
}
.body-weight .body-save {
    width: 2.5rem !important;
}
/* Панель дня «силы»: ← по краю списка, дата в правом углу; вес в той же строке через «/» */
.hm-pane-day {
    padding: 0;
}
.hm-day-head {
    justify-content: space-between;
}
.hm-back {
    width: auto;
    padding: 0 .75rem;
    margin-left: 0;
}
.hm-day-date {
    padding-right: .75rem;
}

/* «Сила», день из упражнений: отдых, план будущего дня, запланированные клетки хитмэпа */
.train-rest.is-active {
    background: color-mix(in srgb, var(--bs-success) 25%, transparent);
    color: var(--bs-body-color);
}
.train-body.is-rest .ex {
    opacity: .45;
}
.train-date {
    color: var(--bs-info);
    font-weight: 600;
    white-space: nowrap;
}
.train-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.train-body.is-plan .ex-set {
    cursor: default;
    opacity: .7;
}
.hm-cell.is-planned {
    border: 2px solid color-mix(in srgb, var(--bs-success) 60%, transparent);
}
.hm-cell.is-viewed {
    outline: 2px dashed var(--bs-info);
    outline-offset: 1px;
}
.ex-title-in {
    flex: 1 1 auto;
    min-width: 0;
    height: 2rem;
    padding: 0 .5rem;
    border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
    border-radius: var(--bs-border-radius);
    background: color-mix(in srgb, var(--bs-body-bg) 35%, transparent);
    color: inherit;
    font-weight: 600;
    outline: 0;
}
.ex-title-in[hidden],
.ex-title[hidden] {
    display: none;
}

/* Запись: заголовок с ✎; направление и дата; подзаголовок — учреждение; текст */
.rec-top {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.rec-top .rec-title {
    flex: 1 1 auto;
}
.rec-page .rec-when {
    gap: .4rem;
    font-size: .9rem;
}
.rec-page .rec-when .ti {
    font-size: 1.05rem;
}
.rec-place,
.rec-sub {
    color: var(--bs-secondary-color);
}
.rec-place {
    font-weight: 600;
    margin-top: -.5rem;
}
.rec-sub {
    font-size: .85rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rec-new .form-control::placeholder {
    color: var(--bs-secondary-color);
    opacity: .6;
}
.rec-place-in {
    box-shadow: none;
}
/* День отдыха: вместо списка спокойная луна */
.train-next.is-rest {
    color: var(--bs-success);
}
.train-rest-day {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    font-size: 2.5rem;
    color: color-mix(in srgb, var(--bs-success) 60%, var(--bs-secondary-color));
}
/* День отдыха — одна плашка на всю высоту блока с ростком: восстановление после тренировок */
.train-body:has(.train-rest-day) {
    display: flex;
    flex-direction: column;
}
.train-rest-day {
    flex: 1 1 auto;
    min-height: 10rem;
    margin: 1.5rem 0;
    border-radius: var(--bs-border-radius);
    background: color-mix(in srgb, var(--bs-success) 14%, var(--bs-tertiary-bg));
    color: color-mix(in srgb, var(--bs-success) 75%, var(--bs-body-color));
    font-size: 4rem;
}

/* Светлая тема (Benji 2026-10-23: «слишком светло и ярко, нет контраста»). Зеркало тёмной: прохладный серый фон страницы,
   карточки светлее фона, но не белые; строки, плитки и клетки заметно темнее карточек; текст тёмный, вторичный — читаемый. */
html[data-bs-theme=light] {
    --bs-body-bg: #e4e7ec;
    --bs-body-bg-rgb: 228, 231, 236;
    --bs-body-color: #2a303c;
    --bs-body-color-rgb: 42, 48, 60;
    --bs-emphasis-color: #171b23;
    --bs-secondary-color: #5b6575;
    --bs-secondary-bg: #f5f6f8;
    --bs-tertiary-bg: #dde1e8;
    --bs-border-color: #cbd1da;
    --bs-border-color-translucent: rgba(42, 48, 60, .12);
    --bs-card-bg: #f5f6f8;
    --bs-success: #4e9a4b;
    --bs-danger: #d24f4f;
    --bs-info: #2f86c4;
}
html[data-bs-theme=light] body,
html[data-bs-theme=light] .app-topbar,
html[data-bs-theme=light] .wrapper,
html[data-bs-theme=light] .page-content {
    background-color: var(--bs-body-bg) !important;
}
html[data-bs-theme=light] .card {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color) !important;
    box-shadow: 0 1px 2px rgba(23, 27, 35, .05);
}
html[data-bs-theme=light] .block-head.is-open {
    border-bottom-color: var(--bs-border-color) !important;
}
html[data-bs-theme=light] .block-head:not(.is-open) {
    background: #cfd5de;
}
/* Строки, плитки, клетки — темнее карточки */
html[data-bs-theme=light] .todo-task,
html[data-bs-theme=light] .ex,
html[data-bs-theme=light] .rec,
html[data-bs-theme=light] .topic-tile:not(.is-add),
html[data-bs-theme=light] .sos-list li,
html[data-bs-theme=light] .sos-stat:not(.is-empty),
html[data-bs-theme=light] .sos-doc:not(.is-empty),
html[data-bs-theme=light] .sos-taken li,
html[data-bs-theme=light] .hm-day li,
html[data-bs-theme=light] .sos-photo {
    background-color: var(--bs-tertiary-bg);
}
html[data-bs-theme=light] .ex-add,
html[data-bs-theme=light] .todo-add,
html[data-bs-theme=light] .rec-new {
    background: transparent;
    border-color: #b9c1cd;
}
html[data-bs-theme=light] .topic-tile.is-off {
    opacity: .45;
}
html[data-bs-theme=light] .rec[data-href]:hover,
html[data-bs-theme=light] a.topic-tile:hover {
    background-color: #d2d7df;
}
html[data-bs-theme=light] .todo-task.is-done,
html[data-bs-theme=light] .todo-task.is-clean {
    background: #cfe6cd;
}
html[data-bs-theme=light] .todo-task.is-late,
html[data-bs-theme=light] .todo-task.is-miss,
html[data-bs-theme=light] .todo-task.is-fail {
    background: #f1d3d3;
}
/* Клетки подходов и вес — светлые на тёмной строке, с рамкой */
html[data-bs-theme=light] .ex-set,
html[data-bs-theme=light] .ex-details .ex-weight input,
html[data-bs-theme=light] .todo-note,
html[data-bs-theme=light] .todo-title,
html[data-bs-theme=light] .ex-title-in {
    background: #f8f9fb;
    border-color: #c3cad5;
}
html[data-bs-theme=light] .ex-set.is-done {
    background: #b9dcb6;
    border-color: #9cc998;
    color: #1f3b1d;
}
html[data-bs-theme=light] .ex-set::placeholder {
    color: #8a93a2;
}
/* Хитмэп: пустые клетки видны, будущие — рамкой */
html[data-bs-theme=light] .hm-cell:not(.is-future) {
    background-color: #d6dbe3;
}
html[data-bs-theme=light] .hm-cell.is-future {
    border-color: #c3cad5;
}
html[data-bs-theme=light] .hm-cell.is-today {
    outline-color: #2a303c;
}
/* Даты записей, документы */
html[data-bs-theme=light] .rec-date,
html[data-bs-theme=light] .rec-thumb,
html[data-bs-theme=light] .rec-file {
    background: #f8f9fb;
}
/* Календарь здоровья */
html[data-bs-theme=light] .med-calendar {
    --fc-border-color: #d0d6df;
    --fc-today-bg-color: #e8ebf0;
}
html[data-bs-theme=light] .med-calendar .fc-scrollgrid,
html[data-bs-theme=light] .med-calendar td,
html[data-bs-theme=light] .med-calendar th {
    border-color: #d0d6df !important;
}
html[data-bs-theme=light] .med-calendar .fc-col-header-cell {
    background: #eceff3;
}
html[data-bs-theme=light] .med-calendar .cal-visit {
    background: #cfe3f2;
    border-color: #b6d3ea;
}
html[data-bs-theme=light] .med-calendar .cal-visit .fc-event-main {
    color: #1f3d55 !important;
}
/* Кнопки шапок: активная — тёмная подложка */
html[data-bs-theme=light] .quick-modes button.is-active,
html[data-bs-theme=light] .block-btn.is-active,
html[data-bs-theme=light] .top-nav-link.is-active,
html[data-bs-theme=light] .med-topics button.is-active {
    background: #d5dae2;
    color: var(--bs-emphasis-color);
}
html[data-bs-theme=light] .form-control {
    background-color: #fbfbfc;
    border-color: #c3cad5;
}
html[data-bs-theme=light] .suggest,
html[data-bs-theme=light] .hm-pick-list {
    background: #fbfbfc;
}
html[data-bs-theme=light] .split-dot button::before {
    background: #9aa3b1;
}
html[data-bs-theme=light] .train-rest-day {
    background: #d6e8d4;
}
html[data-bs-theme=light] .hm-cell.is-planned {
    border: 2px solid var(--bs-success);
}

/* Проход 2026-10-24 */
/* «День»: задача, которой сегодня нет (скрыта, удалена), видна только в своих прошлых днях — без ⋯ */
.todo-task.is-gone .todo-more {
    display: none;
}
/* Напоминания здоровья над задачами: 🔔, текст, значок направления; клик — запись */
.todo-remind {
    padding-bottom: 0;
}
.todo-remind:not([hidden]) + .todo-main {
    padding-top: .75rem;
}
.todo-remind a.todo-row {
    color: inherit;
    text-decoration: none;
    background: color-mix(in srgb, var(--bs-info) 14%, var(--bs-tertiary-bg));
}
.todo-remind .todo-icon {
    color: var(--bs-info);
}
.todo-remind-topic {
    margin-left: auto;
    color: var(--bs-secondary-color);
    font-size: 1.15rem;
}
.todo-remind[hidden] {
    display: none;
}
/* «Сила»: вес бледно рядом с названием */
.ex-w {
    flex: 0 0 auto;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
    opacity: .75;
}
.ex-w:empty {
    display: none;
}
.ex.is-detailed .ex-w {
    display: none;
}
/* Сохранить день новым набором: поле имени в шапке */
.train-save {
    display: inline-flex;
    gap: .25rem;
    align-items: center;
}
.train-save[hidden] {
    display: none;
}
.train-save input {
    width: 8rem;
    height: 2.5rem;
}
/* Прошлый день слева — подходы дописываются, как сегодня */
.hm-day-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--bs-secondary-color);
    cursor: pointer;
}
.hm-day-edit[hidden] {
    display: none;
}
.hm-day-edit:hover {
    color: var(--bs-body-color);
}
/* Подписи дней недели над хитмэпом «силы» */
.hm-wd {
    grid-template-rows: 12px;
}
.hm-wd .hm-month {
    height: 12px;
}
.hm-wd-label {
    width: var(--cell);
    font-size: 10px;
    line-height: 12px;
    text-align: center;
    color: var(--bs-secondary-color);
}
/* Карточка ЧП: строки страховки, сканы */
.sos-line {
    margin-top: .5rem;
}
.sos-scans {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}
.sos-scan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 3rem;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    font-size: 1.4rem;
}
.sos-scan img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Карточка ЧП, 2026-10-25: подтверждённое «нет» аллергий и хронических — спокойная строка; номер полиса крупно, как группа крови */
.sos-none {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--bs-secondary-color);
    font-weight: 600;
}
.sos-none i {
    color: var(--bs-success);
    font-size: 1.15rem;
}
.sos-policy b {
    display: inline-block;
    margin-top: .25rem;
    padding: .3rem .7rem;
    border-radius: var(--bs-border-radius);
    background: color-mix(in srgb, var(--bs-primary) 14%, transparent);
    font-size: 1.25rem;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    user-select: all;
}

/* Карточка ЧП на один экран: контакты, паспорт, страховка — три плитки в ряд, на телефоне столбиком */
.sos-docs {
    grid-template-columns: repeat(3, 1fr);
}
.sos-contact {
    margin-bottom: .35rem;
}
.sos-contact a[href^="tel:"] {
    display: block;
}
@media (max-width: 767.98px) {
    .sos-docs {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 992px) {
    .sos-page {
        max-width: 64rem;
        padding-bottom: 1.5rem;
    }
}

/* Карточка ЧП, 2026-10-25 вечер: три колонки во всех рядах, фото в круге как в Telegram, логотип страховой */
.sos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}
.sos-grid .sos-stat small {
    display: inline;
    margin-left: .5rem;
}
.sos-stat.is-alert {
    background: color-mix(in srgb, var(--bs-danger) 22%, transparent);
}
.sos-photo {
    overflow: hidden;
}
.sos-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sos-logo {
    height: 2.4rem;
    width: auto;
    margin: .1rem 0 .2rem;
}
@media (max-width: 767.98px) {
    .sos-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sos-grid.sos-docs {
        grid-template-columns: 1fr;
    }
}

/* Плитки нижнего ряда: колонка, три кнопки прижаты к низу и стоят на одной линии во всех трёх */
.sos-docs .sos-doc {
    display: flex;
    flex-direction: column;
}
.sos-docs .sos-scans {
    margin-top: auto;
    padding-top: .75rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.sos-docs .sos-scan {
    width: auto;
    height: 3.25rem;
}
.sos-scan.is-empty {
    background: transparent;
    border: 1px dashed color-mix(in srgb, var(--bs-body-color) 18%, transparent);
}

/* Карточка ЧП, правка Benji 2026-10-25 ночь: значок плитки — в заголовке, содержимое и кнопки на всю ширину;
   пустая кнопка — серая и неактивная; один шаг между всеми рядами; жирного меньше; на телефоне кровь в строке с именем */
.sos-page {
    gap: 1rem;
}
.sos-grid {
    gap: 1rem;
}
.sos-docs .sos-doc {
    padding: 1rem 1.25rem;
}
.sos-doc-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .6rem;
}
.sos-doc-head .ti {
    font-size: 1.35rem;
    color: var(--bs-secondary-color);
}
.sos-doc-head .sos-label {
    margin: 0;
    font-size: .8rem;
}
.sos-scan.is-empty {
    border: 0;
    background: var(--bs-secondary-bg);
    opacity: .45;
    pointer-events: none;
}
.sos-stat .sos-value {
    font-weight: 500;
}
.sos-policy b {
    font-weight: 600;
    font-size: 1.15rem;
}
@media (max-width: 575.98px) {
    .sos-who {
        flex-wrap: nowrap;
    }
    .sos-photo {
        width: 3.5rem;
        height: 3.5rem;
    }
    .sos-name {
        flex-basis: auto;
        min-width: 0;
    }
    .sos-name b {
        font-size: 1.15rem;
    }
    .sos-name span {
        white-space: normal;
    }
    .sos-blood {
        margin-left: auto;
        font-size: 1rem;
        padding: .4rem .6rem;
    }
}

/* Анализы справа (2026-10-25): показатель × дата, группы строкой-заголовком, вне нормы — пастельный цвет,
   норма мелко под значением; строка с графиком подсвечена */
.lab-body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.lab-scroll {
    overflow-x: auto;
}
.lab-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 .25rem;
    font-variant-numeric: tabular-nums;
}
.lab-table th,
.lab-table td {
    padding: .4rem .75rem;
    white-space: nowrap;
    vertical-align: top;
}
.lab-table thead th {
    font-weight: 500;
    color: var(--bs-secondary-color);
    text-align: right;
}
.lab-table thead th a {
    color: inherit;
}
.lab-table thead th a:hover {
    color: var(--bs-body-color);
}
.lab-table small {
    display: block;
    font-size: .72rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
}
.lab-group th {
    padding-top: 1rem;
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary-color);
}
.lab-row th {
    font-weight: 500;
    border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
}
.lab-row th,
.lab-row td {
    background: var(--bs-tertiary-bg);
}
.lab-row td {
    text-align: right;
}
.lab-row td:last-child {
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}
.lab-row[data-series] {
    cursor: pointer;
}
.lab-row[data-series]:hover th,
.lab-row[data-series]:hover td,
.lab-row.is-active th,
.lab-row.is-active td {
    background: var(--bs-secondary-bg);
}
.lab-row td.is-low {
    background: color-mix(in srgb, var(--bs-info) 20%, var(--bs-tertiary-bg));
}
.lab-row td.is-high {
    background: color-mix(in srgb, var(--bs-danger) 20%, var(--bs-tertiary-bg));
}

/* Анализы проще (Benji, 2026-10-25): без фона строк и подсветки при наведении — тонкая линия между строками,
   вне нормы — цветом самой цифры. В ленте записей документ — скрепка справа. */
.lab-table {
    border-collapse: collapse;
}
.lab-row th,
.lab-row td,
.lab-row[data-series]:hover th,
.lab-row[data-series]:hover td,
.lab-row.is-active th,
.lab-row.is-active td,
.lab-row td.is-low,
.lab-row td.is-high {
    background: none;
    border-radius: 0;
}
.lab-row {
    border-bottom: 1px solid var(--bs-border-color);
}
.lab-row th {
    font-weight: 400;
}
.lab-row td {
    font-weight: 500;
}
.lab-row td.is-low {
    color: var(--bs-info);
}
.lab-row td.is-high {
    color: var(--bs-danger);
}
.lab-row.is-active th {
    color: var(--bs-primary);
}
.rec-clip {
    color: var(--bs-secondary-color);
    font-size: 1.05rem;
}
.rec-clip:hover {
    color: var(--bs-body-color);
}
.rec-meta .rec-clip .ti {
    color: inherit;
}

/* «Не делать» — батарейка (Benji, 2026-10-25): линейный градиент слева направо, зелёный слева, красный справа; плавный переход
   шириной в 80% строки движется вправо по доле дня --share (считает today.js раз в минуту). «Сделать» без цвета: серый, по нажатию зелёный. */
.todo-task.is-wait[data-kind=dont] {
    --ok: color-mix(in srgb, var(--bs-success) 32%, var(--bs-secondary-bg));
    --risk: color-mix(in srgb, var(--bs-danger) 28%, var(--bs-secondary-bg));
    background: linear-gradient(to right, var(--ok) calc((var(--share, 0) - .4) * 100%), var(--risk) calc((var(--share, 0) + .4) * 100%));
}
html[data-bs-theme=light] .todo-task.is-wait[data-kind=dont] {
    --ok: #cfe6cd;
    --risk: #f1d3d3;
}

/* Системная полоса прокрутки внутри блоков не видна — прокрутка остаётся (Benji, 2026-10-25) */
.card,
.card * {
    scrollbar-width: none;
}
.card::-webkit-scrollbar,
.card *::-webkit-scrollbar {
    display: none;
}

/* Запись здоровья справа (Benji, 2026-10-31): лента слева остаётся, открытая запись в ней подсвечена рамкой */
.rec-body-side {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.rec.is-active {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bs-primary) 55%, transparent);
}
.rec[data-href] {
    cursor: pointer;
}

/* «Сила», панель наборов справа (Benji, 2026-10-31): список наборов, состав набора — строки как упражнения дня */
.sets-pane {
    width: 100%;
    align-self: stretch;
    overflow-y: auto;
}
.sets-pane[hidden],
.set-detail[hidden] {
    display: none;
}
.set-list,
.set-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.set-list li,
.set-items li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1rem;
    margin-bottom: .4rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}
.set-list li {
    cursor: pointer;
}
.set-list li:hover {
    background: color-mix(in srgb, var(--bs-body-color) 8%, var(--bs-tertiary-bg));
}
.set-list small,
.set-items .set-spec {
    margin-left: auto;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}
.set-items .set-spec {
    border: 0;
    background: transparent;
    padding: 0;
}
.set-items .set-spec:hover {
    color: var(--bs-body-color);
}
.set-items .set-spec-in {
    margin-left: auto;
    width: 8rem;
    height: 1.8rem;
    padding: 0 .5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    outline: 0;
}
.set-items .set-spec-in.is-invalid {
    border-color: var(--bs-danger);
}
.set-items .set-del {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    padding: 0;
}
.set-items .set-del:hover {
    color: var(--bs-danger);
}
.set-detail .set-title {
    font-weight: 600;
    color: var(--bs-body-color);
}
.set-detail .hm-day-head {
    justify-content: flex-start;
}
.set-back,
.set-apply {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--bs-border-radius);
    font-size: 1.2rem;
}
.set-back:hover,
.set-apply:hover {
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}
.set-apply.is-done {
    color: var(--bs-success);
}
.hm-body:has(> .sets-pane:not([hidden])) {
    justify-content: flex-start;
}
.sets-pane {
    flex: 1 1 auto;
    min-height: 0;
}
.set-list .set-rest {
    justify-content: center;
    color: var(--bs-success);
    font-size: 1.15rem;
}
