:root {
    --bg: #F2F2F7;
    --card: #FFFFFF;
    --border: #E5E5EA;
    --session-line: #f0f0f0;
    --text: #1C1C1E;
    --text-secondary: #6C6C70;
    --text-tertiary: #6C6C70;
    --label-secondary: var(--text-secondary);
    --placeholder-muted: var(--text-tertiary);
    --primary: #FFD60A;
    --primary-light: #FFF9E0;
    --pg-coach-plan-bg: #FFF8E7;
    --brand-green: #30D158;
    --brand-blue: #38BDF8;
    --brand-orange: #FF9F0A;
    --brand-red: #FF3B30;
    --brand-purple: #A855F7;
    --success: #30D158;
    --warning: #FF9F0A;
    --danger: #FF3B30;
    --gold: #FFD60A;
    --btn-on-primary: #111111;
    --btn-secondary-bg: #ffffff;
    --btn-secondary-text: #1C1C1E;
    --btn-secondary-border: #e5e5ea;
    --nav-pill-bg: rgba(255, 255, 255, 0.78);
    --nav-pill-border: rgba(0, 0, 0, 0.06);
    --nav-bar-height: 67px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --nav-safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-bottom-inset: calc(var(--nav-bar-height) + var(--nav-safe-bottom));
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --bar-calories: #FFD60A;
    --bar-protein: #38BDF8;
    --bar-carbs: #30D158;
    --bar-fat: #FF9F0A;
    --bar-steps: #38bdf8;
    --bar-water: #38bdf8;
    --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --font-page-greeting: 700 28px/1.2 var(--font-stack);
    --font-card-title: 700 20px/1.25 var(--font-stack);
    --font-body: 400 14px/1.5 var(--font-stack);
    --font-stat-number: 700 32px/1.15 var(--font-stack);
    --font-section-header: 600 11px/1.35 var(--font-stack);
    --font-stat-label: 500 11px/1.35 var(--font-stack);
    --font-button: 600 16px/1.2 var(--font-stack);
    --font-nav-label: 400 11px/1.25 var(--font-stack);
    --radius-sm: 16px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --pg-card-bg: var(--card);
    --pg-card-border: #E5E5E5;
    --pg-card-radius: 16px;
    --pg-card-shadow: none;
    --pg-icon-well-bg: #F2F2F7;
    --pg-icon-well-fg: #1C1C1E;
    --pg-field-bg: #F2F2F7;
    --pg-field-fg: #1C1C1E;
    --space-card: 16px;
    --space-card-y: 8px;
    --space-card-compact: 12px;
}

/* In-app dark mode only (body.dark / body.dark-mode) — never OS prefers-color-scheme */
body.dark,
body.dark-mode {
    --bg: #0A0A0A;
    --card: #1A1A1A;
    --border: #2A2A2A;
    --session-line: #2A2A2A;
    --text: #ffffff;
    --text-secondary: #8E8E93;
    --text-tertiary: #8E8E93;
    --label-secondary: var(--text-secondary);
    --placeholder-muted: var(--text-tertiary);
    --primary: #ffd60a;
    --primary-light: #3a3420;
    --btn-on-primary: #111111;
    --btn-secondary-bg: #1E1E1E;
    --btn-secondary-text: #ffffff;
    --btn-secondary-border: #2A2A2A;
    --nav-pill-bg: rgba(26, 26, 26, 0.92);
    --nav-pill-border: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.45);
    --pg-card-bg: #1A1A1A;
    --pg-card-border: #3A3A3C;
    --pg-card-shadow: none;
    --pg-icon-well-bg: #2C2C2E;
    --pg-icon-well-fg: #FFFFFF;
    --pg-field-bg: #2C2C2E;
    --pg-field-fg: #FFFFFF;
}

/* iOS WKWebView / Safari: home-indicator inset is ~34px. That whole value was
   painted as empty space under tab labels (Android inset is ~0, so it looked fine).
   Pull labels 12px closer; floor at 0 so iPhone SE / Android are unchanged. */
@supports (-webkit-touch-callout: none) {
    :root {
        --nav-safe-bottom: max(0px, calc(env(safe-area-inset-bottom, 0px) - 12px));
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    color-scheme: light;
}
body.dark,
body.dark-mode {
    color-scheme: dark;
}
html,
body,
button,
input,
select,
textarea {
    font-family: var(--font-stack);
}
input,
select {
    font-size: 16px;
}
button {
    min-width: 44px;
    min-height: 44px;
}
body.dark #pg-boot-loader,
body.dark-mode #pg-boot-loader,
html.pg-theme-dark #pg-boot-loader,
#pg-boot-loader.pg-boot-loader--dark {
    background-color: #0A0A0A;
    color: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
    html:not(.pg-theme-resolved) #pg-boot-loader {
        background-color: #0A0A0A;
        color: #FFFFFF;
    }
}
body {
    background: var(--bg);
    color: var(--text);
    font: var(--font-body);
    padding-top: var(--safe-area-top);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: background 0.3s;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}
html.pg-auth-chrome-light,
body.pg-auth-chrome-light {
    background: #FFFFFF !important;
}
body.pg-auth-chrome-light {
    padding-bottom: 0 !important;
}
body.pg-auth-chrome-light::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: max(24px, env(safe-area-inset-bottom, 0px));
    background: #FFFFFF;
    pointer-events: none;
    z-index: 999;
}
/* In-app legal docs (Privacy / Terms) */
.pg-legal-doc {
    position: fixed;
    inset: 0;
    z-index: 110000;
    background: var(--bg);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    max-width: 100vw;
    padding: 0;
}
.pg-legal-doc-inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px calc(28px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}
.pg-legal-doc-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 4px 0 0;
    background: var(--bg);
}
.pg-legal-doc-heading {
    flex: 1;
    min-width: 0;
    /* Keep the title centered on the 44px back button: (44 - 18px * 1.2) / 2 */
    padding-top: calc((44px - 21.6px) / 2);
}
.pg-legal-updated {
    margin: 4px 0 0;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--label-secondary);
    line-height: 1.2;
}
.pg-legal-doc-back {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    padding: 6px 10px;
    margin: 0 0 0 -6px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.pg-legal-doc-back:active {
    opacity: 0.7;
}
.pg-legal-doc-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: 0;
}
.pg-legal-doc-body {
    min-height: 40vh;
}

#auth-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 100000;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100dvh;
    padding: 0;
    padding-top: var(--safe-area-top);
    background: #FFFFFF;
    box-sizing: border-box;
    overflow: hidden;
}
.auth-modal-wrapper {
    width: 100%;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
}
.auth-card {
    width: 100%;
    max-width: none;
    background: #FFFFFF;
    border: none;
    border-radius: 0;
    padding: 24px;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    flex: 1;
}
.auth-card h1, .auth-card h2 {
    color: #1C1C1E;
    font: var(--font-card-title);
    margin-bottom: 8px;
}
.auth-card p {
    color: #636366;
    font: var(--font-body);
    margin-bottom: 16px;
}
.auth-card input[type="email"],
.auth-card input[type="password"] {
    background: #FFFFFF;
    border: 1.5px solid #E5E5EA;
    border-radius: 12px;
    color: #1C1C1E;
    padding: 12px;
    font: var(--font-body);
    font-size: 16px;
    width: 100%;
    margin-bottom: 10px;
    font-family: inherit;
    box-sizing: border-box;
}
.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus {
    outline: none;
    border-color: #FFD60A;
    box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.18);
}
.auth-card input::placeholder {
    color: #6C6C70;
}
.btn-oauth {
    width: 100%;
    border-radius: 12px;
    border: 1.5px solid #E5E5EA;
    background: #FFFFFF;
    color: #1C1C1E;
    padding: 12px 14px;
    font: var(--font-button);
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}
.btn-oauth:hover {
    border-color: #D1D1D6;
    background: #F8F8FA;
    color: #1C1C1E;
}
.btn-oauth:active {
    opacity: 0.9;
}
#auth-login-card.auth-card {
    padding: 0;
    overflow: hidden;
}
.auth-check-email-panel {
    padding: 24px;
    box-sizing: border-box;
}
.auth-screen-shell {
    overflow: hidden;
    border-radius: 0;
}
.auth-screen-track {
    display: flex;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.28s ease;
}
#auth-login-card.auth-signup-mode .auth-screen-track {
    transform: translateX(-50%);
}
#auth-login-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#auth-login-card .auth-screen-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.auth-screen {
    width: 50%;
    flex: 0 0 50%;
    padding: 24px;
    box-sizing: border-box;
}
.auth-login-logo {
    width: 100%;
    height: 225px;
    display: block;
    margin: 6px 0 12px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
}
.auth-back-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #1C1C1E;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 2px 0 8px;
}
.auth-screen-title {
    font-size: 28px;
    font-weight: 700;
    color: #1C1C1E;
    margin: 0 0 6px;
}
.auth-screen-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: #6C6C70;
    margin: 0 0 18px;
}
.auth-field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6C6C70;
    margin-bottom: 6px;
}
.auth-hint-copy {
    display: none;
    font-size: 12px;
    line-height: 1.35;
    color: #6C6C70;
    margin: -2px 0 12px;
}
.auth-forgot-wrap {
    text-align: center;
    margin: -2px 0 12px;
}
.auth-inline-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: #A855F7;
    cursor: pointer;
}
.auth-primary-btn,
.auth-outline-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
}
.auth-primary-btn {
    background: #FFD60A;
    color: #111111;
    border: 1px solid #FFD60A;
}
.auth-primary-btn:active {
    transform: scale(0.98);
}
.auth-primary-btn:disabled {
    background: #E5E5EA;
    border-color: #E5E5EA;
    color: #6C6C70;
    cursor: default;
    transform: none;
}
.auth-outline-btn {
    background: #000000;
    color: #FFFFFF;
    border: none;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.auth-outline-btn:hover {
    background: #111111;
}
.auth-outline-btn-base {
    color: #FFFFFF;
}
.auth-outline-btn-accent {
    color: #FFD60A;
}
.auth-divider {
    position: relative;
    text-align: center;
    margin: 14px 0;
}
.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid var(--border);
}
.auth-divider span {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 10px;
    background: #FFFFFF;
    color: #6C6C70;
    font: var(--font-section-header);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.auth-signup-divider {
    margin-top: 16px;
}
.auth-inline-error {
    display: none;
    color: #FF3B30;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    margin: 0 24px 20px;
}
.auth-confirm-error {
    min-height: 18px;
    margin: -2px 0 12px;
    color: #FF3B30;
    font-size: 12px;
    line-height: 1.35;
}
.auth-legal-copy,
.auth-signup-legal {
    font-size: 11px;
    line-height: 1.35;
    color: #6C6C70;
    text-align: center;
    margin-top: 12px;
}
.auth-signup-legal {
    margin: 4px 0 14px;
    text-align: left;
}
:is(body.dark, body.dark-mode) .auth-card p,
:is(body.dark, body.dark-mode) .auth-card input::placeholder,
:is(body.dark, body.dark-mode) .auth-screen-subtitle,
:is(body.dark, body.dark-mode) .auth-field-label,
:is(body.dark, body.dark-mode) .auth-hint-copy,
:is(body.dark, body.dark-mode) .auth-primary-btn:disabled,
:is(body.dark, body.dark-mode) .auth-divider span,
:is(body.dark, body.dark-mode) .auth-legal-copy,
:is(body.dark, body.dark-mode) .auth-signup-legal {
    color: var(--text-secondary);
}
.auth-secondary-link {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 0 0;
    border: none;
    background: transparent;
    color: #A855F7;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.auth-bridge-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    #auth-modal {
        min-height: 100dvh;
        height: 100dvh;
        padding: 0;
        padding-top: var(--safe-area-top);
        align-items: stretch;
        justify-content: flex-start;
        overflow: hidden;
        box-sizing: border-box;
    }
    .auth-modal-wrapper {
        padding: 0;
    }
    .auth-card {
        width: 100%;
        max-width: none;
        border-radius: 0;
        margin: 0;
    }
    .auth-card h2 {
        font: var(--font-card-title);
    }
    .auth-card p {
        font: var(--font-body);
        line-height: 1.5;
    }
    .auth-primary-btn,
    .auth-outline-btn,
    .btn-oauth {
        min-height: 44px;
        width: 100%;
        box-sizing: border-box;
    }
    .auth-screen {
        padding: 24px 20px;
    }
    .auth-inline-error {
        margin: 0 16px 16px;
    }
}

/* HEADER */
.header { background: var(--bg); padding: 16px 20px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--border); }
.header h1 { color: var(--text); font: var(--font-card-title); letter-spacing: 0.08em; text-transform: uppercase; }
.header-greeting { color: var(--text-secondary); font: var(--font-body); text-align: right; max-width: 55%; }

/* SCREENS
   Top sits below body safe-area (notch/status bar). Safe-area itself is
   body padding-top: var(--safe-area-top) — do not reduce that.
   Home: 6px. Train / Nutrition / Progress / Profile: 2px.
   Profile sub-menus use #profile-v2-sheet-host (not .screen) — see toolbar rule. */
.screen { display: none; padding: 4px 16px 8px; opacity: 0; }
#screen-home {
    padding-top: 6px;
}
body:has(#screen-home.active) {
    overflow: hidden;
}
#screen-home.active {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--safe-area-top));
    max-height: calc(100dvh - var(--safe-area-top));
    overflow: hidden;
    box-sizing: border-box;
    padding: 2px 16px 0;
    padding-bottom: var(--nav-bottom-inset);
}
#screen-train,
#screen-calories,
#screen-progress,
#screen-profile {
    padding-top: 2px; /* below body safe-area — same as other main tabs */
}
#screen-train.active {
    padding-top: 2px;
}
.screen.active { display: block; animation: screenFadeIn 0.15s ease forwards; }
#screen-home.active,
#screen-train.active,
#screen-progress.active,
#screen-profile.active {
    padding-bottom: calc(var(--nav-bottom-inset) + 8px);
}
#screen-calories.active {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--safe-area-top));
    max-height: calc(100dvh - var(--safe-area-top));
    overflow: hidden;
    box-sizing: border-box;
    padding-bottom: var(--nav-bottom-inset);
}
#screen-calories.active > div,
#nutrition-tab-content {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
#screen-home.active {
    padding-bottom: 0;
}
body:has(#screen-paywall.active) .nav,
body:has(#screen-manage-subscription.active) .nav,
body:has(#screen-coach-subscribe.active) .nav {
    display: none !important;
}
html:has(#screen-paywall.active),
html:has(#screen-coach-subscribe.active),
body:has(#screen-paywall.active),
body:has(#screen-coach-subscribe.active) {
    overflow: hidden;
    overscroll-behavior: none;
}
#screen-paywall.active {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--safe-area-top) - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    max-height: calc(100dvh - var(--safe-area-top) - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    padding: 0;
    background: #F2F2F7;
    color: #1C1C1E;
}
:is(body.dark, body.dark-mode) #screen-paywall.active {
    background: #0A0A0A;
    color: #ffffff;
}
.paywall-scroll {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding: 0 16px 280px;
    box-sizing: border-box;
}
.paywall-header {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 52px 8px;
}
.paywall-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: #1C1C1E;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
:is(body.dark, body.dark-mode) .paywall-close {
    color: #ffffff;
}
.paywall-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #1C1C1E;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
:is(body.dark, body.dark-mode) .paywall-brand {
    color: #ffffff;
}
.paywall-brand-pro {
    background: #FFD60A;
    color: #1C1C1E;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
}
#paywall-standard-header,
#coach-paywall-standard-header {
    flex-shrink: 0;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}
#paywall-standard-header [data-pg-standard-header="1"] > p:first-of-type,
#coach-paywall-standard-header [data-pg-standard-header="1"] > p:first-of-type {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.paywall-headline {
    margin: 0;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    color: #1C1C1E;
}
:is(body.dark, body.dark-mode) .paywall-headline {
    color: #ffffff;
}
.paywall-subhead {
    margin: 10px 0 0;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: #6C6C70;
}
.paywall-feature-card {
    margin-top: 20px;
    background: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    overflow: hidden;
}
:is(body.dark, body.dark-mode) .paywall-feature-card,
:is(body.dark, body.dark-mode) .paywall-compare-card,
:is(body.dark, body.dark-mode) .paywall-faq-list,
:is(body.dark, body.dark-mode) .paywall-review {
    background: #1C1C1E;
    border-color: #3A3A3C;
}
.paywall-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}
.paywall-feature + .paywall-feature {
    border-top: 1px solid #E5E5E5;
}
:is(body.dark, body.dark-mode) .paywall-feature + .paywall-feature {
    border-top-color: #3A3A3C;
}
.paywall-feature-well {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: #FEF3C7;
    color: #1C1C1E;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.paywall-hear {
    display: block;
    width: 100%;
    margin: 18px 0 0;
    padding: 0;
    border: none;
    background: none;
    color: #6C6C70;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
    min-height: 0;
}
.paywall-hear[hidden],
#paywall-members[hidden] {
    display: none !important;
}
.paywall-feature-icon {
    flex-shrink: 0;
    width: 28px;
    font-size: 20px;
    line-height: 1.2;
    text-align: center;
}
.paywall-feature-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #1C1C1E;
}
:is(body.dark, body.dark-mode) .paywall-feature-title {
    color: #ffffff;
}
.paywall-feature-sub {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #6C6C70;
}
.paywall-compare-section {
    margin-top: 28px;
    text-align: center;
}
.paywall-compare-card {
    margin-top: 0;
    text-align: left;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
}
:is(body.dark, body.dark-mode) .paywall-compare-card {
    background: #1C1C1E;
    border-color: #3A3A3C;
}
.paywall-compare {
    width: 100%;
    border-collapse: collapse;
}
.paywall-compare th,
.paywall-compare td {
    padding: 11px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: #1C1C1E;
}
:is(body.dark, body.dark-mode) .paywall-compare th,
:is(body.dark, body.dark-mode) .paywall-compare td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.paywall-compare tr:last-child th,
.paywall-compare tr:last-child td {
    border-bottom: none;
}
.paywall-compare th[scope="row"] {
    width: auto;
    padding-left: 14px;
    text-align: left;
    font-weight: 600;
}
.paywall-compare thead th {
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0;
}
.paywall-compare thead th:nth-child(2),
.paywall-compare td:nth-child(2),
.paywall-compare thead th:nth-child(3),
.paywall-compare td:nth-child(3) {
    width: 56px;
}
.paywall-compare th.paywall-compare-free,
.paywall-compare th.paywall-compare-label {
    color: #6C6C70;
    font-weight: 700;
}
.paywall-compare th.paywall-compare-label {
    padding-left: 14px;
    text-align: left;
    font-weight: 600;
}
.paywall-social .paywall-faq-title,
.paywall-compare-section .paywall-faq-title {
    margin-top: 8px;
}
.paywall-compare th.is-pro-feature {
    font-weight: 700;
}
.paywall-compare thead th:nth-child(3),
.paywall-compare td:nth-child(3) {
    width: 72px;
    background: #FFF8E7;
}
:is(body.dark, body.dark-mode) .paywall-compare thead th:nth-child(3),
:is(body.dark, body.dark-mode) .paywall-compare td:nth-child(3) {
    background: #2C2A1A;
}
.paywall-row-note {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    color: #6C6C70;
}
.coach-paywall-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #ffffff;
    color: #1C1C1E;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
:is(body.dark, body.dark-mode) .coach-paywall-plan {
    background: #1C1C1E;
    border-color: #3A3A3C;
    color: #ffffff;
}
.paywall-compare-note,
.paywall-compare-subnote,
.paywall-plan-note {
    margin: 12px 0 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #1C1C1E;
}
.paywall-compare-subnote,
.paywall-plan-note {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
    color: #6C6C70;
}
:is(body.dark, body.dark-mode) .paywall-compare-note {
    color: #ffffff;
}
.paywall-pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    background: #F5C518;
    color: #1C1C1E;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
}
.paywall-free-mark {
    color: #1C1C1E;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
:is(body.dark, body.dark-mode) .paywall-free-mark {
    color: #ffffff;
}
.paywall-free-dash {
    color: #6C6C70;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}
.paywall-pro-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFD60A;
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.paywall-pro-tick::before {
    content: '✓';
}
:is(body.dark, body.dark-mode) .paywall-compare th.paywall-compare-free,
:is(body.dark, body.dark-mode) .paywall-compare th.paywall-compare-label {
    color: #6C6C70;
}
:is(body.dark, body.dark-mode) .paywall-compare th.paywall-compare-pro {
    color: #F5C518;
}
.paywall-mark {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.paywall-mark.is-yes {
    color: #30D158;
}
.paywall-mark.is-no {
    color: #6C6C70;
}
.paywall-mark.is-pro {
    color: #F5C518;
}
.paywall-social {
    margin-top: 28px;
    text-align: center;
}
.paywall-stars {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0;
    color: #F5C518;
}
.paywall-review-wrap {
    text-align: left;
}
#paywall-reviews,
#coach-paywall-reviews {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}
#paywall-reviews::-webkit-scrollbar,
#coach-paywall-reviews::-webkit-scrollbar {
    display: none;
}
.paywall-review {
    flex: 0 0 100%;
    box-sizing: border-box;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 14px;
}
.paywall-review-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
}
.paywall-review-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #E5E5EA;
    color: #1C1C1E;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.paywall-review-name {
    font-size: 14px;
    font-weight: 700;
    color: #1C1C1E;
}
.paywall-review-stars {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    color: #F5C518;
}
.paywall-review p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #1C1C1E;
}
.paywall-review-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.paywall-review-dots button {
    width: 7px;
    height: 7px;
    min-width: 7px;
    min-height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #D1D1D6;
    cursor: pointer;
}
.paywall-review-dots button.is-active {
    background: #F5C518;
}
/* Dark mode: same card, text and surface values the other paywall cards use. Stars and the active dot stay yellow. */
:is(body.dark, body.dark-mode) .paywall-review-name,
:is(body.dark, body.dark-mode) .paywall-review p {
    color: #ffffff;
}
:is(body.dark, body.dark-mode) .paywall-review-avatar {
    background: #3A3A3C;
    color: #ffffff;
}
:is(body.dark, body.dark-mode) .paywall-review-dots button {
    background: #3A3A3C;
}
:is(body.dark, body.dark-mode) .paywall-review-dots button.is-active {
    background: #F5C518;
}
.paywall-faq {
    margin-top: 28px;
    text-align: center;
}
.paywall-faq-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    color: #1C1C1E;
}
:is(body.dark, body.dark-mode) .paywall-faq-title {
    color: #ffffff;
}
.paywall-faq-sub {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: #6C6C70;
}
.paywall-faq-list {
    text-align: left;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
    padding: 0 16px;
}
:is(body.dark, body.dark-mode) .paywall-faq-list {
    background: #1C1C1E;
    border-color: #3A3A3C;
}
.paywall-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 14px 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    color: #1C1C1E;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    min-height: 0;
}
.paywall-faq-list .paywall-faq-q:first-child {
    border-top: none;
}
:is(body.dark, body.dark-mode) .paywall-faq-q {
    color: #ffffff;
    border-top-color: #3A3A3C;
}
.paywall-faq-q::after {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    transition: transform 0.15s ease;
}
.paywall-faq-q.is-open::after {
    transform: rotate(180deg);
}
.paywall-faq-a p {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #6C6C70;
    text-align: left;
}
.paywall-faq-list details + details {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
:is(body.dark, body.dark-mode) .paywall-faq-list details + details {
    border-top-color: rgba(255, 255, 255, 0.08);
}
.paywall-faq-list summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #1C1C1E;
    cursor: pointer;
    list-style: none;
}
:is(body.dark, body.dark-mode) .paywall-faq-list summary {
    color: #ffffff;
}
.paywall-faq-list summary::-webkit-details-marker {
    display: none;
}
.paywall-faq-list summary::after {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.paywall-faq-list details[open] summary::after {
    content: '';
    transform: rotate(180deg);
}
.paywall-faq-list details p {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #6C6C70;
}
.paywall-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: #F2F2F7;
    padding: 12px 16px env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
}
:is(body.dark, body.dark-mode) .paywall-dock {
    background: #0A0A0A;
}
.paywall-dock > * {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.paywall-plans {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.paywall-plan-slot {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
}
.paywall-save-pill {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    padding: 3px 8px;
    border-radius: 20px;
    background: #FFD60A;
    color: #1C1C1E;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}
.paywall-plan {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px 8px 18px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    background: #ffffff;
    color: #1C1C1E;
    cursor: pointer;
    text-align: center;
}
:is(body.dark, body.dark-mode) .paywall-plan {
    background: #1C1C1E;
    border-color: #3A3A3C;
    color: #ffffff;
}
.paywall-plan.is-selected {
    border-color: #FFD60A;
    box-shadow: 0 0 0 1px #FFD60A;
}
.paywall-plan-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}
.paywall-plan-price {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    color: #6C6C70;
}
:is(body.dark, body.dark-mode) .paywall-plan-price {
    color: rgba(255, 255, 255, 0.62);
}
.paywall-plan-sub {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    color: #6C6C70;
}
#paywall-cta,
#coach-paywall-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    min-height: 52px;
    padding: 14px 48px;
    border: none;
    border-radius: 14px;
    background: #FFD60A;
    color: #111111;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}
.paywall-cta-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #111111;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.paywall-dock-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-top: 10px;
    text-align: center;
}
.paywall-dock-links button {
    min-width: 0;
    min-height: 32px;
    padding: 4px 2px;
    border: none;
    background: transparent;
    color: #007AFF;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.paywall-cancel-note {
    margin: 0;
    color: #6C6C70;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
}
#paywall-restore,
#coach-paywall-restore {
    display: none;
    width: 100%;
    margin: 10px 0 0;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 8px 4px;
    border: none;
    background: transparent;
    color: #007AFF;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
#paywall-restore[hidden],
#coach-paywall-restore[hidden] {
    display: none !important;
}
.paywall-help {
    margin: 22px 0 0;
    text-align: center;
}
.paywall-help-issue {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #888;
    text-align: center;
}
.paywall-help-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 0;
    padding: 0;
    border: none;
    background: none;
    color: #007AFF;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    min-width: 0;
    min-height: 0;
    height: auto;
}
.paywall-help-legal {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #6C6C70;
    text-align: center;
}
.paywall-help-legal a {
    color: #6C6C70;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
}

#screen-manage-subscription.active {
    min-height: 100dvh;
    padding-top: 2px;
    background: var(--bg);
}
#screen-manage-subscription .manage-sub-page {
    padding: 0 0 28px;
    background: var(--bg);
}
#screen-manage-subscription .manage-sub-footer {
    margin-top: 12px;
}
#screen-manage-subscription .manage-sub-legal a {
    text-decoration: underline;
}
.manage-sub-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 4px 0 28px;
}
.manage-sub-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 0 4px;
}
.manage-sub-back {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}
.manage-sub-header h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    text-align: center;
}
.manage-sub-lead {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    color: #8E8E93;
}
.manage-sub-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.manage-sub-plan-card,
.manage-sub-restore {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    text-align: left;
    min-height: 0;
}
.manage-sub-plan-card {
    padding: 14px 16px 12px;
}
button.manage-sub-plan-card,
.manage-sub-restore {
    cursor: pointer;
}
.manage-sub-plan-card.is-current {
    background: #FFF8E7;
}
:is(body.dark, body.dark-mode) .manage-sub-plan-card,
:is(body.dark, body.dark-mode) .manage-sub-restore {
    border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .manage-sub-plan-card.is-current {
    background: #2C2A1A;
}
.manage-sub-plan-top,
.manage-sub-restore {
    display: flex;
    align-items: center;
    gap: 12px;
}
.manage-sub-restore {
    padding: 12px 16px;
}
#screen-manage-subscription .pg-profile-icon-well {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F2F2F7;
    color: #1C1C1E;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#screen-manage-subscription .pg-profile-icon-well svg {
    width: 20px;
    height: 20px;
}
:is(body.dark, body.dark-mode) #screen-manage-subscription .pg-profile-icon-well {
    background: var(--pg-icon-well-bg);
    color: var(--pg-icon-well-fg);
}
.manage-sub-plan-copy,
.manage-sub-restore-label {
    flex: 1;
    min-width: 0;
}
.manage-sub-plan-name,
.manage-sub-restore-label {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}
.manage-sub-plan-sub,
.manage-sub-plan-foot {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: #8E8E93;
}
.manage-sub-plan-foot {
    margin: 0;
    font-size: 15px;
}
.manage-sub-current {
    flex-shrink: 0;
    padding: 4px 10px;
    border: none;
    border-radius: 999px;
    background: rgba(48, 209, 88, 0.12);
    color: #30D158;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.manage-sub-current[hidden] {
    display: none !important;
}
.manage-sub-plan-rule {
    height: 1px;
    margin: 12px 0;
    background: #E5E5EA;
}
:is(body.dark, body.dark-mode) .manage-sub-plan-rule {
    background: #3A3A3C;
}
.manage-sub-plan-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}
.manage-sub-arrow {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    color: var(--text);
}
.manage-sub-footer {
    margin-top: 22px;
    text-align: center;
}
.manage-sub-footer > p {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: #8E8E93;
}
.manage-sub-legal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #8E8E93;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}
.manage-sub-legal a {
    color: #8E8E93;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
#screen-coach-subscribe.active {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--safe-area-top) - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    max-height: calc(100dvh - var(--safe-area-top) - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    padding: 0;
    background: #F2F2F7;
    color: #1C1C1E;
}
:is(body.dark, body.dark-mode) #screen-coach-subscribe.active {
    background: #0A0A0A;
    color: #ffffff;
}
.pg-pro-feature-card {
    box-sizing: border-box;
    margin: 8px 0 0;
    padding: 16px;
    border-radius: var(--pg-card-radius);
    background: var(--card);
}
:is(body.dark, body.dark-mode) .pg-pro-feature-card {
    background: var(--pg-card-bg);
    border: 1px solid var(--pg-card-border);
    box-shadow: var(--pg-card-shadow);
}
#screen-coach-subscribe .pg-profile-icon-well {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F2F2F7;
    color: #1C1C1E;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#screen-coach-subscribe .pg-profile-icon-well svg {
    width: 20px;
    height: 20px;
}
:is(body.dark, body.dark-mode) #screen-coach-subscribe .pg-profile-icon-well {
    background: var(--pg-icon-well-bg);
    color: var(--pg-icon-well-fg);
}
.pg-pro-plan-label {
    margin: 18px 0 8px;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #8E8E93;
}
.pg-pro-choice-period {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    color: #8E8E93;
}
#pg-coach-continue {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 16px 0 0;
    min-height: 52px;
    padding: 14px 48px;
    border: none;
    border-radius: 16px;
    background: #FFD60A;
    color: #111111;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}
