:root {
    --tyfit-bg: #F7F9FC;
    --tyfit-card: #FFFFFF;
    --tyfit-primary: #6C63FF;
    --tyfit-primary-light: #F1EEFF;
    --tyfit-text: #1A1F36;
    --tyfit-text-secondary: #6B7280;
    --tyfit-border: #EEF1F7;
    --tyfit-success: #22C55E;
    --tyfit-danger: #FF5C7A;
    --tyfit-carbs: #F97316;
    --tyfit-protein: #22C55E;
    --tyfit-fats: #3B82F6;
    --tyfit-shadow: 0 8px 24px rgba(20, 24, 40, 0.05);
    --tyfit-card-radius: 18px;
    --tyfit-sidebar-w: 272px;
    --tyfit-sidebar-collapsed-w: 94px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--tyfit-bg);
    color: var(--tyfit-text);
    overflow-x: hidden;
}

body.tyfit-app {
    min-height: 100vh;
}

/* Keep placeholders stable before Lucide hydrates SVGs */
i[data-lucide] {
    display: inline-flex;
    width: 1em;
    height: 1em;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.lucide {
    shape-rendering: geometricPrecision;
}

/* App-style skeleton shown during page transitions */
.tyfit-page-loader {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 247, 255, .92));
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.tyfit-page-loader.is-visible {
    opacity: 1;
}

.tyfit-page-loader.is-leaving {
    opacity: 0;
}

.tyfit-page-loader__shell {
    width: min(100%, 520px);
    margin-top: 76px;
    display: grid;
    gap: 14px;
    transform: translateY(8px);
    transition: transform .2s ease;
}

.tyfit-page-loader.is-visible .tyfit-page-loader__shell {
    transform: translateY(0);
}

.tyfit-page-loader__bar,
.tyfit-page-loader__hero,
.tyfit-page-loader__row,
.tyfit-page-loader__grid span {
    display: block;
    overflow: hidden;
    position: relative;
    background: #EEEAFB;
}

.tyfit-page-loader__bar::after,
.tyfit-page-loader__hero::after,
.tyfit-page-loader__row::after,
.tyfit-page-loader__grid span::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .78), transparent);
    animation: tyfitSkeletonSweep 1.1s ease-in-out infinite;
}

.tyfit-page-loader__bar {
    width: 132px;
    height: 18px;
    border-radius: 999px;
}

.tyfit-page-loader__hero {
    height: 168px;
    border-radius: 28px;
}

.tyfit-page-loader__row {
    width: 82%;
    height: 16px;
    border-radius: 999px;
}

.tyfit-page-loader__row--short {
    width: 54%;
}

.tyfit-page-loader__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.tyfit-page-loader__grid span {
    height: 92px;
    border-radius: 22px;
}

@keyframes tyfitSkeletonSweep {
    100% { transform: translateX(100%); }
}

