

.cabinet-body .cabinet-home .recovery-recommendation {
    min-width: 0;
    margin: 0;
    padding: 14px;
}

.cabinet-body .cabinet-home {
    min-width: 0;
    align-content: start;
}

.cabinet-body .today-debug-actions,
.cabinet-body .today-list,
.cabinet-body .today-item,
.cabinet-body .today-item-card,
.cabinet-body .today-item-actions {
    min-width: 0;
}

.cabinet-body .today-item {
    padding: var(--app-card-padding);
}

.cabinet-body .today-item-actions {
    grid-template-columns: minmax(0, 1fr);
}

.cabinet-body .today-item-readiness .recovery-recommendation {
    padding: 0;
}

.cabinet-body .home-hugh-trends {
    --home-hugh-avatar-size: 76px;
    --home-hugh-avatar-gap: 9px;
    --home-hugh-inline: 15px;
    min-width: 0;
    margin: 0 0 0 calc(var(--home-hugh-avatar-size) + var(--home-hugh-avatar-gap));
}

.cabinet-body .home-hugh-trends-action {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    text-align: left;
    min-height: calc(var(--home-hugh-avatar-size) - 2px);
    margin: 0;
    border: 0;
    border-radius: var(--app-radius-surface);
    outline: 0;
    padding: 15px 32px 15px var(--home-hugh-inline);
    background: transparent;
    color: #000;
    list-style: none;
    cursor: pointer;
    touch-action: manipulation;
}

.cabinet-body .home-hugh-trends[data-completed="true"] .home-hugh-trends-action { padding-inline-end: calc(14px + var(--home-task-dismiss-size) / 2); }
.cabinet-body .home-hugh-trends > .home-task-dismiss {
    inset-block-start: 18px;
    inset-inline-end: calc(14px - var(--home-task-dismiss-size) / 2);
    height: var(--home-task-dismiss-size);
    min-height: var(--home-task-dismiss-size);
}
.cabinet-body .home-hugh-trends [data-home-trends-chevron][hidden] { display: none; }

.cabinet-body .home-hugh-trends-avatar {
    display: block;
    position: absolute;
    top: -1px;
    left: calc(-1px - var(--home-hugh-avatar-gap) - var(--home-hugh-avatar-size));
    width: var(--home-hugh-avatar-size);
    height: var(--home-hugh-avatar-size);
    object-fit: contain;
    image-rendering: pixelated;
}

.cabinet-body .home-hugh-trends-bubble {
    --app-navigation-border-width: 1px;
    --app-type-body-size: var(--app-type-control-size);
    --app-type-body-line: var(--app-type-control-line);
    --app-type-card-size: var(--app-type-control-size);
    --app-type-card-line: var(--app-type-control-line);
    position: relative;
    display: block;
    min-width: 0;
    border: 1px solid #000;
    border-radius: var(--app-radius-surface);
    padding: 0;
    background: #fff;
}

.cabinet-body .home-hugh-trends-bubble::before {
    content: "";
    position: absolute;
    top: calc(var(--home-hugh-avatar-size) / 2 - 6px);
    left: -6px;
    width: 11px;
    height: 11px;
    border-left: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #fff;
    transform: rotate(45deg);
}

@media (max-width: 380px) {
    .cabinet-body .home-hugh-trends {
        --home-hugh-avatar-size: 58px;
        --home-hugh-inline: 12px;
    }
}

.cabinet-body .today-item-actions :where(button, a) {
    max-width: 100%;
    min-height: 44px;
}

.cabinet-body .today-debug-toggle {
    appearance: none;
    position: absolute;
    z-index: 1;
    right: var(--app-page-inline);
    bottom: calc(var(--app-bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #e13333;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
}

.cabinet-body .today-debug-toggle[hidden] {
    display: none;
}

.cabinet-body .today-debug-toggle svg {
    grid-area: 1 / 1;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.cabinet-body .today-debug-toggle[aria-expanded="true"] .today-debug-eye-closed,
.cabinet-body .today-debug-toggle[aria-expanded="false"] .today-debug-eye-open {
    display: none;
}

.cabinet-body .today-debug-toggle:hover {
    background: transparent;
    color: #e13333;
}


.cabinet-body .home-hugh-trends[hidden] { display: none; }


.cabinet-body .manual-activity-submit {
    touch-action: manipulation;
}

.cabinet-body #cabinet-section-activity .steps-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: column;
    gap: 6px;
    width: 100%;
}

.cabinet-body #cabinet-section-activity .steps-summary article {
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 6px 7px;
    background: var(--app-color-card);
}

.cabinet-body #cabinet-section-activity .steps-summary strong {
    margin: 6px 0 3px;
    white-space: nowrap;
}

.cabinet-body #cabinet-section-activity .steps-summary small {
    display: block;
}