.pg-pro-continue-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.pg-pro-billing {
    margin: 12px 0 0;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: #8E8E93;
}
.pg-pro-restore {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #8E8E93;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}
#screen-coach-subscribe .manage-sub-legal {
    margin-top: 14px;
}
.pg-coach-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 14px 16px;
    border: 2px solid #FFD60A;
    border-radius: 16px;
    background: var(--pg-coach-plan-bg);
}
:is(body.dark, body.dark-mode) .pg-coach-plan {
    background: #2C2A1A;
}
.pg-coach-plan-copy {
    flex: 1;
    min-width: 0;
}
.pg-coach-plan-check {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: #FFD60A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pg-coach-plan-check::after {
    content: '✓';
    color: #111111;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.pg-coach-plan-name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}
.pg-coach-plan-sub {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: #8E8E93;
}
.pg-coach-plan-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
}

/* First-run spotlight. Dark card, yellow accent, hole cut around the target. */
#pg-feature-tour {
    position: fixed;
    inset: 0;
    z-index: 120000;
    pointer-events: none;
}
.pg-feature-tour-catch {
    position: absolute;
    inset: 0;
    pointer-events: auto;
}
.pg-feature-tour-hole {
    position: fixed;
    pointer-events: none;
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
    outline: 2px solid #FFD60A;
    outline-offset: 0;
}
.pg-feature-tour-card {
    position: fixed;
    z-index: 1;
    pointer-events: auto;
    width: min(320px, calc(100vw - 32px));
    box-sizing: border-box;
    background: #1C1C1E;
    color: #FFFFFF;
    border-radius: 16px;
    padding: 16px 16px 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.pg-feature-tour-copy {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #FFFFFF;
}
.pg-feature-tour-next {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 0 2px;
    border: none;
    background: transparent;
    color: #FFD60A;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
    cursor: pointer;
    min-height: 44px;
}
.pg-feature-tour-next:focus {
    outline: none;
}

/* Progress tab — never allow page-level horizontal scroll / grey-gap bleed.
   The progress view fits one screen, so that view does not scroll. Profile keeps document scroll. */
#screen-progress,
#screen-progress.active {
    position: relative;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overscroll-behavior-x: none;
}
#screen-progress.pg-progress-noscroll.active {
    height: calc(100dvh - var(--safe-area-top));
    max-height: calc(100dvh - var(--safe-area-top));
    overflow: hidden;
}
html:has(#screen-progress.pg-progress-noscroll.active),
body:has(#screen-progress.pg-progress-noscroll.active) {
    overflow: hidden;
}
#screen-progress > div,
#progress-pane,
#profile-pane,
#progress-dashboard-root,
#progress-profile-toggle,
#progress-legacy-content {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
#screen-progress.pg-progress-noscroll.active > div,
#screen-progress.pg-progress-noscroll #progress-pane,
#screen-progress.pg-progress-noscroll #progress-dashboard-root {
    overflow-y: hidden;
}
#progress-dashboard-root canvas,
#progress-pane canvas {
    display: block;
    max-width: 100%;
}
#progress-dash-weight-chart-holder,
#progress-dash-nutrition-chart-holder,
#progress-strength-chart-wrap,
#progress-dash-training-load-chart-wrap,
#progress-dash-frequency-chart-wrap,
#progress-dash-frequency-bars-host {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}
#screen-train.active {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--safe-area-top));
  max-height: calc(100dvh - var(--safe-area-top));
  overflow: hidden;
  box-sizing: border-box;
}
body:has(#screen-train.active),
body:has(#screen-calories.active) {
  overflow: hidden;
}
#nutrition-tab-content #nut-food-diary-meals {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#nutrition-tab-content #nut-food-diary-meals:has(#nut-diary-empty-add),
#nutrition-tab-content .nut-diary-card:has(#nut-diary-empty-add) {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
}
.train-screen-col {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#screen-train .train-segment-tabs {
  /* Flex sibling (not sticky) so tabs stay below body safe-area like other main tabs. */
  position: relative;
  top: auto;
  z-index: 10;
  flex-shrink: 0;
  background: #F2F2F7;
}
:is(body.dark, body.dark-mode) #screen-train .train-segment-tabs {
  background: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}
:is(body.dark, body.dark-mode) #screen-train .train-tab-btn {
  background: transparent !important;
  box-shadow: none !important;
}
#train-workout-content,
#train-log-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0 !important;
}
#train-my-routines-section {
  position: relative;
  z-index: 5;
}
#train-workout-content {
  display: flex;
  flex-direction: column;
}
#train-log-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* History only: edge scrollbar + 16px card inset. Shared tab bar is untouched
   (same size/position as Workout). Toggled via #screen-train.pg-train-history. */
#screen-train.pg-train-history .train-screen-col {
  overflow: visible;
}
#screen-train.pg-train-history #train-log-content {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  margin-left: -16px;
  margin-right: -16px;
  width: calc(100% + 32px);
  max-width: none;
  padding: 0 16px 100px !important;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#train-workout-content > * {
  flex-shrink: 0;
}
#train-workout-content > .train-my-card {
  flex: 1 1 auto;
  min-height: 0;
}

/* Pull-to-refresh (main tabs) */
#pg-pull-refresh {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    z-index: 12000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 0;
    pointer-events: none;
    overflow: hidden;
    padding-top: 0;
    box-sizing: border-box;
    background: var(--bg);
    transition: height 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
#pg-pull-refresh.pg-pull-refresh--snap-back {
    transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.screen.pg-pull-refresh-shift {
    will-change: transform;
}
.screen.pg-pull-refresh-shift--snap {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.pg-pull-refresh__spinner-wrap {
    margin-bottom: 10px;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#pg-pull-refresh.pg-pull-refresh--visible .pg-pull-refresh__spinner-wrap {
    opacity: 1;
    transform: scale(0.92);
}
#pg-pull-refresh.pg-pull-refresh--threshold .pg-pull-refresh__spinner-wrap,
#pg-pull-refresh.pg-pull-refresh--loading .pg-pull-refresh__spinner-wrap {
    opacity: 1;
    transform: scale(1);
}
.pg-pull-refresh__spinner {
    display: block;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 2px solid var(--border);
    border-top-color: var(--primary, #FFD60A);
    border-radius: 50%;
    transform-origin: center center;
}
#pg-pull-refresh.pg-pull-refresh--spinning .pg-pull-refresh__spinner {
    animation: pgPullRefreshSpin 0.8s linear infinite;
}
@keyframes pgPullRefreshSpin {
    to { transform: rotate(360deg); }
}

@keyframes screenFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpCard {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CARDS */
.card { background: var(--card); border: 1px solid #E5E5E5; border-radius: var(--radius-md); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-card); animation: slideUpCard 0.3s ease forwards; }
.card h2 { color: var(--text); font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.card-kicker { color: var(--text); font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

/* STATS */
.stat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stat-label { color: var(--text-tertiary); font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { color: var(--text); font: var(--font-stat-number); }

/* PROGRESS BARS */
.progress-bar-outer { background: var(--border); border-radius: 999px; height: 8px; margin-top: 6px; overflow: hidden; }
.progress-bar-inner { height: 8px; border-radius: 999px; width: 0%; transition: width 0.5s ease; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04); background: var(--border); }
.progress-bar-inner.green { background: var(--success); }
.progress-bar-inner.gold { background: var(--primary); }
#home-bar-calories, #nut-bar-calories { background: var(--bar-calories) !important; }
#home-bar-protein, #bar-protein { background: var(--bar-protein) !important; }
#home-bar-carbs, #bar-carbs { background: var(--bar-carbs) !important; }
#home-bar-fat, #bar-fat { background: var(--bar-fat) !important; }
#home-bar-steps, #bar-steps, #steps-bar-train { background: var(--bar-steps) !important; }
#home-bar-water, #bar-water { background: var(--bar-water) !important; }
#home-prog-bar, #prog-bar { background: var(--text) !important; }

/* BUTTONS — default = secondary (white pill); yellow only Start/Save workout */
.btn {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
    border-radius: 999px;
    padding: 15px 22px;
    font: var(--font-button);
    letter-spacing: 0;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    transition: transform 0.1s ease, opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-accent-yellow {
    background: var(--primary) !important;
    color: var(--btn-on-primary) !important;
    border-color: var(--primary) !important;
}
.btn-outline {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
    border-radius: 999px;
    padding: 12px 20px;
    font: var(--font-button);
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    transition: transform 0.1s ease, opacity 0.15s ease;
}
.btn-outline:active { transform: scale(0.97); }
.btn-small {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
    border-radius: 999px;
    padding: 8px 14px;
    font: var(--font-button);
    cursor: pointer;
    margin-right: 6px;
    margin-bottom: 6px;
    min-width: 44px;
    min-height: 44px;
    transition: transform 0.1s ease;
}
.btn-small:active { transform: scale(0.97); }
.btn-danger {
    background: var(--btn-secondary-bg);
    color: var(--danger);
    border: 1px solid var(--btn-secondary-border);
    border-radius: 999px;
    padding: 8px 12px;
    font: var(--font-button);
    cursor: pointer;
}
.btn-destructive {
    background: var(--btn-secondary-bg) !important;
    color: #ff453a !important;
    border: 1px solid var(--btn-secondary-border) !important;
    border-radius: 999px;
}
.btn-destructive:active { transform: scale(0.97); }
.btn-destructive:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
.btn-premium { background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; border: none; border-radius: 12px; padding: 14px 20px; font: var(--font-button); cursor: pointer; width: 100%; margin-bottom: 10px; }

/* HOME HERO */
.home-hero { margin-bottom: 18px; padding: 0 2px; }
.home-hero-greeting-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0;
    padding-top: 8px;
}
.home-hero-greeting-text {
    flex: 1;
    min-width: 0;
    padding-right: 32px;
}
.home-hero-actions {
    position: absolute;
    top: 8px;
    right: -6px;
    display: flex;
    flex-direction: column;
    width: 30px;
    height: 52px;
    min-width: 30px;
    max-width: 30px;
    min-height: 52px;
    max-height: 52px;
    box-sizing: border-box;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    background: #FFFFFF;
    overflow: visible;
    pointer-events: none;
}
.home-hero-action {
    position: relative;
    pointer-events: auto;
    flex: 1 1 0;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #1C1C1E;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.home-hero-action + .home-hero-action {
    border-top: 1px solid #E5E5E5;
}
:is(body.dark, body.dark-mode) .home-hero-actions {
    background: #1C1C1E;
    border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .home-hero-action {
    color: #FFFFFF;
}
:is(body.dark, body.dark-mode) .home-hero-action + .home-hero-action {
    border-top-color: #3A3A3C;
}
.home-hero-title {
    font: 700 24px/1.15 var(--font-stack);
    color: var(--text);
    line-height: 1.2;
    margin: 0 0 2px;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: normal;
}
.home-hero-sub {
    font: var(--font-body);
    color: var(--text-secondary);
    margin: 0;
}
#profile-v2-display-name {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
#home-friends-count-pill,
.pg-count-badge {
    position: absolute;
    top: -4px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #FF3B30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    pointer-events: none;
}

/* HOME DAILY + RING */
.home-daily-card .home-daily-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.home-score-numbers { flex: 1; min-width: 0; }
.home-score-big { font: var(--font-stat-number); color: var(--text); letter-spacing: -0.01em; line-height: 1; }
.home-score-slash { font: var(--font-card-title); color: var(--text-secondary); margin-left: 2px; }
.home-score-caption { margin-top: 8px; font: var(--font-section-header); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }
.home-score-ring-wrap { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.home-score-svg { width: 100%; height: 100%; display: block; }
.home-score-track { stroke: var(--border); stroke-width: 8; }
.home-score-progress { stroke: var(--primary); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.home-score-ring-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 20px; opacity: 0.85; pointer-events: none; }

/* Home steps + recovery mini rings (64×64 SVG): percentage centred in the ring */
.pg-home-mini-ring-wrap {
    position: relative;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}
.pg-home-mini-ring-wrap > svg {
    display: block;
}
.pg-home-mini-ring__pct-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.pg-home-mini-ring__label {
    margin: 0;
    padding: 0;
    line-height: 1;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    /* Bold “%” sits slightly below mathematical centre; small nudge for optical balance */
    transform: translateY(-0.06em);
}
#home-recovery-pct.pg-home-mini-ring__label {
    font-size: 13px;
}

/* Home — Weekly Summary headline (workouts completed line) */
.home-weekly-summary-stat {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--text);
}

.home-stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.home-stat-chip { background: var(--bg); border-radius: 14px; padding: 10px 6px; text-align: center; border: 1px solid var(--border); }
.home-stat-ico { display: flex; justify-content: center; color: var(--text); margin-bottom: 4px; opacity: 0.85; }
.home-stat-lbl { display: block; font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: 2px; }
.home-stat-val { display: block; font: var(--font-stat-number); color: var(--text); line-height: 1.2; word-break: break-word; }
@media (max-width: 380px) {
    .home-stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.home-streak-summary { margin-top: 4px; }

/* HOME WORKOUT CARD */
.home-workout-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.home-workout-title { font: var(--font-card-title); color: var(--text); letter-spacing: 0; margin: 4px 0 6px; }
.home-workout-meta { font: var(--font-body); color: var(--text-secondary); }
.home-workout-badge { flex-shrink: 0; background: var(--bg); color: var(--text-tertiary); font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); }
:is(body.dark, body.dark-mode) .home-workout-badge { border-color: var(--border); }
.home-workout-visual { height: 120px; border-radius: 16px; background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%); margin-bottom: 14px; position: relative; overflow: hidden; }
.home-workout-visual::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 80%, rgba(0,0,0,0.06), transparent 55%); pointer-events: none; }
:is(body.dark, body.dark-mode) .home-workout-visual::after { background: radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08), transparent 55%); }
.btn-start-workout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    margin-bottom: 10px;
    background: var(--primary) !important;
    color: var(--btn-on-primary) !important;
    border-color: var(--primary) !important;
}
.btn-start-workout .btn-start-workout-label { flex: 1; }
.btn-play-circle { width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; font-size: 14px; padding-left: 3px; flex-shrink: 0; }
:is(body.dark, body.dark-mode) .btn-play-circle { background: rgba(255,255,255,0.15); }
.home-rest-outline { margin-bottom: 0; }

/* SCORE (legacy) */
.score-circle { width: 110px; height: 110px; border-radius: 50%; border: 5px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 16px; background: var(--bg); }
.score-number { color: var(--text); font: var(--font-stat-number); }
.score-label { color: var(--text-tertiary); font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; }

/* COACH */
.coach-prompt { background: var(--bg); border-left: 3px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; color: var(--text-secondary); font: var(--font-body); }
.coach-prompt.success { background: #ECFDF5; border-color: var(--success); }

/* STREAK */
.streak-bar { display: flex; gap: 4px; margin-top: 10px; justify-content: space-between; }
.streak-day { flex: 1; height: 36px; border-radius: 8px; background: var(--border); display: flex; align-items: center; justify-content: center; font: var(--font-stat-label); text-transform: uppercase; color: var(--text-tertiary); }
.streak-day.done { background: var(--primary); color: #111111; font-weight: 500; }
:is(body.dark, body.dark-mode) .streak-day.done { color: #111111; }
.streak-day.today { border: 2px solid var(--text); }

/* CATEGORY GRID */
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.category-btn { background: var(--card); border: 2px solid var(--border); border-radius: 14px; padding: 18px 10px; text-align: center; cursor: pointer; color: var(--text); font: var(--font-button); transition: all 0.2s; letter-spacing: 0; }
.category-btn:active { transform: scale(0.97); }
.category-btn.selected { border-color: var(--primary); background: rgba(255, 214, 10, 0.22); color: var(--text); }
:is(body.dark, body.dark-mode) .category-btn.selected { color: #ffffff; }

/* EXERCISE BLOCKS */
.exercise-block { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.exercise-name { color: var(--text); font: var(--font-card-title); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.set-row { display: grid; grid-template-columns: 36px 1fr 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.set-num { color: var(--text-secondary); font: var(--font-body); text-align: center; }
.set-input { background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px; font: var(--font-body); font-size: 16px; text-align: center; width: 100%; }
.set-input:focus { outline: none; border-color: var(--text); }
.set-input::placeholder { color: var(--text-secondary); font-weight: 400; }
.remove-set { color: var(--text); cursor: pointer; text-align: center; font-size: 20px; opacity: 0.75; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.set-headers { display: grid; grid-template-columns: 36px 1fr 1fr 36px; gap: 8px; margin-bottom: 6px; }
.set-header { color: var(--text-tertiary); font: var(--font-stat-label); text-align: center; text-transform: uppercase; letter-spacing: 0.06em; }
.pr-badge { background: var(--bar-protein); color: #fff; font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 6px; }

/* REST TIMER */
.rest-timer {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 14px 16px;
    text-align: center;
    display: none;
    position: fixed;
    bottom: calc(var(--nav-bottom-inset) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1250;
    width: min(260px, calc(100% - 32px));
    box-shadow: var(--shadow-card);
}
.rest-timer-cancel {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--btn-secondary-border);
    border-radius: 999px;
    background: var(--btn-secondary-bg);
    color: #ff453a;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
}
.rest-timer-count { color: var(--text); font: var(--font-stat-number); line-height: 1; }

/* WORKOUT TIMER */
.workout-timer-bar {
    background: #111111;
    border-radius: 999px;
    padding: 8px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}
.workout-timer-label { color: rgba(255,255,255,0.75); font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; }
.workout-timer-value { color: #fff; font: var(--font-stat-number); }
#workout-timer-bar {
    position: fixed;
    top: 60px;
    right: 16px;
    left: auto;
    transform: none;
    width: auto;
    max-width: calc(100% - 32px);
    z-index: 1240;
    margin: 0;
}

#train-active { padding-bottom: calc(var(--nav-bottom-inset) + 76px); }
#save-btn {
    position: fixed;
    bottom: calc(var(--nav-bottom-inset) + 16px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 520px;
    z-index: 1300;
    margin: 0;
    box-shadow: var(--shadow-card);
    transition: transform 0.1s ease, opacity 0.15s ease;
}
#save-btn:active {
    transform: translateX(-50%) scale(0.97);
}
#save-btn.btn-accent-yellow {
    background: var(--primary) !important;
    color: var(--btn-on-primary) !important;
    border-color: var(--primary) !important;
}

/* MEALS */
.meal-block { background: var(--card); border: 1px solid #E5E5E5; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.meal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.meal-name { color: var(--text); font: var(--font-card-title); flex: 1; }
.meal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
}
.meal-action-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 14px 16px;
    font: var(--font-button);
    line-height: 1.2;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: opacity 0.15s ease, transform 0.05s ease;
}
.meal-action-btn:active { opacity: 0.92; transform: scale(0.99); }
.meal-action-btn--primary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
    border-radius: 999px;
}
.meal-action-btn--template {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}
:is(body.dark, body.dark-mode) .meal-action-btn--template {
    background: rgba(243, 232, 255, 0.12);
    color: #e9d5ff;
    border-color: rgba(233, 213, 255, 0.45);
}
.meal-action-btn--remove {
    background: var(--btn-secondary-bg);
    color: #ff453a;
    border: 1px solid var(--btn-secondary-border);
    border-radius: 999px;
}
.meal-totals { color: var(--text-secondary); font: var(--font-body); margin-top: 2px; }
.meals-container { width: 100%; }
.nutrition-meals-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}
.nutrition-meals-footer .btn,
.nutrition-meals-footer .btn-outline {
    margin-bottom: 0;
}
.meal-food-list { border-top: 1px solid var(--border); margin-top: 8px; }
.food-entry { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.food-entry-info { flex: 1; }
.food-entry-name { color: var(--text); font: var(--font-body); }
.food-entry-macros { color: var(--text-secondary); font: var(--font-body); margin-top: 2px; }
.food-entry-cals { color: var(--text); font: var(--font-stat-number); margin-right: 12px; }
.food-entry-delete { color: var(--danger); cursor: pointer; font-size: 20px; padding: 4px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.meal-totals-row { color: var(--text); font: var(--font-stat-number); margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }

/* MACRO PILLS */
.macro-pill { display: inline-block; background: var(--bg); color: var(--text); border-radius: 6px; padding: 2px 8px; font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 4px; border: 1px solid var(--border); }
.macro-pill.protein { background: #FEF3C7; color: #92400E; }
.macro-pill.carbs { background: #ECFDF5; color: #065F46; }
.macro-pill.fat { background: #FEF2F2; color: #991B1B; }
:is(body.dark, body.dark-mode) .macro-pill.protein { background: #FFD60A; color: #000000; }
:is(body.dark, body.dark-mode) .macro-pill.carbs { background: #064E3B; color: #6EE7B7; }
:is(body.dark, body.dark-mode) .macro-pill.fat { background: #3A0A0A; color: #FCA5A5; }

/* PERSONAL BESTS */
.pb-item { background: var(--bg); border-radius: 12px; padding: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); }
.pb-exercise { color: var(--text); font: var(--font-body); }
.pb-value { color: var(--text); font: var(--font-stat-number); }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); color: var(--text); border-radius: 20px; padding: 6px 12px; font: var(--font-body); margin: 4px; opacity: 0.45; border: 1px solid var(--border); }
.badge.earned { background: var(--primary); color: var(--btn-on-primary); border-color: var(--primary); opacity: 1; }

/* TAGS */
.tag { background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 10px; font: var(--font-body); margin-right: 6px; margin-bottom: 6px; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; border: 1.5px solid var(--border); }
.tag.selected { border-color: var(--primary); background: rgba(255, 214, 10, 0.22); color: var(--text); }
:is(body.dark, body.dark-mode) .tag.selected { color: #ffffff; }

/* INPUTS */
select option { background: #ffffff; color: #111111; }
:is(body.dark, body.dark-mode) select option { background: #1A1A1A; color: #ffffff; }
select, input[type="text"], input[type="number"], input[type="date"], textarea { background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; color: var(--text); padding: 12px; font: var(--font-body); font-size: 16px; width: 100%; margin-bottom: 10px; font-family: inherit; }
:is(body.dark, body.dark-mode) select,
:is(body.dark, body.dark-mode) input[type="text"],
:is(body.dark, body.dark-mode) input[type="search"],
:is(body.dark, body.dark-mode) input[type="number"],
:is(body.dark, body.dark-mode) input[type="date"],
:is(body.dark, body.dark-mode) textarea,
:is(body.dark, body.dark-mode) .set-input {
  background: var(--pg-field-bg) !important;
  background-color: var(--pg-field-bg) !important;
  border-color: #3A3A3C;
}
select:focus, input:focus { outline: none; border-color: var(--text); }
label { color: var(--text-tertiary); font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 4px; }

/* NAV — fixed iOS-style tab bar */
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: #FFFFFF;
    border-top: 1px solid #E5E5EA;
    padding-top: 9px;
    padding-bottom: 0;
    box-sizing: border-box;
    min-height: calc(var(--nav-bar-height) + var(--nav-safe-bottom));
    box-shadow: none;
    overflow: visible;
}
.nav-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 560px;
    padding: 2px 6px 3px;
    padding-bottom: var(--nav-safe-bottom);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.nav-item {
    color: var(--text-tertiary);
    font: var(--font-nav-label);
    text-align: center;
    cursor: pointer;
    flex: 1 1 0;
    min-width: 44px;
    padding: 0 2px;
    transition: transform 0.1s ease, color 0.2s;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-sizing: border-box;
}
.nav-item:not(.nav-plus-fab) {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
}
/* Level Up tab badge: same look as the friends badge (.pg-count-badge); only its anchor differs. */
#nav-profile .nav-item-icon-wrap { position: relative; }
#nav-profile .pg-count-badge { top: -2px; right: 6px; }
.nav-item-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 48px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 0 10px;
    box-sizing: border-box;
    border-radius: 16px;
    margin: 0 auto 2px;
    flex: 0 0 auto;
    background: transparent;
}
.nav-item:not(.nav-plus-fab) > span:not(.nav-item-icon-wrap) {
    display: block;
    line-height: 1.25;
    min-height: 14px;
    height: 14px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.06em;
}
.nav-item.active { color: var(--text); }
.nav-item.active .nav-item-icon-wrap { background: rgba(0, 0, 0, 0.06); }
:is(body.dark, body.dark-mode) .nav-item.active .nav-item-icon-wrap { background: rgba(255, 255, 255, 0.12); }
.nav-item svg { display: block; margin: 0; flex-shrink: 0; }
.nav-item:not(.nav-plus-fab) .nav-item-icon-wrap svg {
    width: 24px;
    height: 24px;
}
#nav-train .nav-item-icon-wrap svg {
    width: 26.209px;
    height: 26.209px;
}
.nav-item:active { transform: scale(0.97); }
#nav-profile.nav-plus-fab:active { transform: translateY(-10px) scale(0.97); }
:is(body.dark, body.dark-mode) .nav {
    background: var(--bg);
    border-top-color: #2A2A2A;
}

/* Edit Meal, Create Exercise, and Create Routine share these header actions. */
.pg-sheet-header-cancel {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #6C6C70;
    cursor: pointer;
    padding: 8px 4px;
    -webkit-tap-highlight-color: transparent;
}
:is(body.dark, body.dark-mode) .pg-sheet-header-cancel {
    color: #8E8E93;
}
.pg-sheet-header-save {
    background: #FFD60A;
    border: none;
    border-radius: 10px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#workout-template-editor .wte-section-label {
  display: block;
  margin: 0 0 8px 0;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}
#workout-template-editor .wte-name-input {
  margin-left: 0;
  width: 100%;
  box-sizing: border-box;
}
#workout-template-editor .wte-name-input::placeholder {
  color: #6C6C70;
}
#custom-name::placeholder {
  color: #6C6C70;
  opacity: 1;
}
#workout-template-editor .wte-empty {
  margin: 0 0 20px;
  padding: 0;
  text-align: center;
  font-size: 15px;
  color: var(--label-secondary);
}
#wte-exercise-list {
  flex: 0 0 auto;
}
/* Edge-to-edge like the PDF viewer. Do not put env(safe-area-inset-bottom)
   on this shell — that reserved a grey strip under Add Exercise. */
#workout-template-editor,
#workout-template-editor.pg-modal-fullscreen {
  padding-bottom: 0 !important;
  overflow: hidden !important;
}
#wte-editor-scroll {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* ══ FULL-SCREEN MODALS — iOS safe areas (status bar + home indicator) ══ */
/* Top toolbar rows: padding on the element that contains Cancel/Save/Close/Done — not the shell. */
.pg-modal-safe-header,
.pg-modal-action-bar,
#food-modal > .pg-modal-action-bar,
#workout-template-editor > div > .pg-modal-action-bar,
#edit-meal-editor > div > .pg-modal-action-bar,
#exercise-picker-modal > div > .pg-modal-action-bar,
#create-routine-modal .pg-create-routine-modal__header > .pg-modal-action-bar,
#workout-session-modal.workout-session-modal-full .workout-session-modal-header > .pg-modal-action-bar,
#save-workout-modal > .pg-modal-action-bar,
#program-select-modal > div > .pg-modal-action-bar,
#workout-detail-modal > div > .pg-modal-action-bar,
#exercise-detail-modal > .pg-modal-action-bar,
#workout-completion-overlay .workout-completion-header {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
    box-sizing: border-box;
}
/* Profile sub-menus + Privacy/Terms: match Train/Nutrition/Progress (2px below notch). */
#profile-v2-sheet-toolbar,
.pg-legal-doc-header {
    padding-top: calc(env(safe-area-inset-top, 0px) + 2px) !important;
    box-sizing: border-box;
}
#profile-v2-sheet-host {
    overflow-x: hidden !important;
    overflow-y: auto;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    max-width: 100vw;
    background: var(--bg);
}
#profile-v2-sheet-shell {
    width: 100%;
    max-width: 480px;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    min-height: 100%;
    min-height: 100dvh;
    /* Toolbar owns notch + 2px (match Train). Do not stack another 12px here. */
    padding-top: 0 !important;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}
