

html {
    overflow-x: clip;
    background: #fff;
}

.cabinet-body {
    --app-reference-viewport: 360px;
    --app-reference-height: 852px;
    --app-page-inline: clamp(14px, 4.071cqi, 18px);
    --app-page-top: clamp(22px, 6.107cqi, 28px);
    --app-page-bottom: clamp(40px, 12.214cqi, 56px);
    --app-content-gap: clamp(16px, 5.089cqi, 22px);
    --app-card-padding: clamp(14px, 4.071cqi, 18px);
    --app-bottom-nav-height: 64px;
    --cabinet-section-header-height: 44px;
    --cabinet-section-header-gap: 4px;
    container-name: app-frame;
    container-type: inline-size;
    width: var(--app-logical-width, min(100%, 450px));
    max-width: none;
    min-height: var(--app-logical-height, 100svh);
    margin: 0 auto;
    overflow-x: clip;
    background: #fff;
    zoom: var(--app-scale, 1);
}


.cabinet-body:has(.cabinet-app:not([hidden]) .cabinet-journal:not([hidden])) {
    --app-page-inline: clamp(14px, calc(var(--app-logical-width, 360px) * 0.04071), 18px);
    --app-page-top: clamp(22px, calc(var(--app-logical-width, 360px) * 0.06107), 28px);
    --app-page-bottom: clamp(40px, calc(var(--app-logical-width, 360px) * 0.12214), 56px);
    --app-content-gap: clamp(16px, calc(var(--app-logical-width, 360px) * 0.05089), 22px);
    --app-card-padding: clamp(14px, calc(var(--app-logical-width, 360px) * 0.04071), 18px);
    container-type: normal;
}

.cabinet-body .cabinet-shell {
    width: 100%;
    min-height: var(--app-logical-height, 100svh);
    padding: var(--app-page-top) var(--app-page-inline) calc(var(--app-page-bottom) + var(--app-bottom-nav-height) + env(safe-area-inset-bottom) + var(--app-keyboard-inset, 0px));
    scroll-padding-block-end: calc(var(--app-bottom-nav-height) + env(safe-area-inset-bottom) + var(--app-keyboard-inset, 0px) + 16px);
}

.cabinet-body .cabinet-dialog:not(.wearable-onboarding-dialog) {
    max-height: calc(var(--app-visual-height, var(--app-logical-height, 100dvh)) - 32px);
    overflow-y: auto;
    scroll-padding-block-end: calc(var(--app-keyboard-inset, 0px) + 16px);
}

.cabinet-body .cabinet-shell:has(> .cabinet-app:not([hidden]) > .cabinet-content:not([hidden]) > .cabinet-section-header:not([hidden])) {
    padding-top: env(safe-area-inset-top);
}

.cabinet-body :where(.cabinet-auth, .cabinet-setup, .cabinet-app) {
    width: 100%;
    max-width: none;
    margin-inline: auto;
}

.cabinet-body :where(.cabinet-content, .cabinet-section-view, .nutrition-section) {
    gap: var(--app-content-gap);
}

.cabinet-body .cabinet-content:has(> .cabinet-section-header:not([hidden])) {
    gap: 16px;
}

.cabinet-body :is(.cabinet-home, .home-area) {
    display: grid;
}

.cabinet-body .home-area {
    gap: 16px;
    min-width: 0;
}

.cabinet-body .home-area > .app-type-page-title {
    margin-block-end: 0;
}