@media (max-width: 991.98px) {
    body.tyfit-app input:not([type="checkbox"]):not([type="radio"]),
    body.tyfit-app select,
    body.tyfit-app textarea {
        font-size: 16px !important;
    }

    .tyfit-journey-home-card {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .tyfit-journey-home-title {
        font-size: 29px;
    }

    .tyfit-journey-home-progress {
        min-height: 0;
    }

    .tyfit-journey-meta-grid {
        grid-template-columns: 1fr;
    }

    .journey-hero-panel,
    .journey-stats-grid {
        grid-template-columns: 1fr;
    }

    .journey-hero-copy h2 {
        font-size: 32px;
    }

    .journey-calendar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Reduce paint/layout work for long page sections (progressive rendering). */
.tyfit-main-inner section,
.tyfit-main-inner article,
.tyfit-main-inner .tyfit-profile-card,
.tyfit-main-inner .tyfit-profile-sections-card {
    content-visibility: auto;
    contain-intrinsic-size: 320px;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

body {
        font-weight: 400;
}

.tyfit-main,
body:not([data-page="diet-chart"]):not([data-page="food-catalog"]) .tyfit-main * {
        font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
        width: 280px;
        padding: 28px 24px;
}

.sidebar-logo {
    margin-bottom: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-divider {
    margin: 14px 4px;
    border: none;
    border-top: 1px solid #EAECF4;
}

/* ── Sidebar inner flex layout ── */
.sidebar-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 16px;
}

.sidebar-footer {
    flex-shrink: 0;
    padding-top: 10px;
}

/* ── Section labels ── */
.sidebar-section-label {
    margin: 22px 12px 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #9BA3B8;
    text-transform: uppercase;
}

.sidebar-section-label:first-child {
    margin-top: 10px;
}

/* ── Nav items ── */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    color: #1A1F36;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
    color: currentColor;
    flex-shrink: 0;
}

.sidebar-nav-item.active,
.sidebar-nav-item.is-active {
    background: #F1EEFF;
    color: #6C63FF;
    font-weight: 500;
}

.sidebar-nav-item:hover {
    background: #F7F5FF;
    color: #6C63FF;
}

.sidebar-nav-item.is-disabled-calc {
    opacity: 0.82;
}

.sidebar-nav-item.is-disabled-calc:hover {
    background: #F7F8FC;
    color: #4C5367;
}

/* Mountain journey home card */
.tyfit-journey-home-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(240px, .9fr);
    gap: 18px;
    align-items: stretch;
    padding: 22px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F4F1FF 48%, #EEF4FF 100%);
    border: 1px solid rgba(108, 99, 255, 0.16);
    box-shadow: 0 18px 40px rgba(68, 56, 202, 0.1);
    overflow: hidden;
}

.tyfit-journey-home-card.is-loading {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tyfit-journey-home-loading {
    width: min(100%, 280px);
    display: grid;
    gap: 12px;
}

.tyfit-inline-skeleton {
    display: block;
    width: 58%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    background: rgba(238, 234, 251, .9);
}

.tyfit-inline-skeleton--wide {
    width: 100%;
    height: 20px;
}

.tyfit-inline-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
    animation: tyfitSkeletonSweep 1.1s ease-in-out infinite;
}

.tyfit-journey-home-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.tyfit-journey-home-title {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17172F;
    font-size: 34px;
    line-height: 1.04;
    font-weight: 600;
}

.tyfit-journey-home-text {
    margin: 0;
    max-width: 440px;
    color: #5F6680;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
}

.tyfit-journey-home-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tyfit-journey-secondary-link {
    color: #5B54E8;
    font-size: 13px;
    font-weight: 800;
}

.tyfit-journey-home-art,
.tyfit-journey-home-progress {
    position: relative;
    min-height: 210px;
    border-radius: 22px;
    overflow: hidden;
}

.tyfit-journey-home-art img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.tyfit-journey-home-progress {
    padding: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(108, 99, 255, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tyfit-journey-stage-img {
    width: 100%;
    height: 126px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.tyfit-journey-stage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.tyfit-journey-stage-row span,
.tyfit-journey-meta-grid span {
    display: block;
    color: #7A8198;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tyfit-journey-stage-row strong,
.tyfit-journey-meta-grid strong {
    display: block;
    margin-top: 3px;
    color: #1A1F36;
    font-size: 14px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

.tyfit-journey-stage-row em {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 7px 10px;
    background: #F1EEFF;
    color: #5146E8;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.tyfit-journey-progress-track {
    height: 9px;
    margin-top: 13px;
    border-radius: 999px;
    background: #E5E7F3;
    overflow: hidden;
}

.tyfit-journey-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6C63FF, #8B7CFF, #22C55E);
}

.tyfit-journey-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.tyfit-journey-meta-grid > span {
    min-width: 0;
    padding: 10px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid rgba(108, 99, 255, 0.1);
}

.tyfit-journey-status-box {
    display: grid;
    gap: 3px;
    width: 100%;
    max-width: 420px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(108, 99, 255, 0.13);
}

.tyfit-journey-status-box strong {
    color: #17172F;
    font-size: 14px;
    font-weight: 800;
}

.tyfit-journey-status-box span {
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

/* Journey page */
.journey-page-head {
    display: grid;
    gap: 5px;
}

.journey-page-head p,
.journey-section-head span {
    margin: 0;
    color: #6C63FF;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.journey-page-head h1 {
    margin: 0;
    color: #17172F;
    font-size: 34px;
    line-height: 1.08;
    font-weight: 800;
}

.journey-hero-panel {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 18px;
    align-items: stretch;
    padding: 20px;
    min-height: 280px;
    border-radius: 28px;
    background:
        radial-gradient(420px 220px at 82% 10%, rgba(139, 124, 255, .34), rgba(139, 124, 255, 0) 70%),
        linear-gradient(135deg, #151235 0%, #2A236B 58%, #17172F 100%);
    color: #FFFFFF;
    overflow: hidden;
    box-shadow: 0 22px 46px rgba(22, 18, 62, .22);
}

.journey-hero-copy {
    align-self: center;
    display: grid;
    gap: 12px;
}

.journey-level-pill {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #FFFFFF;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}

.journey-hero-copy h2 {
    margin: 0;
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
}

.journey-hero-copy p {
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: 16px;
    font-weight: 700;
}

.journey-hero-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 800;
}

.journey-hero-art {
    width: 100%;
    min-height: 240px;
    height: 100%;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .2);
}

.journey-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.journey-stat-card,
.journey-card {
    background: #FFFFFF;
    border: 1px solid rgba(108, 99, 255, 0.14);
    box-shadow: var(--tyfit-shadow);
}

.journey-stat-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border-radius: 18px;
}

.journey-stat-card svg {
    width: 20px;
    height: 20px;
    color: #6C63FF;
}

.journey-stat-card strong {
    color: #17172F;
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
}

.journey-stat-card span {
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.journey-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: 22px;
}

.journey-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.journey-section-head h2 {
    margin: 0;
    color: #17172F;
    font-size: 18px;
    font-weight: 800;
}

.journey-milestone-list {
    position: relative;
    display: grid;
    gap: 12px;
}

.journey-milestone-list::before {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 17px;
    width: 2px;
    border-radius: 999px;
    background: #E7E4FF;
}

.journey-milestone {
    position: relative;
    display: grid;
    grid-template-columns: auto 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    background: #F8FAFF;
    border: 1px solid #EEF1F7;
}

.journey-milestone.is-current {
    background: #FFFFFF;
    border-color: rgba(108, 99, 255, .42);
    box-shadow: 0 16px 34px rgba(108, 99, 255, .14);
}

.journey-milestone.is-locked {
    opacity: .58;
}

.journey-milestone-dot {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    color: #6C63FF;
    border: 1px solid rgba(108, 99, 255, .16);
}

.journey-milestone.is-complete .journey-milestone-dot {
    background: #22C55E;
    color: #FFFFFF;
    border-color: #22C55E;
}

.journey-milestone.is-current .journey-milestone-dot {
    background: #6C63FF;
    color: #FFFFFF;
    border-color: #6C63FF;
}

.journey-milestone-thumb {
    width: 72px;
    height: 62px;
    border-radius: 16px;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(108, 99, 255, .12);
}

.journey-milestone-copy {
    min-width: 0;
}

.journey-milestone strong,
.journey-milestone em {
    color: #17172F;
    font-size: 14px;
    font-weight: 800;
    font-style: normal;
}

.journey-milestone p {
    margin: 3px 0 0;
    color: #7A8198;
    font-size: 12px;
    font-weight: 700;
}

.journey-milestone small {
    display: inline-block;
    margin-top: 6px;
    color: #6C63FF;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
}

.journey-milestone em {
    padding: 7px 10px;
    border-radius: 999px;
    background: #F3EEFF;
    color: #6C63FF;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}

.journey-milestone.is-complete em {
    background: rgba(34, 197, 94, .13);
    color: #16A34A;
}

.journey-milestone.is-locked em {
    background: #F3F4F6;
    color: #667085;
}

.journey-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.journey-day {
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 0;
    padding: 10px 4px;
    border-radius: 14px;
    background: #F8FAFF;
}

.journey-day span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #D8DDEA;
}

.journey-day.is-done span {
    background: #22C55E;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .12);
}

.journey-day strong {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.journey-empty {
    align-self: center;
    max-width: 420px;
}

.journey-empty h2 {
    margin: 0 0 8px;
}

.journey-empty p {
    margin: 0;
    color: rgba(255, 255, 255, .76);
}

/* ── Logout button ── */
.sidebar-logout {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #FECACA;
    background: #FFF1F2;
    color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sidebar-logout:hover {
    background: #FFE4E6;
    border-color: #FCA5A5;
}

.sidebar-logout svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

.tyfit-mobile-drawer .sidebar-footer.tyfit-mobile-drawer-logout-wrap {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #F3F4F8;
    text-align: left;
}

.tyfit-mobile-drawer .sidebar-logout.tyfit-mobile-drawer-logout {
    height: auto;
    padding: 10px 16px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #DC2626;
    justify-content: flex-start;
    font-size: 15px;
    font-weight: 400;
    font-family: inherit;
    line-height: 1;
    gap: 8px;
    transition: color 0.14s ease;
}

.tyfit-mobile-drawer .sidebar-logout.tyfit-mobile-drawer-logout:hover {
    background: transparent;
    border-color: transparent;
    color: #B91C1C;
}

.tool-card {
        display: flex;
        align-items: center;
        gap: 18px;
        min-height: 118px;
        padding: 22px;
        border-radius: 18px;
        background: #FFFFFF;
        border: 1px solid #EEF1F7;
        box-shadow: 0 10px 28px rgba(20, 24, 40, 0.06);
}

.tool-card-title {
        color: #182033;
        font-size: 18px;
    font-weight: 400;
        margin-bottom: 6px;
}

.tool-card-subtitle {
        color: #64748B;
        font-size: 13px;
        line-height: 1.45;
        font-weight: 400;
}

.tool-icon-box {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon-box svg {
    width: 38px;
    height: 38px;
    stroke-width: 1.5;
}

.icon-diet {
    color: #6C63FF;
    background: #F1EEFF;
}

.icon-training {
    color: #22C55E;
    background: #EAFBF1;
}

.icon-food {
    color: #FF5C7A;
    background: #FFF0F4;
}

.icon-bmr {
    color: #FF8A3D;
    background: #FFF3EA;
}

.icon-bodyfat {
    color: #7C5CFF;
    background: #F3EEFF;
}

.icon-macro {
    color: #2EC4B6;
    background: #EAFBFA;
}

.icon-calorie {
    color: #FF6B35;
    background: #FFF0EA;
}

.icon-1rm {
    color: #4A90E2;
    background: #EEF6FF;
}

.icon-reminder {
    color: #F59E0B;
    background: #FFF8E8;
}

.tyfit-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    height: 62px;
    padding: 10px 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tyfit-mobile-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.tyfit-logo-link {
    display: inline-flex;
    align-items: center;
}

.tyfit-logo-img {
    width: 72px;
    height: auto;
}

.tyfit-wordmark {
    font-size: 30px;
    font-weight: 500;
    color: #000;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
}

.tyfit-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--tyfit-border);
    background: #fff;
    color: #6A6F81;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tyfit-mobile-topbar .tyfit-icon-btn {
    background: transparent;
    border: none;
    box-shadow: none;
}

.tyfit-subpage-topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    /* background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(231, 228, 255, 0.72); */
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.035);
}

.tyfit-subpage-back-btn,
.tyfit-subpage-topbar-spacer {
    width: 40px;
    height: 40px;
}

.tyfit-subpage-back-btn {
    justify-self: start;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.tyfit-subpage-back-btn:active {
    transform: scale(0.96);
    background: transparent;
    color: var(--tyfit-primary);
}

.tyfit-subpage-back-btn svg {
    width: 21px;
    height: 21px;
    stroke-width: 2.25;
}

.tyfit-subpage-title {
    justify-self: center;
    margin: 0;
    color: #111827;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 18px;
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: 0;
    text-align: center;
}

.tyfit-subpage-topbar-spacer {
    justify-self: end;
    display: block;
}

.tyfit-subpage-save-btn {
    justify-self: end;
    min-width: 75px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #6C63FF 0%, #8B7CFF 100%);
    color: #F4F3FF;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1;
    font-weight: 650;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.tyfit-subpage-save-btn:disabled {
    cursor: default;
    color: #A7ADBC;
    background: rgba(148, 163, 184, 0.12);
    opacity: 1;
}

.tyfit-subpage-save-btn.is-active {
    background: linear-gradient(135deg, #6C63FF 0%, #8B7CFF 100%);
    color: #F4F3FF;
}

.tyfit-subpage-save-btn.is-active:active {
    transform: scale(0.96);
}

.tyfit-mobile-logo-center {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tyfit-mobile-logo-text {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tyfit-icon-btn:hover {
    box-shadow: 0 6px 16px rgba(24, 32, 51, 0.11);
    transform: translateY(-1px);
}

.tyfit-layout {
    display: block;
    min-height: 100vh;
}

.tyfit-sidebar {
    display: none;
}

.tyfit-main {
    padding: 70px 14px 50px;
}

.tyfit-main-inner {
    width: min(960px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.tyfit-desktop-topbar {
    display: none;
}

.tyfit-home-intro h3 {
    margin: 0 0 4px;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tyfit-home-intro p {
    margin: 0;
    color: var(--tyfit-text-secondary);
    font-size: 14px;
    font-weight: 400;
}

.tyfit-home-login-link {
    color: #6c63ff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tyfit-home-login-link:hover {
    color: #554bf5;
}

.tyfit-hero-card {
    background:
        linear-gradient(135deg, #F7F4FF 0%, #EEF2FF 50%, #F9FBFF 100%);
    border: 1px solid rgba(108, 99, 255, 0.18);
    border-radius: 28px;
    min-height: 244px;
    padding: 20px 18px 18px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    box-shadow: 0 18px 45px rgba(108, 99, 255, 0.12), 0 8px 20px rgba(96, 106, 178, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tyfit-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/tyfit_img/hero_mountain.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: right center;
    transform: scale(1.04);
    transform-origin: center right;
    filter: brightness(0.94) saturate(1.03);
    opacity: 0.65;
    z-index: -2;
    pointer-events: none;
}

.tyfit-hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.66) 42%, rgba(255, 255, 255, 0.16) 100%),
        radial-gradient(360px 220px at 88% 6%, rgba(162, 139, 255, 0.18) 0%, rgba(162, 139, 255, 0) 66%);
    z-index: -1;
    pointer-events: none;
}

body[data-page="home"] .tyfit-coming-card,
body[data-page="home"] .tyfit-motivation-card,
body[data-page="home"] #motivationCard {
    display: none !important;
}

.tyfit-hero-inline {
    display: flex;
    align-items: center;
    min-height: 100%;
}

.tyfit-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: start;
    align-content: center;
    gap: 12px;
    width: min(560px, 68%);
}

.tyfit-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(122, 106, 255, 0.2);
    background: rgba(123, 108, 255, 0.12);
    color: #524ba4;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tyfit-hero-badge svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.1;
}

@media (min-width: 768px) {
    .tyfit-hero-badge {
        height: 34px;
        gap: 8px;
        padding: 0 15px;
        font-size: 13px;
        font-weight: 550;
    }

    .tyfit-hero-badge svg {
        width: 15px;
        height: 15px;
    }
}

@media (min-width: 1024px) {
    .tyfit-hero-badge {
        height: 38px;
        padding: 0 18px;
        font-size: 14px;
    }

    .tyfit-hero-badge svg {
        width: 16px;
        height: 16px;
    }
}

.tyfit-hero-title {
    margin: 0;
    font-size: clamp(28px, 4.6vw, 30px);
    line-height: 1.03;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #1A1F36;
    text-wrap: balance;
}

.tyfit-hero-title span {
    display: inline-block;
    margin-top: 2px;
    background: linear-gradient(92deg, #6C63FF 0%, #8A6EFF 46%, #A175FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tyfit-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.tyfit-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(240, 244, 255, 0.92);
    border: 1px solid rgba(223, 231, 249, 0.95);
    box-shadow: 0 6px 14px rgba(108, 99, 255, 0.1);
    color: #2D3448;
    font-size: 12.5px;
    font-weight: 500;
}

.tyfit-hero-chip img {
    width: 17px;
    height: 17px;
    object-fit: contain;
    flex-shrink: 0;
}

.tyfit-hero-cta {
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 48px;
    padding: 0 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: linear-gradient(135deg, #7067FF 0%, #8A6BFF 52%, #9A72FF 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(108, 99, 255, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.tyfit-hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(108, 99, 255, 0.34);
    filter: saturate(1.06);
}

.tyfit-hero-cta svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.3;
}

.tyfit-section {
    display: grid;
    gap: 12px;
}

.tyfit-section-head h4 {
    margin: 0;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.tyfit-view-all-link {
    border: none;
    background: transparent;
    color: #0F6FEA;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.tyfit-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Extra cards hidden by default on all screen sizes; overridden per breakpoint */
.tyfit-tools-grid:not(.is-expanded) .tyfit-tool-card--extra {
    display: flex;
}

.tyfit-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px;
    min-height: unset;
    border-radius: var(--tyfit-card-radius);
    background: var(--tyfit-card);
    border: 1px solid var(--tyfit-border);
    box-shadow: var(--tyfit-shadow);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.tyfit-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(20, 24, 40, 0.08);
}

.tyfit-tool-card:active {
    transform: scale(0.98);
}

.tyfit-tool-card--coming-soon {
    position: relative;
    cursor: default;
    opacity: 0.68;
}

.tyfit-tool-card--coming-soon:hover {
    transform: none;
    box-shadow: var(--tyfit-shadow);
}

.tyfit-tool-card--coming-soon:active {
    transform: none;
}

.tyfit-coming-soon-label {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    box-sizing: border-box;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.25px;
    text-transform: uppercase;
    color: rgba(24, 26, 29, 0.78);
    background: rgba(120, 126, 135, 0.18);
    border: 1px solid rgba(120, 126, 135, 0.26);
    border-radius: 0 var(--tyfit-card-radius) 0 8px;
    padding: 2px 6px;
    line-height: 1.2;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.tyfit-tool-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tyfit-tool-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.8;
}

.tyfit-tool-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.tyfit-tool-info p {
    display: none;
}

.tyfit-tool-card h5.tool-card-title {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tyfit-text);
    line-height: 1.35;
    word-break: break-word;
}

.tyfit-tool-card .tool-card-subtitle {
    margin: -2px 0 0;
    max-width: 100%;
    color: #7B8498;
    font-size: 10.5px;
    line-height: 1.25;
    font-weight: 500;
    text-wrap: balance;
}

body[data-page="home"] .tyfit-tool-card .tool-card-subtitle {
    display: block !important;
}

.tyfit-tool-card > [data-lucide="chevron-right"] {
    display: none;
}

.tyfit-coming-card {
    background: linear-gradient(135deg, #EAF3FF 0%, #EEF0FF 100%);
    border: 1px solid #C8DCF8;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 8px 28px rgba(15, 111, 234, 0.10), 0 2px 8px rgba(15, 111, 234, 0.05);
    display: grid;
    gap: 16px;
}

.tyfit-coming-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #DAEAFF;
    color: #0F6FEA;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.tyfit-coming-content h4 {
    margin: 10px 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--tyfit-text);
}

.tyfit-coming-desktop {
    display: grid;
    gap: 16px;
}

.tyfit-coming-mobile {
    display: none;
}

.tyfit-mobile-progress-row {
    display: grid;
    grid-template-columns: auto 1fr 96px;
    align-items: center;
    gap: 10px;
}

.tyfit-progress-ring--small {
    width: 62px;
    height: 62px;
}

.tyfit-mobile-progress-copy strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tyfit-text);
}

.tyfit-mobile-progress-copy span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: var(--tyfit-text-secondary);
}

.tyfit-mobile-progress-graph {
    width: 96px;
    height: 52px;
}

.tyfit-coming-content p {
    margin: 0;
    color: var(--tyfit-text-secondary);
    max-width: 42ch;
    font-size: 14px;
}

.tyfit-notify-btn {
    margin-top: 10px;
    border: 1px solid #8B87F5;
    background: rgba(255,255,255,0.6);
    color: #5955E8;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tyfit-notify-btn svg {
    width: 13px;
    height: 13px;
}

.tyfit-coming-preview {
    border: 1px dashed #D5CEF5;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    padding: 14px;
    opacity: 0.86;
}

.tyfit-preview-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tyfit-preview-cols div {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
}

.tyfit-preview-cols span {
    display: block;
    color: #8E93A5;
    font-size: 11px;
    margin-bottom: 4px;
}

.tyfit-preview-cols strong {
    font-size: 17px;
}

.tyfit-progress-ring-wrap {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tyfit-progress-ring {
    --progress: 72;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#6C63FF calc(var(--progress) * 1%), #E9ECF4 0);
    position: relative;
}

.tyfit-progress-ring::before {
    content: "";
    position: absolute;
    inset: 8px;
    background: #fff;
    border-radius: 50%;
}

.tyfit-progress-ring span {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
}

.tyfit-progress-ring-wrap ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
    color: #8790A8;
    font-size: 12px;
}

.tyfit-motivation-card {
    border: 1px solid var(--tyfit-border);
    background: var(--tyfit-card);
    border-radius: var(--tyfit-card-radius);
    box-shadow: var(--tyfit-shadow);
    width: 100%;
    text-align: left;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyfit-motivation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(20, 24, 40, 0.08);
}

body[data-page="home"] .tyfit-motivation-card {
    background: var(--tyfit-primary-light);
    border-color: #E3DDFC;
}

body[data-page="home"] .tyfit-motivation-right {
    color: #6C63FF;
}

.tyfit-biceps-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    flex-shrink: 0;
}

.tyfit-biceps-emoji {
    display: none;
}

.tyfit-motivation-left {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tyfit-star-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--tyfit-primary-light);
    color: #6C63FF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tyfit-motivation-left h4 {
    margin: 0 0 5px;
    font-size: 16px;
}

.tyfit-motivation-left p {
    margin: 0;
    font-size: 13px;
    color: #4E556A;
}

.tyfit-motivation-left small {
    color: #97A0B4;
}

.tyfit-motivation-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #B5BBC9;
}

.tyfit-profile-band {
    background: linear-gradient(180deg, #EDEAFF 0%, rgba(237, 234, 255, 0) 100%);
    border-radius: 26px;
    padding: 14px;
}

.tyfit-profile-summary-card,
.tyfit-profile-sections-card {
    background: #fff;
    border: 1px solid var(--tyfit-border);
    border-radius: 22px;
    box-shadow: var(--tyfit-shadow);
}

.tyfit-profile-summary-card {
    padding: 16px;
}

.tyfit-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tyfit-summary-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tyfit-summary-avatar {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid #F1EEFF;
}

.tyfit-summary-user h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.01em;
}

.tyfit-summary-user p {
    margin: 5px 0 0;
    color: var(--tyfit-text-secondary);
    font-size: 13px;
}

.tyfit-mini-edit {
    border: 1px solid var(--tyfit-border);
    background: #fff;
    color: #667085;
    border-radius: 999px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
}

.tyfit-summary-meta {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--tyfit-border);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tyfit-meta-item {
    padding-right: 8px;
    border-right: 1px solid var(--tyfit-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tyfit-meta-item:last-child {
    border-right: none;
}

.tyfit-meta-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--tyfit-primary-light);
    color: var(--tyfit-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.tyfit-meta-item span {
    display: block;
    color: #99A0B2;
    font-size: 11px;
}

.tyfit-meta-item strong {
    display: block;
    font-size: 12px;
}

.tyfit-profile-sections-card {
    padding: 14px;
}

.tyfit-profile-sections-card h4 {
    margin: 0 0 10px;
    font-size: 18px;
}

.tyfit-section-row {
    width: 100%;
    border: none;
    background: transparent;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 10px;
    align-items: center;
    text-align: left;
    padding: 12px 4px;
    border-bottom: 1px solid var(--tyfit-border);
    cursor: pointer;
}

.tyfit-section-row:last-child {
    border-bottom: none;
}

.tyfit-section-row:hover {
    background: #FAFBFF;
}

.tyfit-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--tyfit-primary-light);
    color: var(--tyfit-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tyfit-section-copy strong {
    display: block;
    font-size: 14px;
}

.tyfit-section-copy span {
    color: var(--tyfit-text-secondary);
    font-size: 12px;
}

.tyfit-status-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tyfit-status-icon.completed {
    background: #22C55E;
    color: #fff;
}

.tyfit-status-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #B45309;
}

.tyfit-status-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.5;
}

.tyfit-chevron {
    color: #C0C7D6;
    font-size: 12px;
}

.tyfit-logout-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #C81E1E;
    padding: 14px 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
}

.tyfit-logout-card:hover {
    color: #B91C1C;
}

.tyfit-logout-card .tyfit-logout-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tyfit-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background: #fff;
    border-top: 1px solid var(--tyfit-border);
    height: 87px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    padding: 5px 6px 15px;
}