#profile-v2-sheet-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}
#profile-v2-sheet-body input,
#profile-v2-sheet-body select,
#profile-v2-sheet-body textarea,
#profile-v2-sheet-body button {
    max-width: 100%;
}
#profile-v2-sheet-body input,
#profile-v2-sheet-body select,
#profile-v2-sheet-body textarea {
    box-sizing: border-box;
    min-width: 0;
}
#profile-v2-sheet-body input[type="date"],
#profile-v2-sheet-body #pv2-dob {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    -webkit-min-logical-width: 0;
    /* Match Name/Age: padding 12 + ~21px text ≈ 45px; contain native date chrome */
    height: 45px;
    padding: 12px;
    font-size: 15px;
    line-height: 1.5;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
}
#profile-v2-sheet-body input[type="date"]::-webkit-datetime-edit,
#profile-v2-sheet-body #pv2-dob::-webkit-datetime-edit {
    padding: 0;
    margin: 0;
    line-height: 1.5;
}
#profile-v2-sheet-body input[type="date"]::-webkit-calendar-picker-indicator,
#profile-v2-sheet-body #pv2-dob::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
}
.pg-modal-safe-footer,
[data-pg-modal-footer="1"] {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
}
.pg-modal-fullscreen {
    box-sizing: border-box !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    padding-top: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    max-width: 100vw;
}
.pg-modal-fullscreen--shell-pad-top {
    padding-top: 0 !important;
}
.pg-modal-fullscreen--header-child {
    padding-top: 0 !important;
}
.pg-modal-sheet-panel {
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Bottom sheets: keep Cancel / primary actions above Android home indicator */
#water-options-sheet > div:first-child,
#create-custom-modal > div:first-child,
#session-rest-picker-sheet > div:first-child,
#equipment-filter-sheet > div:first-child,
[id$="-sheet"] > div:first-child,
[id$="-picker-sheet"] > div:first-child {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
}
/* Profile edit is a full page, not a bottom sheet. The shell already pads the safe area. */
#pv2-profile-sheet > .pg-profile-section-card:first-child {
    padding-bottom: 8px !important;
}
/* Centered custom-amount card is not a bottom sheet. */
#water-custom-amount-sheet > div:first-child {
    padding-bottom: 8px !important;
}
#saved-workout-day-sheet.pg-modal-fullscreen,
#saved-workout-day-sheet {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    max-height: none !important;
}
#saved-workout-day-sheet > .pg-pinned-picker-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: calc(env(safe-area-inset-top, 0px) + 48px);
    margin: 0 !important;
    padding: 0 !important;
    max-height: none !important;
    height: auto;
    transform: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
#saved-workout-day-sheet-close {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
}
#saved-workout-day-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#saved-workout-day-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
#log-set-edit-sheet > div:first-child {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
}
#log-set-edit-sheet input[type="number"]::-webkit-outer-spin-button,
#log-set-edit-sheet input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#log-set-edit-sheet input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
button.train-log-delete-set-btn {
    background: #FEE2E2 !important;
    background-color: #FEE2E2 !important;
    color: #EF4444 !important;
}
:is(body.dark, body.dark-mode) button.train-log-delete-set-btn {
    background: #3A0A0A !important;
    background-color: #3A0A0A !important;
    color: #EF4444 !important;
}
button.train-log-delete-set-btn svg,
button.train-log-delete-set-btn svg path {
    stroke: #EF4444 !important;
}
/* Centered Day Streak info card is not a bottom sheet — equal inset above the title and below Got it. */
#profile-v2-streak-info-sheet > div:first-child {
    padding: 20px 18px !important;
}
#sleep-modal > div:first-child {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
}
#create-routine-modal {
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}
#food-modal {
    padding-top: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
}
#food-portion {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
}
#exercise-picker-modal #picker-add-bar {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
}
#save-workout-modal {
    padding-top: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    box-sizing: border-box !important;
}
#barcode-scan-overlay {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: #000 !important;
    box-sizing: border-box !important;
}
#barcode-scan-overlay #barcode-manual-input {
    background: #1C1C1E !important;
    background-color: #1C1C1E !important;
    color: #FFFFFF !important;
    border-color: #3A3A3C !important;
}
#add-meal-modal {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
}
#add-meal-modal > div:first-child,
#add-meal-modal .pg-add-food-sheet {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: none !important;
    overflow: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}
/* Header stays outside the scroll pane so the title cannot scroll under the island */
#add-meal-modal > div:first-child > .pg-modal-action-bar,
#add-meal-modal .pg-add-food-sheet > .pg-modal-action-bar {
    flex-shrink: 0;
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
    box-sizing: border-box;
}
/* Recents sit with the header, not in the form scroller — otherwise they scroll
   off the top when the sheet is height-capped (keyboard / short viewport). */
#add-meal-modal #food-recent-foods-wrap {
    flex-shrink: 0;
}
#add-meal-modal #food-add-browse.pg-add-food-sheet-scroll {
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
#add-meal-modal .pg-add-food-sheet-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* PDF chrome uses max(10px, env(safe-area-inset-top)) on the toolbar, not
       calc(N + inset) on the shell. Same formula on this scroller so + Add Food
       stays above the home indicator while the sheet background goes to the edge. */
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}
/* Quantity: text field (not type=number) so iOS WebKit honours the same 44px box as SERVING. */
#add-meal-modal #food-quantity {
    -webkit-appearance: none;
    appearance: none;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}
:is(body.dark, body.dark-mode) #add-meal-modal #food-quantity {
    background: #1C1C1E !important;
    background-color: #1C1C1E !important;
}
#add-meal-modal #food-add-detail.pg-add-food-sheet-scroll {
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
#add-meal-modal #food-quantity::-webkit-inner-spin-button,
#add-meal-modal #food-quantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
    height: 0;
}
#add-meal-modal #food-serving-select {
    margin-bottom: 0;
}
#add-meal-modal #food-barcode-scan-btn {
    -webkit-appearance: none;
    appearance: none;
    max-height: none;
}
#add-meal-modal #food-add-empty > div {
    background: #FEF3C7 !important;
    background-color: #FEF3C7 !important;
    opacity: 1 !important;
}
:is(body.dark, body.dark-mode) #add-meal-modal #food-add-empty > div {
    background: #2A2A00 !important;
    background-color: #2A2A00 !important;
    opacity: 1 !important;
}
#workout-detail-modal {
    padding-top: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    box-sizing: border-box !important;
}
#exercise-detail-modal {
    padding-top: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    touch-action: pan-y;
    overscroll-behavior: none;
}
#exercise-detail-modal.pg-modal-fullscreen {
    overflow: hidden !important;
}
#exercise-detail-modal > .pg-modal-action-bar {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    background: var(--bg);
}
#exercise-detail-modal .exercise-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    padding-bottom: 8px;
    box-sizing: border-box;
}
#exercise-detail-modal .exercise-detail-scroll img {
    position: static !important;
}
#program-select-modal {
    padding-top: 0 !important;
}

/* Active workout session — full viewport shell; scroll only inner pane (avoids iOS/visual-viewport gap + nav bleed-through). */
#workout-session-modal.workout-session-modal-full {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100dvh !important;
    box-sizing: border-box;
    z-index: 50000 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    touch-action: pan-y;
    padding-bottom: 0 !important;
}
/* Log Workout is edge-to-edge. The generic fullscreen safe-area pad and the
   tab bar's top border both read as a line across the bottom of this screen. */
#workout-session-modal.workout-session-modal-full.pg-modal-fullscreen {
    padding-bottom: 0 !important;
}
/* Edit / Create Template: same edge-to-edge shell as Log Workout.
   A safe-area pad on this scroller made the page scroll and clipped the last line. */
#meal-templates-manager,
#meal-templates-manager.pg-modal-fullscreen {
    padding-bottom: 0 !important;
    overflow: hidden !important;
}
#meal-templates-mgr-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 0 !important;
}
body:has(#workout-session-modal.workout-session-modal-full:not(.workout-session-modal-minimized)) .nav {
    display: none !important;
}
#workout-session-modal.workout-session-modal-full .workout-session-modal-header {
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    background: var(--bg);
    padding-top: 0;
    box-sizing: border-box;
}
#workout-session-modal.workout-session-modal-full .workout-session-modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
}
/* Active workout logger: exercise titles follow theme text (not picker yellow). */
#workout-session-modal .session-exercise-name {
    color: var(--text) !important;
}
/* Android WebView often fails to clip children to border-radius without a compositing hint. */
#workout-session-modal .session-exercise-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
#workout-session-modal .session-exercise-card .session-set-row,
#workout-session-modal .session-exercise-card .session-target-row {
    min-width: 0;
    max-width: 100%;
}
/* Set-row actions: centre check / note / delete in their tracks; keep box-sizing consistent. */
#workout-session-modal .session-set-row > .session-set-complete-btn,
#workout-session-modal .session-set-row > .session-set-note-btn,
#workout-session-modal .session-set-row > .session-set-delete-btn {
    justify-self: center;
    align-self: center;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
#workout-session-modal .session-exercise-gif-wrap,
#workout-session-modal .session-exercise-gif-wrap img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
#workout-session-modal .session-exercise-gif-fallback {
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Minimized active workout: must beat .workout-session-modal-full z-index/display so the shell does not block the app or mini bar. */
#workout-session-modal.workout-session-modal-full.workout-session-modal-minimized {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Workout Complete overlay — same as #pg-pdf-viewer-overlay: edge-to-edge
   shell. Do not put env(safe-area-inset-bottom) here — that reserved a
   visible gap and shortened the flex scrollport so Back to Home clipped. */
#workout-completion-overlay {
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}
#workout-completion-overlay .workout-completion-header {
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}
#workout-completion-overlay .workout-completion-scroller {
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  overflow: visible;
  overscroll-behavior: none;
  padding-bottom: 12px;
  box-sizing: border-box;
}
#workout-completion-overlay .workout-completion-actions {
  position: relative;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  background: inherit;
  padding: 0 16px max(20px, env(safe-area-inset-bottom, 0px));
}
#workout-completion-overlay .workout-completion-scroller::-webkit-scrollbar {
  width: 4px;
}
#workout-completion-overlay .workout-completion-scroller::-webkit-scrollbar-track {
  background: transparent;
}
#workout-completion-overlay .workout-completion-scroller::-webkit-scrollbar-thumb {
  background: #C7C7CC;
  border-radius: 4px;
}
#workout-completion-overlay .workout-completion-scroll-inner {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0 16px 0 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}
#workout-completion-overlay .workout-completion-pb-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  overflow: hidden;
  margin-top: 12px;
  border: 1.5px solid #FFD60A;
  border-radius: 16px;
}
#workout-completion-overlay .completion-btn-home {
  min-width: 0;
  min-height: 0;
  position: relative;
  align-self: center;
  overflow: visible;
  appearance: none;
  -webkit-appearance: none;
}
/* Hang the chevron left of the label so the underlined text is the centered box. */
#workout-completion-overlay .completion-btn-home svg {
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
#workout-completion-overlay .completion-photo-chooser-cancel,
#workout-completion-overlay .completion-photo-remove,
#pg-completion-share-customize .completion-photo-chooser-cancel,
#pg-completion-share-customize .completion-photo-remove {
  min-height: 0;
}

#pg-completion-share-customize {
  min-height: 100vh;
  background: #F2F2F7;
}
#pg-completion-share-customize.is-photo-preview {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
#pg-completion-share-customize.is-photo-preview .pg-share-customize-scroller {
  overflow: hidden;
  max-height: 100%;
  padding-bottom: 0;
}
#pg-completion-share-customize.is-photo-preview .pg-share-variant-carousel {
  overflow-y: visible;
  flex-shrink: 1;
  min-height: 0;
}
body.dark #pg-completion-share-customize,
body.dark-mode #pg-completion-share-customize {
  background: #000000;
}
#pg-completion-share-customize .pg-share-customize-scroller {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 220px;
  background: #F2F2F7;
  scrollbar-width: none;
}
#pg-completion-share-customize .pg-share-customize-scroller::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
body.dark #pg-completion-share-customize .pg-share-customize-scroller,
body.dark-mode #pg-completion-share-customize .pg-share-customize-scroller {
  background: #000000;
}
#pg-completion-share-customize .pg-share-customize-inner {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
#pg-completion-share-customize .pg-share-customize-share-wrap {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
#pg-completion-share-customize.is-share-debug .pg-share-customize-share-wrap {
  outline: 3px solid #FF2D55;
  outline-offset: 2px;
}
#pg-completion-share-customize .pg-share-customize-share {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 214, 10, 0.45);
  min-height: 52px;
  white-space: normal;
  font-size: 17px;
  font-weight: 700;
}
#pg-completion-share-customize .pg-share-customize-share span {
  font-size: 17px;
  font-weight: 700;
}
#pg-completion-share-customize .pg-share-btn-spinner,
#workout-completion-overlay .completion-btn-share .pg-share-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: pgPullRefreshSpin 0.8s linear infinite;
  flex-shrink: 0;
}
#pg-completion-share-customize .pg-share-live-status {
  display: none;
  margin: -2px 0 10px;
  min-height: 1.25em;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: var(--text, #111);
}
#pg-completion-share-customize.is-share-debug .pg-share-live-status {
  display: block;
}
#workout-completion-overlay .completion-btn-share {
  touch-action: manipulation;
}
#pg-completion-share-customize .pg-share-customize-share:active {
  background: #3A3A3C !important;
  opacity: 1 !important;
}
#pg-completion-share-customize .pg-share-tap-probe,
#pg-completion-share-customize .pg-share-overlay-probe,
#pg-completion-share-customize .pg-share-compositor-dt {
  display: none;
}
#pg-completion-share-customize.is-share-debug .pg-share-tap-probe,
#pg-completion-share-customize.is-share-debug .pg-share-compositor-dt {
  display: block;
  margin: -4px 0 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #B45309;
  text-align: center;
}
#pg-completion-share-customize.is-share-debug .pg-share-overlay-probe {
  display: block;
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(2px + env(safe-area-inset-top, 0px));
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  color: #B45309;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  word-break: break-word;
}
#pg-completion-share-customize .pg-share-preview-wrap {
  flex-shrink: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-card);
  position: relative;
  transform: translateZ(0);
}
#pg-completion-share-customize .pg-share-variant-slide.is-generating .pg-share-preview-wrap {
  min-height: 0;
}
#pg-completion-share-customize .pg-share-preview-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  align-items: center;
  justify-content: center;
  background: rgba(242, 242, 247, 0.82);
  pointer-events: none;
}
body.dark #pg-completion-share-customize .pg-share-preview-placeholder,
body.dark-mode #pg-completion-share-customize .pg-share-preview-placeholder {
  background: rgba(28, 28, 30, 0.82);
}
#pg-completion-share-customize .pg-share-variant-slide.is-generating .pg-share-preview-placeholder {
  display: flex;
}
#pg-completion-share-customize .pg-share-preview-placeholder-pulse {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: #FFD60A;
  animation: pgSharePreviewSpin 0.75s linear infinite;
}
@keyframes pgSharePreviewSpin {
  to { transform: rotate(360deg); }
}
#pg-completion-share-customize .pg-share-preview-img,
#pg-completion-share-customize .pg-share-preview-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: transparent;
  transform: translateZ(0);
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-preview-wrap,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-receipt-sheet,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-preview-canvas {
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-preview-wrap,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-receipt-sheet {
  overflow: visible;
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-receipt-sheet {
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 95% 100%, 90% calc(100% - 10px), 85% 100%, 80% calc(100% - 10px), 75% 100%, 70% calc(100% - 10px), 65% 100%, 60% calc(100% - 10px), 55% 100%, 50% calc(100% - 10px), 45% 100%, 40% calc(100% - 10px), 35% 100%, 30% calc(100% - 10px), 25% 100%, 20% calc(100% - 10px), 15% 100%, 10% calc(100% - 10px), 5% 100%, 0 calc(100% - 10px));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 95% 100%, 90% calc(100% - 10px), 85% 100%, 80% calc(100% - 10px), 75% 100%, 70% calc(100% - 10px), 65% 100%, 60% calc(100% - 10px), 55% 100%, 50% calc(100% - 10px), 45% 100%, 40% calc(100% - 10px), 35% 100%, 30% calc(100% - 10px), 25% 100%, 20% calc(100% - 10px), 15% 100%, 10% calc(100% - 10px), 5% 100%, 0 calc(100% - 10px));
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-preview-wrap {
  max-height: none;
  margin-left: auto;
  margin-right: auto;
  scroll-snap-align: center;
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="black"] .pg-share-preview-canvas {
  max-height: none;
  height: auto;
}
#pg-completion-share-customize .pg-share-preview-stage {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: min(48vh, 520px);
  overflow: hidden;
  touch-action: pan-x;
  background: #111;
}
#pg-completion-share-customize .pg-share-preview-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
#pg-completion-share-customize .pg-share-preview-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.20) 100%);
}
#pg-completion-share-customize .pg-share-preview-content-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  will-change: transform;
  touch-action: none;
}
#pg-completion-share-customize .pg-share-preview-content {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
#pg-completion-share-customize .pg-share-preview-handle {
  display: none !important;
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: #FFD60A;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  cursor: nwse-resize;
  touch-action: none;
}
#pg-completion-share-customize .pg-share-reset-pos {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 10px;
  width: 100%;
  max-width: 400px;
}
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="grey"] .pg-share-preview-img,
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="grey"] .pg-share-preview-canvas,
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="share-card-2"] .pg-share-preview-img,
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="share-card-2"] .pg-share-preview-canvas {
  display: none;
}
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="grey"] .pg-share-preview-stage,
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="share-card-2"] .pg-share-preview-stage {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  background: transparent;
}
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="grey"] .pg-share-preview-photo,
#pg-completion-share-customize.is-photo-preview .pg-share-variant-slide[data-share-variant="share-card-2"] .pg-share-preview-photo {
  object-fit: cover;
  object-position: center center;
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="grey"] .pg-share-preview-wrap,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="grey"] .pg-share-preview-stage,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="grey"] .pg-share-preview-photo,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="share-card-2"] .pg-share-preview-wrap,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="share-card-2"] .pg-share-preview-stage,
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="share-card-2"] .pg-share-preview-photo {
  border-radius: 0;
}
#pg-completion-share-customize.is-photo-preview .pg-share-variant-carousel {
  touch-action: pan-x;
}
#pg-completion-share-customize.is-card1-photo-lock .pg-share-variant-carousel {
  overflow-x: hidden;
  scroll-snap-type: none;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}
#pg-completion-share-customize.is-card1-photo-lock .pg-share-variant-dots {
  display: none !important;
}
#pg-completion-share-customize .pg-share-bleed-photo {
  display: none;
  position: fixed;
  z-index: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden !important;
  pointer-events: none;
  max-width: 100vw;
  box-sizing: border-box;
}
#pg-completion-share-customize.is-widget-photo .pg-share-bleed-photo {
  display: block;
}
#pg-completion-share-customize .pg-share-bleed-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 0;
  pointer-events: none;
}
#pg-completion-share-customize.is-widget-photo .pg-share-variant-slide[data-share-variant="black"] .pg-share-preview-wrap,
#pg-completion-share-customize.is-widget-photo .pg-share-variant-slide[data-share-variant="white"] .pg-share-preview-wrap {
  position: relative;
  z-index: 2;
  touch-action: none;
}
#pg-completion-share-customize.is-widget-photo .pg-share-variant-slide[data-share-variant="black"] .pg-share-preview-canvas,
#pg-completion-share-customize.is-widget-photo .pg-share-variant-slide[data-share-variant="white"] .pg-share-preview-canvas {
  max-height: none;
}
#pg-completion-share-customize.is-photo-preview .pg-share-preview-wrap {
  max-width: 100%;
  min-height: 0;
}
#pg-completion-share-customize .pg-share-variant-carousel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  gap: 48px;
  overflow-x: scroll;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  box-sizing: border-box;
}
#pg-completion-share-customize .pg-share-variant-carousel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="white"] {
  align-self: center;
}
#pg-completion-share-customize .pg-share-variant-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-left: 0;
  padding-right: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  box-sizing: border-box;
  overflow: hidden;
}
#pg-completion-share-customize .pg-share-cal-square {
  flex-shrink: 0;
  align-self: center;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  margin-left: auto;
  margin-right: auto;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: none;
  overflow: hidden;
}
#pg-completion-share-customize .pg-share-cal-square .pg-share-preview-canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 0;
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="white"] .pg-share-preview-stage {
  display: none;
}
#pg-completion-share-customize .pg-share-compare-card {
  flex-shrink: 0;
  align-self: center;
  scroll-snap-align: center;
  aspect-ratio: 4 / 5;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  border: none;
  border-radius: 20px;
  box-shadow: none;
  overflow: hidden;
}
#pg-completion-share-customize .pg-share-compare-card .pg-share-preview-canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 0;
}
#pg-completion-share-customize .pg-share-variant-slide[data-share-variant="share-card-5"] .pg-share-preview-stage {
  display: none;
}
#pg-completion-share-customize .pg-share-preview-debug,
#pg-completion-share-customize .pg-share-debug-copy-wrap {
  display: none;
}
#pg-completion-share-customize.is-share-debug .pg-share-preview-debug {
  display: block;
  margin: 6px 0 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #FEF3C7;
  color: #92400E;
  font: 10px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-word;
  text-align: left;
}
body.dark #pg-completion-share-customize.is-share-debug .pg-share-preview-debug,
body.dark-mode #pg-completion-share-customize.is-share-debug .pg-share-preview-debug {
  background: #FFD60A;
  color: #000000;
}
#pg-completion-share-customize.is-share-debug .pg-share-debug-copy-wrap {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 0 10px;
}
#pg-completion-share-customize .pg-share-debug-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-secondary);
  text-align: left;
}
#pg-completion-share-customize .pg-share-debug-copy {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
#pg-completion-share-customize .pg-share-variant-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 10px 0 0;
}
#pg-completion-share-customize.is-widget-photo .pg-modal-action-bar {
  position: relative;
  z-index: 5;
  background: #F2F2F7;
}
body.dark #pg-completion-share-customize.is-widget-photo .pg-modal-action-bar,
body.dark-mode #pg-completion-share-customize.is-widget-photo .pg-modal-action-bar {
  background: #000000;
}
#pg-completion-share-customize.is-widget-photo .pg-share-action-footer .pg-share-variant-dots {
  margin: 0 0 8px;
  background: #F2F2F7;
}
#pg-completion-share-customize .pg-share-variant-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  max-width: 8px;
  max-height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #D1D1D6;
  cursor: pointer;
  box-sizing: border-box;
}
#pg-completion-share-customize .pg-share-variant-dot.is-active {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  max-width: 8px;
  max-height: 8px;
  background: #1C1C1E;
}
#pg-completion-share-customize .pg-share-bg-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: none;
  align-self: stretch;
  margin: 24px 0 0;
  padding: 0;
  box-sizing: border-box;
}
#pg-completion-share-customize .pg-share-card-helper {
  display: none;
  margin: 8px 0 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-secondary);
}
#pg-completion-share-customize.is-share-card1 .pg-share-card1-helper,
#pg-completion-share-customize.is-share-sticker-helper .pg-share-sticker-helper {
  display: block;
}
#pg-completion-share-customize .pg-share-bg-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100px;
  height: 100px;
  min-width: 100px;
  flex: 0 0 100px;
  border: 1px solid #E5E5EA;
  background: #FFFFFF;
  color: #1C1C1E;
  border-radius: 16px;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}
body.dark #pg-completion-share-customize .pg-share-bg-chip,
body.dark-mode #pg-completion-share-customize .pg-share-bg-chip {
  background: #FFFFFF;
  color: #1C1C1E;
  border: 1px solid #E5E5EA;
}
#pg-completion-share-customize .pg-share-bg-swatch {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  border: 1px solid #E5E5EA;
  box-sizing: border-box;
  background: #FFFFFF;
}
#pg-completion-share-customize .pg-share-bg-swatch-light {
  background: #FFFFFF;
}
#pg-completion-share-customize .pg-share-bg-swatch-dark {
  background: #000000;
  border-color: #000000;
}
#pg-completion-share-customize .pg-share-bg-swatch-checker {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(45deg, #D1D1D6 25%, transparent 25%),
    linear-gradient(-45deg, #D1D1D6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #D1D1D6 75%),
    linear-gradient(-45deg, transparent 75%, #D1D1D6 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
#pg-completion-share-customize .pg-share-bg-chip.is-selected,
body.dark #pg-completion-share-customize .pg-share-bg-chip.is-selected,
body.dark-mode #pg-completion-share-customize .pg-share-bg-chip.is-selected {
  border: 2px solid #FFD60A;
  background: #FFFBEB;
}
#pg-completion-share-customize .pg-share-action-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  box-sizing: border-box;
  background: #F2F2F7;
  padding: 16px 16px env(safe-area-inset-bottom, 16px);
}
body.dark #pg-completion-share-customize .pg-share-action-footer,
body.dark-mode #pg-completion-share-customize .pg-share-action-footer {
  background: #F2F2F7;
}
#pg-completion-share-customize .pg-share-bg-chip:disabled {
  opacity: 0.4;
  cursor: default;
}
#pg-completion-share-customize .completion-photo-take,
#pg-completion-share-customize .completion-photo-gallery {
  background: #FFFFFF;
  color: #1C1C1E;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
}
body.dark #pg-completion-share-customize .completion-photo-take,
body.dark #pg-completion-share-customize .completion-photo-gallery,
body.dark-mode #pg-completion-share-customize .completion-photo-take,
body.dark-mode #pg-completion-share-customize .completion-photo-gallery {
  background: #1C1C1E;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
#pg-completion-share-customize .completion-btn-add-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #FFD60A;
  color: #111111;
  border: none;
}
#pg-completion-share-customize .completion-btn-add-photo-pair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#pg-completion-share-customize .completion-btn-add-photo svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: block;
}
#pg-completion-share-customize .completion-btn-add-photo-label {
  flex: 0 0 auto;
}
#pg-completion-share-customize .pg-share-bg-photo-hint {
  display: none;
  margin: 0;
  padding: 8px 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-secondary);
}
#pg-completion-share-customize.is-photo-preview .pg-share-bg-photo-hint {
  display: block;
}
#pg-completion-share-customize.is-widget-photo .pg-share-action-footer .pg-share-bg-photo-hint {
  background: #F2F2F7;
}
#pg-completion-share-customize.is-transparent-preview .pg-share-preview-wrap {
  background-color: rgba(28, 28, 30, 0.55);
  background-image: linear-gradient(rgba(255,255,255,0.15), rgba(255,255,255,0.15));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#pg-completion-share-customize.is-transparent-preview .pg-share-preview-img,
#pg-completion-share-customize.is-transparent-preview .pg-share-preview-canvas {
  background: transparent;
}