.cabinet-body #cabinet-section-activity .workouts-summary article.wellness-card {
    min-height: 0;
    padding: 10px 8px;
    background: var(--app-color-card);
}

.cabinet-body #cabinet-section-activity .workouts-summary article.wellness-card strong {
    margin: 7px 0 0;
}

.cabinet-body #cabinet-section-activity .steps-chart-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.cabinet-body #cabinet-section-activity .steps-chart-panel .weight-chart-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
}

.cabinet-body #cabinet-section-activity .activity-view {
    gap: 18px;
}

.cabinet-body #cabinet-section-activity .activity-header {
    display: grid;
    gap: 12px;
}

.cabinet-body #cabinet-section-activity .activity-sync-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cabinet-body #cabinet-section-activity .activity-sync-row .weight-status {
    min-width: 0;
    min-height: 0;
    margin: 0;
    white-space: nowrap;
}

.cabinet-body #cabinet-section-activity .activity-sync-row .weight-sync {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 8px clamp(6px, 2cqi, 10px);
    white-space: nowrap;
    overflow-wrap: normal;
}

.cabinet-body #cabinet-section-activity .workouts-summary strong {
    margin: 4px 0 0;
    white-space: normal;
    overflow-wrap: normal;
}

.cabinet-body #cabinet-section-activity .workouts-history {
    gap: 14px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.cabinet-body #cabinet-section-activity [data-activities-results][hidden],
.cabinet-body #cabinet-section-activity [data-steps-results][hidden] {
    display: none !important;
}

.cabinet-body #cabinet-section-activity .workouts-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.cabinet-body #cabinet-section-activity .workout-card {
    gap: 12px;
    padding: 13px;
}

.cabinet-body #cabinet-section-activity .workout-card header {
    gap: 8px;
}

.cabinet-body #cabinet-section-activity .workout-sport {
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cabinet-body #cabinet-section-activity .workout-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cabinet-body #cabinet-section-activity .workout-footer {
    align-items: flex-end;
}

.cabinet-body #cabinet-section-activity .workout-source {
    min-width: 0;
}

.cabinet-body #cabinet-section-activity .workouts-more {
    width: 100%;
}

.cabinet-body #cabinet-section-activity .workouts-empty {
    min-height: 180px;
    padding: 18px;
}

@media (max-width: 600px) {
    html:has(dialog.workout-composer-dialog:modal) { overflow: hidden; }

    .cabinet-body dialog.workout-composer-dialog.cabinet-dialog {
        position: fixed;
        inset: calc(var(--app-visual-offset-top, 0px) + 8px) 0 auto;
        width: 100%;
        max-width: none;
        height: calc(var(--app-logical-height, 100svh) - 8px);
        max-height: none;
        margin: 0;
        overflow: clip;
        border-bottom: 0;
        border-radius: var(--app-radius-surface);
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    .workout-composer-shell {
        height: 100%;
        max-height: none;
        padding-bottom: var(--app-keyboard-inset, 0px);
    }

    .workout-composer-header {
        padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    }

    .workout-composer-history { padding-inline: 14px; }

    .workout-composer-dialog .manual-activity-form {
        padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
    }
}


.cabinet-body #cabinet-section-night-metrics .manual-night-metrics-message {
    margin: -10px 0 0;
}

.cabinet-body #cabinet-section-weight .wellness-chart-panel,
.cabinet-body #cabinet-section-night-metrics .wellness-chart-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.cabinet-body #cabinet-section-weight .wellness-charts,
.cabinet-body #cabinet-section-night-metrics .wellness-charts {
    margin-top: 18px;
}

.cabinet-body #cabinet-section-weight .wellness-chart-panel .weight-chart-header,
.cabinet-body #cabinet-section-night-metrics .wellness-chart-panel .weight-chart-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
}

.cabinet-body .wellness-header-actions {
    justify-items: stretch;
}

.cabinet-body #cabinet-section-night-metrics .wellness-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.cabinet-body #cabinet-section-night-metrics .wellness-header > div:first-child {
    min-width: 0;
}

.cabinet-body #cabinet-section-night-metrics .wellness-status {
    min-height: 0;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.cabinet-body #cabinet-section-night-metrics .wellness-header-actions {
    width: auto;
    justify-items: end;
}

.cabinet-body #cabinet-section-night-metrics .wellness-sync {
    width: auto;
    min-height: 44px;
    padding: 8px 12px;
}

.cabinet-body #cabinet-section-weight .body-metrics-panel {
    gap: 14px;
}

.cabinet-body #cabinet-section-weight .body-metrics-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-block: 1px solid rgba(0, 0, 0, 0.24);
    padding-block: 14px;
}