.tyfit-mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -84vw;
    width: 84vw;
    max-width: 420px;
    z-index: 101;
    background: #fff;
    border-right: 1px solid var(--tyfit-border);
    padding: 20px 18px;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tyfit-mobile-drawer.sidebar {
    margin-top: 0 !important;
}

.tyfit-mobile-drawer.is-open {
    left: 0;
}

.tyfit-mobile-drawer-head {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.tyfit-mobile-drawer-head .tyfit-logo-link {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.tyfit-mobile-drawer-head .tyfit-logo-img {
    width: 30px;
}

.tyfit-mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 21, 38, 0.4);
    z-index: 100;
}

.tyfit-nav-separator {
    height: 1px;
    background: var(--tyfit-border);
    margin: 8px 6px;
}

.tyfit-dropdown-wrap {
    position: relative;
}

.tyfit-mobile-topbar-dropdown .tyfit-popover-menu {
    right: -2px;
    left: auto;
}

.tyfit-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6C63FF;
    box-shadow: 0 0 0 2px #fff;
}

.tyfit-popover-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    border-radius: 14px;
    border: 1px solid var(--tyfit-border);
    background: #fff;
    box-shadow: 0 14px 30px rgba(24, 32, 51, 0.14);
    padding: 8px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 105;
}

.tyfit-popover-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tyfit-popover-empty,
.tyfit-popover-item {
    margin: 0;
    font-size: 13px;
    color: #54607A;
    padding: 10px 12px;
    border-radius: 10px;
}

.tyfit-popover-item {
    display: block;
    text-decoration: none;
}

.tyfit-popover-item:hover {
    background: #F7F8FD;
}

.tyfit-menu-action {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 10px;
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    color: #4F5970;
    cursor: pointer;
}

.tyfit-menu-action:hover {
    background: #F3F5FF;
}