/* Personal Bests card — single-column names; visible scrollbar after ~5 lines. */
#workout-completion-overlay .completion-stats-grid {
  flex-shrink: 0;
}
#workout-completion-overlay .workout-completion-pb-list,
.workout-completion-pb-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #6C6C70 transparent;
}
#workout-completion-overlay .workout-completion-pb-list > p,
.workout-completion-pb-list > p {
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
#workout-completion-overlay .workout-completion-pb-list::-webkit-scrollbar,
.workout-completion-pb-list::-webkit-scrollbar {
  width: 4px;
}
#workout-completion-overlay .workout-completion-pb-list::-webkit-scrollbar-track,
.workout-completion-pb-list::-webkit-scrollbar-track {
  background: transparent;
}
#workout-completion-overlay .workout-completion-pb-list::-webkit-scrollbar-thumb,
.workout-completion-pb-list::-webkit-scrollbar-thumb {
  background: #C7C7CC;
  border-radius: 4px;
}

/* LANGUAGE GRID */
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.lang-btn { background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; color: #fff; font: var(--font-button); transition: all 0.2s; }
.lang-btn.selected { background: rgba(255,255,255,0.3); border-color: #fff; }

/* PATH SELECTION */
.path-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
.path-btn { background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3); border-radius: 16px; padding: 20px; text-align: left; cursor: pointer; color: #fff; transition: all 0.2s; }
.path-btn:active { transform: scale(0.98); }
.path-btn.primary-path { background: rgba(255,255,255,0.25); border-color: #fff; }
.path-btn-title { font: var(--font-button); margin-bottom: 4px; }
.path-btn-sub { font: var(--font-body); opacity: 0.8; }

/* UNIT TOGGLE */
.unit-toggle { display: flex; gap: 8px; margin-bottom: 12px; }
.unit-btn { flex: 1; background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3); border-radius: 10px; padding: 10px; min-width: 44px; min-height: 44px; text-align: center; cursor: pointer; color: #fff; font: var(--font-body); transition: all 0.2s; }
.unit-btn.selected { background: rgba(255,255,255,0.35); border-color: #fff; }

/* ROUTINES */
.routine-item { background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: transform 0.1s ease; }
.routine-item:active { transform: scale(0.97); }
.routine-name { color: var(--text); font: var(--font-card-title); }
.routine-meta { color: var(--text-secondary); font: var(--font-body); margin-top: 4px; }
.routine-arrow { color: var(--text); font-size: 20px; opacity: 0.45; }

/* PHASE */
.phase-history-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; }

/* CHECK-IN */
.checkin-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.checkin-date { color: var(--text); font: var(--font-card-title); }
.checkin-detail { color: var(--label-secondary); font: var(--font-body); margin-top: 4px; }

/* SECTION TITLES */
.section-title { color: var(--text); font: var(--font-card-title); margin-bottom: 16px; margin-top: 8px; }
.section-subtitle { color: var(--text-tertiary); font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; margin-top: 12px; }

/* FILTER BAR */
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 4px; }
.filter-btn { background: var(--card); border: 1.5px solid var(--border); border-radius: 20px; padding: 6px 14px; min-width: 44px; min-height: 44px; font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); opacity: 0.65; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.filter-btn.active { opacity: 1; background: var(--primary); border-color: var(--primary); color: #111111; }
:is(body.dark, body.dark-mode) .filter-btn.active { color: #111111; }

/* TOGGLE */
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.toggle-label { color: var(--text); font: var(--font-body); }
.toggle-switch { width: 44px; height: 24px; min-width: 44px; min-height: 44px; background: transparent; border-radius: 12px; cursor: pointer; position: relative; transition: background 0.2s; display: inline-flex; align-items: center; }
.toggle-switch::before { content: ""; position: absolute; left: 0; top: 50%; width: 44px; height: 24px; transform: translateY(-50%); background: var(--border); border-radius: 12px; transition: background 0.2s; }
.toggle-switch.on::before { background: var(--success); }
.toggle-knob { width: 20px; height: 20px; background: #fff; border-radius: 50%; position: absolute; top: 50%; left: 2px; transform: translateY(-50%); transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 1; }
.toggle-switch.on .toggle-knob { left: 22px; }

/* Profile Settings → Notifications: yellow track ON, muted grey OFF (distinct from theme success green) */
.pv2-notif-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #E5E5EA;
    box-sizing: border-box;
}
.pv2-notif-row:last-child {
    border-bottom: none;
}

body.dark .pv2-notif-row,
body.dark-mode .pv2-notif-row .pv2-notif-row {
    border-bottom-color: #2A2A2A;
}
.toggle-switch.pv2-notif-toggle {
    flex-shrink: 0;
}
.toggle-switch.pv2-notif-toggle::before {
    background: #E5E5EA;
}
.toggle-switch.pv2-notif-toggle.on::before {
    background: #FFD60A;
}
:is(body.dark, body.dark-mode) .toggle-switch:not(.on)::before,
:is(body.dark, body.dark-mode) .toggle-switch.pv2-notif-toggle:not(.on)::before {
    background: #1E1E1E;
}

/* Profile → Language: full-color flag emoji (not button text color / dark-mode filters) */
.pv2-lang-flag {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    display: inline-block;
    vertical-align: -0.05em;
    margin-right: 10px;
    line-height: 1;
    filter: none !important;
    -webkit-filter: none !important;
    color: revert;
    -webkit-text-fill-color: initial;
}
.pv2-lang-label {
    color: inherit;
}

/* PLATES */
.plates-result { background: var(--bg); border-radius: 10px; padding: 12px; margin-top: 8px; color: var(--text); font: var(--font-body); border: 1px solid var(--border); }

/* PREMIUM */
.premium-lock { background: var(--card); border: 2px dashed var(--border); border-radius: 16px; padding: 24px; margin-bottom: 12px; text-align: center; }
.premium-lock-icon { font: var(--font-stat-number); margin-bottom: 8px; }
.premium-lock-title { color: var(--text); font: var(--font-card-title); margin-bottom: 4px; }
.premium-lock-sub { color: var(--label-secondary); font: var(--font-body); margin-bottom: 16px; }
.premium-badge { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; border-radius: 20px; padding: 4px 12px; font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.premium-feature-list { text-align: left; margin-bottom: 16px; }
.premium-feature-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--label-secondary); font: var(--font-body); }
.premium-feature-item.unlocked { color: var(--text); }
.premium-teaser { filter: blur(4px); pointer-events: none; user-select: none; opacity: 0.6; }

/* TOAST */
#toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%) translateY(16px);
    min-width: 220px;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    border-radius: 12px;
    color: #fff;
    font: var(--font-body);
    text-align: center;
    z-index: 100001;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#toast.toast-success { background: var(--success); }
#toast.toast-error { background: var(--danger); }

/* NUTRITION HERO */
.nut-screen-title { font: var(--font-page-greeting); letter-spacing: 0; margin-bottom: 12px; color: var(--text); }
.nut-date-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 8px; }
.nut-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--btn-secondary-border);
    background: var(--btn-secondary-bg);
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.1s ease;
}
.nut-nav-btn:active { transform: scale(0.97); }
.nut-today-mid {
    border: none;
    background: transparent;
    font: var(--font-card-title);
    color: var(--text);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
}
.nut-cal-date-sub { font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); opacity: 0.5; text-align: center; margin-bottom: 8px; }
.nut-hero-calories { font: var(--font-page-greeting); letter-spacing: 0; text-align: center; margin: 8px 0 4px; color: var(--text); }
.nut-cal-remaining { text-align: center; font: var(--font-card-title); margin-bottom: 10px; }
.nut-hero-cal-bar { margin-bottom: 16px; }
.nut-macro-pills { display: flex; flex-direction: column; gap: 10px; }
.nut-macro-pill {
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--bg);
}
.nut-m-pill-lbl { display: block; font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); opacity: 0.55; margin-bottom: 4px; }
.nut-m-pill-val { font: var(--font-stat-number); color: var(--text); }
.nut-m-pill-track { height: 8px; border-radius: 999px; background: var(--border); margin-top: 8px; overflow: hidden; }
.nut-m-pill-fill { display: block; height: 100%; border-radius: 999px; width: 0%; transition: width 0.4s ease; }
.nut-macro-pill--protein .nut-m-pill-fill { background: #38BDF8; }
.nut-macro-pill--carbs .nut-m-pill-fill { background: #30D158; }
.nut-macro-pill--fats .nut-m-pill-fill { background: #FF9F0A; }

/* Nutrition → Daily Targets macro fills (match home macros card linear bars) */
#nutrition-tab-content .nut-daily-target-macro-fill--protein { background: #38BDF8 !important; }
#nutrition-tab-content .nut-daily-target-macro-fill--carbs { background: #30D158 !important; }
#nutrition-tab-content .nut-daily-target-macro-fill--fats { background: #FF9F0A !important; }
/* Nutrition → Water Intake card (minimal inline glass fill tracker) */
.nut-water-intake-card {
    overflow: hidden;
    border: 1px solid #E5E5E5;
}
.nut-water-bottle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 118px;
    height: 140px;
    line-height: 0;
}
.nut-water-bottle svg {
    display: block;
    width: 118px;
    height: 140px;
    overflow: visible;
}
.nut-water-bottle--compact {
    width: 22px;
    height: 35px;
    overflow: hidden;
    position: relative;
}
.nut-water-bottle--compact svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 88px;
    height: 140px;
    transform: scale(0.25);
    transform-origin: 0 0;
    overflow: visible;
}
.home-tile-ico-water .nut-water-bottle--compact {
    width: calc(88px * 23.4 * 1.1 / 140);
    height: calc(23.4px * 1.1);
}
.home-tile-ico-water .nut-water-bottle--compact svg {
    transform: scale(calc(23.4 * 1.1 / 140));
}
.nut-water-bottle-fill {
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
    .nut-water-bottle-fill {
        transition: none;
    }
    .nut-water-liquid animate {
        display: none;
    }
}
.nut-water-intake-main {
    min-width: 0;
}
/* Nutrition → water tracker drops (inline SVG from `pgSvgNutritionCapaWaterDrop`) */
.nut-water-drop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    width: 16px;
    height: 16px;
    overflow: hidden;
}
.nut-water-drop svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* Squircle “+” controls — shared flexbox centering (Train, Nutrition, legacy water) */
.pg-btn-circle-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.pg-btn-circle-plus svg,
.nut-water-plus svg {
    display: block;
    flex-shrink: 0;
}

/* Nutrition meal “+” squares use the shared dark icon well: lighter than the card, white icon. */
:is(body.dark, body.dark-mode) #nutrition-tab-content .pg-btn-circle-plus {
    background: var(--pg-icon-well-bg) !important;
    color: var(--pg-icon-well-fg) !important;
    border: none !important;
}
.nut-well {
    background: #EFF8FF;
    color: #1C1C1E;
}
:is(body.dark, body.dark-mode) .nut-well {
    background: #1E3A5F !important;
    color: #FFFFFF !important;
}
.nut-diary-card {
    border: 1px solid #E5E5E5;
}
:is(body.dark, body.dark-mode) .nut-diary-card {
    border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .nut-food-diary-kicker {
    color: #8E8E93 !important;
}
.nut-tool-ico {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 10px;
    background: #FEF3C7;
    color: #1C1C1E;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
:is(body.dark, body.dark-mode) .nut-tool-ico {
    background: #2A2A00;
    color: #FFD60A;
}
:is(body.dark, body.dark-mode) #nutrition-tab-content .nut-track {
    background: #3A3A3C !important;
}
#nutrition-tab-content #nut-food-diary-meals > [data-meal-section] {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
#nutrition-tab-content #nut-food-diary-meals > [data-meal-section] + [data-meal-section],
.train-my-list > .train-my-row + .train-my-row {
    border-top: 1px solid #E5E5E5 !important;
}
:is(body.dark, body.dark-mode) #nutrition-tab-content #nut-food-diary-meals > [data-meal-section] + [data-meal-section],
:is(body.dark, body.dark-mode) .train-my-list > .train-my-row + .train-my-row {
    border-top-color: #3A3A3C !important;
}

/* Train → Exercise Library book badge uses the inline cream / branded-yellow pair. */

/* Train workout view — hardcoded light surfaces and dark text. Light mode stays inline. */
:is(body.dark, body.dark-mode) #train-workout-content p[style*="color: #1C1C1E"],
:is(body.dark, body.dark-mode) #train-my-routines-section > div > button {
    color: #E5E5E5 !important;
}
:is(body.dark, body.dark-mode) #train-workout-content button[onclick*="startEmptyWorkout()"] {
    background: var(--card) !important;
}
:is(body.dark, body.dark-mode) #train-workout-content button[onclick*="startEmptyWorkout()"] > span[style*="background:#F2F2F7"] {
    background: var(--pg-icon-well-bg) !important;
    color: var(--pg-icon-well-fg) !important;
}
:is(body.dark, body.dark-mode) #train-workout-content button[onclick*="openExerciseLibraryBrowser()"] {
    background: var(--card) !important;
}
#train-workout-content > div[style*="background:#E5E5EA"] {
    border: 1px solid #E5E5E5;
}
:is(body.dark, body.dark-mode) #train-workout-content > div[style*="background:#E5E5EA"] {
    background: var(--card) !important;
    border: 1px solid #2A2A2A !important;
}
:is(body.dark, body.dark-mode) #train-workout-content > div[style*="background:#E5E5EA"] > button[style*="background:var(--card)"] {
    background: #1E1E1E !important;
}
:is(body.dark, body.dark-mode) .train-my-tools {
    border-top-color: #2A2A2A !important;
}
:is(body.dark, body.dark-mode) .train-my-tools > button:not(:last-child)::after {
    background: #2A2A2A;
}
:is(body.dark, body.dark-mode) .train-my-row svg[fill="#1a1a1a"] {
    fill: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) .train-my-row button[aria-label="Workout actions"],
:is(body.dark, body.dark-mode) .train-my-row button[aria-label="Routine actions"] {
    background: #2C2C2E !important;
    border-color: #3A3A3C !important;
    color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) .train-my-row button[aria-label="Workout actions"] svg,
:is(body.dark, body.dark-mode) .train-my-row button[aria-label="Routine actions"] svg {
    fill: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #nutrition-tab-content button[aria-label="Meal options"] {
    background: #2C2C2E !important;
    border-color: #3A3A3C !important;
    color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #nutrition-tab-content button[aria-label="Meal options"] svg {
    fill: #FFFFFF !important;
}
/* Intentional coloured squares: Guides & plans cream wells. Do not restyle these to the shared grey icon well. */
:is(body.dark, body.dark-mode) .pg-guide-plan-well {
    background: rgba(255, 214, 10, 0.15) !important;
    background-color: rgba(255, 214, 10, 0.15) !important;
    color: #FFD60A !important;
}
:is(body.dark, body.dark-mode) .train-my-tools button[onclick*="startNewWorkoutTemplate"] > span[aria-hidden="true"],
:is(body.dark, body.dark-mode) .train-my-tools button[onclick*="createNewRoutine"] > span[aria-hidden="true"] {
    background: var(--pg-icon-well-bg) !important;
    color: var(--pg-icon-well-fg) !important;
}
/* Intentional coloured squares: Developer Mode row icons and password padlock. Matches Exercise Library. Not the shared grey icon well. */
.pg-dev-cream-well {
    background: #FEF3C7 !important;
    background-color: #FEF3C7 !important;
    color: #1C1C1E !important;
}
:is(body.dark, body.dark-mode) .pg-dev-cream-well {
    background: #2A2A00 !important;
    background-color: #2A2A00 !important;
    color: #FFD60A !important;
}
/* Intentional coloured square: Train “Guides & Plans” book. Matches Exercise Library. Not the shared grey icon well. */
:is(body.dark, body.dark-mode) .train-my-tools button[onclick*="openProfileV2Sheet"] > span.pg-train-guides-well {
    background: #2A2A00 !important;
    background-color: #2A2A00 !important;
    color: #FFD60A !important;
}
:is(body.dark, body.dark-mode) .train-my-tools button > span:not([aria-hidden]) {
    color: var(--text) !important;
}

/* Dark mode: solid brand yellow for soft yellow-tint badges/chips (same muted-rgba issue as Exercise Library). Light mode keeps inline tints. */
:is(body.dark, body.dark-mode) button[aria-label="Weight Plate Calculator"] {
    background: var(--primary, #FFD60A) !important;
    color: var(--btn-on-primary, #111111) !important;
}

:is(body.dark, body.dark-mode) #home-up-next > div > div:first-child {
    background: #2A2A00 !important;
    color: #FFD60A !important;
}
:is(body.dark, body.dark-mode) #home-up-next > div > div:first-child svg {
    stroke: #FFD60A !important;
}

:is(body.dark, body.dark-mode) button[onclick="profileV2ScrollToProTrial()"] > span:last-child {
    background: var(--primary, #FFD60A) !important;
    color: var(--btn-on-primary, #111111) !important;
}

:is(body.dark, body.dark-mode) #profile-level-badge {
    background: var(--primary, #FFD60A) !important;
    color: var(--btn-on-primary, #111111) !important;
    border-color: var(--primary, #FFD60A) !important;
}

.nut-water-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.nut-water-summary { font: var(--font-button); color: var(--text); flex: 1; min-width: 120px; }
.nut-water-dots { display: flex; gap: 6px; flex-wrap: wrap; flex: 2; justify-content: flex-end; }
.nut-water-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--btn-secondary-border);
    background: var(--btn-secondary-bg);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s ease;
}
.nut-water-plus:active { transform: scale(0.97); }

/* TRAIN PROGRAM + WEEK */
.train-program-card { margin-bottom: 12px; }
.train-today-status {
  box-sizing: border-box;
}
.train-today-status.is-scheduled {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
}
.train-today-status.is-done {
  background: #dcfce7;
  border: 1px solid #86EFAC;
}
.train-today-status.is-rest {
  background: #F3E8FF;
  border: 1px solid #D8B4FE;
}
.train-today-status.is-no-active {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
}
.train-today-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}
.train-today-status.is-scheduled .train-today-ico {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #FFD60A;
}
.train-today-status.is-done .train-today-ico {
  background: #30D158;
}
.train-today-status.is-rest .train-today-ico {
  background: transparent;
}
.train-today-status.is-no-active .train-today-ico {
  background: #FF3B30;
}
.train-program-title { font: var(--font-page-greeting); letter-spacing: 0; margin-bottom: 12px; color: var(--text); }
.train-phase-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.train-phase-tab {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    font: var(--font-stat-label);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    opacity: 0.65;
}
.train-phase-tab--active { opacity: 1; background: rgba(0, 0, 0, 0.06); border-color: var(--border); font-weight: 500; }
:is(body.dark, body.dark-mode) .train-phase-tab--active { background: rgba(255, 255, 255, 0.1); }
.train-week-progress-track { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin-bottom: 6px; }
.train-week-progress-fill { height: 100%; width: 0%; background: var(--primary); border-radius: 999px; transition: width 0.4s ease; }
.train-week-progress-label { font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin-bottom: 12px; }
.train-week-list { display: flex; flex-direction: column; gap: 8px; }
.train-week-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg);
}
.train-week-row--done { border-color: rgba(255, 214, 10, 0.65); background: rgba(255, 214, 10, 0.12); }
.train-week-day { font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; width: 40px; color: var(--text); opacity: 0.65; }
.train-week-info { flex: 1; min-width: 0; }
.train-week-name { font: var(--font-card-title); color: var(--text); }
.train-week-meta { font: var(--font-body); color: var(--text-secondary); opacity: 0.65; margin-top: 2px; }
:is(body.dark, body.dark-mode) .train-week-meta { opacity: 1; }
.train-week-ico { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font: var(--font-body); color: var(--text); opacity: 0.35; flex-shrink: 0; }
.train-week-row--done .train-week-ico { background: var(--primary); border-color: var(--primary); color: #111; opacity: 1; }

/* PROGRESS FILTERS + PHOTOS */
.progress-screen-heading { font: var(--font-page-greeting); margin-bottom: 12px; letter-spacing: 0; color: var(--text); }
.progress-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.progress-filter-btn {
    padding: 8px 14px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--btn-secondary-border);
    background: var(--btn-secondary-bg);
    color: var(--text);
    font: var(--font-stat-label);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.15s ease;
}
.progress-filter-btn.active { background: rgba(0, 0, 0, 0.06); font-weight: 500; }
:is(body.dark, body.dark-mode) .progress-filter-btn.active { background: rgba(255, 255, 255, 0.1); }
.progress-filter-btn:active { transform: scale(0.97); }
.progress-weight-hero { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.progress-weight-big { font: var(--font-stat-number); color: var(--text); }
.progress-weight-delta { font: var(--font-card-title); color: var(--text-secondary); }
.progress-strength-ex { font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin-bottom: 6px; }
.progress-strength-val { font: var(--font-stat-number); color: var(--text); margin-bottom: 8px; }
.progress-strength-note { font: var(--font-body); color: var(--text-secondary); opacity: 0.55; }
:is(body.dark, body.dark-mode) .progress-strength-note { opacity: 1; }
.progress-photos-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.progress-photos-head h2 { margin-bottom: 0; }
.progress-photos-seeall { font: var(--font-button); color: var(--text); opacity: 0.55; }
.progress-photos-row { display: flex; gap: 10px; }
.progress-photo-placeholder { flex: 1; aspect-ratio: 1; border-radius: 14px; background: var(--bg); border: 1px dashed var(--border); min-height: 80px; }

/* PROFILE HERO */
.profile-hero-card {
    background: #111111;
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px 18px 18px;
    margin-bottom: 14px;
    border: 1px solid #2c2c2e;
    box-shadow: var(--shadow-card);
}
.profile-hero-top { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.profile-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #2c2c2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}
.profile-hero-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-hero-name { font: var(--font-card-title); margin: 0; color: #ffffff; }
.profile-level-badge {
    background: var(--primary);
    color: #111111;
    font: var(--font-stat-label);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
}
.profile-hero-goal { font: var(--font-body); color: rgba(255, 255, 255, 0.75); margin-top: 4px; }
.profile-xp-wrap { margin-bottom: 14px; }
.profile-xp-track { height: 10px; border-radius: 999px; background: #2c2c2e; overflow: hidden; }
.profile-xp-fill { height: 100%; width: 0%; background: var(--primary); border-radius: 999px; transition: width 0.4s ease; }
.profile-xp-label { font: var(--font-section-header); text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.8); margin-top: 6px; }
.profile-hero-stats { display: flex; justify-content: space-between; gap: 8px; text-align: center; }
.profile-hero-stat { flex: 1; }
.phs-num { display: block; font: var(--font-stat-number); color: #ffffff; }
.phs-lbl { font: var(--font-stat-label); text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.65); }
/* Uppercase section header — match Progress cards (e.g. BODY STATS, LEVEL & XP): 11px / 700 / 1px / --text */
.pg-heading-achievements {
    margin: 0;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.35;
    color: var(--text);
}

/* Progress tab — achievements card header: ACHIEVEMENTS left, View All right */
.pg-progress-achievements-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 0 0 8px;
    box-sizing: border-box;
}
.pg-progress-achievements-title-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}
.pg-progress-achievements-trophy {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.profile-achievements-card .profile-achievements-title {
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.35;
    color: #888780;
}
body.dark .profile-achievements-card .profile-achievements-title,
body.dark-mode .profile-achievements-card .profile-achievements-title {
    color: var(--text);
}
.profile-hex-row { display: flex; justify-content: space-around; gap: 12px; padding: 8px 0; }
.profile-hex {
    width: 56px;
    height: 56px;
    background: #111;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.profile-quick-menu { padding: 0; overflow: hidden; }
.profile-menu-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 18px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font: var(--font-button);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, transform 0.1s ease;
}
.profile-menu-row:last-child { border-bottom: none; }
.profile-menu-row:active { transform: scale(0.99); background: var(--bg); }
.profile-menu-chev { font-size: 20px; opacity: 0.45; }

#profile-menu-v2-root .pg-profile-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 16px;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
#profile-menu-v2-root .pg-profile-avatar-logo {
  display: block;
  width: 46px;
  height: 46px;
  min-width: 46px;
  flex-shrink: 0;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  outline: none;
  box-shadow: none;
}
#profile-menu-v2-root .pg-profile-avatar-cam {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #FFFFFF;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1C1C1E;
  z-index: 2;
  box-shadow: 0 0 0 1px #E5E5EA;
  cursor: pointer;
}
#profile-menu-v2-root .pg-profile-avatar-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8E8E93;
}
#profile-menu-v2-root .pg-profile-hero-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#profile-menu-v2-root #profile-v2-display-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
#profile-menu-v2-root .pg-profile-hero-sub {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
#profile-menu-v2-root .pg-profile-chev {
  flex-shrink: 0;
  color: #C7C7CC;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}
#profile-menu-v2-root .pg-profile-section-label,
#pv2-account-sheet .pg-profile-section-label,
#pv2-data-privacy .pg-profile-section-label,
#pv2-help-feedback .pg-profile-section-label {
  margin: 0;
  margin-top: 0;
  padding: 6px 16px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1C1C1E;
  line-height: 1.2;
}
#pv2-account-sheet .pg-profile-section-label,
#pv2-data-privacy .pg-profile-section-label,
#pv2-help-feedback .pg-profile-section-label {
  padding: 16px 16px 6px;
}
/* Progress → Profile: the card owns the top padding (--space-card-y, same as Level Up → Pro cards). */
#profile-menu-v2-root .pg-profile-section-label {
  padding-top: 0;
}
#pv2-data-privacy .pg-profile-section-label {
  border-bottom: 1px solid #E5E5EA;
}
#profile-menu-v2-root .profile-v2-row {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
#profile-menu-v2-root .pg-profile-section-card,
.pg-profile-section-card {
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  overflow: hidden;
  background: #FFFFFF;
  box-sizing: border-box;
}
#profile-menu-v2-root .pg-profile-section-card {
  margin: 0 0 8px;
  padding: var(--space-card-y) 0;
}
#profile-menu-v2-root .pg-profile-section-card:has(+ #profile-v2-dev-anchor) {
  margin-bottom: 0;
}
#profile-menu-v2-root .pg-profile-section-card > .profile-v2-row:last-child,
.pg-profile-section-card > .profile-v2-row:last-child {
  border-bottom: none !important;
}
#profile-menu-v2-root .pg-profile-icon-well,
#pv2-account-sheet .pg-profile-icon-well,
#pv2-data-privacy .pg-profile-icon-well,
#pv2-help-feedback .pg-profile-icon-well {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F2F2F7;
  color: #1C1C1E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#profile-menu-v2-root .pg-profile-icon-well svg,
#pv2-account-sheet .pg-profile-icon-well svg,
#pv2-data-privacy .pg-profile-icon-well svg,
#pv2-help-feedback .pg-profile-icon-well svg {
  width: 20px;
  height: 20px;
}
#pv2-account-sheet .pg-profile-icon-well,
#pv2-data-privacy .pg-profile-icon-well,
#pv2-help-feedback .pg-profile-icon-well {
  width: 44px;
  height: 44px;
}
#pv2-account-sheet .pg-profile-icon-well svg,
#pv2-data-privacy .pg-profile-icon-well svg,
#pv2-help-feedback .pg-profile-icon-well svg {
  width: 24px;
  height: 24px;
}
#profile-menu-v2-root .pg-profile-logout + div {
  padding-top: 5px !important;
}
#profile-menu-v2-root .pg-profile-logout,
#pv2-account-sheet .pg-profile-logout {
  width: 100%;
  display: block;
  margin: 8px 0 0;
  padding: 6px 16px;
  min-width: 0;
  min-height: 0;
  border: 0.5px solid #EF4444;
  border-radius: 12px;
  background: #FEF2F2;
  color: #EF4444;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
#pv2-account-sheet .pg-profile-logout {
  padding: 14px 16px;
}
:is(body.dark, body.dark-mode) #profile-menu-v2-root .pg-profile-section-label,
:is(body.dark, body.dark-mode) #pv2-account-sheet .pg-profile-section-label,
:is(body.dark, body.dark-mode) #pv2-data-privacy .pg-profile-section-label,
:is(body.dark, body.dark-mode) #pv2-help-feedback .pg-profile-section-label {
  color: #8E8E93;
}
:is(body.dark, body.dark-mode) #pv2-data-privacy .pg-profile-section-label {
  border-bottom-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) #pv2-help-feedback .pg-profile-section-card {
  background: #1C1C1E;
  border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) #profile-menu-v2-root .pg-profile-hero,
:is(body.dark, body.dark-mode) #profile-menu-v2-root .pg-profile-section-card,
:is(body.dark, body.dark-mode) .pg-profile-section-card {
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-card-border);
  box-shadow: var(--pg-card-shadow);
}
:is(body.dark, body.dark-mode) #profile-menu-v2-root .pg-profile-avatar-cam {
  background: #1C1C1E;
  border-color: #1C1C1E;
  color: #FFFFFF;
  box-shadow: 0 0 0 1px #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-profile-icon-well,
:is(body.dark, body.dark-mode) #profile-menu-v2-root .pg-profile-icon-well,
:is(body.dark, body.dark-mode) #pv2-account-sheet .pg-profile-icon-well,
:is(body.dark, body.dark-mode) #pv2-data-privacy .pg-profile-icon-well,
:is(body.dark, body.dark-mode) #pv2-help-feedback .pg-profile-icon-well {
  background: var(--pg-icon-well-bg);
  color: var(--pg-icon-well-fg);
}
:is(body.dark, body.dark-mode) #profile-menu-v2-root .pg-profile-logout,
:is(body.dark, body.dark-mode) #pv2-account-sheet .pg-profile-logout {
  background: #3A0A0A;
  color: #EF4444;
}

/* MEALS — thumb */
.meal-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--border), var(--bg));
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.filter-bar .filter-btn { transition: transform 0.1s ease; }
.filter-bar .filter-btn:active { transform: scale(0.97); }


.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font: var(--font-button);
  font-family: 'Google Sans', Roboto, sans-serif;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Sign in with Apple — black button, white logo & label (Human Interface Guidelines) */
.btn-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  font: var(--font-button);
  -webkit-font-smoothing: antialiased;
}
.btn-apple:hover {
  background: #1a1a1a;
  border-color: #1C1C1E;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.btn-apple:active {
  opacity: 0.92;
}

/* ══ ONBOARDING V2 ══ */
.onboarding-v2 {
  position: fixed;
  inset: 0;
  background: #f2f2f7;
  color: #1c1c1e;
  color-scheme: light;
  z-index: 99999;
  overflow: hidden;
  /* JS sets display:flex when showing onboarding; default row breaks screen layout */
  flex-direction: column;
  align-items: stretch;
}
.onboarding-v2 > .ob2-screen {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ob2-screen {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 60px 24px calc(40px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  color: #1c1c1e;
}
/* Welcome: grey page; button stays pinned. */
#ob2-s1.ob2-screen {
  padding: 0;
  overflow: hidden;
}
#ob2-s2.ob2-screen,
#ob2-s3.ob2-screen,
#ob2-s4.ob2-screen,
#ob2-s5.ob2-screen,
#ob2-s6.ob2-screen,
#ob2-s14.ob2-screen,
#ob2-s15.ob2-screen,
#ob2-s16.ob2-screen {
  padding: 0;
  overflow: hidden;
}
.ob2-screen.active { display: block; }

/* Onboarding screens: same centred max-width strip as rest of app (480px). The :not(#ob2-s8) keeps this rule's specificity. */
.onboarding-v2 .ob2-screen:not(#ob2-s8).active {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.onboarding-v2 .ob2-screen:not(#ob2-s8).active > * {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.ob2-option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 2px solid #e5e5ea;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ob2-option.selected,
.ob2-option:active {
  border-color: #ffd60a;
  background: rgba(255, 214, 10, 0.22);
}
.ob2-cta {
  width: 100%;
  background: #ffd60a;
  color: #111;
  border: none;
  border-radius: 16px;
  padding: 18px;
  font: var(--font-button);
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  flex-shrink: 0;
}
.ob2-cta:active { transform: scale(0.98); }

.ob2-pill {
  flex: 1;
  min-width: 26%;
  padding: 10px 8px;
  border-radius: 12px;
  border: 2px solid #e5e5ea;
  background: #ffffff;
  color: #1c1c1e;
  font: var(--font-body);
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}
.ob2-pill.selected {
  border-color: #ffd60a;
  background: rgba(255, 214, 10, 0.22);
  color: #1c1c1e;
  font-weight: 700;
}
.onboarding-v2 input::placeholder {
  color: #c5c5c7;
}

/* ══ SLEEP MODAL ══ */
#sleep-modal {
  position: fixed;
  inset: 0;
  z-index: 50000;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.sleep-quick-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font: var(--font-button);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s;
}
.sleep-quick-btn:active { transform: scale(0.97); }

/* Add Water / Log Sleep sheets — hardcoded light surfaces. Light mode stays inline. */
:is(body.dark, body.dark-mode) #water-options-sheet > div,
:is(body.dark, body.dark-mode) #sleep-options-sheet > div {
  background: #1A1A1A !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet button[style*="background:#EFF8FF"] {
  background: #0A2A3D !important;
}
:is(body.dark, body.dark-mode) #sleep-options-sheet button[style*="background:#F3E8FF"],
:is(body.dark, body.dark-mode) #sleep-options-sheet span[style*="background:#F3E8FF"] {
  background: #1E0A3C !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet button[onclick*="openWaterCustomAmount"],
:is(body.dark, body.dark-mode) #sleep-options-sheet button[onclick*="openSleepCustomDuration"] {
  background: #1E1E1E !important;
  border-color: #2A2A2A !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet button[onclick*="openWaterCustomAmount"] > span[aria-hidden="true"],