.cabinet-body .cabinet-section-header {
    position: sticky;
    z-index: 90;
    top: env(safe-area-inset-top);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: var(--cabinet-section-header-gap);
    width: 100%;
    height: var(--cabinet-section-header-height);
    min-height: var(--cabinet-section-header-height);
    border: 0;
    border-radius: 0;
    padding: 0 10px 0 0;
    background: var(--app-color-background, #fff);
}

.cabinet-body .cabinet-section-header::after {
    position: absolute;
    right: 50%;
    bottom: 0;
    width: var(--app-logical-width, 100cqi);
    height: 1px;
    transform: translateX(50%);
    background: rgba(0, 0, 0, 0.16);
    content: "";
    pointer-events: none;
}

.cabinet-body .cabinet-section-header[hidden] {
    display: none;
}

.cabinet-body .cabinet-back-button {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-radius: var(--app-radius-circle);
    padding: 0;
    appearance: none;
    background: transparent;
    color: #000;
    cursor: pointer;
    touch-action: manipulation;
}

.cabinet-body .cabinet-section-header-label {
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.cabinet-body .cabinet-back-button .cabinet-back-chevron {
    transform: rotate(135deg);
    transition: none;
}

.cabinet-body .cabinet-section-header-content,
.cabinet-body .cabinet-section-module-heading {
    min-width: 0;
}

.cabinet-body .cabinet-section-module-heading[hidden] {
    display: none;
}

.cabinet-body .cabinet-section-module-heading .module-detail-heading[hidden] {
    display: none;
}

.cabinet-body .cabinet-section-module-heading .module-detail-heading {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.cabinet-body .cabinet-section-module-heading .assessment-module-card__title {
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cabinet-body .app-bottom-nav {
    position: fixed;
    z-index: 100;
    right: auto;
    top: auto;
    bottom: 0;
    left: calc(var(--app-frame-left, 0px) / var(--app-scale, 1));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    column-gap: 0;
    box-sizing: border-box;
    width: var(--app-logical-width, 100cqi);
    height: calc(var(--app-bottom-nav-height) + env(safe-area-inset-bottom));
    min-height: calc(var(--app-bottom-nav-height) + env(safe-area-inset-bottom));
    margin: 0;
    padding: 0 0 env(safe-area-inset-bottom);
    background: #fff;
    pointer-events: auto;
}

.cabinet-body .app-bottom-nav::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.16);
    content: "";
    pointer-events: none;
}

html[data-app-keyboard-active="true"] .cabinet-body .app-bottom-nav {
    visibility: hidden;
    pointer-events: none;
}

.cabinet-body .app-bottom-nav-primary {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    width: 100%;
    height: var(--app-bottom-nav-height);
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    pointer-events: auto;
}

.cabinet-body .app-bottom-nav-item {
    appearance: none;
    display: grid;
    place-items: center;
    grid-template-rows: 30px 14px;
    align-content: start;
    gap: 2px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: var(--app-bottom-nav-height);
    min-height: var(--app-bottom-nav-height);
    border: 0;
    border-radius: 0;
    padding: 8px 4px 10px;
    background: transparent;
    color: #707070;
    font: inherit;
    touch-action: manipulation;
}

.cabinet-body .app-bottom-nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    stroke: none;
}

.cabinet-body :is(
    .app-bottom-nav-home,
    .app-bottom-nav-journal,
    .app-bottom-nav-modules,
    .app-bottom-nav-settings
) svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.cabinet-body .app-bottom-nav-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--app-radius-circle);
    color: inherit;
}

.cabinet-body .app-bottom-nav-label {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cabinet-body .app-bottom-nav-item.is-active {
    background: transparent;
    color: #000;
}

.cabinet-body .app-bottom-nav-item.is-active .app-bottom-nav-icon {
    background: #000;
    color: #fff;
}

.cabinet-body :where(
    .auth-panel,
    .wellbeing-checkin-card,
    .assessment-history-card,
    .recovery-recommendation,
    .wellness-panel,
    .weight-panel,
    .notification-settings,
    .privacy-settings,
    .account-settings,
    .settings-utility-card,
    .nutrition-panel,
    .nutrition-history-panel
) {
    padding: var(--app-card-padding);
    box-shadow: var(--app-card-shadow);
}

.cabinet-body #cabinet-section-night-metrics > .wellness-panel,
.cabinet-body #cabinet-section-weight > .weight-panel:first-of-type,
.cabinet-body #cabinet-section-activity > .steps-panel,
.cabinet-body #cabinet-section-nutrition > .nutrition-module-content > .nutrition-panel,
.cabinet-body #cabinet-section-nutrition > .nutrition-module-content > .nutrition-history-panel {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.cabinet-body :where(
    .wellness-header,
    .weight-header,
    .weight-chart-header,
    .health-assessment-heading
) {
    align-items: stretch;
    flex-direction: column;
}

.cabinet-body :where(
    .notification-settings,
    .privacy-settings,
    .account-settings,
    .settings-utility-card,
    .weight-form-fields,
    .wellness-cards,
    .steps-summary,
    .habit-summary,
    .health-assessment-grid
) {
    grid-template-columns: minmax(0, 1fr);
}

.cabinet-body :where(
    .notification-settings-controls,
    .wellness-header-actions
) {
    width: 100%;
}

.cabinet-body :where(
    .notification-settings-controls button,
    .intervals-disconnect-button,
    .wellness-sync,
    .weight-sync,
    .account-detail-card .cabinet-logout
) {
    width: 100%;
}

.cabinet-body [data-app-message]:empty {
    display: none;
}