.tyfit-account-btn {
    border: 1px solid var(--tyfit-border);
    background: #fff;
    border-radius: 999px;
    height: 40px;
    padding: 4px 10px 4px 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 550;
    color: #46516A;
    cursor: pointer;
}

.tyfit-account-btn.tyfit-account-btn--guest {
    border-color: #dbe4ff;
    background: linear-gradient(145deg, #6c63ff, #5a50f7);
    color: #ffffff;
    padding: 0 16px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.24);
}

.tyfit-account-btn.tyfit-account-btn--guest:hover {
    filter: brightness(1.03);
}

.tyfit-account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #E4E8F5;
}

.tyfit-desktop-actions {
    display: none;
}

.tyfit-sidebar-toggle-floating {
    display: none;
}

.tyfit-mobile-bottom-nav a,
.tyfit-mobile-bottom-nav button {
    position: relative;
    border: none;
    background: transparent;
    color: #5b616b;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    min-width: 0;
    padding: 6px 0 2px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.05;
    cursor: pointer;
}

.tyfit-mobile-profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    border: 1.5px solid rgba(108, 99, 255, 0.24);
    background: #fff;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.1);
    display: block;
}

.tyfit-mobile-bottom-nav a.is-active .tyfit-mobile-profile-avatar {
    border-color: rgba(108, 99, 255, 0.5);
    box-shadow: 0 5px 14px rgba(108, 99, 255, 0.18);
}

.tyfit-mobile-bottom-nav a i,
.tyfit-mobile-bottom-nav button i,
.tyfit-mobile-bottom-nav a svg,
.tyfit-mobile-bottom-nav button svg {
    font-size: 26px;
    width: 22px;
    height: 22px;
    stroke-width: 2.8;
}

.tyfit-mobile-bottom-nav a i.ph,
.tyfit-mobile-bottom-nav button i.ph,
.tyfit-mobile-bottom-nav a i.ph-fill,
.tyfit-mobile-bottom-nav button i.ph-fill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 25px;
    width: 25px;
    height: 25px;
    stroke-width: 0;
}

.tyfit-mobile-bottom-nav a svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tyfit-mobile-bottom-nav a.is-active svg {
    stroke-width: 2;
}

.tyfit-mobile-bottom-nav .is-active {
    color: var(--tyfit-primary);
}

#quickAddBtn.tyfit-plus-btn,
.tyfit-plus-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin: 0 auto;
    background: linear-gradient(145deg, #6C63FF, #554BF5) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 12px 24px rgba(108, 99, 255, 0.35);
}

#quickAddBtn.tyfit-plus-btn i,
#quickAddBtn.tyfit-plus-btn svg,
.tyfit-plus-btn i,
.tyfit-plus-btn svg {
    color: #fff !important;
    stroke: currentColor;
}

.tyfit-mobile-bottom-nav .tyfit-checkin-nav-btn {
    width: auto;
    height: 100%;
    margin: 0;
    border-radius: 0;
    color: #5b616b !important;
    background: transparent !important;
    box-shadow: none;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
}

.tyfit-mobile-bottom-nav .tyfit-checkin-nav-btn::before {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(50% - 17px);
    width: 5px;
    height: 5px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: rgba(108, 99, 255, 0.34);
    box-shadow: 29px 7px 0 rgba(139, 124, 255, 0.24);
}

.tyfit-mobile-bottom-nav .tyfit-checkin-nav-btn::after {
    content: "";
    position: absolute;
    top: 25px;
    left: calc(50% + 16px);
    width: 3px;
    height: 3px;
    border-radius: 1px;
    transform: rotate(45deg);
    background: rgba(108, 99, 255, 0.22);
}

.tyfit-mobile-bottom-nav .tyfit-checkin-nav-btn svg {
    position: relative;
    z-index: 1;
    color: var(--tyfit-primary) !important;
    stroke-width: 2.25 !important;
}

.tyfit-mobile-bottom-nav .tyfit-checkin-nav-btn i.ph,
.tyfit-mobile-bottom-nav .tyfit-checkin-nav-btn i.ph-fill {
    position: relative;
    z-index: 1;
    color: var(--tyfit-primary) !important;
    font-size: 25px;
}

.tyfit-mobile-bottom-nav .tyfit-checkin-nav-btn span {
    position: relative;
    z-index: 1;
    color: inherit !important;
}

.tyfit-floating-action {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(104px + env(safe-area-inset-bottom));
    z-index: 94;
    display: grid;
    justify-items: end;
    gap: 12px;
    pointer-events: none;
}

.tyfit-floating-plus {
    position: relative;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    pointer-events: auto;
    color: #fff;
    background: linear-gradient(145deg, #6C63FF, #554BF5);
    box-shadow:
        0 18px 34px rgba(108, 99, 255, 0.34),
        0 8px 16px rgba(17, 24, 39, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, filter .28s ease;
    overflow: visible;
}

.tyfit-floating-plus svg {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.tyfit-floating-action.is-open .tyfit-floating-plus svg {
    transform: rotate(45deg);
}

.tyfit-floating-action.is-open .tyfit-floating-plus {
    box-shadow:
        0 22px 40px rgba(108, 99, 255, 0.38),
        0 10px 18px rgba(17, 24, 39, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.tyfit-floating-action.is-disabled .tyfit-floating-plus {
    opacity: .72;
    cursor: default;
    filter: grayscale(.05);
}

.tyfit-floating-action__menu {
    display: grid;
    gap: 10px;
    opacity: 0;
    transform: translateY(16px) scale(.94);
    pointer-events: none;
    transform-origin: bottom right;
    transition:
        opacity .24s ease,
        transform .34s cubic-bezier(.18, .95, .2, 1);
}

.tyfit-floating-action.is-open .tyfit-floating-action__menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.tyfit-floating-action__menu button {
    min-width: 158px;
    min-height: 46px;
    border: 1px solid rgba(231, 228, 255, .9);
    border-radius: 16px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #2F3448;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 14px 30px rgba(42, 37, 112, .13);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.tyfit-floating-action__menu button:hover {
    transform: translateX(-2px);
    color: #191F38;
    background: #fff;
}

.tyfit-floating-action__menu svg {
    width: 19px;
    height: 19px;
    color: var(--tyfit-primary);
    stroke-width: 2.4;
}

.tyfit-weight-modal[hidden] {
    display: none;
}

.tyfit-weight-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 20px;
}

.tyfit-weight-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .34);
    backdrop-filter: blur(8px);
}

.tyfit-weight-modal__dialog {
    position: relative;
    width: min(100%, 420px);
    border-radius: 28px;
    padding: 22px;
    background: #fff;
    border: 1px solid #E7E4FF;
    box-shadow: 0 28px 70px rgba(42, 37, 112, .2);
    transform: translateY(10px) scale(.98);
    opacity: 0;
    transition: transform .26s cubic-bezier(.18, .95, .2, 1), opacity .22s ease;
}

.tyfit-weight-modal.is-open .tyfit-weight-modal__dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.tyfit-weight-modal__head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding-right: 38px;
}

.tyfit-weight-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #667085;
    background: #F6F5FF;
    cursor: pointer;
}

.tyfit-weight-modal__icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--tyfit-primary);
    background: #F0EDFF;
    margin: 0;
}

.tyfit-weight-modal__dialog h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 650;
}

.tyfit-weight-modal__dialog p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 12.5px;
    line-height: 1.45;
}

.tyfit-weight-form-card {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid #E7E4FF;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(108, 99, 255, .07);
}

.tyfit-weight-field {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 14px 15px;
}

.tyfit-weight-field::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 1px;
    background: #F0EEFF;
}

.tyfit-weight-field:last-child::after {
    display: none;
}

.tyfit-weight-field__icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F0EDFF;
    color: var(--tyfit-primary);
}

.tyfit-weight-field[data-field="date"] .tyfit-weight-field__icon {
    background: #EAF2FF;
    color: #2563EB;
}

.tyfit-weight-field[data-field="notes"] .tyfit-weight-field__icon {
    background: #ECFDF3;
    color: #0F9D58;
}

.tyfit-weight-field__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.3;
}

.tyfit-weight-field__body {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.tyfit-weight-field__body strong {
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.tyfit-weight-modal__dialog input,
.tyfit-weight-modal__dialog textarea {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111827;
    font: inherit;
    font-size: 14px;
    font-weight: 450;
    padding: 0;
    outline: none;
}

.tyfit-weight-modal__dialog textarea {
    min-height: 44px;
    resize: vertical;
}

.tyfit-weight-modal__dialog input:focus,
.tyfit-weight-modal__dialog textarea:focus {
    box-shadow: none;
}

.tyfit-weight-modal__save {
    width: 100%;
    height: 54px;
    margin-top: 18px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #6C63FF, #8B7CFF);
    box-shadow: 0 14px 28px rgba(108, 99, 255, .24);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tyfit-weight-modal__save:disabled {
    opacity: .72;
    cursor: wait;
}

.tyfit-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 33, 0.4);
    z-index: 95;
}

.tyfit-quick-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    z-index: 100;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 16px 16px 40px;
    box-shadow: 0 -18px 36px rgba(18, 23, 44, 0.2);
    transition: bottom 0.25s ease;
}

.tyfit-quick-sheet.is-open {
    bottom: 0;
}

.tyfit-quick-sheet header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tyfit-quick-sheet h4 {
    margin: 0;
}

.tyfit-sheet-action {
    width: 100%;
    border: 1px solid var(--tyfit-border);
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    text-align: left;
    font-size: 14px;
    margin-bottom: 8px;
    cursor: pointer;
}

.tyfit-toast {
    position: fixed;
    left: 50%;
    top: 82px;
    transform: translateX(-50%) translateY(-20px);
    background: #1C1B3A;
    color: #fff;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 120;
}

.tyfit-toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 640px) {
    .tyfit-main {
        padding-inline: 20px;
    }
}