:is(body.dark, body.dark-mode) #sleep-options-sheet button[onclick*="openSleepCustomDuration"] > span[aria-hidden="true"] {
  background: #3A3A3C !important;
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet button[onclick*="openWaterCustomAmount"] > span:not([aria-hidden]),
:is(body.dark, body.dark-mode) #sleep-options-sheet button[onclick*="openSleepCustomDuration"] > span:not([aria-hidden]) {
  background: transparent !important;
  background-color: transparent !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet div[style*="background:#E5E5EA"] {
  background: #3A3A3C !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet button[aria-label="Close"],
:is(body.dark, body.dark-mode) #sleep-options-sheet button[aria-label="Close"] {
  background: #3A3A3C !important;
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet [style*="color:var(--text)"],
:is(body.dark, body.dark-mode) #sleep-options-sheet [style*="color:var(--text)"] {
  color: #ffffff !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet [style*="color:var(--label-secondary)"],
:is(body.dark, body.dark-mode) #sleep-options-sheet [style*="color:var(--label-secondary)"] {
  color: #E5E5E5 !important;
}
:is(body.dark, body.dark-mode) #water-options-sheet button[onclick*="openWaterCustomAmount"] svg[stroke="#8E8E93"],
:is(body.dark, body.dark-mode) #sleep-options-sheet button[onclick*="openSleepCustomDuration"] svg[stroke="#8E8E93"] {
  stroke: #E5E5E5 !important;
}
:is(body.dark, body.dark-mode) #water-custom-amount-card {
  background: #1C1C1E !important;
}
:is(body.dark, body.dark-mode) #water-custom-amount-card p:first-of-type {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #water-custom-amount-card label {
  background: #1C1C1E !important;
  border-color: #3A3A3C !important;
}
:is(body.dark, body.dark-mode) #water-custom-amount-input {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #water-custom-amount-card div[style*="background:#EFF8FF"] {
  background: #1E3A5F !important;
}

/* Friends & shares — hardcoded light surfaces. Light mode stays inline. */
:is(body.dark, body.dark-mode) #profile-v2-sheet-host:has(#pg-friends-own-username),
:is(body.dark, body.dark-mode) #profile-v2-sheet-shell:has(#pg-friends-own-username),
:is(body.dark, body.dark-mode) #profile-v2-sheet-shell:has(#pg-friends-own-username) > #profile-v2-sheet-toolbar,
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) > div[style*="background:var(--bg)"] {
  background: #0A0A0A !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) div[style*="background:#fff"] {
  background: var(--pg-card-bg) !important;
  border: 1px solid var(--pg-card-border) !important;
  box-shadow: var(--pg-card-shadow) !important;
}
:is(body.dark, body.dark-mode) #pg-friends-add-input {
  background: var(--pg-field-bg) !important;
  background-color: var(--pg-field-bg) !important;
  color: var(--pg-field-fg) !important;
  border: none !important;
}
:is(body.dark, body.dark-mode) #pg-friends-add-input::placeholder {
  color: #8E8E93 !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) div[style*="background:#e0e0e0"] {
  background: #2A2A2A !important;
  color: #ffffff !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) button[style*="border:1px solid #e0e0e0"] {
  background: transparent !important;
  border-color: #2A2A2A !important;
  color: #ffffff !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) span[style*="background:#2A2A00"] {
  background: #2A2A00 !important;
  color: #FFD60A !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) p[style*="color: #1C1C1E"],
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) div[style*="color: #1C1C1E"] {
  color: #ffffff !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) p[style*="color:#8e8e93"],
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) div[style*="color:#8e8e93"] {
  color: #8E8E93 !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) div[style*="background:#eeeeee"] {
  background: #1E1E1E !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) button[aria-label="Copy username"] {
  background: var(--pg-card-bg) !important;
  color: #FFFFFF !important;
  border: 1px solid #3A3A3C !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) button[aria-label="Copy username"] svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}
#profile-v2-sheet-body:has(#pg-friends-own-username) .pg-friends-accept-btn {
  background: #dcfce7 !important;
  border: 1px solid #86EFAC !important;
  color: #30D158 !important;
  font-weight: 700 !important;
}
#profile-v2-sheet-body:has(#pg-friends-own-username) .pg-friends-decline-btn {
  background: #FEE2E2 !important;
  border: 1px solid #FCA5A5 !important;
  color: #FF3B30 !important;
  font-weight: 700 !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) .pg-friends-accept-btn {
  background: #1A3D2B !important;
  border: 1px solid #2D6A4A !important;
  color: #30D158 !important;
}
:is(body.dark, body.dark-mode) #profile-v2-sheet-body:has(#pg-friends-own-username) .pg-friends-decline-btn {
  background: #3D1A1A !important;
  border: 1px solid #6A2D2D !important;
  color: #FF3B30 !important;
}

/* Progress tab — achievements strip: full-bleed to card edges, no scrollbar.
   Negative margins cancel the card’s 16px horizontal padding so circles can
   scroll to the rounded card edge. Left padding keeps the first circle aligned
   with the header. End cap is a real flex item (32px so the last medal sits
   past the 28px right-edge fade). ::after / padding-right do not extend
   scrollWidth in overflow flex containers. */
#progress-dash-achievements-card {
  overflow-x: hidden;
}
/* Breakout wrapper. Right-edge fade overlay uses var(--card) so it still
   paints when CSS mask cannot reach a composited overflow:auto scroll layer
   (Chromium / WKWebView). Left edge stays unmasked — at rest the first
   medal sits in the 16px gutter, fully opaque. */
.progress-dash-achievements-strip-clip {
  position: relative;
  isolation: isolate;
  z-index: 0;
  width: calc(100% + 32px);
  max-width: none;
  min-width: 0;
  margin-left: -16px;
  margin-right: -16px;
  box-sizing: border-box;
}
.progress-dash-achievements-strip-clip::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  z-index: 2;
  /* Same RGB as the opaque stop so WK does not interpolate through gray. */
  background: linear-gradient(to right, rgba(255,255,255,0), var(--card));
}
body.dark .progress-dash-achievements-strip-clip::after,
body.dark-mode .progress-dash-achievements-strip-clip::after {
  background: linear-gradient(to right, rgba(44,44,46,0), var(--card));
}
#progress-dash-achievements-strip,
.progress-dash-achievements-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 6px 0 8px 16px;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Mask on the scroller + stacking context. Parent masks do not apply to
     overflow scroll compositor layers. translateZ(0) is the Chromium
     workaround so -webkit-mask-image actually fades the medals. */
  position: relative;
  z-index: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0) 0, #000 28px, #000 100%);
  mask-image: linear-gradient(to left, rgba(0,0,0,0) 0, #000 28px, #000 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
#progress-dash-achievements-strip > .progress-dash-achievements-endcap,
.progress-dash-achievements-strip > .progress-dash-achievements-endcap {
  /* 32px so the last medal sits past the 28px fade when fully scrolled right */
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  height: 1px;
  pointer-events: none;
  /* cancel the 8px row gap so end inset is a clean 32px */
  margin-left: -8px;
}
#progress-dash-achievements-strip::-webkit-scrollbar,
.progress-dash-achievements-strip::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#progress-dash-achievements-strip > div,
.progress-dash-achievements-strip > div {
  flex: 0 0 auto;
}
#progress-dash-achievements-strip button,
.progress-dash-achievements-strip button {
  touch-action: pan-x pan-y;
}

/* Progress Body Stats — goal pill + change-goal button (override global 44px button touch target) */
#progress-dash-weight-goal-tag .progress-dash-weight-goal-change-btn {
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  width: auto !important;
  line-height: 1.2 !important;
}

/* Profile v2 — Getting Started numbered onboarding list */
.pg-gs-sheet {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pg-gs-intro {
  margin: 0 0 4px;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.pg-gs-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 16px;
  padding: 12px 12px 12px 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.pg-gs-step-badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFD60A;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-gs-step-num {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.pg-gs-step-copy {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}
.pg-gs-step-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-gs-step-title-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.pg-gs-step-icon {
  display: block;
}
.pg-gs-step-body {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

/* Profile v2 — App Updates list: ~4 entries visible; rest scrolls inside the card */
.profile-v2-updates-scroll {
  max-height: 280px;
  overflow-y: scroll;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg);
  padding-right: 4px;
}
.profile-v2-updates-scroll::-webkit-scrollbar {
  width: 10px;
}
.profile-v2-updates-scroll::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 999px;
}
.profile-v2-updates-scroll::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

/* Progress achievement hex — Tabler webfont reads lighter with small size + low weight */
.pg-ach-ti-glyph {
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Progress achievements — View All is header-only; must not stack over the hex strip */
#progress-dash-achievements-see-all.progress-dash-achievements-view-all-btn,
button.progress-dash-achievements-view-all-btn {
  flex-shrink: 0;
  margin: 0;
  padding: 0 0 0 8px;
  min-width: 0;
  min-height: 0;
  height: auto;
  border: none;
  background: none !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  color: var(--label-secondary);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.home-setup-banner {
  margin: 0;
  border-radius: 12px;
  background: #FFF8D3;
  border: 1.5px solid #F5C518;
  cursor: pointer;
  flex-shrink: 0;
}
.home-setup-banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
}
.home-setup-banner-icon {
  flex-shrink: 0;
  display: flex;
  color: #1C1C1E;
}
.home-setup-banner-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.home-setup-banner-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1E;
  white-space: nowrap;
}
.home-setup-banner-sub {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: #6C6C70;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-setup-banner-chevron {
  flex-shrink: 0;
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #1C1C1E;
  line-height: 0;
}
:is(body.dark, body.dark-mode) .home-setup-banner {
  background: #FFD60A;
  border-color: #FFD60A;
}
:is(body.dark, body.dark-mode) .home-setup-banner-icon,
:is(body.dark, body.dark-mode) .home-setup-banner-title,
:is(body.dark, body.dark-mode) .home-setup-banner-chevron {
  color: #000000;
}

.home-fit {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-bottom-inset) + 8px);
  box-sizing: border-box;
}
.home-fit > * {
  margin: 0;
}
.home-fit > .home-setup-banner {
  margin-left: 12px;
  margin-right: 12px;
}
.home-fit-header {
  flex-shrink: 0;
  padding-left: 12px;
  padding-right: 12px;
}
.home-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6C6C70;
  line-height: 1.35;
}
.pg-progress-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.pg-progress-mini-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 10px 8px;
  box-sizing: border-box;
  text-align: left;
  background: var(--card);
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  cursor: pointer;
  min-height: 0;
  -webkit-appearance: none;
  appearance: none;
}
.pg-progress-mini-top {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
}
.pg-progress-mini-label {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-progress-mini-chev {
  color: #8E8E93;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.pg-progress-mini-value {
  display: block;
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
}
.pg-progress-mini-sub {
  display: block;
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
#pg-mini-workouts-sub {
  text-align: center;
  font-weight: 700;
}
.pg-progress-mini-chart {
  display: block;
  margin-top: 8px;
  height: 22px;
  min-height: 22px;
  overflow: hidden;
}
.pg-progress-mini-chart svg {
  display: block;
  width: 100%;
  height: 22px;
}
#pg-mini-workouts-chart.pg-progress-mini-types {
  height: auto;
  min-height: 0;
  overflow: visible;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
:is(body.dark, body.dark-mode) .pg-progress-mini-card,
:is(body.dark, body.dark-mode) .pg-progress-checkin {
  border-color: #3A3A3C;
}
.pg-progress-checkin {
  margin: 0 0 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid #E5E5E5;
  border-radius: 16px;
}
.pg-progress-checkin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pg-progress-section-label.home-kicker-today {
  margin-top: 0;
  margin-bottom: 6px;
  padding-top: 0;
  padding-bottom: 0;
}
.pg-progress-checkin-sub {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--label-secondary);
  white-space: nowrap;
}
#pg-progress-checkin-history {
  flex-shrink: 0;
  border: 1px solid #E5E5E5;
  border-radius: 10px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  min-height: 0;
  min-width: 0;
  white-space: nowrap;
  background: #FFFFFF;
  color: #1C1C1E;
}
.pg-progress-checkin-new {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  border: none;
  border-radius: 12px;
  background: #FFD60A;
  color: #000000;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  min-height: 0;
  min-width: 0;
}
.pg-checkin-page {
  --pg-ci-bg: #F2F2F7;
  --pg-ci-card: #FFFFFF;
  --pg-ci-text: #1C1C1E;
  --pg-ci-muted: #8E8E93;
  --pg-ci-border: #E5E5EA;
  --pg-ci-well: #FEF3C7;
  --pg-ci-ink: #000000;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  z-index: 75000;
  box-sizing: border-box;
  background: var(--pg-ci-bg);
  color: var(--pg-ci-text);
}
#progress-weight-entry-modal.pg-checkin-page {
  z-index: 76000;
}
.pg-checkin-scroll {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
  box-sizing: border-box;
}
.pg-checkin-page-edit .pg-checkin-scroll {
  bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  /* Edit check-in fits above Save/Delete — no scroll container. */
  overflow-y: hidden;
  -webkit-overflow-scrolling: auto;
  overscroll-behavior: none;
}
.pg-checkin-head {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4px 72px 8px;
}
.pg-checkin-cancel {
  position: absolute;
  left: 8px;
  top: calc(4px + (17px * 1.2) / 2);
  transform: translateY(-50%);
  margin: 0;
  padding: 8px 4px;
  border: none;
  background: none;
  color: #6C6C70;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
  min-width: 0;
  min-height: 0;
  -webkit-appearance: none;
  appearance: none;
}
:is(body.dark, body.dark-mode) .pg-checkin-page .pg-checkin-cancel {
  color: #8E8E93;
}
.pg-checkin-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pg-ci-text);
}
.pg-checkin-head p {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--label-secondary);
}
.pg-checkin-card {
  background: var(--pg-ci-card);
  border: 1px solid var(--pg-ci-border);
  border-radius: 16px;
  padding: 10px;
  box-sizing: border-box;
}
.pg-checkin-date-row,
.pg-checkin-weight,
.pg-checkin-page .pg-weight-photo-add-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  cursor: pointer;
}
.pg-checkin-date-row { position: relative; overflow: hidden; z-index: 1; }
.pg-checkin-well {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: #FEF3C7;
  background-color: #FEF3C7;
  color: #000000;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
:is(body.dark, body.dark-mode) .pg-checkin-page .pg-checkin-well {
  background: #2A2A00;
  background-color: #2A2A00;
  color: #FFD60A;
  opacity: 1;
}
.pg-checkin-page .pg-checkin-well svg {
  opacity: 1;
}
.pg-checkin-date-row .pg-checkin-well,
.pg-checkin-page .pg-checkin-weight > .pg-checkin-well {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
}
.pg-checkin-row-copy { flex: 1; min-width: 0; }
.pg-checkin-row-title,
.pg-checkin-page .pg-checkin-weight-copy label,
.pg-checkin-page .pg-checkin-field label {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--pg-ci-text);
}
.pg-checkin-row-sub,
.pg-checkin-date-value {
  display: block;
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--pg-ci-muted);
}
.pg-checkin-date-value {
  color: var(--pg-ci-text);
}
.pg-checkin-chev {
  flex-shrink: 0;
  color: var(--pg-ci-muted);
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}
.pg-checkin-page .pg-checkin-date-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  opacity: 0.01;
  background: transparent !important;
  cursor: pointer;
}
.pg-checkin-rule {
  height: 1px;
  margin: 8px 0;
  background: var(--pg-ci-border);
}
.pg-checkin-weight { align-items: center; }
.pg-checkin-weight-copy { flex: 1; min-width: 0; }
.pg-checkin-page .pg-checkin-weight-input {
  display: block;
  width: 100%;
  height: 36px;
  min-height: 36px;
  margin: 2px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent !important;
  color: var(--pg-ci-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.pg-checkin-page .pg-checkin-weight-input::placeholder {
  color: #8E8E93;
  font-size: 28px;
  font-weight: 700;
  opacity: 1;
}
.pg-checkin-page .pg-checkin-weight-input::-webkit-outer-spin-button,
.pg-checkin-page .pg-checkin-weight-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pg-checkin-page .pg-checkin-unit-select {
  width: auto;
  min-width: 76px;
  margin: 0;
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--pg-ci-border);
  border-radius: 10px;
  background: var(--pg-ci-card) !important;
  color: var(--pg-ci-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
}
.pg-checkin-kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 2px 3px;
}
.pg-checkin-kicker-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--pg-ci-text);
}
.pg-checkin-optional {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--pg-ci-muted);
  white-space: nowrap;
}
.pg-checkin-card:has(.pg-checkin-meas) {
  padding: 9px;
}
.pg-checkin-meas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pg-checkin-field-wide { grid-column: 1 / -1; }
.pg-checkin-page .pg-checkin-field label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}
.pg-checkin-page .pg-checkin-field input {
  display: block;
  width: 100%;
  height: 36px;
  min-height: 36px;
  margin: 3px 0 0;
  padding: 7px 10px;
  box-sizing: border-box;
  border: 1px solid var(--pg-ci-border);
  border-radius: 10px;
  background: var(--pg-ci-card) !important;
  color: var(--pg-ci-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}
.pg-checkin-page .pg-checkin-field input::placeholder,
.pg-checkin-page .pg-checkin-note::placeholder {
  color: #8E8E93;
  opacity: 1;
}
.pg-checkin-page .pg-weight-photo-thumbs {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.pg-checkin-page .pg-weight-photo-thumb {
  width: 64px;
  flex: 0 0 64px;
}
.pg-checkin-page .pg-weight-photo-thumb-frame {
  position: relative;
  width: 64px;
  height: 64px;
  background: transparent;
}
.pg-checkin-page .pg-weight-photo-thumb-open {
  width: 64px;
  height: 64px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pg-ci-bg, var(--bg));
  cursor: pointer;
  display: block;
  -webkit-appearance: none;
  appearance: none;
}
.pg-checkin-page .pg-weight-photo-thumb-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pg-checkin-page .pg-weight-photo-thumb-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 2;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #FF3B30;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pg-checkin-page .pg-weight-photo-thumb-remove span {
  display: block;
  line-height: 1;
  transform: translateY(-0.5px);
}
.pg-checkin-page .pg-weight-photo-angle-edit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 100%;
  height: 26px;
  min-height: 26px;
  margin: 0;
  padding: 0 4px;
  border: none;
  border-radius: 0 0 10px 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pg-checkin-page .pg-weight-photo-chooser {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.pg-checkin-page .pg-weight-photo-chooser-row {
  display: flex;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.pg-checkin-page .pg-weight-photo-take,
.pg-checkin-page .pg-weight-photo-gallery {
  flex: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 12px 10px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pg-checkin-page .pg-weight-photo-take {
  border: none;
  background: #FFD60A;
  color: #000000;
}
.pg-checkin-page .pg-weight-photo-gallery {
  background: transparent;
  color: var(--pg-ci-text);
  border: 1px solid var(--pg-ci-border);
}
.pg-checkin-page .pg-weight-photo-chooser-cancel {
  display: block;
  width: 100%;
  margin: 0;
  padding: 4px;
  border: none;
  background: none;
  color: var(--pg-ci-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  min-height: 0;
  -webkit-appearance: none;
  appearance: none;
}
.pg-checkin-page .pg-checkin-note {
  display: block;
  width: 100%;
  /* Fixed 2-line box: 8+8 padding + 2 × (15px × 1.4). Does not grow with content. */
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  margin: 0 0 2px;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid var(--pg-ci-border);
  border-radius: 12px;
  background: var(--pg-ci-card) !important;
  color: var(--pg-ci-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  font-family: inherit;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
}
.pg-weight-photo-angle-sheet {
  position: fixed;
  inset: 0;
  z-index: 78500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}
.pg-weight-photo-angle-panel {
  width: 100%;
  max-width: 480px;
  margin: 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  box-sizing: border-box;
}
.pg-weight-photo-angle-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.pg-weight-photo-angle-sub {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}
.pg-weight-photo-angle-preview {
  width: 88px;
  height: 88px;
  margin: 14px auto 0;
  border-radius: 12px;
  overflow: hidden;
  background: #E5E5EA;
}
.pg-weight-photo-angle-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg-weight-photo-angle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 0;
}
.pg-weight-photo-angle-opt {
  margin: 0;
  padding: 14px 10px;
  border: 1px solid #E5E5E5;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pg-weight-photo-angle-cancel {
  display: block;
  width: 100%;
  margin: 12px 0 0;
  padding: 10px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pg-checkin-savebar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--pg-ci-bg);
  border: none;
  border-top: none;
  box-shadow: none;
  outline: none;
  box-sizing: border-box;
}
.pg-checkin-page-edit .pg-checkin-savebar {
  /* Delete’s bottom edge sits just above the safe-area inset. */
  padding: 8px 16px env(safe-area-inset-bottom, 0px);
  border: none;
  border-top: none;
  box-shadow: none;
}
.pg-checkin-save {
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 14px;
  background: #FFD60A;
  color: #000000;
  padding: 14px 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  min-height: 48px;
  box-sizing: border-box;
}
.pg-checkin-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 8px 0 0;
  padding: 8px 4px;
  border: none;
  border-radius: 0;
  background: none;
  color: #FF3B30;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  min-height: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pg-checkin-delete svg {
  flex: 0 0 auto;
  display: block;
}
#progress-dash-achievements-card .pg-progress-achievements-header {
  margin: 0;
  gap: 8px;
  justify-content: flex-start;
}
#progress-dash-achievements-card .pg-progress-ach-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  flex-shrink: 0;
}
#progress-dash-achievements-card #progress-dash-achievements-strip {
  flex: 1;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-mask-image: none;
  mask-image: none;
  -webkit-transform: none;
  transform: none;
}
#progress-dash-achievements-card #progress-dash-achievements-strip > button {
  flex: 0 0 25%;
  width: 25%;
  min-width: 25%;
  max-width: 25%;
  height: 28px;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