.cabinet-body #cabinet-section-weight :where(
    .weight-current-card,
    .weight-chart-panel
) {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.cabinet-body #cabinet-section-weight :where(
    .weight-chart-panel
) {
    border-top: 1px solid rgba(0, 0, 0, 0.24);
    padding-top: 16px;
}

.cabinet-body #cabinet-section-weight .weight-current-card {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding-inline: 12px;
}

.cabinet-body #cabinet-section-weight .weight-current-card:first-child {
    border-right: 1px solid rgba(0, 0, 0, 0.24);
    padding-left: 0;
}

.cabinet-body #cabinet-section-weight .weight-current-card:last-child {
    padding-right: 0;
}

.cabinet-body #cabinet-section-weight .weight-current-card strong {
    margin: 3px 0 0;
}

.cabinet-body #cabinet-section-weight .weight-current-card small {
    margin: 2px 0 0;
}

.cabinet-body #cabinet-section-weight .weight-form-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.cabinet-body #cabinet-section-weight .body-metrics-date-field {
    grid-column: 1 / -1;
}

.cabinet-body #cabinet-section-weight .weight-form label {
    min-width: 0;
}

.cabinet-body #cabinet-section-weight .weight-form input {
    min-height: 44px;
    min-width: 0;
    padding: 8px 10px;
}

.cabinet-body #cabinet-section-weight .weight-form button {
    min-height: 44px;
    padding: 8px 12px;
}


.cabinet-body #cabinet-section-settings {
    display: flex;
    flex-direction: column;
    min-height: calc(var(--app-logical-height, 100svh) - var(--app-page-top) - var(--app-page-bottom) - var(--app-bottom-nav-height) - env(safe-area-inset-bottom) - var(--app-keyboard-inset, 0px));
}

.cabinet-body .settings-app-version {
    margin: auto 0 0;
    padding-top: 16px;
    color: #707070;
    text-align: center;
}