@media (max-width: 359px) {
    .tyfit-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    body[data-page="diet-chart"] .tp-hero-header,
    body[data-page="training-plan"] .tp-hero-header {
        display: none !important;
    }

    .tyfit-main {
        padding-inline: 18px;
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }

    .tyfit-main-inner,
    .tyfit-main-inner > section,
    .tyfit-main-inner > nav,
    .tyfit-hero-card,
    .tyfit-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .tyfit-tools-grid:not(.is-expanded) .tyfit-tool-card--extra:nth-child(-n+8) {
        display: flex;
    }

    .tyfit-mobile-topbar:not(.tyfit-subpage-topbar) {
        grid-template-columns: 1fr auto 1fr;
        display: grid;
    }

    .tyfit-mobile-topbar.tyfit-subpage-topbar {
        display: grid;
    }

    .tyfit-mobile-logo-center {
        justify-self: center;
    }

    .tyfit-mobile-topbar .tyfit-logo-img {
        width: 36px;
    }

    .tyfit-mobile-topbar .tyfit-wordmark,
    .tyfit-mobile-drawer-head .tyfit-wordmark {
        font-size: 15px;
    }

    .tyfit-section-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .tyfit-section-head h4 {
        font-size: 14px;
        font-weight: 500;
    }

    #quickAccessToggle {
        display: inline-flex;
        font-size: 13px;
        color: #0F6FEA;
    }

    .tyfit-mobile-topbar .tyfit-dropdown-wrap {
        justify-self: end;
    }

    .tyfit-hero-card {
        min-height: 228px;
        padding: 18px 16px 16px;
        border-radius: 28px;
    }

    .tyfit-hero-card,
    .tyfit-tools-grid {
        width: 100%;
    }

    .tyfit-tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .tyfit-tool-card {
        min-width: 0;
    }

    .tyfit-hero-card::before {
        background-position: 58% center;
        transform: scale(1.05);
        opacity: 0.72;
    }

    .tyfit-hero-card::after {
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.66) 42%, rgba(255, 255, 255, 0.16) 100%),
            radial-gradient(300px 180px at 90% 8%, rgba(162, 139, 255, 0.2) 0%, rgba(162, 139, 255, 0) 66%);
    }

    .tyfit-hero-content {
        width: min(100%, 73%);
        gap: 9px;
    }

    .tyfit-hero-badge {
        height: 28px;
        padding: 0 12px;
        font-size: 11.5px;
    }

    .tyfit-hero-title {
        font-size: 23px;
        font-weight: 550;
        line-height: 1.05;
    }

    .tyfit-hero-chips {
        gap: 5px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tyfit-hero-chip {
        height: 31px;
        padding: 0 8px;
        font-size: 11px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .tyfit-hero-chip img {
        width: 14px;
        height: 14px;
    }

    .tyfit-hero-cta {
        width: min(100%, 210px);
        height: 35px;
        border-radius: 16px;
        font-size: 13px;
    }

    .tyfit-tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .tyfit-tool-card,
    .tool-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        border-radius: 14px;
        padding: 12px 8px;
        text-align: center;
        gap: 8px;
        min-height: unset;
    }

    .tyfit-tool-card .tool-card-subtitle {
        font-size: 9.5px;
        line-height: 1.2;
    }

    .tyfit-tool-card h5.tool-card-title {
        font-size: 11.5px;
        font-weight: 600;
    }

    .tyfit-tool-info {
        display: contents;
    }

    .tyfit-tool-info h5 {
        font-size: 11px;
        font-weight: 600;
    }

    .tyfit-tool-info p {
        display: none;
    }

    .tyfit-tool-card > [data-lucide="chevron-right"] {
        display: none;
    }

    .tyfit-tool-icon,
    .tool-icon-box {
        width: 52px;
        height: 52px;
        min-width: 52px;
        border-radius: 14px;
    }

    .tyfit-tool-icon svg,
    .tool-icon-box svg {
        width: 26px;
        height: 26px;
    }

    .tyfit-coming-desktop {
        display: none;
    }

    .tyfit-coming-mobile {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
    }

    .tyfit-coming-mobile-left {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        min-width: 0;
    }

    .tyfit-coming-mobile h5 {
        margin: 6px 0 5px;
        font-size: 16px;
        font-weight: 700;
        color: var(--tyfit-text);
    }

    .tyfit-coming-mobile p {
        margin: 0 0 12px;
        font-size: 12.5px;
        color: var(--tyfit-text-secondary);
        line-height: 1.5;
    }

    .tyfit-coming-mobile-right {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tyfit-coming-preview-img {
        width: 220px;
        height: 220px;
        object-fit: contain;
    }

    .tyfit-mobile-progress-row {
        display: none;
    }

    body[data-page="home"] .tyfit-motivation-card {
        align-items: center;
    }

    body[data-page="home"] .tyfit-motivation-right {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .tyfit-biceps-img {
        width: 88px;
        height: 88px;
    }

    .tyfit-star-badge {
        background: #B5B1FF;
        color: #fff;
    }

    .tyfit-motivation-left h4 {
        font-weight: 400;
        color: #4E556A;
    }

    .tool-card-subtitle,
    .tyfit-tool-info p {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    body[data-page="diet-chart"] .tp-hero-header,
    body[data-page="training-plan"] .tp-hero-header {
        display: none !important;
    }

    .tyfit-mobile-topbar .tyfit-logo-img {
        width: 46px;
    }

    .tyfit-mobile-topbar .tyfit-wordmark,
    .tyfit-mobile-drawer-head .tyfit-wordmark {
        font-size: 19px;
    }
}

@media (min-width: 768px) {
    .tyfit-hero-card::before {
        background-image: url("../assets/tyfit_img/hero_mountain.png");
        background-size: cover;
        background-position: right 42% center;
        transform: scale(1);
        opacity: 0.72;
    }
}

@media (min-width: 1024px) {
    .tyfit-floating-action {
        right: 28px;
        bottom: 28px;
    }

    body.tyfit-app {
        height: 100vh;
        overflow: hidden;
    }

    .tyfit-mobile-topbar,
    .tyfit-mobile-drawer,
    .tyfit-mobile-drawer-backdrop,
    .tyfit-mobile-bottom-nav,
    .tyfit-sheet-backdrop,
    .tyfit-quick-sheet {
        display: none;
    }

    .tyfit-layout {
        display: flex;
        height: 100vh;
        gap: 20px;
        position: relative;
    }

    .tyfit-sidebar {
        display: flex;
        flex-direction: column;
        width: 280px;
        background: #fff;
        border: 1px solid var(--tyfit-border);
        border-radius: 0;
        padding: 0;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
        transition: width 0.22s ease;
    }

    .tyfit-sidebar > .sidebar-inner {
        padding: 24px 18px;
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .tyfit-sidebar-head {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 52px;
        margin-bottom: 8px;
        flex-shrink: 0;
    }

    .tyfit-sidebar .sidebar-menu {
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 2px;
        scrollbar-width: thin;
        scrollbar-color: rgba(108, 99, 255, 0.24) transparent;
    }

    .tyfit-sidebar .sidebar-menu::-webkit-scrollbar {
        width: 4px;
    }

    .tyfit-sidebar .sidebar-menu::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(108, 99, 255, 0.24);
    }

    .tyfit-sidebar .tyfit-logo-img {
        width: 34px;
    }

    .tyfit-sidebar .tyfit-wordmark {
        display: inline;
        font-size: 16px;
        font-weight: 700;
        color: var(--tyfit-text);
    }

    .tyfit-sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .tyfit-sidebar-nav:not(.tyfit-sidebar-nav--secondary) {
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        margin-top: 10px;
        padding-right: 2px;
    }

    .tyfit-sidebar-nav--secondary {
        margin-top: auto;
        flex-shrink: 0;
        padding-top: 10px;
    }

    .tyfit-nav-item {
        transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
    }

    .tyfit-main {
        flex: 1;
        padding: 10px 20px 24px;
        min-width: 0;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .tyfit-desktop-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        width: min(980px, calc(100% - 24px));
        margin: 0 auto 12px;
        padding: 0 0 10px;
        position: sticky;
        top: 0;
        z-index: 45;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .tyfit-desktop-separator {
        width: 1px;
        height: 22px;
        background: rgba(24, 32, 51, 0.12);
        margin: 0 2px 0 4px;
    }

    .tyfit-notif-btn {
        position: relative;
    }

    .tyfit-desktop-actions .tyfit-icon-btn {
        border: none;
        background: transparent;
        box-shadow: none;
        width: auto;
        height: auto;
        border-radius: 0;
        padding: 0 4px;
        color: #55607a;
    }

    .tyfit-desktop-actions .tyfit-icon-btn:hover {
        transform: none;
        box-shadow: none;
        color: #39445f;
    }

    .tyfit-desktop-actions .tyfit-notif-btn [data-lucide="bell"] {
        width: 18px;
        height: 18px;
        stroke-width: 2.2;
    }

    .tyfit-desktop-actions .tyfit-notif-btn .tyfit-dot {
        top: -1px;
        right: -2px;
        box-shadow: none;
    }

    .tyfit-account-btn {
        border: none;
        background: transparent;
        border-radius: 0;
        padding: 0;
        gap: 8px;
        height: auto;
    }

    .tyfit-account-btn:hover {
        background: transparent;
    }

    .tyfit-account-avatar {
        width: 34px;
        height: 34px;
        border: 1px solid #dbe2f3;
    }

    .tyfit-account-btn span {
        font-size: 14px;
        font-weight: 500;
        color: #46516a;
    }

    .tyfit-sidebar-toggle-floating {
        display: inline-flex;
        position: fixed;
        left: calc(280px - 16px);
        top: 12px;
        z-index: 60;
        width: 30px;
        height: 30px;
        border: 1px solid var(--tyfit-border);
        border-radius: 8px;
        background: #fff;
        color: #6B7280;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: left 0.22s ease, transform 0.18s ease;
    }

    .tyfit-sidebar-toggle-floating:hover {
        transform: translateY(-1px);
    }

    .tyfit-main-inner {
        width: min(980px, calc(100% - 24px));
        margin: 0 auto;
        gap: 20px;
    }

    body[data-page="home"] .tyfit-tool-card {
        min-height: unset;
    }

    .tyfit-hero-card {
        min-height: 280px;
        padding: 24px;
    }

    .tyfit-hero-card::before {
        background-image:
            linear-gradient(90deg, #F7F4FF 0%, #EEF2FF 48%, rgba(238, 242, 255, 0.24) 72%, rgba(238, 242, 255, 0) 100%),
            url("../assets/tyfit_img/hero_mountain.png");
        background-size: 100% 100%, 80% auto;
        background-repeat: no-repeat, no-repeat;
        background-position: left top, right 0 center;
        transform: scale(1);
        opacity: 0.78;
    }

    .tyfit-hero-content {
        width: min(610px, 72%);
        gap: 13px;
    }

    .tyfit-hero-title {
        font-size: clamp(34px, 3.1vw, 30px);
    }

    .tyfit-hero-chip {
        height: 35px;
        font-size: 13px;
    }

    .tyfit-hero-cta {
        height: 50px;
        padding: 0 22px;
        font-size: 14px;
    }

    .tyfit-tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tyfit-tool-card,
    .tool-card {
        padding: 16px 14px;
        gap: 10px;
        border-radius: 16px;
    }

    .tyfit-tool-card h5.tool-card-title {
        font-size: 13px;
    }

    .tyfit-tool-icon,
    .tool-icon-box {
        width: 56px;
        height: 56px;
    }

    .tyfit-tool-icon svg,
    .tool-icon-box svg {
        width: 28px;
        height: 28px;
    }

    .tyfit-tools-grid .tyfit-tool-card--extra {
        display: flex;
    }

    .tyfit-section-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }


    .tyfit-coming-desktop {
        grid-template-columns: 1.2fr 1fr;
        align-items: center;
    }

    .tyfit-summary-avatar {
        width: 78px;
        height: 78px;
    }

    .tyfit-section-row {
        padding-inline: 6px;
    }

    body.sidebar-collapsed .tyfit-sidebar {
        width: var(--tyfit-sidebar-collapsed-w);
        overflow: visible;
    }

    body.sidebar-collapsed .tyfit-sidebar > .sidebar-inner {
        padding: 18px 10px;
        overflow: visible;
    }

    body.sidebar-collapsed .tyfit-sidebar .sidebar-menu {
        overflow: visible;
        padding-right: 0;
    }

    body.sidebar-collapsed .tyfit-sidebar .sidebar-section-label,
    body.sidebar-collapsed .tyfit-sidebar .sidebar-nav-item span,
    body.sidebar-collapsed .tyfit-sidebar .sidebar-footer {
        display: none;
    }

    body.sidebar-collapsed .tyfit-sidebar .sidebar-nav-item {
        justify-content: center;
        gap: 0;
        padding-inline: 0;
    }

    body.sidebar-collapsed .tyfit-sidebar .tyfit-nav-item span {
        display: none;
    }

    body.sidebar-collapsed .tyfit-sidebar .tyfit-nav-item {
        justify-content: center;
        gap: 0;
        padding-inline: 0;
    }

    body.sidebar-collapsed .tyfit-sidebar-toggle-floating {
        left: calc(var(--tyfit-sidebar-collapsed-w) - 16px);
    }

    body.sidebar-collapsed .tyfit-sidebar-toggle-floating i {
        transform: rotate(180deg);
    }

    body.sidebar-collapsed .tyfit-sidebar .tyfit-logo-img {
        width: 36px;
    }

    body.sidebar-collapsed .tyfit-sidebar .tyfit-wordmark {
        display: none;
    }

    body.sidebar-collapsed .tyfit-sidebar .sidebar-nav-item {
        position: relative;
    }

    body.sidebar-collapsed .tyfit-sidebar .sidebar-nav-item::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        background: #111827;
        color: #ffffff;
        border-radius: 8px;
        padding: 7px 10px;
        font-size: 12px;
        line-height: 1;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        box-shadow: 0 10px 20px rgba(17, 24, 39, 0.24);
        transition: opacity 0.16s ease;
        z-index: 30;
    }

    body.sidebar-collapsed .tyfit-sidebar .sidebar-nav-item[data-tool-tip]::after {
        content: attr(data-tool-tip);
    }

    body.sidebar-collapsed .tyfit-sidebar .sidebar-nav-item:hover::after,
    body.sidebar-collapsed .tyfit-sidebar .sidebar-nav-item:focus-visible::after {
        opacity: 1;
        visibility: visible;
    }
}

body.tyfit-calc-modal-open {
    overflow: hidden;
}

.tyfit-calc-modal[hidden] {
    display: none !important;
}

.tyfit-calc-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tyfit-calc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
}

.tyfit-calc-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: min(760px, calc(100svh - 40px));
    border-radius: 26px;
    border: 1px solid #e8ebf4;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tyfit-calc-modal-header {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #edf0f8;
    flex-shrink: 0;
}

.tyfit-calc-modal-header h4 {
    margin: 0;
    font-size: 18px;
    color: #1a1f36;
    font-weight: 500;
    text-align: center;
}

.tyfit-calc-back-btn {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #4f5970;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    padding: 0;
}

.tyfit-calc-back-btn:hover {
    box-shadow: none;
    transform: none;
    color: #2f3852;
}

.tyfit-calc-modal-body {
    padding: 20px 22px 24px;
    overflow: auto;
}

.tyfit-calc-modal-body p {
    margin: 0;
    font-size: 15px;
    color: #5b647b;
}

.tyfit-calc-intro {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.tyfit-calc-intro span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    background: #F1EEFF;
    color: #5B54E8;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tyfit-calc-intro svg {
    width: 13px;
    height: 13px;
}

.tyfit-calc-form {
    display: grid;
    gap: 12px;
}

.tyfit-calc-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tyfit-calc-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tyfit-calc-form label span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tyfit-calc-form input,
.tyfit-calc-form select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #E6EAF3;
    border-radius: 14px;
    background: #FFFFFF;
    color: #17172F;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 0 12px;
    outline: none;
}