#progress-dash-achievements-card #progress-dash-achievements-see-all {
  font-size: 13px;
  font-weight: 600;
  padding-left: 4px;
}
.progress-dash-detail {
  display: none;
}
.progress-dash-detail.is-open {
  display: block;
}
.pg-progress-detail-page {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 74000;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
}
.pg-progress-detail-page[hidden] {
  display: none !important;
}
html.pg-progress-detail-open,
body.pg-progress-detail-open {
  overflow: hidden;
}
.pg-progress-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.pg-progress-detail-head {
  max-width: 480px;
  margin: 0 auto 12px;
  min-height: 0;
}
.pg-progress-detail-head [data-pg-standard-header="1"] {
  margin-bottom: 0;
}
.pg-progress-detail-back {
  display: none;
}
.pg-progress-detail-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.pg-progress-detail-page .progress-dash-detail {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.pg-body-stats-share {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0 4px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pg-progress-detail-page.pg-body-stats {
  background: #F2F2F7;
}
:is(body.dark, body.dark-mode) .pg-progress-detail-page.pg-body-stats {
  background: #000000;
}
.pg-progress-detail-page.pg-body-stats .pg-progress-detail-head {
  position: relative;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 6px;
}
.pg-progress-detail-page.pg-body-stats .pg-body-stats-share,
.pg-progress-detail-page.pg-nutrition-trends .pg-body-stats-share,
.pg-progress-detail-page.pg-exercise-progress .pg-body-stats-share,
.pg-progress-detail-page.pg-lifting-volume .pg-body-stats-share,
.pg-progress-detail-page.pg-training-frequency .pg-body-stats-share {
  display: flex;
}
.pg-progress-detail-page.pg-training-frequency {
  background: #F2F2F7;
}
:is(body.dark, body.dark-mode) .pg-progress-detail-page.pg-training-frequency {
  background: #000000;
}
.pg-progress-detail-page.pg-training-frequency .pg-progress-detail-head {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 6px;
}
.pg-progress-detail-page.pg-training-frequency .pg-progress-detail-scroll {
  padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
}
.pg-training-freq-screen.is-open {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.pg-training-freq-screen .pg-freq-ranges {
  margin: 0 0 12px;
}
.pg-training-freq-screen .pg-body-stats-card {
  margin-bottom: 8px;
}
.pg-freq-hero-value {
  margin: 4px 0 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.pg-freq-hero-value span {
  font-size: 18px;
  font-weight: 700;
}
.pg-freq-includes {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-freq-cal-head,
.pg-freq-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.pg-freq-cal-head {
  margin: 0 0 6px;
}
.pg-freq-cal-head span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #8E8E93;
}
.pg-freq-cal.is-scroll {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  scrollbar-width: none;
}
.pg-freq-cal.is-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.pg-freq-cal-weeks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pg-freq-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  flex: 0 0 auto;
}
.pg-freq-day {
  position: relative;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #8E8E93;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-height: 0;
}
.pg-freq-day.is-trained {
  background: #30D158;
  color: #FFFFFF;
}
.pg-freq-day.is-rest {
  background: #A855F7;
  color: #FFFFFF;
}
.pg-freq-day.is-none {
  background: #F2F2F7;
  color: #8E8E93;
}
.pg-freq-day.is-out {
  background: transparent;
  color: #C7C7CC;
}
.pg-freq-day.is-on {
  border-color: #1C1C1E;
}
.pg-freq-day i {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-style: normal;
  font-size: 9px;
  line-height: 1;
}
:is(body.dark, body.dark-mode) .pg-freq-day.is-none {
  background: #2C2C2E;
}
:is(body.dark, body.dark-mode) .pg-freq-day.is-on {
  border-color: #FFFFFF;
}
.pg-freq-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 10px 0 0;
}
.pg-freq-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #8E8E93;
}
.pg-freq-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.pg-freq-legend i.is-trained { background: #30D158; }
.pg-freq-legend i.is-rest { background: #A855F7; }
.pg-freq-legend i.is-none { background: #E5E5EA; }
.pg-freq-tap-hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #8E8E93;
}
.pg-training-freq-screen .pg-freq-stats {
  padding: 8px 4px;
}
.pg-freq-stats p {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8E8E93;
  white-space: nowrap;
}
.pg-freq-selected-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.pg-freq-selected-head p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.pg-freq-selected-head span {
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
}
.pg-freq-session {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pg-freq-session-well {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: #FEF3C7;
  color: #1C1C1E;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-freq-session-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-freq-session-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-freq-session-copy span,
.pg-freq-selected-count,
.pg-freq-selected-empty {
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
}
.pg-freq-session-chev {
  color: #8E8E93;
  font-size: 16px;
}
.pg-freq-selected-count,
.pg-freq-selected-empty {
  margin: 6px 0 0;
}
.pg-freq-footnote {
  margin: 8px 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #8E8E93;
  text-align: center;
}
.pg-achievements-page {
  position: fixed;
  inset: 0;
  z-index: 85000;
  display: flex;
  flex-direction: column;
  background: #F2F2F7;
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
}
#pg-achievements-list-page {
  z-index: 86000;
}
.pg-achievements-page[hidden] {
  display: none !important;
}
html.pg-achievements-open,
body.pg-achievements-open {
  overflow: hidden;
}
.pg-achievements-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.pg-achievements-head {
  position: relative;
  min-height: 0;
  margin: 0 0 12px;
}
.pg-achievements-head [data-pg-standard-header="1"] {
  margin-bottom: 0;
}
.pg-achievements-head h1 {
  margin: 0;
  max-width: calc(100% - 96px);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}
.pg-ach-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 10px;
  box-sizing: border-box;
}
.pg-ach-kicker,
.pg-ach-collection-sub,
.pg-ach-next-desc {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-ach-collection {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pg-ach-collection-copy {
  flex: 1;
  min-width: 0;
}
.pg-ach-collection-value {
  margin: 2px 0 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.pg-ach-collection-sub {
  margin-top: 6px;
}
.pg-ach-collection-star {
  flex-shrink: 0;
}
.pg-ach-bar {
  height: 6px;
  border-radius: 99px;
  background: #E5E5EA;
  overflow: hidden;
}
.pg-ach-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: #FFD60A;
}
.pg-ach-next-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pg-ach-next-copy {
  flex: 1;
  min-width: 0;
}
.pg-ach-next-title {
  margin: 1px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.pg-ach-next-count {
  margin: 0;
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pg-ach-pills {
  margin: 4px 0 10px;
}
.pg-ach-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.pg-ach-filter-row > span {
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
}
.pg-ach-cat select {
  margin: 0;
  padding: 8px 28px 8px 12px;
  border: none;
  border-radius: 12px;
  background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 L6 6.5 L11 1.5' fill='none' stroke='%231C1C1E' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pg-ach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
#pg-achievements-page .pg-achievements-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0;
}
#pg-achievements-page #pg-achievements-body {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
#pg-achievements-page .pg-ach-above {
  flex: 0 0 auto;
  overflow: hidden;
}
#pg-achievements-page .pg-achievements-head {
  flex-shrink: 0;
  margin-bottom: 6px;
}
#pg-achievements-page .pg-ach-card {
  margin-bottom: 10px;
}
#pg-achievements-page .pg-ach-pills {
  flex-shrink: 0;
  margin: 0 0 12px;
  border: none;
  box-shadow: none;
}
#pg-achievements-page .pg-ach-detail {
  flex-shrink: 0;
  margin-bottom: 12px;
}
#pg-achievements-page .pg-ach-grid-scroll {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  margin: 0;
  overflow: visible;
}
#pg-achievements-page .pg-ach-grid-scroll::-webkit-scrollbar {
  display: none;
}
#pg-achievements-page .pg-ach-grid {
  overflow: visible;
  height: auto;
  margin: 0;
}
.pg-ach-home-dock {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  margin: 16px auto 0;
  padding: 0 16px calc(8px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: #F2F2F7;
}
.pg-ach-home-dock .pg-ach-viewall {
  margin: 0;
}
.pg-ach-home-dock .pg-ach-footnote {
  margin: 10px 4px 0;
}
.pg-ach-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 14px 6px 12px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: #FFFFFF;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pg-ach-badge strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--text);
}
.pg-ach-badge > span {
  font-size: 12px;
  font-weight: 500;
  color: #8E8E93;
  text-align: center;
}
.pg-ach-badge.is-on {
  outline: 1px solid #1C1C1E;
  outline-offset: -2px;
}
.pg-ach-empty {
  grid-column: 1 / -1;
  margin: 8px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
}
.pg-ach-detail .pg-ach-next-count {
  margin: 8px 0;
}
.pg-ach-viewall {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 10px 0 0;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pg-ach-viewall span:last-child {
  color: #8E8E93;
  font-size: 20px;
  font-weight: 500;
}
.pg-ach-footnote {
  margin: 10px 4px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: #8E8E93;
  text-align: center;
}
.pg-ach-list-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 14px 12px 4px;
}
.pg-achievements-list {
  padding-top: env(safe-area-inset-top, 0px);
}
.pg-achievements-list .pg-achievements-head {
  max-width: 480px;
  width: 100%;
  margin: 0 auto 8px;
  padding: 4px 16px 0;
  box-sizing: border-box;
  min-height: 0;
}
.pg-achievements-list .pg-achievements-head-titles {
  text-align: center;
}
.pg-achievements-list .pg-achievements-head h1 {
  max-width: none;
}
.pg-ach-list-sub,
#pg-achievements-list-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
.pg-achievements-list .pg-achievements-scroll {
  padding: 0 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
.pg-achievements-list:has(#pg-ach-list-detail:not([hidden])) .pg-achievements-scroll {
  padding-bottom: 12px;
}
#pg-achievements-list-page .pg-ach-list-grid {
  margin-top: 12px;
}
.pg-ach-list-grid .pg-ach-badge {
  padding: 16px 8px 12px;
}
.pg-ach-badge-status {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
  text-align: center;
}
.pg-ach-badge-bar {
  width: 100%;
  margin-top: 6px;
  padding: 0 6px;
  box-sizing: border-box;
}
.pg-ach-list-detail {
  flex: 0 0 auto;
  max-width: 480px;
  width: calc(100% - 32px);
  margin: 8px auto calc(8px + env(safe-area-inset-bottom, 0px));
  padding: 14px 16px;
  box-sizing: border-box;
  border-top: 1px solid #E5E5E5;
}
.pg-ach-list-detail[hidden] {
  display: none !important;
}
.pg-ach-list-detail .pg-ach-next-desc {
  margin-top: 4px;
}
.pg-ach-list-detail .pg-ach-badge-status {
  display: block;
  margin-top: 8px;
  text-align: left;
}
:is(body.dark, body.dark-mode) .pg-achievements-page,
:is(body.dark, body.dark-mode) .pg-ach-home-dock {
  background: #000000;
}
:is(body.dark, body.dark-mode) .pg-ach-list-detail {
  border-top-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-ach-card,
:is(body.dark, body.dark-mode) .pg-ach-badge,
:is(body.dark, body.dark-mode) .pg-ach-viewall,
:is(body.dark, body.dark-mode) .pg-ach-list-card {
  background-color: var(--pg-card-bg);
  border: 1px solid var(--pg-card-border);
  box-shadow: var(--pg-card-shadow);
}
:is(body.dark, body.dark-mode) .pg-ach-cat select {
  background-color: #1C1C1E;
}
:is(body.dark, body.dark-mode) .pg-ach-bar {
  background: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-ach-badge.is-on {
  outline-color: #FFFFFF;
}
:is(body.dark, body.dark-mode) .pg-ach-cat select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 L6 6.5 L11 1.5' fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.pg-progress-detail-page.pg-workout-progress {
  background: #F2F2F7;
  border: none;
  box-shadow: none;
}
:is(body.dark, body.dark-mode) .pg-progress-detail-page.pg-workout-progress {
  background: #000000;
}
.pg-progress-detail-page.pg-workout-progress .pg-progress-detail-head {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 6px;
}
.pg-progress-detail-page.pg-workout-progress .pg-progress-detail-scroll {
  display: flex;
  flex-direction: column;
  padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
  padding-bottom: 0;
  overflow: hidden;
  border: none;
  border-bottom: none;
  box-shadow: none;
}
.pg-workout-progress-screen.is-open {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border: none;
  border-bottom: none;
  box-shadow: none;
}
.pg-workout-progress-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  box-sizing: border-box;
  color: #8E8E93;
  flex-shrink: 0;
}
:is(body.dark, body.dark-mode) .pg-workout-progress-search {
  background: #1C1C1E;
  border-color: #3A3A3C;
}
.pg-workout-progress-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.pg-workout-progress-search input::placeholder {
  color: #8E8E93;
}
.pg-workout-progress-screen .pg-workout-progress-filters {
  margin: 0 0 12px;
  flex-shrink: 0;
}
.pg-workout-progress-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 0;
  border: none;
  border-bottom: none;
  box-shadow: none;
}
.pg-workout-progress-card {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  background: #FFFFFF;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  box-shadow: none;
}
:is(body.dark, body.dark-mode) .pg-workout-progress-card {
  background: #1C1C1E;
  border-color: #3A3A3C;
}
.pg-workout-progress-card-well {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: #FEF3C7;
  color: #1C1C1E;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
:is(body.dark, body.dark-mode) .pg-workout-progress-card-well {
  background: #3A2E0A;
  color: #FFD60A;
}
.pg-workout-progress-card-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-workout-progress-card-copy strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-workout-progress-card-copy span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-workout-progress-card-copy .pg-workout-progress-card-sub {
  font-size: clamp(9px, 2.6vw, 10px);
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}
.pg-workout-progress-card-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: 0;
}
.pg-workout-progress-card-chart {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  height: 28px;
  flex: 0 0 56px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-workout-progress-card-chart svg {
  width: 56px !important;
  max-width: 56px;
  height: 28px !important;
  display: block;
}
.pg-workout-progress-card-chev {
  flex-shrink: 0;
  color: #8E8E93;
  font-size: 16px;
  line-height: 1;
}
.pg-workout-progress-card-lock {
  flex-shrink: 0;
}
.pg-progress-detail-page.pg-lifting-volume {
  background: #F2F2F7;
}
:is(body.dark, body.dark-mode) .pg-progress-detail-page.pg-lifting-volume {
  background: #000000;
}
.pg-progress-detail-page.pg-lifting-volume .pg-progress-detail-head {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 6px;
}
.pg-progress-detail-page.pg-lifting-volume .pg-progress-detail-scroll {
  padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
}
.pg-lifting-volume-screen.is-open {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.pg-lifting-volume-screen .pg-lift-vol-ranges {
  margin: 0 0 12px;
}
.pg-lifting-volume-screen .pg-body-stats-card {
  margin-bottom: 8px;
}
.pg-lift-vol-main-card {
  /* Match Nutrition Trends Daily Average card proportions */
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
}
.pg-lift-vol-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.pg-lift-vol-units {
  margin: 0;
}
.pg-lift-vol-chart {
  height: 165px;
  max-height: 165px;
  min-height: 165px;
  position: relative;
  margin: 2px 0 0;
  flex: 0 0 165px;
}
.pg-lift-vol-chart canvas {
  width: 100% !important;
  height: 165px !important;
  max-height: 165px !important;
}
.pg-lift-vol-hint {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-lift-vol-stats {
  margin-bottom: 12px;
}
.pg-lift-vol-stats p {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8E8E93;
}
.pg-lift-vol-sessions-card {
  margin-bottom: 0;
  padding-bottom: 4px;
}
#pg-lift-vol-sessions-list.is-capped {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#pg-lift-vol-sessions-list.is-capped::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.pg-lift-vol-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid #E5E5EA;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pg-lift-vol-session-row:last-child {
  border-bottom: none;
}
:is(body.dark, body.dark-mode) .pg-lift-vol-session-row {
  border-bottom-color: #3A3A3C;
}
.pg-lift-vol-session-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-lift-vol-session-left span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
.pg-lift-vol-session-left strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.pg-lift-vol-session-right {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8E8E93;
}
.pg-lift-vol-session-right strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.pg-lift-vol-footnote {
  margin: 4px 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #8E8E93;
  text-align: center;
}
.pg-lift-vol-footnote-brand {
  margin-top: 8px;
}
.pg-progress-detail-page.pg-exercise-progress {
  background: #F2F2F7;
}
:is(body.dark, body.dark-mode) .pg-progress-detail-page.pg-exercise-progress {
  background: #000000;
}
.pg-progress-detail-page.pg-exercise-progress .pg-progress-detail-head {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 6px;
}
.pg-progress-detail-page.pg-exercise-progress .pg-progress-detail-scroll {
  overflow-y: auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pg-exercise-progress-screen.is-open {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.pg-exercise-progress-screen .pg-body-stats-card {
  margin-bottom: 8px;
}
.pg-exercise-progress-screen .pg-ex-progress-mode-tabs {
  margin: 0 0 12px;
}
.pg-exercise-progress-screen .pg-ex-progress-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 12px;
  background: #FFFBEB;
  border: 1px solid #FFD60A;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
}
:is(body.dark, body.dark-mode) .pg-exercise-progress-screen .pg-ex-progress-picker {
  background: #2A2A00;
  border-color: #FFD60A;
}
.pg-ex-progress-picker-well {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: #FDE68A;
  color: #1C1C1E;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-picker-well {
  background: #3A3A00;
  color: #FFD60A;
}
.pg-ex-progress-picker-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pg-ex-progress-picker-copy .pg-ex-progress-picker-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-ex-progress-picker-copy strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.pg-ex-progress-picker-copy span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
.pg-ex-progress-change {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #1C1C1E;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-change {
  background: #FFFFFF;
  color: #1C1C1E;
}
.pg-exercise-progress-screen .pg-ex-progress-ranges {
  margin: 0 0 6px;
  background: #F2F2F7;
  border: 1px solid #E5E5E5;
}
.pg-exercise-progress-screen .pg-ex-progress-ranges button {
  color: #8E8E93;
}
.pg-exercise-progress-screen .pg-ex-progress-ranges button.is-on {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.pg-exercise-progress-screen .pg-ex-progress-main-card {
  padding: 16px 16px;
}
.pg-ex-progress-hero {
  margin: 0 0 4px;
}
.pg-ex-progress-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.pg-ex-progress-hero-copy {
  min-width: 0;
}
.pg-ex-progress-units {
  margin: 0;
  align-self: flex-end;
}
.pg-ex-progress-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8E8E93;
}
.pg-ex-progress-hero-value {
  margin: 2px 0 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.pg-ex-progress-delta {
  margin: 2px 0 0;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #30D158;
}
.pg-ex-progress-metric-tabs {
  margin: 0 0 2px;
}
.pg-ex-progress-chart {
  height: 190px;
  max-height: 190px;
  min-height: 190px;
  position: relative;
  margin: 0;
  flex: 0 0 190px;
}
.pg-ex-progress-chart canvas {
  width: 100% !important;
  height: 190px !important;
  max-height: 190px !important;
}
.pg-ex-progress-hint {
  margin: 2px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-exercise-progress-screen .pg-ex-progress-stats {
  align-items: center;
  margin: 4px 0 0;
  padding: 8px 4px 0;
}
.pg-exercise-progress-screen .pg-ex-progress-stats > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
}
.pg-exercise-progress-screen .pg-ex-progress-stats p {
  white-space: nowrap;
}
.pg-ex-progress-sessions-count {
  color: var(--text);
  font-weight: 700;
}
.pg-exercise-progress-screen .pg-ex-progress-sessions-card {
  margin-bottom: 0;
  padding-bottom: 2px;
}
#pg-ex-progress-sessions-list {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#pg-ex-progress-sessions-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.pg-ex-progress-all-page {
  position: fixed;
  inset: 0;
  z-index: 75000;
  display: flex;
  flex-direction: column;
  background: #F2F2F7;
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-all-page {
  background: #000000;
}
.pg-ex-progress-all-page .pg-progress-detail-scroll {
  flex: 1;
  min-height: 0;
}
.pg-ex-progress-all-card {
  margin-bottom: 0;
}
.pg-ex-progress-sessions-card #pg-ex-progress-view-all {
  color: #8E8E93;
  font-weight: 500;
}
.pg-ex-progress-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 4px 0;
  border-bottom: 1px solid #E5E5EA;
  box-sizing: border-box;
}
.pg-ex-progress-session-row:last-child {
  border-bottom: none;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-session-row {
  border-bottom-color: #3A3A3C;
}
.pg-ex-progress-session-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-ex-progress-session-left strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.pg-ex-progress-session-left span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
.pg-ex-progress-session-right {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8E8E93;
}
.pg-ex-progress-session-right strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.pg-ex-progress-sessions-empty {
  margin: 8px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
}
.pg-ex-progress-footnote {
  margin: 8px 4px 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #8E8E93;
  text-align: center;
}
.pg-ex-progress-picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 76000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pg-ex-progress-picker-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: var(--pg-ci-bg, rgba(0,0,0,0.35));
  cursor: pointer;
}
.pg-ex-progress-picker-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: min(86dvh, 740px);
  max-height: min(86dvh, 740px);
  background: var(--pg-ci-card, #FFFFFF);
  color: var(--pg-ci-text, #1C1C1E);
  border-radius: 20px 20px 0 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pg-ex-progress-picker-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px;
  flex-shrink: 0;
}
.pg-ex-progress-picker-titles {
  min-width: 0;
  flex: 1;
}
.pg-ex-progress-picker-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  color: var(--pg-ci-text, #1C1C1E);
}
.pg-ex-progress-picker-sub {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  color: #8E8E93;
}
.pg-ex-progress-picker-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 16px;
  background: #F2F2F7;
  color: #8E8E93;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.pg-ex-progress-picker-tools {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  padding: 0 16px 12px;
}
.pg-ex-progress-picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin: 0 0 10px;
  padding: 0 14px;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
}
.pg-ex-progress-picker-search svg {
  display: block;
  flex-shrink: 0;
}
.pg-ex-progress-picker-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--pg-ci-text, #1C1C1E);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}
.pg-ex-progress-picker-search input::placeholder {
  color: #6C6C70;
}
.pg-ex-progress-picker-filters {
  display: flex;
  gap: 10px;
}
.pg-ex-progress-picker-filter-slot {
  position: relative;
  flex: 1;
  min-width: 0;
}
.pg-ex-progress-picker-filter {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 14px;
  color: #111111;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.pg-ex-progress-picker-filter svg {
  flex-shrink: 0;
  display: block;
}
.pg-ex-progress-picker-filter-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.pg-ex-progress-picker-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 3;
  max-height: min(280px, 40vh);
  background: var(--pg-ci-card, #FFFFFF);
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.pg-ex-progress-picker-dropdown[hidden] {
  display: none !important;
}
.pg-ex-progress-picker-dropdown-list {
  max-height: min(280px, 40vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pg-ex-progress-picker-dropdown-opt {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--pg-ci-text, #1C1C1E);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.pg-ex-progress-picker-dropdown-opt.is-on {
  background: #FFD60A;
  color: #000000;
  font-weight: 700;
}
.pg-ex-progress-picker-panel-list {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(8px + env(safe-area-inset-bottom, 0px));
}
.pg-ex-progress-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  min-height: 0;
  border: none;
  border-bottom: 1px solid var(--pg-ci-border, #E5E5EA);
  border-left: 3px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pg-ex-progress-picker-row.is-last {
  border-bottom: none;
}
.pg-ex-progress-picker-row.is-on {
  background: rgba(255, 214, 10, 0.12);
  border-left-color: #FFD60A;
  border-bottom: 1px solid rgba(255, 214, 10, 0.3);
}
.pg-ex-progress-picker-radio {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}
.pg-ex-progress-picker-row.is-on .pg-ex-progress-picker-radio {
  border-color: #FFD60A;
  background: #FFD60A;
}
.pg-ex-progress-picker-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.pg-ex-progress-picker-row-copy strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pg-ci-text, #1C1C1E);
}
.pg-ex-progress-picker-row-copy span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #8E8E93;
}
.pg-ex-progress-picker-empty {
  margin: 20px 12px;
  text-align: center;
  color: var(--pg-ci-muted, #8E8E93);
  font-size: 14px;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-picker-close {
  background: #2C2C2E;
  color: #8E8E93;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-picker-search,
:is(body.dark, body.dark-mode) .pg-ex-progress-picker-filter {
  background: #1C1C1E;
  border-color: #3A3A3C;
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-picker-dropdown {
  border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-picker-radio {
  border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-ex-progress-picker-row.is-on .pg-ex-progress-picker-radio {
  border-color: #FFD60A;
  background: #FFD60A;
}
.pg-progress-detail-page.pg-nutrition-trends {
  background: #F2F2F7;
}
:is(body.dark, body.dark-mode) .pg-progress-detail-page.pg-nutrition-trends {
  background: #000000;
}
.pg-progress-detail-page.pg-nutrition-trends .pg-progress-detail-head {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 6px;
}
.pg-progress-detail-page.pg-nutrition-trends .pg-progress-detail-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pg-nutrition-trends-screen.is-open {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.pg-nutrition-trends-screen .pg-body-stats-card {
  margin-bottom: 8px;
}
.pg-nutrition-trends-screen .pg-nut-trends-ranges {
  margin: 0 0 12px;
}
.pg-nut-trends-kicker-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  line-height: 1.2;
}
.pg-nut-trends-kicker,
.pg-nut-trends-kicker-sep,
.pg-nut-trends-period {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1C1C1E;
}
:is(body.dark, body.dark-mode) .pg-nut-trends-kicker,
:is(body.dark, body.dark-mode) .pg-nut-trends-kicker-sep,
:is(body.dark, body.dark-mode) .pg-nut-trends-period {
  color: #FFFFFF;
}
.pg-nut-trends-kicker-sep {
  letter-spacing: 0;
  text-transform: none;
}
.pg-nut-trends-period {
  letter-spacing: 0.02em;
  text-transform: none;
}
.pg-nut-trends-avg-value {
  margin: 2px 0 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text);
}
.pg-nut-trends-avg-sub {
  margin: 2px 0 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-nut-trends-macro-tabs {
  display: flex;
  gap: 0;
  margin: 0;
  border-bottom: 1px solid #E5E5EA;
}
.pg-nut-trends-macro-tabs button {
  flex: 1;
  margin: 0;
  padding: 6px 4px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8E8E93;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  min-height: 0;
}
.pg-nut-trends-macro-tabs button.is-on {
  color: #1C1C1E;
  border-bottom-color: #1C1C1E;
  font-weight: 700;
}
:is(body.dark, body.dark-mode) .pg-nut-trends-macro-tabs {
  border-bottom-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-nut-trends-macro-tabs button.is-on {
  color: #FFFFFF;
  border-bottom-color: #FFFFFF;
}
.pg-nut-trends-chart {
  /* Match Body Stats `.pg-body-stats-chart` so Daily Average ≈ Current Weight card height. */
  height: 165px;
  max-height: 165px;
  min-height: 165px;
  position: relative;
  margin: 2px 0 0;
  flex: 0 0 165px;
}
.pg-nut-trends-chart canvas {
  width: 100% !important;
  height: 165px !important;
  max-height: 165px !important;
}
.pg-nut-trends-hint {
  margin: 2px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-nut-trends-card-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.pg-nut-trends-macros-card {
  padding-top: 10px;
  padding-bottom: 10px;
}
.pg-nut-trends-macros-card .pg-nut-trends-card-title {
  margin: 0 0 4px;
  font-size: 15px;
}
.pg-nut-trends-macros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  align-items: center;
}
.pg-nut-trends-macros-grid > div {
  position: relative;
  text-align: center;
  padding: 0 6px;
  box-sizing: border-box;
}
/* Short rules like Add food calories/quantity dividers — not full column height. */
.pg-nut-trends-macros-grid > div + div::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 28px;
  background: #E5E5EA;
  pointer-events: none;
}
:is(body.dark, body.dark-mode) .pg-nut-trends-macros-grid > div + div::before {
  background: #3A3A3C;
}
.pg-nut-trends-macro-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 500;
  color: #8E8E93;
  line-height: 1.2;
}
.pg-nut-trends-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.pg-nut-trends-macros-grid strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.pg-nutrition-trends-screen .pg-nut-trends-breakdown-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding-bottom: 4px;
}
.pg-nut-trends-breakdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  flex-shrink: 0;
}
.pg-nut-trends-breakdown-head .pg-nut-trends-card-title {
  margin: 0;
}
.pg-nut-trends-breakdown-head button {
  border: none;
  background: transparent;
  color: #8E8E93;
  font-size: 12px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  min-height: 0;
  -webkit-appearance: none;
  appearance: none;
}
.pg-exercise-progress-screen .pg-nut-trends-breakdown-head button {
  color: #8E8E93;
  font-weight: 500;
}
.pg-lifting-volume-screen .pg-nut-trends-breakdown-head button {
  color: #8E8E93;
  font-weight: 500;
}
#pg-nut-trends-breakdown-list {
  flex: 0 0 auto;
  min-height: 0;
  max-height: 132px;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.pg-nut-trends-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0 2px 0 0;
  border: none;
  border-bottom: 1px solid #E5E5EA;
  background: transparent;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
.pg-nut-trends-day-row:last-child {
  border-bottom: none;
}
:is(body.dark, body.dark-mode) .pg-nut-trends-day-row {
  border-bottom-color: #3A3A3C;
}
.pg-nut-trends-day-left {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  justify-content: center;
}
.pg-nut-trends-day-left strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.pg-nut-trends-day-sub {
  font-size: 11px;
  font-weight: 500;
  color: #8E8E93;
  line-height: 1.2;
}
.pg-nut-trends-day-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: var(--text);
}
.pg-nut-trends-day-right strong {
  font-size: 14px;
  font-weight: 700;
}
.pg-nut-trends-day-right span {
  font-size: 16px;
  color: #8E8E93;
  line-height: 1;
}
.pg-nut-trends-footnote,
.pg-body-stats-footnote {
  margin: 4px 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #8E8E93;
  text-align: center;
}
#progress-dash-nutrition-main {
  flex-direction: column;
}
.pg-nutrition-trends-screen .pg-nut-trends-footnote {
  flex: 0 0 auto;
  width: 100%;
  max-width: 480px;
  margin: 8px 4px 0;
  box-sizing: border-box;
  text-align: center;
}
/* 8px under the last card — same gap as Body Stats cards, in normal flow. */
.pg-progress-detail-page.pg-body-stats .pg-body-stats-footnote {
  flex: 0 0 auto;
  order: 99;
  width: 100%;
  max-width: 480px;
  margin: 8px 4px 0;
  box-sizing: border-box;
  text-align: center;
}
.pg-progress-detail-page.pg-body-stats .pg-progress-detail-scroll {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pg-progress-detail-page.pg-body-stats .pg-progress-detail-head {
  flex-shrink: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 6px;
}
.pg-progress-detail-page.pg-body-stats .pg-body-stats-screen.is-open {
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="weight"],
.pg-progress-detail-page.pg-body-stats [data-body-panel="measurements"],
.pg-progress-detail-page.pg-body-stats [data-body-panel="photos"] {
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel][hidden] {
  display: none !important;
}
.pg-body-stats-new {
  display: none;
  width: 100%;
  height: 44px;
  margin: 8px 0 0;
  border: none;
  border-radius: 12px;
  background: #FFD60A;
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.pg-body-stats-tabs,
.pg-body-stats-ranges,
.pg-body-stats-units {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 2px;
  border: none;
  border-radius: 12px;
  background: #E5E5EA;
  box-sizing: border-box;
  flex-shrink: 0;
}
.pg-body-stats-ranges,
.pg-body-stats-units {
  background: #F2F2F7;
  border: 1px solid #E5E5E5;
}
.pg-body-stats-tabs,
.pg-body-stats-ranges {
  width: 100%;
}
.pg-body-stats-tabs {
  margin: 0 0 8px;
}
.pg-body-stats-screen > .pg-body-stats-tabs {
  margin-bottom: 8px;
}
.pg-body-stats-ranges {
  margin: 12px 0 8px;
}
/* Level Up Your trends reuses the Body stats range control, held at 32px so the Pro tab still fits. */
.pg-levelup-trend-ranges.pg-body-stats-ranges {
  height: 32px;
  margin: 6px 0 0;
}
.pg-levelup-trend-ranges.pg-body-stats-ranges button {
  align-self: stretch;
  height: auto;
  padding: 0 4px;
}
.pg-body-stats-units {
  align-self: flex-start;
}
.pg-body-stats-tabs button,
.pg-body-stats-ranges button,
.pg-body-stats-units button {
  position: relative;
  flex: 1;
  margin: 0;
  min-height: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  z-index: 0;
}
.pg-body-stats-tabs button,
.pg-body-stats-ranges button {
  padding: 8px 6px;
}
.pg-body-stats-units button {
  min-width: 40px;
  padding: 6px 12px;
}
.pg-body-stats-tabs {
  background: #E5E5EA;
  border: 1px solid #E5E5E5;
}
.pg-body-stats-tabs button {
  background: transparent;
  color: var(--label-secondary);
}
.pg-body-stats-ranges button,
.pg-body-stats-units button {
  color: #8E8E93;
}
.pg-body-stats-tabs button + button::before,
.pg-body-stats-ranges button + button::before,
.pg-body-stats-units button + button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 16px;
  transform: translateY(-50%);
  background: #C7C7CC;
  pointer-events: none;
}
.pg-body-stats-tabs button.is-on::before,
.pg-body-stats-tabs button.is-on + button::before,
.pg-body-stats-ranges button.is-on::before,
.pg-body-stats-ranges button.is-on + button::before,
.pg-body-stats-units button.is-on::before,
.pg-body-stats-units button.is-on + button::before {
  opacity: 0;
}
.pg-body-stats-tabs button.is-on,
.pg-body-stats-ranges button.is-on,
.pg-body-stats-units button.is-on {
  background: #FFFFFF;
  color: #000000;
  font-weight: 700;
  z-index: 1;
}
:is(body.dark, body.dark-mode) .pg-body-stats-tabs {
  background: #2C2C2E;
  border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-body-stats-tabs button + button::before {
  background: #636366;
}
:is(body.dark, body.dark-mode) .pg-body-stats-ranges,
:is(body.dark, body.dark-mode) .pg-body-stats-units {
  background: #000000;
  border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-body-stats-ranges button + button::before,
:is(body.dark, body.dark-mode) .pg-body-stats-units button + button::before {
  background: #636366;
}
:is(body.dark, body.dark-mode) .pg-body-stats-tabs button.is-on,
:is(body.dark, body.dark-mode) .pg-body-stats-ranges button.is-on,
:is(body.dark, body.dark-mode) .pg-body-stats-units button.is-on {
  background: #FFFFFF;
  color: #000000;
}
.pg-body-stats-card {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  padding: 12px;
  margin: 0 0 12px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="weight"] > .pg-body-stats-card {
  margin-bottom: 8px;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="weight"] > .pg-body-stats-recent {
  margin-bottom: 0;
}
:is(body.dark, body.dark-mode) .pg-body-stats-card {
  background: #1C1C1E;
  border-color: #3A3A3C;
}
.pg-body-stats-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.pg-body-stats-weight {
  margin: 4px 0 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text);
}
.pg-body-stats-weight-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pg-body-stats-delta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.2;
  color: #8E8E93;
}
.pg-body-stats-delta b {
  font-weight: 700;
  color: var(--text);
}
.pg-body-stats-chart {
  height: 165px;
  min-height: 120px;
  position: relative;
  flex: 0 1 165px;
}
.pg-body-stats-hint,
.pg-body-stats-empty p {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  color: #8E8E93;
}
.pg-body-stats-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px 4px;
}
.pg-body-stats-summary div {
  text-align: center;
  padding: 0 8px;
}
.pg-body-stats-summary div + div {
  border-left: 1px solid #E5E5EA;
}
:is(body.dark, body.dark-mode) .pg-body-stats-summary div + div {
  border-left-color: #3A3A3C;
}
.pg-body-stats-summary p {
  margin: 0;
  font-size: 12px;
  line-height: 1.1;
  color: #8E8E93;
}
.pg-body-stats-summary strong {
  display: block;
  margin-top: 1px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
}
.pg-body-stats-recent {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 0;
  /* Tighter bottom so the check-ins footnote stays on-screen. */
  padding-bottom: 4px;
}
.pg-body-stats-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.pg-body-stats-recent-head p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.pg-body-stats-recent-head button {
  border: none;
  background: none;
  padding: 0;
  color: #8E8E93;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex: 0 0 auto;
  min-height: 0;
}
#progress-dash-weight-history {
  flex: 0 0 auto;
  min-height: 0;
  max-height: 156px;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.pg-body-checkin-cols,
.pg-body-checkin-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(4, minmax(0, 1fr));
  align-items: center;
  column-gap: 4px;
  width: 100%;
  box-sizing: border-box;
}
.pg-body-checkin-cols {
  height: 28px;
  min-height: 28px;
  padding: 0 2px 0 0;
  border-bottom: 1px solid #E5E5EA;
  color: #8E8E93;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}
.pg-body-checkin-cols span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-body-checkin-cols span:nth-child(1) { text-align: left; }
.pg-body-checkin-cols span:nth-child(2),
.pg-body-checkin-cols span:nth-child(3),
.pg-body-checkin-cols span:nth-child(4),
.pg-body-checkin-cols span:nth-child(5) { text-align: center; }
:is(body.dark, body.dark-mode) .pg-body-checkin-cols {
  border-bottom-color: #3A3A3C;
}
.pg-body-checkin-row {
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 2px 0 0;
  border: none;
  border-top: 1px solid #E5E5EA;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.pg-body-checkin-row:first-of-type {
  border-top: none;
}
:is(body.dark, body.dark-mode) .pg-body-checkin-row {
  border-top-color: #3A3A3C;
}
.pg-body-checkin-date {
  min-width: 0;
  color: #8E8E93;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-body-checkin-val {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  font-weight: 700;
  color: var(--text);
}
.pg-body-checkin-icon {
  position: relative;
  width: 22px;
  height: 22px;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C7C7CC;
  flex: 0 0 22px;
}
.pg-body-checkin-icon.is-on {
  color: #8E8E93;
}
.pg-body-checkin-icon-svg {
  display: block;
}
.pg-body-checkin-tick {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #30D158;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#pg-checkin-history-page {
  z-index: 74500;
}
.pg-checkin-history-head {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 0 6px;
}
.pg-checkin-history-back {
  display: none;
}
.pg-checkin-history-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pg-ci-text);
}
.pg-checkin-history-head > p[data-checkin-history-count] {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--pg-ci-muted);
  text-align: center;
}
.pg-checkin-history-card {
  background: var(--pg-ci-card);
  border-radius: 16px;
  padding: 14px 12px 4px;
  margin: 0 0 12px;
  box-sizing: border-box;
  overflow: hidden;
}
.pg-checkin-history-month {
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--pg-ci-text);
}
.pg-checkin-history-page .pg-body-checkin-cols {
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 2px 0 0;
  border-bottom: 1px solid var(--pg-ci-border, #E5E5EA);
  background: transparent;
}
.pg-checkin-history-page .pg-body-checkin-cols span {
  overflow: visible;
  text-overflow: clip;
}
.pg-checkin-history-page .pg-body-checkin-row {
  padding: 0 2px;
}
.pg-checkin-history-page .pg-body-checkin-icon.is-on {
  color: var(--pg-ci-text);
}
.pg-checkin-history-empty {
  margin: 24px 8px;
  text-align: center;
  color: var(--pg-ci-muted);
  font-size: 14px;
  font-weight: 500;
}
#pg-nutrition-history-page {
  z-index: 74500;
}
.pg-nutrition-history-page .pg-checkin-scroll {
  bottom: 0;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
}
.pg-nutrition-history-head {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 0 6px;
}
.pg-nutrition-history-back {
  display: none;
}
.pg-nutrition-history-head > p[data-nutrition-history-count] {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--pg-ci-muted);
  text-align: center;
}
.pg-nutrition-history-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pg-ci-text);
}
.pg-nutrition-history-card {
  background: var(--pg-ci-card);
  border-radius: 16px;
  padding: 14px 12px 4px;
  margin: 0 0 12px;
  box-sizing: border-box;
  overflow: hidden;
}
.pg-nutrition-history-month {
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--pg-ci-text);
}
.pg-nut-hist-cols,
.pg-nut-hist-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.8fr) repeat(3, minmax(0, 1fr));
  align-items: center;
  column-gap: 4px;
  width: 100%;
  box-sizing: border-box;
}
.pg-nut-hist-cols {
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 2px;
  border-bottom: 1px solid var(--pg-ci-border, #E5E5EA);
  color: var(--pg-ci-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}
.pg-nut-hist-cols span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}
.pg-nut-hist-cols span:nth-child(1) { justify-content: flex-start; }
.pg-nut-hist-cols span:nth-child(2),
.pg-nut-hist-cols span:nth-child(3),
.pg-nut-hist-cols span:nth-child(4),
.pg-nut-hist-cols span:nth-child(5) { justify-content: center; }
.pg-nut-hist-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pg-nut-hist-row {
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 2px;
  border: none;
  border-top: 1px solid var(--pg-ci-border, #E5E5EA);
  background: transparent;
  color: var(--pg-ci-text);
  cursor: pointer;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}
.pg-nut-hist-row:first-of-type {
  border-top: none;
}
.pg-nut-hist-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--pg-ci-muted);
  text-align: left;
}
.pg-nut-hist-kcal {
  text-align: center;
  font-size: 14px;
  color: var(--pg-ci-text);
}
.pg-nut-hist-kcal strong {
  font-weight: 700;
}
.pg-nut-hist-macro {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  width: 100%;
  font-size: 14px;
  color: var(--pg-ci-text);
}
.pg-nut-hist-macro strong {
  font-weight: 700;
}
.pg-nut-hist-macro span {
  font-size: 12px;
  font-weight: 500;
  color: var(--pg-ci-muted);
}
.pg-nutrition-history-empty {
  margin: 24px 8px;
  text-align: center;
  color: var(--pg-ci-muted);
  font-size: 14px;
  font-weight: 500;
}
.pg-body-stats-soon {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8E8E93;
  font-size: 16px;
  font-weight: 600;
}
.pg-body-stats-soon[hidden] {
  display: none !important;
}
.pg-body-photos {
  flex: none;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.pg-body-photos-top {
  flex-shrink: 0;
  padding: 0 0 8px;
  background: #F2F2F7;
  box-sizing: border-box;
  z-index: 2;
}
:is(body.dark, body.dark-mode) .pg-body-photos-top {
  background: #000000;
}
.pg-body-photos-head-card {
  margin-bottom: 0;
}
.pg-body-photos-scroll {
  flex: none;
  min-height: auto;
  overflow: visible;
  padding: 0;
  box-sizing: border-box;
}
.pg-body-photos-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.pg-body-photos-head-copy {
  flex: 1;
  min-width: 0;
}
.pg-body-photos-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.pg-body-photos-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #8E8E93;
}
.pg-body-photos-compare {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  background: #FFFFFF;
  color: #1C1C1E;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pg-body-photos-compare-icon {
  display: block;
  flex: 0 0 auto;
}
:is(body.dark, body.dark-mode) .pg-body-photos-compare {
  background: #1C1C1E;
  border-color: #3A3A3C;
  color: #FFFFFF;
}
/* Photos angle filter — same ranges pill as Weight 7D/30D/90D/All; scoped so Weight/Measurements stay untouched. */
.pg-body-photos-head-card .pg-body-photos-angles {
  width: 100%;
  margin: 0;
}
.pg-body-photos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pg-body-photos-card {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  padding: 12px;
  box-sizing: border-box;
}
:is(body.dark, body.dark-mode) .pg-body-photos-card {
  background: #1C1C1E;
  border-color: #3A3A3C;
}
.pg-body-photos-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}
.pg-body-photos-card-date {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.pg-body-photos-card-no {
  margin: 0;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  color: #8E8E93;
}
.pg-body-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pg-body-photos-cell {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: #F2F2F7;
  cursor: pointer;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
:is(body.dark, body.dark-mode) .pg-body-photos-cell {
  background: #2C2C2E;
}
.pg-body-photos-cell-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #E5E5EA;
}
:is(body.dark, body.dark-mode) .pg-body-photos-cell-img {
  background: #3A3A3C;
}
.pg-body-photos-cell-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg-body-photos-cell-label {
  display: block;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  background: #F2F2F7;
}
:is(body.dark, body.dark-mode) .pg-body-photos-cell-label {
  background: #2C2C2E;
}
.pg-body-photos-empty {
  padding: 28px 12px;
  text-align: center;
}
.pg-body-photos-empty p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #8E8E93;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="measurements"] > .pg-body-stats-card {
  margin-bottom: 8px;
  padding: 10px 12px;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="measurements"] > .pg-body-stats-card:last-of-type {
  margin-bottom: 0;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="measurements"] > .pg-meas-main {
  padding-bottom: 8px;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="measurements"] > .pg-meas-latest {
  padding-bottom: 4px;
}
.pg-meas-main {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pg-meas-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.pg-meas-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pg-meas-top .pg-body-stats-units {
  flex: 0 0 auto;
  align-self: center;
  height: 36px;
  box-sizing: border-box;
}
.pg-meas-top .pg-body-stats-units button {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  box-sizing: border-box;
}
.pg-meas-select {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 36px;
}
.pg-meas-select select {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 32px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  box-sizing: border-box;
}
.pg-meas-select::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8E8E93;
  font-size: 12px;
  pointer-events: none;
}
:is(body.dark, body.dark-mode) .pg-meas-select select {
  background: #1C1C1E;
  border-color: #3A3A3C;
  color: #FFFFFF;
}
.pg-meas-main .pg-body-stats-weight {
  margin-top: 6px;
  font-size: 34px;
  line-height: 1.05;
}
.pg-meas-since {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: #8E8E93;
  min-height: 17px;
}
.pg-meas-main .pg-body-stats-ranges {
  margin: 8px 0 6px;
}
.pg-meas-main .pg-body-stats-summary {
  margin: 2px 0 0;
  padding: 4px 4px 0;
  flex: 0 0 auto;
}
.pg-progress-detail-page.pg-body-stats [data-body-panel="measurements"] .pg-body-stats-chart {
  height: 110px;
  min-height: 96px;
  flex: 0 1 110px;
}
.pg-meas-main .pg-body-stats-hint {
  margin-top: 2px;
}
.pg-meas-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.pg-meas-date {
  margin: 2px 0 4px;
  font-size: 13px;
  font-weight: 400;
  color: #8E8E93;
}
.pg-meas-latest {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.pg-meas-list {
  flex: 0 0 auto;
  overflow: visible;
}
.pg-meas-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 40px;
  min-height: 40px;
  padding: 0 8px;
  border: none;
  border-top: 1px solid #E5E5EA;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.pg-meas-row:first-child {
  border-top: none;
}
.pg-meas-row.is-on {
  background: #FFF8D3;
  border-radius: 12px;
  border-top-color: transparent;
}
.pg-meas-row.is-on + .pg-meas-row {
  border-top-color: transparent;
}
:is(body.dark, body.dark-mode) .pg-meas-row {
  border-top-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-meas-row.is-on,
:is(body.dark, body.dark-mode) .pg-meas-row.is-on + .pg-meas-row {
  border-top-color: transparent;
}
:is(body.dark, body.dark-mode) .pg-meas-row.is-on {
  background: #2A2A00;
}
.pg-meas-row-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.pg-meas-chev {
  color: #8E8E93;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}
.home-score-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid #E5E5E5;
  box-shadow: none;
  margin: 0;
}
.home-score-top {
  display: flex;
  align-items: stretch;
  min-width: 0;
}
.home-score-rule {
  height: 1px;
  background: #E5E5E5;
  flex-shrink: 0;
}
:is(body.dark, body.dark-mode) .home-score-rule {
  background: #3A3A3C;
}
.home-profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 0;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 4px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
}
#home-gs-banner {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
.home-profile-stats > span,
.home-profile-stats-streak {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 0 6px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap;
  text-align: center;
}
.home-profile-stats > span + span::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 28px;
  background: #e0e0e0;
  pointer-events: none;
}
.home-profile-stats-info {
  -webkit-appearance: none;
  appearance: none;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--label-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-score-col,
.home-level-col {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.home-level-col {
  position: relative;
  align-self: stretch;
  border: none;
  background: transparent;
  margin: 0;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.home-level-col > * {
  pointer-events: none;
}
.home-score-divider {
  width: 1px;
  background: #e0e0e0;
  align-self: stretch;
  flex-shrink: 0;
}
.home-score-label-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 4px;
  min-width: 0;
}
.home-score-label-row .home-score-label {
  margin: 0;
}
.home-score-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: #1C1C1E;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
}
.home-score-num {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
  margin-bottom: 6px;
}
#home-daily-score { font-size: 36px; font-weight: 800; color: #1C1C1E; letter-spacing: -0.01em; }
.home-score-denom { font-size: 20px; font-weight: 400; color: #6C6C70; }
.home-score-msg { display: none; }
.home-level-line {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1C1C1E;
  line-height: 1.2;
}
.home-meter {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
}
.home-meter > div,
#home-daily-score-fill,
#home-daily-card-xp-bar-fill,
#ov-bar-cal,
#ov-bar-sleep,
#home-water-bar,
#home-train-bar {
  height: 100%;
  width: 0%;
  background: #F5C518;
  border-radius: 999px;
}
.home-score-card .home-meter {
  height: 8px;
  margin-top: 6px;
  background: #e0e0e0;
  border-radius: 4px;
}
.home-score-col .home-meter { margin-top: 0; }
.home-score-card .home-meter > div,
.home-score-card #home-daily-score-fill,
.home-score-card #home-daily-card-xp-bar-fill {
  border-radius: 4px;
  background: #F5C518;
}
.home-xp-sub {
  display: block;
  margin-top: 4px;
  width: 100%;
  font-size: 11px;
  font-weight: 400;
  color: #6C6C70;
  line-height: 1.35;
  white-space: nowrap;
}
#home-daily-card-xp-next { display: none !important; }
.home-status-card {
  flex-shrink: 0;
  background: #FFF8D3;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
/*
  TODAY'S WORKOUT CARD STATES
  ---------------------------
  Completed:
    Light:  bg #dcfce7  border 1px #86EFAC  accent #30D158
    Dark:   bg #1A3D2B  border 1px #2D6A4A

  Scheduled:
    Light:  bg #FFFFFF   border 1px #E5E5E5
    Dark:   bg var(--card)   border 1px solid var(--border)

  Rest Day:
    Light:  bg #F3E8FF   border 1px #D8B4FE
    Dark:   bg #2D1A3D   border 1px #5B2D8A

  No Routine:
    Light:  bg #FEE2E2   border 1px #FCA5A5
    Dark:   bg #3D1A1A   border 1px #6A2D2D
*/
.home-status-card.is-done {
  background: #dcfce7;
  border: 1px solid #86EFAC;
}
.home-status-card.is-rest {
  background: #F3E8FF;
  border: 1px solid #D8B4FE;
}
.home-status-card.is-no-active {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
}
.home-status-card.is-no-active .home-status-icon {
  background: #FF3B30;
  border-radius: 50%;
}
.home-status-card.is-no-active #home-workout-title {
  color: #1C1C1E;
}
.home-status-card.is-no-active #home-plan-exercise-count {
  color: #FF3B30;
}
.home-status-card.is-no-active .home-chevron {
  color: #1C1C1E;
}
.home-status-card.is-done .home-status-icon {
  background: #30D158;
  border-radius: 50%;
}
.home-status-card.is-rest .home-status-icon {
  background: #F3E8FF !important;
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
  color: #A855F7;
}
.home-status-card.is-rest .home-status-icon svg {
  stroke: #A855F7 !important;
}
.home-status-card.is-done #home-plan-exercise-count {
  color: #16a34a;
}
.home-status-card.is-rest #home-plan-exercise-count {
  color: #A855F7;
}
.home-status-card.is-done .home-chevron {
  color: #1C1C1E;
}
.home-status-card.is-rest .home-chevron {
  display: none;
}
.home-status-card.is-scheduled {
  background: #ffffff;
  border: 1px solid #E5E5E5;
  border-radius: var(--radius-sm);
  padding: 14px;
}
.home-status-card.is-scheduled .home-status-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #FFD60A;
}
.home-status-kicker {
  display: none;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #D4A017;
  line-height: 1.35;
}
.home-status-card.is-scheduled .home-status-kicker {
  display: block;
  color: #1C1C1E;
}
.home-status-card.is-scheduled #home-workout-title {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 700;
  color: #1C1C1E;
}
.home-status-card.is-scheduled #home-plan-exercise-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--label-secondary);
}
.home-status-card.is-scheduled .home-chevron {
  color: #1C1C1E;
  font-size: 18px;
}
.home-status-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F5C518;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-status-copy { flex: 1; min-width: 0; }
#home-workout-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1C1C1E;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#home-plan-exercise-count {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #D4A017;
  line-height: 1.35;
}
#home-plan-muscle-groups { display: none !important; }
.home-chevron {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #1C1C1E;
  line-height: 0;
  flex-shrink: 0;
}
.home-plan-actions { display: none !important; }
.home-today {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.home-today-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
  row-gap: 8px;
  align-items: stretch;
}
.home-today-tile {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  height: auto;
  min-height: 88px;
}
.home-tile-chev,
.home-up-chev {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #6b7280;
  line-height: 0;
  flex-shrink: 0;
}
.home-tile-chev {
  position: absolute;
  top: 10px;
  right: 10px;
}
.nut-section-chev.home-tile-chev {
  position: static;
  top: auto;
  right: auto;
}
.home-setup-banner-chevron svg,
.home-chevron svg,
.home-tile-chev svg,
.home-up-chev svg {
  width: 18px;
  height: 18px;
  display: block;
  transform: rotate(-90deg);
}
.home-tile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-right: 12px;
}
.home-today-tile .home-tile-row {
  display: flex;
  align-items: center;
  height: 55px;
  flex-shrink: 0;
  overflow: visible;
  padding-left: 0;
}
.home-today-tile-train .home-tile-row {
  height: auto;
  min-height: 55px;
  align-items: flex-start;
}
#home-chip-workout-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-today-tile .home-tile-copy {
  align-self: flex-start;
}
.home-tile-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.home-tile-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  flex-shrink: 0;
}
.home-today-tile .home-tile-ico {
  position: static;
  align-self: center;
  width: 36px;
  height: 36px;
}
.home-tile-ico-sleep {
  height: 36px;
}
.home-tile-ico-cal { background: #FEF3C7; }
.home-tile-ico-water {
  background: #EFF8FF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-tile-ico-sleep { background: #F3E8FF; }
.home-kicker-today { padding-left: 12px; margin-bottom: 8px; color: #1C1C1E; }
.home-tile-ico-train {
  background: rgba(48,209,88,0.15);
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  min-height: 36px;
  max-height: 36px;
  border-radius: 10px;
  padding: 0;
  box-sizing: border-box;
}
.home-tile-ico-train svg {
  width: 28.6px;
  height: 28.6px;
  flex-shrink: 0;
}
.home-tile-name { font-size: 12px; font-weight: 600; color: #1C1C1E; line-height: 1.35; }
.home-tile-val { font-size: 18px; font-weight: 700; color: #1C1C1E; line-height: 1.2; }
.home-tile-sub { font-size: 11px; color: #6C6C70; line-height: 1.35; }
.home-today-tile-sleep .home-tile-val,
.home-today-tile-train .home-tile-val,
#home-chip-sleep-goal {
  white-space: nowrap;
  margin-right: -12px;
}
.home-tile-meter { display: flex; align-items: center; }
.home-tile-meter .home-meter {
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
}
.home-tile-meter .home-meter > div { border-radius: 2px; }
.home-tile-meter:has(#ov-bar-cal) .home-meter,
.home-tile-meter:has(#home-water-bar) .home-meter,
.home-tile-meter:has(#ov-bar-sleep) .home-meter {
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
}
.home-tile-meter:has(#ov-bar-cal) .home-meter > div,
.home-tile-meter:has(#home-water-bar) .home-meter > div,
.home-tile-meter:has(#ov-bar-sleep) .home-meter > div {
  border-radius: 3px;
}
.home-tile-pct { display: none !important; }
.home-today-tile-train .home-tile-meter { display: none !important; }
.home-today-tile-sleep .home-tile-meter { display: none !important; }
.home-today-tile-sleep,
.home-today-tile-train {
  min-height: 0;
  height: auto;
  align-self: start;
  padding-bottom: 10px;
}
#ov-bar-cal { background: #F5C518; }
#home-water-bar { background: #29B6F6; }
#ov-bar-sleep { background: #7E57C2; }
.home-week {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.home-week-card {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: var(--radius-sm);
  padding: 4px 16px;
}
#screen-home .home-weekly-summary-stat {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1E;
  text-align: left;
}
.home-week-extra {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  color: #6C6C70;
  line-height: 1.35;
}
.home-week-extra[hidden] { display: none !important; }
.home-week-consistency { display: none; }
.home-week-dots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}
.home-week-day {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
}
.home-week-dot {
  width: 12px;
  height: 12px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
}
.home-week-dot svg,
.home-week-dot-core svg {
  width: 8px;
  height: 8px;
}
.home-week-dot.is-today {
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 2px solid #F5C518;
}
.home-week-dot:not(.is-today) {
  margin-top: 4px;
  margin-bottom: 4px;
}
.home-week-day::after {
  content: '';
  display: block;
  height: 9px;
}
.home-week-day:has(.home-week-today)::after {
  display: none;
}
/* Pro → Your week: no reserved Today-label height under the day letters. */
.pg-pro-week-dots .home-week-day::after {
  display: none;
}
.home-week-dot-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e5e7eb;
}
.home-week-letter,
.home-week-today {
  color: #6C6C70;
  line-height: 1;
}
.home-week-letter { font-size: 8px; margin-top: 2px; letter-spacing: 0.06em; }
.home-week-today { font-size: 9px; }
.home-upcoming-card {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
}
.home-legacy-hidden { display: none !important; }

/* ══ HOME V2 SCORE CARD ══ */
.home-score-card {
  background: #fff;
  border: 1px solid #E5E5E5;
  box-shadow: none;
  border-radius: var(--radius-sm);
  padding: 0;
  margin: 0;
  overflow: hidden;
}

/* Explicit in-app light preference (body.theme-light) */
body.theme-light {
  --bg: #f2f2f7;
  --card: #ffffff;
  --border: #e5e5ea;
  --session-line: #f0f0f0;
  --text: #1C1C1E;
  --text-secondary: #6C6C70;
  --text-tertiary: #6C6C70;
  --label-secondary: var(--text-secondary);
  --placeholder-muted: var(--text-tertiary);
  --primary: #ffd60a;
  --primary-light: #fff9e0;
  --btn-on-primary: #111111;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-text: #1C1C1E;
  --btn-secondary-border: #e5e5ea;
  --nav-pill-bg: rgba(255, 255, 255, 0.78);
  --nav-pill-border: rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
}


/* Profile V2 (div rows): preference label matches button-row label typography */
.profile-v2-pref-label {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  color: #000000;
}

:is(body.dark, body.dark-mode) .profile-v2-pref-label {
  color: #ffffff;
}

/* Profile V2 → gender select matches grey input fields on white card */
select.pv2-profile-gender-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 40px 12px 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #111111;
  background-color: #f2f2f7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23111111' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

select.pv2-profile-gender-select:focus {
  outline: 2px solid rgba(0, 0, 0, 0.12);
  outline-offset: 1px;
}

select.pv2-profile-gender-select::-ms-expand {
  display: none;
}

body.dark select.pv2-profile-select,
body.dark-mode select.pv2-profile-select select.pv2-profile-select {
  color: #ffffff;
  background-color: #1E1E1E;
  border: 1.5px solid #2A2A2A;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
}
:is(body.dark, body.dark-mode) select.pv2-profile-gender-select {
  color: #FFFFFF;
  background-color: var(--pg-field-bg) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238E8E93' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px 8px !important;
  border: none !important;
  border-radius: 12px;
}

body.dark select.pv2-profile-gender-select option,
body.dark-mode select.pv2-profile-gender-select option select.pv2-profile-gender-select option,
body.dark select.pv2-profile-select option,
body.dark-mode select.pv2-profile-select option select.pv2-profile-select option {
  background: #1A1A1A;
  color: #ffffff;
}

/* Profile edit — height unit row (value + unit dropdown in one field) */
#pv2-profile-sheet .pv2-height-shell {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #F2F2F7;
  padding: 0 4px 0 14px;
  color: #000000;
}
:is(body.dark, body.dark-mode) #pv2-profile-sheet .pv2-height-shell {
  background: #2C2C2E;
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) #pv2-profile-sheet .pg-profile-edit-field::placeholder,
:is(body.dark, body.dark-mode) #pv2-profile-sheet input::placeholder {
  color: #8E8E93;
  opacity: 1;
}
#pv2-profile-sheet .pv2-height-shell input[type="number"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 0;
  color: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}
#pv2-profile-sheet .pv2-height-shell input[type="number"]::-webkit-outer-spin-button,
#pv2-profile-sheet .pv2-height-shell input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#pv2-profile-sheet .pv2-height-unit-rule {
  width: 1px;
  align-self: stretch;
  margin: 11px 0;
  background: #E5E5EA;
  flex-shrink: 0;
}
:is(body.dark, body.dark-mode) #pv2-profile-sheet .pv2-height-unit-rule {
  background: #3A3A3C;
}
#pv2-profile-sheet select.pv2-height-unit-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: auto;
  min-width: 72px;
  height: 44px;
  margin: 0;
  padding: 0 28px 0 12px;
  border: none !important;
  border-radius: 0;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23000000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #000000;
  cursor: pointer;
  min-height: 0;
}
:is(body.dark, body.dark-mode) #pv2-profile-sheet select.pv2-height-unit-select {
  color: #FFFFFF;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 10px 6px !important;
}
#pv2-profile-sheet .pv2-height-unit-label {
  flex-shrink: 0;
  min-width: 72px;
  padding: 0 14px 0 12px;
  box-sizing: border-box;
  font-size: 16px;
  font-weight: 600;
  line-height: 44px;
  color: inherit;
}