.cabinet-body .journal-save-result__trial,
.cabinet-body .modules-hub-card.settings-plan-card {
    isolation: isolate;
    background:
        radial-gradient(ellipse at 100% 0%, #f8e6b5 10%, transparent 77%),
        radial-gradient(ellipse at 0% 100%, #f1bfd4, transparent 65%),
        linear-gradient(150deg, #f8e6b5, #efe4f2);
    color: #2c2130;
}

.cabinet-body .journal-save-result__trial::before,
.cabinet-body .settings-plan-card::before {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: -1;
    border: 1px solid rgb(255 255 255 / 0.92);
    border-radius: var(--app-radius-control);
    background: linear-gradient(145deg, rgb(255 255 255 / 0.74), rgb(255 255 255 / 0.22));
    corner-shape: var(--app-corner-shape);
    pointer-events: none;
}

.cabinet-body .settings-plan-card .settings-quick-action-icon {
    color: #9a6080;
}

.cabinet-body .settings-plan-card [data-settings-plan-label] {
    display: flex;
    align-items: center;
    height: var(--app-type-card-line);
    gap: 4px;
    white-space: nowrap;
}

.cabinet-body .settings-plan-card [data-settings-plan-label] > [hidden] {
    display: none;
}

.cabinet-body .knowledge-base-links {
    gap: 28px;
}

.cabinet-body .knowledge-base-group {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.cabinet-body .knowledge-base-group h2 {
    margin: 0;
}

.cabinet-body .settings-pro-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    border-width: 2px;
    background: #000;
    color: #fff;
}

.cabinet-body .settings-pro-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cabinet-body .settings-pro-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.cabinet-body .settings-pro-card h2 {
    margin: 0;
    min-width: 0;
}

.cabinet-body .settings-pro-card p {
    margin: 0;
}

.cabinet-body .settings-upgrade-placeholder {
    width: 100%;
    min-height: 44px;
    border: 1px solid #fff;
    border-radius: var(--app-radius-pill);
    padding: 8px 13px;
    background: #f4d35e;
    color: #000;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
}

.cabinet-body .settings-upgrade-placeholder:hover:not(:disabled) {
    background: #e13333;
    color: #fff;
}

.cabinet-body .settings-upgrade-placeholder:disabled {
    min-height: 44px;
    cursor: not-allowed;
    opacity: 1;
}

.cabinet-body .pro-payment-dialog {
    width: min(520px, calc(100% - 24px));
    max-height: calc(100svh - 24px);
    overflow: auto;
}

.cabinet-body .pro-payment-form {
    gap: 10px;
    padding: clamp(16px, 5cqi, 22px);
}

.cabinet-body .pro-payment-form [data-pro-receipt-email]::placeholder {
    color: var(--app-color-text-muted);
    opacity: 1;
}

.cabinet-body .support-dialog .app-dialog-close {
    grid-column: 2;
}

.cabinet-body [data-alpha-recruitment]:not([hidden]) {
    display: grid;
    gap: 16px;
}

.cabinet-body [data-alpha-recruitment] p {
    margin: 0;
}

.cabinet-body [data-alpha-recruitment] strong {
    font-weight: var(--app-font-weight-bold);
}

.cabinet-body .pro-payment-form h2 {
    overflow-wrap: anywhere;
}

.cabinet-body .pro-payment-copy,
.cabinet-body .pro-payment-legal {
    overflow-wrap: anywhere;
}


.cabinet-body .pro-payment-legal { display: grid; }
.cabinet-body .pro-payment-legal > span { grid-area: 1 / 1; }
.cabinet-body .pro-payment-legal [data-pro-legal-size] {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.cabinet-body [data-pro-subscription] {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.cabinet-body [data-pro-subscription][hidden] { display: none; }

.cabinet-body .pro-payment-form menu button { width: 100%; min-height: 44px; white-space: normal; }

.cabinet-body .pro-payment-form button[data-pro-submit] {
    background: #000;
    color: #fff;
}

.cabinet-body .pro-payment-form button[data-pro-submit]:hover {
    background: #e13333;
}

.cabinet-body .pro-payment-form menu {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.cabinet-body .account-detail-card .cabinet-user {
    line-height: var(--app-type-body-line);
}


.cabinet-body :is(.settings-account-card, .settings-achievements-card) .assessment-module-card__title {
    display: flex;
    align-items: center;
    height: var(--app-type-card-line);
    gap: 8px;
}


.cabinet-body #cabinet-section-settings .settings-quick-actions > .settings-ai-assistant-card {
    height: auto;
    min-height: 0;
    border: 0;
    padding: 0;
    background: transparent;
}

.cabinet-body #cabinet-section-settings .settings-quick-actions > .settings-ai-assistant-card .modules-hub-module-open {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    place-items: center stretch;
    gap: 12px;
    width: 100%;
    padding: 0;
    text-align: left;
}

.cabinet-body .settings-ai-assistant-avatar {
    display: block;
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
}

.cabinet-body .settings-ai-assistant-bubble {
    --app-navigation-border-width: 1px;
    position: relative;
    display: grid;
    justify-items: start;
    gap: 8px;
    min-width: 0;
    border: 1px solid #000;
    border-radius: var(--app-radius-surface);
    padding: 12px 32px 12px 16px;
    background: #fff;
}

.cabinet-body .settings-ai-assistant-bubble::before {
    content: "";
    position: absolute;
    top: calc(50% - 6px);
    left: -7px;
    width: 12px;
    height: 12px;
    border-left: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #fff;
    transform: rotate(45deg);
}

.cabinet-body .settings-ai-assistant-copy {
    --app-type-body-size: var(--app-type-control-size);
    --app-type-body-line: var(--app-type-control-line);
    min-width: 0;
    overflow-wrap: anywhere;
}

.cabinet-body .settings-ai-assistant-name {
    white-space: nowrap;
}

.cabinet-body .account-beta-badge {
    flex: 0 0 auto;
    max-width: 100%;
    margin: 0;
    border: 1px solid #000;
    border-radius: var(--app-radius-pill);
    padding: 1px 6px;
    background: transparent;
    color: #000;
    text-transform: none;
}

.cabinet-body .account-beta-badge[hidden] { display: none; }
.cabinet-body :is([data-settings-account-start], [data-settings-account-pro])[hidden] { display: none; }

.cabinet-body .account-detail-card button {
    width: 100%;
    min-height: 44px;
}

.cabinet-body .account-detail-card .account-delete-panel-status:empty {
    display: none;
}


.cabinet-body .pro-payment-periods {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.cabinet-body .pro-payment-periods legend { margin-bottom: 8px; }
.cabinet-body .pro-payment-periods label {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px;
    border: 1px solid var(--app-line-control);
    border-radius: var(--app-radius-control);
    cursor: pointer;
}
.cabinet-body .pro-payment-periods label:has(input:checked) {
    border-color: #000;
    background: var(--app-color-card);
}
.cabinet-body .pro-payment-periods input {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}
.cabinet-body .pro-payment-periods input:checked {
    border-color: #000;
    background: radial-gradient(circle, #000 0 5px, #fff 5.5px);
}
.cabinet-body .pro-payment-periods label:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

.cabinet-body .pro-sbp-checkout { display: grid; justify-items: center; gap: 12px; text-align: center; }
.cabinet-body .pro-sbp-qr { width: min(240px, 100%); height: auto; aspect-ratio: 1; background: #fff; }
.cabinet-body .pro-sbp-checkout a { display: flex; align-items: center; min-height: 48px; }


.cabinet-body .nutrition-status {
    text-align: left;
}

.cabinet-body .nutrition-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cabinet-body .nutrition-status:empty {
    display: none;
}

.cabinet-body .nutrition-fields label:first-child {
    grid-column: 1 / -1;
}