.tyfit-calc-form input:focus,
.tyfit-calc-form select:focus {
    border-color: rgba(108, 99, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

.tyfit-calc-result {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #17133D 0%, #3E2FB4 100%);
    color: #FFFFFF;
    box-shadow: 0 16px 32px rgba(63, 47, 180, 0.22);
}

.tyfit-calc-result-main {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.tyfit-calc-result-main span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.tyfit-calc-result-main strong {
    color: #FFFFFF;
    font-size: 32px;
    line-height: 1;
    font-weight: 800;
    text-align: right;
}

.tyfit-calc-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.tyfit-calc-result-grid span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 700;
}

.tyfit-calc-result-grid strong {
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1.1;
}

@media (max-width: 767px) {
    .tyfit-calc-modal {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }

    .tyfit-calc-modal-dialog {
        width: 100%;
        max-width: none;
        height: 100svh;
        max-height: none;
        border-radius: 0;
        border: 0;
        display: flex;
        flex-direction: column;
    }

    .tyfit-calc-modal-header {
        padding: 16px;
        border-bottom: 1px solid #edf0f8;
        grid-template-columns: 32px 1fr 32px;
        gap: 10px;
    }

    .tyfit-calc-modal-body {
        padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
        flex: 1;
        overflow: auto;
    }

    .tyfit-calc-field-row {
        gap: 9px;
    }

    .tyfit-calc-form input,
    .tyfit-calc-form select {
        min-height: 48px;
        font-size: 16px;
    }

    .tyfit-calc-result-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .tyfit-calc-result-main strong {
        text-align: left;
        font-size: 30px;
    }
}

/* Keep sidebar look consistent on all pages, including portal/admin views. */
.tyfit-sidebar .sidebar-nav-item,
.tyfit-mobile-drawer .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    color: #1A1F36;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.tyfit-sidebar .sidebar-nav-item svg,
.tyfit-mobile-drawer .sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
    color: currentColor;
    flex-shrink: 0;
}

.tyfit-sidebar .sidebar-nav-item.active,
.tyfit-sidebar .sidebar-nav-item.is-active,
.tyfit-mobile-drawer .sidebar-nav-item.active,
.tyfit-mobile-drawer .sidebar-nav-item.is-active {
    background: #F1EEFF;
    color: #6C63FF;
    font-weight: 500;
}

.tyfit-sidebar .sidebar-nav-item:hover,
.tyfit-mobile-drawer .sidebar-nav-item:hover {
    background: #F7F5FF;
    color: #6C63FF;
}

/* ══════════════════════════════════════
   Profile page — typography & layout
═══════════════════════════════════════ */

body[data-page="profile"] {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Summary card — gradient bg + breathing room */
body[data-page="profile"] .tyfit-profile-summary-card {
    padding: 28px 28px 24px;
    background: linear-gradient(180deg, #EDEAFF 0%, rgba(237, 234, 255, 0.3) 100%);
    border: 1px solid #E3DDFC;
}

/* Name */
body[data-page="profile"] .tyfit-summary-user h3 {
    font-size: 20px;
    font-weight: 600;
}

body[data-page="profile"] .tyfit-mini-edit.tyfit-mini-edit--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #dfe5f3;
    background: #ffffff;
    color: #4b5875;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(20, 24, 40, 0.08);
}

body[data-page="profile"] .tyfit-mini-edit.tyfit-mini-edit--icon:hover {
    background: #f8faff;
    border-color: #cdd7ef;
    transform: translateY(-1px);
}

body[data-page="profile"] .tyfit-mini-edit.tyfit-mini-edit--icon svg {
    width: 17px;
    height: 17px;
    stroke-width: 2.1;
}

/* Email */
body[data-page="profile"] .tyfit-summary-user p {
    font-size: 14px;
    font-weight: 400;
    margin-top: 3px;
}

/* Avatar — slightly larger, cleaner radius */
body[data-page="profile"] .tyfit-summary-avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    border: 3px solid #EDE9FF;
    box-shadow: 0 4px 14px rgba(108, 99, 255, 0.15);
}

/* ── Meta row (Member Since / Diet Plan / Goal) ── */
body[data-page="profile"] .tyfit-summary-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 0;
    margin-top: 3px;
    gap: 0;
    background: #ffffff;
    border: 1px solid #e7ebf5;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(20, 24, 40, 0.06);
    overflow: hidden;
}

body[data-page="profile"] .tyfit-meta-item {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    padding: 14px 16px;
    min-height: 78px;
    min-width: 0;
}

body[data-page="profile"] .tyfit-meta-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: #edf1f7;
}

body[data-page="profile"] .tyfit-summary-meta {
    gap: 0;
}

body[data-page="profile"] .tyfit-meta-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
    line-height: 0;
}

body[data-page="profile"] .tyfit-meta-icon svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke-width: 2;
    color: #ffffff;
}

body[data-page="profile"] .tyfit-meta-item > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    min-width: 0;
}

body[data-page="profile"] .tyfit-meta-item span {
    font-size: 11px;
    font-weight: 500;
    color: #8c95a9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body[data-page="profile"] .tyfit-meta-item strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--tyfit-text);
}