/* Profile → Nutrition targets (TDEE / macros) */
.pg-nutrition-targets-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px 14px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.pg-nutrition-targets-card__title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--label-secondary);
  text-transform: uppercase;
}

.pg-nut-target-row {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.pg-nutrition-targets-card .pg-nut-target-row:first-of-type {
  border-top: none;
  padding-top: 2px;
}

.pg-nut-target-row__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.pg-nut-target-row__value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pg-nut-target-row__value--muted {
  font-size: 14px;
  font-weight: 600;
  color: var(--label-secondary);
}

.pg-nut-target-row__unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--label-secondary);
  flex-shrink: 0;
}

.pg-nut-target-row__unit--muted {
  color: var(--label-secondary);
  opacity: 0.9;
}

.pg-nut-target-row--tdee {
  padding-top: 8px;
  padding-bottom: 4px;
}

.pg-nut-target-cal-hint {
  margin: -4px 0 6px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--label-secondary);
  font-weight: 500;
}

.pg-nut-inline-editor {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-sizing: border-box;
}

:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-foot,
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #8E8E93;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-foot {
  margin: 4px 0 0;
  text-align: center;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-card {
  margin: 0 0 18px;
  padding: 0 16px 8px;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  background: #FFFFFF;
  box-sizing: border-box;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-row--macro {
  min-height: 48px;
  border-bottom: 1px solid #E5E5EA;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-row--macro:last-child {
  border-bottom: none;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-name {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1E;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-dot--protein { background: #38BDF8; }
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-dot--carbs { background: #30D158; }
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-dot--fat { background: #FF9F0A; }
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-profile-icon-well {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F2F2F7;
  color: #1C1C1E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-profile-icon-well svg {
  width: 20px;
  height: 20px;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-field {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 108px;
  height: 36px;
  margin: 0;
  padding: 0 10px 0 8px;
  border-radius: 10px;
  background: #F2F2F7;
  box-sizing: border-box;
  flex-shrink: 0;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-field--wide {
  width: 132px;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-field--pct {
  width: 72px;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 -16px 0;
  padding: 16px 16px 6px;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-head .pg-nut-targets-hint {
  margin: 0;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-row,
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-total {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border-top: 1px solid #E5E5EA;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-meta .pg-nut-targets-name {
  flex: none;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-grams {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 72px;
  text-align: right;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-grams strong,
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-total strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1E;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-grams strong span {
  font-size: 13px;
  font-weight: 600;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-total .pg-nut-targets-name {
  flex: 1;
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-row,
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-total {
  border-top-color: #3A3A3C;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) #pv2-macro-split [id^="pv2-macro-lbl-"] {
  color: #1C1C1E;
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-grams strong,
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-split-total strong,
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) #pv2-macro-split [id^="pv2-macro-lbl-"] {
  color: #FFFFFF;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-field input {
  flex: 1 1 auto;
  width: 0 !important;
  min-width: 0;
  height: 34px;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none;
  color: #1C1C1E;
  font-size: 16px;
  font-weight: 700;
  line-height: 34px;
  text-align: right;
  -webkit-appearance: none;
  appearance: none;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-unit {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: #8E8E93;
  text-transform: none;
  letter-spacing: 0;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-hint {
  margin: 0 0 8px;
}
:is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-save {
  width: 100%;
  margin-top: 16px;
  min-height: 52px;
  padding: 14px 16px;
  border: none;
  border-radius: 16px;
  background: #FFD60A;
  color: #111111;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-card {
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-card-border);
  border-radius: var(--pg-card-radius);
  box-shadow: var(--pg-card-shadow);
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-name,
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-field input {
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-row--macro {
  border-bottom-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-profile-icon-well,
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-well {
  background: var(--pg-icon-well-bg);
  color: var(--pg-icon-well-fg);
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-well--cal {
  background: rgba(245, 166, 35, 0.2);
  color: #F5C518;
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-well--water {
  background: rgba(41, 182, 246, 0.2);
  color: #29B6F6;
}
:is(body.dark, body.dark-mode) :is(#pv2-nutrition-targets, .pg-nut-targets-root) .pg-nut-targets-field {
  background: var(--pg-field-bg);
}

#pv2-training-prefs .pg-train-pref-card {
  margin: 0 0 18px;
  padding: 0 16px 6px;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  background: #FFFFFF;
  box-sizing: border-box;
}
#pv2-training-prefs .pg-train-pref-card--rest {
  padding: 12px 16px;
}
#pv2-training-prefs .pg-train-pref-lead,
#pv2-training-prefs .pg-train-pref-note,
#pv2-training-prefs .pg-train-pref-choice-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #8E8E93;
}
#pv2-training-prefs .pg-train-pref-lead {
  margin: 0 0 8px;
}
#pv2-training-prefs .pg-train-pref-note {
  margin: 8px 0 10px;
}
#pv2-training-prefs .pg-train-pref-row,
#pv2-training-prefs .pg-train-pref-rest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid #E5E5EA;
}
#pv2-training-prefs .pg-train-pref-row:last-child,
#pv2-training-prefs .pg-train-pref-rest {
  border-bottom: none;
}
#pv2-training-prefs .pg-train-pref-label,
#pv2-training-prefs .pg-train-pref-choice-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1E;
}
#pv2-training-prefs .pg-train-pref-rest-copy,
#pv2-training-prefs .pg-train-pref-choice-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#pv2-training-prefs .pg-train-pref-rest-copy {
  flex: 1;
}
#pv2-training-prefs .pg-profile-icon-well {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F2F2F7;
  color: #1C1C1E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#pv2-training-prefs .pg-profile-icon-well svg {
  width: 20px;
  height: 20px;
}
#pv2-training-prefs select.pg-train-pref-select {
  -webkit-appearance: none;
  appearance: none;
  width: auto !important;
  min-width: 72px;
  height: 36px;
  margin: 0 !important;
  padding: 0 28px 0 12px;
  border: none !important;
  border-radius: 10px;
  background-color: #F2F2F7 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%231C1C1E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 10px 6px !important;
  color: #1C1C1E;
  font-size: 15px;
  font-weight: 600;
  line-height: 36px;
  cursor: pointer;
  min-height: 0;
  flex-shrink: 0;
}
#pv2-training-prefs .pg-train-pref-choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  min-height: 0;
  box-sizing: border-box;
}
#pv2-training-prefs .pg-train-pref-choice.is-selected {
  background: #FFF8E7;
}
#pv2-training-prefs .pg-train-pref-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #C7C7CC;
  box-sizing: border-box;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
#pv2-training-prefs .pg-train-pref-choice.is-selected .pg-train-pref-radio {
  border-color: #FFD60A;
  background: #FFD60A;
}
#pv2-training-prefs .pg-train-pref-choice.is-selected .pg-train-pref-radio::after {
  content: '✓';
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
#pv2-training-prefs .pg-train-pref-save {
  width: 100%;
  margin-top: 4px;
  min-height: 52px;
  padding: 14px 16px;
  border: none;
  border-radius: 16px;
  background: #FFD60A;
  color: #111111;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}
:is(body.dark, body.dark-mode) #pv2-training-prefs .pg-train-pref-card {
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-card-border);
  box-shadow: var(--pg-card-shadow);
}
:is(body.dark, body.dark-mode) #pv2-training-prefs .pg-train-pref-label,
:is(body.dark, body.dark-mode) #pv2-training-prefs .pg-train-pref-choice-title {
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) #pv2-training-prefs .pg-train-pref-row {
  border-bottom-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) #pv2-training-prefs .pg-profile-icon-well {
  background: var(--pg-icon-well-bg);
  color: var(--pg-icon-well-fg);
}
:is(body.dark, body.dark-mode) #pv2-training-prefs select.pg-train-pref-select {
  color: var(--pg-field-fg);
  background-color: var(--pg-field-bg) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") !important;
}
:is(body.dark, body.dark-mode) #pv2-training-prefs .pg-train-pref-choice.is-selected {
  background: rgba(255, 214, 10, 0.18);
}