/* Meta icon color variants */
.tyfit-meta-icon--calendar { background: #6C63FF; }
.tyfit-meta-icon--diet     { background: #14b87a; }
.tyfit-meta-icon--goal     { background: #f57c2a; }

/* ── Sections card ── */
body[data-page="profile"] .tyfit-profile-sections-card {
    padding: 24px;
}

body[data-page="profile"] .tyfit-section-copy strong {
    font-size: 14px;
    font-weight: 500;
    color: var(--tyfit-text);
}

body[data-page="profile"] .tyfit-section-copy span {
    font-size: 12px;
    font-weight: 400;
    color: var(--tyfit-text-secondary);
    margin-top: 1px;
}

body[data-page="profile"] .tyfit-section-row {
    padding: 18px 10px;
    gap: 14px;
}

body[data-page="profile"] .tyfit-section-icon {
    background: rgba(108, 99, 255, 0.09);
    color: #5f57e8;
}

/* ── Status icon colors (filled variants) ── */
body[data-page="profile"] .tyfit-status-icon.completed {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.12);
}

body[data-page="profile"] .tyfit-status-icon.warning {
    color: #B45309;
    background: rgba(245, 158, 11, 0.18);
}

/* ── Logout card alignment ── */
body[data-page="profile"] .tyfit-logout-card {
    padding: 16px 18px;
    border-radius: 22px;
    color: #DC2626;
    box-shadow: none;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

body[data-page="profile"] .tyfit-logout-card > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}

body[data-page="profile"] .tyfit-logout-card:hover {
    background: #fff7f8;
    border-color: #f6cfd5;
}

body[data-page="profile"] .tyfit-logout-card > i,
body[data-page="profile"] .tyfit-logout-card > span i {
    color: #ef7d8f;
}

body[data-page="profile"] .tyfit-logout-card > span svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    body[data-page="profile"] .tyfit-summary-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 14px;
    }

    body[data-page="profile"] .tyfit-meta-item {
        justify-content: flex-start;
        min-height: 64px;
        padding: 10px 8px;
        gap: 8px;
        border-bottom: none;
    }

    body[data-page="profile"] .tyfit-meta-item:not(:last-child)::after {
        top: 10px;
        bottom: 10px;
    }

    body[data-page="profile"] .tyfit-meta-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    body[data-page="profile"] .tyfit-meta-icon svg {
        width: 13px;
        height: 13px;
    }

    body[data-page="profile"] .tyfit-meta-item span {
        font-size: 9.5px;
        letter-spacing: 0.03em;
    }

    body[data-page="profile"] .tyfit-meta-item strong {
        font-size: 11.5px;
    }
}

/* ── Compact sidebar on short screens ── */
@media (max-height: 720px) {
    .sidebar-nav-item {
        height: 38px;
        font-size: 14px;
    }
    .sidebar-section-label {
        margin-top: 14px;
        margin-bottom: 4px;
        font-size: 10.5px;
    }
    .sidebar-logout {
        height: 38px;
        font-size: 14px;
    }
}

/* ── Home legal links + GDPR footer marks ── */
.tyfit-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 10px;
    margin: 24px auto -12px;
    padding: 0 14px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.tyfit-legal-links a {
    position: relative;
    color: #9AA3B2;
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s ease;
}

.tyfit-legal-links a:hover {
    color: #6C63FF;
}

.tyfit-legal-links a:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-left: 10px;
    border-radius: 999px;
    background: #D8DDE8;
    vertical-align: middle;
}

.tyfit-gdpr-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 0 16px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}

.tyfit-gdpr-signature {
    display: block;
    width: min(82vw, 360px);
    height: auto;
    opacity: 0.88;
    user-select: none;
    pointer-events: none;
    object-fit: contain;
}

@media (min-width: 768px) {
    .tyfit-legal-links {
        margin-top: 30px;
        margin-bottom: -14px;
    }

    .tyfit-gdpr-section {
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .tyfit-gdpr-signature {
        width: min(460px, 42vw);
    }
}

@media (max-width: 420px) {
    .tyfit-legal-links {
        max-width: 320px;
        gap: 8px 9px;
        margin-top: 22px;
    }

    .tyfit-legal-links a {
        font-size: 10px;
    }

    .tyfit-gdpr-signature {
        width: 88vw;
        max-width: 360px;
    }
}

/* ── Profile Completion Card (Premium Compact Ring) ─────────── */
.tp-profile-completion-card {
    margin: 10px 0;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #BDE8D1;
    background: linear-gradient(140deg, #FFFFFF 0%, #EFFAF4 42%, #E3F6EC 100%);
    box-shadow: 0 10px 24px rgba(34, 168, 97, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tp-profile-completion-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(34, 168, 97, 0.18);
}

/* 0–40 %: danger (red) */
.tp-profile-completion-card.is-danger {
    border-color: #F7D7D7;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF7F7 100%);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.08);
}

/* 41–70 %: warning (dark amber / yellow) */
.tp-profile-completion-card.is-warning {
    border-color: #FDE68A;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFDF0 100%);
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.08);
}

.tp-profile-completion-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-profile-completion-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #EAF8F1;
    color: #22A861;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tp-profile-completion-card.is-danger .tp-profile-completion-icon {
    background: #FFF0F0;
    color: #EF4444;
}

.tp-profile-completion-card.is-warning .tp-profile-completion-icon {
    background: #FEF9E7;
    color: #B45309;
}

.tp-profile-completion-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.3;
}

.tp-profile-completion-copy h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 500;
    color: #111827;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.tp-profile-completion-copy p {
    margin: 3px 0 0;
    font-size: 10px;
    line-height: 1.3;
    color: #667085;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-profile-completion-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tp-profile-ring-wrap {
    position: relative;
    width: 54px;
    height: 54px;
}

.tp-progress-ring {
    width: 54px;
    height: 54px;
    display: block;
}

.tp-progress-ring-bg {
    fill: none;
    stroke: #D9F2E5;
    stroke-width: 4;
}

.tp-progress-ring-progress {
    fill: none;
    stroke: #22A861;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.25s ease;
}

.tp-profile-completion-card.is-danger .tp-progress-ring-bg {
    stroke: #FBE8E8;
}

.tp-profile-completion-card.is-danger .tp-progress-ring-progress {
    stroke: #EF4444;
}

.tp-profile-completion-card.is-warning .tp-progress-ring-bg {
    stroke: #FDE68A;
}

.tp-profile-completion-card.is-warning .tp-progress-ring-progress {
    stroke: #B45309;
}

#profileCompletionPercent {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.tp-profile-chevron {
    width: 20px;
    height: 20px;
    color: #111827;
    opacity: 0.82;
}

@media (min-width: 640px) {
    .tp-profile-completion-card {
        margin: 18px 0 26px;
        padding: 14px 16px;
        border-radius: 20px;
        gap: 14px;
    }

    .tp-profile-completion-icon {
        width: 44px;
        height: 44px;
    }

    .tp-profile-completion-copy h3 {
        font-size: 15px;
    }

    .tp-profile-completion-copy p {
        font-size: 12.5px;
    }
}

/* ── Home hero card: today's check-in ring ──────────────────── */
.tyfit-hero-ring-wrap {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
    z-index: 2;
}

.tyfit-hero-ring {
    width: 104px;
    height: 104px;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(108, 99, 255, 0.22));
}

.tyfit-hero-ring text {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.tyfit-hero-ring-value {
    font-size: 20px;
    font-weight: 600;
    fill: #1A1F36;
}

.tyfit-hero-ring-label {
    font-size: 11px;
    font-weight: 500;
    fill: #5A5E73;
}

@media (max-width: 400px) {
    .tyfit-hero-ring {
        width: 86px;
        height: 86px;
    }
}

/* ── Journey visual polish overrides ───────────────────────── */
body[data-page="home"] .tyfit-journey-home-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.95fr);
    gap: 18px;
    align-items: stretch;
    min-height: 0;
    padding: 18px;
    border-radius: 24px;
    background:
        radial-gradient(520px 220px at 100% 0%, rgba(108, 99, 255, 0.14), rgba(108, 99, 255, 0) 62%),
        linear-gradient(135deg, #FFFFFF 0%, #F7F4FF 52%, #EEF5FF 100%);
    border: 1px solid rgba(108, 99, 255, 0.14);
    box-shadow: 0 16px 34px rgba(68, 56, 202, 0.1), 0 6px 16px rgba(15, 23, 42, 0.05);
}

body[data-page="home"] .tyfit-journey-home-card::before,
body[data-page="home"] .tyfit-journey-home-card::after {
    content: none;
    display: none;
}

body[data-page="home"] .tyfit-journey-home-card.is-loading {
    min-height: 178px;
}

body[data-page="home"] .tyfit-journey-home-title {
    font-size: 34px;
    line-height: 1.02;
    font-weight: 650;
    letter-spacing: 0;
}

body[data-page="home"] .tyfit-journey-home-text {
    max-width: 420px;
    font-size: 13px;
    line-height: 1.48;
    font-weight: 400;
}

body[data-page="home"] .tyfit-journey-home-art,
body[data-page="home"] .tyfit-journey-home-progress {
    min-height: 0;
    height: 100%;
    max-height: 245px;
    border-radius: 20px;
}

body[data-page="home"] .tyfit-journey-home-art {
    background: linear-gradient(145deg, #181344, #2B2375);
    border: 1px solid rgba(108, 99, 255, 0.12);
}

body[data-page="home"] .tyfit-journey-home-art img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
}

body[data-page="home"] .tyfit-journey-home-progress {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

body[data-page="home"] .tyfit-journey-stage-img {
    height: 112px;
    min-height: 0;
    border-radius: 15px;
    object-fit: cover;
}

body[data-page="home"] .tyfit-journey-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="home"] .tyfit-journey-meta-grid > span {
    padding: 9px 8px;
    min-width: 0;
}

body[data-page="home"] .tyfit-journey-meta-grid strong {
    overflow-wrap: anywhere;
}

.journey-page-head {
    margin-top: 2px;
}