#pv2-app-settings .pg-app-settings-foot {
  margin: 0 0 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  color: #8E8E93;
}
#pv2-app-settings .pg-app-settings-foot {
  margin: 4px 0 0;
  font-size: 13px;
}
#pv2-app-settings .pg-app-settings-card {
  margin: 0 0 18px;
  padding: 0 16px 12px;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  background: #FFFFFF;
  box-sizing: border-box;
}
#pv2-app-settings .pg-app-settings-card--notifs {
  padding-bottom: 4px;
}
#pv2-app-settings .pg-app-settings-card--updates {
  padding: 12px 16px;
}
#pv2-app-settings .pg-app-settings-label {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1E;
}
#pv2-app-settings .pg-app-settings-sublabel {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #8E8E93;
}
#pv2-app-settings .pg-app-settings-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
#pv2-app-settings .pg-app-settings-theme-head,
#pv2-app-settings .pg-app-settings-updates,
#pv2-app-settings .pg-app-settings-notif {
  display: flex;
  align-items: center;
  gap: 12px;
}
#pv2-app-settings .pg-app-settings-theme-head {
  margin-bottom: 12px;
}
#pv2-app-settings .pg-app-settings-notif {
  justify-content: space-between;
  min-height: 56px;
  border-bottom: 1px solid #E5E5EA;
}
#pv2-app-settings .pg-app-settings-notif:last-child {
  border-bottom: none;
}
#pv2-app-settings .pg-profile-icon-well {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F2F2F7;
  color: #1C1C1E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#pv2-app-settings .pg-profile-icon-well svg {
  width: 20px;
  height: 20px;
}
#pv2-app-settings .pg-app-settings-theme-toggle {
  display: flex;
  gap: 8px;
  width: 100%;
}
#pv2-app-settings .pg-app-settings-theme-opt {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #8E8E93;
  border-radius: 12px;
  background: #FFFFFF;
  color: #000000;
  opacity: 1;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}
#pv2-app-settings .pg-app-settings-theme-opt--dark {
  background: #000000;
  color: #FFFFFF;
}
#pv2-app-settings .pg-app-settings-theme-opt svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
#pv2-app-settings .pg-app-settings-theme-opt--light svg,
#pv2-app-settings .pg-app-settings-theme-opt--light svg * {
  stroke: #000000;
}
#pv2-app-settings .pg-app-settings-theme-opt--dark svg,
#pv2-app-settings .pg-app-settings-theme-opt--dark svg * {
  stroke: #FFFFFF;
}
#pv2-app-settings .pg-app-settings-theme-opt.is-selected {
  border: 2px solid #FFD60A;
}
#pv2-app-settings .pg-app-settings-updates {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  min-height: 0;
  box-sizing: border-box;
}
#pv2-app-settings .pg-app-settings-chevron {
  flex-shrink: 0;
  color: #C7C7CC;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
#pv2-app-settings .toggle-switch.pv2-notif-toggle.is-locked {
  pointer-events: none;
}
:is(body.dark, body.dark-mode) #pv2-app-settings .pg-app-settings-card {
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-card-border);
  box-shadow: var(--pg-card-shadow);
}
:is(body.dark, body.dark-mode) #pv2-app-settings .pg-app-settings-label {
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) #pv2-app-settings .pg-app-settings-notif {
  border-bottom-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) #pv2-app-settings .pg-profile-icon-well {
  background: var(--pg-icon-well-bg);
  color: var(--pg-icon-well-fg);
}

#pv2-app-updates .pg-app-updates-card {
  margin: 0 0 18px;
  padding: 16px 16px 4px;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  background: #FFFFFF;
  box-sizing: border-box;
}
#pv2-app-updates .pg-app-updates-heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #1C1C1E;
}
#pv2-app-updates .pg-app-updates-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #E5E5EA;
}
#pv2-app-updates .pg-app-updates-row:last-child {
  border-bottom: none;
}
#pv2-app-updates .pg-app-updates-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F2F2F7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#pv2-app-updates .pg-app-updates-badge span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border: 1.5px solid #1C1C1E;
  border-radius: 4px;
  color: #111111;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
#pv2-app-updates .pg-app-updates-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#pv2-app-updates .pg-app-updates-date,
#pv2-app-updates .pg-app-updates-detail,
#pv2-app-updates .pg-app-updates-empty {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #8E8E93;
}
#pv2-app-updates .pg-app-updates-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #1C1C1E;
}
#pv2-app-updates .pg-app-updates-empty {
  margin: 0 0 12px;
}
#pv2-app-updates .pg-app-updates-send {
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 14px 44px;
  border: none;
  border-radius: 16px;
  background: #FFD60A;
  color: #111111;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}
#pv2-app-updates .pg-app-updates-send-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
:is(body.dark, body.dark-mode) #pv2-app-updates .pg-app-updates-card {
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-card-border);
  box-shadow: var(--pg-card-shadow);
}
:is(body.dark, body.dark-mode) #pv2-app-updates .pg-app-updates-heading,
:is(body.dark, body.dark-mode) #pv2-app-updates .pg-app-updates-title {
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) #pv2-app-updates .pg-app-updates-row {
  border-bottom-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) #pv2-app-updates .pg-app-updates-badge {
  background: var(--pg-icon-well-bg);
}
:is(body.dark, body.dark-mode) #pv2-app-updates .pg-app-updates-badge span {
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* Nutrition tab → Your Targets quick-reference card */
.pg-nut-targets-quickref {
  background: var(--card);
  border: 1px solid #E5E5E5;
  color: var(--text);
}

/* Text link — do not inherit global button 44×44 tap target (was centering label too low). */
.pg-nut-targets-quickref-link {
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto;
  line-height: 1.2;
}

.pg-nut-targets-quickref-link:hover,
.pg-nut-targets-quickref-link:active {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.train-my-card {
  background: var(--card);
  border: 1px solid #E5E5E5;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.train-my-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  width: 100%;
  border-radius: 16px;
  background: var(--card);
}
.train-my-card > .train-my-scroll {
  border-radius: 0;
  background: transparent;
}
.train-my-tools {
  display: flex;
  width: 100%;
  gap: 0;
  padding: 8px 0;
  border-top: 1px solid #E5E5E5;
  overflow-x: hidden;
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  background: var(--card);
}
.train-my-tools > button {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  float: none;
  text-align: center;
  justify-content: center;
  align-items: center;
  border-radius: 0 !important;
  border-right: none !important;
}
.train-my-tools > button:not(:last-child)::after {
  content: "";
  position: absolute;
  top: -8px;
  bottom: -8px;
  right: 0;
  width: 1px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #E5E5E5;
  transform: none;
  pointer-events: none;
}
.train-my-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  width: 100%;
  min-width: 0;
}
.train-my-row {
  flex: 0 0 68px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 68px;
  box-sizing: border-box;
  background: transparent;
  border-radius: 0;
  border-bottom: none;
  box-shadow: none;
  overflow: hidden;
}
.train-guides-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto;
  -webkit-tap-highlight-color: transparent;
}
.train-guides-free {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #F5C518;
  color: #1C1C1E;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}
.train-guides-label,
.train-guides-chevron {
  color: #1C1C1E;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
:is(body.dark, body.dark-mode) .train-guides-label,
:is(body.dark, body.dark-mode) .train-guides-chevron {
  color: #ffffff;
}
.train-guides-chevron {
  font-size: 16px;
  font-weight: 500;
}

:is(body.dark, body.dark-mode) .pg-nut-targets-quickref {
  background: var(--card);
  border-color: #3A3A3C;
  color: var(--text);
}

/* Train → Edit / New Routine modal: scrollable day list */
.pg-create-routine-modal {
  -webkit-overflow-scrolling: touch;
}

.pg-create-routine-modal__scroll {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pg-nut-target-row--static {
  cursor: default;
  pointer-events: none;
}

/* Profile sheet → Units toggles (match Progress 7D/30D pill contrast) */
.pv2-unit-toggle {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.pv2-unit-toggle:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

#pg-offline-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg, #F2F2F7);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pg-offline-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 40px 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.pg-offline-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 24px;
}

.pg-offline-logo-fallback {
  background: #FFD60A;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: auto;
}

.pg-offline-title {
  font-size: 24px;
  font-weight: 700;
  color: #1C1C1E;
  margin-bottom: 12px;
  letter-spacing: 0;
}

.pg-offline-msg {
  font-size: 15px;
  color: #6C6C70;
  line-height: 1.5;
  margin-bottom: 32px;
}

.pg-offline-btn {
  background: #FFD60A;
  color: #000000;
  border: none;
  border-radius: 50px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
}

.pg-offline-btn:active { opacity: 0.8; }

/* Home dark mode — cards use the existing dark tokens. Light colours stay on body without .dark. */
.home-up-ico {
  width: 40px;
  height: 40px;
  background: #FEF3C7 !important;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1C1C1E !important;
}
.home-up-day,
.home-up-count {
  font-size: 12px;
  color: #6C6C70;
  margin: 0;
  line-height: 1.35;
}
.home-up-title {
  font-size: 15px;
  font-weight: 700;
  color: #1C1C1E;
  margin: 2px 0 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-up-count { margin: 2px 0 0; }

:is(body.dark, body.dark-mode) .home-score-card,
:is(body.dark, body.dark-mode) .home-today-tile,
:is(body.dark, body.dark-mode) .home-week-card,
:is(body.dark, body.dark-mode) .home-upcoming-card {
  background: var(--card);
  border: 1px solid #3A3A3C;
}
:is(body.dark, body.dark-mode) .home-status-card.is-scheduled {
  background: var(--card) !important;
  border: 1px solid #3A3A3C !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-rest {
  background: #2D1A3D !important;
  border: 1px solid #5B2D8A !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-rest .home-status-icon {
  background: transparent !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-rest .home-status-icon svg {
  stroke: #A855F7 !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-rest #home-plan-exercise-count {
  color: #A855F7 !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-done {
  background: #1A3D2B !important;
  border: 1px solid #2D6A4A !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-no-active {
  background: #3D1A1A !important;
  border: 1px solid #6A2D2D !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-no-active #home-plan-exercise-count {
  color: #FF3B30 !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-scheduled {
  background: #1C1C1E !important;
  border: 1px solid #3A3A3C !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-scheduled .train-today-ico {
  background: #FFD60A !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-done {
  background: #1A3D2B !important;
  border: 1px solid #2D6A4A !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-done .train-today-ico {
  background: #30D158 !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-done .train-today-done-sub {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-rest {
  background: #2D1A3D !important;
  border: 1px solid #5B2D8A !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-rest .train-today-ico {
  background: transparent !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-no-active {
  background: #3D1A1A !important;
  border: 1px solid #6A2D2D !important;
}
:is(body.dark, body.dark-mode) .train-today-status.is-no-active .train-today-ico {
  background: #FF3B30 !important;
}
:is(body.dark, body.dark-mode) .home-status-card #home-workout-title,
:is(body.dark, body.dark-mode) .home-status-card .home-chevron,
:is(body.dark, body.dark-mode) .home-status-card.is-scheduled .home-status-kicker {
  color: #ffffff !important;
}
:is(body.dark, body.dark-mode) .home-status-card.is-scheduled #home-plan-exercise-count {
  color: var(--label-secondary) !important;
}
:is(body.dark, body.dark-mode) #home-plan-exercise-count.home-today-done-name {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) .home-score-label,
:is(body.dark, body.dark-mode) #home-daily-score,
:is(body.dark, body.dark-mode) .home-level-line,
:is(body.dark, body.dark-mode) .home-tile-val,
:is(body.dark, body.dark-mode) #home-chip-calories,
:is(body.dark, body.dark-mode) #home-chip-sleep,
:is(body.dark, body.dark-mode) #home-chip-workout,
:is(body.dark, body.dark-mode) #screen-home .home-weekly-summary-stat,
:is(body.dark, body.dark-mode) .home-up-title {
  color: var(--text);
}
:is(body.dark, body.dark-mode) #home-chip-calories,
:is(body.dark, body.dark-mode) #home-chip-sleep,
:is(body.dark, body.dark-mode) #home-chip-workout {
  color: #ffffff !important;
}
:is(body.dark, body.dark-mode) .home-score-denom,
:is(body.dark, body.dark-mode) .home-xp-sub,
:is(body.dark, body.dark-mode) .home-tile-name,
:is(body.dark, body.dark-mode) .home-tile-sub,
:is(body.dark, body.dark-mode) #home-chip-calories-goal,
:is(body.dark, body.dark-mode) #home-chip-sleep-goal,
:is(body.dark, body.dark-mode) .home-week-extra,
:is(body.dark, body.dark-mode) .home-week-letter,
:is(body.dark, body.dark-mode) .home-week-today,
:is(body.dark, body.dark-mode) .home-tile-chev,
:is(body.dark, body.dark-mode) .home-up-chev,
:is(body.dark, body.dark-mode) .home-up-day,
:is(body.dark, body.dark-mode) .home-up-count {
  color: #8E8E93;
}
:is(body.dark, body.dark-mode) .home-kicker {
  color: #8E8E93;
}
:is(body.dark, body.dark-mode) .home-tile-chev,
:is(body.dark, body.dark-mode) .home-up-chev {
  color: #aeaeb2;
}

:is(body.dark, body.dark-mode) #home-chip-calories-goal,
:is(body.dark, body.dark-mode) #home-chip-sleep-goal {
  color: #8E8E93 !important;
}
:is(body.dark, body.dark-mode) .home-meter,
:is(body.dark, body.dark-mode) .home-score-card .home-meter,
:is(body.dark, body.dark-mode) .home-tile-meter .home-meter {
  background: #3a3a3c;
}
:is(body.dark, body.dark-mode) .home-tile-meter:has(#ov-bar-cal) .home-meter,
:is(body.dark, body.dark-mode) .home-tile-meter:has(#home-water-bar) .home-meter,
:is(body.dark, body.dark-mode) .home-tile-meter:has(#ov-bar-sleep) .home-meter,
:is(body.dark, body.dark-mode) div:has(> #nut-water-progress-fill) {
  background: #3A3A3C !important;
}
:is(body.dark, body.dark-mode) .home-score-divider,
:is(body.dark, body.dark-mode) .home-profile-stats > span + span::before {
  background: #2A2A2A;
}
:is(body.dark, body.dark-mode) .home-tile-ico-cal {
  background: rgba(245, 166, 35, 0.2);
}
:is(body.dark, body.dark-mode) .home-tile-ico-water {
  background: rgba(41, 182, 246, 0.2);
}
:is(body.dark, body.dark-mode) .home-tile-ico-sleep {
  background: #3D2A5C;
}
:is(body.dark, body.dark-mode) .home-up-ico {
  background: #2A2A00;
  color: #FFD60A;
}

/* Active workout session — dark surfaces only. Gold Add Set, Finish, Rest, and Superset stay as authored. */
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-card {
  background: #1C1C1E !important;
  border-color: #2A2A2A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] {
  background: #064E3B !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] p,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-kg-input,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-reps-input,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-note-btn:not([data-has-note="1"]),
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-delete-btn {
  color: #6EE7B7 !important;
  -webkit-text-fill-color: #6EE7B7 !important;
  opacity: 1 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-delete-btn {
  background: transparent !important;
  background-color: transparent !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-note-btn {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-note-btn:not([data-has-note="1"]) svg,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-note-btn:not([data-has-note="1"]) svg * {
  stroke: #6EE7B7 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-note-btn[data-has-note="1"],
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-note-btn[data-has-note="1"] svg,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row[data-done="1"] .session-set-note-btn[data-has-note="1"] svg * {
  color: #FFD60A !important;
  -webkit-text-fill-color: #FFD60A !important;
  stroke: #FFD60A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-delete-btn {
  background: #3A0A0A !important;
  border: none !important;
  border-radius: 50% !important;
  color: #EF4444 !important;
  -webkit-text-fill-color: #EF4444 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-complete-btn[data-done="1"] {
  background: transparent !important;
  border: none !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-complete-btn[data-done="1"] svg,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-complete-btn[data-done="1"] svg * {
  stroke: #6EE7B7 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-complete-btn:not([data-done="1"]) {
  background: #2A2A2A !important;
  border: 1px solid #3A3A3C !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-menu-btn {
  background: #2C2C2E !important;
  border: 1.5px solid #3A3A3C !important;
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-menu-btn svg {
  fill: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-add-warmup-btn {
  background: transparent !important;
  border: 1px solid #2A2A2A !important;
  color: #F59E0B !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-add-drop-btn {
  background: transparent !important;
  border: 1px solid #2A2A2A !important;
  color: #EF4444 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-tool-btn {
  background: #2A2A00 !important;
  border: none !important;
  border-radius: 10px !important;
  color: #FFD60A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-tool-btn svg,
:is(body.dark, body.dark-mode) #workout-session-modal .session-tool-btn svg * {
  stroke: #FFD60A !important;
  fill: none !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-tool-btn.session-stat-timer-btn {
  background: #2A2A00 !important;
  color: #FFD60A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-tool-btn.session-stat-timer-btn svg,
:is(body.dark, body.dark-mode) #workout-session-modal .session-tool-btn.session-stat-timer-btn svg * {
  stroke: #FFD60A !important;
  fill: none !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-stats-bar {
  border-bottom-color: #2A2A2A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal #session-duration,
:is(body.dark, body.dark-mode) #workout-session-modal #session-volume,
:is(body.dark, body.dark-mode) #workout-session-modal #session-volume [data-session-volume-unit],
:is(body.dark, body.dark-mode) #workout-session-modal #session-sets {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal #session-duration + span,
:is(body.dark, body.dark-mode) #workout-session-modal #session-volume + span,
:is(body.dark, body.dark-mode) #workout-session-modal #session-sets + span,
:is(body.dark, body.dark-mode) #workout-session-modal #session-duration + p,
:is(body.dark, body.dark-mode) #workout-session-modal #session-volume + p,
:is(body.dark, body.dark-mode) #workout-session-modal #session-sets + p {
  color: #8E8E93 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-stat-divider {
  background: #2A2A2A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-col-hdr {
  color: #8E8E93 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-kg-input:not(:disabled),
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-reps-input:not(:disabled) {
  background: #2A2A2A !important;
  color: #ffffff !important;
  border-color: #3A3A3C !important;
}
#workout-session-modal .session-set-row[data-done="1"] .session-set-kg-input,
#workout-session-modal .session-set-row[data-done="1"] .session-set-reps-input {
  opacity: 1 !important;
  color: #065F46;
  -webkit-text-fill-color: #065F46;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-kg-input:disabled,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-reps-input:disabled {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  opacity: 1 !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-note-well.has-note {
  background: transparent !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row:not([data-done="1"]) .session-set-note-btn[data-has-note="1"] {
  background: transparent !important;
  background-color: transparent !important;
  border: 1.5px solid #2A2A2A !important;
  color: #FFD60A !important;
  -webkit-text-fill-color: #FFD60A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-note-well.has-note .session-exercise-note-icon,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row:not([data-done="1"]) .session-set-note-btn[data-has-note="1"],
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row:not([data-done="1"]) .session-set-note-btn[data-has-note="1"] svg,
:is(body.dark, body.dark-mode) #workout-session-modal .session-set-row:not([data-done="1"]) .session-set-note-btn[data-has-note="1"] svg * {
  color: #FFD60A !important;
  stroke: #FFD60A !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-note-icon {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-note-input::placeholder {
  color: #FFFFFF !important;
  opacity: 1;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-note-input {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-best-trophy {
  background: #2A2A00 !important;
  color: #FFD60A !important;
  border-radius: 10px !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-best-trophy svg,
:is(body.dark, body.dark-mode) #workout-session-modal .session-best-trophy svg * {
  stroke: #FFD60A !important;
  fill: none !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-best-btn {
  color: #FFFFFF !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-target-text {
  color: #FFFFFF !important;
}

/* Card outline matches Train Today's Workout (scheduled): #E5E5E5 light, #3A3A3C dark.
   !important beats inline borders on .card shells. Coloured done/rest/no-active borders stay on their own rules. */
.card,
.home-score-card,
.home-today-tile,
.home-week-card,
.home-upcoming-card,
.home-status-card.is-scheduled,
.train-my-card,
.train-today-status.is-scheduled,
.pg-nut-targets-quickref,
.nut-daily-targets-card,
.nut-water-intake-card,
.meal-block,
#nut-food-diary-meals > [data-meal-section],
#workout-session-modal .session-exercise-card,
#train-workout-content button[onclick*="startEmptyWorkout()"],
#train-workout-content button[onclick*="openExerciseLibraryBrowser()"] {
  border: 1px solid #E5E5E5 !important;
}
:is(body.dark, body.dark-mode) .card,
:is(body.dark, body.dark-mode) .home-score-card,
:is(body.dark, body.dark-mode) .home-today-tile,
:is(body.dark, body.dark-mode) .home-week-card,
:is(body.dark, body.dark-mode) .home-upcoming-card,
:is(body.dark, body.dark-mode) .home-status-card.is-scheduled,
:is(body.dark, body.dark-mode) .train-my-card,
:is(body.dark, body.dark-mode) .train-today-status.is-scheduled,
:is(body.dark, body.dark-mode) .pg-nut-targets-quickref,
:is(body.dark, body.dark-mode) .nut-daily-targets-card,
:is(body.dark, body.dark-mode) .nut-water-intake-card,
:is(body.dark, body.dark-mode) .meal-block,
:is(body.dark, body.dark-mode) #nut-food-diary-meals > [data-meal-section],
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-card,
:is(body.dark, body.dark-mode) #train-workout-content button[onclick*="startEmptyWorkout()"],
:is(body.dark, body.dark-mode) #train-workout-content button[onclick*="openExerciseLibraryBrowser()"] {
  border: 1px solid #3A3A3C !important;
}
#workout-session-modal .session-exercise-card {
  border-radius: 20px !important;
}
:is(body.dark, body.dark-mode) #workout-session-modal .session-exercise-card {
  border: 1px solid #2A2A2A !important;
}

/* Exercise Library screen */
.pg-ex-lib-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 16px 4px;
  flex-shrink: 0;
  background: transparent;
}
.pg-ex-lib-back {
  justify-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  background: none;
  border: none;
  color: #111111;
  cursor: pointer;
}
.pg-ex-lib-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: #111111;
  text-align: center;
}
.pg-ex-lib-create {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 10px 18px;
  background: #FFD60A;
  color: #000000;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}
.pg-ex-lib-tools {
  position: relative;
  z-index: 4;
  padding: 8px 16px 0;
  flex-shrink: 0;
}
.pg-ex-lib-search {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.pg-ex-lib-search svg {
  display: block;
  flex-shrink: 0;
}
.pg-ex-lib-search input,
input.pg-search-input {
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  line-height: 16px;
  color: var(--text);
  width: 100%;
  height: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  align-self: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.pg-ex-lib-search input::placeholder {
  color: #6C6C70;
}
.pg-ex-lib-filters {
  display: flex;
  gap: 10px;
}
.pg-ex-lib-filter-slot {
  position: relative;
  flex: 1;
  min-width: 0;
}
.pg-ex-lib-filter-slot > .pg-ex-lib-filter {
  width: 100%;
}
.pg-ex-lib-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  max-height: min(360px, 52vh);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
}
.pg-ex-lib-dropdown[hidden] {
  display: none !important;
}
.pg-ex-lib-dropdown-list {
  max-height: min(360px, 52vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pg-ex-lib-dropdown-opt {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.pg-ex-lib-dropdown-opt.is-selected {
  background: #FFD60A;
  color: #000000;
  font-weight: 700;
}
.pg-ex-lib-filter {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  color: #111111;
  cursor: pointer;
}
.pg-ex-lib-filter-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.pg-ex-lib-heading {
  margin: 16px 16px 8px;
  padding: 0 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.35;
  text-transform: uppercase;
  color: #1C1C1E;
  flex-shrink: 0;
}
#library-exercise-list {
  margin: 0 16px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
}
#library-exercise-list .pg-ex-lib-row {
  min-height: 112px;
  padding: 14px 12px;
  box-sizing: border-box;
}
.pg-ex-lib-row {
  background: transparent;
  border: none;
  border-bottom: 1px solid #E5E5E5;
  border-radius: 0;
}
.pg-ex-lib-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}
.pg-ex-lib-row--last {
  border-bottom: none;
}
.pg-picker-row.is-selected {
  background: rgba(255, 214, 10, 0.12);
  border-left: 3px solid #FFD60A;
  border-bottom: 1px solid rgba(255, 214, 10, 0.3);
}
.pg-ex-lib-sub {
  font-size: 13px;
  margin: 2px 0 0;
  white-space: normal;
}
.pg-ex-lib-template {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  max-width: none;
  border-radius: 12px;
  padding: 6px 10px;
  margin: 0;
  min-height: 0;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-back,
:is(body.dark, body.dark-mode) .pg-ex-lib-title {
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-search {
  background: #1C1C1E;
  border-color: #2A2A2A;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-filter,
:is(body.dark, body.dark-mode) #library-exercise-list {
  background: #1A1A1A;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-filter,
:is(body.dark, body.dark-mode) #library-exercise-list {
  border-color: #3A3A3C;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-row {
  border-bottom-color: #2A2A2A;
}
:is(body.dark, body.dark-mode) .pg-picker-row.is-selected {
  background: rgba(255, 214, 10, 0.12);
  border-left: 3px solid #FFD60A;
  border-bottom: 1px solid rgba(255, 214, 10, 0.3);
}
:is(body.dark, body.dark-mode) .pg-ex-lib-dropdown-opt {
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-dropdown-opt.is-selected {
  background: #FFD60A;
  color: #000000;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-filter {
  color: #FFFFFF;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-thumb {
  background: #2A2A2A !important;
}
:is(body.dark, body.dark-mode) .pg-ex-lib-heading {
  color: #FFFFFF;
}
#library-exercise-list::-webkit-scrollbar {
  width: 4px;
}
#library-exercise-list::-webkit-scrollbar-track {
  background: transparent;
}
#library-exercise-list::-webkit-scrollbar-thumb {
  background: #BFC0C0;
  border-radius: 4px;
}
:is(body.dark, body.dark-mode) #library-exercise-list::-webkit-scrollbar-track {
  background: transparent;
}
:is(body.dark, body.dark-mode) #library-exercise-list::-webkit-scrollbar-thumb {
  background: #BFC0C0;
}
#picker-exercise-list {
  flex: 0 0 auto;
  height: calc(96px * 5 + 2px);
  max-height: calc(96px * 5 + 2px);
  margin: 0 16px;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 16px;
}
:is(body.dark, body.dark-mode) #picker-exercise-list {
  background: #1A1A1A;
  border-color: #3A3A3C;
}
#picker-exercise-list::-webkit-scrollbar {
  width: 4px;
}
#picker-exercise-list::-webkit-scrollbar-track {
  background: transparent;
}
#picker-exercise-list::-webkit-scrollbar-thumb {
  background: #BFC0C0;
  border-radius: 4px;
}
.pg-picker-template {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 6px 10px;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