.journey-hero-panel {
    min-height: 0;
    padding: 18px;
    border-radius: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    background:
        radial-gradient(420px 220px at 82% 10%, rgba(139, 124, 255, .34), rgba(139, 124, 255, 0) 70%),
        linear-gradient(135deg, #151235 0%, #2A236B 58%, #17172F 100%);
}

.journey-hero-copy h2 {
    font-size: clamp(30px, 4.2vw, 42px);
    letter-spacing: 0;
}

.journey-hero-art {
    min-height: 0;
    height: 220px;
    max-height: 240px;
    align-self: center;
    object-fit: cover;
}

.journey-stats-grid {
    gap: 10px;
}

.journey-stat-card {
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
}

.journey-stat-card strong {
    font-size: 24px;
    letter-spacing: 0;
}

.journey-card {
    border-radius: 18px;
}

@media (max-width: 760px) {
    body[data-page="home"] .tyfit-journey-home-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
        border-radius: 22px;
    }

    body[data-page="home"] .tyfit-journey-home-copy {
        gap: 10px;
    }

    body[data-page="home"] .tyfit-journey-home-title {
        font-size: 26px;
        line-height: 1.04;
        font-weight: 620;
    }

    body[data-page="home"] .tyfit-journey-home-actions {
        gap: 10px;
    }

    body[data-page="home"] .tyfit-journey-home-art {
        height: 132px;
        max-height: 132px;
    }

    body[data-page="home"] .tyfit-journey-home-progress {
        height: auto;
        max-height: none;
    }

    body[data-page="home"] .tyfit-journey-stage-img {
        height: 92px;
    }

    body[data-page="home"] .tyfit-journey-status-box {
        padding: 11px 12px;
        border-radius: 14px;
    }

    body[data-page="home"] .tyfit-journey-meta-grid {
        gap: 7px;
    }

    body[data-page="home"] .tyfit-journey-meta-grid > span {
        border-radius: 12px;
        padding: 8px 7px;
    }

    body[data-page="home"] .tyfit-journey-meta-grid span {
        font-size: 10px;
        letter-spacing: 0.05em;
    }

    body[data-page="home"] .tyfit-journey-meta-grid strong {
        font-size: 13px;
    }

    .journey-page-head h1 {
        font-size: 30px;
    }

    .journey-hero-panel {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
        border-radius: 22px;
    }

    .journey-hero-copy {
        gap: 10px;
    }

    .journey-hero-copy h2 {
        font-size: 30px;
    }

    .journey-hero-copy p {
        font-size: 14px;
    }

    .journey-hero-art {
        width: 100%;
        height: 150px;
        max-height: 150px;
        border-radius: 18px;
    }

    .journey-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .journey-stat-card {
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 12px;
    }

    .journey-stat-card span {
        grid-column: 2;
    }

    .journey-milestone {
        grid-template-columns: auto 58px minmax(0, 1fr);
    }

    .journey-milestone em {
        grid-column: 3;
        font-size: 12px;
        color: #6C63FF;
        width: fit-content;
    }

    .journey-milestone-thumb {
        width: 58px;
        height: 54px;
        border-radius: 14px;
    }

    .journey-calendar {
        gap: 7px;
    }

    .journey-day {
        padding: 9px 2px;
    }
}

@media (max-width: 420px) {
    body[data-page="home"] .tyfit-journey-home-card {
        padding: 15px;
    }

    body[data-page="home"] .tyfit-journey-home-title {
        font-size: 24px;
        line-height: 1.05;
    }

    body[data-page="home"] .tyfit-journey-home-text {
        font-size: 12px;
    }

    body[data-page="home"] .tyfit-journey-home-art {
        height: 118px;
        max-height: 118px;
    }

    body[data-page="home"] .tyfit-journey-home-actions .tyfit-hero-cta {
        width: 100%;
        justify-content: center;
    }

    body[data-page="home"] .tyfit-journey-secondary-link {
        width: 100%;
        text-align: center;
    }

    body[data-page="home"] .tyfit-journey-stage-row {
        align-items: flex-start;
    }

    body[data-page="home"] .tyfit-journey-stage-row em {
        max-width: 44%;
        text-align: center;
    }

    .journey-hero-art {
        height: 132px;
        max-height: 132px;
    }

    .journey-stats-grid {
        grid-template-columns: 1fr;
    }

    .journey-milestone {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .journey-milestone-thumb {
        display: none;
    }

    .journey-milestone em {
        grid-column: 2;
    }
}

/* Home onboarding hero matched to the mountain focus design. */
body[data-page="home"] .tyfit-journey-home-card.is-onboarding {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 292px;
    padding: 26px 28px;
    border-radius: 26px;
    background: #F7F1FF;
    border: 1px solid rgba(139, 124, 255, 0.24);
    box-shadow: 0 18px 44px rgba(108, 99, 255, 0.12), 0 8px 20px rgba(96, 106, 178, 0.08);
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding::before,
body[data-page="home"] .tyfit-journey-home-card.is-onboarding::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding::before {
    background-image: url("../assets/gamification/home-hero-mountain-1200.jpg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
    transform: scale(1);
    transform-origin: center right;
    filter: saturate(1.03);
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 28%, rgba(0, 0, 0, 0.55) 52%, rgba(0, 0, 0, 0.9) 68%, #000 82%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 28%, rgba(0, 0, 0, 0.55) 52%, rgba(0, 0, 0, 0.9) 68%, #000 82%);
    opacity: 1;
    z-index: -2;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding::after {
    background:
        linear-gradient(90deg, rgba(247, 241, 255, 0.98) 0%, rgba(241, 238, 255, 0.93) 36%, rgba(236, 244, 255, 0.6) 64%, rgba(236, 244, 255, 0.26) 78%, rgba(236, 244, 255, 0.08) 90%, rgba(236, 244, 255, 0.02) 100%),
        radial-gradient(420px 220px at 16% 52%, rgba(243, 236, 255, 0.54) 0%, rgba(243, 236, 255, 0) 74%);
    z-index: -1;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-copy {
    width: min(100%, 540px);
    height: 100%;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    gap: 18px;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-art {
    display: none;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge {
    height: 34px;
    padding: 0 16px;
    border-color: rgba(108, 99, 255, 0.12);
    background: rgba(241, 238, 255, 0.86);
    color: #5146E8;
    font-size: 10px;
    font-weight: 800;
    box-shadow: none;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge {
        height: 36px;
        padding: 0 17px;
        gap: 8px;
        font-size: 12px;
        font-weight: 720;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge svg {
        width: 17px;
        height: 17px;
    }
}

@media (min-width: 1024px) {
    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge {
        height: 40px;
        padding: 0 20px;
        font-size: 13px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge svg {
        width: 18px;
        height: 18px;
    }
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-title {
    display: grid;
    gap: 2px;
    max-width: 100%;
    color: #4B5563;
    font-size: clamp(22px, 7vw, 30px);
    line-height: 0.98;
    font-weight: 600;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-title span {
    display: block;
    color: var(--tyfit-primary);
    font-size: calc(1em + 1px);
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-actions {
    align-items: center;
    flex-wrap: nowrap;
    gap: 18px;
    width: 100%;
    min-width: 0;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chips {
    width: 100%;
    max-width: 520px;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 12px;
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-cta {
    display: inline-flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 4px;
    width: min(100%, 250px);
    height: 50px;
    padding: 0 20px;
    border-radius: 16px;
    background: linear-gradient(145deg, #6C63FF, #554BF5) !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 12px 22px rgba(90, 45, 246, 0.22);
}

body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-cta svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    stroke-width: 2;
}

@media (min-width: 768px) {
    body[data-page="home"] .tyfit-journey-home-card.is-onboarding {
        min-height: 322px;
        padding: 30px 34px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding::before {
        background-image: url("../assets/gamification/home-hero-mountain-1200.jpg");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: right center;
        transform: scale(1);
        opacity: 1;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-copy {
        width: min(610px, 68%);
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 767px) {
    body[data-page="home"] .tyfit-journey-home-card.is-onboarding {
        min-height: 200px;
        height: 200px;
        padding: 15px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding::before {
        background-size: contain;
        background-position: right center;
        transform: scale(1);
        opacity: 1;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding::after {
        background:
            linear-gradient(90deg, rgba(247, 241, 255, 0.98) 0%, rgba(241, 238, 255, 0.9) 34%, rgba(236, 244, 255, 0.48) 64%, rgba(236, 244, 255, 0.04) 100%),
            radial-gradient(300px 190px at 18% 54%, rgba(243, 236, 255, 0.5) 0%, rgba(243, 236, 255, 0) 74%);
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-copy {
        width: 100%;
        justify-content: center;
        gap: 7px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge {
        height: 26px;
        padding: 0 10px;
        font-size: 10px;
        font-weight: 700;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-badge svg {
        width: 12px;
        height: 12px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-title {
        max-width: 100%;
        font-size: 18px;
        line-height: 1.02;
        font-weight: 620;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chips {
        max-width: 100%;
        gap: 5px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chip {
        height: 24px;
        gap: 4px;
        padding: 0 7px;
        font-size: 10px;
        white-space: nowrap;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chip img {
        width: 11px;
        height: 11px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-actions {
        gap: 7px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-cta {
        width: auto;
        height: 34px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 11.5px;
        font-weight: 600;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-cta svg {
        width: 13px;
        height: 13px;
    }

}

@media (max-width: 420px) {
    body[data-page="home"] .tyfit-journey-home-card.is-onboarding {
        min-height: 175px;
        height: 175px;
        padding: 13px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-copy {
        width: 100%;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-title {
        max-width: 100%;
        font-size: 17px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chips {
        max-width: 100%;
        gap: 6px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chip {
        height: 22px;
        gap: 4px;
        padding: 0 6px;
        border-radius: 9px;
        font-size: 9.5px;
        white-space: nowrap;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chip img {
        width: 10px;
        height: 10px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-actions {
        flex-wrap: nowrap;
        gap: 6px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-actions .tyfit-hero-cta {
        width: auto;
        justify-content: center;
        height: 32px;
        padding: 0 10px;
        font-size: 11px;
    }

}

@media (max-width: 360px) {
    body[data-page="home"] .tyfit-journey-home-card.is-onboarding {
        min-height: 176px;
        height: 176px;
        padding: 12px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chips {
        gap: 4px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chip {
        height: 20px;
        padding: 0 5px;
        font-size: 8.5px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-chip img {
        width: 9px;
        height: 9px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-journey-home-title {
        font-size: 16px;
    }

    body[data-page="home"] .tyfit-journey-home-card.is-onboarding .tyfit-hero-cta {
        height: 30px;
        padding: 0 9px;
        font-size: 10.5px;
    }

}
